Lvtianfang^2
杜函宇 1 year ago
parent c9ea1ddbc6
commit e34a5c0b75

@ -55,4 +55,4 @@ export function getXXMSG(query) {
method: 'get', method: 'get',
params: query params: query
}) })
} }

@ -143,87 +143,126 @@ export default {
let newRouter = this.$route.query; let newRouter = this.$route.query;
if (newRouter.type == 1) { if (newRouter.type == 1) {
// //
getDrugBL({ name: newRouter.code }).then((res) => { getDrugBL({ name: newRouter.code })
res.data.result.forEach((value, index) => { .then((res) => {
this.pieData.forEach((value1, index1) => { res.data.result.forEach((value, index) => {
if (value.reportType == "一般" && value1.name == "一般不良反应") { this.pieData.forEach((value1, index1) => {
this.pieData[index1].value = value.reportCount; if (
} value.reportType == "一般" &&
if (value.reportType == "严重" && value1.name == "严重不良反应") { value1.name == "一般不良反应"
this.pieData[index1].value = value.reportCount; ) {
} this.pieData[index1].value = value.reportCount;
if ( }
value.reportType != "一般" && if (
value.reportType != "严重" && value.reportType == "严重" &&
value1.name == "发生死亡不良反应" value1.name == "严重不良反应"
) { ) {
this.pieData[index1].value = value.reportCount; this.pieData[index1].value = value.reportCount;
} }
if (
value.reportType != "一般" &&
value.reportType != "严重" &&
value1.name == "发生死亡不良反应"
) {
this.pieData[index1].value = value.reportCount;
}
});
});
this.$nextTick(() => {
let chartDom = this.$refs["bottom-box"];
this.myChart1 = echarts.init(chartDom);
this.initEcharts();
});
})
.catch(() => {
this.$nextTick(() => {
let chartDom = this.$refs["bottom-box"];
this.myChart1 = echarts.init(chartDom);
this.initEcharts();
}); });
}); });
this.$nextTick(() => {
let chartDom = this.$refs["bottom-box"];
this.myChart1 = echarts.init(chartDom);
this.initEcharts();
});
});
} }
if (newRouter.type != 1 && newRouter.type != 2) { if (newRouter.type != 1 && newRouter.type != 2) {
// //
getCosmeticsBL({ name: newRouter.code }).then((res) => { getCosmeticsBL({ name: newRouter.code })
res.data.result.forEach((value, index) => { .then((res) => {
this.pieData.forEach((value1, index1) => { res.data.result.forEach((value, index) => {
if (value.reportType == "一般" && value1.name == "一般不良反应") { this.pieData.forEach((value1, index1) => {
this.pieData[index1].value = value.reportCount; if (
} value.reportType == "一般" &&
if (value.reportType == "严重" && value1.name == "严重不良反应") { value1.name == "一般不良反应"
this.pieData[index1].value = value.reportCount; ) {
} this.pieData[index1].value = value.reportCount;
if ( }
value.reportType != "一般" && if (
value.reportType != "严重" && value.reportType == "严重" &&
value1.name == "发生死亡不良反应" value1.name == "严重不良反应"
) { ) {
this.pieData[index1].value = value.reportCount; this.pieData[index1].value = value.reportCount;
} }
if (
value.reportType != "一般" &&
value.reportType != "严重" &&
value1.name == "发生死亡不良反应"
) {
this.pieData[index1].value = value.reportCount;
}
});
});
this.$nextTick(() => {
let chartDom = this.$refs["bottom-box"];
this.myChart1 = echarts.init(chartDom);
this.initEcharts();
});
})
.catch(() => {
this.$nextTick(() => {
let chartDom = this.$refs["bottom-box"];
this.myChart1 = echarts.init(chartDom);
this.initEcharts();
}); });
}); });
this.$nextTick(() => {
let chartDom = this.$refs["bottom-box"];
this.myChart1 = echarts.init(chartDom);
this.initEcharts();
});
});
} }
if (newRouter.type == 2) { if (newRouter.type == 2) {
// //
getMedicalDevicesBL({ name: newRouter.code }).then((res) => { getMedicalDevicesBL({ name: newRouter.code })
res.data.result.forEach((value, index) => { .then((res) => {
this.pieData.forEach((value1, index1) => { res.data.result.forEach((value, index) => {
if ( this.pieData.forEach((value1, index1) => {
value.reportType == "严重伤害" && if (
value1.name == "严重不良反应" value.reportType == "严重伤害" &&
) { value1.name == "严重不良反应"
this.pieData[index1].value = value.reportCount; ) {
} this.pieData[index1].value = value.reportCount;
if (value.reportType == "其他" && value1.name == "一般不良反应") { }
this.pieData[index1].value = value.reportCount; if (
} value.reportType == "其他" &&
if ( value1.name == "一般不良反应"
value.reportType != "严重伤害" && ) {
value.reportType != "其他" && this.pieData[index1].value = value.reportCount;
value1.name == "发生死亡不良反应" }
) { if (
this.pieData[index1].value = value.reportCount; value.reportType != "严重伤害" &&
} value.reportType != "其他" &&
value1.name == "发生死亡不良反应"
) {
this.pieData[index1].value = value.reportCount;
}
});
});
this.$nextTick(() => {
let chartDom = this.$refs["bottom-box"];
this.myChart1 = echarts.init(chartDom);
this.initEcharts();
});
})
.catch(() => {
this.$nextTick(() => {
let chartDom = this.$refs["bottom-box"];
this.myChart1 = echarts.init(chartDom);
this.initEcharts();
}); });
}); });
this.$nextTick(() => {
let chartDom = this.$refs["bottom-box"];
this.myChart1 = echarts.init(chartDom);
this.initEcharts();
});
});
} }
}, },
initEcharts() { initEcharts() {

@ -4,32 +4,32 @@
<div class="top-box"> <div class="top-box">
<div class="topbox-item"> <div class="topbox-item">
<div class="topBOxitem"> <div class="topBOxitem">
<el-tooltip <!-- <el-tooltip
class="item" class="item"
effect="dark" effect="dark"
:content="countryC" :content="Number(countryC) || 0"
placement="top-start" placement="top-start"
> > -->
<div class="topBOxitem-top"> <div class="topBOxitem-top">
<span>{{ countryC || 0 }}</span> <span></span> <span>{{ countryC || 0 }}</span> <span></span>
</div> </div>
</el-tooltip> <!-- </el-tooltip> -->
<div class="topBOxitem-bottom">国家检测次数</div> <div class="topBOxitem-bottom">国家检测次数</div>
</div> </div>
</div> </div>
<div class="topbox-item"> <div class="topbox-item">
<div class="topBOxitem"> <div class="topBOxitem">
<el-tooltip <!-- <el-tooltip
class="item" class="item"
effect="dark" effect="dark"
:content="provinceC" :content="Number(provinceC) || 0"
placement="top-start" placement="top-start"
> > -->
<div class="topBOxitem-top"> <div class="topBOxitem-top">
<span>{{ provinceC || 0 }}</span> <span></span> <span>{{ provinceC || 0 }}</span> <span></span>
</div> </div>
</el-tooltip> <!-- </el-tooltip> -->
<div class="topBOxitem-bottom">省级抽检次数</div> <div class="topBOxitem-bottom">省级抽检次数</div>
</div> </div>

@ -27,7 +27,6 @@
<div class="system-box-left"> <div class="system-box-left">
<div class="system-boxleft-top top"> <div class="system-boxleft-top top">
<headtitle mytitle="基本信息"></headtitle> <headtitle mytitle="基本信息"></headtitle>
<!-- 组件 -->
<Basicbox></Basicbox> <Basicbox></Basicbox>
</div> </div>
<div class="system-boxleft-bottom bottom"> <div class="system-boxleft-bottom bottom">
@ -40,10 +39,23 @@
<div class="top"> <div class="top">
<!-- 头部 --> <!-- 头部 -->
<div class="fengxian-top"> <div class="fengxian-top">
<div class="fengxian-top-left">复方枸杞子胶囊</div> <div class="fengxian-top-left">{{ query.name }}</div>
<div class="fengxian-top-right"> <div class="fengxian-top-right">
<span>保健药</span> <div class="right-text-bog" v-if="newRouter.type == 1">
<span>OTC</span> <span v-if="query.type">{{ query.type }}</span>
<span v-if="query.jx">{{ query.jx }}</span>
</div>
<div class="right-text-bog" v-if="newRouter.type == 2">
<span v-if="query.type">{{ query.type }}</span>
<span v-if="query.gllb">{{ query.gllb }}</span>
<span v-if="query.jgtz">{{ query.jgtz }}</span>
</div>
<div
class="right-text-bog"
v-if="newRouter.type != 1 && newRouter.type != 2"
>
<span v-if="query.type">{{ query.type }}</span>
</div>
</div> </div>
</div> </div>
<headtitle mytitle="风险提示信息"></headtitle> <headtitle mytitle="风险提示信息"></headtitle>
@ -74,7 +86,7 @@
</template> </template>
<script> <script>
import {getXXMSG} from '@/api/largeScreen' import { getXXMSG } from "@/api/largeScreen";
// //
import headtitle from "./bigcomponents/headtitle"; import headtitle from "./bigcomponents/headtitle";
// //
@ -101,16 +113,28 @@ export default {
AdverseBox, AdverseBox,
}, },
data() { data() {
return {}; return {
query: {},
newRouter: {},
};
}, },
created() {}, created() {},
mounted() {}, mounted() {
this.getData();
},
methods: { methods: {
toBack() { toBack() {
this.$router.go(-1); this.$router.go(-1);
}, },
getData(){ getData() {
} // debugger
this.newRouter = this.$route.query;
getXXMSG({ code: this.newRouter.code, type: this.newRouter.type }).then(
(res) => {
this.query = res.data;
}
);
},
}, },
computed: {}, computed: {},
}; };
@ -367,17 +391,20 @@ div {
.fengxian-top-right { .fengxian-top-right {
display: flex; display: flex;
span { height: 100%;
margin: 0 3px; .right-text-bog {
width: 93px; display: flex;
height: 49px; align-items: center;
background: url("../../assets/images/daping/fengxianbgc.png") span {
no-repeat center; margin: 0 3px;
background-size: contain; padding:5px 14px;
text-align: center; background: url("../../assets/images/daping/fengxianbgc.png")
line-height: 49px; no-repeat;
color: #4da5ff; background-size:100% 100%;
font-weight: 400; text-align: center;
color: #4da5ff;
font-weight: 400;
}
} }
} }
} }

Loading…
Cancel
Save