管道基础大数据平台系统开发-【前端】-新系統界面
src/views/Archive/index.vue
@@ -123,6 +123,19 @@
              class="el-input__icon el-icon-search"
            ></i></el-input>
        </el-form-item>
        <!-- 批量下載 -->
        <el-form-item
          style="float:right"
          v-if="formInline.dataType =='type2'"
        >
          <el-button
            type="success"
            size="small"
            icon="el-icon-download"
            @click="setCardDownload"
          >{{$t('common.download')}}</el-button>
        </el-form-item>
        <!-- 空间查询 -->
        <el-form-item style="float:right">
          <el-button
@@ -162,6 +175,12 @@
            >
              <span v-show="formInline.dataType =='type2'">
                <el-checkbox
                  v-model="item.ischecked"
                  @change="handleCheckedDataTypeChange(item)"
                  style="margin-right:10px"
                >
                </el-checkbox>
                <span v-if="item.ismeta > 0">
                  <el-link
                    style="color: #409eff"
@@ -187,18 +206,18 @@
                  @click="setAttatchFileView(index, item)"
                ></i>
                <i
                style="margin-left:10px"
                  style="margin-left:10px"
                  class="el-icon-tickets"
                  :title="$t('common.details')"
                  @click="setCardDetails(item)"
                ></i>
                <i
                <!-- <i
                  v-show="formInline.dataType=='type2'"
                  style="margin-left:10px"
                  class="el-icon-download"
                  :title="$t('common.download')"
                  @click="setCardDownload(item)"
                ></i>
                ></i> -->
                <i
                  v-show="!item.isShow"
                  style="margin-left:10px"
@@ -239,6 +258,7 @@
            </div>
          </el-card>
        </div>
      </div>
      <div class="archBottomBox">
        <div style="margin-top:10px">
@@ -1077,7 +1097,7 @@
  dataLib_selectFiles,
  dataLib_deletes
} from '../../api/api';
import {dataLibView } from '@/api/screen.js'
import { dataLibView } from '@/api/screen.js'
export default {
  components: {
    MyBread, MapSdk
@@ -1206,7 +1226,8 @@
        isPdf: false,
        isJpg: false,
        src: ''
      }
      },
      checkedDataType: [],
    };
  },
@@ -1217,6 +1238,23 @@
    this.signGetPublicKey();
  },
  methods: {
    //批量下载复选框chagne
    handleCheckedDataTypeChange(res) {
      var std = 0;
      for (var i = 0; i < this.multipleSelection1.length; i++) {
        if (res.guid == this.multipleSelection1[i].guid) {
          std = i;
        }
      }
      if (std == 0) {
        this.multipleSelection1.push(res);
      } else {
        this.multipleSelection1.splice(std, 1)
      }
      console.log(this.multipleSelection1)
    },
    matchState(state = "", reg) {
      var row = state.row;
      var name = row.name;
@@ -1271,14 +1309,14 @@
      if (name.indexOf('.pdf') != -1) {
        this.dialog.dialogVisible = true;
        this.dialog.isPdf = true;
        var url = BASE_URL + "/res/downloadForView?guid=" + row.guid + "&token=" + getToken();
        var url = BASE_URL + "/comprehensive/downloadForView?guid=" + row.guid + "&token=" + getToken();
        this.dialog.src = url
      } else if (name.indexOf('.jpg') != -1 || name.indexOf('.gif') != -1 || name.indexOf('.png') != -1 || name.indexOf('.jpeg') != -1) {
        this.dialog.dialogVisible = true;
        this.dialog.isJpg = true;
        var url = BASE_URL + "/res/downloadForView?guid=" + row.guid + "&token=" + getToken();
        var url = BASE_URL + "/comprehensive/downloadForView?guid=" + row.guid + "&token=" + getToken();
        this.dialog.src = url
      }
      }
    },
    setAttatchFileView(index, row) {
@@ -1663,6 +1701,11 @@
      $("#downFrame").attr("src", url).click();
      this.closeDown();
      this.monthdata.filter((res) => {
        return res.ischecked = false;
      })
      this.multipleSelection1 = [];
    },
    closeDown() {
      this.passWorldVisible = false;
@@ -1671,8 +1714,8 @@
    },
    //文件下载
    setCardDownload(res) {
      this.multipleSelection1 = [];
      this.multipleSelection1.push(res);
      // this.multipleSelection1 = [];
      // this.multipleSelection1.push(res);
      if (this.multipleSelection1.length == 0) {
        this.$message({
          message: '请先选择要下载的文件',
@@ -2041,13 +2084,15 @@
        val = val.filter((res) => {
          var type = "." + res.type;
          res.name = res.name.replaceAll(type, "")
          res.mold = "文件"
          res.isShow = false
          res.mold = "文件";
          res.isShow = false;
          res.ischecked = false;
          return res;
        })
        this.monthdata = val;
        this.listData.count = data.count;
      } else {
        this.monthdata = [];
        this.listData.count = 0;