提交 | 用户 | 时间
|
1ac2bc
|
1 |
/** |
懒 |
2 |
* 添加或者修改页面 |
|
3 |
*/ |
|
4 |
var ModelInfoDlg = { |
|
5 |
data: { |
|
6 |
rev: "", |
|
7 |
name: "", |
|
8 |
key: "", |
|
9 |
category: "", |
|
10 |
createTime: "", |
|
11 |
lastUpdateTime: "", |
|
12 |
version: "", |
|
13 |
metaInfo: "", |
|
14 |
deploymentId: "", |
|
15 |
editorSourceValueId: "", |
|
16 |
editorSourceExtraValueId: "", |
|
17 |
tenantId: "" |
|
18 |
} |
|
19 |
}; |
|
20 |
|
|
21 |
layui.use(['form', 'admin', 'ax'], function () { |
|
22 |
var $ = layui.jquery; |
|
23 |
var $ax = layui.ax; |
|
24 |
var form = layui.form; |
|
25 |
var admin = layui.admin; |
|
26 |
|
|
27 |
//让当前iframe弹层高度适应 |
|
28 |
admin.iframeAuto(); |
|
29 |
|
|
30 |
//表单提交事件 |
|
31 |
form.on('submit(btnSubmit)', function (data) { |
|
32 |
var ajax = new $ax(Feng.ctxPath + "/model/addItem", function (data) { |
|
33 |
Feng.success("添加成功!"); |
|
34 |
|
|
35 |
//传给上个页面,刷新table用 |
|
36 |
admin.putTempData('formOk', true); |
|
37 |
|
|
38 |
//关掉对话框 |
|
39 |
admin.closeThisDialog(); |
|
40 |
|
|
41 |
}, function (data) { |
|
42 |
Feng.error("添加失败!" + data.responseJSON.message) |
|
43 |
}); |
|
44 |
ajax.set(data.field); |
|
45 |
ajax.start(); |
|
46 |
|
|
47 |
return false; |
|
48 |
}); |
|
49 |
|
|
50 |
}); |