From a95499117e534b93ca0dca06fb3a021bfdf295db Mon Sep 17 00:00:00 2001 From: yoe Date: Wed, 28 Oct 2020 16:01:43 +0800 Subject: [PATCH 1/5] =?UTF-8?q?update=20=E5=BC=B9=E7=AA=97=E9=80=8F?= =?UTF-8?q?=E6=98=8E=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 19514ca..b1ae2e5 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -25,9 +25,9 @@ const service = axios.create({ const options = { fullscreen: true, target: document.querySelector('.appamin'), - background: 'rgba(255, 255, 255, 0.1)', + background: 'rgba(255, 255, 255, 0.8)', spinner: 'el-icon-loading', - text: '请求加载中。。。'} + text: '数据加载中'} // request拦截器 service.interceptors.request.use(config => { From a48a4f12419d6b88fe6a639f517e6990ef2833a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E6=88=90=E5=BC=BA?= Date: Wed, 28 Oct 2020 16:13:00 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/assessment.js | 9 + src/components/InfoHeader/index.vue | 55 +++++ src/components/PopupRight/index.vue | 18 +- src/views/kpi/assessment/goals/index.vue | 14 +- src/views/kpi/assessment/homeList/index.vue | 1 + .../kpi/assessment/performance/img/left.png | Bin 0 -> 21498 bytes .../kpi/assessment/performance/img/right.png | Bin 0 -> 33112 bytes .../kpi/assessment/performance/index.vue | 192 +++++++++++++++++- src/views/kpi/assessment/stepList/index.vue | 189 ++++++++++++----- .../edit/components/templateSet.vue | 1 + .../workbench/assessmentGroup/groundTable.vue | 1 + .../workbench/initiateAssessment/index.vue | 4 +- 12 files changed, 410 insertions(+), 74 deletions(-) create mode 100644 src/components/InfoHeader/index.vue create mode 100644 src/views/kpi/assessment/performance/img/left.png create mode 100644 src/views/kpi/assessment/performance/img/right.png diff --git a/src/api/assessment.js b/src/api/assessment.js index 300fd7d..e98417f 100644 --- a/src/api/assessment.js +++ b/src/api/assessment.js @@ -35,3 +35,12 @@ export function apiManagerDetail (query) { data: query }) } + +// 获取考核详情 +export function apiResultRecordDetail (query) { + return request({ + url: '/lz_management/user/lzresultrecord/new/resultRecordDetail', + method: 'get', + params: query + }) +} diff --git a/src/components/InfoHeader/index.vue b/src/components/InfoHeader/index.vue new file mode 100644 index 0000000..4b3a9cb --- /dev/null +++ b/src/components/InfoHeader/index.vue @@ -0,0 +1,55 @@ + + + + + + diff --git a/src/components/PopupRight/index.vue b/src/components/PopupRight/index.vue index c43b717..b2c5cf9 100644 --- a/src/components/PopupRight/index.vue +++ b/src/components/PopupRight/index.vue @@ -1,18 +1,18 @@ + diff --git a/src/views/kpi/assessment/performance/index.vue b/src/views/kpi/assessment/performance/index.vue index b97ed65..72e9a6c 100644 --- a/src/views/kpi/assessment/performance/index.vue +++ b/src/views/kpi/assessment/performance/index.vue @@ -19,7 +19,17 @@ 管理 --> - +
+ +
+ 制定目标 +
+
- - - - - - - - - +
@@ -118,7 +101,8 @@ import SmallNav from '@/components/kpi-layout/SmallNav' import InfoHeader from '@/components/InfoHeader' import PopupRight from '@/components/PopupRight' -import { apiResultRecordDetail } from '@/api/assessment' +import { apiResultRecordDetail, apiResultGetDetail } from '@/api/assessment' +import tables from './components/table' export default { data () { @@ -131,6 +115,9 @@ export default { flowRecordList: [], resultCommentList: [] }, + obj: { + recortModelDtos: [] + }, options: [{ value: '选项1', label: '黄金糕' @@ -146,37 +133,36 @@ export default { }, { value: '选项5', label: '北京烤鸭' - }], - tableData: [{ - date: '2016-05-02', - name: '王小虎', - address: '上海市普陀区金沙江路 1518 弄' - }, { - date: '2016-05-04', - name: '王小虎', - address: '上海市普陀区金沙江路 1517 弄' - }, { - date: '2016-05-01', - name: '王小虎', - address: '上海市普陀区金沙江路 1519 弄' - }, { - date: '2016-05-03', - name: '王小虎', - address: '上海市普陀区金沙江路 1516 弄' }] } }, components: { SmallNav, InfoHeader, - PopupRight + PopupRight, + tables }, computed: {}, beforeMount () {}, mounted () { this.handleList() + this.handleGetTbale() }, methods: { + // 制定目标 + handleZhiding () { + this.$router.push({ + name: 'assessment-goals', + query: { + id: this.$route.query.id + } + }) + }, + async handleGetTbale (id = 226) { + let res = await apiResultGetDetail({id}) + this.obj = res.data + console.log('res: ', res) + }, handleRight (item) { console.log('item: ', item) this.form.item = item @@ -189,6 +175,7 @@ export default { this.right.showRight = false }, async handleList () { + // resultRecordId = == this.$route.query.id let res = await apiResultRecordDetail({resultRecordId: 215}) if (res.code !== 200) return for (let i in res.data.flowRecordList) { @@ -232,10 +219,16 @@ export default { justify-content: space-between; align-items: center; } + &-title{ + display: flex; + align-items: center; + justify-content: space-between; + } &-center{ display: flex; flex-wrap: wrap; margin: 20px 0; + &-item{ text-align: center; padding: 10px 60px; diff --git a/src/views/kpi/assessment/stepList/index.vue b/src/views/kpi/assessment/stepList/index.vue index 2b0eb58..f453b39 100644 --- a/src/views/kpi/assessment/stepList/index.vue +++ b/src/views/kpi/assessment/stepList/index.vue @@ -188,7 +188,6 @@ export default { } this.rightList = res.data.list this.kaopingFrom.showRight = true - console.log('ressss: ', res) }, handleLook (id) { // this.handleKaoping() diff --git a/src/views/kpi/workbench/assessmentGroup/edit/components/templateSet.vue b/src/views/kpi/workbench/assessmentGroup/edit/components/templateSet.vue index 63a593f..3b40537 100644 --- a/src/views/kpi/workbench/assessmentGroup/edit/components/templateSet.vue +++ b/src/views/kpi/workbench/assessmentGroup/edit/components/templateSet.vue @@ -236,7 +236,7 @@ export default { formIndicators: {}, // 指标表单 ruleIndicators: { name: [{ required: true, - message: '请输入维度名称', + message: '请输入指标名称', trigger: 'blur' } ], keyResult: [{ required: true, @@ -316,7 +316,12 @@ export default { // 获取维度类型 async handleGetDimensions () { try { - const res = await getDimensions() + let res = await getDimensions() + if (res.code !== 200) { + this.dimensionsList = [] + return + } + res = res.data this.dimensionsList = res console.log('res: ', res) } catch (error) { @@ -368,7 +373,7 @@ export default { } else { this.zhibiaoTitle = '编辑指标' this.formIndicators = Object.assign({}, item, {index, index2: type, isEdit: true}) - this.formIndicators.weight = this.formIndicators.weight + this.formIndicators.weight = this.formIndicators.weight * 100 this.showIndicators = true } }, @@ -409,7 +414,7 @@ export default { } if (!this.zanshi.tagetLibItems) this.zanshi.tagetLibItems = [] this.zanshi.tagetLibItems.push(Object.assign({}, this.formIndicators, {isDelete: 0})) - // this.showIndicators = false + this.showIndicators = false } }) } diff --git a/src/views/kpi/workbench/assessmentGroup/edit/index.vue b/src/views/kpi/workbench/assessmentGroup/edit/index.vue index 9320ce3..f362d38 100644 --- a/src/views/kpi/workbench/assessmentGroup/edit/index.vue +++ b/src/views/kpi/workbench/assessmentGroup/edit/index.vue @@ -54,6 +54,10 @@ export default { }, computed: {}, beforeMount () {}, + created () { + const id = this.$route.query.id + this.$route.meta.title = !id ? '新增考评组' : '编辑考评组' + }, mounted () { }, @@ -135,6 +139,7 @@ export default { overflow: auto; } &-header{ + cursor: pointer; position: absolute; z-index: 50; width: 420px; From f6f9d8b97ddef88297ad6aece223d51c5b4a5bcb Mon Sep 17 00:00:00 2001 From: sean yu Date: Wed, 28 Oct 2020 20:15:46 +0800 Subject: [PATCH 4/5] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/report.js | 17 ++++ src/router/kpi_route.js | 7 ++ src/views/kpi/report/detail.vue | 119 +++++++++++++++++++---- src/views/kpi/report/index.vue | 163 ++++++++++++++++++-------------- 4 files changed, 214 insertions(+), 92 deletions(-) diff --git a/src/api/report.js b/src/api/report.js index 1434fb1..b08b85b 100644 --- a/src/api/report.js +++ b/src/api/report.js @@ -17,3 +17,20 @@ export function getStartsData (query) { data: query }) } +// 获取绩效排名详情 +export function getChartDetail (query) { + return requestFuc({ + url: '/lz_management/performance/chart/detail', + method: 'POST', + data: query + }) +} + +// 获取部门信息 +export function getDepList (query) { + return requestFuc({ + url: '/lz_management/staff/structure/deplist', + method: 'GET', + params: query + }) +} diff --git a/src/router/kpi_route.js b/src/router/kpi_route.js index 6370552..1cbbc19 100644 --- a/src/router/kpi_route.js +++ b/src/router/kpi_route.js @@ -147,6 +147,13 @@ export default [ title: '智能测试带弹窗', pop: true } + }, { + path: 'report-detial', + name: 'reportDetial', + component: (resolve) => require(['@/views/kpi/report/detail.vue'], resolve), + meta: { + title: '绩效详情' + } } ] } diff --git a/src/views/kpi/report/detail.vue b/src/views/kpi/report/detail.vue index 2fea95c..3d1eff7 100644 --- a/src/views/kpi/report/detail.vue +++ b/src/views/kpi/report/detail.vue @@ -1,40 +1,121 @@ diff --git a/src/views/kpi/report/index.vue b/src/views/kpi/report/index.vue index f880e85..d5aa51f 100644 --- a/src/views/kpi/report/index.vue +++ b/src/views/kpi/report/index.vue @@ -27,61 +27,65 @@
{{statisticals[4].desc}}
-
{{statisticals[4].num}}
-
{{statisticals[4].desc}}
+
{{statisticals[5].num}}
+
{{statisticals[5].desc}}
-
{{statisticals[4].num}}
-
{{statisticals[4].desc}}
+
{{statisticals[6].num}}
+
{{statisticals[6].desc}}
-
考核人数分析
-
+
考核人数分析
+
+
考核人数分析
-
参与考核部门人数
+
-
-
    +
    参与考核部门人数
    +
    • -
      {{index}} -
      -
      {{assessItem.desc}} {{ assessItem.num }}人
      +
      +
      {{index}}
      +
      {{assessItem.desc}}
      +
      {{ assessItem.num }}人
      +
-
结果分析
-
等级分布
-
+
+
结果分析
+
+
+
等级分布
- - - - - - - @@ -102,6 +106,8 @@ export default { // 当前选择的月份 pickerTime: '', // + startId: '', + // statisticals: [ {num: '0', desc: '参与人数'}, {num: '0', desc: '目标制定'}, @@ -255,9 +261,13 @@ export default { background: color } }, - // + // 页面跳转 handleDetailClick (index, rows) { - + this.$router.push({ + path: ('report-detial'), + query: {startId: this.startId, flowProcess: rows.desc} + }) + console.log(this.$router) }, // Y轴坐标计算,取靠近最大值的3的倍数作为上限,然后划分成4个刻度(0为初始刻度) handleChartYMul (val) { @@ -277,7 +287,7 @@ export default { }, // handleChange (val) { - console.log(val) + this.startId = val[1] this.handleChartDataReq(val[1]) }, // 获取报表内容 @@ -332,10 +342,8 @@ export default { From 63247f9a30dab37cb21099e9bc020136c2578249 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E6=88=90=E5=BC=BA?= Date: Wed, 28 Oct 2020 20:18:18 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/kpi/assessment/goals/index.vue | 76 +++++++++++++++++------- 1 file changed, 54 insertions(+), 22 deletions(-) diff --git a/src/views/kpi/assessment/goals/index.vue b/src/views/kpi/assessment/goals/index.vue index 55f0f29..a023e5b 100644 --- a/src/views/kpi/assessment/goals/index.vue +++ b/src/views/kpi/assessment/goals/index.vue @@ -3,14 +3,20 @@
- +
+ +
+ 暂存 + 提交 +
+
+ > -
{{j.target}}
+
{{j.target}}
{{j.keyResult}}
-
{{j.checkWeight * 100}}%
+
{{ Math.round((j.checkWeight * 100)*1000)/1000}}%
- 增加指标项 + 增加指标项
@@ -85,7 +91,7 @@ - + @@ -118,7 +124,7 @@ export default { message: '请输入考核标准', trigger: 'blur' } ], - weight: [{ required: true, + checkWeight: [{ required: true, message: '请输入权重大小', trigger: 'blur' } ] @@ -130,6 +136,7 @@ export default { options1: { group: 'names', draggable: '.items', + handle: '.my-handle', scroll: true, sort: true, // 内部排序列表 delay: 0, // 以毫秒为单位定义排序何时开始。 @@ -163,16 +170,25 @@ export default { } res = res.data this.dimensionsList = res - console.log('res: ', res) } catch (error) { this.$message.error(error.msg) } }, handleCancelZhibiao () { - + this.showIndicators = false }, handleSubmitZhibiao () { - + this.$refs.formIndicators.validate((v) => { + if (v) { + if (this.formIndicators.index === -1) { + this.obj.recortModelDtos[this.formIndicators.dazhibiaoIndex].detailDtos.push(Object.assign({}, this.formIndicators, {checkWeight: this.formIndicators.checkWeight / 100})) + console.log('this.obj.recortModelDtos[this.formIndicators.dazhibiaoIndex].: ', this.obj.recortModelDtos[this.formIndicators.dazhibiaoIndex]) + } else { + this.obj.recortModelDtos[this.formIndicators.dazhibiaoIndex].detailDtos[this.formIndicators.index] = Object.assign({}, this.formIndicators, {checkWeight: this.formIndicators.checkWeight / 100}) + } + this.showIndicators = false + } + }) }, handleAddIndicators (item) { console.log(item) @@ -181,14 +197,25 @@ export default { }, // 编辑 hanidleEdit (item, index, type) { - console.log('type: ', type) - console.log('index: ', index) - console.log('item: ', item) + if (index === -1) { + this.formIndicators = {} + } else { + this.formIndicators = Object.assign({}, item) + this.formIndicators.checkWeight = this.formIndicators.checkWeight * 100 + } + this.formIndicators.dazhibiaoIndex = type + this.formIndicators.index = index + this.formIndicators.type = item.type + this.showIndicators = true }, handleDelateWeidu (item, index, type) { - console.log('type: ', type) - console.log('index: ', index) - console.log('item: ', item) + if (item.id) { + item.isDelete = 1 + this.$forceUpdate() + return + } + this.obj.recortModelDtos[type].detailDtos = this.obj.recortModelDtos[type].detailDtos.filter(i => i !== item) + this.$forceUpdate() }, handleFilter (item) { return item ? item.filter(i => !i.isDelete) : [] @@ -199,9 +226,6 @@ export default { this.obj = res.data this.activeId = String(res.data.recortModelDtos[0].id) console.log('res: ', res) - }, - handleClick (tab, event) { - console.log(tab, event) } }, watch: {} @@ -212,8 +236,16 @@ export default {