|
|
@@ -52,8 +52,8 @@
|
|
|
prop="typeDesc"
|
|
|
:rules="typeDescRule">
|
|
|
<el-input
|
|
|
- type="textarea"
|
|
|
v-model="formData.typeDesc"
|
|
|
+ type="textarea"
|
|
|
placeholder="请输入其他故障描述"
|
|
|
:disabled="disabled"
|
|
|
class="form-control" />
|
|
|
@@ -79,15 +79,6 @@
|
|
|
@clear="handleClear" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :xs="24" :sm="12">
|
|
|
- <el-form-item :label="t('faultForm.faultySystem')" prop="failureSystem">
|
|
|
- <el-input
|
|
|
- v-model="formData.failureSystem"
|
|
|
- :placeholder="t('faultForm.faultySystemHolder')"
|
|
|
- :disabled="disabled"
|
|
|
- class="form-control" />
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
<el-col :xs="24" :sm="12">
|
|
|
<el-form-item :label="t('faultForm.failureTime')" prop="failureTime">
|
|
|
<el-date-picker
|
|
|
@@ -384,7 +375,7 @@ const approvalRule = [{ required: true, message: '审批人不能为空', trigge
|
|
|
const formRef = ref() // 表单 Ref
|
|
|
const disabled = ref(false)
|
|
|
/** 打开弹窗 */
|
|
|
-const open = async (type: string, id?: number, disable?: boolean) => {
|
|
|
+const open = async (type: string, id?: number, disable?: boolean, fallbackData?: Partial<IotFailureReportVO>) => {
|
|
|
disabled.value = disable
|
|
|
dialogVisible.value = true
|
|
|
dialogTitle.value = t('action.' + type)
|
|
|
@@ -397,6 +388,9 @@ const open = async (type: string, id?: number, disable?: boolean) => {
|
|
|
formLoading.value = true
|
|
|
try {
|
|
|
formData.value = await IotFailureReportApi.getIotFailureReport(id)
|
|
|
+ if (formData.value.failureType === 'other' && formData.value.typeDesc == null) {
|
|
|
+ formData.value.typeDesc = fallbackData?.typeDesc ?? ''
|
|
|
+ }
|
|
|
} finally {
|
|
|
formLoading.value = false
|
|
|
}
|