From 6f080578e0240ba054cefd36631b805519c9cb54 Mon Sep 17 00:00:00 2001 From: xuesinan <1404152492@qq.com> Date: Thu, 11 Nov 2021 15:03:25 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BarChart/BarChart.vue | 50 +++++------------------ src/components/LineChart/LineChart.vue | 18 ++------ src/views/SalarySummary/SalarySummary.vue | 32 +++++++++++++-- 3 files changed, 42 insertions(+), 58 deletions(-) diff --git a/src/components/BarChart/BarChart.vue b/src/components/BarChart/BarChart.vue index 54b03dd..58cd5d0 100644 --- a/src/components/BarChart/BarChart.vue +++ b/src/components/BarChart/BarChart.vue @@ -1,5 +1,5 @@ @@ -34,10 +34,9 @@ export default { { type: 'value', splitLine: { show: false }, - // boundaryGap: false, - // show: true, - // axisLine: { show: false }, - // axisTick: { show: false }, + min: 0, + max: 400, + splitNumber: 5, }, ], yAxis: [ @@ -47,20 +46,19 @@ export default { data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'], axisLine: { show: false }, axisTick: { show: false }, - // splitLine: { show: false }, - // data: ['0', '10', '20'], }, - // { - // show: false, - // type: 'value', - // }, ], series: [ { type: 'bar', - // yAxisIndex: 1, color: `${this.color[0]}`, - barWidth: '10', + barWidth: '20', + label: { + show: true, //开启数值显示 + position: 'insideRight', + color: '#fff', + fontSize: 12, + }, data: [ { value: 200, @@ -92,32 +90,6 @@ export default { }, ], }, - // { - // type: 'line', - // stack: '总量', - // smooth: true, - // lineStyle: { - // width: 2, - // color: `rgba(105,207,76,1)`, - // boxShadow: '10px 10px 10px #000', - // }, - // showSymbol: false, - // areaStyle: { - // opacity: 0.8, - // color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [ - // { - // offset: 0, - // color: `rgba(105,207,76,0.4)`, - // }, - // { - // offset: 1, - // color: `rgba(105,207,76,0)`, - // }, - // ]), - // }, - // emphasis: { focus: 'series' }, - // data: [140, 232, 101, 264, 90, 340, 250], - // }, ], }; }, diff --git a/src/components/LineChart/LineChart.vue b/src/components/LineChart/LineChart.vue index a0a072a..b44c90c 100644 --- a/src/components/LineChart/LineChart.vue +++ b/src/components/LineChart/LineChart.vue @@ -33,8 +33,6 @@ export default { xAxis: [ { type: 'category', - // boundaryGap: false, - // show: true, axisLine: { show: false }, axisTick: { show: false }, data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'], @@ -42,24 +40,14 @@ export default { ], yAxis: [ { - // show: true, type: 'value', splitLine: { show: false }, - data: ['0', '10', '20'], + min: 0, + max: 400, + splitNumber: 5, }, - // { - // show: false, - // type: 'value', - // }, ], series: [ - // { - // type: 'bar', - // yAxisIndex: 1, - // color: `rgba(105,207,76,0.4)`, - // barWidth: '10', - // data: [null, 140, 232, 101, 264, 90, 340, 250, null], - // }, { type: 'line', stack: '总量', diff --git a/src/views/SalarySummary/SalarySummary.vue b/src/views/SalarySummary/SalarySummary.vue index 5d6246c..00513d8 100644 --- a/src/views/SalarySummary/SalarySummary.vue +++ b/src/views/SalarySummary/SalarySummary.vue @@ -100,8 +100,12 @@
-
+
薪资top排行榜
+ +
@@ -269,10 +273,10 @@ export default { methods: { // 选择日期 onChange(date, dateString) { - if (dateString == this.today) { - isCurr = true; + if (dateString == this.currDate) { + this.isCurr = true; } else { - isCurr = false; + this.isCurr = false; } }, @@ -307,6 +311,11 @@ export default { } }); }, + + // 搜索框 + onSearch(value) { + console.log(value); + }, }, }; @@ -381,6 +390,21 @@ export default { color: #595959; } +.right-search { + width: 112px; + height: 24px; + + .search-input { + width: 100% !important; + height: 100%; + } + + /deep/ .ant-input { + padding: 0 11px; + height: 24px; + } +} + .color-gray { color: #929292; } From c53f28bad7f3b91ce017ec1359b8feb6dec69649 Mon Sep 17 00:00:00 2001 From: xuesinan <1404152492@qq.com> Date: Fri, 12 Nov 2021 10:10:37 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E5=91=98=E5=B7=A5=E5=B7=A5=E8=B5=84?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 18 ++--- src/views/SalarySummary/SalarySummary.vue | 4 - src/views/StaffInfo/StaffInfo.vue | 99 +++++++++++++++++++++++ 3 files changed, 108 insertions(+), 13 deletions(-) create mode 100644 src/views/StaffInfo/StaffInfo.vue diff --git a/src/router/index.js b/src/router/index.js index 123e9c4..96d8f9e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -10,25 +10,25 @@ const routes = [ path: '/', name: 'Home', component: Home, - meta: { - title: '考勤', - }, + meta: { title: '考勤' }, }, { path: '/salary', name: 'salary', component: () => import('views/Salary/Salary.vue'), - meta: { - title: '工资表', - }, + meta: { title: '工资表' }, }, { path: '/salary-summary', name: 'salary-summary', component: () => import('views/SalarySummary/SalarySummary.vue'), - meta: { - title: '工资汇总', - }, + meta: { title: '工资汇总' }, + }, + { + path: '/staff-info', + name: 'staff-info', + component: () => import('views/StaffInfo/StaffInfo.vue'), + meta: { title: '员工信息完善' }, }, ]; diff --git a/src/views/SalarySummary/SalarySummary.vue b/src/views/SalarySummary/SalarySummary.vue index 00513d8..988cecc 100644 --- a/src/views/SalarySummary/SalarySummary.vue +++ b/src/views/SalarySummary/SalarySummary.vue @@ -408,8 +408,4 @@ export default { .color-gray { color: #929292; } - -/deep/ .ant-modal { - top: calc(~'50vh - 130px'); -} diff --git a/src/views/StaffInfo/StaffInfo.vue b/src/views/StaffInfo/StaffInfo.vue new file mode 100644 index 0000000..1a48b3e --- /dev/null +++ b/src/views/StaffInfo/StaffInfo.vue @@ -0,0 +1,99 @@ + + + + + From 5eca6edba50163f0b100051385ddb45bd2a9fd2d Mon Sep 17 00:00:00 2001 From: xuesinan <1404152492@qq.com> Date: Fri, 12 Nov 2021 11:02:54 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=89=80=E6=9C=89?= =?UTF-8?q?=E6=88=90=E5=91=98=E7=9A=84=E5=B7=A5=E8=B5=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/api.js | 3 ++ src/views/SalarySummary/SalarySummary.vue | 56 +++++++++++++++++++++-- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/src/config/api.js b/src/config/api.js index fa727ca..8095ce8 100644 --- a/src/config/api.js +++ b/src/config/api.js @@ -16,3 +16,6 @@ export const clockAudit = params => axios.post(`${defaultwbs}/clock/audit`, para // 导出考勤excel export const clockExport = params => axios.post(`${defaultwbs}/clock/export`, params); + +// 查询所有成员工资信息 +export const queryMemberSalary = params => axios.post(`${defaultwbs}/salary/queryMemberSalary`, params); diff --git a/src/views/SalarySummary/SalarySummary.vue b/src/views/SalarySummary/SalarySummary.vue index 988cecc..f9a3daa 100644 --- a/src/views/SalarySummary/SalarySummary.vue +++ b/src/views/SalarySummary/SalarySummary.vue @@ -9,7 +9,7 @@ :default-value="$moment(currDate, monthFormat)" :format="monthFormat" @change="onChange" - :getCalendarContainer="getCalendarContainer()" + @getCalendarContainer="getCalendarContainer()" > @@ -118,6 +118,12 @@ From 050afc435db12300c7ae9750dc3e712f27f7220b Mon Sep 17 00:00:00 2001 From: xuesinan <1404152492@qq.com> Date: Fri, 12 Nov 2021 16:58:26 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E8=A1=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E3=80=81=E5=B7=A5=E8=B5=84=E6=B1=87=E6=80=BB=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E3=80=81=E5=B7=A5=E8=B5=84=E4=BF=A1=E6=81=AF=E8=A1=A8?= =?UTF-8?q?=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 16 +- src/config/api.js | 3 + src/views/Salary/Salary.vue | 333 +++++++++++++++++----- src/views/SalarySummary/SalarySummary.vue | 25 +- 4 files changed, 284 insertions(+), 93 deletions(-) diff --git a/src/App.vue b/src/App.vue index 268b1ed..54a70d2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -17,13 +17,15 @@ export default { }, async created() { - const userId = this.$route.query.uid; - const roleId = this.$route.query.rid; - const params = { userId }; - await this.getUserId(params); - await this.setRoleId(roleId); - await this.getAllMembers({ projectId: this.$route.query.pid }); - this.setProjectId(this.$route.query.pid); + this.$router.onReady(async () => { + const userId = this.$route.query.uid; + const roleId = this.$route.query.rid; + const params = { userId }; + await this.getUserId(params); + await this.setRoleId(roleId); + await this.getAllMembers({ projectId: this.$route.query.pid }); + this.setProjectId(this.$route.query.pid); + }); }, methods: { diff --git a/src/config/api.js b/src/config/api.js index 8095ce8..9933315 100644 --- a/src/config/api.js +++ b/src/config/api.js @@ -19,3 +19,6 @@ export const clockExport = params => axios.post(`${defaultwbs}/clock/export`, pa // 查询所有成员工资信息 export const queryMemberSalary = params => axios.post(`${defaultwbs}/salary/queryMemberSalary`, params); + +// 查询某个员工工资 +export const getMemberSalary = params => axios.post(`${defaultwbs}/salary/getMemberSalary`, params); diff --git a/src/views/Salary/Salary.vue b/src/views/Salary/Salary.vue index 059db46..9de72be 100644 --- a/src/views/Salary/Salary.vue +++ b/src/views/Salary/Salary.vue @@ -1,7 +1,7 @@ diff --git a/src/views/SalarySummary/SalarySummary.vue b/src/views/SalarySummary/SalarySummary.vue index f9a3daa..d53f304 100644 --- a/src/views/SalarySummary/SalarySummary.vue +++ b/src/views/SalarySummary/SalarySummary.vue @@ -263,6 +263,7 @@ export default { ], monthStartTime: '', monthEndTime: '', + dataSalary: [], }; }, @@ -338,22 +339,26 @@ export default { // 获取所有成员薪资信息 async getQueryMemberSalary() { - const params = { param: { projectId, startTime: this.monthStartTime, endTime: this.monthEndTime } }; + const params = { param: { projectId: this.projectId, startTime: this.monthStartTime, endTime: this.monthEndTime } }; try { const res = await queryMemberSalary(params); const { code, msg, data } = res.data; if (code === 200) { - data.forEach(item => { - item.recordList.forEach(clcok => { - clcok.morningVisible = false; - clcok.nightVisible = false; - clcok.showNightTime = false; - clcok.showMorningTime = false; - }); + let dataSalary = []; + data.forEach((item, index) => { + let obj = {}; + obj.key = index + 1; + obj.name = item.memberName; + obj.salary = item.realSalary; + obj.department = '技术'; + obj.position = '前端'; + obj.payrollCard = '111111111111111111'; + + dataSalary.push(obj); }); - - this.clockInfos = [...data]; + console.log(dataSalary); + this.data_all = dataSalary; } else { this.$message.error(msg || '获取失败'); throw msg; From fbda3fa388f69165e3e1d820a0f1d3a609bdfa37 Mon Sep 17 00:00:00 2001 From: xuesinan <1404152492@qq.com> Date: Thu, 23 Dec 2021 16:49:09 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E6=89=93=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/List/List.vue | 218 +++++++++++++++++++++++++++++++---- 1 file changed, 194 insertions(+), 24 deletions(-) diff --git a/src/components/List/List.vue b/src/components/List/List.vue index 7bcf6ba..d1b2c7a 100644 --- a/src/components/List/List.vue +++ b/src/components/List/List.vue @@ -33,12 +33,11 @@ {{ $moment(record.morning - 0).format('HH:mm') }} - 未打卡 + 未打卡 打卡 @@ -119,12 +118,11 @@ {{ $moment(record.night - 0).format('HH:mm') }} - 未打卡 + 未打卡 打卡 @@ -186,7 +184,7 @@