|
|
@ -1,17 +1,26 @@ |
|
|
|
<template> |
|
|
|
<Dialog v-model="modelVisible" title="设备操作"> |
|
|
|
<div class='DeviceControlDialog'> |
|
|
|
<Form class="form" ref="FormConfigRef" :formList="formList" column="1" style="flex: 1;" labelWidth="120px" /> |
|
|
|
|
|
|
|
<div class="footer"> |
|
|
|
<Button style="background-color: rgba(0, 179, 204, .3);" @click.native="modelVisible = false, submitting = false"> |
|
|
|
取消 |
|
|
|
</Button> |
|
|
|
<Button @click.native="handleSubmit" :loading="submitting"> |
|
|
|
确定 |
|
|
|
</Button> |
|
|
|
|
|
|
|
<Form v-model="formData" class="form" ref="FormConfigRef" :formList="formList" column="1" labelWidth="120px" /> |
|
|
|
|
|
|
|
<div class="tips" v-if="formData.controlType === '01'"> |
|
|
|
说明: 定时控制模式下,诱导灯在开始时间自动打开,结束时间自动关闭 |
|
|
|
</div> |
|
|
|
<div class="tips" v-if="formData.controlType === '02'"> |
|
|
|
说明: 万年历自动模式下,诱导灯在白天会自动关闭,夜晚会自动打开 |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<template #footer> |
|
|
|
<Button style="background-color: rgba(0, 179, 204, .3);" @click.native="modelVisible = false, submitting = false"> |
|
|
|
取消 |
|
|
|
</Button> |
|
|
|
<Button @click.native="handleSubmit" :loading="submitting"> |
|
|
|
确定 |
|
|
|
</Button> |
|
|
|
</template> |
|
|
|
</Dialog> |
|
|
|
</template> |
|
|
|
|
|
|
@ -70,6 +79,7 @@ export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
submitting: false, |
|
|
|
formData: {}, |
|
|
|
formList: [ |
|
|
|
{ |
|
|
|
label: "类型:", |
|
|
@ -236,6 +246,11 @@ export default { |
|
|
|
|
|
|
|
if (!formData.onWorkStatus || !formData.inWorkStatus) return Message.error(`工作状态不能为空!`); |
|
|
|
|
|
|
|
if (["01", "02"].includes(result.mode)) { |
|
|
|
if (["04", "00"].includes(formData.onWorkStatus)) return Message.error(`上行工作状态不能选择当前类型!`); |
|
|
|
if (["04", "00"].includes(formData.inWorkStatus)) return Message.error(`下行工作状态不能选择当前类型!`); |
|
|
|
} |
|
|
|
|
|
|
|
result.onWorkStatus = formData.onWorkStatus; |
|
|
|
result.inWorkStatus = formData.inWorkStatus; |
|
|
|
|
|
|
@ -298,11 +313,8 @@ export default { |
|
|
|
flex-direction: column; |
|
|
|
gap: 15px; |
|
|
|
|
|
|
|
.footer { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
justify-content: flex-end; |
|
|
|
gap: 9px; |
|
|
|
.tips { |
|
|
|
font-size: 12px; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|