|
@@ -66,7 +66,11 @@
|
|
|
<el-input disabled v-model="form2.deptName"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="管理网点名称">
|
|
|
- <el-select style="width: 100%" v-model="form2.websitId" filterable placeholder="请选择" @change="gengxin">
|
|
|
+ <el-select v-if="form2.id" style="width: 100%" v-model="form2.websitId" filterable placeholder="请选择">
|
|
|
+ <el-option v-for="(item, index) in keyixuan" :key="index" :label="item.websitName" :value="item.websitId">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select v-else style="width: 100%" multiple v-model="form2.websitIds" filterable placeholder="请选择">
|
|
|
<el-option v-for="(item, index) in keyixuan" :key="index" :label="item.websitName" :value="item.websitId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -126,7 +130,8 @@ export default {
|
|
|
deptName: '',
|
|
|
adminDeptWebsitId: '',
|
|
|
websitId: '',
|
|
|
- websitName: ''
|
|
|
+ websitName: '',
|
|
|
+ websitIds: []
|
|
|
},
|
|
|
adminDept: null,
|
|
|
keyixuan: []
|
|
@@ -150,7 +155,8 @@ export default {
|
|
|
adminDeptId: this.adminDept.adminDeptId,
|
|
|
adminDeptWebsitId: '',
|
|
|
websitId: '',
|
|
|
- websitName: ''
|
|
|
+ websitName: '',
|
|
|
+ websitIds: []
|
|
|
}
|
|
|
this.dialogVisible2 = true
|
|
|
} else {
|
|
@@ -193,9 +199,9 @@ export default {
|
|
|
})
|
|
|
this.$refs.pageRef.refreshList()
|
|
|
},
|
|
|
- gengxin(val) {
|
|
|
- this.form2.websitName = this.keyixuan?.find(item => item.websitId == val)?.websitName
|
|
|
- },
|
|
|
+ // gengxin(val) {
|
|
|
+ // this.form2.websitName = this.keyixuan?.find(item => item.websitId == val)?.websitName
|
|
|
+ // },
|
|
|
// 列表请求函数
|
|
|
getList(pam, cb) {
|
|
|
try {
|
|
@@ -271,12 +277,14 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
queding2() {
|
|
|
- if (!this.form2.websitId) {
|
|
|
+ if (!this?.form2?.websitIds?.length && !this?.form2?.websitId) {
|
|
|
this.$message.warning('请选择网点')
|
|
|
}
|
|
|
;(this.form2.id ? adminDeptUpdateWebsit : adminDeptAddWebsit)({
|
|
|
...this.form2,
|
|
|
- adminDeptId: this.adminDept.adminDeptId,
|
|
|
+ id: this?.form2?.id,
|
|
|
+ adminDeptId: this?.adminDept?.adminDeptId,
|
|
|
+ websitIds: this?.form2?.websitIds?.join(','),
|
|
|
adminDeptWebsitId: this?.form2?.adminDeptWebsitId
|
|
|
}).then(res => {
|
|
|
this.$refs.pageRef.refreshList()
|
|
@@ -294,7 +302,8 @@ export default {
|
|
|
adminDeptId: '',
|
|
|
adminDeptWebsitId: '',
|
|
|
websitId: '',
|
|
|
- websitName: ''
|
|
|
+ websitName: '',
|
|
|
+ websitIds: []
|
|
|
}
|
|
|
}
|
|
|
}
|