| | |
| | | label: "考核编号", |
| | | prop: "assessmentNo", |
| | | type: "input", |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | ], |
| | | }, |
| | | { |
| | | label: "考核类型", |
| | | prop: "type", |
| | | type: "select", |
| | | formatter: (res) => { |
| | | return res.type === 0? '个人考核' : '部门考核'; |
| | | }, |
| | | dicData: [ |
| | | { |
| | | label: '人员考核任务', |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: '部门考核任务', |
| | | value: 1, |
| | | } |
| | | ], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请输入考核任务类型', |
| | | trigger: 'blur', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: "开始时间", |
| | | prop: "startTime", |
| | | type: "date", |
| | |
| | | <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-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" |
| | |
| | | selectionList: [], |
| | | option: option, |
| | | data: [], |
| | | resultParams: {} |
| | | // 考核结果参数 |
| | | resultParams: {}, |
| | | defaultTaskType: 0, |
| | | taskTypeList: [ |
| | | { |
| | | label: '全部', |
| | | value: null |
| | | }, |
| | | { |
| | | label: '个人考核任务', |
| | | value: 0 |
| | | }, |
| | | { |
| | | label: '部门考核任务', |
| | | value: 1 |
| | | } |
| | | ] |
| | | }; |
| | | }, |
| | | watch: { |
| | | defaultTaskType(n) { |
| | | const taskType = this.taskTypeList[n].value; |
| | | let params = {} |
| | | taskType === void 0 ? params = {} : params = { type: taskType } |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | |
| | | const { |
| | | } = this.query; |
| | | let values = { |
| | | ...this.query |
| | | }; |
| | | this.$confirm("是否导出数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | |
| | | } = this.query; |
| | | |
| | | let values = { |
| | | ...this.query |
| | | }; |
| | | |
| | | getList(page.currentPage, page.pageSize, values).then(res => { |
| | |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | tabClick(value, index) { |
| | | this.defaultTaskType = index |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style></style> |
| | | <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> |
| | |
| | | { |
| | | label: "部门", |
| | | prop: "deptName", |
| | | type: "input", |
| | | search: true |
| | | type: "tree", |
| | | search: true, |
| | | dicUrl: `/blade-system/dept/tree?tenantId=${this.website.tenantId}`, |
| | | dicFormatter: (res) => { |
| | | this.selectGroup.depts = res.data |
| | | return res.data |
| | | }, |
| | | props: { |
| | | label: 'title', |
| | | values: 'id' |
| | | } |
| | | }, |
| | | { |
| | | label: "职务", |
| | | prop: "postName", |
| | | type: "input", |
| | | search: true |
| | | type: "select", |
| | | search: true, |
| | | dicUrl: `/blade-system/post/select?tenantId=${this.website.tenantId}`, |
| | | dicFormatter: (res) => { |
| | | this.selectGroup.posts = res.data |
| | | return res.data |
| | | }, |
| | | props: { |
| | | label: 'postName', |
| | | value: 'id' |
| | | } |
| | | }, |
| | | { |
| | | label: "人员类型", |
| | |
| | | currentPage: 1, |
| | | total: 0, |
| | | }, |
| | | selectGroup: { |
| | | depts: [], |
| | | posts: [] |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | changeIs(is) { |
| | | this.isWeight = is |
| | | }, |
| | | searchChange() { }, |
| | | searchChange(params, done) { |
| | | params.deptId = params.deptName || '' |
| | | params.postId = params.postName || '' |
| | | delete params.deptName |
| | | delete params.postName |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | | this.onLoad(this.page, params); |
| | | done(); |
| | | }, |
| | | searchReset() { }, |
| | | currentChange() { }, |
| | | sizeChange() { }, |
| | |
| | | const { |
| | | } = this.query; |
| | | let values = { |
| | | ...this.query, |
| | | ...params |
| | | }; |
| | | |
| | | getList(page.currentPage, page.pageSize, values).then(res => { |