From 00c7eb6a7de0c0237f85ec4e6a87be0079636211 Mon Sep 17 00:00:00 2001 From: TS-QD1 Date: Fri, 14 Jul 2023 16:16:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/table/Wgy.vue | 37 +++++++++++++++++++----------------- src/components/table/Wgz.vue | 2 +- src/main.js | 4 ++-- 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/components/table/Wgy.vue b/src/components/table/Wgy.vue index b0277e1..d93b8e7 100644 --- a/src/components/table/Wgy.vue +++ b/src/components/table/Wgy.vue @@ -164,11 +164,14 @@ export default { }, { align: 'center', - title: '姓名', + title: '姓名(网格数)', key: 'B', keyName: 'name', fixed: 'left', - width: 140 + width: 140, + render(row) { + return `${row.B}(${row.gridCount})` + } }, { align: 'center', @@ -205,14 +208,6 @@ export default { key: 'E', keyName: 'shouldReportCount', width: 60, - // render(row, index) { - // return h('a', { - // href: 'javascript:void(0);', - // onClick() { - // vueSelf.onReportDayClick(row, index) - // } - // }, row.E) - // } }, { align: 'center', @@ -626,13 +621,21 @@ export default { }, { align: 'center', - title: '应发绩效工资', + title: '应发(浮动)绩效工资', key: 'AF', keyName: 'shouldPay', fixed: 'right', width: 100, render(row, index) { - return vueSelf.computeAF(row); + let score = vueSelf.computeAE(row); + if(score <= 100 && score >= 85) { + return `${333 * row.gridCount}(${500 * row.gridCount})`; + } else if(score >= 75) { + return `${333 * row.gridCount}(0)`; + } else if(score >= 60) { + return `${333 * row.gridCount}(0)`; + } + return `${333 * row.gridCount}(0)`; } }, { @@ -937,9 +940,9 @@ export default { } else if(score >= 75) { return '良'; } else if(score >= 60) { - return '一般'; + return '合格'; } - return '差'; + return '不合格'; }, onSearchClick() { this.listData(); @@ -1047,9 +1050,9 @@ export default { }).then(({ data }) => { data.forEach((item, index) => { item.A = index + 1; - item.F = item.E === 0 ? 0 : item.D / item.E; - item.H = item.F * item.G; - item.J = item.F * item.I; + item.F = item.E === 0 ? 0 : (item.D / item.E).toFixed(2); + item.H = Math.min(item.F * item.G, item.D); + item.J = Math.min(item.F * item.I, item.D); item.L = (item.K > 10 ? 10 : item.K) * 0.5; item.S = item.R * 0.2; }) diff --git a/src/components/table/Wgz.vue b/src/components/table/Wgz.vue index 6b3f8df..019631b 100644 --- a/src/components/table/Wgz.vue +++ b/src/components/table/Wgz.vue @@ -165,7 +165,7 @@ export default { { align: 'center', title: '不合格人员数', - key: 'E', + key: 'D', keyName: 'signUnPassCount', width: 60 }, diff --git a/src/main.js b/src/main.js index 834a290..6d7c989 100644 --- a/src/main.js +++ b/src/main.js @@ -25,8 +25,8 @@ const router = createRouter({ // axios const createAxios = { install(app, options) { - // axios.defaults.baseURL = 'http://127.0.0.1:8087/bigdata'; - axios.defaults.baseURL = '/bigdata'; + axios.defaults.baseURL = 'http://127.0.0.1:8087/bigdata'; + // axios.defaults.baseURL = '/bigdata'; axios.defaults.timeout = 20000; app.config.globalProperties.$axios = axios; }