From b03dd8846eac24a0e5d18984c807b1efd14a6ac0 Mon Sep 17 00:00:00 2001 From: 100011797 <2642441182@qq.com> Date: Thu, 20 Jul 2023 09:31:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9jetlinks-store?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/type.ts | 17 ++++++++++ .../DataCollect/Collector/Tree/Save/index.vue | 29 +++++++++-------- .../DataCollect/Collector/Tree/index.vue | 8 ++--- .../components/NotificationRecord/index.vue | 20 ++++++------ .../Metadata/Base/Edit/ValueTypeForm.vue | 2 -- .../link/Type/Detail/LocalAddressSelect.vue | 17 ++++++---- src/views/link/Type/Detail/index.vue | 32 +++++++++---------- .../rule-engine/Alarm/Configuration/index.vue | 11 ++++--- .../rule-engine/Alarm/Log/Detail/info.vue | 21 +++++++++--- .../Alarm/Log/TabComponent/index.vue | 3 +- src/views/rule-engine/Alarm/Log/index.vue | 2 -- 11 files changed, 97 insertions(+), 65 deletions(-) create mode 100644 src/store/type.ts diff --git a/src/store/type.ts b/src/store/type.ts new file mode 100644 index 00000000..14220140 --- /dev/null +++ b/src/store/type.ts @@ -0,0 +1,17 @@ +import { defineStore } from "pinia"; + +export const useTypeStore = defineStore({ + id: 'type', + state: () => ({ + configRef: [] as any, + resourcesClusters: {} as any, + }), + actions: { + setConfigRef(current: any[]) { + this.configRef = current + }, + setResourcesClusters(current: any) { + this.resourcesClusters = current + } + } +}) \ No newline at end of file diff --git a/src/views/DataCollect/Collector/Tree/Save/index.vue b/src/views/DataCollect/Collector/Tree/Save/index.vue index 9e3a5c89..504b77d0 100644 --- a/src/views/DataCollect/Collector/Tree/Save/index.vue +++ b/src/views/DataCollect/Collector/Tree/Save/index.vue @@ -156,13 +156,10 @@ \ No newline at end of file diff --git a/src/views/rule-engine/Alarm/Log/TabComponent/index.vue b/src/views/rule-engine/Alarm/Log/TabComponent/index.vue index f45429f1..fb87789a 100644 --- a/src/views/rule-engine/Alarm/Log/TabComponent/index.vue +++ b/src/views/rule-engine/Alarm/Log/TabComponent/index.vue @@ -138,7 +138,6 @@ import { queryLevel } from '@/api/rule-engine/config'; import Search from '@/components/Search'; import { useAlarmStore } from '@/store/alarm'; import { storeToRefs } from 'pinia'; -import { Store } from 'jetlinks-store'; import dayjs from 'dayjs'; import type { ActionsType } from '@/components/Table'; import SolveComponent from '../SolveComponent/index.vue'; @@ -149,10 +148,10 @@ const menuStory = useMenuStore(); const tableRef = ref(); const alarmStore = useAlarmStore(); const { data } = storeToRefs(alarmStore); + const getDefaulitLevel = () => { queryLevel().then((res) => { if (res.status === 200) { - Store.set('default-level', res.result?.levels || []); data.value.defaultLevel = res.result?.levels || []; } }); diff --git a/src/views/rule-engine/Alarm/Log/index.vue b/src/views/rule-engine/Alarm/Log/index.vue index f886b287..7467ef01 100644 --- a/src/views/rule-engine/Alarm/Log/index.vue +++ b/src/views/rule-engine/Alarm/Log/index.vue @@ -9,7 +9,6 @@ import { isNoCommunity } from '@/utils/utils'; import { useAlarmStore } from '@/store/alarm'; import { storeToRefs } from 'pinia'; import { queryLevel } from '@/api/rule-engine/config'; -import { Store } from 'jetlinks-store'; import TableComponents from './TabComponent/index.vue'; const list = [ { @@ -56,7 +55,6 @@ const { data } = storeToRefs(alarmStore); const getDefaulitLevel = () => { queryLevel().then((res)=>{ if(res.status === 200 ){ - Store.set('default-level', res.result?.levels || []); data.value.defaultLevel = res.result?.levels || []; } }) From b6f89216b410f9b99b13a3d736e4cfc78fa8b787 Mon Sep 17 00:00:00 2001 From: fuhao <62583365+haodd0216@users.noreply.github.com> Date: Thu, 20 Jul 2023 11:42:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20bug#15992=E3=80=8115977?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ChildDevice/BindChildDevice/index.vue | 115 ++++++++++-------- .../ChildDevice/EdgeMap/PatchMapping.vue | 104 ++++++++++++++-- .../Instance/Detail/EdgeMap/PatchMapping.vue | 5 + 3 files changed, 166 insertions(+), 58 deletions(-) diff --git a/src/views/device/Instance/Detail/ChildDevice/BindChildDevice/index.vue b/src/views/device/Instance/Detail/ChildDevice/BindChildDevice/index.vue index b1eb60f9..5ebb69fa 100644 --- a/src/views/device/Instance/Detail/ChildDevice/BindChildDevice/index.vue +++ b/src/views/device/Instance/Detail/ChildDevice/BindChildDevice/index.vue @@ -32,11 +32,11 @@ value: '', type: 'or', }, - // { - // column: 'parentId$not', - // value: detail.id, - // type: 'or', - // }, + // { + // column: 'parentId$not', + // value: detail.id, + // type: 'or', + // }, ], }, { @@ -88,18 +88,24 @@ diff --git a/src/views/device/Instance/Detail/ChildDevice/EdgeMap/PatchMapping.vue b/src/views/device/Instance/Detail/ChildDevice/EdgeMap/PatchMapping.vue index 66345b8b..646a51db 100644 --- a/src/views/device/Instance/Detail/ChildDevice/EdgeMap/PatchMapping.vue +++ b/src/views/device/Instance/Detail/ChildDevice/EdgeMap/PatchMapping.vue @@ -16,9 +16,11 @@
@@ -56,8 +58,17 @@ @@ -212,4 +300,4 @@ onMounted(() => { } } } - \ No newline at end of file + diff --git a/src/views/device/Instance/Detail/EdgeMap/PatchMapping.vue b/src/views/device/Instance/Detail/EdgeMap/PatchMapping.vue index 86818e91..65250054 100644 --- a/src/views/device/Instance/Detail/EdgeMap/PatchMapping.vue +++ b/src/views/device/Instance/Detail/EdgeMap/PatchMapping.vue @@ -20,6 +20,7 @@ :checkedKeys="checkedKeys" :load-data="onLoadData" @check="onCheck" + v-model:expandedKeys="expandedKeys" />
@@ -120,7 +121,11 @@ const handleSearch = async () => { } }; + +const expandedKeys = ref([]) const onCheck = (keys: string[], e: any) => { + // console.log(expandedKeys.push(e)); + expandedKeys.value.push(e.node.id) checkedKeys.value = [...keys]; leftList.value = e?.checkedNodes || []; };