| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getCandidateResult } from '@/api/evaluate/evaluateTask' |
| | | import { getFinallyResult } from '@/api/evaluate/evaluateTask' |
| | | |
| | | export default { |
| | | inject: ['type'], |
| | | props: { |
| | | params: { |
| | | type: Object, |
| | |
| | | viewBtn: false, |
| | | header: false, |
| | | menuWidth: 150, |
| | | menu: false, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: '姓名', |
| | | prop: 'user_name', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '部门', |
| | | prop: 'user_name', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '职位', |
| | | prop: 'dept_name', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '票数', |
| | | prop: 'voteNum', |
| | | type: 'input' |
| | | }, |
| | | ] |
| | | column: [] |
| | | }, |
| | | defaultColumn: [ |
| | | { |
| | | label: '姓名', |
| | | prop: 'user_name', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '部门', |
| | | prop: 'user_name', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '职位', |
| | | prop: 'dept_name', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '票数', |
| | | prop: 'voteNum', |
| | | type: 'input' |
| | | }, |
| | | ], |
| | | sectionColumn: [ |
| | | { |
| | | label: '部门', |
| | | prop: 'user_name', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '票数', |
| | | prop: 'voteNum', |
| | | type: 'input' |
| | | }, |
| | | ], |
| | | data: [] |
| | | } |
| | | }, |
| | |
| | | ...this.query, |
| | | ...params |
| | | }; |
| | | getCandidateResult(page.currentPage, page.pageSize, id).then(res => { |
| | | getFinallyResult(page.currentPage, page.pageSize, id).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | }, |
| | | watch: { |
| | | 'params.data': { |
| | | handler(value) { |
| | | this.onLoad(this.page) |
| | | this.option.column = (this.type() ? this.sectionColumn : this.defaultColumn) |
| | | }, |
| | | deep: true |
| | | } |
| | | } |
| | | } |
| | | </script> |