管道基础大数据平台系统开发-【前端】-新系統界面
TreeWish
2023-03-03 b6c8e7c61f0270598ba7fdbc44f79512e010d0fe
src/views/Archive/index.vue
@@ -54,7 +54,7 @@
          >
            <el-option
              v-for="item in categoryOptions"
              :key="item.value"
              :key="item.key"
              :label="item.value"
              :value="item.key"
            >
@@ -181,6 +181,13 @@
              <span v-show="formInline.dataType !='type2'">{{item.tabDesc}}</span>
              <div style="float: right; padding: 3px 0">
                <i
                  v-show="!showView(item.type) && formInline.dataType=='type2'"
                  class="el-icon-view"
                  :title="$t('common.preview')"
                  @click="setAttatchFileView(index, item)"
                ></i>
                <i
                style="margin-left:10px"
                  class="el-icon-tickets"
                  :title="$t('common.details')"
                  @click="setCardDetails(item)"
@@ -551,6 +558,7 @@
            >
              <template slot-scope="scope">
                <el-link
                  v-if="matchState(scope, /[]/)"
                  @click="setAttatchDetail(scope.$index, scope.row)"
                  class="elLink"
                >{{ $t('common.see') }}</el-link>
@@ -1069,6 +1077,7 @@
  dataLib_selectFiles,
  dataLib_deletes
} from '../../api/api';
import {dataLibView } from '@/api/screen.js'
export default {
  components: {
    MyBread, MapSdk
@@ -1200,6 +1209,7 @@
      }
    };
  },
  mounted() {
    this.getDepTreeData();
    this.getCategorySelectData();
@@ -1207,6 +1217,15 @@
    this.signGetPublicKey();
  },
  methods: {
    matchState(state = "", reg) {
      var row = state.row;
      var name = row.name;
      if (name.indexOf('.pdf') != -1 || name.indexOf('.jpg') != -1 || name.indexOf('.gif') != -1 || name.indexOf('.png') != -1 || name.indexOf('.jpeg') != -1) {
        return true;
      }
      return false;
    },
    // 附件=>表格选择
    handleAttatchChange(val) {
      this.attacgSelection = val;
@@ -1247,7 +1266,6 @@
    },
    //附件查看
    setAttatchDetail(index, row) {
      this.refreshAttatchDetail()
      var name = row.name;
      if (name.indexOf('.pdf') != -1) {
@@ -1260,7 +1278,25 @@
        this.dialog.isJpg = true;
        var url = BASE_URL + "/res/downloadForView?guid=" + row.guid + "&token=" + getToken();
        this.dialog.src = url
      }
    },
    setAttatchFileView(index, row) {
      this.refreshAttatchDetail()
      var name = `${row.name}.${row.type}`;
      if (name.indexOf('.pdf') != -1) {
        this.dialog.isPdf = true;
      } else if (name.indexOf('.jpg') != -1 || name.indexOf('.gif') != -1 || name.indexOf('.png') != -1 || name.indexOf('.jpeg') != -1) {
        this.dialog.isJpg = true;
      }
      this.dialog.dialogVisible = true;
      this.dialog.isPdf = true;
      var url = BASE_URL + "/dataLib/downloadForView?guid=" + row.guid + "&token=" + getToken();
      this.dialog.src = url;
    },
    showView(name) {
      if (!name) return false
      return name.indexOf('pdf') || name.indexOf('jpg') != -1 || name.indexOf('gif') != -1 || name.indexOf('png') != -1 || name.indexOf('jpeg') != -1
    },
    //附件刪除
    async setAttachDel() {
@@ -1967,14 +2003,19 @@
        return;
      }
      var val = data.result;
      val = val.filter((res) => {
      if (val) {
        val = val.filter((res) => {
          res.mold = "数据库"
          res.isShow = false
          return res;
        })
        this.listData.count = data.count;
        this.monthdata = data.result;
      } else {
        this.listData.count = 0;
        this.monthdata = [];
      }
        res.mold = "数据库"
        res.isShow = false
        return res;
      })
      this.listData.count = data.count;
      this.monthdata = data.result;
    },
    //查询文件数据
    async getQueryFileData() {
@@ -1996,16 +2037,22 @@
        this.$message.error('文件数据列表调用失败');
      }
      var val = data.result;
      val = val.filter((res) => {
        var type = "." + res.type;
        res.name = res.name.replaceAll(type, "")
        res.mold = "文件"
        res.isShow = false
        return res;
      })
      if (val) {
        val = val.filter((res) => {
          var type = "." + res.type;
          res.name = res.name.replaceAll(type, "")
          res.mold = "文件"
          res.isShow = false
          return res;
        })
      this.monthdata = val;
      this.listData.count = data.count;
        this.monthdata = val;
        this.listData.count = data.count;
      } else {
        this.monthdata = [];
        this.listData.count = 0;
      }
    },
    //查询数据
    getAllTabesData() {
@@ -2035,6 +2082,7 @@
      if (data.code != 200) {
        this.$message.error('资料类别列表调用失败');
      }
      this.categoryOptions = data.result;
    },
    //关键字查询
@@ -2050,7 +2098,9 @@
    },
    //资料类别下拉框值改变触发
    categorySelectChange(model, prop, options) {
      this.getAllTabesData();
    },
    // 项目名称下拉框值改变触发
    itemSelectChange(model, prop, options) {