From 690e2e453a3bcd1fca4a77ebbadad8cb21adb176 Mon Sep 17 00:00:00 2001 From: dhy1725534722 <1725534722@qq.com> Date: Fri, 27 Oct 2023 13:21:56 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BC=98=E5=8C=96echarts=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bigpage/bigcomponents/AdverseBox.vue | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/src/views/bigpage/bigcomponents/AdverseBox.vue b/src/views/bigpage/bigcomponents/AdverseBox.vue index 5bcea7f..18e420e 100644 --- a/src/views/bigpage/bigcomponents/AdverseBox.vue +++ b/src/views/bigpage/bigcomponents/AdverseBox.vue @@ -8,12 +8,13 @@ 不良反应
-
12121111111111111111
+
{{ a1 || 0 }}
较去年
- + +
@@ -22,12 +23,13 @@ 严重不良反应
-
1212
+
{{ a2 || 0 }}
较去年
- + +
@@ -36,12 +38,13 @@ 发生死亡不良反应
-
1212
+
{{ a3 || 0 }}
较去年
- + +
@@ -66,6 +69,10 @@ export default { // echarts myChart1: {}, center: ["18%", "50%"], + blfxxx: {}, + a1: 0, + a2: 0, + a3: 0, }; }, created() {}, @@ -75,7 +82,6 @@ export default { methods: { getData() { let newRouter = this.$route.query; - console.log(newRouter.type); if (newRouter.type == 1) { //药品 getDrugBL({ name: newRouter.code }).then((res) => { @@ -89,8 +95,18 @@ export default { } if (newRouter.type != 1 && newRouter.type != 2) { //化妆品 - getCosmeticsBL({ name: newRouter.code }).then((res) => { - console.log(res); + getCosmeticsBL().then((res) => { + res.data.result.forEach((value, index) => { + if (value.reportType == "一般") { + this.a1 = value.reportCount; + } + if (value.reportType == "严重") { + this.a2 = value.reportCount; + } + if (value.reportType != "一般" && value.reportType != "严重") { + this.a3 = value.reportCount; + } + }); this.$nextTick(() => { let chartDom = this.$refs["bottom-box"]; this.myChart1 = echarts.init(chartDom); From b75de38962017b7b4db2088d96cf674d2ffda894 Mon Sep 17 00:00:00 2001 From: TiaStars Date: Fri, 27 Oct 2023 14:54:06 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/bigpage/bigcomponents/Basicbox.vue | 4 ++-- src/views/index.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/bigpage/bigcomponents/Basicbox.vue b/src/views/bigpage/bigcomponents/Basicbox.vue index a6e3572..8ad099b 100644 --- a/src/views/bigpage/bigcomponents/Basicbox.vue +++ b/src/views/bigpage/bigcomponents/Basicbox.vue @@ -78,8 +78,8 @@ export default { diff --git a/src/views/bigpage/bigcomponents/ChangeinformationList.vue b/src/views/bigpage/bigcomponents/ChangeinformationList.vue index 7b90b67..3266e22 100644 --- a/src/views/bigpage/bigcomponents/ChangeinformationList.vue +++ b/src/views/bigpage/bigcomponents/ChangeinformationList.vue @@ -1,13 +1,13 @@ @@ -73,10 +75,15 @@ export default { }, total: 0, load1: false, + height: 0, }; }, created() {}, mounted() { + this.$nextTick(() => { + this.height = + this.$refs.basic.offsetHeight - this.$refs.pagination.offsetHeight; + }); this.getList(); }, methods: { @@ -103,7 +110,7 @@ export default { .Basic-box { margin-top: 10px; width: 100%; - height: 300px; + height: calc(100% - 41px - 10px); // padding: 0 11px 11px 11px; overflow-y: auto; background-color: transparent; diff --git a/src/views/bigpage/bigcomponents/informationBox.vue b/src/views/bigpage/bigcomponents/informationBox.vue index 3ef268a..28dbe11 100644 --- a/src/views/bigpage/bigcomponents/informationBox.vue +++ b/src/views/bigpage/bigcomponents/informationBox.vue @@ -4,7 +4,17 @@
-
12
+ +
+ {{ countryC || 0 }} +
+
+
国家检测次数
@@ -13,11 +23,11 @@
- 1221111121212121 + {{ provinceC || 0 }}
@@ -26,8 +36,9 @@
-
12%
- +
+ {{ pt }}% +
抽检合格率
@@ -69,6 +80,13 @@ export default { // echarts myChart2: {}, //============== + provinceC: 0, + countryC: 0, + //合格率 + pt: 0, + //抽样类型 + sccy: 0, + ltcy: 0, }; }, created() {}, @@ -79,7 +97,18 @@ export default { getData() { let newRouter = this.$route.query; getCPCJ({ name: newRouter.code }).then((res) => { - console.log(res); + // res.data.result.forEach((value, index) => { + // if (value.sampleType == 1) { + // this.provinceC += 1; + // } else if (value.sampleType == 2) { + // this.countryC += 1; + // } + // }); + this.countryC = 12; + this.provinceC = 12; + this.pt = 67; + this.sccy = 60; + this.ltcy = 40; this.$nextTick(() => { let chartDom = this.$refs["left-echart"]; this.myChart1 = echarts.init(chartDom); @@ -92,6 +121,7 @@ export default { }, initEcharts() { this.option1 = { + color: ["#007EFF", "#2CD8EC"], tooltip: { trigger: "item", // formatter: "{a}
{b}: {c} ({d}%)", // 鼠标悬浮在各分区时的提示内容 @@ -111,20 +141,27 @@ export default { "padding: 10px; background-color: rgba(0, 0, 0, 0.7); color: #fff;", // 设置提示框的样式 }, legend: { + orient: "horizontal", bottom: 0, - left: "center", + itemWidth: 10, + itemHeight: 10, + itemGap: 25, data: ["生产抽样环节", "流通环节抽样"], textStyle: { color: "auto", - fontSize: 14, + fontSize: 12, }, }, series: [ { name: "", type: "pie", - radius: ["50%", "70%"], + radius: ["45%", "70%"], center: ["50%", "40%"], // 调整 y 值为 '40%',使饼图向上位移 + // itemStyle:{ + // borderWidth:1, //设置border的宽度有多大 + // borderColor:'#fff', + // }, labelLine: { normal: { length: 15, // 指示线宽度 @@ -157,14 +194,14 @@ export default { { value: 39, name: "生产抽样环节", - percent: "39", - itemStyle: { color: "#007EFF" }, + // percent: "39", + // itemStyle: { color: "#007EFF" }, }, { value: 21, name: "流通环节抽样", - percent: "21", - itemStyle: { color: "#2CD8EC" }, + // percent: "21", + // itemStyle: { color: "#2CD8EC" }, }, ], }, @@ -205,7 +242,7 @@ export default { axisTick: { show: false, }, - data: ["辽宁", "黑龙江", "北京", "上海", "深圳", "苏州"], + data: ["辽宁", "江苏", "湖南", "山西", "湖北", "山东"], }, ], yAxis: [ @@ -237,7 +274,7 @@ export default { series: [ { type: "bar", - barWidth: "10", + barWidth: "16", itemStyle: { normal: { color: { @@ -247,13 +284,14 @@ export default { x2: 0, y2: 1, colorStops: [ + // background: linear-gradient(0deg, #21B5E1 100%); { offset: 0, color: "rgba(33,181,225,1)", // 起始颜色 }, { offset: 1, - color: "rgba(0,0,0,0.1)", // 结束颜色 + color: "rgba(6,31,55,0.1)", // 结束颜色 }, ], }, @@ -263,6 +301,7 @@ export default { // } }, }, + data: [12, 15, 17, 20, 25, 26], }, ], @@ -280,7 +319,7 @@ export default { .top-box { margin: 10px 0; height: 85px; - width: 100%F; + width: 100%; display: flex; justify-content: space-around; diff --git a/src/views/bigpage/bigcomponents/riskinformationList.vue b/src/views/bigpage/bigcomponents/riskinformationList.vue index ec4d61e..0e30dce 100644 --- a/src/views/bigpage/bigcomponents/riskinformationList.vue +++ b/src/views/bigpage/bigcomponents/riskinformationList.vue @@ -1,113 +1,110 @@ + background-color: rgba(0, 50, 150, 0.1) !important; +} + \ No newline at end of file diff --git a/src/views/bigpage/index.vue b/src/views/bigpage/index.vue index 204188c..bf4fa02 100644 --- a/src/views/bigpage/index.vue +++ b/src/views/bigpage/index.vue @@ -43,9 +43,7 @@
复方枸杞子胶囊
保健药 - 保健药 - 保健药 - 保健药 + OTC
@@ -58,7 +56,10 @@
-
+
@@ -73,6 +74,7 @@