From 06dd89e20c026ed578dcbc7618f83c7b3d8f6e15 Mon Sep 17 00:00:00 2001
From: GuLiMmo <2820890765@qq.com>
Date: Fri, 29 Dec 2023 15:23:29 +0800
Subject: [PATCH] 考核任务任务配置完善
---
src/views/evaluate/evaluateTask.vue | 112 ++++++++-----------------------------------------------
1 files changed, 17 insertions(+), 95 deletions(-)
diff --git a/src/views/evaluate/evaluateTask.vue b/src/views/evaluate/evaluateTask.vue
index 2de84f1..eefa465 100644
--- a/src/views/evaluate/evaluateTask.vue
+++ b/src/views/evaluate/evaluateTask.vue
@@ -13,37 +13,21 @@
<!-- <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-setting" @click="taskSettingDialog(row)">任务配置</el-button>
+ <!-- <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 && row.evaluateState === 0">发布</el-button>
- <el-button type="primary" v-if="row.type === 0 && row.candidateState === 2 && row.evaluateState === 0" text plain icon="el-icon-plus"
- @click="addCandidateHandle(row)">新增候选人</el-button>
<!-- <el-button type="primary" text plain icon="el-icon-download">导出</el-button> -->
<el-button type="danger" text plain icon="el-icon-delete" @click="rowDel(row)">删除</el-button>
</template>
</avue-crud>
- <!-- 发布弹窗 -->
- <el-dialog v-model="dialogVisible" title="发布" width="500px">
- <el-form :model="publicForm" :rules="publicRules" ref="publicFormRef">
- <el-form-item label="评优评先截止时间:" prop="publicData">
- <el-date-picker v-model="publicForm.publicData" type="datetime" placeholder="请选择截止时间"
- value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%;" />
- </el-form-item>
- </el-form>
- <template #footer>
- <span class="dialog-footer">
- <el-button @click="dialogVisible = false">取消</el-button>
- <el-button type="primary" @click="timeSubmit">确认</el-button>
- </span>
- </template>
- </el-dialog>
<!-- 新增编辑弹窗 -->
- <addDialog :params="addParams" @refreshTable="this.onLoad" />
- <!-- 新增候选人 -->
- <addCandidate :params="addCandidateParams" @refreshTable="this.onLoad" />
+ <add-dialog :params="addParams" @refreshTable="this.onLoad" />
+ <!-- 候选人添加及配置 -->
+ <task-setting :params="taskSettingParams" />
<!-- 预览弹窗 -->
- <viewEvaluateDetail :params="viewEvaluateDetailParams" />
+ <!-- <viewEvaluateDetail :params="viewEvaluateDetailParams" /> -->
</basic-container>
</template>
@@ -57,15 +41,14 @@
import { dateNow } from '@/utils/date';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
-import addDialog from './components/addDialog.vue';
-import addCandidate from './components/addCandidate.vue';
+import addDialog from './components/addDialog.vue';;
import viewEvaluateDetail from './components/viewEvaluateDetail.vue';
-import { getDeptTree } from '@/api/system/dept';
+import taskSetting from './components/taskSetting.vue';
export default {
components: {
addDialog,
- addCandidate,
+ taskSetting,
viewEvaluateDetail
},
data() {
@@ -83,16 +66,6 @@
selectionList: [],
option: option,
data: [],
- // 发布弹窗
- dialogVisible: false,
- publicForm: {
- publicData: '',
- },
- publicRules: {
- publicData: [
- { required: true, message: '请选择发布时间', trigger: 'click' },
- ]
- },
isAddDialogVisible: false,
addParams: {},
viewParams: {},
@@ -111,8 +84,8 @@
},
],
},
- // 新增候选人params
- addCandidateParams: {},
+ // 任务设置参数
+ taskSettingParams: {},
// 信息预览弹窗
viewEvaluateDetailParams: {},
};
@@ -333,66 +306,15 @@
this.selectionClear();
});
},
- deptData() {
- return getDeptTree(this.website.tenantId).then(deptResult => {
- const result = deptResult.data.data;
- let deptList = [];
- result.forEach(dept => {
- if (dept.children) {
- deptList = result.concat(dept.children);
- delete dept.children;
- } else {
- deptList.push(dept);
- }
- });
- return deptList;
- });
- },
- publicTimeBtn(row) {
- this.rowData = row;
- this.dialogVisible = true;
- },
- // 发布
- timeSubmit() {
- this.$refs.publicFormRef.validate(valid => {
- if (!valid) return
- const { id } = this.rowData;
- const params = {
- id,
- // candidateState: 1,
- evaluateState: 1,
- evaluateCutoffTime: this.publicForm.publicData,
- };
- update(params).then(
- res => {
- this.$message({
- type: 'success',
- message: '操作成功!',
- });
- this.refreshChange();
- },
- error => {
- this.$message({
- type: 'success',
- message: error,
- });
- }
- );
- this.dialogVisible = false;
- })
- },
- addCandidateHandle(row) {
- this.addCandidateParams = {
- visible: true,
- type: 0,
- data: {
- ...row
- }
- }
- },
tabChange(value) {
this.defaultTaskType = value.prop;
},
+ taskSettingDialog(row) {
+ this.taskSettingParams = {
+ visible: true,
+ task: row
+ }
+ }
},
};
</script>
--
Gitblit v1.9.3