riku
2024-09-27 1abb6a9ca01cc76f271542a063d1b19839448019
src/views/fysp/evaluation/EvalutationRecord.vue
@@ -1,5 +1,12 @@
<template>
  <FYTable @search="onSearch" :pagination="false" ref="tableRef">
  <FYTable
    @search="onSearch"
    :pagination="false"
    ref="tableRef"
    @cell-click="cellClick"
    :cell-class-name="cellClassName"
    @table-paste="handlePaste"
  >
    <template #options>
      <!-- 区县 -->
      <FYOptionLocation
@@ -70,6 +77,16 @@
      <el-table-column prop="evaluation.scenseaddress" label="地址" />
      <!-- <el-table-column prop="biArea" label="集中区" width="110" />
      <el-table-column prop="biManagementCompany" label="物业" min-width="110"/> -->
      <el-table-column fixed="right" align="right" label="监测数据超标" width="160">
        <template #default="{ row }">
          <el-input v-model="row.score1" />
        </template>
      </el-table-column>
      <el-table-column fixed="right" align="right" label="监测数据超区月均值" width="160">
        <template #default="{ row }">
          <el-input v-model="row.score2" />
        </template>
      </el-table-column>
      <el-table-column fixed="right" align="right" label="操作" width="160">
        <!-- <template #header>
          <el-button icon="Download" size="default" type="success" @click="exportExcel"
@@ -88,12 +105,19 @@
import dayjs from 'dayjs';
import evaluateApi from '@/api/fysp/evaluateApi';
import { envCreditCode } from '@/constants/index';
import CompQuickSet from './components/CompQuickSet.vue';
import CompReport from './components/CompReport.vue';
import { useTablePaste } from '@/composables/tablePaste';
export default {
  name: 'ResultManage',
  components: { CompQuickSet, CompReport },
  setup() {
    const { cellClick, cellClassName, handlePaste, setTableData, addRefreshEvent, tableData } =
      useTablePaste({
        score1: 8,
        score2: 9
      });
    return { cellClick, cellClassName, handlePaste, setTableData, addRefreshEvent, tableData };
  },
  components: { CompReport },
  data() {
    return {
      formSearch: {
@@ -130,11 +154,12 @@
    onSearch(page, func) {
      const area = this._getParam();
      evaluateApi.fetchAutoEvaluation(area).then((res) => {
        if (typeof func === 'function') {
          func({ data: res.data });
        }
        if (res.data) {
          this.tableData = res.data;
          this.getFilters(res.data);
          if (typeof func === 'function') {
            func({ data: this.tableData });
          }
        }
      });
    },
@@ -184,7 +209,10 @@
      const s1 = a.evaluation ? parseInt(a.evaluation.resultscorebef) : 0;
      const s2 = b.evaluation ? parseInt(b.evaluation.resultscorebef) : 0;
      return s1 - s2;
    }
    },
  },
  mounted() {
    this.addRefreshEvent(this.$refs.tableRef.doLayout);
  }
};
</script>