Commit 30dee481 by 彭祥礼

找回丢失页面

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