diff --git a/src/api/health-user.js b/src/api/health-user.js index a7fda79..4e5dd7f 100644 --- a/src/api/health-user.js +++ b/src/api/health-user.js @@ -1,6 +1,13 @@ import request from '@/config/request'; export const APIHealthUser = { - addPerson //添加人员 + addPerson, //添加人员 + personList, //人员列表 + personInfo, //详情人员信息 + updatePerson, //修改人员信息 + deletePerson, // 删除人员信息 + getHomeData, //今日体征感知 + getHisData, //体征历史数据 + getCalendar //体征历史数据日历 }; export default APIHealthUser; function addPerson(params) { @@ -10,3 +17,54 @@ function addPerson(params) { data: params }); } +function personList(data) { + return request({ + url: `/api/HealthyUser/PersonList`, + method: 'get', + params: data + }); +} +function personInfo(data) { + return request({ + url: `/api/HealthyUser/PersonInfo`, + method: 'get', + params: data + }); +} +function updatePerson(params) { + return request({ + url: `/api/HealthyUser/UpdatePerson`, + method: 'post', + data: params + }); +} +function deletePerson(data) { + return request({ + url: `/api/HealthyUser/DeletePerson`, + method: 'post', + params: data + }); +} + +function getHomeData(data) { + return request({ + url: `/api/HealthyData/GetHomeData`, + method: 'post', + params: data + }); +} + +function getHisData(params) { + return request({ + url: `/api/HealthyData/GetHisData`, + method: 'post', + data: params + }); +} +function getCalendar(data) { + return request({ + url: `/api/HealthyData/GetCalendar`, + method: 'post', + params: data + }); +} diff --git a/src/api/psychological.js b/src/api/psychological.js index 8256153..8ab9d9c 100644 --- a/src/api/psychological.js +++ b/src/api/psychological.js @@ -11,7 +11,10 @@ service.interceptors.request.use(request => { return request; }); export const APIPsy = { - getHomeData + getHomeData, + getCalendarData, + getProgress, + getComprehensiveEvaluation //当天三大指标综合总评 }; export default APIPsy; function getHomeData(data) { @@ -21,3 +24,24 @@ function getHomeData(data) { params: data }); } +function getCalendarData(data) { + return service({ + url: `/api/Data/GetCalendarData`, + method: 'get', + params: data + }); +} +function getProgress(data) { + return service({ + url: `/api/Question/Progress`, + method: 'get', + params: data + }); +} +function getComprehensiveEvaluation(data) { + return service({ + url: `/api/Data/GetComprehensiveEvaluation`, + method: 'get', + params: data + }); +} diff --git a/src/assets/today/images/2_39.png b/src/assets/today/images/2_39.png new file mode 100644 index 0000000..85a58b5 Binary files /dev/null and b/src/assets/today/images/2_39.png differ diff --git a/src/assets/today/images/2_62.png b/src/assets/today/images/2_62.png new file mode 100644 index 0000000..67d7129 Binary files /dev/null and b/src/assets/today/images/2_62.png differ diff --git a/src/components/DateSwitch.vue b/src/components/DateSwitch.vue index 8d4ea11..dbc7925 100644 --- a/src/components/DateSwitch.vue +++ b/src/components/DateSwitch.vue @@ -34,7 +34,8 @@ export default { // 当前月份,从 0(一月)开始 currentMonth: new Date().getMonth(), // 当前年份 - currentYear: new Date().getFullYear() + currentYear: new Date().getFullYear(), + weekObj: {} }; }, watch: { @@ -70,12 +71,13 @@ export default { break; case 'week': this.checkDate(dateType, this.$own.getNowFormatDate(this.count)); + this.$emit('updateDate', this.weekObj); break; case 'month': this.date = this.checkDate(dateType, this.date); + this.$emit('updateDate', this.formatDate(this.date)); break; } - this.$emit('updateDate', this.formatDate(this.date)); }, onPrevious() {}, onNext() {}, @@ -182,18 +184,30 @@ export default { this.setDate(this.addDate(this.currentFirstDate, -7)); this.date = this.timeStamp[0] + '~' + this.timeStamp[6]; this.weekDate = this.timeStamp[0]; + this.weekObj = { + start: this.timeStamp[0], + end: this.timeStamp[6] + }; }, // 下一周 nextWeek() { this.setDate(this.addDate(this.currentFirstDate, 7)); this.date = this.timeStamp[0] + '~' + this.timeStamp[6]; this.weekDate = this.timeStamp[0]; + this.weekObj = { + start: this.timeStamp[0], + end: this.timeStamp[6] + }; }, // 这周 currentWeek(date) { this.setDate(this.addDate(new Date(), -1)); this.date = this.timeStamp[0] + '~' + this.timeStamp[6]; this.weekDate = new Date(date).Format('yyyy-MM-dd'); + this.weekObj = { + start: this.timeStamp[0], + end: this.timeStamp[6] + }; }, // 上一月 preMonth() { @@ -274,12 +288,13 @@ export default { if (this.dateType === 'week') { // 如果是周报,则不用返回 this.checkDate(this.dateType, this.$own.getNowFormatDate(this.count), 'add'); + this.$emit('updateDate', this.weekObj); } else { this.nextMonth(); + this.$emit('updateDate', this.formatDate(this.date)); /* this.date = this.checkDate(this.dateType, this.$own.getNowFormatDate(this.count)); */ } this.isPreClick = true; - this.$emit('updateDate', this.formatDate(this.date)); } else { // 上一个 if (this.clickFlag && this.isPreClick) { @@ -287,7 +302,7 @@ export default { if (this.dateType === 'week') { // 如果是周报,则不用返回 this.checkDate(this.dateType, this.$own.getNowFormatDate(this.count), 'pre'); - this.$emit('updateDate', this.formatDate(this.date)); + this.$emit('updateDate', this.weekObj); } else if (this.dateType === 'month') { this.preMonth(); if (this.count <= -12) { diff --git a/src/components/SubmenuList.vue b/src/components/SubmenuList.vue index bd35044..491a82a 100644 --- a/src/components/SubmenuList.vue +++ b/src/components/SubmenuList.vue @@ -11,7 +11,7 @@
- +
{{ item.text }} @@ -107,13 +107,13 @@ export default { break; } } - } else { + } /* else { this.$dialog.confirm({ title: '提示', message: `功能开发中`, showCancelButton: false }); - } + } */ }, onClick(model) { let val = null; @@ -180,7 +180,7 @@ export default { padding-left: 20px; display: grid; grid-template-columns: repeat(4, auto); - grid-gap: 20px; + grid-gap: 50px; .item { position: relative; /* height: 140px; */ diff --git a/src/components/TopNavBar.vue b/src/components/TopNavBar.vue index 69a8f0d..36ae2f7 100644 --- a/src/components/TopNavBar.vue +++ b/src/components/TopNavBar.vue @@ -1,9 +1,15 @@