From b178417ffb441f1dc96ff8b5b01ecf2dcd76cf08 Mon Sep 17 00:00:00 2001 From: chenJinxu <2183691628@qq.com> Date: Fri, 22 Dec 2023 16:53:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E6=B4=9E=E6=82=89?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=20=E5=A2=9E=E5=8A=A0=20=E6=83=85=E7=BB=AA?= =?UTF-8?q?=E5=91=A8=E6=8A=A5=E8=AF=A6=E6=83=85=20=E5=A2=9E=E5=8A=A0=20Jen?= =?UTF-8?q?kins=E9=83=A8=E7=BD=B2=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- h5_frontend_web_run.sh | 37 ++++++++ health_student_web_run.sh | 29 ++++++ package.json | 1 + setup_development.sh | 19 ++++ setup_production.sh | 29 ++++++ setup_test.sh | 29 ++++++ src/views/insight/index.vue | 158 ++++++++++++++++++++++++++++--- src/views/myself/index.vue | 10 +- src/views/today/report.vue | 69 +++++++++----- src/views/today/scss/report.scss | 59 ++++++------ 10 files changed, 368 insertions(+), 72 deletions(-) create mode 100644 h5_frontend_web_run.sh create mode 100644 health_student_web_run.sh create mode 100644 setup_development.sh create mode 100644 setup_production.sh create mode 100644 setup_test.sh diff --git a/h5_frontend_web_run.sh b/h5_frontend_web_run.sh new file mode 100644 index 0000000..d082141 --- /dev/null +++ b/h5_frontend_web_run.sh @@ -0,0 +1,37 @@ +#!/bin/bash +### + # @Date: 2022-08-18 09:19:07 + # @LastEditors: JinxChen + # @LastEditTime: 2022-08-18 10:06:40 + # @FilePath: \TelpoH5FrontendWeb\h5_frontend_web_run.sh + # @description: 部署脚本 +### + +environment=$1 +version=$2 +echo "环境变量为${environment},版本为$version!" +if [[ ${environment} = 'production' ]]; +then + echo "开始远程构建容器" + docker stop h5_frontend_web || true; + docker rm h5_frontend_web || true; + docker rmi -f $(docker images | grep registry.cn-shanghai.aliyuncs.com/tolpo_platform/h5_frontend_web | awk '{print $3}') + #docker login --username=telpo_linwl@1111649216405698 --password=telpo#1234 registry.cn-shanghai.aliyuncs.com; + #docker login --username=telpo_fengjj@1111649216405698 --password=PWDaliyun123 registry.cn-shanghai.aliyuncs.com + docker login --username=rzl_wangjx@1111649216405698 --password=telpo.123 registry.cn-shanghai.aliyuncs.com + docker pull registry.cn-shanghai.aliyuncs.com/tolpo_platform/h5_frontend_web:$version + docker run -p 8075:80 -d --restart=always --name h5_frontend_web registry.cn-shanghai.aliyuncs.com/tolpo_platform/h5_frontend_web:$version; + #删除产生的None镜像 + docker rmi -f $(docker images | grep none | awk '{print $3}') + docker ps -a +else + echo "开始在测试环境远程构建容器" + docker stop h5_frontend_web || true + docker rm h5_frontend_web || true + docker rmi -f $(docker images | grep 139.224.254.18:5000/h5_frontend_web | awk '{print $3}') + docker pull 139.224.254.18:5000/h5_frontend_web:$version + docker run -p 8075:80 -d --restart=always --name h5_frontend_web 139.224.254.18:5000/h5_frontend_web:$version; + #删除产生的None镜像 + docker rmi -f $(docker images | grep none | awk '{print $3}') + docker ps -a +fi \ No newline at end of file diff --git a/health_student_web_run.sh b/health_student_web_run.sh new file mode 100644 index 0000000..65d9f7e --- /dev/null +++ b/health_student_web_run.sh @@ -0,0 +1,29 @@ + +environment=$1 +version=$2 +echo "环境变量为${environment},版本为$version!" +if [[ ${environment} = 'production' ]]; +then + echo "开始远程构建容器" + docker stop health_student_web || true; + docker rm health_student_web || true; + docker rmi -f $(docker images | grep registry.cn-shanghai.aliyuncs.com/tolpo_platform/health_student_web | awk '{print $3}') + #docker login --username=telpo_linwl@1111649216405698 --password=telpo#1234 registry.cn-shanghai.aliyuncs.com; + #docker login --username=telpo_fengjj@1111649216405698 --password=PWDaliyun123 registry.cn-shanghai.aliyuncs.com + docker login --username=rzl_wangjx@1111649216405698 --password=telpo.123 registry.cn-shanghai.aliyuncs.com + docker pull registry.cn-shanghai.aliyuncs.com/tolpo_platform/health_student_web:$version + docker run -p 8070:80 -d --restart=always --name health_student_web registry.cn-shanghai.aliyuncs.com/tolpo_platform/health_student_web:$version; + #删除产生的None镜像 + docker rmi -f $(docker images | grep none | awk '{print $3}') + docker ps -a +else + echo "开始在测试环境远程构建容器" + docker stop health_student_web || true + docker rm health_student_web || true + docker rmi -f $(docker images | grep 139.224.254.18:5000/health_student_web | awk '{print $3}') + docker pull 139.224.254.18:5000/health_student_web:$version + docker run -p 8070:80 -d --restart=always --name health_student_web 139.224.254.18:5000/health_student_web:$version; + #删除产生的None镜像 + docker rmi -f $(docker images | grep none | awk '{print $3}') + docker ps -a +fi \ No newline at end of file diff --git a/package.json b/package.json index 611d81d..22dd2b3 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", + "build-test": "vue-cli-service build --mode test", "lint": "vue-cli-service lint", "deps": "yarn upgrade-interactive --latest", "dev": "vue-cli-service serve --mode development", diff --git a/setup_development.sh b/setup_development.sh new file mode 100644 index 0000000..680279c --- /dev/null +++ b/setup_development.sh @@ -0,0 +1,19 @@ + +npm -v +npm config set registry https://registry.npm.taobao.org +npm install +npm run build-dev +image_version=`date +%Y%m%d%H%M`; +docker stop health_student_web || true; +docker rm health_student_web || true; +# 删除镜像 +docker rmi -f $(docker images | grep telpo/health_student_web | awk '{print $3}') +# 构建telpo/mrp:$image_version镜像 +docker build --no-cache . -t telpo/health_student_web:$image_version; +#删除产生的None镜像 +docker rmi -f $(docker images | grep none | awk '{print $3}') +# 查看镜像列表 +docker images; +docker run -p 8070:80 -d --restart=always --name health_student_web telpo/health_student_web:$image_version; +# 查看日志 +docker logs health_student_web; \ No newline at end of file diff --git a/setup_production.sh b/setup_production.sh new file mode 100644 index 0000000..f5af834 --- /dev/null +++ b/setup_production.sh @@ -0,0 +1,29 @@ +#!/bin/bash +### + # @Date: 2022-08-18 09:19:07 + # @LastEditors: JinxChen + # @LastEditTime: 2022-08-18 09:29:15 + # @FilePath: \TelpoH5FrontendWeb\setup_production.sh + # @description: +### +npm -v +npm config set registry https://registry.npm.taobao.org +npm install +npm run build +image_version=$version; +# 删除镜像 + docker rmi -f $(docker images | grep registry.cn-shanghai.aliyuncs.com/tolpo_platform/health_student_web | awk '{print $3}') +# 构建telpo/mrp:$image_version镜像 +docker build --no-cache . -t telpo/health_student_web:$image_version; +#TODO:推送镜像到阿里仓库 +echo '=================开始推送镜像=======================' +#docker login --username=telpo_linwl@1111649216405698 --password=telpo#1234 registry.cn-shanghai.aliyuncs.com +#docker login --username=telpo_fengjj@1111649216405698 --password=PWDaliyun123 registry.cn-shanghai.aliyuncs.com +docker login --username=rzl_wangjx@1111649216405698 --password=telpo.123 registry.cn-shanghai.aliyuncs.com +docker tag telpo/health_student_web:$image_version registry.cn-shanghai.aliyuncs.com/tolpo_platform/health_student_web:$image_version +docker push registry.cn-shanghai.aliyuncs.com/tolpo_platform/health_student_web:$image_version +echo '=================推送镜像完成=======================' +#删除产生的None镜像 +docker rmi -f $(docker images | grep none | awk '{print $3}') +# 查看镜像列表 +docker images; \ No newline at end of file diff --git a/setup_test.sh b/setup_test.sh new file mode 100644 index 0000000..3a6d74c --- /dev/null +++ b/setup_test.sh @@ -0,0 +1,29 @@ + +### + # @Date: 2022-08-18 09:19:07 + # @LastEditors: JinxChen + # @LastEditTime: 2022-08-18 09:29:35 + # @FilePath: \TelpoH5FrontendWeb\setup_test.sh + # @description: +### +#!/bin/bash +npm -v +npm config set registry https://registry.npm.taobao.org +npm install +npm run build-test +image_version=$version; +# 删除镜像 +docker rmi -f $( + docker images | grep 139.224.254.18:5000/h5_frontend_web | awk '{print $3}' +) +# 构建telpo/mrp:$image_version镜像 +docker build --no-cache . -t health_student_web:$image_version; +#TODO:推送镜像到私有仓库 +echo '=================开始推送镜像=======================' +docker tag health_student_web:$image_version 139.224.254.18:5000/h5_frontend_web:$image_version +docker push 139.224.254.18:5000/h5_frontend_web:$image_version +echo '=================推送镜像完成=======================' +#删除产生的None镜像 +docker rmi -f $(docker images | grep none | awk '{print $3}') +# 查看镜像列表 +docker images; \ No newline at end of file diff --git a/src/views/insight/index.vue b/src/views/insight/index.vue index 60c9e14..82eb48f 100644 --- a/src/views/insight/index.vue +++ b/src/views/insight/index.vue @@ -6,15 +6,20 @@
-
+
-
kdfdfkjhsojldkfho
-
+
2023-11-28~2023-11-24
+
-
情绪感知
+
+
情绪感知
+
+ 详情 > +
+
{{ item.name }}{{ emotionList[emotionActive].name }}倾向
-
体征感知
+
+
体征感知
+
+ 详情 > +
+
+
{{ item.name }}
+ +
+

