Quellcode durchsuchen

流程管理和展示添加loading'效果

ZYZ vor 1 Jahr
Ursprung
Commit
f5717d219d

+ 4 - 1
zkqy-ui/src/views/bussiness/processMange.vue

@@ -67,7 +67,7 @@
       </div>
       <div class="show-body">
         <!--    流程任务列表    -->
-        <el-table :data="tableData" border stripe>
+        <el-table :data="tableData" v-loading="loading" border stripe>
           <el-table-column type="selection" width="55" align="center" />
           <el-table-column type="index" width="50" align="center" />
           <el-table-column
@@ -356,6 +356,7 @@ export default {
       // 弹窗表单渲染数据
       formData: {},
       backExceptionTaskList: ["GY06"], //特殊回退表单组件列表
+      loading: true,
     };
   },
   computed: {
@@ -400,6 +401,7 @@ export default {
   methods: {
     // 获取列表数据
     getList() {
+      this.loading = true;
       processList({ ...this.queryParams, taskName: this.queryString }).then(
         (res) => {
           if (res.code == 200) {
@@ -409,6 +411,7 @@ export default {
           } else {
             this.$message.error("网络异常,请稍后再试");
           }
+          this.loading = false;
         }
       );
     },

+ 6 - 1
zkqy-ui/src/views/bussiness/progressShow.vue

@@ -46,9 +46,10 @@
           </div>
         </div>
       </div>
-      <div class="show-body">
+      <div class="show-body" v-loading="loading">
         <template v-if="tableData.length > 0">
           <TaskList
+            
             v-for="(item, index) of tableData"
             :key="index + 1"
             :num="index + 1"
@@ -89,12 +90,14 @@ export default {
         taskProcessState: "0",
       },
       tableData: [], //列表数据
+      loading: true,
     };
   },
   computed: {},
   methods: {
     // 获取列表数据
     getList() {
+      this.loading = true;
       getListLog({ ...this.queryParams, taskName: this.queryString }).then(
         (res) => {
           if (res.code == 200) {
@@ -106,6 +109,8 @@ export default {
           } else {
             this.$message.error("网络异常,请稍后再试");
           }
+          this.loading=false;
+
 
           return;
           if (res.code == 200) {