diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue index e93ec547..b0c5a9a9 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue @@ -4,7 +4,8 @@ - + @@ -94,6 +95,16 @@ export default { } }, methods: { + resolveListeners(callbacks) { + + const result = {}; + + for (const key in callbacks) { + result[key] = (...args) => callbacks[key](...args, this.formData, this) + } + + return result + }, reset() { return this.formData = reduceDefaultValue(this.formList); }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue index 8aa32fd7..95b6dc8f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue @@ -113,13 +113,13 @@ export default { { label: "选择时间:", key: "displayTime", - type: "datePicker", + type: "timePicker", required: true, visible: (data) => data.controlType == "automatic", options: { - type: "datetimerange", - angeSeparator: "至", - valueFormat: "yyyy-MM-dd HH:mm:ss", + isRange: true, + rangeSeparator: "至", + valueFormat: "HH:mm", startPlaceholder: "开始时间", endPlaceholder: "结束时间", }, @@ -143,34 +143,41 @@ export default { handler(bool) { if (!bool) return; - request.post(`business/device/functions/${this.deviceId}/${52}`, {}) - .then(async (result) => { - if (result.code != 200) return; + this.reDisplay(); + } + } + }, + methods: { + reDisplay() { + request.post(`business/device/functions/${this.deviceId}/${52}`, {}) + .then(async (result) => { + if (result.code != 200) return; - await delay(0); + await delay(0); - const formData = this.$refs.FormConfigRef?.formData; + const formData = this.$refs.FormConfigRef?.formData; - const data = result.data[0]; + const data = result.data[0]; + console.log("%c [ data ]-155-「DeviceControlDialog.vue」", "font-size:15px; background:#66352f; color:#aa7973;", data); - switch (data.mode) { - case "00": - formData.controlType = "manual"; + switch (data.mode) { + case "00": + formData.controlType = "manual"; - formData.onWorkStatus = data.onWorkStatus; - formData.inWorkStatus = data.inWorkStatus; - break; - case "01": - formData.controlType = "automatic"; + formData.onWorkStatus = data.onWorkStatus; + formData.inWorkStatus = data.inWorkStatus; + break; + case "01": + formData.controlType = "automatic"; - formData.datePicker = [data.startDisplay, data.endDisplay]; - break; - } - }) - } - } - }, - methods: { + formData.displayTime = [data.startDisplay, data.endDisplay]; + break; + } + + this.oldFormData = cloneDeep(formData); + }) + + }, handleSubmit() { const result = cloneDeep(this.$refs.FormConfigRef?.formData); diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js index c0bb0a45..b2bddf1e 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js @@ -132,9 +132,7 @@ export async function setMarkToMap(item, data, _markerClick, content) { content: content || `
+ " src='${item.deviceState == 1 ? normal : fault}'>
`, }; }), diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue index 5122d809..41b8e14f 100644 --- a/ruoyi-ui/src/views/login.vue +++ b/ruoyi-ui/src/views/login.vue @@ -1,77 +1,39 @@