From 708f93dc2874d599125c1f13c008920460d36a8b Mon Sep 17 00:00:00 2001 From: leiqiaochu Date: Thu, 16 Mar 2023 10:15:56 +0800 Subject: [PATCH 01/21] =?UTF-8?q?fix:=20=E4=BA=A7=E5=93=81=E4=BB=AA?= =?UTF-8?q?=E8=A1=A8=E7=9B=98=E6=96=B0=E5=A2=9E=E4=B8=8A=E4=BC=A0=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=9B=B4=E6=94=B9=E6=95=B0=E6=8D=AE=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/device/DashBoard/index.vue | 1 - .../device/Product/Detail/BasicInfo/indev.vue | 10 +++++++++- src/views/device/Product/Detail/index.vue | 3 +-- src/views/device/Product/DialogTips/index.vue | 15 ++++++--------- src/views/device/Product/Save/index.vue | 2 +- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/views/device/DashBoard/index.vue b/src/views/device/DashBoard/index.vue index 122e5f4e..a4001a96 100644 --- a/src/views/device/DashBoard/index.vue +++ b/src/views/device/DashBoard/index.vue @@ -228,7 +228,6 @@ const getOnline = () => { onlineYdata.reverse(); setOnlineChartOpition(x, onlineYdata); onlineFooter.value[0].value = y?.[1]; - console.log(res.result); } }); }; diff --git a/src/views/device/Product/Detail/BasicInfo/indev.vue b/src/views/device/Product/Detail/BasicInfo/indev.vue index ed0a99af..5d0fbd22 100644 --- a/src/views/device/Product/Detail/BasicInfo/indev.vue +++ b/src/views/device/Product/Detail/BasicInfo/indev.vue @@ -41,19 +41,21 @@ - + diff --git a/src/views/device/Product/Detail/index.vue b/src/views/device/Product/Detail/index.vue index 5101ef4f..ac561b62 100644 --- a/src/views/device/Product/Detail/index.vue +++ b/src/views/device/Product/Detail/index.vue @@ -151,7 +151,6 @@ watch( () => route.params.id, (newId) => { if (newId) { - console.log(newId); productStore.tabActiveKey = 'Info'; productStore.refresh(newId as string); } @@ -230,7 +229,7 @@ const getProtocol = async () => { * 详情页跳转到设备页 */ const jumpDevice = () => { - console.log(productStore.current?.id); + // console.log(productStore.current?.id); const searchParams = { column: 'productId', termType: 'eq', diff --git a/src/views/device/Product/DialogTips/index.vue b/src/views/device/Product/DialogTips/index.vue index 72928eb9..afa3fb44 100644 --- a/src/views/device/Product/DialogTips/index.vue +++ b/src/views/device/Product/DialogTips/index.vue @@ -22,8 +22,8 @@
产品创建成功
-
产品ID: {{ idValue.value }}
-
查看详情
+
产品ID: {{ idValue }}
+
查看详情
接下来推荐操作:
1、配置产品接入方式
@@ -49,10 +49,12 @@ import { getImage } from '@/utils/comm.ts'; import { useProductStore } from '@/store/product'; import { CheckCircleOutlined } from '@ant-design/icons-vue'; +import { useMenuStore } from '@/store/menu'; const visible = ref(false); const productStore = useProductStore(); const router = useRouter(); const idValue = ref({}); +const menuStore = useMenuStore(); /** * 弹窗关闭 */ @@ -70,17 +72,12 @@ const show = (id: string) => { * 查看详情 */ const showDetail = () => { - jump(idValue.value); -}; -/** - * 跳转页面 - */ -const jump = (id: string) => { - router.push('/iot/device/product/detail/' + id); + menuStore.jumpPage('device/Product/Detail',{id:idValue.value}) }; defineExpose({ show: show, }); + From 83a9f9f0cb20105593f6598312b6de216d7d89a9 Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Thu, 16 Mar 2023 10:20:45 +0800 Subject: [PATCH 03/21] fix: bug#10439 --- src/api/media/device.ts | 4 ++- src/views/media/Device/Channel/index.vue | 3 +- src/views/media/Device/index.vue | 35 ++++++++++++++++++------ 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/src/api/media/device.ts b/src/api/media/device.ts index 4634bfbd..6854d9e4 100644 --- a/src/api/media/device.ts +++ b/src/api/media/device.ts @@ -13,8 +13,10 @@ export default { del: (id: string) => server.remove(`/media/device/${id}`), // 更新通道 updateChannels: (id: string) => server.post(`/media/device/${id}/channels/_sync`), - // 查询产品列表 + // post查询产品列表 queryProductList: (data: any) => server.post(`/device/product/_query/no-paging`, data), + // get获取产品 + getProductList: (data: any) => server.get(`/device/product/_query/no-paging?paging=false`, data), // 快速添加产品 saveProduct: (data: any) => server.post(`/device/product`, data), // 产品发布 diff --git a/src/views/media/Device/Channel/index.vue b/src/views/media/Device/Channel/index.vue index 4fb16986..f7a9a6ba 100644 --- a/src/views/media/Device/Channel/index.vue +++ b/src/views/media/Device/Channel/index.vue @@ -20,9 +20,8 @@
diff --git a/src/views/media/Device/index.vue b/src/views/media/Device/index.vue index eb420206..372a2421 100644 --- a/src/views/media/Device/index.vue +++ b/src/views/media/Device/index.vue @@ -125,6 +125,7 @@ import { message } from 'ant-design-vue'; import { getImage } from '@/utils/comm'; import { PROVIDER_OPTIONS } from '@/views/media/Device/const'; import { providerType } from './const'; +import encodeQuery from '@/utils/encodeQuery'; import { useMenuStore } from 'store/menu'; @@ -153,14 +154,14 @@ const columns = [ }, { title: '接入方式', - dataIndex: 'type', - key: 'type', + dataIndex: 'provider', + key: 'provider', scopedSlots: true, search: { type: 'select', options: PROVIDER_OPTIONS, handleValue: (v: any) => { - return '123'; + return v; }, }, }, @@ -184,12 +185,28 @@ const columns = [ scopedSlots: true, search: { type: 'select', - options: [ - { label: '固定地址', value: 'fixed-media' }, - { label: 'GB/T28181', value: 'gb28181-2016' }, - ], + options: () => + new Promise((resolve) => { + DeviceApi.getProductList( + encodeQuery({ + terms: { + messageProtocol$in: [ + 'gb28181-2016', + 'fixed-media', + ], + }, + }), + ).then((resp: any) => { + resolve( + resp.result.map((pItem: any) => ({ + label: pItem.name, + value: pItem.id, + })), + ); + }); + }), handleValue: (v: any) => { - return '123'; + return v; }, }, }, @@ -206,7 +223,7 @@ const columns = [ { label: '在线', value: 'online' }, ], handleValue: (v: any) => { - return '123'; + return v; }, }, }, From 250761886087aae989250e8f27b125a3d709157b Mon Sep 17 00:00:00 2001 From: xieyonghong <18010623010@163.com> Date: Thu, 16 Mar 2023 10:16:49 +0800 Subject: [PATCH 04/21] =?UTF-8?q?update:=20=E4=BC=98=E5=8C=96=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E6=9D=A1=E4=BB=B6=E5=9B=9E=E6=98=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Search/Search.vue | 3 +- src/components/ValueItem/index.vue | 2 +- .../Save/action/ListItem/FilterCondition.vue | 7 +- .../Save/action/ListItem/FilterGroup.vue | 175 +- .../Scene/Save/action/ListItem/Item.vue | 63 +- .../Scene/Save/components/Terms/index.less | 42 +- yarn.lock | 1417 +++++------------ 7 files changed, 622 insertions(+), 1087 deletions(-) diff --git a/src/components/Search/Search.vue b/src/components/Search/Search.vue index 7cd240dc..ccb0e405 100644 --- a/src/components/Search/Search.vue +++ b/src/components/Search/Search.vue @@ -4,6 +4,7 @@ :type='type' :request='saveSearchHistory' :historyRequest='getSearchHistory' + :deleteRequest='deleteSearchHistory' :columns='columns' :class='props.class' @search='searchSubmit' @@ -13,7 +14,7 @@ \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/action/Device/device/RelationSelect.vue b/src/views/rule-engine/Scene/Save/action/Device/device/RelationSelect.vue new file mode 100644 index 00000000..7c538e7d --- /dev/null +++ b/src/views/rule-engine/Scene/Save/action/Device/device/RelationSelect.vue @@ -0,0 +1,56 @@ + + + \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/action/Device/device/index.vue b/src/views/rule-engine/Scene/Save/action/Device/device/index.vue index 0bffa2b4..bc159f5f 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/device/index.vue +++ b/src/views/rule-engine/Scene/Save/action/Device/device/index.vue @@ -30,13 +30,7 @@ name="selectorValues" :rules="[{ required: true, message: '请选择关系' }]" > - + ([]); const builtInList = ref([]); const tagList = ref([]); -const relationList = ref([]); const TypeList = [ { @@ -199,27 +193,10 @@ const sourceChangeEvent = async () => { const array = filterTree(resp.result as any[]); //判断相同产品才有按变量 // if (props.formProductId === DeviceModel.productId)// TODO - builtInList.value = array; + builtInList.value = [] // array; } }; -const queryRelationList = () => { - NoticeApi.getRelationUsers({ - paging: false, - sorts: [{ name: 'createTime', order: 'desc' }], - terms: [{ termType: 'eq', column: 'objectTypeName', value: '设备' }], - }).then((resp) => { - if (resp.status === 200) { - relationList.value = (resp.result as any[]).map((item) => { - return { - label: item.name, - value: item.relation, - }; - }); - } - }); -}; - const filterType = async () => { const _list = TypeList.filter((item) => item.value === 'fixed'); if (unref(data)?.trigger?.type === 'device') { @@ -266,11 +243,8 @@ const filterType = async () => { } }; -const onSelectorChange = (val: string) => { +const onSelectorChange = () => { modelRef.selectorValues = undefined; - if (val === 'relation') { - queryRelationList(); - } }; const onDeviceChange = (_detail: any) => { @@ -306,7 +280,7 @@ const onTagChange = (val: any[], arr: any[]) => { if (arr) { tagList.value = arr; } - emits('save', unref(modelRef), {}); + emits('save', unref(modelRef), {}, {tagList: tagList.value}); }; const onVariableChange = (val: any, node: any) => { diff --git a/src/views/rule-engine/Scene/Save/action/Device/index.vue b/src/views/rule-engine/Scene/Save/action/Device/index.vue index b5f87a40..698cab78 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/index.vue +++ b/src/views/rule-engine/Scene/Save/action/Device/index.vue @@ -154,23 +154,23 @@ const onSave = (_data: any) => { productName: DeviceModel.productDetail.name, relationName: DeviceModel.relationName, triggerName: data.value.options?.trigger?.name || '触发设备', - taglist: [], + tagList: [], columns: [], otherColumns: [], }; - _options.name = DeviceModel.deviceDetail?.name; + _options.name = DeviceModel.deviceDetail?.name || DeviceModel.selectorValues?.[0]?.name; const _type = _data.message.messageType; if (_type === 'INVOKE_FUNCTION') { _options.type = '执行'; - _options.properties = DeviceModel.propertiesName; + _options.properties = _data.message.propertiesName; } if (_type === 'READ_PROPERTY') { _options.type = '读取'; - _options.properties = DeviceModel.propertiesName; + _options.properties = _data.message.propertiesName; } if (_type === 'WRITE_PROPERTY') { _options.type = '设置'; - _options.properties = DeviceModel.propertiesName; + _options.properties = _data.message.propertiesName; _options.propertiesValue = typeof DeviceModel.propertiesValue === 'object' ? JSON.stringify(DeviceModel.propertiesValue) @@ -183,7 +183,7 @@ const onSave = (_data: any) => { } } if (_options.selector === 'tag') { - _options.taglist = DeviceModel.tagList.map((it) => ({ + _options.tagList = DeviceModel.tagList.map((it) => ({ name: it.column || it.name, type: it.type ? (it.type === 'and' ? '并且' : '或者') : '', value: it.value, @@ -205,6 +205,10 @@ const save = async (step?: number) => { if (deviceRef.value) { await deviceRef.value?.onFormSave(); current.value = 2; + } else { + if(DeviceModel.selector === 'fixed' && DeviceModel.selectorValues?.length){ + current.value = 2; + } } } else { if (actionRef.value) { @@ -228,8 +232,8 @@ const prev = () => { const saveClick = () => save(); -const onDeviceSave = (_data: any, _detail: any) => { - Object.assign(DeviceModel, _data); +const onDeviceSave = (_data: any, _detail: any, obj?: any) => { + Object.assign(DeviceModel, {..._data, ...obj}); DeviceModel.deviceDetail = _detail; }; From dee82d2115f25c45a07c97abc67ff9bdddc7861b Mon Sep 17 00:00:00 2001 From: easy <1358086367@qq.com> Date: Thu, 16 Mar 2023 11:19:38 +0800 Subject: [PATCH 09/21] =?UTF-8?q?update:=20api=E9=85=8D=E7=BD=AE-=E8=B0=83?= =?UTF-8?q?=E8=AF=95=20=E8=AF=B7=E6=B1=82=E5=8F=82=E6=95=B0=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/Apply/Save/components/RequestTable.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/system/Apply/Save/components/RequestTable.vue b/src/views/system/Apply/Save/components/RequestTable.vue index 7ebb7f31..b25cdc2c 100644 --- a/src/views/system/Apply/Save/components/RequestTable.vue +++ b/src/views/system/Apply/Save/components/RequestTable.vue @@ -2,7 +2,7 @@
Date: Thu, 16 Mar 2023 11:50:12 +0800 Subject: [PATCH 10/21] =?UTF-8?q?fix:=20bug#10389=E3=80=8110421?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/media/Home/index.vue | 4 +++- src/views/notice/Config/SyncUser/index.vue | 26 +++++++++++----------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/views/media/Home/index.vue b/src/views/media/Home/index.vue index 5bf74e50..4385da6a 100644 --- a/src/views/media/Home/index.vue +++ b/src/views/media/Home/index.vue @@ -25,7 +25,7 @@ +
{{ title }}
@@ -156,7 +156,7 @@ watch( \ No newline at end of file diff --git a/src/views/device/Instance/Detail/Diagnose/Message/index.vue b/src/views/device/Instance/Detail/Diagnose/Message/index.vue index f5bed24d..f61517a3 100644 --- a/src/views/device/Instance/Detail/Diagnose/Message/index.vue +++ b/src/views/device/Instance/Detail/Diagnose/Message/index.vue @@ -30,7 +30,7 @@
-
+
- +
+ +
@@ -187,8 +189,21 @@ onUnmounted(() => { padding-left: 20px; border-left: 1px solid rgba(0, 0, 0, 0.09); overflow: hidden; - max-height: 600px; + height: 100%; overflow-y: auto; min-height: 400px; + + .right-log-box { + padding-top: 10px; + height: calc(100% - 40px); + width: 100%; + .right-log-box-empty { + height: 100%; + width: 100%; + display: flex; + justify-content: center; + align-items: center; + } + } } diff --git a/src/views/rule-engine/Scene/Save/action/Device/actions/WriteProperty.vue b/src/views/rule-engine/Scene/Save/action/Device/actions/WriteProperty.vue index b9765483..f2dc5ad0 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/actions/WriteProperty.vue +++ b/src/views/rule-engine/Scene/Save/action/Device/actions/WriteProperty.vue @@ -36,10 +36,10 @@ placeholder="请选择" :options="handleOptions" :tabsOptions="tabOptions" - :metricOption="upperOptions" + :metricOptions="upperOptions" v-model:value="propertyModelRef.propertiesValue" v-model:source="propertyModelRef.source" - @change="onValueChange" + @select="onValueChange" >