GuLiMmo
2023-12-23 d3cb9dc762b0bd5acbaa59d146afb2cb9f2017e4
src/views/evaluate/evaluateTask.vue
@@ -13,10 +13,11 @@
        <el-button type="warning" plain icon="el-icon-download" @click="handleExport">导出</el-button>
      </template>
      <template #menu="{ size, row, index }">
        <el-button type="primary" text plain icon="el-icon-view" @click="viewDateilDialog(row)">详情</el-button>
        <el-button type="primary" text plain icon="el-icon-edit" @click="editDialog(row)">编辑</el-button>
        <el-button type="primary" text plain icon="el-icon-position" @click="publicTimeBtn(row)"
          v-if="row.candidateState === 2">发布</el-button>
        <!-- <el-button type="primary" v-if="row.type === 0" text plain icon="el-icon-plus" @click="addCandidateHandle(row)">新增候选人</el-button> -->
        <el-button type="primary" v-if="row.type === 0 && row.candidateState === 2" text plain icon="el-icon-plus" @click="addCandidateHandle(row)">新增候选人</el-button>
        <el-button type="primary" text plain icon="el-icon-download">导出</el-button>
      </template>
    </avue-crud>
@@ -39,6 +40,8 @@
    <addDialog :params="addParams" @refreshTable="this.onLoad" />
    <!-- 新增候选人 -->
    <addCandidate :params="addCandidateParams" @refreshTable="this.onLoad" />
    <!-- 预览弹窗 -->
    <viewEvaluateDetail :params="viewEvaluateDetailParams" />
  </basic-container>
</template>
@@ -54,12 +57,14 @@
import 'nprogress/nprogress.css';
import addDialog from './components/addDialog.vue';
import addCandidate from './components/addCandidate.vue';
import viewEvaluateDetail from './components/viewEvaluateDetail.vue';
import { getDeptTree } from '@/api/system/dept';
export default {
  components: {
    addDialog,
    addCandidate
    addCandidate,
    viewEvaluateDetail
  },
  data() {
    return {
@@ -101,6 +106,8 @@
      },
      // 新增候选人params
      addCandidateParams: {},
      // 信息预览弹窗
      viewEvaluateDetailParams: {},
    };
  },
  watch: {
@@ -173,6 +180,12 @@
          ...row,
        },
      };
    },
    viewDateilDialog(row) {
      this.viewEvaluateDetailParams = {
        visible: true,
        data: row
      }
    },
    rowUpdate(row, index, done, loading) {
      update(row).then(
@@ -306,7 +319,6 @@
      };
      getList(page.currentPage, page.pageSize, values).then(res => {
        const data = res.data.data;
        console.log(data.records);
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;