Kaynağa Gözat

Merge branch 'feat' into test

test
chenJinxu 1 yıl önce
ebeveyn
işleme
570c19e2c7
6 değiştirilmiş dosya ile 91 ekleme ve 26 silme
  1. +11
    -1
      README.md
  2. +3
    -3
      package.json
  3. +1
    -1
      src/config/models.js
  4. +1
    -1
      src/views/health/psychological/index.vue
  5. +18
    -5
      src/views/health/psychological/report/index.scss
  6. +57
    -15
      src/views/health/psychological/report/index.vue

+ 11
- 1
README.md Dosyayı Görüntüle

@@ -786,4 +786,14 @@ update
fix fix
- 心理监测详情 - 心理监测详情
- 修复 图表连线点颜色显示不正确的问题 - 修复 图表连线点颜色显示不正确的问题
- 修复 选项菜单显示异常的问题
- 修复 选项菜单显示异常的问题


## v1.0.99
`2023.11.9`
fix
- 心理监测详情
- 周报列表
- 优化 列表显示
- 周报详情
- 增加 对比比例显示

+ 3
- 3
package.json Dosyayı Görüntüle

@@ -15,8 +15,10 @@
"@vant/area-data": "^1.2.2", "@vant/area-data": "^1.2.2",
"amfe-flexible": "^2.2.1", "amfe-flexible": "^2.2.1",
"axios": "^0.26.0", "axios": "^0.26.0",
"clipboard": "^2.0.11",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"dayjs": "^1.11.7", "dayjs": "^1.11.7",
"echarts": "^5.4.1",
"html2canvas": "^1.4.1", "html2canvas": "^1.4.1",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"rxjs": "^7.8.0", "rxjs": "^7.8.0",
@@ -24,9 +26,7 @@
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-router": "^3.2.0", "vue-router": "^3.2.0",
"vuex": "^3.4.0", "vuex": "^3.4.0",
"weixin-js-sdk": "^1.6.0",
"clipboard": "^2.0.11",
"echarts": "^5.4.1"
"weixin-js-sdk": "^1.6.0"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^4.5.0", "@vue/cli-plugin-babel": "^4.5.0",


+ 1
- 1
src/config/models.js Dosyayı Görüntüle

@@ -5,7 +5,7 @@
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js * @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description: * @description:
*/ */
export const VERSION_MODEL = '1.0.98F'; //版本号
export const VERSION_MODEL = '1.0.99F'; //版本号
export const IMAGE_URL = { export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/', production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/', test: 'http://zfb.ssjlai.com/web/',


+ 1
- 1
src/views/health/psychological/index.vue Dosyayı Görüntüle

@@ -1325,7 +1325,7 @@ export default {
summaryLevel: item.SummaryLevel, summaryLevel: item.SummaryLevel,
type: this.emoType type: this.emoType
} }
});
}).reverse();
this.$toast.success('数据加载完成'); this.$toast.success('数据加载完成');
}) })
}, },


+ 18
- 5
src/views/health/psychological/report/index.scss Dosyayı Görüntüle

@@ -163,9 +163,16 @@
} }


.item-right { .item-right {
display: flex;
justify-content: center;
align-items: center;
@include center();
}
.status {
padding: 0 5px;
@include center();
img {
height: 15px;
width: 9px;
padding: 0 5px ;
}
} }
} }
} }
@@ -279,14 +286,20 @@
font-size: 14px; font-size: 14px;
padding: 0; padding: 0;
color: #666666; color: #666666;

@include center();
/* align-items: flex-end; */
.day { .day {
/* padding: 5px; */ /* padding: 5px; */
font-size: 28px; font-size: 28px;
} }


.day-text { .day-text {
font-size: 12px
font-size: 12px;
padding: 0 5px;
}
img {
height: 15px;
width: 9px;
} }
} }
} }


+ 57
- 15
src/views/health/psychological/report/index.vue Dosyayı Görüntüle

@@ -59,6 +59,11 @@
:style="{color: item.color}" :style="{color: item.color}"
>{{ item.percentage ? '(' + item.percentage + '%' + ')' : '(0%)'}}</label> >{{ item.percentage ? '(' + item.percentage + '%' + ')' : '(0%)'}}</label>
</div> </div>

<div class="status">
<img :src="calcImg(item.scale)" alt="" />
<span v-if="item.scale != 0" :style="{color: item.color}">{{ Math.abs(item.scale)}}%</span>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -103,6 +108,8 @@
<p> <p>
<span :style="{color: item.color}" class="day">{{ item.days }}</span> <span :style="{color: item.color}" class="day">{{ item.days }}</span>
<span class="day-text">天</span> <span class="day-text">天</span>
<img :src="calcWeekImg(item.days, item.lastDay)" alt="">
<span class="day-text status">{{ calcWeekImg(item.days, item.lastDay, true) }}</span>
</p> </p>
<p>{{ item.text }}</p> <p>{{ item.text }}</p>
</div> </div>
@@ -221,6 +228,8 @@ export default {
], ],
params: {}, params: {},
weekResult: {}, weekResult: {},
upImg: require("@/assets/img/psychological/up.png"),
downImg: require("@/assets/img/psychological/down.png")
} }
}, },
created() { created() {
@@ -506,6 +515,30 @@ export default {
}, },
}, },
methods: { methods: {
calcWeekImg(cur, last, callBackText) {
let imgurl = '';
let text = '';
if(isNotNull(cur) && isNotNull(last) && this.weekAndMonData.length > 0) {
let curNumber = Number(cur);
let latNumber = Number(last);
if(curNumber - latNumber == 0) {
text = '持平';
} else {
imgurl = curNumber < latNumber ? this.downImg : this.upImg;
text = Math.abs(curNumber - latNumber) + '天';
}
if(callBackText) {
return text
} else {
return imgurl
}
}
},
calcImg(value) {
let imgUrl = '';
imgUrl = value > 0 ? this.upImg : value == 0 ? '' : this.downImg
return imgUrl;
},
async loadParams() { async loadParams() {
let params = this.$route.query; let params = this.$route.query;
if (params) { if (params) {
@@ -592,10 +625,8 @@ export default {
params: { ...reqParams }, params: { ...reqParams },
/* headers: { 'AccessToken': this.$store.getters.ssjlToken } */ /* headers: { 'AccessToken': this.$store.getters.ssjlToken } */
}).then(res => { }).then(res => {
console.log("res", res);
const data = res.data.response; const data = res.data.response;
let chartData = data.ChartData ? (JSON.parse(data.ChartData)).filter(item => {return item.Key}) : []; let chartData = data.ChartData ? (JSON.parse(data.ChartData)).filter(item => {return item.Key}) : [];
console.log("图表数据", chartData);
if(data) { if(data) {
this.monitoringCount = data.Total; this.monitoringCount = data.Total;
this.pieRightList = []; this.pieRightList = [];
@@ -608,37 +639,41 @@ export default {
count: data.None, count: data.None,
percentage: this.calcPercentage( percentage: this.calcPercentage(
data.None, data.None,
data.Count
data.Total
), ),
text: `无${this.emoName}倾向`, text: `无${this.emoName}倾向`,
color: "#62BD48"
color: "#62BD48",
scale: data.NoneRatio
}; };
let Mild = { let Mild = {
count: data.Mild, count: data.Mild,
percentage: this.calcPercentage( percentage: this.calcPercentage(
data.Mild, data.Mild,
data.Count
data.Total
), ),
text: `轻度${this.emoName}倾向`, text: `轻度${this.emoName}倾向`,
color: "#ffde00"
color: "#ffde00",
scale: data.MildRatio
}; };
let Moderate = { let Moderate = {
count: data.Moderate, count: data.Moderate,
percentage: this.calcPercentage( percentage: this.calcPercentage(
data.Moderate, data.Moderate,
data.Count
data.Total
), ),
text: `中度${this.emoName}倾向`, text: `中度${this.emoName}倾向`,
color: "#ff8a00"
color: "#ff8a00",
scale: data.ModerateRatio
}; };
let Severe = { let Severe = {
count: data.Severe, count: data.Severe,
percentage: this.calcPercentage( percentage: this.calcPercentage(
data.Severe, data.Severe,
data.Count
data.Total
), ),
text: `重度${this.emoName}倾向`, text: `重度${this.emoName}倾向`,
color: "#d70d0d"
color: "#d70d0d",
scale: data.SevereRatio
}; };
// 饼状图右边数据 // 饼状图右边数据
this.pieRightList.push(None); this.pieRightList.push(None);
@@ -682,22 +717,30 @@ export default {
let NoneDay = { let NoneDay = {
days: data.NoneDay, days: data.NoneDay,
text: `无${this.emoName}倾向`, text: `无${this.emoName}倾向`,
color: "#62BD48"
color: "#62BD48",
lastDay: data.LastNoneDay,
scale: data.NoneDayRatio
}; };
let MildDay = { let MildDay = {
days: data.MildDay, days: data.MildDay,
text: `轻度${this.emoName}倾向`, text: `轻度${this.emoName}倾向`,
color: "#ffde00"
color: "#ffde00",
lastDay: data.LastMildDay,
scale: data.MildDayRatio
}; };
let ModerateDay = { let ModerateDay = {
days: data.ModerateDay, days: data.ModerateDay,
text: `中度${this.emoName}倾向`, text: `中度${this.emoName}倾向`,
color: "#ff8a00"
color: "#ff8a00",
lastDay: data.LastModerateDay,
scale: data.ModerateDayRatio
}; };
let SevereDay = { let SevereDay = {
days: data.SevereDay, days: data.SevereDay,
text: `重度${this.emoName}倾向`, text: `重度${this.emoName}倾向`,
color: "#d70d0d"
color: "#d70d0d",
lastDay: data.LastSevereDay,
scale: data.SevereDayRatio
}; };
this.emotionList.push(NoneDay); this.emotionList.push(NoneDay);
this.emotionList.push(MildDay); this.emotionList.push(MildDay);
@@ -718,7 +761,6 @@ export default {
}; };
}); });
this.xAxisData = chartData.map(item => { this.xAxisData = chartData.map(item => {
console.log("item", item);
return item.Key ? this.$dayjs(item.Key.replace(/-/g, "/")).format( return item.Key ? this.$dayjs(item.Key.replace(/-/g, "/")).format(
"MM/DD" "MM/DD"
) : item.key; ) : item.key;


Yükleniyor…
İptal
Kaydet