diff --git a/package.json b/package.json index 8e4954cc..a891a236 100644 --- a/package.json +++ b/package.json @@ -76,5 +76,9 @@ "**/*.{html,css,less,md}": [ "prettier --write" ] + }, + "volta": { + "node": "18.14.0", + "yarn": "1.22.0" } } diff --git a/src/views/home/components/DeviceCountCard.vue b/src/views/home/components/DeviceCountCard.vue index 956b96f4..e9092727 100644 --- a/src/views/home/components/DeviceCountCard.vue +++ b/src/views/home/components/DeviceCountCard.vue @@ -12,7 +12,7 @@
设备数量
{{ deviceNum }}
- +
diff --git a/src/views/iot-card/CardManagement/Save.vue b/src/views/iot-card/CardManagement/Save.vue index bd3ecf76..bb158f3a 100644 --- a/src/views/iot-card/CardManagement/Save.vue +++ b/src/views/iot-card/CardManagement/Save.vue @@ -42,6 +42,17 @@ :disabled="type === 'edit'" /> + + + + - - - - + (false); -const platformConfigList = ref[]>([]); +const platformConfigCacheList = ref[]>([]); const formRef = ref(); @@ -184,6 +185,12 @@ const rules = { message: '请选择平台对接', }, ], + operatorName: [ + { + required: true, + message: '请选择运营商', + }, + ], cardType: [ { required: true, @@ -200,6 +207,10 @@ const filterOption = (input: string, option: any) => { ); }; +const platformConfigList = computed(() => { + return platformConfigCacheList.value.filter(item => item.operatorName === modelRef.operatorName).map(item => ({ label: item.name, value: item.id })) +}) + watch( () => props.data, (newValue) => { @@ -209,10 +220,7 @@ watch( terms: [{ column: 'state', value: 'enabled' }], }).then((resp: any) => { if (resp.status === 200) { - platformConfigList.value = resp.result.map((item: any) => ({ - label: item.name, - value: item.id, - })); + platformConfigCacheList.value = resp.result } }); Object.assign(modelRef, newValue); diff --git a/src/views/iot-card/CardManagement/index.vue b/src/views/iot-card/CardManagement/index.vue index 780e4ee1..38cb1f75 100644 --- a/src/views/iot-card/CardManagement/index.vue +++ b/src/views/iot-card/CardManagement/index.vue @@ -156,11 +156,11 @@ + @@ -423,6 +426,7 @@ import BatchDropdown from '@/components/BatchDropdown/index.vue'; import { BatchActionsType } from '@/components/BatchDropdown/types'; import {usePermissionStore} from "store/permission"; import {useRouterParams} from "@/utils/hooks/useParams"; +import { OperatorList, OperatorMap } from '@/views/iot-card/data' const router = useRouter(); const menuStory = useMenuStore(); @@ -505,11 +509,7 @@ const columns = [ width: 120, search: { type: 'select', - options: [ - { label: '移动', value: '移动' }, - { label: '电信', value: '电信' }, - { label: '联通', value: '联通' }, - ], + options: OperatorList, }, }, { diff --git a/src/views/iot-card/Platform/Detail/index.vue b/src/views/iot-card/Platform/Detail/index.vue index 552cac40..1d96cd29 100644 --- a/src/views/iot-card/Platform/Detail/index.vue +++ b/src/views/iot-card/Platform/Detail/index.vue @@ -130,11 +130,11 @@