From d70956e1e1d7a5342148e1973bb0fbdaf57204de Mon Sep 17 00:00:00 2001 From: 100011797 <2642441182@qq.com> Date: Wed, 8 Mar 2023 18:16:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=8C=97=E5=90=91?= =?UTF-8?q?=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ValueItem/index.vue | 4 +- src/components/index.ts | 2 + src/views/Northbound/AliCloud/Detail/doc.vue | 8 +- .../Northbound/AliCloud/Detail/index.vue | 210 +- src/views/Northbound/AliCloud/index.vue | 37 +- .../DuerOS/Detail/command/EditTable.vue | 2 +- .../DuerOS/Detail/command/index.vue | 56 +- src/views/Northbound/DuerOS/Detail/index.vue | 35 +- src/views/device/Instance/index.vue | 5 - .../Scene/Save/action/Device/Product.vue | 489 +- .../Save/action/Device/actions/EditTable.vue | 64 + .../Save/action/Device/actions/index.vue | 215 + .../Save/action/Device/device/Device.vue | 186 + .../Scene/Save/action/Device/device/Tag.vue | 206 + .../Save/action/Device/device/TopCard.vue | 149 + .../Scene/Save/action/Device/device/index.vue | 350 +- .../Scene/Save/action/Device/index.vue | 154 +- .../Scene/Save/action/Device/typings.d.ts | 12 +- .../Save/action/Modal/ActionTypeComponent.vue | 2 +- .../action/Notify/variableItem/BuildIn.vue | 2 +- yarn.lock | 11427 ++++++++-------- 21 files changed, 7151 insertions(+), 6464 deletions(-) create mode 100644 src/views/rule-engine/Scene/Save/action/Device/actions/EditTable.vue create mode 100644 src/views/rule-engine/Scene/Save/action/Device/actions/index.vue create mode 100644 src/views/rule-engine/Scene/Save/action/Device/device/Device.vue create mode 100644 src/views/rule-engine/Scene/Save/action/Device/device/Tag.vue create mode 100644 src/views/rule-engine/Scene/Save/action/Device/device/TopCard.vue diff --git a/src/components/ValueItem/index.vue b/src/components/ValueItem/index.vue index ecd0ac16..06bceb58 100644 --- a/src/components/ValueItem/index.vue +++ b/src/components/ValueItem/index.vue @@ -29,7 +29,7 @@ v-model:value="myValue" > - + diff --git a/src/components/index.ts b/src/components/index.ts index 42f8c942..a41944b2 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -15,6 +15,7 @@ import Ellipsis from './Ellipsis/index.vue' import JEmpty from './Empty/index.vue' import AMapComponent from './AMapComponent/index.vue' import PathSimplifier from './AMapComponent/PathSimplifier.vue' +import ValueItem from './ValueItem/index.vue' export default { install(app: App) { @@ -35,5 +36,6 @@ export default { .component('JEmpty', JEmpty) .component('AMapComponent', AMapComponent) .component('PathSimplifier', PathSimplifier) + .component('ValueItem', ValueItem) } } diff --git a/src/views/Northbound/AliCloud/Detail/doc.vue b/src/views/Northbound/AliCloud/Detail/doc.vue index b30034e8..f70a393f 100644 --- a/src/views/Northbound/AliCloud/Detail/doc.vue +++ b/src/views/Northbound/AliCloud/Detail/doc.vue @@ -16,7 +16,7 @@ 在特定场景下,设备无法直接接入阿里云物联网平台时,您可先将设备接入物联网平台,再使用阿里云“云云对接SDK”,快速构建桥接服务,搭建物联网平台与阿里云物联网平台的双向数据通道。
- +

2.配置说明

@@ -26,14 +26,14 @@
获取路径:“阿里云物联网平台”--“服务地址”
- +

2、AccesskeyID/Secret

用于程序通知方式调用云服务费API的用户标识和秘钥获取路径:“阿里云管理控制台”--“用户头像”--“”--“AccessKey管理”--“查看”
- +

3. 网桥产品

@@ -44,7 +44,7 @@ 将阿里云物联网平台中的产品实例与物联网平台的产品实例进行关联。关联后需要进入该产品下的每一个设备的实例信息页,填入对应的阿里云物联网平台设备的DeviceName、DeviceSecret进行一对一绑定。
- +
diff --git a/src/views/Northbound/AliCloud/Detail/index.vue b/src/views/Northbound/AliCloud/Detail/index.vue index 8b523023..df82cb60 100644 --- a/src/views/Northbound/AliCloud/Detail/index.vue +++ b/src/views/Northbound/AliCloud/Detail/index.vue @@ -1,17 +1,17 @@ - - {{ item.name }}{{ item.name }} - - - - - + + + + - - - - - + + + - + - - - - - + + + - + - - - - - + + + - + - - {{ item.productName - }} - - - - + + + +

产品映射

- - - - - + + - - {{ i.productName - }} - - - - - + +
+ + - - {{ i.name - }} - - -
- - - - - - + + + + + + + + + + + 添加 - - - - + + + - - - - - + + + +
- - + + - - - + + + @@ -384,7 +379,7 @@ import { queryProductList, } from '@/api/northbound/alicloud'; import _ from 'lodash'; -import { message } from 'ant-design-vue'; +import { message } from 'jetlinks-ui-components'; const router = useRouter(); const route = useRoute(); @@ -430,10 +425,6 @@ const loading = ref(false); const type = ref<'edit' | 'view'>('edit'); const activeKey = ref(['0']); -const filterOption = (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0; -}; - const queryRegionsList = async () => { const resp = await getRegionsList(); if (resp.status === 200) { @@ -503,8 +494,9 @@ const saveBtn = () => { ); data.bridgeProductName = product?.productName || ''; loading.value = true; - const resp = await savePatch({...toRaw(modelRef), ...data}); - loading.value = false; + const resp = await savePatch({...toRaw(modelRef), ...data}).finally(() => { + loading.value = false; + }) if (resp.status === 200) { message.success('操作成功!'); formRef.value.resetFields(); diff --git a/src/views/Northbound/AliCloud/index.vue b/src/views/Northbound/AliCloud/index.vue index caa41df8..b78b88a1 100644 --- a/src/views/Northbound/AliCloud/index.vue +++ b/src/views/Northbound/AliCloud/index.vue @@ -1,11 +1,11 @@ - + - + \ No newline at end of file + + + \ No newline at end of file diff --git a/src/views/Northbound/DuerOS/Detail/index.vue b/src/views/Northbound/DuerOS/Detail/index.vue index f9273b01..36894c24 100644 --- a/src/views/Northbound/DuerOS/Detail/index.vue +++ b/src/views/Northbound/DuerOS/Detail/index.vue @@ -51,7 +51,6 @@ placeholder="请选择产品" v-model:value="modelRef.id" show-search - :filter-option="filterOption" @change="productChange" > + + + {{ i.name }} + + + { actionActiveKey.value = _key; }; -const filterOption = (input: string, option: any) => { - return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0; -}; - const addItem = () => { actionActiveKey.value.push(String(modelRef.actionMappings.length)); modelRef.actionMappings.push({ @@ -636,8 +624,9 @@ const saveBtn = async () => { .then(async (data: any) => { if (tasks.every((item) => item) && data) { loading.value = true; - const resp = await savePatch(data); - loading.value = false; + const resp = await savePatch(data).finally(() => { + loading.value = false; + }) if (resp.status === 200) { message.success('操作成功!'); formRef.value.resetFields(); diff --git a/src/views/device/Instance/index.vue b/src/views/device/Instance/index.vue index 35424de5..5acf8604 100644 --- a/src/views/device/Instance/index.vue +++ b/src/views/device/Instance/index.vue @@ -14,7 +14,6 @@ selectedRowKeys: _selectedRowKeys, onChange: onSelectChange, }" - @cancelSelect="cancelSelect" :params="params" > + p.sorts = sorts; + return queryProductList(p); +}; + +const handleClick = (detail: any) => { + emit('update:rowKey', detail.id); + emit('update:detail', detail); + emit('change', detail); +}; + \ No newline at end of file +} + \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/action/Device/actions/EditTable.vue b/src/views/rule-engine/Scene/Save/action/Device/actions/EditTable.vue new file mode 100644 index 00000000..6ba31ca4 --- /dev/null +++ b/src/views/rule-engine/Scene/Save/action/Device/actions/EditTable.vue @@ -0,0 +1,64 @@ + + + \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/action/Device/actions/index.vue b/src/views/rule-engine/Scene/Save/action/Device/actions/index.vue new file mode 100644 index 00000000..df605d47 --- /dev/null +++ b/src/views/rule-engine/Scene/Save/action/Device/actions/index.vue @@ -0,0 +1,215 @@ + + + \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/action/Device/device/Device.vue b/src/views/rule-engine/Scene/Save/action/Device/device/Device.vue new file mode 100644 index 00000000..ef3237fb --- /dev/null +++ b/src/views/rule-engine/Scene/Save/action/Device/device/Device.vue @@ -0,0 +1,186 @@ + + + + + \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/action/Device/device/Tag.vue b/src/views/rule-engine/Scene/Save/action/Device/device/Tag.vue new file mode 100644 index 00000000..4d4c245a --- /dev/null +++ b/src/views/rule-engine/Scene/Save/action/Device/device/Tag.vue @@ -0,0 +1,206 @@ + + + + + \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/action/Device/device/TopCard.vue b/src/views/rule-engine/Scene/Save/action/Device/device/TopCard.vue new file mode 100644 index 00000000..34e7f304 --- /dev/null +++ b/src/views/rule-engine/Scene/Save/action/Device/device/TopCard.vue @@ -0,0 +1,149 @@ + + + + + \ 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 89582ec0..42cc28bb 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 @@ -1,14 +1,354 @@ - \ No newline at end of file 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 91f0afd6..19cd10a2 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/index.vue +++ b/src/views/rule-engine/Scene/Save/action/Device/index.vue @@ -1,6 +1,13 @@ + \ No newline at end of file diff --git a/src/views/rule-engine/Scene/Save/action/Device/typings.d.ts b/src/views/rule-engine/Scene/Save/action/Device/typings.d.ts index eeed8153..83e28ec0 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/typings.d.ts +++ b/src/views/rule-engine/Scene/Save/action/Device/typings.d.ts @@ -2,12 +2,12 @@ import { ProductItem } from '@/views/device/Product/typings'; import { ActionsDeviceProps } from '../../../typings'; type DeviceModelType = { - steps: { - key: string; - title: string; - content: React.ReactNode; - }[]; - current: number; + // steps: { + // key: string; + // title: string; + // content: React.ReactNode; + // }[]; + // current: number; productId: string; deviceId: string; productDetail: ProductItem | any; diff --git a/src/views/rule-engine/Scene/Save/action/Modal/ActionTypeComponent.vue b/src/views/rule-engine/Scene/Save/action/Modal/ActionTypeComponent.vue index 545bcf04..48708ad5 100644 --- a/src/views/rule-engine/Scene/Save/action/Modal/ActionTypeComponent.vue +++ b/src/views/rule-engine/Scene/Save/action/Modal/ActionTypeComponent.vue @@ -1,7 +1,7 @@