From 5d88cbc5c84146c53fb6f8995aa2a3790104d6e6 Mon Sep 17 00:00:00 2001 From: wangshuaiswim Date: Tue, 31 Jan 2023 11:36:21 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=89=A9=E6=A8=A1?= =?UTF-8?q?=E5=9E=8BCat=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/components/Metadata/Cat/index.vue | 43 +++++++++++-------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/src/views/device/components/Metadata/Cat/index.vue b/src/views/device/components/Metadata/Cat/index.vue index 5936eb0d..e0292159 100644 --- a/src/views/device/components/Metadata/Cat/index.vue +++ b/src/views/device/components/Metadata/Cat/index.vue @@ -16,9 +16,10 @@

- +
+ {{ value }}
@@ -120,25 +121,29 @@ watch( { immediate: true } ) -watchEffect(() => { - if (props.visible) { - loading.value = true - const { id } = route.params - if (props.type === 'device') { - detail(id as string).then((resp) => { - loading.value = false - instanceStore.setCurrent(resp.result) - value.value = resp.result.metadata - }); - } else { - productDetail(id as string).then((resp) => { - loading.value = false - // productStore.setCurrent(resp.result) - value.value = resp.result.metadata - }); +watch( + [props.visible, props.type], + () => { + if (props.visible) { + loading.value = true + const { id } = route.params + if (props.type === 'device') { + detail(id as string).then((resp) => { + loading.value = false + instanceStore.setCurrent(resp.result) + value.value = resp.result.metadata + }); + } else { + productDetail(id as string).then((resp) => { + loading.value = false + // productStore.setCurrent(resp.result) + value.value = resp.result.metadata + }); + } } - } -}) + }, + { immediate: true } +) diff --git a/src/views/system/Menu/components/PermissChoose.vue b/src/views/system/Menu/components/PermissChoose.vue new file mode 100644 index 00000000..b4abf16f --- /dev/null +++ b/src/views/system/Menu/components/PermissChoose.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/src/views/system/Menu/index.vue b/src/views/system/Menu/index.vue index 7ff407f3..648b29cc 100644 --- a/src/views/system/Menu/index.vue +++ b/src/views/system/Menu/index.vue @@ -208,7 +208,8 @@ const table = reactive({ }; const resp: any = await getMenuTree_api(params); const lastItem = resp.result[resp.result.length - 1]; - table.total == lastItem ? lastItem.sortIndex + 1 : 1; + table.total = lastItem ? lastItem.sortIndex + 1 : 1; + return { code: resp.message, result: { @@ -225,7 +226,7 @@ const table = reactive({ router.push( `/system/Menu/detail/${row.id || ':id'}?pid=${ row.pid || '' - }&basePath=${row.basePath || ''}&sortIndex=${table.total + 1}`, + }&basePath=${row.basePath || ''}&sortIndex=${table.total}`, ); }, // 删除 From 67a3780287c60d050290774e25e4a874b57e0cd7 Mon Sep 17 00:00:00 2001 From: easy <1358086367@qq.com> Date: Tue, 31 Jan 2023 11:52:26 +0800 Subject: [PATCH 3/4] =?UTF-8?q?update:=20=E9=A6=96=E9=A1=B5=E6=9D=83?= =?UTF-8?q?=E9=99=90=E8=B0=83=E6=95=B4=E5=8F=8A=E6=A0=B7=E5=BC=8F=E5=BE=AE?= =?UTF-8?q?=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ComprehensiveHome/index.vue | 187 +++++++++++++++++- .../home/components/DevOpsHome/index.vue | 76 ++++++- .../home/components/DeviceHome/index.vue | 94 ++++++++- src/views/home/index.vue | 39 +--- src/views/home/modules/config.ts | 174 ---------------- 5 files changed, 355 insertions(+), 215 deletions(-) delete mode 100644 src/views/home/modules/config.ts diff --git a/src/views/home/components/ComprehensiveHome/index.vue b/src/views/home/components/ComprehensiveHome/index.vue index d01776b3..b26be459 100644 --- a/src/views/home/components/ComprehensiveHome/index.vue +++ b/src/views/home/components/ComprehensiveHome/index.vue @@ -41,24 +41,195 @@ import BasicCountCard from '../BasicCountCard.vue'; import PlatformPicCard from '../PlatformPicCard.vue'; import StepCard from '../StepCard.vue'; -import { - deviceBootConfig as _deviceBootConfig, - deviceStepDetails, - opsBootConfig as _opsBootConfig, - opsStepDetails, -} from '../../modules/config'; +import { useMenuStore } from '@/store/menu'; +import { usePermissionStore } from '@/store/permission'; +import { recommendList, bootConfig } from '../../index'; +// 按钮权限控制 +const hasPermission = usePermissionStore().hasPermission; +const productPermission = (action: string) => + hasPermission(`device/Product:${action}`); +const devicePermission = (action: string) => + hasPermission(`device/Instance:${action}`); +const rulePermission = (action: string) => + hasPermission(`rule-engine/Instance:${action}`); +// 页面权限控制 +const menuPermission = useMenuStore().hasPermission; + +// 物联网引导-数据 +const _deviceBootConfig: bootConfig[] = [ + { + english: 'STEP1', + label: '创建产品', + link: '/iot/device/Product', + auth: productPermission('add'), + params: { + save: true, + }, + }, + { + english: 'STEP2', + label: '创建设备', + link: '/iot/device/Instance', + auth: devicePermission('add'), + params: { + save: true, + }, + }, + { + english: 'STEP3', + label: '规则引擎', + link: '/iot/rule-engine/Instance', + auth: rulePermission('add'), + params: { + save: true, + }, + }, +]; const deviceImages = [ '/images/home/guide-home1.png', '/images/home/guide-home2.png', '/images/home/guide-home3.png', ]; +const deviceBootConfig = _deviceBootConfig.map((item, i) => ({ + ...item, + image: deviceImages[i], +})); + +// 设备接入推荐步骤-数据 +const deviceStepDetails: recommendList[] = [ + { + title: '创建产品', + details: + '产品是设备的集合,通常指一组具有相同功能的设备。物联设备必须通过产品进行接入方式配置。', + iconUrl: '/images/home/bottom-4.png', + linkUrl: '/iot/device/Product', + auth: productPermission('add'), + params: { + save: true, + }, + }, + { + title: '配置产品接入方式', + details: + '通过产品对同一类型的设备进行统一的接入方式配置。请参照设备铭牌说明选择匹配的接入方式。', + iconUrl: '/images/home/bottom-1.png', + linkUrl: '/iot/device/Product/detail', + auth: productPermission('update'), + dialogTag: 'accessMethod', + }, + { + title: '添加测试设备', + details: '添加单个设备,用于验证产品模型是否配置正确。', + iconUrl: '/images/home/bottom-5.png', + linkUrl: '/iot/device/Instance', + auth: devicePermission('add'), + params: { + save: true, + }, + }, + { + title: '功能调试', + details: + '对添加的测试设备进行功能调试,验证能否连接到平台,设备功能是否配置正确。', + iconUrl: '/images/home/bottom-2.png', + linkUrl: '/iot/device/Instance/detail', + // auth: devicePermission('update'), + auth: true, + dialogTag: 'funcTest', + }, + { + title: '批量添加设备', + details: '批量添加同一产品下的设备', + iconUrl: '/images/home/bottom-3.png', + linkUrl: '/iot/device/Instance', + auth: devicePermission('import'), + params: { + import: true, + }, + }, +]; + +// 运维管理引导-数据 +const _opsBootConfig: bootConfig[] = [ + { + english: 'STEP1', + label: '设备接入配置', + link: '/iot/link/accessConfig', + auth: menuPermission('link/accessConfig'), + }, + { + english: 'STEP2', + label: '日志排查', + link: '/iot/link/Log', + auth: menuPermission('link/Log'), + params: { + key: 'system', + }, + }, + { + english: 'STEP3', + label: '实时监控', + link: '/iot/link/dashboard', + auth: menuPermission('link/dashboard'), + params: { + save: true, + }, + }, +]; const opsImages = [ '/images/home/guide-home4.png', '/images/home/guide-home5.png', '/images/home/guide-home6.png', ]; +const opsBootConfig = _opsBootConfig.map((item, i) => ({ + ...item, + image: opsImages[i], +})); + +// 运维管理推荐步骤-数据 +const opsStepDetails: recommendList[] = [ + { + title: '协议管理', + details: + '根据业务需求自定义开发对应的产品(设备模型)接入协议,并上传到平台。', + iconUrl: '/images/home/bottom-1.png', + linkUrl: '/iot/link/protocol', + auth: menuPermission('link/Protocol'), + }, + { + title: '证书管理', + details: '统一维护平台内的证书,用于数据通信加密。', + iconUrl: '/images/home/bottom-6.png', + linkUrl: '/iot/link/Certificate', + auth: menuPermission('link/Certificate'), + }, + { + title: '网络组件', + details: '根据不同的传输类型配置平台底层网络组件相关参数。', + iconUrl: '/images/home/bottom-3.png', + linkUrl: '/iot/link/type', + auth: menuPermission('link/Type'), + }, + { + title: '设备接入网关', + details: '根据不同的传输类型,关联消息协议,配置设备接入网关相关参数。', + iconUrl: '/images/home/bottom-4.png', + linkUrl: '/iot/link/accessConfig', + auth: menuPermission('link/AccessConfig'), + }, + { + title: '日志管理', + details: '监控系统日志,及时处理系统异常。', + iconUrl: '/images/home/bottom-5.png', + linkUrl: '/iot/link/Log', + auth: menuPermission('Log'), + params: { + key: 'system', + }, + }, +]; + + -const deviceBootConfig = _deviceBootConfig.map((item,i) => ({...item, image: deviceImages[i]})); -const opsBootConfig = _opsBootConfig.map((item,i) => ({...item, image: opsImages[i]})); diff --git a/src/views/home/components/DevOpsHome/index.vue b/src/views/home/components/DevOpsHome/index.vue index e3326295..de99dbfc 100644 --- a/src/views/home/components/DevOpsHome/index.vue +++ b/src/views/home/components/DevOpsHome/index.vue @@ -26,8 +26,82 @@ import BootCard from '../BootCard.vue'; import BasicCountCard from '../BasicCountCard.vue'; import PlatformPicCard from '../PlatformPicCard.vue'; import StepCard from '../StepCard.vue'; +import { useMenuStore } from "@/store/menu"; + +import { bootConfig, recommendList } from '../../index'; +// 页面权限控制 +const menuPermission = useMenuStore().hasPermission; + +const opsBootConfig: bootConfig[] = [ + { + english: 'STEP1', + label: '设备接入配置', + link: '/iot/link/accessConfig', + auth: menuPermission('link/accessConfig'), + }, + { + english: 'STEP2', + label: '日志排查', + link: '/iot/link/Log', + auth: menuPermission('link/Log'), + params: { + key: 'system', + }, + }, + { + english: 'STEP3', + label: '实时监控', + link: '/iot/link/dashboard', + auth: menuPermission('link/dashboard'), + params: { + save: true, + }, + }, +]; +const opsStepDetails: recommendList[] = [ + { + title: '协议管理', + details: + '根据业务需求自定义开发对应的产品(设备模型)接入协议,并上传到平台。', + iconUrl: '/images/home/bottom-1.png', + linkUrl: '/iot/link/protocol', + auth: menuPermission('link/Protocol'), + + }, + { + title: '证书管理', + details: '统一维护平台内的证书,用于数据通信加密。', + iconUrl: '/images/home/bottom-6.png', + linkUrl: '/iot/link/Certificate', + auth: menuPermission('link/Certificate'), + + }, + { + title: '网络组件', + details: '根据不同的传输类型配置平台底层网络组件相关参数。', + iconUrl: '/images/home/bottom-3.png', + linkUrl: '/iot/link/type', + auth: menuPermission('link/Type'), + }, + { + title: '设备接入网关', + details: '根据不同的传输类型,关联消息协议,配置设备接入网关相关参数。', + iconUrl: '/images/home/bottom-4.png', + linkUrl: '/iot/link/accessConfig', + auth: menuPermission('link/AccessConfig'), + }, + { + title: '日志管理', + details: '监控系统日志,及时处理系统异常。', + iconUrl: '/images/home/bottom-5.png', + linkUrl: '/iot/link/Log', + auth: menuPermission('Log'), + params: { + key: 'system', + } + }, +]; -import { opsBootConfig, opsStepDetails } from '../../modules/config'; diff --git a/src/views/home/components/DeviceHome/index.vue b/src/views/home/components/DeviceHome/index.vue index b518f8ae..cc61c733 100644 --- a/src/views/home/components/DeviceHome/index.vue +++ b/src/views/home/components/DeviceHome/index.vue @@ -27,7 +27,99 @@ import DeviceCountCard from '../DeviceCountCard.vue'; import PlatformPicCard from '../PlatformPicCard.vue'; import StepCard from '../StepCard.vue'; -import { deviceBootConfig, deviceStepDetails } from '../../modules/config'; +import { usePermissionStore } from '@/store/permission'; +import { bootConfig, recommendList } from '../../index'; + +// 按钮权限控制 +const hasPermission = usePermissionStore().hasPermission; +const productPermission = (action: string) => + hasPermission(`device/Product:${action}`); +const devicePermission = (action: string) => + hasPermission(`device/Instance:${action}`); +const rulePermission = (action: string) => + hasPermission(`rule-engine/Instance:${action}`); + +const deviceBootConfig: bootConfig[] = [ + { + english: 'STEP1', + label: '创建产品', + link: '/iot/device/Product', + auth: productPermission('add'), + params: { + save: true, + }, + }, + { + english: 'STEP2', + label: '创建设备', + link: '/iot/device/Instance', + auth: devicePermission('add'), + params: { + save: true, + }, + }, + { + english: 'STEP3', + label: '规则引擎', + link: '/iot/rule-engine/Instance', + auth: rulePermission('add'), + params: { + save: true, + }, + }, +]; +const deviceStepDetails: recommendList[] = [ + { + title: '创建产品', + details: + '产品是设备的集合,通常指一组具有相同功能的设备。物联设备必须通过产品进行接入方式配置。', + iconUrl: '/images/home/bottom-4.png', + linkUrl: '/iot/device/Product', + auth: productPermission('add'), + params: { + save: true, + }, + }, + { + title: '配置产品接入方式', + details: + '通过产品对同一类型的设备进行统一的接入方式配置。请参照设备铭牌说明选择匹配的接入方式。', + iconUrl: '/images/home/bottom-1.png', + linkUrl: '/iot/device/Product/detail', + auth: productPermission('update'), + dialogTag: 'accessMethod', + }, + { + title: '添加测试设备', + details: '添加单个设备,用于验证产品模型是否配置正确。', + iconUrl: '/images/home/bottom-5.png', + linkUrl: '/iot/device/Instance', + auth: devicePermission('add'), + params: { + save: true, + }, + }, + { + title: '功能调试', + details: + '对添加的测试设备进行功能调试,验证能否连接到平台,设备功能是否配置正确。', + iconUrl: '/images/home/bottom-2.png', + linkUrl: '/iot/device/Instance/detail', + // auth: devicePermission('update'), + auth: true, + dialogTag: 'funcTest', + }, + { + title: '批量添加设备', + details: '批量添加同一产品下的设备', + iconUrl: '/images/home/bottom-3.png', + linkUrl: '/iot/device/Instance', + auth: devicePermission('import'), + params: { + import: true, + }, + }, +]; diff --git a/src/views/home/modules/config.ts b/src/views/home/modules/config.ts deleted file mode 100644 index 377db512..00000000 --- a/src/views/home/modules/config.ts +++ /dev/null @@ -1,174 +0,0 @@ -// import {getImage} from '@/utils/comm' -import { useMenuStore } from "@/store/menu"; -import { usePermissionStore } from "@/store/permission"; -import { recommendList, bootConfig } from "../index"; - - -// 按钮权限控制 -const hasPermission = usePermissionStore().hasPermission; -const productPermission = (action: string) => - hasPermission(`device/Product:${action}`); -const devicePermission = (action: string) => - hasPermission(`device/Instance:${action}`); -const rulePermission = (action: string) => - hasPermission(`rule-engine/Instance:${action}`); -// 页面权限控制 -const menuPermission = useMenuStore().hasPermission - - -// 物联网引导-数据 -export const deviceBootConfig: bootConfig[] = [ - { - english: 'STEP1', - label: '创建产品', - link: '/iot/device/Product', - auth: productPermission('add'), - params: { - save: true, - }, - }, - { - english: 'STEP2', - label: '创建设备', - link: '/iot/device/Instance', - auth: devicePermission('add'), - params: { - save: true, - }, - }, - { - english: 'STEP3', - label: '规则引擎', - link: '/iot/rule-engine/Instance', - auth: rulePermission('add'), - params: { - save: true, - }, - }, -]; -// 设备接入推荐步骤-数据 -export const deviceStepDetails: recommendList[] = [ - { - title: '创建产品', - details: - '产品是设备的集合,通常指一组具有相同功能的设备。物联设备必须通过产品进行接入方式配置。', - iconUrl: '/images/home/bottom-4.png', - linkUrl: '/iot/device/Product', - auth: productPermission('add'), - params: { - save: true, - }, - }, - { - title: '配置产品接入方式', - details: - '通过产品对同一类型的设备进行统一的接入方式配置。请参照设备铭牌说明选择匹配的接入方式。', - iconUrl: '/images/home/bottom-1.png', - linkUrl: '/iot/device/Product/detail', - auth: productPermission('update'), - dialogTag: 'accessMethod', - }, - { - title: '添加测试设备', - details: '添加单个设备,用于验证产品模型是否配置正确。', - iconUrl: '/images/home/bottom-5.png', - linkUrl: '/iot/device/Instance', - auth: devicePermission('add'), - params: { - save: true, - }, - }, - { - title: '功能调试', - details: - '对添加的测试设备进行功能调试,验证能否连接到平台,设备功能是否配置正确。', - iconUrl: '/images/home/bottom-2.png', - linkUrl: '/iot/device/Instance/detail', - // auth: devicePermission('update'), - auth: true, - dialogTag: 'funcTest', - }, - { - title: '批量添加设备', - details: '批量添加同一产品下的设备', - iconUrl: '/images/home/bottom-3.png', - linkUrl: '/iot/device/Instance', - auth: devicePermission('import'), - params: { - import: true, - }, - }, -]; - - -// 运维管理引导-数据 -export const opsBootConfig: bootConfig[] = [ - { - english: 'STEP1', - label: '设备接入配置', - link: '/iot/link/accessConfig', - auth: menuPermission('link/accessConfig'), - }, - { - english: 'STEP2', - label: '日志排查', - link: '/iot/link/Log', - auth: menuPermission('link/Log'), - params: { - key: 'system', - }, - }, - { - english: 'STEP3', - label: '实时监控', - link: '/iot/link/dashboard', - auth: menuPermission('link/dashboard'), - params: { - save: true, - }, - }, -]; -// 运维管理推荐步骤-数据 -export const opsStepDetails: recommendList[] = [ - { - title: '协议管理', - details: - '根据业务需求自定义开发对应的产品(设备模型)接入协议,并上传到平台。', - iconUrl: '/images/home/bottom-1.png', - linkUrl: '/iot/link/protocol', - auth: menuPermission('link/Protocol'), - - }, - { - title: '证书管理', - details: '统一维护平台内的证书,用于数据通信加密。', - iconUrl: '/images/home/bottom-6.png', - linkUrl: '/iot/link/Certificate', - auth: menuPermission('link/Certificate'), - - }, - { - title: '网络组件', - details: '根据不同的传输类型配置平台底层网络组件相关参数。', - iconUrl: '/images/home/bottom-3.png', - linkUrl: '/iot/link/type', - auth: menuPermission('link/Type'), - }, - { - title: '设备接入网关', - details: '根据不同的传输类型,关联消息协议,配置设备接入网关相关参数。', - iconUrl: '/images/home/bottom-4.png', - linkUrl: '/iot/link/accessConfig', - auth: menuPermission('link/AccessConfig'), - }, - { - title: '日志管理', - details: '监控系统日志,及时处理系统异常。', - iconUrl: '/images/home/bottom-5.png', - linkUrl: '/iot/link/Log', - auth: menuPermission('Log'), - params: { - key: 'system', - } - }, -]; \ No newline at end of file From bd6a101afed86f2c59600bd11fd0035e653eb18f Mon Sep 17 00:00:00 2001 From: blp <2962632571@qq.com> Date: Tue, 31 Jan 2023 14:14:21 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20=E7=89=A9=E8=81=94=E5=8D=A1?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=96=B0=E5=A2=9E=E3=80=81=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot-card/cardManagement.ts | 20 +- src/views/iot-card/CardManagement/Save.vue | 246 ++++++++++++++++++++ src/views/iot-card/CardManagement/index.vue | 48 +++- src/views/iot-card/data.ts | 76 ++++++ 4 files changed, 385 insertions(+), 5 deletions(-) create mode 100644 src/views/iot-card/CardManagement/Save.vue create mode 100644 src/views/iot-card/data.ts diff --git a/src/api/iot-card/cardManagement.ts b/src/api/iot-card/cardManagement.ts index 51a77294..34aee292 100644 --- a/src/api/iot-card/cardManagement.ts +++ b/src/api/iot-card/cardManagement.ts @@ -97,4 +97,22 @@ export const _import = (configId: any, params: any) => server.get(`/network/card * @param format 类型 xlsx、csv * @param params */ -export const _export = (format: string, data: any) => server.post(`/network/card/download.${format}/_query`, data, 'blob'); \ No newline at end of file +export const _export = (format: string, data: any) => server.post(`/network/card/download.${format}/_query`, data, 'blob'); + +/** + * 验证iccid + * @param id + */ +export const validateId = (id: string) => server.get(`/network/card/id/_validate?id=${id}`); + +/** + * 新增物联卡 + * @param data + */ +export const add = (data: any) => server.patch(`/network/card`, data); + +/** + * 编辑物联卡 + * @param data + */ +export const edit = (data: any) => server.put(`/network/card/${data.id}`, data); \ No newline at end of file diff --git a/src/views/iot-card/CardManagement/Save.vue b/src/views/iot-card/CardManagement/Save.vue new file mode 100644 index 00000000..9e62a69f --- /dev/null +++ b/src/views/iot-card/CardManagement/Save.vue @@ -0,0 +1,246 @@ + + + diff --git a/src/views/iot-card/CardManagement/index.vue b/src/views/iot-card/CardManagement/index.vue index 3cf85c36..3b5a1809 100644 --- a/src/views/iot-card/CardManagement/index.vue +++ b/src/views/iot-card/CardManagement/index.vue @@ -151,11 +151,18 @@ {{ slotProps.totalFlow }} - M 使用流量 + + M 使用流量
-
{{ slotProps.totalFlow - slotProps.usedFlow }} %
+
+ {{ + slotProps.totalFlow - slotProps.usedFlow + }} + % +
总共 {{ slotProps.totalFlow }} M
@@ -163,7 +170,9 @@
@@ -307,6 +316,13 @@ :cardId="cardId" @change="bindDevice" /> + +
@@ -333,6 +349,7 @@ import { getImage } from '@/utils/comm'; import BindDevice from './BindDevice.vue'; import Import from './Import.vue'; import Export from './Export.vue'; +import Save from './Save.vue'; const cardManageRef = ref>({}); const params = ref>({}); @@ -344,6 +361,7 @@ const exportVisible = ref(false); const importVisible = ref(false); const cardId = ref(); const current = ref>({}); +const saveType = ref(''); const columns = [ { @@ -504,6 +522,11 @@ const getActions = ( title: '编辑', }, icon: 'EditOutlined', + onClick: () => { + visible.value = true; + current.value = data; + saveType.value = 'edit'; + }, }, { key: 'view', @@ -651,10 +674,27 @@ const handleView = (id: string) => { /** * 新增 */ -const handleAdd = () => {}; +const handleAdd = () => { + visible.value = true; + current.value = {}; + saveType.value = 'add'; +}; + +/** + * 新增、编辑关闭弹窗 + * @param val 加载表格 + */ +const saveChange = (val: any) => { + visible.value = false; + current.value = {}; + if (val) { + cardManageRef.value?.reload(); + } +}; /** * 绑定设备关闭窗口 + * @param val */ const bindDevice = (val: boolean) => { bindDeviceVisible.value = false; diff --git a/src/views/iot-card/data.ts b/src/views/iot-card/data.ts new file mode 100644 index 00000000..cf9a9fc3 --- /dev/null +++ b/src/views/iot-card/data.ts @@ -0,0 +1,76 @@ +import { getImage } from '@/utils/comm'; + +// 平台类型 +export const PlatformTypeList = [ + { + label: '移动OneLink', + value: 'OneLinkPB', + imgUrl: getImage('/iot-card/onelink.png'), + }, + { + label: '电信Ctwing', + value: 'CtwingCmp', + imgUrl: getImage('/iot-card/ctwingcmp.png'), + }, + { + label: '联通Unicom', + value: 'UnicomCmp', + imgUrl: getImage('/iot-card/unicom.png'), + }, +]; + +//运营商 +export const OperatorList = [ + { + label: '移动', + value: '移动', + }, + { + label: '电信', + value: '电信', + }, + { + label: '联通', + value: '联通', + }, +]; + +// 类型 +export const TypeList = [ + { + label: '年卡', + value: 'year', + }, + { + label: '季卡', + value: 'season', + }, + { + label: '月卡', + value: 'month', + }, + { + label: '其他', + value: 'other', + }, +]; + +// 支付方式 +export const PaymentMethod = [ + { + label: '支付宝手机网站支付', + value: 'ALIPAY_WAP', + }, + { + label: '支付宝网页及时到账支付', + value: 'ALIPAY_WEB', + }, + { + label: '微信公众号支付', + value: 'WEIXIN_JSAPI', + }, + { + label: '微信扫码支付', + value: 'WEIXIN_NATIVE', + }, +];