|
|
|
@ -143,13 +143,20 @@ export default {
|
|
|
|
|
let newRouter = this.$route.query;
|
|
|
|
|
if (newRouter.type == 1) {
|
|
|
|
|
//药品
|
|
|
|
|
getDrugBL({ name: newRouter.code }).then((res) => {
|
|
|
|
|
getDrugBL({ name: newRouter.code })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
res.data.result.forEach((value, index) => {
|
|
|
|
|
this.pieData.forEach((value1, index1) => {
|
|
|
|
|
if (value.reportType == "一般" && value1.name == "一般不良反应") {
|
|
|
|
|
if (
|
|
|
|
|
value.reportType == "一般" &&
|
|
|
|
|
value1.name == "一般不良反应"
|
|
|
|
|
) {
|
|
|
|
|
this.pieData[index1].value = value.reportCount;
|
|
|
|
|
}
|
|
|
|
|
if (value.reportType == "严重" && value1.name == "严重不良反应") {
|
|
|
|
|
if (
|
|
|
|
|
value.reportType == "严重" &&
|
|
|
|
|
value1.name == "严重不良反应"
|
|
|
|
|
) {
|
|
|
|
|
this.pieData[index1].value = value.reportCount;
|
|
|
|
|
}
|
|
|
|
|
if (
|
|
|
|
@ -166,17 +173,31 @@ export default {
|
|
|
|
|
this.myChart1 = echarts.init(chartDom);
|
|
|
|
|
this.initEcharts();
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
let chartDom = this.$refs["bottom-box"];
|
|
|
|
|
this.myChart1 = echarts.init(chartDom);
|
|
|
|
|
this.initEcharts();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (newRouter.type != 1 && newRouter.type != 2) {
|
|
|
|
|
//化妆品
|
|
|
|
|
getCosmeticsBL({ name: newRouter.code }).then((res) => {
|
|
|
|
|
getCosmeticsBL({ name: newRouter.code })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
res.data.result.forEach((value, index) => {
|
|
|
|
|
this.pieData.forEach((value1, index1) => {
|
|
|
|
|
if (value.reportType == "一般" && value1.name == "一般不良反应") {
|
|
|
|
|
if (
|
|
|
|
|
value.reportType == "一般" &&
|
|
|
|
|
value1.name == "一般不良反应"
|
|
|
|
|
) {
|
|
|
|
|
this.pieData[index1].value = value.reportCount;
|
|
|
|
|
}
|
|
|
|
|
if (value.reportType == "严重" && value1.name == "严重不良反应") {
|
|
|
|
|
if (
|
|
|
|
|
value.reportType == "严重" &&
|
|
|
|
|
value1.name == "严重不良反应"
|
|
|
|
|
) {
|
|
|
|
|
this.pieData[index1].value = value.reportCount;
|
|
|
|
|
}
|
|
|
|
|
if (
|
|
|
|
@ -193,11 +214,19 @@ export default {
|
|
|
|
|
this.myChart1 = echarts.init(chartDom);
|
|
|
|
|
this.initEcharts();
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
let chartDom = this.$refs["bottom-box"];
|
|
|
|
|
this.myChart1 = echarts.init(chartDom);
|
|
|
|
|
this.initEcharts();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (newRouter.type == 2) {
|
|
|
|
|
//医疗器械
|
|
|
|
|
getMedicalDevicesBL({ name: newRouter.code }).then((res) => {
|
|
|
|
|
getMedicalDevicesBL({ name: newRouter.code })
|
|
|
|
|
.then((res) => {
|
|
|
|
|
res.data.result.forEach((value, index) => {
|
|
|
|
|
this.pieData.forEach((value1, index1) => {
|
|
|
|
|
if (
|
|
|
|
@ -206,7 +235,10 @@ export default {
|
|
|
|
|
) {
|
|
|
|
|
this.pieData[index1].value = value.reportCount;
|
|
|
|
|
}
|
|
|
|
|
if (value.reportType == "其他" && value1.name == "一般不良反应") {
|
|
|
|
|
if (
|
|
|
|
|
value.reportType == "其他" &&
|
|
|
|
|
value1.name == "一般不良反应"
|
|
|
|
|
) {
|
|
|
|
|
this.pieData[index1].value = value.reportCount;
|
|
|
|
|
}
|
|
|
|
|
if (
|
|
|
|
@ -223,6 +255,13 @@ export default {
|
|
|
|
|
this.myChart1 = echarts.init(chartDom);
|
|
|
|
|
this.initEcharts();
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
let chartDom = this.$refs["bottom-box"];
|
|
|
|
|
this.myChart1 = echarts.init(chartDom);
|
|
|
|
|
this.initEcharts();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|