Selaa lähdekoodia

徐明浩
特种设备-所有导入按钮增加导入时Loading加载渲染

徐明浩 3 vuotta sitten
vanhempi
commit
19eba81743

+ 11 - 3
ui/src/views/sems/reportYlgd/index.vue

@@ -595,7 +595,8 @@
         <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
       </el-upload>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button type="primary" @click="submitFileForm"
+                   v-loading.fullscreen.lock="fullscreenLoading">确 定</el-button>
         <el-button @click="upload.open = false">取 消</el-button>
       </div>
       <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
@@ -642,7 +643,9 @@
         <!--        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>-->
       </el-upload>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="thirdSubmitFileForm">确 定</el-button>
+        <el-button type="primary" v-loading.fullscreen.lock="fullscreenLoading"
+                   @click="thirdSubmitFileForm">确 定
+        </el-button>
         <el-button @click="thirdUpload.open = false">取 消</el-button>
       </div>
     </el-dialog>
@@ -670,7 +673,7 @@
           :show-overflow-tooltip="true"
           align="center">
           <template slot-scope="scope">
-            <a  class="link-type"  @click="handleDownload(scope.row)">
+            <a class="link-type" @click="handleDownload(scope.row)">
               <span>{{ scope.row.fileName }}</span>
             </a>
           </template>
