优化接口

duhanyu
杜函宇 1 year ago
parent a68c8e0a4c
commit 39954bb2eb

@ -11,6 +11,6 @@
src: url('http://www.jichuanglanhai.com/demo/font-file/din-bold-2.ttf'); src: url('http://www.jichuanglanhai.com/demo/font-file/din-bold-2.ttf');
} }
@font-face { @font-face {
font-family: 'Regular'; font-family: 'Alibaba PuHuiTi';
src: url('http://www.jichuanglanhai.com/demo/font-file/Alibaba-PuHuiTi-Regular.otf'); src: url('http://www.jichuanglanhai.com/demo/font-file/Alibaba-PuHuiTi-Regular.otf');
} }

@ -74,27 +74,41 @@ export default {
}, },
methods: { methods: {
getData() { getData() {
getDrugBL({ name: "国药准字B20020034" }).then((res) => { let newRouter = this.$route.query;
this.$nextTick(() => { console.log(newRouter.type);
let chartDom = this.$refs["bottom-box"]; if (newRouter.type == 1) {
this.myChart1 = echarts.init(chartDom); //
this.initEcharts(); getDrugBL({ name: newRouter.code }).then((res) => {
console.log(res);
this.$nextTick(() => {
let chartDom = this.$refs["bottom-box"];
this.myChart1 = echarts.init(chartDom);
this.initEcharts();
});
}); });
}); }
getCosmeticsBL({}).then(res=>{ if (newRouter.type != 1 && newRouter.type != 2) {
this.$nextTick(() => { //
let chartDom = this.$refs["bottom-box"]; getCosmeticsBL({ name: newRouter.code }).then((res) => {
this.myChart1 = echarts.init(chartDom); console.log(res);
this.initEcharts(); this.$nextTick(() => {
let chartDom = this.$refs["bottom-box"];
this.myChart1 = echarts.init(chartDom);
this.initEcharts();
});
}); });
}) }
getMedicalDevicesBL({}).then(res=>{ if (newRouter.type == 2) {
this.$nextTick(() => { //
let chartDom = this.$refs["bottom-box"]; getMedicalDevicesBL({ name: newRouter.code }).then((res) => {
this.myChart1 = echarts.init(chartDom); console.log(res);
this.initEcharts(); this.$nextTick(() => {
let chartDom = this.$refs["bottom-box"];
this.myChart1 = echarts.init(chartDom);
this.initEcharts();
});
}); });
}) }
}, },
initEcharts() { initEcharts() {
this.option1 = { this.option1 = {
@ -451,7 +465,7 @@ export default {
font-family: Alibaba PuHuiTi; font-family: Alibaba PuHuiTi;
font-weight: 400; font-weight: 400;
color: #ffffff; color: #ffffff;
background: linear-gradient(0deg,#ffffff 0%, #d21b1b 100%); background: linear-gradient(0deg, #ffffff 0%, #d21b1b 100%);
-webkit-background-clip: text; -webkit-background-clip: text;
-webkit-text-fill-color: transparent; -webkit-text-fill-color: transparent;
margin-right: 5px; margin-right: 5px;

@ -7,6 +7,7 @@
element-loading-text="加载中..." element-loading-text="加载中..."
element-loading-spinner="el-icon-loading" element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.8)" element-loading-background="rgba(0, 0, 0, 0.8)"
height="208"
stripe stripe
style="width: 100%; background-color: transparent" style="width: 100%; background-color: transparent"
> >
@ -67,7 +68,7 @@ export default {
tableData: [], tableData: [],
query: { query: {
current: 1, current: 1,
size: 5, size: 10,
name: "", name: "",
}, },
total: 0, total: 0,
@ -80,6 +81,8 @@ export default {
}, },
methods: { methods: {
getList() { getList() {
let newRouter = this.$route.query;
this.query.name = newRouter.code;
this.load1 = true; this.load1 = true;
getDrugChange(this.query).then((res) => { getDrugChange(this.query).then((res) => {
this.tableData = res.data.records; this.tableData = res.data.records;

@ -41,7 +41,7 @@
<script> <script>
import * as echarts from "echarts"; import * as echarts from "echarts";
import { getCPCJ } from "@/api/largeScreen/index";
export default { export default {
name: "informationBox", name: "informationBox",
components: {}, components: {},
@ -69,22 +69,27 @@ export default {
// echarts // echarts
myChart2: {}, myChart2: {},
//============== //==============
}; };
}, },
created() {}, created() {},
mounted() { mounted() {
this.$nextTick(() => { this.getData();
let chartDom = this.$refs["left-echart"];
this.myChart1 = echarts.init(chartDom);
this.initEcharts();
let chartDom2 = this.$refs["right-echart"];
this.myChart2 = echarts.init(chartDom2);
this.initEcharts2();
});
}, },
methods: { methods: {
getData() {
let newRouter = this.$route.query;
getCPCJ({ name: newRouter.code }).then((res) => {
console.log(res);
this.$nextTick(() => {
let chartDom = this.$refs["left-echart"];
this.myChart1 = echarts.init(chartDom);
this.initEcharts();
let chartDom2 = this.$refs["right-echart"];
this.myChart2 = echarts.init(chartDom2);
this.initEcharts2();
});
});
},
initEcharts() { initEcharts() {
this.option1 = { this.option1 = {
tooltip: { tooltip: {

@ -55,7 +55,8 @@ export default {
}, },
methods: { methods: {
getData() { getData() {
getRecall({ name: "国药准字B20020034" }).then((res) => { let newRouter = this.$route.query;
getRecall({ name: newRouter.code }).then((res) => {
this.zhcs = res.data.cpzhcs; this.zhcs = res.data.cpzhcs;
this.cpzhbs = res.data.zhcppc; this.cpzhbs = res.data.zhcppc;
this.cpzhcs = res.data.cpzhl; this.cpzhcs = res.data.cpzhl;
@ -175,17 +176,18 @@ export default {
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.box { .box {
height: calc(100% - 41px);
width: 100%;
} }
.top-box { .top-box {
margin: 10px 0; margin: 10px 0;
height: 85px; height: 85px;
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-around;
.topbox-item { .topbox-item {
width: 240px; width: 30%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@ -269,7 +271,7 @@ export default {
} }
.bottom-content { .bottom-content {
height: 210px; height: calc(100% - 20px - 85px);
display: flex; display: flex;
.right-echart { .right-echart {

@ -1,337 +1,331 @@
<template> <template>
<div class="pc-container"> <div class="pc-container">
<div class="system-header"> <div class="system-header">
<div class="left-tags"> <div class="left-tags">2023年8月11日 星期五 16:23:34</div>
2023年8月11日 星期五 16:23:34 <div class="system-title" text="产品画像">产品画像</div>
</div> <div class="rigth-tags">
<div class="system-title" text="产品画像"> <div class="rigth-tags-diva">
产品画像 <span class="rigth-tags-spana"><i class="el-icon-sunny"></i></span
</div> >晴天 17~28°C <span class="rigth-tags-spanb"> | </span>东南风3级
<div class="rigth-tags">
<div class="rigth-tags-diva"> <span class="rigth-tags-spana"><i class="el-icon-sunny"></i></span>晴天 17~28°C
<span class="rigth-tags-spanb"> | </span>东南风3级
</div>
</div>
</div> </div>
<div class="system-bottom"> </div>
<div class="bg-left"></div> </div>
<div class="bg-right"></div> <div class="system-bottom">
<div class="bg-bottom"></div> <div class="bg-left"></div>
<div class="bg-right"></div>
<div class="system-box"> <div class="bg-bottom"></div>
<!-- 左边 -->
<div class="system-box-left"> <div class="system-box">
<div class="system-boxleft-top top"> <!-- 左边 -->
<headtitle mytitle="基本信息"></headtitle> <div class="system-box-left">
<!-- 组件 --> <div class="system-boxleft-top top">
<Basicbox></Basicbox> <headtitle mytitle="基本信息"></headtitle>
</div> <!-- 组件 -->
<div class="system-boxleft-bottom bottom"> <Basicbox></Basicbox>
<headtitle mytitle="变更信息"></headtitle> </div>
<ChangeinformationList></ChangeinformationList> <div class="system-boxleft-bottom bottom">
</div> <headtitle mytitle="变更信息"></headtitle>
</div> <ChangeinformationList></ChangeinformationList>
<!-- 中间 --> </div>
<div class="system-box-content"> </div>
<div class="top"> <!-- 中间 -->
<!-- 头部 --> <div class="system-box-content">
<div class="fengxian-top"> <div class="top">
<div class="fengxian-top-left">复方枸杞子胶囊</div> <!-- 头部 -->
<div class="fengxian-top-right"> <div class="fengxian-top">
<span>保健药</span> <div class="fengxian-top-left">复方枸杞子胶囊</div>
<span>保健药</span> <div class="fengxian-top-right">
<span>保健药</span> <span>保健药</span>
<span>保健药</span> <span>保健药</span>
</div> <span>保健药</span>
</div> <span>保健药</span>
<headtitle mytitle="风险提示信息"></headtitle> </div>
<riskinformationList></riskinformationList>
</div>
<div class="bottom">
<headtitle mytitle="检验检测信息"></headtitle>
<informationBox></informationBox>
</div>
</div>
<!-- 右边 -->
<div class="system-box-right">
<div class="top">
<headtitle mytitle="召回信息"></headtitle>
<recallbox></recallbox>
</div>
<div class="bottom">
<headtitle mytitle="不良反应信息"></headtitle>
<AdverseBox></AdverseBox>
</div>
</div>
</div> </div>
<headtitle mytitle="风险提示信息"></headtitle>
<riskinformationList></riskinformationList>
</div>
<div class="bottom">
<headtitle mytitle="检验检测信息"></headtitle>
<informationBox></informationBox>
</div>
</div>
<!-- 右边 -->
<div class="system-box-right">
<div class="top">
<headtitle mytitle="召回信息"></headtitle>
<recallbox></recallbox>
</div>
<div class="bottom">
<headtitle mytitle="不良反应信息"></headtitle>
<AdverseBox></AdverseBox>
</div>
</div> </div>
</div>
</div> </div>
</div>
</template> </template>
<script> <script>
// //
import headtitle from './bigcomponents/headtitle.vue'; import headtitle from "./bigcomponents/headtitle";
// //
import Basicbox from './bigcomponents/Basicbox.vue'; import Basicbox from "./bigcomponents/Basicbox.vue";
// //
import ChangeinformationList from './bigcomponents/ChangeinformationList.vue'; import ChangeinformationList from "./bigcomponents/ChangeinformationList";
// //
import riskinformationList from './bigcomponents/riskinformationList.vue'; import riskinformationList from "./bigcomponents/riskinformationList";
// //
import informationBox from './bigcomponents/informationBox.vue'; import informationBox from "./bigcomponents/informationBox";
// //
import recallbox from './bigcomponents/recallbox.vue'; import recallbox from "./bigcomponents/recallbox.vue";
// //
import AdverseBox from './bigcomponents/AdverseBox.vue'; import AdverseBox from "./bigcomponents/AdverseBox.vue";
export default { export default {
name: '', name: "",
components: { headtitle, Basicbox, ChangeinformationList,riskinformationList,informationBox,recallbox,AdverseBox }, components: {
data() { headtitle,
return { Basicbox,
ChangeinformationList,
} riskinformationList,
}, informationBox,
created() { }, recallbox,
mounted() { }, AdverseBox,
methods: {}, },
computed: {} data() {
} return {};
},
created() {},
mounted() {},
methods: {},
computed: {},
};
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
@import '@/assets/styles/theme.scss'; @import "@/assets/styles/theme.scss";
div { div {
text-align: left; text-align: left;
} }
.pc-container { .pc-container {
overflow: hidden; overflow: hidden;
height: 100%; height: 100%;
background: url('../../assets/images/daping/main-background.png') no-repeat center; background: url("../../assets/images/daping/main-background.png") no-repeat
background-size: cover; center;
position: relative; background-size: cover;
position: relative;
//
.system-header {
// position: absolute;
// top: 0;
// left: 0;
height: 10vh;
width: 100%;
background-image: url("../../assets/images/daping/img_title@2x.png");
background-size: 100% 100%;
display: flex;
justify-content: space-between;
& > div {
flex: 1;
height: 100%;
}
// .system-title {
.system-header { padding: 0 0 10px 0;
// position: absolute; font-size: 50px;
// top: 0; font-family: "YouSheBiaoTiHei";
// left: 0; font-weight: 400;
height: 12vh; color: #ffffff;
width: 100%; display: flex;
background-image: url('../../assets/images/daping/img_title@2x.png'); justify-content: center;
background-size: 100% 100%; align-items: flex-end;
display: flex; text-shadow: 0px 2px 4px #03101c;
justify-content: space-between; letter-spacing: 5px;
&::before {
content: attr(text);
position: absolute;
z-index: 10;
color: #ffffff;
//
background: linear-gradient(0deg, #5abdf7 20%, #ecf8fe 80%);
-webkit-background-clip: text;
color: transparent;
//
text-shadow: none;
}
}
&>div { .rigth-tags {
flex: 1; display: flex;
height: 100%; align-items: flex-end;
} flex-direction: row-reverse;
box-sizing: border-box;
color: #86a3c3;
padding: 0 20px 20px 0;
.system-title { .rigth-tags-spana {
padding: 0 0 10px 0; margin-right: 10px;
font-size: 50px;
font-family: 'YouSheBiaoTiHei';
font-weight: 400;
color: #ffffff;
display: flex;
justify-content: center;
align-items: flex-end;
text-shadow: 0px 2px 4px #03101c;
letter-spacing: 5px;
&::before { i {
content: attr(text); color: yellow;
position: absolute;
z-index: 10;
color: #ffffff;
//
background: linear-gradient(0deg, #5abdf7 20%, #ecf8fe 80%);
-webkit-background-clip: text;
color: transparent;
//
text-shadow: none;
}
} }
}
.rigth-tags-spanb {
width: 2px;
height: 16px;
padding: 0 5px;
color: #2d8ef2;
}
}
.rigth-tags { .left-tags {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
flex-direction: row-reverse; box-sizing: border-box;
box-sizing: border-box; color: #ffffff;
color: #86A3C3; font-weight: 400;
padding: 0 20px 20px 0; padding: 0 0 20px 20px;
color: #86a3c3;
.rigth-tags-spana { }
margin-right: 10px; }
i { //
color: yellow; .system-bottom {
} height: 89vh;
} padding: 24px;
position: relative;
.rigth-tags-spanb { .bg-left,
width: 2px; .bg-right,
height: 16px; .bg-bottom {
padding: 0 5px; position: absolute;
color: #2D8EF2; /* 将背景图定位为绝对定位 */
} z-index: 0;
/* 将背景图放在容器最下方 */
background-repeat: no-repeat;
/* 禁止重复显示背景图 */
background-size: contain;
}
} .bg-left {
top: 0;
bottom: 12px;
left: 5px;
right: 0;
background-image: url("../../assets/images/daping/left-line@2x.png");
background-position: left top;
/* 将背景图左上角对齐容器左上角 */
/* 按比例缩放背景图,尽可能填充容器 */
}
.left-tags { .bg-right {
display: flex; top: 0;
align-items: flex-end; bottom: 12px;
box-sizing: border-box; left: 0;
color: #ffffff; right: 5px;
font-weight: 400; background-image: url("../../assets/images/daping/right-line@2x.png");
padding: 0 0 20px 20px; background-position: right top;
color: #86A3C3; /* 将背景图右上角对齐容器右上角 */
} /* 按比例缩放背景图,尽可能填充容器 */
} }
// .bg-bottom {
.system-bottom { top: 0;
height: 87vh; bottom: 0px;
padding: 24px; left: 5px;
position: relative; right: 5px;
background-image: url("../../assets/images/daping/bottom-line.png");
background-position: center bottom;
/* 将背景图中心点对齐容器底部中心 */
/* 按比例缩放背景图,保持其宽高比,同时确保不会溢出容器 */
}
.bg-left, .system-box {
.bg-right, position: relative;
.bg-bottom { z-index: 1;
position: absolute; width: 100%;
/* 将背景图定位为绝对定位 */ height: 100%;
z-index: 0; display: flex;
/* 将背景图放在容器最下方 */
background-repeat: no-repeat;
/* 禁止重复显示背景图 */
background-size: contain;
}
.bg-left { & > div {
top: 0; height: 100%;
bottom: 12px; display: flex;
left: 5px; flex-direction: column;
right: 0; /* 设置垂直方向排列 */
background-image: url("../../assets/images/daping/left-line@2x.png"); justify-content: space-between;
background-position: left top;
/* 将背景图左上角对齐容器左上角 */
/* 按比例缩放背景图,尽可能填充容器 */
}
.bg-right { .top {
top: 0; flex: 1;
bottom: 12px; margin-bottom: 15px;
left: 0;
right: 5px;
background-image: url("../../assets/images/daping/right-line@2x.png");
background-position: right top;
/* 将背景图右上角对齐容器右上角 */
/* 按比例缩放背景图,尽可能填充容器 */
} }
.bg-bottom { .bottom {
top: 0; flex: 1;
bottom: 0px;
left: 5px;
right: 5px;
background-image: url("../../assets/images/daping/bottom-line.png");
background-position: center bottom;
/* 将背景图中心点对齐容器底部中心 */
/* 按比例缩放背景图,保持其宽高比,同时确保不会溢出容器 */
} }
}
.system-box { .system-box-left {
position: relative; flex: 1;
z-index: 1;
width: 100%;
height: 100%;
display: flex;
&>div {
height: 100%;
display: flex;
flex-direction: column;
/* 设置垂直方向排列 */
justify-content: space-between;
.top {
flex: 1;
margin-bottom: 15px;
}
.bottom {
flex: 1;
}
}
.system-box-left { .system-boxleft-top,
flex: 1; .system-boxleft-bottom {
width: 25vw; background: url("../../assets/images/daping/boxBG.png");
background-size: cover;
.system-boxleft-top, background-repeat: no-repeat;
.system-boxleft-bottom {
background: url('../../assets/images/daping/boxBG.png');
background-size: cover;
background-repeat: no-repeat;
}
/* 将项目从下往上排列 */
.system-boxleft-top {}
.system-boxleft-bottom {}
}
.system-box-content {
width: 48vw;
margin: 0 15px;
flex: 2;
}
.system-box-right {
width: 25vw;
flex: 1;
}
} }
}
.fengxian-top { .system-box-content {
padding: 0 30px; margin: 0 15px;
height: 80px; flex: 2;
background: rgba(0, 168, 255, 0.04); }
border-radius: 10px;
margin-bottom: 10px;
box-shadow: inset 0px 0px 35px rgba(4, 72, 161, 1);
display: flex;
justify-content: space-between;
align-items: center;
.fengxian-top-left { .system-box-right {
font-size: 32px; flex: 1;
font-family: Regular; }
font-weight: bold; }
color: #61B5F5;
line-height: 42px;
}
.fengxian-top-right { .fengxian-top {
display: flex; padding: 0 30px;
span { height: 80px;
margin: 0 3px; background: rgba(0, 168, 255, 0.04);
width: 93px; border-radius: 10px;
height: 49px; margin-bottom: 10px;
background: url('../../assets/images/daping/fengxianbgc.png') no-repeat center; box-shadow: inset 0px 0px 35px rgba(4, 72, 161, 1);
background-size: contain; display: flex;
text-align: center; justify-content: space-between;
line-height: 49px; align-items: center;
color: #4DA5FF;
font-weight: 400; .fengxian-top-left {
} font-size: 32px;
} font-family: Regular;
font-weight: bold;
color: #61b5f5;
line-height: 42px;
}
.fengxian-top-right {
display: flex;
span {
margin: 0 3px;
width: 93px;
height: 49px;
background: url("../../assets/images/daping/fengxianbgc.png")
no-repeat center;
background-size: contain;
text-align: center;
line-height: 49px;
color: #4da5ff;
font-weight: 400;
} }
}
} }
}</style> }
}
</style>

@ -5,7 +5,7 @@
background background
:current-page.sync="currentPage" :current-page.sync="currentPage"
:page-size.sync="pageSize" :page-size.sync="pageSize"
layout="->,prev, total,pager, next,jumper" layout="prev, pager, next,jumper"
:page-sizes="pageSizes" :page-sizes="pageSizes"
:pager-count="pagerCount" :pager-count="pagerCount"
:total="total" :total="total"
@ -104,6 +104,14 @@ export default {
}; };
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
::v-deep .el-pagination {
width: 100%;
display: flex;
justify-content: end;
padding: 8px 5px;
box-sizing: border-box;
overflow-y: auto;
}
.box { .box {
background-color: transparent !important; background-color: transparent !important;
} }
@ -117,18 +125,17 @@ export default {
border: 1px solid #123864; border: 1px solid #123864;
color: #579acf; color: #579acf;
} }
::v-deep .el-pagination.is-background .el-pager li { ::v-deep .el-pagination .el-pager li {
background-color: transparent !important; background-color: transparent !important;
border: 1px solid #123864; border: 1px solid #123864;
color: #579acf; color: #579acf;
} }
// ::v-deep .el-pagination.is-background.el-pager li:not(.disabled).active {
::v-deep .el-pagination.is-background.el-pager li:not(.disabled).active { // background: rgba(20, 131, 242, 0.2) !important;
background: rgba(20, 131, 242, 0.2) !important; // border: 1px solid #1483f2;
border: 1px solid #1483f2; // border-radius: 4px;
border-radius: 4px; // color: #fff;
color: #fff; // }
}
::v-deep .el-pagination__jump { ::v-deep .el-pagination__jump {
margin: 0; margin: 0;
color: #2668d6; color: #2668d6;
@ -138,17 +145,13 @@ export default {
color: #2668d6; color: #2668d6;
} }
} }
::v-deep .el-pagination__total {
color: #2668d6;
}
::v-deep .el-pagination.is-background .el-pager li:hover {
background: rgba(20, 131, 242, 0.2) !important;
border: 1px solid #1483f2;
border-radius: 4px;
}
::v-deep .el-pager li.active { ::v-deep .el-pager li.active {
background: rgba(20, 131, 242, 0.2) !important; background: rgba(20, 131, 242, 0.52) !important;
border: 1px solid #1483f2; border: 1px solid #1483f2;
border-radius: 4px; border-radius: 4px;
} }
// ::v-deep .el-pagination__total {
// color: #2668d6;
// }
</style> </style>

Loading…
Cancel
Save