Commit 4960e804 authored by 黄奎's avatar 黄奎

页面修改

parent 15efa7fa
......@@ -147,6 +147,18 @@ export function getDictValueList(data) {
data
});
}
/**
*根据Key获取字典信息
*/
export function getDictValue(data) {
return request({
url: '/usercenter/getDictValue',
method: 'post',
data
});
}
/**
*
*/
......
......@@ -29,7 +29,7 @@
<script>
import choiceapproval from "../../components/enterprise/choiceapproval";
import {
getDictValueList
getDictValue
} from "../../api/administration/administration";
import {
saveDict
......@@ -47,8 +47,14 @@
outerVisible: false,
saving: false,
loading: false,
dictObjEmp: {},
dictObjRule: {},
dictObjEmp: {
ID: 0,
Code: "",
Content: "",
DictKey: "PUSH_STU_STUDYABROAD",
Mask: "",
Name: "留学客户分配规则",
},
multiCheck: [],
NeedData: [] //多选
};
......@@ -77,24 +83,17 @@
},
init() {
this.loading = true;
getDictValueList({
getDictValue({
Key: "PUSH_STU_STUDYABROAD"
}).then(res => {
this.loading = false;
if (res.Code == 1) {
if (res.Data && res.Data.length > 0) {
this.dictObjEmp = res.Data[0];
if (res.Data[0].Content != "" && res.Data[0].Content != null) {
let tempVal = res.Data[0].Content.split(",");
let tempLabel = res.Data[0].Mask.split(",");
tempVal.forEach((x, i) => {
let temp = {
DeptId: x,
DeptName: tempLabel[i]
};
this.chosenUser.push(temp);
});
}
var tempObj=res.Data;
if (tempObj) {
this.dictObjEmp.ID=tempObj.ID;
this.dictObjEmp.Code=tempObj.Code;
this.dictObjEmp.Content=tempObj.Content;
this.dictObjEmp.Mask=tempObj.Mask;
}
}
});
......@@ -113,24 +112,17 @@
if (this.multiCheck && this.multiCheck.length > 0) {
this.dictObjEmp.Code = this.multiCheck.toString()
}
this.dictObjEmp.Key = 'PUSH_STU_STUDYABROAD'
saveDict(this.dictObjEmp).then(r => {
this.saving = false;
if (r.Code == 1) {
setTimeout(() => {
saveDict(this.dictObjRule).then(res => {
if (r.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "数据保存成功!",
position: "top"
});
}
this.saving = false;
});
}, 1000);
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "数据保存成功!",
position: "top"
});
this.init();
} else {
this.saving = false;
}
......@@ -147,7 +139,6 @@
}
}
};
</script>
<style></style>
<style></style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment