提交 | 用户 | 时间
|
487b2f
|
1 |
/** |
YY |
2 |
* 添加或者修改页面 |
|
3 |
*/ |
|
4 |
var OpcuaConfInfoDlg = { |
|
5 |
data: { |
|
6 |
id: "", |
|
7 |
module: "", |
|
8 |
node: "", |
|
9 |
length: "", |
5d91e0
|
10 |
sysTypes: "", |
487b2f
|
11 |
functionality: "", |
YY |
12 |
subscribe: "", |
|
13 |
rModule: "", |
|
14 |
rFunction: "", |
|
15 |
remarks: "" |
|
16 |
} |
|
17 |
}; |
|
18 |
|
|
19 |
layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () { |
|
20 |
var $ = layui.jquery; |
|
21 |
var $ax = layui.ax; |
|
22 |
var form = layui.form; |
|
23 |
var admin = layui.admin; |
|
24 |
|
|
25 |
//表单提交事件 |
|
26 |
form.on('submit(btnSubmit)', function (data) { |
|
27 |
var ajax = new $ax(Feng.ctxPath + "/opcuaConf/addItem", function (data) { |
|
28 |
Feng.success("添加成功!"); |
|
29 |
window.location.href = Feng.ctxPath + '/opcuaConf' |
|
30 |
}, function (data) { |
|
31 |
Feng.error("添加失败!" + data.responseJSON.message) |
|
32 |
}); |
|
33 |
ajax.set(data.field); |
|
34 |
ajax.start(); |
|
35 |
|
|
36 |
return false; |
|
37 |
}); |
|
38 |
|
|
39 |
$('#cancel').click(function(){ |
|
40 |
window.location.href = Feng.ctxPath + '/opcuaConf' |
|
41 |
}); |
|
42 |
|
|
43 |
}); |