|
@@ -2,7 +2,8 @@
|
|
|
<div>
|
|
|
<el-dialog :title="title" :close-on-click-modal="false" width="50%" @close="close" @keyup.enter.native=""
|
|
|
v-model="visible" @open="handleOpen">
|
|
|
- <el-form :model="inputForm" ref="inputForm" v-loading="loading" :class="method === 'view' ? 'readonly' : ''"
|
|
|
+ <el-form :model="inputForm" :rules="rules" ref="inputForm" v-loading="loading"
|
|
|
+ :class="method === 'view' ? 'readonly' : ''"
|
|
|
:disabled="status === 'audit' || status === 'taskFormDetail' || method === 'view'" label-width="100px"
|
|
|
@submit.native.prevent>
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
@@ -77,7 +78,12 @@ export default {
|
|
|
keyWatch: '',
|
|
|
dateList: [],
|
|
|
dictList: [],
|
|
|
- ossService: null
|
|
|
+ ossService: null,
|
|
|
+ rules: {
|
|
|
+ classification: [
|
|
|
+ { required: true, message: "请选择收藏分类", trigger: "change" },
|
|
|
+ ],
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -151,15 +157,13 @@ export default {
|
|
|
// 表单提交
|
|
|
async doSubmit() {
|
|
|
let files = this.$refs.uploadComponent.getDataList()
|
|
|
- console.log(files);
|
|
|
- if (files.length <= 0) {
|
|
|
+ if (this.$refs.uploadComponent.checkProgress()) {
|
|
|
this.loading = false
|
|
|
- this.$message.error(`请上传附件后提交`);
|
|
|
return
|
|
|
}
|
|
|
- if (this.$refs.uploadComponent.checkProgress()) {
|
|
|
+ if (files.length <= 0) {
|
|
|
this.loading = false
|
|
|
- this.$message.error(`待附件上传完毕后提交`);
|
|
|
+ this.$message.error(`请上传附件后提交`);
|
|
|
return
|
|
|
}
|
|
|
this.loading = true
|