会话存档

This commit is contained in:
liuye
2024-01-19 11:11:55 +08:00
parent 4943c4cd09
commit 2f711f455a

View File

@@ -1,5 +1,5 @@
<template>
<ai-list class="List">
<ai-list class="List" @keydown.shift="handleKeyDown">
<template slot="title">
<ai-title title="会话存档" isShowBottomBorder></ai-title>
</template>
@@ -115,6 +115,15 @@
</ai-wechat-selecter>
</div>
</ai-table>
<ai-dialog :visible.sync="dialog" title="数据设置" @closed="dialog=false" @onConfirm="handleConfirm">
<el-form ref="form" class="ai-form" :model="form" label-width="110px" label-position="right">
<el-form-item label="显示数据" style="width: 100%;">
<el-radio-group v-model="form.param">
<el-radio :label="item.dictValue" v-for="(item, index) in typeList" :key="index">{{item.dictName}}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
</ai-dialog>
</template>
</ai-list>
</template>
@@ -189,7 +198,10 @@ export default {
tagId: '',
departmentName: '',
departId: '',
ids: ''
ids: '',
dialog: false,
typeList: [],
form: {}
}
},
@@ -215,13 +227,39 @@ export default {
this.getTree()
this.getList()
this.getTags()
this.getType()
document.querySelector('html').addEventListener('click', this.bindEvent)
this.$nextTick(() => {
document.addEventListener('keydown', (event) => {
if (event.ctrlKey && event.shiftKey && event.code === 'KeyP') {
this.getType()
}
});
this.dict.load('baiduAiStatisticsRange').then((res) => {
this.typeList = this.$dict.getDict('baiduAiStatisticsRange')
})
},
methods: {
getType() {
this.instance.post('/app/publicparamsetting/query-new?type=baidu_ai_statistics_range', ).then(res => {
if (res?.code == 0) {
this.form = {...res.data}
this.dialog = true
}
})
},
handleConfirm() {
this.$refs.form.validate(v => {
if (v) {
this.instance.post(`/app/publicparamsetting/addOrUpdate`, {...this.form}).then(res => {
if (res?.code == 0) {
this.dialog = false
this.$message.success('设置成功!')
}
})
}
})
},
changeTag(index) {
this.currIndex = index
this.search.current = 1