| | |
| | | <ul class="info"> |
| | | <li>考核权重</li> |
| | | <li v-if="!params.isDept"> |
| | | <el-tag size="large">被考核人:{{ params.name}}</el-tag> |
| | | <el-tag size="large">被考核人:{{ params.name }}</el-tag> |
| | | </li> |
| | | <li> |
| | | <el-tag size="large">部门:{{ params.deptName }}</el-tag> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getList, getDeptList, getDetail, remove, add, addDept, update } from '@/api/assessment/assessmentSet' |
| | | import { getList, getDeptList, getDetail, getDeptDetail, remove, removeDept, add, addDept, update, updateDept } from '@/api/assessment/assessmentSet' |
| | | |
| | | export default { |
| | | props: { |
| | |
| | | index: true, |
| | | addBtn: true, |
| | | viewBtn: true, |
| | | editBtn: false, |
| | | editBtn: true, |
| | | delBtn: true, |
| | | menuWidth: 200, |
| | | labelWidth: 120, |
| | |
| | | !this.params.isDept ? row.userId = this.params.id : row.deptId = this.params.id |
| | | const toUser = this.selectList.find(option => row.toUserName === option.name) |
| | | row.toUserId = toUser.id |
| | | console.log(row); |
| | | (this.params.isDept ? addDept(row) : add(row)).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | (this.params.isDept ? addDept(row) : add(row)).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | loading(); |
| | | window.console.log(error); |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | loading(); |
| | | window.console.log(error); |
| | | }); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then(() => { |
| | | console.log(row); |
| | | (this.params.isDept ? updateDept(row) : update(row)).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(row.id); |
| | | // return remove(row.id); |
| | | return (this.params.isDept ? removeDept(row.id) : remove(row.id)) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove(this.ids); |
| | | // return remove(this.ids); |
| | | return (this.params.isDept ? removeDept(this.ids) : remove(this.ids)) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail(this.form.id).then(res => { |
| | | (this.params.isDept ? getDeptDetail(this.form.id) : getDetail(this.form.id)).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | // getDetail(this.form.id).then(res => { |
| | | // this.form = res.data.data; |
| | | // }); |
| | | } |
| | | done(); |
| | | }, |
| | |
| | | |
| | | const { |
| | | } = this.query; |
| | | |
| | | |
| | | let values = { |
| | | // toUserId: this.params.id |
| | | // userId: this.params.id |