From ccd48516b227c7822d14f7b8e5f179f94ded0843 Mon Sep 17 00:00:00 2001 From: T-95707 Date: Fri, 4 Sep 2020 15:49:14 +0800 Subject: [PATCH] =?UTF-8?q?20200904=20zjt=20=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ParPersonScoreManage.vue | 90 ++++++++---- .../PersonScoreManageAdd.vue | 7 +- .../PersonScoreManageRecord.vue | 45 +++--- src/views/par/scoreManage/ParScoreManage.vue | 89 ++++++++---- src/views/par/scoreManage/ScoreManageAdd.vue | 7 +- .../par/scoreManage/ScoreManageDeduction.vue | 2 +- .../par/scoreManage/ScoreManageGrade.vue | 9 +- .../par/scoreManage/ScoreManageRecord.vue | 87 +++++++---- src/views/par/scoreManage/WorkClock.vue | 137 ++++++++++++++++++ 9 files changed, 356 insertions(+), 117 deletions(-) create mode 100644 src/views/par/scoreManage/WorkClock.vue diff --git a/src/views/par/personScoreManage/ParPersonScoreManage.vue b/src/views/par/personScoreManage/ParPersonScoreManage.vue index 488dc59..c40d869 100644 --- a/src/views/par/personScoreManage/ParPersonScoreManage.vue +++ b/src/views/par/personScoreManage/ParPersonScoreManage.vue @@ -9,7 +9,7 @@ label="考评名称" :labelCol="labelCol" :wrapperCol="wrapperCol"> - + @@ -126,11 +126,12 @@ export default { }, // 表头 columns: [ - { title: '考评名称', dataIndex: 'kpmc' }, + { title: '考评名称', dataIndex: 'kpmc', ellipsis: true }, + { title: '考评计划名称', dataIndex: 'kpjhmc', ellipsis: true }, { title: '考评开始时间', dataIndex: 'kssj' }, { title: '考评结束时间', dataIndex: 'jssj' }, { title: '单位', dataIndex: 'dwlx' }, - { title: '考评人', dataIndex: 'kpr' }, + { title: '考评人', dataIndex: 'kpr', ellipsis: true }, { title: '检查方式', dataIndex: 'jcfs', customRender: function (attr1) { @@ -139,10 +140,21 @@ export default { } else { return '定期检查' } - } }, + }, + ellipsis: true + }, { title: '创建人', dataIndex: 'crtName' }, - { title: '创建时间', dataIndex: 'crtTime' }, - { title: '操作', width: '280px', dataIndex: 'action', scopedSlots: { customRender: 'action' } + { title: '创建时间', dataIndex: 'crtTime', ellipsis: true }, + { title: '考评状态', + dataIndex: 'kpzt', + customRender: function (attr1) { + if (attr1 === '1') { + return '保存' + } else { + return '上报' + } + } }, + { title: '操作', width: '220px', dataIndex: 'action', scopedSlots: { customRender: 'action' } } ], labelCol: { @@ -247,34 +259,50 @@ export default { return JSON.parse(str) }, delScore (record) { - const param = {} - param.id = record.id - param.scbj = '1' - updateScore( - param - ).then( - res => { - if (res.status === 200) { - this.$notification['success']({ - message: '删除成功', - duration: 2 - }) - this.visable = false - } else { - this.$notification['error']({ - message: res.message, + const _this = this + this.$confirm({ + title: '警告', + content: `确认要删除该条记录吗?`, + okText: '确认', + okType: 'danger', + cancelText: '取消', + onOk () { + const param = {} + param.id = record.id + param.scbj = '1' + updateScore( + param + ).then( + res => { + if (res.status === 200) { + _this.$notification['success']({ + message: '删除成功', + duration: 2 + }) + _this.visable = false + } else { + _this.$notification['error']({ + message: res.message, + duration: 4 + }) + } + } + ).catch(() => + _this.$notification['error']({ + message: '出现异常,请联系系统管理员', duration: 4 }) - } + ).finally(() => { + _this.confirmLoading = false + _this.search() + }) + }, + onCancel: () => { + this.$notification['info']({ + message: '取消删除操作', + duration: 4 + }) } - ).catch(() => - this.$notification['error']({ - message: '出现异常,请联系系统管理员', - duration: 4 - }) - ).finally(() => { - this.confirmLoading = false - this.search() }) }, sbScore (record) { diff --git a/src/views/par/personScoreManage/PersonScoreManageAdd.vue b/src/views/par/personScoreManage/PersonScoreManageAdd.vue index 74aad92..afb69b3 100644 --- a/src/views/par/personScoreManage/PersonScoreManageAdd.vue +++ b/src/views/par/personScoreManage/PersonScoreManageAdd.vue @@ -9,6 +9,12 @@ @cancel="handleCancel" > + + + @@ -94,7 +100,6 @@ export default { const entity = {} Object.assign(entity, values) entity.kpr = values.kpr[i] - entity.kpmc = this.planList.filter(item => item.id === entity.kpjhbid)[0].kpjhmc param.push(entity) } this.confirmLoading = true diff --git a/src/views/par/personScoreManage/PersonScoreManageRecord.vue b/src/views/par/personScoreManage/PersonScoreManageRecord.vue index 684f1dd..12e77b3 100644 --- a/src/views/par/personScoreManage/PersonScoreManageRecord.vue +++ b/src/views/par/personScoreManage/PersonScoreManageRecord.vue @@ -9,21 +9,6 @@ @cancel="handleCancel" :maskClosable="false" > - - - 近期工作 - - - - - 考评列表 @@ -57,9 +42,29 @@ + + + 近期工作 + + + + + 打卡记录 + + + + + @@ -70,12 +75,14 @@ import { query } from '@/api/admin' import { getWorkInfo, getCate } from '@/api/parBasicData' import PersonScoreManageGrade from '@/views/par/personScoreManage/PersonScoreManageGrade' import PersonScoreManageDeduction from '@/views/par/personScoreManage/PersonScoreManageDeduction' +import WorkClock from '@/views/par/scoreManage/WorkClock' export default { name: 'PersonScoreManageRecord', components: { STable, PersonScoreManageGrade, - PersonScoreManageDeduction + PersonScoreManageDeduction, + WorkClock }, data () { return { @@ -162,7 +169,8 @@ export default { return record.zdyzq } } }, - { title: '延期原因', dataIndex: 'yqyy', ellipsis: true } + { title: '延期原因', dataIndex: 'yqyy', ellipsis: true }, + { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' } } ], pagination: { total: 0, @@ -301,6 +309,9 @@ export default { this.kpqueryParam.pageNo = pagination.current this.kpqueryParam.pageSize = pagination.pageSize this.getWorkInfo(this.getCate) + }, + openWorkClock (record) { + this.$refs.workClock.deduction({ id: record.id }) } } diff --git a/src/views/par/scoreManage/ParScoreManage.vue b/src/views/par/scoreManage/ParScoreManage.vue index 12f68bb..c04091c 100644 --- a/src/views/par/scoreManage/ParScoreManage.vue +++ b/src/views/par/scoreManage/ParScoreManage.vue @@ -9,7 +9,7 @@ label="考评名称" :labelCol="labelCol" :wrapperCol="wrapperCol"> - + @@ -120,10 +120,11 @@ export default { }, // 表头 columns: [ - { title: '考评名称', dataIndex: 'kpmc' }, + { title: '考评名称', dataIndex: 'kpmc', ellipsis: true }, + { title: '考评计划名称', dataIndex: 'kpjhmc', ellipsis: true }, { title: '考评开始时间', dataIndex: 'kssj' }, { title: '考评结束时间', dataIndex: 'jssj' }, - { title: '单位', dataIndex: 'kpr' }, + { title: '单位', dataIndex: 'kpr', ellipsis: true }, { title: '检查方式', dataIndex: 'jcfs', customRender: function (attr1) { @@ -132,10 +133,20 @@ export default { } else { return '定期检查' } - } }, + }, + ellipsis: true }, { title: '创建人', dataIndex: 'crtName' }, - { title: '创建时间', dataIndex: 'crtTime' }, - { title: '操作', width: '280px', dataIndex: 'action', scopedSlots: { customRender: 'action' } + { title: '创建时间', dataIndex: 'crtTime', ellipsis: true }, + { title: '考评状态', + dataIndex: 'kpzt', + customRender: function (attr1) { + if (attr1 === '1') { + return '保存' + } else { + return '上报' + } + } }, + { title: '操作', width: '220px', dataIndex: 'action', scopedSlots: { customRender: 'action' } } ], labelCol: { @@ -240,34 +251,50 @@ export default { return JSON.parse(str) }, delScore (record) { - const param = {} - param.id = record.id - param.scbj = '1' - updateScore( - param - ).then( - res => { - if (res.status === 200) { - this.$notification['success']({ - message: '删除成功', - duration: 2 - }) - this.visable = false - } else { - this.$notification['error']({ - message: res.message, + const _this = this + this.$confirm({ + title: '警告', + content: `确认要删除该条记录吗?`, + okText: '确认', + okType: 'danger', + cancelText: '取消', + onOk () { + const param = {} + param.id = record.id + param.scbj = '1' + updateScore( + param + ).then( + res => { + if (res.status === 200) { + _this.$notification['success']({ + message: '删除成功', + duration: 2 + }) + _this.visable = false + } else { + _this.$notification['error']({ + message: res.message, + duration: 4 + }) + } + } + ).catch(() => + _this.$notification['error']({ + message: '出现异常,请联系系统管理员', duration: 4 }) - } + ).finally(() => { + _this.confirmLoading = false + _this.search() + }) + }, + onCancel: () => { + this.$notification['info']({ + message: '取消删除操作', + duration: 4 + }) } - ).catch(() => - this.$notification['error']({ - message: '出现异常,请联系系统管理员', - duration: 4 - }) - ).finally(() => { - this.confirmLoading = false - this.search() }) }, sbScore (record) { diff --git a/src/views/par/scoreManage/ScoreManageAdd.vue b/src/views/par/scoreManage/ScoreManageAdd.vue index cd8bb01..2c7fb09 100644 --- a/src/views/par/scoreManage/ScoreManageAdd.vue +++ b/src/views/par/scoreManage/ScoreManageAdd.vue @@ -9,6 +9,12 @@ @cancel="handleCancel" > + + + item.id === entity.kpjhbid)[0].kpjhmc param.push(entity) } this.confirmLoading = true diff --git a/src/views/par/scoreManage/ScoreManageDeduction.vue b/src/views/par/scoreManage/ScoreManageDeduction.vue index 2674da7..169e7c9 100644 --- a/src/views/par/scoreManage/ScoreManageDeduction.vue +++ b/src/views/par/scoreManage/ScoreManageDeduction.vue @@ -113,7 +113,7 @@ export default { }) item.dqdf = num } else { - item.dqdf = 0 + item.dqdf = Number(item.kpfs) } } }) diff --git a/src/views/par/scoreManage/ScoreManageGrade.vue b/src/views/par/scoreManage/ScoreManageGrade.vue index 052e2d6..5e4db8b 100644 --- a/src/views/par/scoreManage/ScoreManageGrade.vue +++ b/src/views/par/scoreManage/ScoreManageGrade.vue @@ -159,7 +159,10 @@ export default { this.pfData = [] this.kpyjData = [] this.kpdData = [] - this.$emit('close') + if (this.showFlag) { + this.$emit('bonusClose') + } + this.gradeVisible = false }, handleOk () { @@ -186,9 +189,7 @@ export default { duration: 2 }) if (!this.showFlag) { - if (this.pfData.length > 0) { - this.$emit('updateDqdf', this.pfData, this.kpxmbid) - } + this.$emit('updateDqdf', this.pfData, this.kpxmbid) } } else { this.$notification['error']({ diff --git a/src/views/par/scoreManage/ScoreManageRecord.vue b/src/views/par/scoreManage/ScoreManageRecord.vue index 553219b..59782f4 100644 --- a/src/views/par/scoreManage/ScoreManageRecord.vue +++ b/src/views/par/scoreManage/ScoreManageRecord.vue @@ -9,21 +9,6 @@ @cancel="handleCancel" :maskClosable="false" > - - - 近期工作 - - - - - 考评列表 @@ -57,9 +42,29 @@ + + + 近期工作 + + + + + 打卡记录 + + + + - + + @@ -70,12 +75,14 @@ import { query } from '@/api/admin' import { getWorkInfo, getCate } from '@/api/parBasicData' import ScoreManageGrade from '@/views/par/scoreManage/ScoreManageGrade' import ScoreManageDeduction from '@/views/par/scoreManage/ScoreManageDeduction' +import WorkClock from '@/views/par/scoreManage/WorkClock' export default { name: 'ScoreManageRecord', components: { STable, ScoreManageGrade, - ScoreManageDeduction + ScoreManageDeduction, + WorkClock }, data () { return { @@ -96,6 +103,14 @@ export default { // 表头 bonusColumns: [ { title: '工作分类', dataIndex: 'kpdlName' }, + { title: '当前得分', + customRender: function (attr1, record) { + if (record.itemList[0].dqdf === null || record.itemList[0].dqdf === undefined) { + return 0 + } else { + return record.itemList[0].dqdf + } + } }, { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' } } ], @@ -112,7 +127,7 @@ export default { return '综合评定' } } }, - { title: '考评项目', dataIndex: 'kpxmNames' }, + { title: '考评项目', dataIndex: 'kpxmNames', ellipsis: true }, { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' } } ], @@ -124,24 +139,16 @@ export default { ellipsis: true, customRender: function (attr1) { if (attr1 === '1') { - return '单位' + return '指令性工作' + } else if (attr1 === '2') { + return '目标任务问题清单' } else { - return '个人' + return '个人工作备忘' } } }, { title: '工作内容', dataIndex: 'gznr', ellipsis: true }, { title: '开始时间', dataIndex: 'kssj', ellipsis: true }, { title: '截止时间', dataIndex: 'jzsj', ellipsis: true }, - { title: '工作状态', - dataIndex: 'gzzt', - ellipsis: true, - customRender: function (attr1) { - if (attr1 === '1') { - return '已完成' - } else { - return '未完成' - } - } }, { title: '周期', dataIndex: 'zq', ellipsis: true, @@ -160,7 +167,18 @@ export default { return record.zdyzq } } }, - { title: '延期原因', dataIndex: 'yqyy', ellipsis: true } + { title: '延期原因', dataIndex: 'yqyy', ellipsis: true }, + { title: '工作状态', + dataIndex: 'gzzt', + ellipsis: true, + customRender: function (attr1) { + if (attr1 === '1') { + return '已完成' + } else { + return '未完成' + } + } }, + { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' } } ], pagination: { total: 0, @@ -301,6 +319,7 @@ export default { * 获取考评列表 */ getCate (param) { + this.kploading = true getCate(param).then(res => { this.kpLoadData = res.result.data const pagination = { ...this.kppagination } @@ -315,6 +334,12 @@ export default { this.kpqueryParam.pageNo = pagination.current this.kpqueryParam.pageSize = pagination.pageSize this.getWorkInfo(this.getCate) + }, + bonusClose () { + this.getCate(this.kpqueryParam) + }, + openWorkClock (record) { + this.$refs.workClock.deduction({ id: record.id }) } } diff --git a/src/views/par/scoreManage/WorkClock.vue b/src/views/par/scoreManage/WorkClock.vue new file mode 100644 index 0000000..54f1515 --- /dev/null +++ b/src/views/par/scoreManage/WorkClock.vue @@ -0,0 +1,137 @@ + + + -- Gitee