修复部分前端bug
This commit is contained in:
parent
b6f3abadfa
commit
4bf7d55098
|
|
@ -20,7 +20,7 @@
|
|||
</a-col>
|
||||
<a-col :xs="24" :sm="8" :md="6" :lg="8" :xl="6" :xxl="6" style="margin-left:-10px;margin-top: 16px;">
|
||||
<a-form-item label="维护时间" name="maintainTime">
|
||||
<a-date-picker placeholder="" v-model:value="queryParam.maintainTime" value-format="YYYY-MM-DD" style="width: 100%" />
|
||||
<a-date-picker placeholder="" v-model:value="queryParam.maintainTime" value-format="YYYY-MM-DD" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@
|
|||
maintainTime: [{ required: true, message: '维护时间不能为空', trigger: 'blur' }],
|
||||
maintainPerson: [{ required: true, message: '负责人不能为空', trigger: 'blur' }],
|
||||
stationCode: [{ required: true, message: '站点不能为空', trigger: 'blur' }],
|
||||
itemId: [{ required: true, message: '监测情况不能为空', trigger: 'blur' }],
|
||||
maintainData1: [{ required: true, message: '监测情况不能为空', trigger: 'blur' }],
|
||||
};
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: true });
|
||||
|
||||
|
|
@ -159,7 +159,9 @@
|
|||
*/
|
||||
async function submitForm() {
|
||||
// 触发表单验证
|
||||
console.log(1)
|
||||
await validate();
|
||||
console.log(2)
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="采样时间" v-bind="validateInfos.sampTime">
|
||||
<a-date-picker placeholder="请选择采样时间" v-model:value="formData.sampTime" value-format="YYYY-MM" style="width: 100%" :disabled="disabled"/>
|
||||
<a-date-picker placeholder="请选择采样时间" v-model:value="formData.sampTime" value-format="YYYY-MM-DD" style="width: 100%" :disabled="disabled"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
|
|
@ -146,8 +146,12 @@
|
|||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//处理数组
|
||||
model.mPics=model.mPics.split(',');
|
||||
console.log(model)
|
||||
if(model.mPics && typeof model.mPics === 'string'){
|
||||
//处理数组
|
||||
model.mPics = model.mPics.split(',');
|
||||
}
|
||||
|
||||
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue