ludc
2023-09-13 4a2835ddadb796c69f180097b95f971dbab4687d
Source/UBCS-WEB/src/components/file/main.vue
@@ -12,6 +12,7 @@
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
      @row-click="selectedRowClick"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
@@ -63,7 +64,6 @@
<script>
import {getList, getFile,upload,update, remove,download} from "@/api/resource/file";
import {mapGetters} from "vuex";
import {dateFormat} from "@/util/date";
import {validatenull} from "@/util/validate";
import func from "@/util/func";
@@ -88,7 +88,7 @@
      hasDel:validatenull(this.options.hasDel) ? true :this.options.hasDel,
      hasDownload:validatenull(this.options.hasDownload) ? true :this.options.hasDownload,
      option: {
        height:(this.options.tableHeight?this.options.tableHeight:'200'),
        height:(this.options.tableHeight?this.options.tableHeight:'400'),
        calcHeight: 30,
        tip: false,
        searchShow: false,
@@ -458,6 +458,13 @@
    },
    selectionChange(list) {
      this.selectionList = list;
      this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]);
    },
    selectedRowClick(row){
      this.selectionList = row;
      this.$refs.crud.toggleSelection();
      this.$refs.crud.setCurrentRow(row);
      this.$refs.crud.toggleRowSelection(row); //选中当前行
    },
    selectionClear() {
      this.selectionList = [];