关键词管理

This commit is contained in:
liuye
2023-06-15 16:21:46 +08:00
parent f51879a8af
commit f2ff079d79

View File

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