|
|
@ -104,6 +104,7 @@ export default { |
|
|
|
disabled: value != "00", |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
switch (value) { |
|
|
|
case "01": |
|
|
|
if (["04", "00"].includes(data.onWorkStatus)) |
|
|
@ -111,8 +112,10 @@ export default { |
|
|
|
if (["04", "00"].includes(data.inWorkStatus)) |
|
|
|
data.inWorkStatus = null; |
|
|
|
|
|
|
|
Array.isArray(oldFormData.displayTime) && |
|
|
|
(data.displayTime = [...oldFormData.displayTime]); |
|
|
|
if (Array.isArray(oldFormData.displayTime) && oldFormData.displayTime.length === 2){ |
|
|
|
data.startTime = oldFormData[0]; |
|
|
|
data.endTime = oldFormData[1]; |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|
}, |
|
|
@ -156,22 +159,30 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "选择时间:", |
|
|
|
key: "displayTime", |
|
|
|
label: "开始时间:", |
|
|
|
key: "startTime", |
|
|
|
type: "timePicker", |
|
|
|
required: true, |
|
|
|
visible: (data) => data.controlType == "01", |
|
|
|
options: { |
|
|
|
options:{ |
|
|
|
format:"HH:mm", |
|
|
|
}, |
|
|
|
format:"HH:mm", |
|
|
|
valueFormat: "HH:mm", |
|
|
|
}, |
|
|
|
},{ |
|
|
|
label: "结束时间:", |
|
|
|
key: "endTime", |
|
|
|
type: "timePicker", |
|
|
|
required: true, |
|
|
|
visible: (data) => data.controlType == "01", |
|
|
|
options: { |
|
|
|
isRange: true, |
|
|
|
options:{ |
|
|
|
format:"HH:mm", |
|
|
|
}, |
|
|
|
|
|
|
|
format:"HH:mm", |
|
|
|
rangeSeparator: "至", |
|
|
|
valueFormat: "HH:mm", |
|
|
|
startPlaceholder: "开始时间", |
|
|
|
endPlaceholder: "结束时间", |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
@ -204,7 +215,7 @@ export default { |
|
|
|
delete result.controlType; |
|
|
|
|
|
|
|
if (result.mode === "01") { |
|
|
|
if (!formData.displayTime?.length) |
|
|
|
if (!formData.startTime || !formData.endTime ) |
|
|
|
return Message.error(`时间不能为空!`); |
|
|
|
} |
|
|
|
|
|
|
@ -252,8 +263,8 @@ export default { |
|
|
|
const options = { mode: result.mode }; |
|
|
|
|
|
|
|
if (result.mode === "01") { |
|
|
|
options.startDisplayTime = formData.displayTime[0]; |
|
|
|
options.endDisplayTime = formData.displayTime[1]; |
|
|
|
options.startDisplayTime = formData.startTime; |
|
|
|
options.endDisplayTime = formData.endTime; |
|
|
|
} |
|
|
|
functions.push({ |
|
|
|
"functionId": "30", "params": { |
|
|
@ -278,7 +289,7 @@ export default { |
|
|
|
// Promise.all(promise) |
|
|
|
.then(res => { |
|
|
|
this.$emit("update:value", false); // this.modelVisible = false; |
|
|
|
|
|
|
|
|
|
|
|
Message.success(res.data[0].result.msg); |
|
|
|
if(this.updateFormData){ |
|
|
|
this.updateFormData({ ...result, workMode: result.mode }); |
|
|
|