From dfd2e9de21f4c80f4d4735e180a0f1a034fca67e Mon Sep 17 00:00:00 2001
From: rain <1679827795@qq.com>
Date: Tue, 06 May 2025 14:22:59 +0800
Subject: [PATCH] 页面风格与其他保持一致,处理中状态上传图片添加必填项限制,去掉“并派发”,下方按钮变更为“受理”、“不受理”、“取消”
---
src/views/device/components/DeviceSettingBox.vue | 23 ++++++-----------------
1 files changed, 6 insertions(+), 17 deletions(-)
diff --git a/src/views/device/components/DeviceSettingBox.vue b/src/views/device/components/DeviceSettingBox.vue
index 90f3dec..2491c76 100644
--- a/src/views/device/components/DeviceSettingBox.vue
+++ b/src/views/device/components/DeviceSettingBox.vue
@@ -309,29 +309,18 @@
</div>
</template>
-<script setup lang="ts">
+<script setup>
import { defineProps, ref, watch } from 'vue';
-import { DeviceInfoType } from '@/types/device';
-import { useMyStore } from '@/store';
import { cloneDeep } from 'lodash';
-import {
- initDeviceSetting,
- initDeviceSettingFormModel,
- DeviceSettingKeyEnum,
-} from '@/types/device-setting';
+import { initDeviceSetting, initDeviceSettingFormModel } from '@/types/device-setting';
import {
updateDeviceSettingInfoByOsd,
updateDeviceSettingFormModelByOsd,
} from '@/utils/device-setting';
import { useDeviceSetting } from './use-device-setting';
-import DeviceSettingPopover from './DeviceSettingPopover.vue';
-const props = defineProps<{
- sn: string;
- deviceInfo: DeviceInfoType;
-}>();
+const props = defineProps();
-const store = useMyStore();
const deviceSetting = ref(cloneDeep(initDeviceSetting));
const deviceSettingFormModelFromOsd = ref(cloneDeep(initDeviceSettingFormModel));
const deviceSettingFormModel = ref(cloneDeep(initDeviceSettingFormModel)); // 真实使用的formModel
@@ -350,16 +339,16 @@
}
);
-function onShowPopConfirm(settingKey: DeviceSettingKeyEnum) {
+function onShowPopConfirm(settingKey) {
deviceSetting.value[settingKey].popConfirm.visible = true;
deviceSettingFormModel.value = cloneDeep(deviceSettingFormModelFromOsd.value);
}
-function onCancel(settingKey: DeviceSettingKeyEnum) {
+function onCancel(settingKey) {
deviceSetting.value[settingKey].popConfirm.visible = false;
}
-async function onConfirm(settingKey: DeviceSettingKeyEnum) {
+async function onConfirm(settingKey) {
deviceSetting.value[settingKey].popConfirm.loading = true;
const body = genDevicePropsBySettingKey(settingKey, deviceSettingFormModel.value);
await setDeviceProps(props.sn, body);
--
Gitblit v1.9.3