Przeglądaj źródła

同步队列弹窗

duy 2 miesięcy temu
rodzic
commit
8d58fe9ff8

+ 10 - 0
src/api/manager/ledger.js

@@ -26,4 +26,14 @@ export const addSync = (projectInfo) => {
         method: 'post',
         data: projectInfo
     })
+}
+
+//是否同步
+
+export const getNodeStatus = (projectInfo) => {
+    return request({
+        url: '/api/blade-manager/synchronousRecord/getNodeStatus',
+        method: 'post',
+        params: projectInfo
+    })
 }

BIN
src/assets/loader.png


+ 1 - 0
src/assets/loader.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C12.5523 2 13 2.44772 13 3V6C13 6.55228 12.5523 7 12 7C11.4477 7 11 6.55228 11 6V3C11 2.44772 11.4477 2 12 2ZM12 17C12.5523 17 13 17.4477 13 18V21C13 21.5523 12.5523 22 12 22C11.4477 22 11 21.5523 11 21V18C11 17.4477 11.4477 17 12 17ZM22 12C22 12.5523 21.5523 13 21 13H18C17.4477 13 17 12.5523 17 12C17 11.4477 17.4477 11 18 11H21C21.5523 11 22 11.4477 22 12ZM7 12C7 12.5523 6.55228 13 6 13H3C2.44772 13 2 12.5523 2 12C2 11.4477 2.44772 11 3 11H6C6.55228 11 7 11.4477 7 12ZM19.0711 19.0711C18.6805 19.4616 18.0474 19.4616 17.6569 19.0711L15.5355 16.9497C15.145 16.5592 15.145 15.9261 15.5355 15.5355C15.9261 15.145 16.5592 15.145 16.9497 15.5355L19.0711 17.6569C19.4616 18.0474 19.4616 18.6805 19.0711 19.0711ZM8.46447 8.46447C8.07394 8.85499 7.44078 8.85499 7.05025 8.46447L4.92893 6.34315C4.53841 5.95262 4.53841 5.31946 4.92893 4.92893C5.31946 4.53841 5.95262 4.53841 6.34315 4.92893L8.46447 7.05025C8.85499 7.44078 8.85499 8.07394 8.46447 8.46447ZM4.92893 19.0711C4.53841 18.6805 4.53841 18.0474 4.92893 17.6569L7.05025 15.5355C7.44078 15.145 8.07394 15.145 8.46447 15.5355C8.85499 15.9261 8.85499 16.5592 8.46447 16.9497L6.34315 19.0711C5.95262 19.4616 5.31946 19.4616 4.92893 19.0711ZM15.5355 8.46447C15.145 8.07394 15.145 7.44078 15.5355 7.05025L17.6569 4.92893C18.0474 4.53841 18.6805 4.53841 19.0711 4.92893C19.4616 5.31946 19.4616 5.95262 19.0711 6.34315L16.9497 8.46447C16.5592 8.85499 15.9261 8.85499 15.5355 8.46447Z"></path></svg>

+ 81 - 15
src/views/manager/projectinfo/tree.vue

@@ -2013,6 +2013,33 @@
       </span>
     </el-dialog>
     <!-- 同步队列 -->
+    <el-dialog
+      title="同步队列"
+      :visible.sync="syncListDialog"
+      width="30%"
+      append-to-body
+      :close-on-click-modal="false"
+    >
+    <div class="content-box">
+      <el-image
+      style="width: 100px; height: 100px"
+     :src="require('@/assets/loader.svg')"
+      fit="contain"></el-image>
+      <div class="mt-14">同步中</div>
+      <div  class="mt-14">
+        同步数量*** 剩余数量***
+      </div>
+     <div  class="mt-14">
+      <el-button type="primary" @click="syncListDialog=false">好的,我已知晓</el-button>
+      </div>
+      <div  class="mt-14">
+      <el-link type="primary">刷新数据</el-link>
+     </div>
+    </div>
+      
+   
+     
+    </el-dialog>
      <!-- 同步表单其他配置 -->
      <el-dialog
       title="同步表单其他配置"
@@ -2151,9 +2178,10 @@ import {
 } from "@/api/exctab/excelmodel";
 import { getStore, setStore } from "@/util/store";
 