@@ -702,6 +705,7 @@ export default {
   components: {Treeselect, YearApprove},
   data() {
     return {
+      fullscreenLoading: false,
       submitData: {
         plantCode: null,
         year: null,
@@ -1262,6 +1266,7 @@ export default {
       this.upload.open = false;
       this.upload.isUploading = false;
       this.$refs.upload.clearFiles();
+      this.fullscreenLoading = false;
       if (response.data.length > 0) {
         let failrow = ''
         for (let i = 0; i < response.data.length; i++) {
@@ -1276,6 +1281,7 @@ export default {
     // 提交上传文件
     submitFileForm() {
       this.$refs.upload.submit();
+      this.fullscreenLoading = true;
     },
     /** 导出按钮操作 */
     handleExport() {
@@ -1299,6 +1305,7 @@ export default {
       this.submitData.plantCode = this.plantCodeThird;
       this.submitData.year = new Date(this.importThirdYear).getFullYear();
       this.$refs.thirdUpload.submit();
+      this.fullscreenLoading = true;
     },
     //第三方数据列表
     thirdPartyList() {
@@ -1317,6 +1324,7 @@ export default {
       this.thirdUpload.open = false;
       this.thirdUpload.isUploading = false;
       this.$refs.thirdUpload.clearFiles();
+      this.fullscreenLoading = false;
       if (response.data.length > 0) {
         this.$alert(this.$t('导入成功'));
       } else {

+ 9 - 2
ui/src/views/sems/reportYlrq/index.vue

@@ -812,7 +812,8 @@
         <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
       </el-upload>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button type="primary" @click="submitFileForm"
+                   v-loading.fullscreen.lock="fullscreenLoading">确 定</el-button>
         <el-button @click="upload.open = false">取 消</el-button>
       </div>
     </el-dialog>
@@ -856,7 +857,8 @@
         <!--        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>-->
       </el-upload>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="thirdSubmitFileForm">确 定</el-button>
+        <el-button type="primary" @click="thirdSubmitFileForm"
+                   v-loading.fullscreen.lock="fullscreenLoading">确 定</el-button>
         <el-button @click="thirdUpload.open = false">取 消</el-button>
       </div>
     </el-dialog>
@@ -919,6 +921,7 @@ export default {
   components: {Treeselect, YearApprove},
   data() {
     return {
+      fullscreenLoading: false,
       submitData: {
         plantCode: null,
         year: null,
@@ -1665,6 +1668,7 @@ export default {
       this.upload.open = false;
       this.upload.isUploading = false;
       this.$refs.upload.clearFiles();
+      this.fullscreenLoading = false;
       if (response.data.length > 0) {
         let failrow = ''
         for (let i = 0; i < response.data.length; i++) {
@@ -1679,6 +1683,7 @@ export default {
     // 提交上传文件
     submitFileForm() {
       this.$refs.upload.submit();
+      this.fullscreenLoading = true;
     },
     /** 导出按钮操作 */
     handleExport() {
@@ -1702,6 +1707,7 @@ export default {
       this.submitData.plantCode = this.plantCodeThird;
       this.submitData.year = new Date(this.importThirdYear).getFullYear();
       this.$refs.thirdUpload.submit();
+      this.fullscreenLoading = true;
     },
     //第三方数据列表
     thirdPartyList() {
@@ -1720,6 +1726,7 @@ export default {
       this.thirdUpload.open = false;
       this.thirdUpload.isUploading = false;
       this.$refs.thirdUpload.clearFiles();
+      this.fullscreenLoading = false;
       if (response.data.length > 0) {
         this.$alert(this.$t('导入成功'));
       } else {

+ 5 - 1
ui/src/views/sems/specCc/index.vue

@@ -409,7 +409,8 @@
           </el-upload>
           <div slot="footer" class="dialog-footer">
             <a v-if="waitSubmit" style="margin-right: 300px">{{ $t('正在导入...') }}</a>
-              <el-button type="primary" @click="submitFileForm">{{ $t('确定') }}</el-button>
+              <el-button type="primary" @click="submitFileForm"
+                         v-loading.fullscreen.lock="fullscreenLoading">{{ $t('确定') }}</el-button>
               <el-button @click="upload.open = false">{{ $t('取消') }}</el-button>
           </div>
       </el-dialog>
@@ -488,6 +489,7 @@
   components: { Treeselect,AddApprove,HisApprove,HisCheck,HisReform },
   data() {
     return {
+      fullscreenLoading: false,
       waitSubmit: false,
       hisReformVisible: false,
       dataForm: 0,
@@ -820,6 +822,7 @@
           this.upload.open = false;
           this.upload.isUploading = false;
           this.$refs.upload.clearFiles();
+          this.fullscreenLoading = false;
         if (response.data.length > 0) {
           let failrow = ''
           for (let i = 0; i < response.data.length; i++) {
@@ -834,6 +837,7 @@
       // 提交上传文件
       submitFileForm() {
           this.$refs.upload.submit();
+          this.fullscreenLoading = true;
       },
     addAprrove (row, type) {
       var rows = row ? [row] : this.dataListSelections.map(item => {

+ 5 - 1
ui/src/views/sems/specDt/index.vue

@@ -340,7 +340,8 @@
           </el-upload>
           <div slot="footer" class="dialog-footer">
             <a v-if="waitSubmit" style="margin-right: 300px">{{ $t('正在导入...') }}</a>
-              <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>
+              <el-button type="primary" @click="submitFileForm"
+                         v-loading.fullscreen.lock="fullscreenLoading">{{ $t('确 定') }}</el-button>
               <el-button @click="upload.open = false">{{ $t('取 消') }}</el-button>
           </div>
       </el-dialog>
@@ -421,6 +422,7 @@
   components: { Treeselect ,AddApprove,HisApprove,HisCheck,HisReform  },
   data() {
     return {
+      fullscreenLoading: false,
       waitSubmit: false,
       hisReformVisible: false,
       dataForm: 0,
@@ -729,6 +731,7 @@
           this.upload.open = false;
           this.upload.isUploading = false;
           this.$refs.upload.clearFiles();
+          this.fullscreenLoading = false;
         if (response.data.length > 0) {
           let failrow = ''
           for (let i = 0; i < response.data.length; i++) {
@@ -743,6 +746,7 @@
       // 提交上传文件
       submitFileForm() {
           this.$refs.upload.submit();
+          this.fullscreenLoading = true;
       },
     addAprrove (row, type) {
       var rows = row ? [row] : this.dataListSelections.map(item => {

+ 5 - 1
ui/src/views/sems/specDzsb/index.vue

@@ -497,7 +497,8 @@
           </el-upload>
           <div slot="footer" class="dialog-footer">
               <a v-if="waitSubmit" style="margin-right: 300px">{{ $t('正在导入...') }}</a>
-              <el-button type="primary" @click="submitFileForm">{{ $t('确定') }}</el-button>
+              <el-button type="primary" @click="submitFileForm"
+                         v-loading.fullscreen.lock="fullscreenLoading">{{ $t('确定') }}</el-button>
               <el-button @click="upload.open = false">{{ $t('取消') }}</el-button>
           </div>
       </el-dialog>
@@ -584,6 +585,7 @@
   components: { Treeselect,AddApprove ,HisApprove,HisCheck,HisReform  },
   data() {
     return {
+      fullscreenLoading: false,
       waitSubmit: false,
       hisReformVisible: false,
       dataForm: 0,
@@ -912,6 +914,7 @@
           this.upload.open = false;
           this.upload.isUploading = false;
           this.$refs.upload.clearFiles();
+          this.fullscreenLoading = false;
           if (response.data.length > 0) {
             let failrow = ''
             for (let i = 0; i < response.data.length; i++) {
@@ -926,6 +929,7 @@
       // 提交上传文件
       submitFileForm() {
           this.$refs.upload.submit();
+          this.fullscreenLoading = true;
       },
     addAprrove (row, type) {
       var rows = row ? [row] : this.dataListSelections.map(item => {

+ 5 - 1
ui/src/views/sems/specGl/index.vue

@@ -474,7 +474,8 @@
           </el-upload>
           <div slot="footer" class="dialog-footer">
             <a v-if="waitSubmit" style="margin-right: 300px">{{ $t('正在导入...') }}</a>
-              <el-button type="primary" @click="submitFileForm">{{ $t('确定') }}</el-button>
+              <el-button type="primary" @click="submitFileForm"
+                         v-loading.fullscreen.lock="fullscreenLoading">{{ $t('确定') }}</el-button>
               <el-button @click="upload.open = false">{{ $t('取消') }}</el-button>
           </div>
       </el-dialog>
@@ -553,6 +554,7 @@
   components: { Treeselect ,AddApprove,HisApprove,HisCheck,HisReform },
   data() {
     return {
+      fullscreenLoading: false,
       waitSubmit: false,
       hisReformVisible: false,
       dataForm: 0,
@@ -892,6 +894,7 @@
           this.upload.open = false;
           this.upload.isUploading = false;
           this.$refs.upload.clearFiles();
+          this.fullscreenLoading = false;
         if (response.data.length > 0) {
           let failrow = ''
           for (let i = 0; i < response.data.length; i++) {
@@ -906,6 +909,7 @@
       // 提交上传文件
       submitFileForm() {
           this.$refs.upload.submit();
+          this.fullscreenLoading = true;
       },
     addAprrove (row, type) {
       var rows = row ? [row] : this.dataListSelections.map(item => {

+ 5 - 1
ui/src/views/sems/specYlgd/index.vue

@@ -606,7 +606,8 @@
           </el-upload>
           <div slot="footer" class="dialog-footer">
               <a v-if="waitSubmit" style="margin-right: 300px">{{ $t('正在导入...') }}</a>
-              <el-button type="primary" @click="submitFileForm">{{ $t('确定') }}</el-button>
+              <el-button type="primary" @click="submitFileForm"
+                         v-loading.fullscreen.lock="fullscreenLoading">>{{ $t('确定') }}</el-button>
               <el-button @click="upload.open = false">{{ $t('取消') }}</el-button>
           </div>
       </el-dialog>
@@ -685,6 +686,7 @@ export default {
   components: { Treeselect,AddApprove ,HisApprove,HisCheck,HisReform  },
   data() {
     return {
+      fullscreenLoading: false,
       waitSubmit: false,
       hisReformVisible: false,
       dataForm: 0,
@@ -1042,6 +1044,7 @@ export default {
           this.upload.open = false;
           this.upload.isUploading = false;
           this.$refs.upload.clearFiles();
+          this.fullscreenLoading = false;
         if (response.data.length > 0) {
           let failrow = ''
           for (let i = 0; i < response.data.length; i++) {
@@ -1056,6 +1059,7 @@ export default {
       // 提交上传文件
       submitFileForm() {
           this.$refs.upload.submit();
+          this.fullscreenLoading = true;
       },
     addAprrove (row, type) {
       var rows = row ? [row] : this.dataListSelections.map(item => {

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 352 - 326
ui/src/views/sems/specYlrq/index.vue


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 326 - 296
ui/src/views/sems/thickness/index.vue


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä