提交 | 用户 | 时间
|
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 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
//获取详情信息,填充表单 |
|
54 |
var ajax = new $ax(Feng.ctxPath + "/opcuaConf/detail?id=" + Feng.getUrlParam("id")); |
|
55 |
var result = ajax.start(); |
|
56 |
form.val('opcuaConfForm', result.data); |
|
57 |
|
|
58 |
//表单提交事件 |
|
59 |
form.on('submit(btnSubmit)', function (data) { |
|
60 |
var ajax = new $ax(Feng.ctxPath + "/opcuaConf/editItem", function (data) { |
|
61 |
Feng.success("更新成功!"); |
|
62 |
window.location.href = Feng.ctxPath + '/opcuaConf' |
|
63 |
}, function (data) { |
|
64 |
Feng.error("更新失败!" + data.responseJSON.message) |
|
65 |
}); |
|
66 |
ajax.set(data.field); |
|
67 |
ajax.start(); |
|
68 |
|
|
69 |
return false; |
|
70 |
}); |
|
71 |
|
|
72 |
$('#cancel').click(function(){ |
|
73 |
window.location.href = Feng.ctxPath + '/opcuaConf' |
|
74 |
}); |
|
75 |
}); |