From 84bf07717a73b9b8ebb21782ed5d1a53f02afea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E4=BB=95=E4=BC=9F?= <499672082@qq.com> Date: Tue, 28 Jun 2022 18:18:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppDeviceConfig/components/eyeList.vue | 21 ++++++++++++++++++- .../AppDeviceConfig/components/videoList.vue | 21 ++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/packages/conv/AppDeviceConfig/components/eyeList.vue b/packages/conv/AppDeviceConfig/components/eyeList.vue index 8b9a1d1d..0c822772 100644 --- a/packages/conv/AppDeviceConfig/components/eyeList.vue +++ b/packages/conv/AppDeviceConfig/components/eyeList.vue @@ -39,6 +39,12 @@ + + + @@ -126,7 +132,7 @@ return [ {type: "selection"}, { prop: 'corpId', label: 'CorpId', fixed: 'left', width: 220 }, - { prop: 'flag', align: 'center', label: '状态', fixed: 'left', width: 120 }, + { slot: 'flag', align: 'center', label: '状态', fixed: 'left', width: 120 }, { prop: 'appId', align: 'center', label: 'AppId', width: 240 }, { prop: 'rsa', align: 'center', label: 'RSA', width: 240 }, { prop: 'secret', align: 'center', label: 'SECRET', width: 180 }, @@ -213,6 +219,19 @@ }) }) }, + onChange(row) { + this.instance.post(`/app/appzyaccountconfig/setFlag`, null, { + params: { + id: row.id, + flag: row.flag + } + }).then((res) => { + if (res.code == 0) { + this.$message.success(+row.flag ? '已启用' : '已禁用'); + this.getList(); + } + }) + }, } } \ No newline at end of file diff --git a/packages/conv/AppDeviceConfig/components/videoList.vue b/packages/conv/AppDeviceConfig/components/videoList.vue index a19cf58f..502e376a 100644 --- a/packages/conv/AppDeviceConfig/components/videoList.vue +++ b/packages/conv/AppDeviceConfig/components/videoList.vue @@ -39,6 +39,12 @@ + + + @@ -117,7 +123,7 @@ return [ {type: "selection"}, { prop: 'corpId', label: 'CorpId', fixed: 'left', width: 220 }, - { prop: 'flag', align: 'center', label: '状态', fixed: 'left', width: 120 }, + { slot: 'flag', align: 'center', label: '状态', fixed: 'left', width: 120 }, { prop: 'slwUserId', align: 'center', label: '用户ID', width: 180 }, { prop: 'slwAreaId', align: 'center', label: '地区编码', width: 180 }, { prop: 'slwToken', align: 'center', label: 'TOKEN', width: 220 }, @@ -200,6 +206,19 @@ }) }) }, + onChange(row) { + this.instance.post(`/app/appzyaccountconfig/setFlag`, null, { + params: { + id: row.id, + flag: row.flag + } + }).then((res) => { + if (res.code == 0) { + this.$message.success(+row.flag ? '已启用' : '已禁用'); + this.getList(); + } + }) + } } }