| | |
| | | const status = { |
| | | 0: '未开始', |
| | | 1: '进行中', |
| | | 2: '已结束' |
| | | } |
| | | |
| | | export default { |
| | | height:'auto', |
| | | calcHeight: 30, |
| | |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | formatter: (row, value) => { |
| | | return status[value] |
| | | }, |
| | | minWidth: '100px' |
| | | }, |
| | | { |
| | |
| | | minWidth: '100px' |
| | | }, |
| | | { |
| | | label: "候选人截止日期", |
| | | label: "评优评先截止时间", |
| | | prop: "evaluateCutoffTime", |
| | | type: "date", |
| | | format: "YYYY-MM-DD HH:mm:ss", |
| | |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | formatter: (row, value) => { |
| | | return status[value] |
| | | }, |
| | | minWidth: '100px' |
| | | }, |
| | | { |
| | |
| | | <template> |
| | | <basic-container> |
| | | <template v-if="isResult"> |
| | | <ul class="task-box"> |
| | | <li v-for="(taskType, index) in taskTypeList" :key="index" @click="tabClick(taskType.value, index)" |
| | | :class="{ 'active-type': index === defaultTaskType }"> |
| | | {{ taskType.label }} |
| | | </li> |
| | | </ul> |
| | | <avue-tabs :option="taskTypeList" @change="tabChange"></avue-tabs> |
| | | <avue-crud :option="option" v-model:search="search" v-model:page="page" v-model="form" :table-loading="loading" |
| | | :data="data" :permission="permissionList" :before-open="beforeOpen" ref="crud" @row-update="rowUpdate" |
| | | @row-save="rowSave" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" |
| | |
| | | // 考核结果参数 |
| | | resultParams: {}, |
| | | defaultTaskType: 0, |
| | | taskTypeList: [ |
| | | { |
| | | label: '全部', |
| | | value: null |
| | | }, |
| | | { |
| | | label: '个人考核任务', |
| | | value: 0 |
| | | }, |
| | | { |
| | | label: '部门考核任务', |
| | | value: 1 |
| | | } |
| | | ] |
| | | taskTypeList: { |
| | | column: [ |
| | | { |
| | | label: '个人考核任务', |
| | | prop: 0 |
| | | }, |
| | | { |
| | | label: '部门考核任务', |
| | | prop: 1 |
| | | } |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | defaultTaskType(n) { |
| | | const taskType = this.taskTypeList[n].value; |
| | | let params = {} |
| | | taskType === void 0 ? params = {} : params = { type: taskType } |
| | | this.query = params; |
| | | this.query['type'] = n |
| | | let params = { |
| | | type: n |
| | | } |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | } |
| | |
| | | } = this.query; |
| | | |
| | | let values = { |
| | | ...this.query |
| | | ...this.query, |
| | | ...params |
| | | }; |
| | | |
| | | getList(page.currentPage, page.pageSize, values).then(res => { |
| | |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | tabClick(value, index) { |
| | | this.defaultTaskType = index |
| | | tabChange(value) { |
| | | this.defaultTaskType = value.prop |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .task-box { |
| | | margin: 0; |
| | | padding: 0; |
| | | list-style-type: none; |
| | | display: flex; |
| | | align-items: end; |
| | | margin-bottom: 10px; |
| | | height: 35px; |
| | | |
| | | li { |
| | | margin-left: 20px; |
| | | padding-bottom: 5px; |
| | | cursor: pointer; |
| | | transition: all .3s ease-in-out; |
| | | |
| | | &:first-child { |
| | | margin-left: 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .active-type { |
| | | font-size: 20px; |
| | | font-weight: 400; |
| | | position: relative; |
| | | |
| | | &::after { |
| | | content: ''; |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 2px; |
| | | bottom: 0; |
| | | left: 0; |
| | | background-color: var(--el-color-primary); |
| | | } |
| | | }</style> |
| | | </style> |
| | |
| | | <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="dialogVisible = true"> |
| | | <el-button type="primary" text plain icon="el-icon-position" @click="publicTimeBtn(row)"> |
| | | 发布 |
| | | </el-button> |
| | | <el-button type="primary" text plain icon="el-icon-download" @click=""> |
| | |
| | | <el-dialog v-model="dialogVisible" title="发布" width="500px"> |
| | | <el-form :model="publicForm"> |
| | | <el-form-item label="评优评先截止时间:"> |
| | | <el-date-picker v-model="publicForm.publicData" type="datetime" placeholder="请选择截止时间" style="width: 100%;" /> |
| | | <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="dialogVisible = false">确认</el-button> |
| | | <el-button type="primary" @click="timeSubmit">确认</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | rowData: {}, |
| | | form: {}, |
| | | query: {}, |
| | | search: {}, |
| | |
| | | }) |
| | | return deptList |
| | | }); |
| | | }, |
| | | publicTimeBtn(row) { |
| | | this.rowData = row |
| | | this.dialogVisible = true |
| | | }, |
| | | timeSubmit() { |
| | | const { id } = this.rowData |
| | | const params = { |
| | | id, |
| | | evaluateCutoffTime: this.publicForm.publicData |
| | | } |
| | | add(params).then(res => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | this.refreshChange() |
| | | }, error => { |
| | | this.$message({ |
| | | type: "success", |
| | | message: error |
| | | }); |
| | | }) |
| | | this.dialogVisible = false |
| | | } |
| | | } |
| | | }; |