Quellcode durchsuchen

Merge branch 'xqc_123'

jwyu vor 1 Jahr
Ursprung
Commit
4f442de6cd

+ 8 - 0
src/lang/modules/ETATables/commonLang.js

@@ -4,6 +4,10 @@ export default {
       zh: "刷新",
       en: "Refresh",
     },
+    refreshing_btn: {
+      zh: "刷新中...",
+      en: "Refreshing...",
+    },
     download_btn: {
       zh: "下载",
       en: "Download",
@@ -44,6 +48,10 @@ export default {
       en: "Renew",
       zh: "更新",
     },
+    renewing_btn: {
+      en: "Renewing",
+      zh: "更新中...",
+    },
   },
   Msg: {
     is_del_table_msg: {

+ 16 - 2
src/views/datasheet_manage/mixedSheetEdit.vue

@@ -42,7 +42,7 @@
       </ul>
       <div>
         <span v-if="updateTime" style="color:#999999 ;">{{$t('OnlineExcelPage.recent_save_time_info')}}{{updateTime}}</span>
-        <el-button type="primary" size="medium" @click="()=>{ sheetInit=false;getDetail('refresh')}" style="margin-left:10px" icon="el-icon-refresh-right">{{$t('ETable.Btn.renew_btn')}}</el-button>
+        <el-button type="primary" size="medium" :loading="updating" @click="updateHandle" style="margin-left:10px" icon="el-icon-refresh-right">{{updating?$t('ETable.Btn.renewing_btn'):$t('ETable.Btn.renew_btn')}}</el-button>
         <el-button type="primary" size="medium" @click="saveSheetHandle" style="margin-left:10px" v-if="hasPermission">{{$t('ETable.Btn.save_btn')}}</el-button>
         <el-button type="primary" size="medium" plain @click="backHandle">{{$t('ETable.Btn.back_btn')}}</el-button>
       </div>
@@ -117,7 +117,9 @@ export default {
       updateTime: '',
       isCanEdit:false,
       // 取消自动保存,比如返回的时候
-      cancelAutoSave:false
+      cancelAutoSave:false,
+
+      updating:false,//更新状态
     }
   },
   methods: {
@@ -134,6 +136,9 @@ export default {
       const res = await sheetInterface.sheetDetail({
 				ExcelInfoId: Number(this.sheetId)
 			})
+      if(type==='refresh'){
+        this.updating=false
+      }
 
       if(res.Ret !== 200)  return
       this.isCanEdit = res.Data.CanEdit
@@ -247,6 +252,15 @@ export default {
       isAdd && this.$router.replace({path:'/addMixedSheet',query:{id:this.sheetId}})
     },300),
 
+    //更新
+    updateHandle(){
+      if(this.updating) return
+      this.updating=true
+      this.sheetInit=false
+      this.getDetail('refresh')
+    },
+    
+
     // markFinishStatus(){
     //   if((!this.sheetId) || (!this.isCanEdit)) return
     //   sheetInterface.markSheetEditStatus({ExcelInfoId: +this.sheetId,Status:2}).then(res=>{

+ 7 - 2
src/views/datasheet_manage/sheetList.vue

@@ -199,7 +199,7 @@
                     v-if="sheetDetailInfo.Button.RefreshButton&&isSheetBtnShow('refresh')"
                   >
                   <img src="~@/assets/img/icons/refresh_blue_new.png"/>
-                    <span>{{$t('ETable.Btn.refresh_btn')}}</span>
+                    <span>{{sheetRefreshing?$t('ETable.Btn.refreshing_btn'):$t('ETable.Btn.refresh_btn')}}</span>
                   </li>
                   <li
                     class="editsty"
@@ -445,7 +445,9 @@ export default {
       autoSaveType:'',//自动保存类型,有的自动保存后需要其他操作
       cancelAutoSave:false, //自动保存时延迟的
 
-      isShowMe: false//只看我的
+      isShowMe: false,//只看我的
+
+      sheetRefreshing:false,//表格刷新状态
     };
   },
   watch: {
@@ -934,9 +936,12 @@ export default {
 
     /* 刷新表格 */
     refreshSheetEdb: _.debounce(async function () {
+      if(this.sheetRefreshing) return
+      this.sheetRefreshing=true
       const res = await sheetInterface.refreshCustomSheet({
         ExcelInfoId: this.sheetDetailInfo.ExcelInfoId,
       });
+      this.sheetRefreshing=false
 
       if (res.Ret !== 200) return;
       this.$message.success(this.$t('ETable.Msg.refresh_success_msg') );