管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2022-12-14 ea52386a7c7b3ef91784280e3033f190ac39caee
src/views/datamanage/metadataManage.vue
@@ -330,7 +330,7 @@
            border
          style="width: 100%"
          >
            <el-table-column width="60" type="index" :label="$t('common.index')" />
            <el-table-column width="60"  align="center" type="index" :label="$t('common.index')" />
            <el-table-column
              v-for="(item, index) in attributeData"
              :key="index"
@@ -338,6 +338,7 @@
              :prop="item.field"
              show-overflow-tooltip
              align="center"
            ></el-table-column>
          </el-table>
            <div style="margin-top: 10px" class="pagination_box">
@@ -463,7 +464,7 @@
        ],
      },
      tableData: [],
      dbTableData:[],
      dbTableData: [],
      count: 0,
      currentPage: 1,
      pageSize: 10,
@@ -489,14 +490,14 @@
        checkStrictly: true,
        emitPath: false,
      },
      dialogVisible:false,
        listLoader:{
        id:null,
        pageSize:1,
        pageSize:10,
      dialogVisible: false,
      listLoader: {
        id: null,
        pageSize: 1,
        pageSize: 10,
      },
      count1:0,
            attributeData:[],
      count1: 0,
      attributeData: [],
    };
  },
  created() {
@@ -508,53 +509,72 @@
  },
  methods: {
    async detail(res){
    async detail(res) {
      var val = res.tab.split(".");
      const data = await meta_selectFields({
        ns:val[0],
        tab:val[1]
        ns: val[0],
        tab: val[1]
      })
      if(data.code != 200){
          this.$message.error('字段列表调用失败');
      if (data.code != 200) {
        this.$message.error('字段列表调用失败');
        return
      }
      this.dialogVisible = true;
      this.attributeData =data.result;
      this.listLoader={
      id:res.id,
        pageIndex:1,
        pageSize:10,
      this.attributeData = data.result;
      this.listLoader = {
        id: res.id,
        pageIndex: 1,
        pageSize: 10,
      }
     this.getDataLoaderSelectDbData();
      this.getDataLoaderSelectDbData();
    },
      async getDataLoaderSelectDbData (){
       const data1 = await meta_selectByPageForUpload(this.listLoader);
     if(data1.code != 200){
          this.$message.error('字段列表调用失败');
    async getDataLoaderSelectDbData() {
      const data1 = await meta_selectByPageForUpload(this.listLoader);
      if (data1.code != 200) {
        this.$message.error('字段列表调用失败');
        return
      }
 this.dbTableData =data1.result;
 this.count1 = data1.count;
    },
       handleLoaderSizeChange(val){
      this.listLoader.pageIndex= 1;
      this.listLoader.pageSize =val;
            this.getDataLoaderSelectDbData();
    },
handleLoaderCurrentChange(val){
  this.listLoader.pageIndex= val;
   this.getDataLoaderSelectDbData();
},
  async signGetPublicKey(){
      const res = await sign_getPublicKey();
       if (res && res.code == 200) {
          window.encrypt = new JSEncrypt();
          encrypt.setPublicKey(res.result);
      debugger
      var option = data1.result;
      for (var i in option) {
        option[i].dirid = option[i].dirName;
        option[i].depid = option[i].depName;
        option[i].createuser = option[i].createName;
        option[i].updateuser = option[i].updateName;
        option[i].verid = option[i].verName;
        if (option[i].createtime != null) {
          option[i].createtime = this.setInfoBoxTime(option[i].createtime)
        }
        if (option[i].updatetime != null) {
          option[i].updatetime = this.setInfoBoxTime(option[i].updatetime)
        }
      }
      this.dbTableData = data1.result;
      this.count1 = data1.count;
    },
    handleLoaderSizeChange(val) {
      this.listLoader.pageIndex = 1;
      this.listLoader.pageSize = val;
      this.getDataLoaderSelectDbData();
    },
    handleLoaderCurrentChange(val) {
      this.listLoader.pageIndex = val;
      this.getDataLoaderSelectDbData();
    },
    async signGetPublicKey() {
      const res = await sign_getPublicKey();
      if (res && res.code == 200) {
        window.encrypt = new JSEncrypt();
        encrypt.setPublicKey(res.result);
      }
    },
    //单位列表获取
    async getQueryDepTree() {
@@ -863,25 +883,25 @@
        pwd: encrypt.encrypt(this.codeForm.repassword),
        ids: std
      };
        const res = await meta_downloadReq(JSON.stringify(obj))
      const res = await meta_downloadReq(JSON.stringify(obj))
       if(res.code!=200){
      if (res.code != 200) {
        this.$message.error('下载请求失败');
        return
       }
      }
       var downObj={
        guid :res.result,
        pwd :encodeURIComponent(encrypt.encrypt(this.codeForm.repassword))
       }
      var downObj = {
        guid: res.result,
        pwd: encodeURIComponent(encrypt.encrypt(this.codeForm.repassword))
      }
      const data = await meta_selectDownloadFile(downObj)
      if(data.code !=200){
      if (data.code != 200) {
        this.$message.error('下载请求失败');
        return
       }
       var token = getToken()
       var url = BASE_URL+"/meta/downloadFile?token=" +token+ "&guid=" + res.result + "&pwd=" +encodeURIComponent(encrypt.encrypt(this.codeForm.repassword));
      }
      var token = getToken()
      var url = BASE_URL + "/meta/downloadFile?token=" + token + "&guid=" + res.result + "&pwd=" + encodeURIComponent(encrypt.encrypt(this.codeForm.repassword));
      $("#downFrame").attr("src", url).click();
      this.closeDown();