mirror of https://gitee.com/stylefeng/guns
【DictType】修改视图映射 静态资源路径
parent
e59adda5a0
commit
9c87f0cc9d
|
@ -186,23 +186,6 @@ layui.use(['layer', 'form', 'table', 'util', 'admin', 'func', 'HttpRequest'], fu
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
/* 字典-点击表格头工具栏 */
|
|
||||||
// table.on('toolbar(dictTable)', function (obj) {
|
|
||||||
// if (obj.event === 'add') { // 添加
|
|
||||||
// Dict.openAddDlg(dictTypeObj.data);
|
|
||||||
// } else if (obj.event === 'del') { // 删除
|
|
||||||
// var checkRows = table.checkStatus('dictTable');
|
|
||||||
// if (checkRows.data.length === 0) {
|
|
||||||
// layer.msg('请选择要删除的数据', {icon: 2});
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// var ids = checkRows.data.map(function (d) {
|
|
||||||
// return d.dictDataId;
|
|
||||||
// });
|
|
||||||
// doDel2({ids: ids});
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
/* 字典-渲染表格 */
|
/* 字典-渲染表格 */
|
||||||
var dictTable = table.render({
|
var dictTable = table.render({
|
||||||
elem: '#dictTable',
|
elem: '#dictTable',
|
|
@ -5,27 +5,23 @@ layui.use(['form', 'admin', 'HttpRequest'], function () {
|
||||||
var HttpRequest = layui.HttpRequest;
|
var HttpRequest = layui.HttpRequest;
|
||||||
|
|
||||||
//获取详情信息,填充表单
|
//获取详情信息,填充表单
|
||||||
var request = new HttpRequest(Feng.ctxPath + "/dictType/getDictDetail?dictTypeId=" + Feng.getUrlParam("dictTypeId"), 'get', function (result) {
|
var request = new HttpRequest(Feng.ctxPath + "/dictType/getDictDetail?dictTypeId=" + Feng.getUrlParam("dictTypeId"), 'get');
|
||||||
if(result.data.dictTypeClass === 2){
|
var result = request.start();
|
||||||
$('input,select,textarea').attr("disabled",true).attr('readonly',true);
|
form.val('dictTypeForm', result.data);
|
||||||
}
|
if(result.data.dictTypeClass === 2){
|
||||||
form.val('dictTypeForm', result.data);
|
$('input,select,textarea').attr("disabled",true).attr('readonly',true);
|
||||||
}, function (data) {
|
}
|
||||||
Feng.error("加载失败!" + data.message);
|
|
||||||
});
|
|
||||||
request.start();
|
|
||||||
|
|
||||||
//表单提交事件
|
//表单提交事件
|
||||||
form.on('submit(btnSubmit)', function (data) {
|
form.on('submit(btnSubmit)', function (data) {
|
||||||
var request = new HttpRequest(Feng.ctxPath + "/dictType/updateDictType", 'post', function (data) {
|
var request = new HttpRequest(Feng.ctxPath + "/dictType/updateDictType", 'post', function (data) {
|
||||||
admin.closeThisDialog();
|
admin.closeThisDialog();
|
||||||
Feng.success("更新成功!");
|
Feng.success("修改成功!");
|
||||||
admin.putTempData('formOk', true);
|
admin.putTempData('formOk', true);
|
||||||
}, function (data) {
|
}, function (data) {
|
||||||
admin.closeThisDialog();
|
admin.closeThisDialog();
|
||||||
Feng.error("更新失败!" + data.message);
|
Feng.error("修改失败!" + data.message);
|
||||||
});
|
});
|
||||||
|
|
||||||
request.set(data.field);
|
request.set(data.field);
|
||||||
request.start(true);
|
request.start(true);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@layout("/layout/_container.html",{js:["/assets/modular/system/dict/dictionary.js"]}){
|
@layout("/layout/_container.html",{js:["/assets/modular/system/dict/dictType.js"]}){
|
||||||
<style>
|
<style>
|
||||||
#dictTypeTable + .layui-table-view .layui-table-tool-temp {
|
#dictTypeTable + .layui-table-view .layui-table-tool-temp {
|
||||||
padding-right: 0;
|
padding-right: 0;
|
Loading…
Reference in New Issue