| | |
| | | <div class="container"> |
| | | <el-page-header @back="back" class="header"> |
| | | <template #content> |
| | | <span>考核结果</span> |
| | | <span>{{ !params.type ? '个人考核结果' : '部门考核结果' }}</span> |
| | | </template> |
| | | </el-page-header> |
| | | <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" |
| | | @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
| | | @refresh-change="refreshChange" @on-load="onLoad"> |
| | | :data="data" :before-open="beforeOpen" ref="crud" @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" |
| | | @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" |
| | | @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> |
| | | <template #menu="{ row }"> |
| | | <el-button type="primary" size="small" @click="handleDetail(row)">查看详情</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <resultDetail :params="detailParams" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getList } from '@/api/assessment/assessmentScore' |
| | | import resultDetail from './resultDetail.vue' |
| | | |
| | | export default { |
| | | components: { |
| | | resultDetail |
| | | }, |
| | | props: { |
| | | params: { |
| | | type: Object, |
| | |
| | | border: true, |
| | | index: true, |
| | | addBtn: false, |
| | | viewBtn: true, |
| | | viewBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | selection: false, |
| | | dialogClickModal: false, |
| | | menu: false, |
| | | menuWidth: 200, |
| | | menu: true, |
| | | searchLabelWidth: 100, |
| | | column: [ |
| | | // { |
| | | // label: "考核编号", |
| | | // type: 'select', |
| | | // hide: true, |
| | | // search: true |
| | | // }, |
| | | { |
| | | label: "被考核人", |
| | | prop: "userName", |
| | | type: "input", |
| | | // search: true |
| | | }, |
| | | { |
| | | label: "工号", |
| | | prop: 'code', |
| | | type: "input", |
| | | }, |
| | | { |
| | | label: "被考核人", |
| | | prop: "userName", |
| | | type: "input", |
| | | search: true, |
| | | }, |
| | | { |
| | | label: "部门", |
| | | prop: "deptName", |
| | | type: "select", |
| | | dicUrl: '/api/blade-system/dept/lazy-list?parentId=1737282385453543425', |
| | | search: true, |
| | | props: { |
| | | label: 'deptName', |
| | | value: 'fullName' |
| | | } |
| | | }, |
| | | { |
| | | label: "职务", |
| | | prop: "postName", |
| | | type: "input", |
| | | }, |
| | | // { |
| | | // label: "人员类型", |
| | | // prop: "personnelType", |
| | | // type: "input", |
| | | // }, |
| | | { |
| | | label: "考核分", |
| | | prop: "scoreVal", |
| | |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 1, |
| | | } |
| | | }, |
| | | detailParams: {} |
| | | } |
| | | }, |
| | | watch: { |
| | | 'params': { |
| | | handler(val) { |
| | | this.rowData = val |
| | | this.query.assessmentTaskId = val.id |
| | | this.query.type = val.type |
| | | // this.query.assessmentTaskId = val.id |
| | | // this.query.type = val.type |
| | | if (val.type) { |
| | | const column = [ |
| | | { |
| | | label: "被考核部门", |
| | | prop: "deptName", |
| | | type: "select", |
| | | dicUrl: '/api/blade-system/dept/lazy-list?parentId=1737282385453543425', |
| | | search: true, |
| | | props: { |
| | | label: 'deptName', |
| | | value: 'fullName' |
| | | } |
| | | }, |
| | | { |
| | | label: "考核分数", |
| | | prop: "scoreVal", |
| | | type: "input", |
| | | } |
| | | ] |
| | | this.option.column = column |
| | | } |
| | | }, |
| | | deep: true, |
| | | immediate: true, |
| | |
| | | }, |
| | | methods: { |
| | | back() { |
| | | this.$emit('changeIs', true) |
| | | this.$emit('changeIs', 0) |
| | | }, |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | |
| | | // }); |
| | | // }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | | done(); |
| | | // if (["edit", "view"].includes(type)) { |
| | | // getDetail(this.form.id).then(res => { |
| | | // this.form = res.data.data; |
| | | // }); |
| | | // } |
| | | // done(); |
| | | }, |
| | | searchReset() { |
| | | this.query = {}; |
| | |
| | | ...params |
| | | }; |
| | | |
| | | getList(page.currentPage, page.pageSize, values).then(res => { |
| | | const { id, type } = this.params |
| | | getList(page.currentPage, page.pageSize, values, type, id).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | handleDetail(row) { |
| | | this.detailParams = { |
| | | visible: true, |
| | | ...row |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |