Sfoglia il codice sorgente

Merge branch 'master' of http://47.110.251.215:3000/web/saber

gangyj 2 anni fa
parent
commit
04b36cd551

+ 39 - 14
src/views/manager/projectinfo/independent.vue

@@ -29,12 +29,14 @@
                 <span style="text-overflow: ellipsis;"> {{ data.title }} </span>
               
               <!-- 调整排序 -->
+              <el-link :underline="false">
                 <i
                   class="el-icon-sort"
                   @click="sortpai(data, node)"
                   v-if="node.level == 2"
                   title="调整排序"
                 ></i>
+              </el-link>
               </div>
             </span>
           </el-tree>
@@ -58,8 +60,11 @@
               ref="crud"
               @selection-change="selectionChange"
               :page.sync="page"
-               :table-loading="tabloading"
-               @on-load="onLoad"
+              :table-loading="tabloading"
+              @on-load="onLoad"
+              @current-change="currentChange"
+              @size-change="sizeChange"
+              @refresh-change="refreshChange"
             >
             
          
@@ -468,13 +473,24 @@ export default {
         }))
       })
     },
-     searchChange(){
+    searchChange(){
          if(this.treeId){
             this.onLoad2()
           }else{
              this.$message.warning("请先选择左侧节点");  
           }
     },
+    currentChange (currentPage) {
+        this.page.current = currentPage;
+        
+    },
+    sizeChange (pageSize) {
+        this.page.size = pageSize;
+    },
+    refreshChange () {
+      this.searchChange();
+     
+    },
     clearinput(){
       this.searchChange()
     },
@@ -499,9 +515,14 @@ export default {
               this.tabloading=false
               
             }, 1000);
-        }else{
+        }else{   
+          this.tabloading=true;
            this.loadData=[]
-            this.page.total=0
+           this.page.total=0;
+            setTimeout(() => {
+              this.tabloading=false
+              
+            }, 1000);
         }
      
     },