-import { getTempProject,addSync } from "@/api/manager/ledger";
+import { getTempProject,addSync,getNodeStatus } from "@/api/manager/ledger";
 import { selectByNodeTable   as findNodeTableByCondition1 } from "@/api/manager/wbstree";
 
+
 export default {
   data() {
     var checkMajorDataType = (rule, value, callback) => {
@@ -2521,7 +2549,9 @@ export default {
       preTableData1:[],
       formIds:'',
       saveTableSyncLoad:false,
-      checkRow:null
+      checkRow:null,
+      syncListDialog:false,
+      
     };
   },
   computed: {
@@ -4168,8 +4198,12 @@ export default {
       }
     },
 
-    syncNodeTableHandle(data) {
+  async  syncNodeTableHandle(data) {
      console.log('后管数据同步',data);
+     await  this.getNodeStatusData()
+      if(this.syncListDialog){
+        return
+      }
      this.syncForm.range='1'
    
    
@@ -4217,6 +4251,10 @@ export default {
     //同步元素表单排序到合同段
    async syncSortHandle(data) {
       console.log('同步到合同');
+      await  this.getNodeStatusData()
+      if(this.syncListDialog){
+        return
+      }
        this.syncForm.range='2'
        
        this.proSyncTag=true
@@ -4771,8 +4809,9 @@ export default {
       });
       
     },
-    proSyncbtn(){
+   async proSyncbtn(){
       console.log('项目数据同步');
+    
       this.getTypeOptions()
       this.getRangeOptions()
       this.getCheckIdList()
@@ -4875,7 +4914,7 @@ export default {
         this.proSyncTag=false
      
     },
-    saveProTag(){
+   async saveProTag(){
 
       this.syncForm.projectId=this.projectid
       if(this.isShowLeft){
@@ -4884,7 +4923,11 @@ export default {
       }else{
         this.syncForm.nodeId=this.curTreeData.primaryKeyId
       }
-      
+      await  this.getNodeStatusData()
+        if(this.syncListDialog){
+          return
+      }
+
      
       if(this.syncForm.rangeName==''){
         for (let index = 0; index < this.rangeOptions.length; index++) {
@@ -4935,7 +4978,11 @@ export default {
         this.syncForm.formIds=arr.join(',')
       }
     },
-    handleCommand(command,row){
+  async  handleCommand(command,row){
+  await  this.getNodeStatusData()
+  if(this.syncListDialog){
+    return
+  }
       // this.$message('click on item ' + command);
       console.log(row,'row');
       console.log(command,'command');
@@ -4966,7 +5013,7 @@ export default {
                     
           });
       }else if(command==='b'){
-        console.log(111111111111111);
+     
         
         this.syncTableDialog=true
         if(this.$refs.proTable1){
@@ -5023,6 +5070,21 @@ export default {
         // this.syncForm.formIds=arr.join(',')
       }
     },
+    refreshData(){
+      console.log('刷新数据');
+      
+    },
+    getNodeStatusData(){
+      getNodeStatus({ id:this.curTreeData.primaryKeyId}).then((res) => {
+        if(res.data.code==200){
+                    if(res.data===true)
+                      this.syncListDialog=true
+                    }else{
+                      this.syncListDialog=false
+                      this.$message.error(res.data.msg)
+                    }
+        });
+    }
   },
   watch: {
     "GLExcelFrom.search"(val) {
@@ -5218,11 +5280,8 @@ export default {
   }
 .sync-container{
   display: flex;
-  height: 650px;
-
- 
+  height: 570px;
   .box-card-1{
-
    margin-right: 10px;
    height: 100%;
    overflow-y: auto;
@@ -5231,14 +5290,11 @@ export default {
   flex: 1;
     height: 100%;
     overflow-y: auto;
-
     .el-form-item {
         border: 1px solid #dcdfe6;
         padding: 0 10px 10px 10px;
-   
         border-radius: 4px;
         font-weight: bold;
-        
          .el-form-item__label {
           font-weight: bold;
           padding-bottom: 0px;  
@@ -5250,6 +5306,16 @@ export default {
     
   }
 }
+.content-box{
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  font-weight: bolder;
+  .mt-14{
+    margin-top: 14px;
+  }
+}
 </style>
 
 <style lang="scss">