save
This commit is contained in:
parent
5c9188a7ca
commit
58c0370eb4
@ -634,14 +634,14 @@ layui.use(["jquery", "xmSelect"], function() {
|
|||||||
layui.$.ajax({
|
layui.$.ajax({
|
||||||
url: "$url",
|
url: "$url",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let value = layui.$("#$id").attr("value");
|
let value = layui.$("#$id").attr("value");
|
||||||
let initValue = value ? value.split(",") : [];
|
let initValue = value ? value.split(",") : [];
|
||||||
layui.xmSelect.render({
|
layui.xmSelect.render({
|
||||||
el: "#$id",
|
el: "#$id",
|
||||||
name: "$field",
|
name: "$field",
|
||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
data: e.data, $options_string
|
data: res.data, $options_string
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1058,10 +1058,10 @@ EOF;
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: SELECT_API,
|
url: SELECT_API,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
|
|
||||||
// 给表单初始化数据
|
// 给表单初始化数据
|
||||||
layui.each(e.data[0], function (key, value) {
|
layui.each(res.data[0], function (key, value) {
|
||||||
let obj = $('*[name="'+key+'"]');
|
let obj = $('*[name="'+key+'"]');
|
||||||
if (key === "password") {
|
if (key === "password") {
|
||||||
obj.attr("placeholder", "不更新密码请留空");
|
obj.attr("placeholder", "不更新密码请留空");
|
||||||
|
@ -125,15 +125,15 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 字段 角色 roles
|
// 字段 角色 roles
|
||||||
layui.use(["jquery", "xmSelect"], function() {
|
layui.use(["jquery", "xmSelect", "popup"], function() {
|
||||||
layui.$.ajax({
|
layui.$.ajax({
|
||||||
url: "/app/admin/role/select?format=tree",
|
url: "/app/admin/role/select?format=tree",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let value = layui.$("#roles").attr("value");
|
let value = layui.$("#roles").attr("value");
|
||||||
let initValue = value ? value.split(",") : [];
|
let initValue = value ? value.split(",") : [];
|
||||||
if (!top.Admin.Account.isSupperAdmin) {
|
if (!top.Admin.Account.isSupperAdmin) {
|
||||||
layui.each(e.data, function (k, v) {
|
layui.each(res.data, function (k, v) {
|
||||||
v.disabled = true;
|
v.disabled = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -141,11 +141,14 @@
|
|||||||
el: "#roles",
|
el: "#roles",
|
||||||
name: "roles",
|
name: "roles",
|
||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
data: e.data,
|
data: res.data,
|
||||||
layVerify: "required",
|
layVerify: "required",
|
||||||
tree: {"show":true, expandedKeys:true, strict:false},
|
tree: {"show":true, expandedKeys:true, strict:false},
|
||||||
toolbar: {show:true, list:["ALL","CLEAR","REVERSE"]},
|
toolbar: {show:true, list:["ALL","CLEAR","REVERSE"]},
|
||||||
})
|
});
|
||||||
|
if (res.code) {
|
||||||
|
return layui.popup.failure(res.msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -101,10 +101,10 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: SELECT_API,
|
url: SELECT_API,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
|
|
||||||
// 给表单初始化数据
|
// 给表单初始化数据
|
||||||
layui.each(e.data[0], function (key, value) {
|
layui.each(res.data[0], function (key, value) {
|
||||||
let obj = $('*[name="'+key+'"]');
|
let obj = $('*[name="'+key+'"]');
|
||||||
if (key === "password") {
|
if (key === "password") {
|
||||||
obj.attr("placeholder", "不更新密码请留空");
|
obj.attr("placeholder", "不更新密码请留空");
|
||||||
@ -152,11 +152,11 @@
|
|||||||
layui.$.ajax({
|
layui.$.ajax({
|
||||||
url: "/app/admin/role/select?format=tree",
|
url: "/app/admin/role/select?format=tree",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let value = layui.$("#roles").attr("value");
|
let value = layui.$("#roles").attr("value");
|
||||||
let initValue = value ? value.split(",") : [];
|
let initValue = value ? value.split(",") : [];
|
||||||
if (!top.Admin.Account.isSupperAdmin) {
|
if (!top.Admin.Account.isSupperAdmin) {
|
||||||
layui.each(e.data, function (k, v) {
|
layui.each(res.data, function (k, v) {
|
||||||
v.disabled = true;
|
v.disabled = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -164,7 +164,7 @@
|
|||||||
el: "#roles",
|
el: "#roles",
|
||||||
name: "roles",
|
name: "roles",
|
||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
data: e.data,
|
data: res.data,
|
||||||
layVerify: "required",
|
layVerify: "required",
|
||||||
tree: {show: true, expandedKeys: true, strict: false},
|
tree: {show: true, expandedKeys: true, strict: false},
|
||||||
toolbar: {show: true, list: ["ALL","CLEAR","REVERSE"]},
|
toolbar: {show: true, list: ["ALL","CLEAR","REVERSE"]},
|
||||||
@ -173,6 +173,10 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (res.code) {
|
||||||
|
return layui.popup.failure(res.msg);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -51,8 +51,8 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: SCHEMA_API,
|
url: SCHEMA_API,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let cols = e.data;
|
let cols = res.data;
|
||||||
layui.each(cols, function (k, v) {
|
layui.each(cols, function (k, v) {
|
||||||
if (v.field === "installed") {
|
if (v.field === "installed") {
|
||||||
cols[k].templet = "#install";
|
cols[k].templet = "#install";
|
||||||
|
@ -65,14 +65,14 @@
|
|||||||
layui.$.ajax({
|
layui.$.ajax({
|
||||||
url: "/app/admin/role/rules?id=1",
|
url: "/app/admin/role/rules?id=1",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let value = layui.$("#rules").attr("value");
|
let value = layui.$("#rules").attr("value");
|
||||||
let initValue = value ? value.split(",") : [];
|
let initValue = value ? value.split(",") : [];
|
||||||
layui.xmSelect.render({
|
layui.xmSelect.render({
|
||||||
el: "#rules",
|
el: "#rules",
|
||||||
name: "rules",
|
name: "rules",
|
||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
data: e.data,
|
data: res.data,
|
||||||
tree: {"show":true,expandedKeys:initValue},
|
tree: {"show":true,expandedKeys:initValue},
|
||||||
toolbar: {show:true,list:["ALL","CLEAR","REVERSE"]},
|
toolbar: {show:true,list:["ALL","CLEAR","REVERSE"]},
|
||||||
})
|
})
|
||||||
@ -85,7 +85,7 @@
|
|||||||
layui.$.ajax({
|
layui.$.ajax({
|
||||||
url: "/app/admin/role/select?format=tree",
|
url: "/app/admin/role/select?format=tree",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let value = layui.$("#pid").attr("value");
|
let value = layui.$("#pid").attr("value");
|
||||||
let initValue = value ? value.split(",") : [];
|
let initValue = value ? value.split(",") : [];
|
||||||
layui.xmSelect.render({
|
layui.xmSelect.render({
|
||||||
@ -93,7 +93,7 @@
|
|||||||
name: "pid",
|
name: "pid",
|
||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
tips: "请选择",
|
tips: "请选择",
|
||||||
data: e.data,
|
data: res.data,
|
||||||
value: "0",
|
value: "0",
|
||||||
model: {"icon":"hidden","label":{"type":"text"}},
|
model: {"icon":"hidden","label":{"type":"text"}},
|
||||||
clickClose: true,
|
clickClose: true,
|
||||||
|
@ -67,10 +67,10 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: SELECT_API,
|
url: SELECT_API,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
|
|
||||||
// 给表单初始化数据
|
// 给表单初始化数据
|
||||||
layui.each(e.data[0], function (key, value) {
|
layui.each(res.data[0], function (key, value) {
|
||||||
let obj = $('*[name="'+key+'"]');
|
let obj = $('*[name="'+key+'"]');
|
||||||
if (key === "password") {
|
if (key === "password") {
|
||||||
obj.attr("placeholder", "不更新密码请留空");
|
obj.attr("placeholder", "不更新密码请留空");
|
||||||
@ -87,16 +87,16 @@
|
|||||||
// 字段 权限 rules
|
// 字段 权限 rules
|
||||||
layui.use(["jquery", "xmSelect"], function() {
|
layui.use(["jquery", "xmSelect"], function() {
|
||||||
layui.$.ajax({
|
layui.$.ajax({
|
||||||
url: "/app/admin/role/rules?id=" + e.data[0].pid,
|
url: "/app/admin/role/rules?id=" + res.data[0].pid,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let value = layui.$("#rules").attr("value");
|
let value = layui.$("#rules").attr("value");
|
||||||
let initValue = value ? value.split(",") : [];
|
let initValue = value ? value.split(",") : [];
|
||||||
layui.xmSelect.render({
|
layui.xmSelect.render({
|
||||||
el: "#rules",
|
el: "#rules",
|
||||||
name: "rules",
|
name: "rules",
|
||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
data: e.data,
|
data: res.data,
|
||||||
tree: {"show":true,expandedKeys:initValue},
|
tree: {"show":true,expandedKeys:initValue},
|
||||||
toolbar: {show:true,list:["ALL","CLEAR","REVERSE"]},
|
toolbar: {show:true,list:["ALL","CLEAR","REVERSE"]},
|
||||||
})
|
})
|
||||||
@ -109,7 +109,7 @@
|
|||||||
layui.$.ajax({
|
layui.$.ajax({
|
||||||
url: "/app/admin/role/select?format=tree",
|
url: "/app/admin/role/select?format=tree",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let value = layui.$("#pid").attr("value");
|
let value = layui.$("#pid").attr("value");
|
||||||
let initValue = value ? value.split(",") : [];
|
let initValue = value ? value.split(",") : [];
|
||||||
layui.xmSelect.render({
|
layui.xmSelect.render({
|
||||||
@ -118,7 +118,7 @@
|
|||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
tips: "请选择",
|
tips: "请选择",
|
||||||
toolbar: {show: true, list: ["CLEAR"]},
|
toolbar: {show: true, list: ["CLEAR"]},
|
||||||
data: e.data,
|
data: res.data,
|
||||||
value: "0",
|
value: "0",
|
||||||
model: {"icon":"hidden","label":{"type":"text"}},
|
model: {"icon":"hidden","label":{"type":"text"}},
|
||||||
clickClose: true,
|
clickClose: true,
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
layui.$.ajax({
|
layui.$.ajax({
|
||||||
url: "/app/admin/rule/select?format=tree&type=0,1",
|
url: "/app/admin/rule/select?format=tree&type=0,1",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let value = layui.$("#pid").attr("value");
|
let value = layui.$("#pid").attr("value");
|
||||||
let initValue = value ? value.split(",") : [];
|
let initValue = value ? value.split(",") : [];
|
||||||
layui.xmSelect.render({
|
layui.xmSelect.render({
|
||||||
@ -116,7 +116,7 @@
|
|||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
tips: "无",
|
tips: "无",
|
||||||
toolbar: {show: true, list: ["CLEAR"]},
|
toolbar: {show: true, list: ["CLEAR"]},
|
||||||
data: e.data,
|
data: res.data,
|
||||||
value: "0",
|
value: "0",
|
||||||
model: {"icon":"hidden","label":{"type":"text"}},
|
model: {"icon":"hidden","label":{"type":"text"}},
|
||||||
clickClose: true,
|
clickClose: true,
|
||||||
|
@ -100,10 +100,10 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: SELECT_API,
|
url: SELECT_API,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
|
|
||||||
// 赋值表单
|
// 赋值表单
|
||||||
layui.each(e.data[0], function (key, value) {
|
layui.each(res.data[0], function (key, value) {
|
||||||
let obj = $('*[name="'+key+'"]');
|
let obj = $('*[name="'+key+'"]');
|
||||||
if (key === "password") {
|
if (key === "password") {
|
||||||
obj.attr("placeholder", "不更新密码请留空");
|
obj.attr("placeholder", "不更新密码请留空");
|
||||||
@ -131,7 +131,7 @@
|
|||||||
layui.$.ajax({
|
layui.$.ajax({
|
||||||
url: "/app/admin/rule/select?format=tree&type=0,1",
|
url: "/app/admin/rule/select?format=tree&type=0,1",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let value = layui.$("#pid").attr("value");
|
let value = layui.$("#pid").attr("value");
|
||||||
let initValue = value ? value.split(",") : [];
|
let initValue = value ? value.split(",") : [];
|
||||||
layui.xmSelect.render({
|
layui.xmSelect.render({
|
||||||
@ -140,7 +140,7 @@
|
|||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
tips: "无",
|
tips: "无",
|
||||||
toolbar: {show: true, list: ["CLEAR"]},
|
toolbar: {show: true, list: ["CLEAR"]},
|
||||||
data: e.data,
|
data: res.data,
|
||||||
model: {"icon":"hidden","label":{"type":"text"}},
|
model: {"icon":"hidden","label":{"type":"text"}},
|
||||||
clickClose: true,
|
clickClose: true,
|
||||||
radio: true,
|
radio: true,
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
layui.$.ajax({
|
layui.$.ajax({
|
||||||
url: "/app/admin/rule/select?format=tree&type=0,1",
|
url: "/app/admin/rule/select?format=tree&type=0,1",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let value = layui.$("#pid").attr("value");
|
let value = layui.$("#pid").attr("value");
|
||||||
let initValue = value ? value.split(",") : [];
|
let initValue = value ? value.split(",") : [];
|
||||||
layui.xmSelect.render({
|
layui.xmSelect.render({
|
||||||
@ -90,7 +90,7 @@
|
|||||||
name: "pid",
|
name: "pid",
|
||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
tips: "无",
|
tips: "无",
|
||||||
data: e.data,
|
data: res.data,
|
||||||
toolbar: {show: true, list: ["CLEAR"]},
|
toolbar: {show: true, list: ["CLEAR"]},
|
||||||
model: {"icon":"hidden","label":{"type":"text"}},
|
model: {"icon":"hidden","label":{"type":"text"}},
|
||||||
clickClose: true,
|
clickClose: true,
|
||||||
|
@ -48,8 +48,8 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: SELECT_API,
|
url: SELECT_API,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
layui.each(e.data[0], function (key, value) {
|
layui.each(res.data[0], function (key, value) {
|
||||||
let obj = $('*[name="'+key+'"]');
|
let obj = $('*[name="'+key+'"]');
|
||||||
if (key === "password") {
|
if (key === "password") {
|
||||||
obj.attr("placeholder", "不更新密码请留空");
|
obj.attr("placeholder", "不更新密码请留空");
|
||||||
|
@ -80,8 +80,8 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: SCHEMA_API,
|
url: SCHEMA_API,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let forms = e.data.forms;
|
let forms = res.data.forms;
|
||||||
let cols = [{
|
let cols = [{
|
||||||
type: "checkbox"
|
type: "checkbox"
|
||||||
}];
|
}];
|
||||||
|
@ -121,14 +121,14 @@
|
|||||||
layui.$.ajax({
|
layui.$.ajax({
|
||||||
url: "/app/admin/dict/get/upload",
|
url: "/app/admin/dict/get/upload",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let value = layui.$("#category").attr("value");
|
let value = layui.$("#category").attr("value");
|
||||||
let initValue = value ? value.split(",") : [];
|
let initValue = value ? value.split(",") : [];
|
||||||
layui.xmSelect.render({
|
layui.xmSelect.render({
|
||||||
el: "#category",
|
el: "#category",
|
||||||
name: "category",
|
name: "category",
|
||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
data: e.data,
|
data: res.data,
|
||||||
model: {"icon":"hidden","label":{"type":"text"}},
|
model: {"icon":"hidden","label":{"type":"text"}},
|
||||||
clickClose: true,
|
clickClose: true,
|
||||||
radio: true,
|
radio: true,
|
||||||
|
@ -114,14 +114,14 @@
|
|||||||
layui.$.ajax({
|
layui.$.ajax({
|
||||||
url: "/app/admin/dict/get/upload",
|
url: "/app/admin/dict/get/upload",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let value = layui.$("#category").attr("value");
|
let value = layui.$("#category").attr("value");
|
||||||
let initValue = value ? value.split(",") : [];
|
let initValue = value ? value.split(",") : [];
|
||||||
layui.xmSelect.render({
|
layui.xmSelect.render({
|
||||||
el: "#category",
|
el: "#category",
|
||||||
name: "category",
|
name: "category",
|
||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
data: e.data,
|
data: res.data,
|
||||||
model: {"icon":"hidden","label":{"type":"text"}},
|
model: {"icon":"hidden","label":{"type":"text"}},
|
||||||
clickClose: true,
|
clickClose: true,
|
||||||
radio: true,
|
radio: true,
|
||||||
|
@ -66,14 +66,14 @@
|
|||||||
layui.$.ajax({
|
layui.$.ajax({
|
||||||
url: "/app/admin/dict/get/upload",
|
url: "/app/admin/dict/get/upload",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let value = layui.$("#category").attr("value");
|
let value = layui.$("#category").attr("value");
|
||||||
let initValue = value ? value.split(",") : [];
|
let initValue = value ? value.split(",") : [];
|
||||||
layui.xmSelect.render({
|
layui.xmSelect.render({
|
||||||
el: "#category",
|
el: "#category",
|
||||||
name: "category",
|
name: "category",
|
||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
data: e.data,
|
data: res.data,
|
||||||
model: {"icon":"hidden","label":{"type":"text"}},
|
model: {"icon":"hidden","label":{"type":"text"}},
|
||||||
clickClose: true,
|
clickClose: true,
|
||||||
radio: true,
|
radio: true,
|
||||||
|
@ -52,10 +52,10 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: SELECT_API,
|
url: SELECT_API,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
|
|
||||||
// 给表单初始化数据
|
// 给表单初始化数据
|
||||||
layui.each(e.data[0], function (key, value) {
|
layui.each(res.data[0], function (key, value) {
|
||||||
let obj = $('*[name="'+key+'"]');
|
let obj = $('*[name="'+key+'"]');
|
||||||
if (typeof obj[0] === "undefined" || !obj[0].nodeName) return;
|
if (typeof obj[0] === "undefined" || !obj[0].nodeName) return;
|
||||||
obj.attr("value", value);
|
obj.attr("value", value);
|
||||||
@ -82,14 +82,14 @@
|
|||||||
layui.$.ajax({
|
layui.$.ajax({
|
||||||
url: "/app/admin/dict/get/upload",
|
url: "/app/admin/dict/get/upload",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let value = layui.$("#category").attr("value");
|
let value = layui.$("#category").attr("value");
|
||||||
let initValue = value ? value.split(",") : [];
|
let initValue = value ? value.split(",") : [];
|
||||||
layui.xmSelect.render({
|
layui.xmSelect.render({
|
||||||
el: "#category",
|
el: "#category",
|
||||||
name: "category",
|
name: "category",
|
||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
data: e.data,
|
data: res.data,
|
||||||
model: {"icon":"hidden","label":{"type":"text"}},
|
model: {"icon":"hidden","label":{"type":"text"}},
|
||||||
clickClose: true,
|
clickClose: true,
|
||||||
radio: true,
|
radio: true,
|
||||||
|
@ -183,14 +183,14 @@
|
|||||||
layui.$.ajax({
|
layui.$.ajax({
|
||||||
url: "/app/admin/dict/get/sex",
|
url: "/app/admin/dict/get/sex",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let value = layui.$("#sex").attr("value");
|
let value = layui.$("#sex").attr("value");
|
||||||
let initValue = value ? value.split(",") : [];
|
let initValue = value ? value.split(",") : [];
|
||||||
layui.xmSelect.render({
|
layui.xmSelect.render({
|
||||||
el: "#sex",
|
el: "#sex",
|
||||||
name: "sex",
|
name: "sex",
|
||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
data: e.data,
|
data: res.data,
|
||||||
model: {"icon":"hidden","label":{"type":"text"}},
|
model: {"icon":"hidden","label":{"type":"text"}},
|
||||||
clickClose: true,
|
clickClose: true,
|
||||||
radio: true,
|
radio: true,
|
||||||
|
@ -163,14 +163,14 @@
|
|||||||
layui.$.ajax({
|
layui.$.ajax({
|
||||||
url: "/app/admin/dict/get/sex",
|
url: "/app/admin/dict/get/sex",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let value = layui.$("#sex").attr("value");
|
let value = layui.$("#sex").attr("value");
|
||||||
let initValue = value ? value.split(",") : [];
|
let initValue = value ? value.split(",") : [];
|
||||||
layui.xmSelect.render({
|
layui.xmSelect.render({
|
||||||
el: "#sex",
|
el: "#sex",
|
||||||
name: "sex",
|
name: "sex",
|
||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
data: e.data,
|
data: res.data,
|
||||||
value: "1",
|
value: "1",
|
||||||
model: {"icon":"hidden","label":{"type":"text"}},
|
model: {"icon":"hidden","label":{"type":"text"}},
|
||||||
clickClose: true,
|
clickClose: true,
|
||||||
|
@ -165,10 +165,10 @@
|
|||||||
$.ajax({
|
$.ajax({
|
||||||
url: SELECT_API,
|
url: SELECT_API,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
|
|
||||||
// 给表单初始化数据
|
// 给表单初始化数据
|
||||||
layui.each(e.data[0], function (key, value) {
|
layui.each(res.data[0], function (key, value) {
|
||||||
let obj = $('*[name="'+key+'"]');
|
let obj = $('*[name="'+key+'"]');
|
||||||
if (key === "password") {
|
if (key === "password") {
|
||||||
obj.attr("placeholder", "不更新密码请留空");
|
obj.attr("placeholder", "不更新密码请留空");
|
||||||
@ -187,14 +187,14 @@
|
|||||||
layui.$.ajax({
|
layui.$.ajax({
|
||||||
url: "/app/admin/dict/get/sex",
|
url: "/app/admin/dict/get/sex",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (e) {
|
success: function (res) {
|
||||||
let value = layui.$("#sex").attr("value");
|
let value = layui.$("#sex").attr("value");
|
||||||
let initValue = value ? value.split(",") : [];
|
let initValue = value ? value.split(",") : [];
|
||||||
layui.xmSelect.render({
|
layui.xmSelect.render({
|
||||||
el: "#sex",
|
el: "#sex",
|
||||||
name: "sex",
|
name: "sex",
|
||||||
initValue: initValue,
|
initValue: initValue,
|
||||||
data: e.data,
|
data: res.data,
|
||||||
model: {"icon":"hidden","label":{"type":"text"}},
|
model: {"icon":"hidden","label":{"type":"text"}},
|
||||||
clickClose: true,
|
clickClose: true,
|
||||||
radio: true,
|
radio: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user