5 files modified
1 files added
| | |
| | | })
|
| | | }
|
| | |
|
| | | export const getReferrer = (type, beId, evaluateTaskId) => {
|
| | | return request({
|
| | | url: '/evaluate/evaluateResult/list',
|
| | | method: 'get',
|
| | | params: {
|
| | | type,
|
| | | beId,
|
| | | evaluateTaskId
|
| | | }
|
| | | })
|
| | | }
|
| | |
| | | type: "input",
|
| | | },
|
| | | {
|
| | | label: "推荐人",
|
| | | prop: "referrer",
|
| | | type: "input",
|
| | | },
|
| | | {
|
| | | label: "创建人",
|
| | | prop: "createUser",
|
| | | type: "input",
|
| | |
| | | <template #assessmentPerson="{ row }"> |
| | | <popoverTable :params="{...row, type: defaultTaskType}"> |
| | | <template #content> |
| | | <el-button type="success" text size="small" icon="el-icon-pointer">考核人预览</el-button> |
| | | <el-button type="success" text icon="el-icon-pointer">考核人预览</el-button> |
| | | </template> |
| | | </popoverTable> |
| | | </template> |
| | |
| | | // toUserId: this.params.id |
| | | // userId: this.params.id |
| | | }; |
| | | this.params.isDept && Object.assign(values, { |
| | | this.params.type && Object.assign(values, { |
| | | deptId: this.params.id |
| | | }); |
| | | !this.params.isDept && Object.assign(values, { |
| | | !this.params.type && Object.assign(values, { |
| | | userId: this.params.id |
| | | }); |
| | | (this.params.isDept ? getDeptList(page.currentPage, page.pageSize, values) : getList(page.currentPage, page.pageSize, values)).then(res => { |
| | | (this.params.type ? getDeptList(page.currentPage, page.pageSize, values) : getList(page.currentPage, page.pageSize, values)).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| New file |
| | |
| | | <template> |
| | | <el-popover placement="top-end" title="推荐人" :width="700" trigger="hover" @show="init"> |
| | | <avue-crud :option="option" :data="tableData" v-model:page="page"> |
| | | </avue-crud> |
| | | <template #reference> |
| | | <slot name="default"></slot> |
| | | </template> |
| | | </el-popover> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { reactive, readonly } from 'vue'; |
| | | import { getReferrer } from '@/api/evaluate/evaluateResult' |
| | | import _ from 'lodash' |
| | | |
| | | const props = defineProps({ |
| | | params: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | } |
| | | }) |
| | | |
| | | |
| | | const option = reactive({ |
| | | height: '190', |
| | | calcHeight: 32, |
| | | border: true, |
| | | index: true, |
| | | addBtn: false, |
| | | viewBtn: true, |
| | | editBtn: true, |
| | | delBtn: true, |
| | | header: false, |
| | | menu: false, |
| | | menuBtn: false, |
| | | column: [ |
| | | { |
| | | label: '推荐人', |
| | | type: 'input', |
| | | prop: 'scoreUserName', |
| | | width: 150, |
| | | isSlot: true |
| | | }, |
| | | { |
| | | label: '职位', |
| | | type: 'input', |
| | | prop: 'scorePostName', |
| | | }, |
| | | { |
| | | label: '部门', |
| | | type: 'input', |
| | | prop: 'scoreDeptName', |
| | | }, |
| | | { |
| | | label: '推荐理由', |
| | | type: 'input', |
| | | prop: 'remark' |
| | | } |
| | | ] |
| | | }) |
| | | const tableData = ref([]) |
| | | const page = ref({ |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | layout: "total,prev, pager, next", |
| | | }) |
| | | |
| | | const init = () => { |
| | | const { userId, type, evaluateTaskId } = props.params |
| | | getReferrer(type, userId, evaluateTaskId).then(res => { |
| | | const { data } = res |
| | | const referrerRes = _.cloneDeep(data.data.records) |
| | | tableData.value = referrerRes |
| | | page.value.total = data.data.total |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| | |
| | | @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 #referrer="{row}">
|
| | | <template v-if="row.voteNum !== 0">
|
| | | <referrerPopover :params="row">
|
| | | <template #default>
|
| | | <el-button type="success" text icon="el-icon-pointer">推荐人预览</el-button>
|
| | | </template>
|
| | | </referrerPopover>
|
| | | </template>
|
| | | <template v-else>
|
| | | <el-button type="warning" text icon="el-icon-circle-close">暂无推荐人</el-button>
|
| | | </template>
|
| | | </template>
|
| | | </avue-crud>
|
| | | </basic-container>
|
| | | </template>
|
| | |
| | | import { dateNow } from "@/utils/date";
|
| | | import NProgress from 'nprogress';
|
| | | import 'nprogress/nprogress.css';
|
| | | import referrerPopover from './components/referrerPopover.vue'
|
| | |
|
| | | export default {
|
| | | components: {
|
| | | referrerPopover
|
| | | },
|
| | | data() {
|
| | | return {
|
| | | form: {},
|