|
@@ -43,8 +43,8 @@
|
|
|
<el-button @click="handleClose" size="small">取 消</el-button>
|
|
|
<template>
|
|
|
<div v-if="isLook" style="margin-left: 10px;">
|
|
|
- <el-button @click="handleSave" size="small" type="primary">保 存</el-button>
|
|
|
- <el-button @click="submit" size="small" type="primary">提交审核</el-button>
|
|
|
+ <el-button @click="handleSave" :loading="btnLoading" size="small" type="primary">保 存</el-button>
|
|
|
+ <el-button @click="submit" :loading="btnLoading" size="small" type="primary">提交审核</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -79,6 +79,7 @@ export default {
|
|
|
// 是否是处理任务?
|
|
|
isLook: false,
|
|
|
row: null,
|
|
|
+ btnLoading:false,
|
|
|
};
|
|
|
},
|
|
|
watch: {},
|
|
@@ -166,17 +167,31 @@ export default {
|
|
|
},
|
|
|
// 保存
|
|
|
async handleSave(type) {
|
|
|
+ if(type != 1){
|
|
|
+ if(this.form.systemFileList && this.form.systemFileList.length == 0){
|
|
|
+ this.handleClose()
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
// 判断文件是否都上传完毕
|
|
|
- this.$commonJS.allUploadFile(this.form)
|
|
|
+ // this.$commonJS.allUploadFile(this.form)
|
|
|
+ var guids = this.$commonJS.checkUploadFile(this.form.systemFileList)
|
|
|
+ if(!guids){
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.form.fileGuids = guids
|
|
|
this.form.taskId = this.row.id
|
|
|
+ this.btnLoading = true
|
|
|
await this.$api.addTaskAuditResult(this.form).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message.success('保存文件成功')
|
|
|
- if (!type) {
|
|
|
+ if (type != 1) {
|
|
|
this.handleClose()
|
|
|
}
|
|
|
+ this.btnLoading = false
|
|
|
}
|
|
|
})
|
|
|
+ return true
|
|
|
},
|
|
|
// 提交审核时有未保存的文件调用保存接口
|
|
|
async isHandleSave() {
|
|
@@ -199,8 +214,12 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 专利挖掘项目-文件分配任务审核
|
|
|
- fileTask(form) {
|
|
|
- this.isHandleSave()
|
|
|
+ async fileTask(form) {
|
|
|
+ // this.isHandleSave()
|
|
|
+ var sign = await this.handleSave(1)
|
|
|
+ if(!sign){
|
|
|
+ return false
|
|
|
+ }
|
|
|
var params = {
|
|
|
...form,
|
|
|
projectId: this.form.projectId,//项目id
|