身高:170cm

+

体重:60kg

+

BMI:24.5

+

{{ bmi.result }}

+ 更新 +
@@ -84,10 +103,48 @@
+

运动步数

+
+
+
+

总步数:285

+
+ + 923 +
+
+
+

平均步数:285

+
+ + 923 +
+
+
+
+

热量消耗

+
+
+
+

总消耗:285

+
+ + 923 +
+
+
+

平均消耗:285

+
+ + 923 +
+
+
+
@@ -178,7 +235,15 @@ export default { type: 'severe', color: '#FF5F8B' } - ] + ], + bmi: { + height: '170', + weight: '57', + value: '24.5', + result: '肥胖' + }, + upImg: require('@/assets/today/icons/up.png'), + downImg: require('@/assets/today/icons/down.png') }; }, created() {}, @@ -701,19 +766,19 @@ export default { if (!point) { option.series = [ - { + { type: 'bar', barMaxWidth: 15, label: { show: true, color: '#000', - position: 'outside', + position: 'outside' }, itemStyle: { borderRadius: 12 } - }, - ] + } + ]; } return option; @@ -725,6 +790,14 @@ export default { onSignClick(index) { this.signActive = index; // 体征选项变化重新渲染图表 + }, + onRouterTo(name) { + this.$router.push({ + name: 'report', + query: { + name: name + } + }); } } }; @@ -774,10 +847,36 @@ export default { font-size: 45px; } } + .bmi { + display: flex; + justify-content: flex-start; + align-items: center; + white-space: nowrap; + padding: 40px 8px 0 8px; + font-weight: bold; + + p { + padding: 0 5px; + font-size: 28px; + } + .van-button { + padding: 5px 10px; + margin-left: 50px; + font-size: 14px; + color: #333; + border-radius: 30px; + } + } .label { font-size: 40px; font-weight: bold; - padding: 30px 0; + padding: 30px 10px 30px 0; + display: flex; + justify-content: space-between; + align-items: center; + .right { + font-size: 30px; + } } .ChatBox { overflow: hidden; @@ -786,7 +885,9 @@ export default { border: 2px solid #cdf348; border-radius: 70px; margin-top: 30px; - + h4 { + padding: 40px 0 10px 60px; + } .legendBox { width: 100%; height: 150px; @@ -899,11 +1000,40 @@ export default { } .Chat { width: calc(100vw - 60px); - height: 450px; + height: 500px; + } + .result { + height: 140px; + padding: 0 30px; + border-radius: 70px; + display: flex; + justify-content: center; + align-items: flex-start; + flex-direction: column; + .wrapBox { + padding: 10px 180px 10px 60px; + width: 100%; + background-color: #e6e6e6; + border-radius: 70px; + } + .text { + display: flex; + justify-content: space-between; + align-items: center; + .right { + @include center(); + img { + height: 30px; + width: 30px; + object-fit: contain; + margin: 0 5px; + } + } + } } } .minChartBox { - height: 450px; + height: 760px; } .hiddenChart { width: 0; diff --git a/src/views/myself/index.vue b/src/views/myself/index.vue index 177ff31..d0b48e6 100644 --- a/src/views/myself/index.vue +++ b/src/views/myself/index.vue @@ -245,7 +245,7 @@ export default { }, getDeviceList() { ToastService.loading({ message: '正在加载', forbidClick: false }); - let that = this; + /* let that = this; */ APIDevice.deviceList({ userId: this.$store.getters.userId, mapType: 'gaode', @@ -267,12 +267,16 @@ export default { if (isNotNull(item.devicesList)) { this.currentDevice = { ...item.devicesList[0] }; - item.devicesList.forEach(val => { + this.$store.commit('roleUser', item.devicesList[0].roleUser); + this.$store.commit('deviceType', item.devicesList[0].deviceType); + this.$store.commit('deviceId', item.devicesList[0].deviceId); + this.$store.commit('serialNo', item.devicesList[0].serialNo); + /* item.devicesList.forEach(val => { if (val.deviceId == that.$store.getters.deviceId) { this.$store.commit('roleUser', val.roleUser); this.$store.commit('deviceType', val.deviceType); } - }); + }); */ } else { this.$store.commit('deviceId', ''); this.$store.commit('serialNo', ''); diff --git a/src/views/today/report.vue b/src/views/today/report.vue index 553e7e9..fb82907 100644 --- a/src/views/today/report.vue +++ b/src/views/today/report.vue @@ -1,10 +1,10 @@