sunlupeng 1 سال پیش
والد
کامیت
baf21b5cfc
2فایلهای تغییر یافته به همراه26 افزوده شده و 14 حذف شده
  1. 10 3
      src/views/oa/universal/detail.vue
  2. 16 11
      src/views/oa/universal/edit.vue

+ 10 - 3
src/views/oa/universal/detail.vue

@@ -121,9 +121,9 @@
       </div>
       <div class="fx-field x-grid-col-12" v-if="form.auditStatus==2">
         <div style="float: right;">
-          <el-button v-if="form.auditStatus==1" type="primary" @click="handleRevocation()">撤回</el-button>
-          <el-button @click="handleAudit(false)">驳回</el-button>
-          <el-button type="primary" @click="handleAudit(true)">同意</el-button>
+          <el-button v-if="form.auditStatus==1" type="primary" @click="handleRevocation()" v-loading.fullscreen.lock="fullscreenLoading">撤回</el-button>
+          <el-button @click="handleAudit(false)" v-loading.fullscreen.lock="fullscreenLoading">驳回</el-button>
+          <el-button type="primary" @click="handleAudit(true)" v-loading.fullscreen.lock="fullscreenLoading">同意</el-button>
         </div>
       </div>
 
@@ -143,6 +143,7 @@ export default {
   },
   data() {
     return {
+      fullscreenLoading:false,
       loading:false,
       reason: '',
       auditRule: {
@@ -173,7 +174,9 @@ export default {
     },
     handleRevocation(){
       this.$modal.confirm('是否确认撤回?').then(() => {
+        this.fullscreenLoading = true;
         revocation(this.form.taskId).then(response => {
+          this.fullscreenLoading = false;
           this.$modal.msgSuccess("撤回成功");
           this.$parent.$parent.closeEdit();
         })
@@ -193,7 +196,9 @@ export default {
           reason: this.reason,
         }
         if (pass) {
+          this.fullscreenLoading = true;
           agree(data).then(response => {
+            this.fullscreenLoading = false;
             this.$parent.$parent.closeEdit();
             this.$modal.msgSuccess({
               message: '审批通过成功!',
@@ -201,7 +206,9 @@ export default {
             });
           });
         } else {
+          this.fullscreenLoading = true;
           disagree(data).then(response => {
+            this.fullscreenLoading = false;
             this.$parent.$parent.closeEdit();
             this.$modal.msgSuccess({
               message: '驳回成功!',

+ 16 - 11
src/views/oa/universal/edit.vue

@@ -67,11 +67,11 @@
         </el-timeline>
       </el-form-item>
       <el-form-item>
-        <el-button v-if="form.auditStatus==5 || form.auditStatus==6" type="primary" @click="onReCommit()">提交</el-button>
-        <el-button type="primary" @click="onSubmit()">提交</el-button>
-        <el-button v-if="!form.auditStatus || form.auditStatus==0" @click="onSave()">暂存</el-button>
-        <el-button v-if="form.auditStatus==5 || form.auditStatus==6" type="warning" @click="onClose()">关闭</el-button>
-        <el-button v-if="form.auditStatus==0" type="danger" @click="onDelete()">删除</el-button>
+        <el-button v-if="form.auditStatus==5 || form.auditStatus==6" type="primary" @click="onReCommit()" v-loading.fullscreen.lock="fullscreenLoading">提交</el-button>
+        <el-button type="primary" @click="onSubmit()" v-loading.fullscreen.lock="fullscreenLoading">提交</el-button>
+        <el-button v-if="!form.auditStatus || form.auditStatus==0" @click="onSave()" v-loading.fullscreen.lock="fullscreenLoading">暂存</el-button>
+        <el-button v-if="form.auditStatus==5 || form.auditStatus==6" type="warning" @click="onClose()" v-loading.fullscreen.lock="fullscreenLoading">关闭</el-button>
+        <el-button v-if="form.auditStatus==0" type="danger" @click="onDelete()" v-loading.fullscreen.lock="fullscreenLoading">删除</el-button>
       </el-form-item>
     </el-form>
     <PeopleSelect ref="peopleSelect" :type="type" :isCheck="true" :open="peopleOpen" @cancel="peopleOpen = false"
@@ -104,6 +104,7 @@ export default {
   },
   data() {
     return {
+      fullscreenLoading:false,
       tasks:[],
       loading:false,
       files: [],
@@ -278,9 +279,9 @@ export default {
           console.log(this.form);
           this.form.startUserSelectAssignees = this.form.peopleList.split(',');
           this.form.auditPass = true;
-          this.$parent.$parent.detailLoading = true;
+          this.fullscreenLoading = true;
           create(this.form).then(response => {
-            this.$parent.$parent.detailLoading = false;
+            this.fullscreenLoading = false;
             this.$modal.msgSuccess("提交成功");
             if(this.id){
               this.$parent.$parent.closeEdit();
@@ -302,9 +303,9 @@ export default {
           console.log(this.form);
           this.form.startUserSelectAssignees = this.form.peopleList.split(',');
           this.form.auditPass = true;
-          this.$parent.$parent.detailLoading = true;
+          this.fullscreenLoading = true;
           reCommit(this.form).then(response => {
-            this.$parent.$parent.detailLoading = false;
+            this.fullscreenLoading = false;
             this.$modal.msgSuccess("提交成功");
             if(this.id){
               this.$parent.$parent.closeEdit();
@@ -324,9 +325,9 @@ export default {
             this.form.startUserSelectAssignees = this.form.peopleList.split(',');
           }
           this.form.auditPass = false;
-          this.$parent.$parent.detailLoading = true;
+          this.fullscreenLoading = true;
           save(this.form).then(response => {
-            this.$parent.$parent.detailLoading = false;
+            this.fullscreenLoading = false;
             this.$modal.msgSuccess("暂存成功");
             if(this.id){
               this.$parent.$parent.closeEdit();
@@ -338,7 +339,9 @@ export default {
     //暂存删除
     async onDelete() {
       this.$modal.confirm('是否确认删除?').then(() => {
+        this.fullscreenLoading = true;
         deleteById(this.id).then(response => {
+          this.fullscreenLoading = false;
           this.$modal.msgSuccess("删除成功");
           this.$parent.$parent.closeEdit();
         })
@@ -347,7 +350,9 @@ export default {
      //暂存删除
      async onClose() {
       this.$modal.confirm('是否确认关闭?').then(() => {
+        this.fullscreenLoading = true;
         closeById(this.id).then(response => {
+          this.fullscreenLoading = false;
           this.$modal.msgSuccess("流程已关闭");
           this.$parent.$parent.closeEdit();
         })