浏览代码

元数据管理回显

duy 2 年之前
父节点
当前提交
22703fb50b
共有 2 个文件被更改,包括 27 次插入5 次删除
  1. 二进制
      dist.zip
  2. 27 5
      src/views/tentative/metadata.vue

二进制
dist.zip


+ 27 - 5
src/views/tentative/metadata.vue

@@ -53,12 +53,13 @@
     >
     >
       <div > 
       <div > 
         <div style="float:right;margin-bottom:20px">
         <div style="float:right;margin-bottom:20px">
-          <el-select v-model="optionvalue" placeholder="请选择文件存储类型">
+          <el-select v-model="optionvalue" placeholder="请选择文件存储类型"  @change="changeType">
               <el-option
               <el-option
               v-for="item in options"
               v-for="item in options"
               :key="item.value"
               :key="item.value"
               :label="item.label"
               :label="item.label"
-              :value="item.value">
+              :value="item.value"
+              >
               </el-option>
               </el-option>
            </el-select>
            </el-select>
           <!-- <el-button type="primary" @click="allocationSave">保存</el-button> -->
           <!-- <el-button type="primary" @click="allocationSave">保存</el-button> -->
@@ -154,7 +155,7 @@ export default {
           label: '变更令'
           label: '变更令'
         }
         }
         ],
         ],
-     optionvalue: 0,
+     optionvalue: '',
       form: {},
       form: {},
       query: {
       query: {
         fileStorageType:'',
         fileStorageType:'',
@@ -498,17 +499,31 @@ export default {
     setAllocation(){
     setAllocation(){
       this.getAllocationList();
       this.getAllocationList();
       this.setMetadataTag=true;
       this.setMetadataTag=true;
-      this.optionvalue = this.query.fileStorageType;
+      // this.optionvalue = this.query.fileStorageType;
     },
     },
 
 
     getAllocationList(){
     getAllocationList(){
       getAllocationDetail(this.page2.current,this.page2.pageSize,{
       getAllocationDetail(this.page2.current,this.page2.pageSize,{
-        fileStorage:this.optionvalue
+        fileStorage:''
       }).then((res)=>{
       }).then((res)=>{
         //console.log(res)
         //console.log(res)
         const data = res.data.data;
         const data = res.data.data;
         this.MetadataformDatass = data.records;
         this.MetadataformDatass = data.records;
         this.page2.total = data.total;
         this.page2.total = data.total;
+        let checkarr=[]
+        if(this.optionvalue!==''){
+          checkarr=this.MetadataformDatass.filter((item)=>{
+            if(item.fileStorageType.indexOf(this.optionvalue)!==-1){
+              return item
+            }
+          })
+        }
+      
+        this.$nextTick(()=>{
+            checkarr.forEach((ele)=>{
+               this.$refs.dialogtable.toggleRowSelection(ele);
+            })
+        })
       })
       })
     },
     },
 
 
@@ -563,6 +578,7 @@ export default {
         this.queryChange();
         this.queryChange();
       })
       })
       this.setMetadataTag=false
       this.setMetadataTag=false
+      this.optionvalue=''
     },
     },
     //取消捕获
     //取消捕获
     cancel(row){
     cancel(row){
@@ -573,6 +589,12 @@ export default {
         this.handleCurrentChange(1);
         this.handleCurrentChange(1);
         this.queryChange();
         this.queryChange();
       })
       })
+    },
+    //回显选择
+    changeType(val){
+      this.page2.current = 1;
+      this.getAllocationList()
+ 
     }
     }
   }
   }
 };
 };