提交 | 用户 | 时间
|
1ac2bc
|
1 |
/** |
懒 |
2 |
* 添加或者修改页面 |
|
3 |
*/ |
|
4 |
var DatabaseInfoInfoDlg = { |
|
5 |
data: { |
|
6 |
dbName: "", |
|
7 |
jdbcDriver: "", |
|
8 |
userName: "", |
|
9 |
password: "", |
|
10 |
jdbcUrl: "", |
|
11 |
remarks: "", |
|
12 |
createTime: "" |
|
13 |
} |
|
14 |
}; |
|
15 |
|
|
16 |
layui.use(['form', 'admin', 'ax'], function () { |
|
17 |
var $ = layui.jquery; |
|
18 |
var $ax = layui.ax; |
|
19 |
var form = layui.form; |
|
20 |
var admin = layui.admin; |
|
21 |
|
|
22 |
//让当前iframe弹层高度适应 |
|
23 |
admin.iframeAuto(); |
|
24 |
|
|
25 |
//表单提交事件 |
|
26 |
form.on('submit(btnSubmit)', function (data) { |
|
27 |
var ajax = new $ax(Feng.ctxPath + "/databaseInfo/addItem", function (data) { |
|
28 |
Feng.success("添加成功!"); |
|
29 |
window.location.href = Feng.ctxPath + '/databaseInfo' |
|
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 |
//返回按钮 |
|
40 |
$("#backupPage").click(function () { |
|
41 |
window.location.href = Feng.ctxPath + '/databaseInfo' |
|
42 |
}); |
|
43 |
|
|
44 |
}); |