Commit ebf7220f by 李伟康

fix(sales): 修复页面权限控制和表单验证问题

- 修复编辑页面步骤控制逻辑,排除审核和查看模式
- 添加场景文件上传后表单字段验证
- 修复场景文件删除后表单验证更新机制
1 parent 1d4c273f
...@@ -464,6 +464,7 @@ export default { ...@@ -464,6 +464,7 @@ export default {
} }
this.$set(this.infoForm.sceneFiles, index, item); this.$set(this.infoForm.sceneFiles, index, item);
document.getElementById("fileUpload").value = ""; document.getElementById("fileUpload").value = "";
this.formRef.validateField("sceneFiles")
}; };
} else { } else {
this.notice.errorTips("上传文件不可超过10M"); this.notice.errorTips("上传文件不可超过10M");
...@@ -510,6 +511,7 @@ export default { ...@@ -510,6 +511,7 @@ export default {
item.name = ''; item.name = '';
// 手动触发数组响应式更新,避免 $set 触发 baseSceneCode 深层 watcher 导致整个数组被重置 // 手动触发数组响应式更新,避免 $set 触发 baseSceneCode 深层 watcher 导致整个数组被重置
this.infoForm.sceneFiles = [...this.infoForm.sceneFiles]; this.infoForm.sceneFiles = [...this.infoForm.sceneFiles];
this.formRef.validateField("sceneFiles")
}, },
filterInputVal(controlId, val) { filterInputVal(controlId, val) {
// 只保留数字和小数点,确保只有一个小数点 // 只保留数字和小数点,确保只有一个小数点
......
...@@ -25,7 +25,8 @@ ...@@ -25,7 +25,8 @@
<template v-if="pageComplete"> <template v-if="pageComplete">
<el-button v-if="pageType == 'audit' && step == 4" type="primary" @click="rejectDialogVisible = true" <el-button v-if="pageType == 'audit' && step == 4" type="primary" @click="rejectDialogVisible = true"
plain>驳回</el-button> plain>驳回</el-button>
<el-button v-if="pageType == 'edit' && step == 3" type="primary" @click="prevStep" plain>上一步</el-button> <el-button v-if="!['audit', 'view'].includes(pageType) && step == 3" type="primary" @click="prevStep"
plain>上一步</el-button>
<el-button v-if="pageType != 'view'" @click="submit" :loading="buttonLoading" type="primary">{{ submitText <el-button v-if="pageType != 'view'" @click="submit" :loading="buttonLoading" type="primary">{{ submitText
}}</el-button> }}</el-button>
</template> </template>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!