@@ -515,7 +536,7 @@ export default {
         })
       }else{
         
-          this.tabTypeLazyTree(this.curTreeData.parentId, this.projectid, this.page.current,this.page.size,this.input3).then((res)=>{
+          this.tabTypeLazyTree(this.curTreeData.parentId, this.projectid, this.page.current,1000,this.input3).then((res)=>{
            let faArr=res.records;
            this.loadData=faArr.filter((item)=>{
              if(item.id===this.treeId){
@@ -544,15 +565,19 @@ export default {
         console.log(data,node,'treedata');
         this.curNode=node
         this.treeId=data.id
-        this.curTreeData=data
+        this.curTreeData=data;
+        this.page.current=1;
+        this.page.currentPage=1
+        console.log(this.page,'this.page111111');
         if(data.hasChildren){
-          this.tabloading=true;
-           this.tabTypeLazyTree(data.id, this.projectid,this.page.current,this.page.size).then((res)=>{
-          console.log(res.records);
-          this.loadData=res.records;
-           this.page.total=res.total;
-           this.tabloading=false;
-          })
+          this.onLoad(this.page)
+          // this.tabloading=true;
+          //  this.tabTypeLazyTree(data.id, this.projectid,this.page.current,this.page.size).then((res)=>{
+          // console.log(res.records);
+          // this.loadData=res.records;
+          //  this.page.total=res.total;
+          //  this.tabloading=false;
+          // })
         }
         if(data.hasChildren===false&&node.level==2){
           this.tabloading=true;

+ 6 - 1
src/views/manager/projectinfo/qutediaolog/qute1.vue

@@ -237,8 +237,13 @@ export default {
               
             }, 1000);
         }else{
+           this.loading=true
            this.loadData=[]
-            this.page.total=0
+           this.page.total=0
+           setTimeout(() => {
+              this.loading=false
+              
+            }, 1000);
         }
       }else{
          this.$message.warning("请先选择左侧节点");  

+ 1 - 1
src/views/manager/projectinfo/qutediaolog/relation.vue

@@ -7,7 +7,7 @@
         destroy-on-close
 
         @close="GLExcelMD"
-          width="70%"
+          width="800px"
         >
         <div>
             <el-select

+ 27 - 20
src/views/manager/wbsinfo/element.vue

@@ -28,12 +28,14 @@
               <!-- 添加 -->
               <span>
                <!-- 调整排序 -->
-                <i
-                  class="el-icon-sort"
-                  @click="sortpai(data, node)"
-                  v-if="node.level == 2"
-                  title="调整排序"
-                ></i>
+                 <el-link :underline="false">
+                            <i
+                              class="el-icon-sort"
+                              @click="sortpai(data, node)"
+                              v-if="node.level == 2"
+                              title="调整排序"
+                            ></i>
+                  </el-link>
               </span>
             </div>
           </span>
@@ -78,6 +80,9 @@
                   @on-load="onLoad"
                   @selection-change="selectionChange"
                   :table-loading="tabloading"
+                   @current-change="currentChange"
+                   @size-change="sizeChange"
+                   @refresh-change="refreshChange"
                   >
 
                   <template slot="menuRight">
@@ -832,10 +837,13 @@ export default {
       //console.log(cellValue)
     },
       currentChange (currentPage) {
-        this.page.currentPage = currentPage;
+       console.log('currentPage');
+          this.page.current = currentPage;
+        
+        
       },
       sizeChange (pageSize) {
-        this.page.pageSize = pageSize;
+        this.page.size = pageSize;
       },
       selectionChange (list) {
       this.selectionList = list;
@@ -858,14 +866,10 @@ export default {
           this.curNode=node
           this.curTreeData=data
           this.treeId=data.id
-
+          this.page.current=1;
+          this.page.currentPage=1
           if(data.hasChildren){
-            this.tabloading=true;
-                this.tabTypeLazyTreeAll(data.id, this.page.current,this.page.size).then((res)=>{
-                this.loadData=res.records
-                this.page.total=res.total
-                this.tabloading=false;
-              })
+              this.onLoad(this.page)
           }
         if(data.hasChildren===false&&node.level==2){
            this.tabloading=true;
@@ -887,15 +891,16 @@ export default {
 
 
     refreshChange () {
-      this.getList();
-      this.$message.success('刷新成功')
+      this.searchChange();
+     
     },
-     onLoad(page){
-      console.log(this.curNode,'curNode');
+     onLoad(page, params = {}){
       if(this.treeId){
+        this.tabloading=true;
          this.tabTypeLazyTreeAll(this.treeId, page.currentPage,page.pageSize).then((res)=>{
           this.loadData=res.records
            this.page.total=res.total
+           this.tabloading=false
         })
       }
     },
@@ -910,7 +915,7 @@ export default {
         })
       }else{
         
-          this.tabTypeLazyTreeAll(this.curNode.data.parentId,this.page.current,this.page.size,this.input3).then((res)=>{
+          this.tabTypeLazyTreeAll(this.curNode.data.parentId,this.page.current,1000,this.input3).then((res)=>{
            let faArr=res.records;
            this.loadData=faArr.filter((item)=>{
              if(item.id===this.treeId){
@@ -944,6 +949,7 @@ export default {
               
             }, 1000);
         }else{
+           this.tabloading=true;
            this.loadData=[]
             this.page.total=0
             setTimeout(() => {
@@ -1470,4 +1476,5 @@ export default {
   background-color: #9dc5ee;
   color: white;
 }
+
 </style>

+ 6 - 2
src/views/tentative/importDialog.vue

@@ -65,6 +65,8 @@ export default {
   props:{
     importDialogType:Number,
     temonLoad:Function,
+    tempage:Object,
+    parmpage:Object,
     paramLoad:Function
   },
     data(){
@@ -144,7 +146,8 @@ export default {
                   })
                   loading.close();
                    this.importFormVisible=false;
-                   this.temonLoad();
+                  //  this.temonLoad();
+                  this.$emit('paramLoad',this.parmpage)
               }).catch(() => {
                   loading.close();
               });
@@ -156,7 +159,8 @@ export default {
                     })
                     loading.close();
                     this.importFormVisible=false;
-                     this.paramLoad();
+                    //  this.paramLoad();
+                       this.$emit('temonLoad',this.tempage)
                 }).catch(() => {
                       loading.close();
                   })

+ 16 - 6
src/views/tentative/parameter.vue

@@ -4,9 +4,11 @@
             <el-tabs v-model="activeName" @tab-click="handleClick">
                 <el-tab-pane label="压实度评标参数" name="first">
                     <avue-crud 
-                     :table-loading="loading"
+                    :before-open="beforeOpen"
+                    :table-loading="loading"
                     :data="tableData" 
                     :option="option" 
+                    v-model="form"
                     @row-save="rowSave"  
                     @row-update="rowUpdate"  
                     @selection-change="selectionChange"
@@ -42,7 +44,7 @@
             </el-tabs>
       </div>
  <!-- 导入参数弹窗 -->
-  <importDialog ref="importDialog" @paramLoad="onLoad"  :importDialogType="importDialogType"/>
+  <importDialog ref="importDialog" @paramLoad="onLoad"  :importDialogType="importDialogType" :parmpage="page" />
   </basic-container>
   
 </template>
@@ -50,7 +52,7 @@
 <script>
 import importDialog from './importDialog.vue';
 import temperature from './temperature.vue';
-import {getList,add, update, remove} from "@/api/tentative/testpram";
+import {getList,add, update, remove,getDetail} from "@/api/tentative/testpram";
 export default {
   components:{
     importDialog,
@@ -68,7 +70,7 @@ export default {
         tableData: [],
         selectionList:[],
         query:{},
-
+        form:{},
         option:{
           height: 'auto',
           calcHeight: 30,
@@ -153,8 +155,8 @@ export default {
         loading();
         window.console.log(error);
       });
-      },
-     rowUpdate(row, index, done, loading) {
+    },
+    rowUpdate(row, index, done, loading) {
       update(row).then(() => {
         this.onLoad(this.page);
         this.$message({
@@ -167,6 +169,14 @@ export default {
         console.log(error);
       });
     },
+    beforeOpen(done, type) {
+      if (["edit", "view"].includes(type)) {
+        getDetail(this.form.id).then(res => {
+          this.form = res.data.data;
+        });
+      }
+      done();
+    },
 
       handleDelete () {
       if (this.selectionList.length === 0) {

+ 13 - 3
src/views/tentative/temperature.vue

@@ -4,7 +4,9 @@
          <avue-crud 
             :table-loading="loading"
             :data="tableData" 
-            :option="option" 
+            :option="option"
+            v-model="form" 
+            :before-open="beforeOpen"
             @row-save="rowSave"  
             @row-update="addUpdate"  
             @selection-change="selectionChange"
@@ -34,7 +36,7 @@
             </template>
         </avue-crud>
            <!-- 导入参数弹窗 -->
-        <importDialog ref="importDialog" :importDialogType="importDialogType" @temonLoad="onLoad"/>
+        <importDialog ref="importDialog" :importDialogType="importDialogType" @temonLoad="onLoad" :tempage="page"/>
     </div>
 
  
@@ -42,7 +44,7 @@
 
 <script>
 import importDialog from './importDialog.vue';
-import {getList,add, update, remove} from "@/api/tentative/testtempreature";
+import {getList,add, update, remove,getDetail} from "@/api/tentative/testtempreature";
 export default {
   components:{
     importDialog,
@@ -122,6 +124,14 @@ export default {
         this.loading = false;
         this.selectionClear();
       });
+    },
+     beforeOpen(done, type) {
+      if (["edit", "view"].includes(type)) {
+        getDetail(this.form.id).then(res => {
+          this.form = res.data.data;
+        });
+      }
+      done();
     },
       refreshChange() {
         this.onLoad(this.page, this.query);