diff --git a/src/api/cabinet/smart-cabinet.ts b/src/api/cabinet/smart-cabinet.ts index 0ded6fa..d2dbc4f 100644 --- a/src/api/cabinet/smart-cabinet.ts +++ b/src/api/cabinet/smart-cabinet.ts @@ -13,6 +13,7 @@ export interface SmartCabinetDTO { cabinetType: number; mqttServerId?: number; shopId?: number; + shopName?: string; templateNo: string; lockControlNo: number; location: number; diff --git a/src/views/cabinet/smart-cabinet/GatewayConfigModal.vue b/src/views/cabinet/smart-cabinet/GatewayConfigModal.vue index 8fbb8e6..aa353ea 100644 --- a/src/views/cabinet/smart-cabinet/GatewayConfigModal.vue +++ b/src/views/cabinet/smart-cabinet/GatewayConfigModal.vue @@ -28,7 +28,7 @@ const props = defineProps<{ cabinetId: number; }>(); -const emit = defineEmits(['update:modelValue']); +const emit = defineEmits(['update:modelValue', 'refresh']); const visible = ref(props.modelValue); const mqttList = ref([]); @@ -83,6 +83,7 @@ const handleConfig = async (row: MqttServerDTO) => { }); ElMessage.success('配置成功'); emit('update:modelValue', false); + emit('refresh'); } catch (error) { console.error('配置失败', error); } diff --git a/src/views/cabinet/smart-cabinet/ShopConfigModal.vue b/src/views/cabinet/smart-cabinet/ShopConfigModal.vue index d01ccca..06ed08b 100644 --- a/src/views/cabinet/smart-cabinet/ShopConfigModal.vue +++ b/src/views/cabinet/smart-cabinet/ShopConfigModal.vue @@ -27,7 +27,7 @@ const props = defineProps<{ cabinetId: number; }>(); -const emit = defineEmits(['update:modelValue']); +const emit = defineEmits(['update:modelValue', 'refresh']); const visible = ref(props.modelValue); const shopList = ref([]); @@ -82,6 +82,7 @@ const handleConfig = async (row: ShopDTO) => { }); ElMessage.success('配置成功'); emit('update:modelValue', false); + emit('refresh'); } catch (error) { console.error('配置失败', error); } diff --git a/src/views/cabinet/smart-cabinet/index.vue b/src/views/cabinet/smart-cabinet/index.vue index 14e4b70..0e020b5 100644 --- a/src/views/cabinet/smart-cabinet/index.vue +++ b/src/views/cabinet/smart-cabinet/index.vue @@ -37,7 +37,7 @@ const pagination = ref({ }); const loading = ref(false); -const dataList = ref([]); +const dataList = ref([]); const multipleSelection = ref([]); const editVisible = ref(false); const currentRow = ref(); @@ -185,6 +185,7 @@ getList(); @selection-change="handleSelectionChange" border> + \ No newline at end of file