wangting
2024-11-26 2ad2a3cdd0df63b6557789ba8a9d968984fe5da3
Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue
@@ -2,7 +2,7 @@
  <!--文仓管理页面-->
  <basic-container>
    <avue-crud
      ref="logCrud"
      ref="crud"
      v-model="form"
      :data="tableData"
      :option="option"
@@ -11,6 +11,8 @@
      @row-save="rowSaveHandler"
      @row-update="rowUpdateHandler"
      @row-del="rowDeleteHandler"
      @row-click="rowClickHandler"
      @selection-change="selectionChange"
    >
      <template slot="menuLeft" slot-scope="scope">
        <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">导出</el-button>
@@ -109,6 +111,16 @@
      leftRoleData: [],  // 分配成员穿梭框左侧初始数据
      rightRoleData: [], // 分配成员穿梭框右侧初始数据
      transferTitle: ['文件柜外成员', '文件柜内成员'],
      selectionList: [],
    }
  },
  computed: {
    ids() {
      let ids = [];
      this.selectionList.forEach(ele => {
        ids.push(ele.id);
      });
      return ids.join(",");
    }
  },
  methods: {
@@ -173,8 +185,15 @@
    },
    // 导出
    exportClickHandler() {
      if(this.ids == null || this.ids == ""){
        this.$message({
          type: 'warning',
          message: '请勾选要导出的数据!'
        });
        return;
      }
      const loading = this.$loading({});
      exportPvolumes().then(res => {
      exportPvolumes({"pvolumeIds": this.ids}).then(res => {
        func.downloadFileByBlobHandler(res);
        this.createdLoading = false
        this.$message.success('导出成功');
@@ -214,6 +233,21 @@
        this.getTableList();
      })
    },
    //选择的行
    selectionChange(list) {
      this.selectionList = list;
    },
    // 行单选
    rowClickHandler(row) {
      func.rowClickHandler(
        row,
        this.$refs.crud,
        this.lastIndex,
        (newIndex) => { this.lastIndex = newIndex; },
        () => { this.selectionList = []; }
      );
    },
  }
}
</script>