| | |
| | | </el-button> |
| | | </template> |
| | | <template #menu="{ size, row, index }"> |
| | | <el-button type="primary" size="small" @click="handleWeight(row)"> |
| | | <el-button type="primary" text icon="el-icon-plus" @click="handleWeight(row)"> |
| | | 添加考核人 |
| | | </el-button> |
| | | <el-button type="danger" text icon="el-icon-delete" @click="rowDel(row)"> |
| | | 删除 |
| | | </el-button> |
| | | </template> |
| | | <template #assessmentPerson="{ row }"> |
| | |
| | | import assessmentWeight from './assessmentWeight.vue' |
| | | import addAssessor from './addAssessor.vue'; |
| | | import popoverTable from '@/views/assessment/components/popoverTable.vue' |
| | | import { getList } from '@/api/assessment/assessmentSet.js' |
| | | import { getList, remove } from '@/api/assessment/assessmentSet.js' |
| | | import { getLazyList } from '@/api/system/dept'; |
| | | import _ from 'lodash' |
| | | |
| | |
| | | }, |
| | | { |
| | | label: "被考核人", |
| | | // prop: "name", |
| | | prop: "userName", |
| | | type: "input", |
| | | search: true, |
| | |
| | | { |
| | | label: "部门", |
| | | prop: "deptName", |
| | | type: "tree", |
| | | search: true, |
| | | type: "select", |
| | | minWidth: 120, |
| | | dicUrl: `/blade-system/dept/tree?tenantId=${this.website.tenantId}`, |
| | | dicFormatter: (res) => { |
| | | this.selectGroup.depts = res.data |
| | | return res.data |
| | | }, |
| | | // dicUrl: `/blade-system/dept/tree?tenantId=${this.website.tenantId}`, |
| | | // dicFormatter: (res) => { |
| | | // this.selectGroup.depts = res.data |
| | | // return res.data |
| | | // }, |
| | | // props: { |
| | | // label: 'title', |
| | | // values: 'id' |
| | | // } |
| | | dicUrl: '/api/blade-system/dept/lazy-list?parentId=1737282385453543425', |
| | | search: true, |
| | | props: { |
| | | label: 'title', |
| | | values: 'id' |
| | | } |
| | | label: 'deptName', |
| | | value: 'fullName' |
| | | }, |
| | | }, |
| | | { |
| | | label: "职务", |
| | | prop: "postName", |
| | | type: "select", |
| | | search: true, |
| | | minWidth: 100, |
| | | dicUrl: `/blade-system/post/select?tenantId=${this.website.tenantId}`, |
| | | dicFormatter: (res) => { |
| | |
| | | taskParams: this.params |
| | | } |
| | | }, |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | | searchChange(params, done) { |
| | | if (!this.defaultTaskType) { |
| | | params.deptId = params.deptName || '' |
| | | params.postId = params.postName || '' |
| | | delete params.deptName |
| | | delete params.postName |
| | | } |
| | | this.parentId = '' |
| | | this.query = params; |
| | | this.page.currentPage = 1; |
| | |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | const { |
| | | } = this.query; |
| | | const { id } = this.params |
| | | let values = { |
| | | ...this.query, |
| | | ...params, |
| | | userType: 2 |
| | | assessmentTaskId: id |
| | | }; |
| | | this.data = [] |
| | | const { id } = this.params |
| | | getList(page.currentPage, page.pageSize, { assessmentTaskId: id }).then(res => { |
| | | getList(page.currentPage, page.pageSize, values).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |