画像新增页面 7.9

main
李劲龙 8 months ago
parent aa2f8160e0
commit 29d3924c3a

@ -1,8 +1,8 @@
import request from "@/utils/request"; import request from "@/utils/request";
// 本地 // 本地
let api = "API" // let api = "API"
// 线上 // 线上
// let api = location.origin let api = location.origin
export default { export default {
frimLogin() { frimLogin() {
return request({ return request({

@ -15,9 +15,9 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 创建axios实例 // 创建axios实例
const service = axios.create({ const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分 // axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: process.env.VUE_APP_BASE_API, // baseURL: process.env.VUE_APP_BASE_API,
//!线上--2.17-198 //!线上--2.17-198
// baseURL:location.origin +"/api/ggfw", baseURL:location.origin +"/api/ggfw",
//!其他 //!其他
// baseURL:location.origin, // baseURL:location.origin,
// 超时 // 超时
@ -115,6 +115,9 @@ service.interceptors.response.use(res => {
message = "系统接口请求超时"; message = "系统接口请求超时";
} else if (message.includes("Request failed with status code")) { } else if (message.includes("Request failed with status code")) {
message = "系统接口" + message.substr(message.length - 3) + "异常"; message = "系统接口" + message.substr(message.length - 3) + "异常";
setTimeout(() => {
location.href = `${location.origin}/login`;
}, 2000);
} }
Message({ message: message, type: 'error', duration: 5 * 1000 }) Message({ message: message, type: 'error', duration: 5 * 1000 })
return Promise.reject(error) return Promise.reject(error)

@ -1,34 +1,14 @@
<template> <template>
<div class="Basic-box" ref="basic"> <div class="Basic-box" ref="basic">
<el-table <el-table :data="tableData" v-loading="load1" element-loading-text="..."
:data="tableData" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" :height="height" stripe
v-loading="load1" style="width: 100%; background-color: transparent">
element-loading-text="加载中..." <el-table-column v-for="(item, index) in tableHeader1" :key="index" :prop="item.prop" :label="item.label"
element-loading-spinner="el-icon-loading" :width="item.width || ''" show-overflow-tooltip align="center">
element-loading-background="rgba(0, 0, 0, 0.8)"
:height="height"
stripe
style="width: 100%; background-color: transparent"
>
<el-table-column
v-for="(item, index) in tableHeader1"
:key="index"
:prop="item.prop"
:label="item.label"
:width="item.width || ''"
show-overflow-tooltip
align="center"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div ref="pagination"> <div ref="pagination">
<Pagination <Pagination :total="total" :page="query.current" :limit="query.size" @pagination="changeList"></Pagination>
:total="total"
:page="query.current"
:limit="query.size"
@pagination="changeList"
></Pagination>
</div> </div>
</div> </div>
</template> </template>
@ -78,7 +58,7 @@ export default {
height: 0, height: 0,
}; };
}, },
created() {}, created() { },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.height = this.height =
@ -89,8 +69,41 @@ export default {
methods: { methods: {
getList() { getList() {
let newRouter = this.$route.query; let newRouter = this.$route.query;
this.query.name = newRouter.code; this.query.name = newRouter.code;
this.load1 = true; this.load1 = true;
if (this.query.name == "国药准字H21020985") {
this.tableData = [{
bgsj: "2020/6/15",
bgsx: "再注册",
bgxm: "符合《药品注册管理办法》的有关规定,进行再注册"
},{
bgsj: "2020/10/25",
bgsx: "企业更名",
bgxm: "生产企业名称由沈阳志鹰药业有限公司变更为辽宁亿帆药业有限公司"
},{
bgsj: "2020/12/30",
bgsx: "生产地址变更",
bgxm: "生产地址由沈阳市沈河区万柳塘路51号变更为本溪经济技术开发区香槐路67号"
},{
bgsj: "2022/4/20",
bgsx: "合并审批结论",
bgxm: "辽备2022008948予以备案申请人对申报资料的真实性、准确性、完整性负责"
},]
this.total = 4;
this.load1 = false;
return
}
if (this.query.name == "国药准字H19990372") {
this.tableData = [{
bgsj: "2020/7/13",
bgsx: "再注册",
bgxm: "符合《药品注册管理办法》的有关规定,进行再注册"
}]
this.total = 1;
this.load1 = false;
return
}
getDrugChange(this.query).then((res) => { getDrugChange(this.query).then((res) => {
this.tableData = res.data.records; this.tableData = res.data.records;
this.total = res.data.total; this.total = res.data.total;
@ -115,32 +128,40 @@ export default {
overflow-y: auto; overflow-y: auto;
background-color: transparent; background-color: transparent;
} }
::v-deep .el-table, ::v-deep .el-table,
.el-table__expanded-cell { .el-table__expanded-cell {
background-color: transparent; background-color: transparent;
} }
::v-deep .el-table th { ::v-deep .el-table th {
background-color: rgba(0, 100, 255, 0.2) !important; background-color: rgba(0, 100, 255, 0.2) !important;
color: #2492ff; color: #2492ff;
border: none; border: none;
} }
::v-deep .el-table td { ::v-deep .el-table td {
border: none; border: none;
} }
::v-deep .el-table::before { ::v-deep .el-table::before {
height: 0px; height: 0px;
} }
::v-deep .el-table tr { ::v-deep .el-table tr {
background-color: transparent !important; background-color: transparent !important;
color: #b7d4f5; color: #b7d4f5;
} }
::v-deep .el-table tbody tr:hover td { ::v-deep .el-table tbody tr:hover td {
background-color: transparent !important; background-color: transparent !important;
} }
::v-deep .el-table th.el-table__cell.is-leaf, ::v-deep .el-table th.el-table__cell.is-leaf,
.el-table td.el-table__cell { .el-table td.el-table__cell {
border: none; border: none;
} }
// //
::v-deep .el-table .el-table__body tr.el-table__row--striped td { ::v-deep .el-table .el-table__body tr.el-table__row--striped td {
background-color: rgba(0, 50, 150, 0.1) !important; background-color: rgba(0, 50, 150, 0.1) !important;

@ -117,17 +117,17 @@ export default {
}, },
getData() { getData() {
let newRouter = this.$route.query; let newRouter = this.$route.query;
getCPCJ({ name: newRouter.code }).then((res) => { getCPCJ({ pageNum: 1,pageSize:10000,approvalNumber: newRouter.code }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
if (res.data.result.length != 0) { if (res.data.result.list.length != 0) {
// //
this.myChart1data[0].value = res.data.result.filter(item => item.inspectType === "生产环节").length this.myChart1data[0].value = res.data.result.list.filter(item => item.inspectType === "生产环节").length
this.myChart1data[0].percent = ((res.data.result.filter(item => item.inspectType === "生产环节").length / res.data.result.length) * 100).toFixed(1) this.myChart1data[0].percent = ((res.data.result.list.filter(item => item.inspectType === "生产环节").length / res.data.result.list.length) * 100).toFixed(1)
this.myChart1data[1].value = res.data.result.filter(item => item.inspectType === "流通环节").length this.myChart1data[1].value = res.data.result.list.filter(item => item.inspectType === "流通环节").length
this.myChart1data[1].percent = ((res.data.result.filter(item => item.inspectType === "流通环节").length / res.data.result.length) * 100).toFixed(1) this.myChart1data[1].percent = ((res.data.result.list.filter(item => item.inspectType === "流通环节").length / res.data.result.list.length) * 100).toFixed(1)
// //
let mergedData = {}; let mergedData = {};
res.data.result.forEach((item) => { res.data.result.list.forEach((item) => {
if (item.qualified === "合格") { if (item.qualified === "合格") {
if (mergedData[item.province]) { if (mergedData[item.province]) {
mergedData[item.province].sampleType += 1; mergedData[item.province].sampleType += 1;
@ -145,12 +145,12 @@ export default {
this.myChart2data2.push(item.sampleType) this.myChart2data2.push(item.sampleType)
}) })
// //
this.countryC = res.data.result.filter(item => item.sampleType == "2").length this.countryC = res.data.result.list.filter(item => item.sampleType == "2").length
// //
this.provinceC = res.data.result.filter(item => item.sampleType == "1").length this.provinceC = res.data.result.list.filter(item => item.sampleType == "1").length
// //
const filteredData = res.data.result.filter(item => item.qualified === "不合格"); const filteredData = res.data.result.list.filter(item => item.qualified === "不合格");
this.pt = Math.floor(((this.reducefn(res.data.result) - this.reducefn(filteredData)) / this.reducefn(res.data.result)) * 100) this.pt = Math.floor(((this.reducefn(res.data.result.list) - this.reducefn(filteredData)) / this.reducefn(res.data.result.list)) * 100)
}else{ }else{
this.myChart2data = ["暂无"] this.myChart2data = ["暂无"]
this.myChart2data2 = ['0'] this.myChart2data2 = ['0']
@ -348,7 +348,6 @@ export default {
}; };
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.box {}
.top-box { .top-box {
margin: 10px 0; margin: 10px 0;

@ -21,11 +21,11 @@
show-overflow-tooltip show-overflow-tooltip
> >
</el-table-column> </el-table-column>
<el-table-column prop="address" label="分办处室" show-overflow-tooltip> <el-table-column prop="fbcs" label="分办处室" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column prop="address" label="处置状态" show-overflow-tooltip> <el-table-column prop="czzt" label="处置状态" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column prop="address" label="完成日期" show-overflow-tooltip> <el-table-column prop="wcrq" label="完成日期" show-overflow-tooltip>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div ref="pagination"> <div ref="pagination">
@ -51,8 +51,33 @@ export default {
this.height = this.height =
this.$refs.basic.offsetHeight - this.$refs.pagination.offsetHeight; this.$refs.basic.offsetHeight - this.$refs.pagination.offsetHeight;
}); });
this.getList()
},
methods: {
getList() {
let newRouter = this.$route.query;
if (newRouter.code == "国药准字H21020985") {
this.tableData = [{
data: "2024/3/19",
name: "1年内累计发生严重不良反应2起",
fbcs: "药品生产监管处、稽查五处",
czzt: "查阅",
wcrq: "2024/3/20",
}]
return
}
if (newRouter.code == "国药准字H19990372") {
this.tableData = [{
data: "2024/3/21",
name: "1年内累计发生严重不良反应1起",
fbcs: "药品生产监管处、稽查一处",
czzt: "查阅",
wcrq: "2024/3/22",
}]
return
}
},
}, },
methods: {},
computed: {}, computed: {},
}; };
</script> </script>

Loading…
Cancel
Save