From 6b9c34f458b7ec43e77278e4cdeb8c321dddf4cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=8A=B2=E9=BE=99?= <2860996570@qq.com> Date: Mon, 18 Dec 2023 14:32:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=A7=E5=93=81=E7=94=BB?= =?UTF-8?q?=E5=83=8F=E6=A3=80=E9=AA=8C=E6=A3=80=E6=B5=8B=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E8=89=AF=E5=8F=8D=E5=BA=94=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/myAPI/login.js | 12 +- src/main.js | 19 +-- src/utils/request.js | 4 +- .../bigpage/bigcomponents/AdverseBox.vue | 69 +++++++--- .../bigcomponents/ChangeinformationList.vue | 2 +- .../bigpage/bigcomponents/informationBox.vue | 121 +++++++++++------- src/views/bigpage/index.vue | 5 +- src/views/components/Pagination.vue | 2 +- src/views/index.vue | 3 +- 9 files changed, 156 insertions(+), 81 deletions(-) diff --git a/src/api/myAPI/login.js b/src/api/myAPI/login.js index b5da98d..4d94585 100644 --- a/src/api/myAPI/login.js +++ b/src/api/myAPI/login.js @@ -1,8 +1,8 @@ import request from "@/utils/request"; // 本地 -// let api = "API" +let api = "API" // 线上 -let api = location.origin +// let api = location.origin export default { frimLogin() { return request({ @@ -16,10 +16,10 @@ export default { method: "POST", timeout: 60000, data: { - pdma: "Q2V0YzI4QGNvbQ==", - urne: "2112042170015", - // pdma: "MTExMTEx", - // urne: "2112042170015", + // pdma: "Q2V0YzI4QGNvbQ==", + // urne: "2112042170015", + pdma: "MTExMTEx", + urne: "2112042170015", }, }); }, diff --git a/src/main.js b/src/main.js index 82ef462..23a64b2 100644 --- a/src/main.js +++ b/src/main.js @@ -71,14 +71,14 @@ DictData.install() import { setToken } from '@/utils/auth' // 临时获取token -// let token = async () => { -// let Authentication = await API.login.frimLogin(); -// localStorage.setItem( -// "MSSM-LIAONING__TOKEN", -// Authentication.data.result.userToken -// ); -// } -// token() +let token = async () => { + let Authentication = await API.login.frimLogin(); + localStorage.setItem( + "MSSM-LIAONING__TOKEN", + Authentication.data.result.userToken + ); +} +token() let infor = async () => { let response = await API.login.getuserinfo(); localStorage.setItem("userDto", JSON.stringify(response?.result.userDto)); @@ -94,7 +94,10 @@ infor() * Currently MockJs will be used in the production environment, * please remove it before going online! ! ! */ +/* + +*/ Vue.use(Element, { size: Cookies.get('size') || 'medium' // set element-ui default size }) diff --git a/src/utils/request.js b/src/utils/request.js index b881ccf..ba7ecc3 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -15,9 +15,9 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' // 创建axios实例 const service = axios.create({ // axios中请求配置有baseURL选项,表示请求URL公共部分 - // baseURL: process.env.VUE_APP_BASE_API, + baseURL: process.env.VUE_APP_BASE_API, //!线上 - baseURL:location.origin, + // baseURL:location.origin, // 超时 timeout: 10000 }) diff --git a/src/views/bigpage/bigcomponents/AdverseBox.vue b/src/views/bigpage/bigcomponents/AdverseBox.vue index f5ae233..8ee3e17 100644 --- a/src/views/bigpage/bigcomponents/AdverseBox.vue +++ b/src/views/bigpage/bigcomponents/AdverseBox.vue @@ -28,7 +28,7 @@
-
较去年
+
较去年
@@ -44,7 +44,7 @@
-
较去年
+
较去年
@@ -55,20 +55,20 @@
-
+
-
+
-
一般不良反应
+
{{ item.name }}
-
0%
+
{{item.percent}}%
-
+ +
@@ -115,6 +115,7 @@ export default { option1: {}, // echarts myChart1: {}, + a1: 0, a2: 0, a3: 0, @@ -133,10 +134,24 @@ export default { name: "发生死亡不良反应", }, ], + pieDatalist: [ + { + percent: 0, + name: "一般不良反应", + }, + { + percent: 0, + name: "严重不良反应", + }, + { + percent: 0, + name: "发生死亡不良反应", + }, + ], total: 0, }; }, - created() {}, + created() { }, mounted() { this.getData(); }, @@ -376,6 +391,13 @@ export default { normal: { show: false, formatter: "", + formatter: (params)=> { + + if (params.name == "一般不良反应") this.pieDatalist[0].percent = params.percent || 0; + if (params.name == "严重不良反应") this.pieDatalist[1].percent = params.percent || 0; + if (params.name == "发生死亡不良反应") this.pieDatalist[2].percent = params.percent || 0; + return (params.percent || 0) + "%"; + }, textStyle: { fontSize: 12, }, @@ -447,7 +469,7 @@ export default { background-repeat: no-repeat; background-position: bottom; - > div { + >div { display: flex; align-items: center; } @@ -505,6 +527,7 @@ export default { .topbox-item-right { flex: 1; + .redStyle { font-size: 16px; font-family: Alibaba PuHuiTi; @@ -515,6 +538,7 @@ export default { -webkit-text-fill-color: transparent; margin-right: 5px; } + div { font-size: 16px; font-family: Alibaba PuHuiTi; @@ -542,6 +566,7 @@ export default { } } } + .footers { height: calc(100% - 120px); display: flex; @@ -550,11 +575,13 @@ export default { height: 100%; width: 50%; padding: 10px; + .bottom-box { height: 100%; width: 100%; } } + .rights { height: 100%; padding-left: 15px; @@ -569,25 +596,30 @@ export default { display: flex; align-items: center; position: relative; + .ptleftbox { width: 12%; height: 100%; + .rectangular1 { height: 8px; width: 8px; background: #2e87e8; } + .rectangular2 { height: 8px; width: 8px; background: #f0a436; } + .rectangular3 { height: 8px; width: 8px; background: #f35656; } } + .texts { width: 60%; font-size: 16px; @@ -595,6 +627,7 @@ export default { font-weight: 400; color: #b7d4f5; } + .react1 { // font-size: 20px; font-family: Alibaba PuHuiTi; @@ -602,6 +635,7 @@ export default { color: #2e87e8; padding-left: 10px; } + .react2 { // font-size: 20px; font-family: Alibaba PuHuiTi; @@ -609,6 +643,7 @@ export default { color: #f0a436; padding-left: 10px; } + .react3 { // font-size: 20px; font-family: Alibaba PuHuiTi; @@ -617,15 +652,15 @@ export default { color: #f35656; } + .ptStyle { width: 60%; margin-top: 5px; - background: linear-gradient( - to right, - rgba(36, 64, 97, 1), - rgba(36, 64, 97, 0) - ); + background: linear-gradient(to right, + rgba(36, 64, 97, 1), + rgba(36, 64, 97, 0)); } + .boxLine { position: absolute; width: 18px; diff --git a/src/views/bigpage/bigcomponents/ChangeinformationList.vue b/src/views/bigpage/bigcomponents/ChangeinformationList.vue index 3266e22..9b417dd 100644 --- a/src/views/bigpage/bigcomponents/ChangeinformationList.vue +++ b/src/views/bigpage/bigcomponents/ChangeinformationList.vue @@ -109,7 +109,7 @@ export default {