From cb035bce384e76e8cb1ff4bbb3169b674fd21a15 Mon Sep 17 00:00:00 2001 From: leiqiaochu Date: Thu, 23 Mar 2023 18:17:11 +0800 Subject: [PATCH] fix: bug#10817 --- src/api/device/product.ts | 2 +- .../Product/Detail/DeviceAccess/index.vue | 35 ++++++++----------- src/views/device/Product/index.vue | 14 ++++---- 3 files changed, 23 insertions(+), 28 deletions(-) diff --git a/src/api/device/product.ts b/src/api/device/product.ts index df3741d5..ca143ef3 100644 --- a/src/api/device/product.ts +++ b/src/api/device/product.ts @@ -48,7 +48,7 @@ export const category = (data: any) => server.post('/device/category/_tree', dat /** * 获取网关类型 */ - export const getProviders = () => server.get('/gateway/device/providers') + export const getProviders = (terms?:any) => server.get('/gateway/device/providers',terms) /** * 查询所属部门 diff --git a/src/views/device/Product/Detail/DeviceAccess/index.vue b/src/views/device/Product/Detail/DeviceAccess/index.vue index fa7b465c..79fc2462 100644 --- a/src/views/device/Product/Detail/DeviceAccess/index.vue +++ b/src/views/device/Product/Detail/DeviceAccess/index.vue @@ -418,6 +418,8 @@ import { marked } from 'marked'; import type { TableColumnType } from 'ant-design-vue'; import { useMenuStore } from '@/store/menu'; import _ from 'lodash'; +import encodeQuery from '@/utils/encodeQuery'; + const tableRef = ref(); const formRef = ref(); const menuStore = useMenuStore(); @@ -501,14 +503,15 @@ const query = reactive({ return new Promise((res) => { getProviders().then((resp: any) => { listData.value = []; - console.log(description.value); if (isNoCommunity) { - listData.value = (resp?.result || []).map( - (item: any) => ({ - label: item.name, - value: item.id, - }), - ); + (resp?.result || []).map((item: any) => { + if (item.id != 'plugin_gateway') { + listData.value.push({ + label: item.name, + value: item.id, + }); + } + }); } else { listData.value = (resp?.result || []) .filter((i: any) => @@ -568,17 +571,7 @@ const query = reactive({ }); const param = ref>({ pageSize: 4, - terms: [ - { - terms: [ - { - column: 'channel', - termType: 'nin', - value: 'plugin', - }, - ], - }, - ], + terms: [], }); const queryParams = ref>({}); /** @@ -1085,10 +1078,10 @@ nextTick(() => { font-weight: 400; font-size: 12px; } -.changeBtn{ +.changeBtn { margin: 0 0 0 20px; - color: #315EFB; + color: #315efb; background: #ffffff; - border: 1px solid #315EFB + border: 1px solid #315efb; } diff --git a/src/views/device/Product/index.vue b/src/views/device/Product/index.vue index 9e341269..6221603b 100644 --- a/src/views/device/Product/index.vue +++ b/src/views/device/Product/index.vue @@ -447,12 +447,14 @@ const query = reactive({ listData.value = []; // const list = () => { if (isNoCommunity) { - listData.value = (resp?.result || []).map( - (item: any) => ({ - label: item.name, - value: item.id, - }), - ); + (resp?.result || []).map((item: any) => { + if (item.id != 'plugin_gateway') { + listData.value.push({ + label: item.name, + value: item.id, + }); + } + }); } else { listData.value = (resp?.result || []) .filter((i: any) =>