GuLiMmo
2023-12-21 7cbeb9c7dc150e45d88f39ec8147ef5fa819621f
src/views/evaluate/evaluateResult.vue
@@ -6,20 +6,13 @@
      @row-save="rowSave" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
      @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
      @refresh-change="refreshChange" @on-load="onLoad">
      <template #menu-left>
        <el-button type="danger" icon="el-icon-delete" plain v-if="permission.evaluateResult_delete"
          @click="handleDelete">删 除
        </el-button>
        <el-button type="warning" plain icon="el-icon-download" @click="handleExport">导 出
        </el-button>
      </template>
    </avue-crud>
  </basic-container>
</template>
<script>
import { getList, getDetail, add, update, remove } from "@/api/evaluate/evaluateResult";
import option from "@/option/evaluate/evaluateResult";
import { option, personColumn, sectionColumn } from "@/option/evaluate/evaluateResult";
import { mapGetters } from "vuex";
import { exportBlob } from "@/api/common";
import { getToken } from '@/utils/auth';
@@ -48,11 +41,11 @@
      taskTypeList: {
        column: [
          {
            label: '个人评优',
            label: '个人评优结果',
            prop: 0,
          },
          {
            label: '部门评优',
            label: '部门评优结果',
            prop: 1,
          },
        ],
@@ -76,6 +69,26 @@
      });
      return ids.join(",");
    }
  },
  watch: {
    defaultTaskType: {
      handler(n) {
        this.query = {};
        this.query['type'] = n;
        let params = {
          type: n,
        };
        console.log(option.column.length);
        if (n) {
          this.option.column = sectionColumn
        } else {
          this.option.column = personColumn
        }
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
      },
      immediate: true,
    },
  },
  methods: {
    rowSave(row, done, loading) {
@@ -202,10 +215,12 @@
      } = this.query;
      let values = {
        ...this.query,
        ...this.params
      };
      getList(page.currentPage, page.pageSize, values).then(res => {
        console.log(res);
        console.log(res.data.data.records);
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;