关键词管理
This commit is contained in:
@@ -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 ? '关键词编辑成功' : '关键词添加成功')
|
||||||
|
|||||||
Reference in New Issue
Block a user