This commit is contained in:
yanran200730
2023-06-15 17:06:00 +08:00

View File

@@ -147,7 +147,7 @@ export default {
edit(row) {
this.form = {...row}
this.form.deptList = []
this.form.areaList = this.form.areaIds.split(',')
// this.form.areaList = this.form.areaIds.split(',')
this.form.deptList = row.departmentIds.split(',')
this.dialog = true
},
@@ -155,8 +155,13 @@ export default {
this.dialog = true
},
onUserChange (e) {
this.form.deptList = e
this.form.deptList = []
e.map((item) => {
this.form.deptList.push(item.id)
})
this.$forceUpdate()
// this.form.deptList = e
// this.$forceUpdate()
},
onConfirm() {
if(this.flag) return
@@ -164,14 +169,14 @@ export default {
this.$refs.form.validate((valid)=> {
if(valid) {
this.flag = true
var departmentIds = []
this.form.deptList.map((item) => {
departmentIds.push(item.id)
})
// var departmentIds = []
// this.form.deptList.map((item) => {
// departmentIds.push(item.id)
// })
this.instance.post(`/app/appsessionarchivekeywordinfo/addOrUpdate`,{
...this.form,
// areaIds: this.form.areaList.join(','),
departmentIds: departmentIds.join(',')
departmentIds: this.form.deptList.join(',')
}).then(res => {
if(res?.code == 0) {
this.$message.success(this.form.id ? '关键词编辑成功' : '关键词添加成功')