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

页面修改

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