田源
2024-10-25 f809d63fdef03f2224a1832b508f8fa00a0b0255
Source/plt-web/plt-web-ui/src/views/system/fileCab/index.vue
@@ -11,6 +11,7 @@
      @row-save="rowSaveHandler"
      @row-update="rowUpdateHandler"
      @row-del="rowDeleteHandler"
      @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 +110,16 @@
      leftRoleData: [],  // 分配成员穿梭框左侧初始数据
      rightRoleData: [], // 分配成员穿梭框右侧初始数据
      transferTitle: ['文件柜外成员', '文件柜内成员'],
      selectionList: [],
    }
  },
  computed: {
    ids() {
      let ids = [];
      this.selectionList.forEach(ele => {
        ids.push(ele.id);
      });
      return ids.join(",");
    }
  },
  methods: {
@@ -173,8 +184,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 +232,10 @@
        this.getTableList();
      })
    },
    //选择的行
    selectionChange(list) {
      this.selectionList = list;
    },
  }
}
</script>