关键词管理

This commit is contained in:
liuye
2023-09-07 14:58:27 +08:00
parent 8753f74791
commit 20cd701073
3 changed files with 7 additions and 7 deletions

View File

@@ -83,6 +83,7 @@ export default {
wordName: '',
// areaList: [],
deptList: [],
departmentFullIds: []
},
dialog: false,
flag: false,
@@ -153,6 +154,7 @@ export default {
this.form.deptList = []
// this.form.areaList = this.form.areaIds.split(',')
this.form.deptList = row.departmentIds.split(',')
this.form.departmentFullIds = row.departmentFullIds.split(',')
this.dialog = true
},
add() {
@@ -160,8 +162,11 @@ export default {
},
onUserChange (e) {
this.form.deptList = []
this.form.departmentFullIds = []
e.map((item) => {
console.log(item)
this.form.deptList.push(item.id)
this.form.departmentFullIds.push(item.fullId)
})
this.$forceUpdate()
// this.form.deptList = e
@@ -173,14 +178,11 @@ export default {
this.$refs.form.validate((valid)=> {
if(valid) {
this.flag = true
// 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: this.form.deptList.join(',')
departmentIds: this.form.deptList.join(','),
departmentFullIds: this.form.departmentFullIds.join(',')
}).then(res => {
if(res?.code == 0) {
this.$message.success(this.form.id ? '关键词编辑成功' : '关键词添加成功')

View File

@@ -149,7 +149,6 @@ export default {
},
methods: {
getTotal() {
console.log(1)
var totalDepartmentId = this.totalDeptList.length ? this.totalDeptList[this.totalDeptList.length-1] : ''
this.instance.post(`/app/appsessionarchivekeywordrecord/statistics1?deptFullId=${totalDepartmentId}`).then(res => {
if (res?.data) {

View File

@@ -361,7 +361,6 @@ export default {
},
totalDeptSelect() {
this.getTotal()
},
deptSelect() {
this.getStatistics()