| | |
| | | <!-- <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> |
| | | |
| | |
| | | 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() { |
| | |
| | | selectionList: [], |
| | | option: option, |
| | | data: [], |
| | | // 发布弹窗 |
| | | dialogVisible: false, |
| | | publicForm: { |
| | | publicData: '', |
| | | }, |
| | | publicRules: { |
| | | publicData: [ |
| | | { required: true, message: '请选择发布时间', trigger: 'click' }, |
| | | ] |
| | | }, |
| | | isAddDialogVisible: false, |
| | | addParams: {}, |
| | | viewParams: {}, |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | // 新增候选人params |
| | | addCandidateParams: {}, |
| | | // 任务设置参数 |
| | | taskSettingParams: {}, |
| | | // 信息预览弹窗 |
| | | viewEvaluateDetailParams: {}, |
| | | }; |
| | |
| | | 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> |