From 2f711f455a39ae173d2abb3faf21a2aa3831b05b Mon Sep 17 00:00:00 2001 From: liuye Date: Fri, 19 Jan 2024 11:11:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E5=AD=98=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppSessionArchiveXbot/components/List.vue | 46 +++++++++++++++++-- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/packages/xbot/AppSessionArchiveXbot/components/List.vue b/packages/xbot/AppSessionArchiveXbot/components/List.vue index abac967b..388ed66b 100644 --- a/packages/xbot/AppSessionArchiveXbot/components/List.vue +++ b/packages/xbot/AppSessionArchiveXbot/components/List.vue @@ -1,5 +1,5 @@ @@ -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