Commit 30dee481 by 彭祥礼

找回丢失页面

parent 21833d7e
......@@ -57,9 +57,8 @@
<a-modal :title="titleName" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="720px" height="1600px">
<a-form :form="Formtable">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="账号">
<a-select v-model="modifyForm.account" placeholder="请选择账号" @change="handleChange"><!-- mode="tags"-->
<a-select-option key="">请选择</a-select-option>
<a-select-option v-for="d in userList" :value="d.account">{{ d.name}}</a-select-option>
<a-select mode="tags" v-model="modifyForm.userName" placeholder="请选择账号" @change="handleChange">
<a-select-option v-for="d in userList" :value="d.name">{{ d.name}}</a-select-option>
</a-select>
</a-form-item>
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="县分">
......@@ -115,6 +114,7 @@
schoolNames2: [],
modifyForm: {
id: '',
userName: '',
subName: '',
account: '',
schoolId: '',
......@@ -186,12 +186,18 @@
createfunctionOk(){
this.Formtable.validateFields(["account"], {force: true}, (err, values)=>{
if (!err){
var userNames = this.modifyForm.userName.split(",");
for (const userName of userNames) {
for (const obj of this.userList) {
if(userName === obj.name){
this.modifyForm.account = obj.account +",";
}
}
}
addAllocation({"account":this.modifyForm.account,"schoolId":this.modifyForm.schoolId}).then(res=>{
if (res.state=="success") {
this.$message.success(res.data ? res.data : '添加成功!', 5);
this.modifyForm.account = ""
this.modifyForm.subName = ''
this.modifyForm.schoolId = ''
this.modifyvisible = false;
this.search();
}
......@@ -207,7 +213,6 @@
account: ''
})
this.addForm.subName = '';
},
deleteAllocation(id){
let params = {};
......@@ -296,7 +301,8 @@
return;
this.userList.push({
account: r.account,
name: r.name
text: r.name,
value: r.name,
})
})
}
......
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