Lvtianfang
吕天方 1 year ago
parent 42f7863560
commit be297761d3

@ -0,0 +1,31 @@
import request from "@/utils/request";
export default {
// 通过批准文号查询单条药品批件信息
vRdgYpwhGxwz(data) {
return request({
url: `/pharmaceuticals/vRdgYpwhGxwz/${data}`,
method: "get",
});
},
// 根据备案号查询进口化妆品数据
jkcp(data) {
return request({
url: `/pharmaceuticals/jkcp/${data}`,
method: "get",
});
},
// 根据备案号查询单条国产化妆品数据
gccp(data) {
return request({
url: `/pharmaceuticals/gccp/${data}`,
method: "get",
});
},
// 通过注册证编号查询单条器械品种数据
ylqxJnyelcp(data) {
return request({
url: `/pharmaceuticals/ylqxJnyelcp/${data}`,
method: "get",
});
}
}

@ -1,6 +1,8 @@
// 召回
import frimCenter from "./Myapi/frimCenter/index.js";
import productDetails from "./Myapi/productDetails/index.js"
export default {
frimCenter,
productDetails
};

@ -35,7 +35,6 @@ service.interceptors.request.use(
const isRepeatSubmit = (config.headers || {}).repeatSubmit === false;
if (isToken) {
config.headers["Authentication"] = localStorage.getItem("Authentication");
config.headers["token"] = localStorage.getItem("Ls-Token"); //企业端
}
// get请求映射params参数
if (config.method === "get" && config.params) {
@ -104,7 +103,7 @@ service.interceptors.response.use(
) {
return res.data;
}
console.log("454545", code);
// console.log("454545", code);
if (code === 401) {
if (!isRelogin.show) {
isRelogin.show = true;
@ -146,10 +145,10 @@ service.interceptors.response.use(
}
},
async(error) => {
console.log(error);
console.log(error.response)
// console.log(error);
// console.log(error.response)
let { message } = error;
console.log(3333, message);
// console.log(3333, message);
if (
message == "Request failed with status code 401" ||
message == "Request failed with status code 500"

@ -1,13 +1,15 @@
<template>
<div class="drugBasicInfo">
<block-header title="基本信息">
<my-descriptions :descriptions="descriptionsFour"></my-descriptions>
<block-header title="基本信息" v-if="!isylqx">
<my-descriptions :descriptions="getDescriptions"></my-descriptions>
</block-header>
<qx-basicinfo v-else :zczh="qxzczh"></qx-basicinfo>
</div>
</template>
<script>
import blockHeader from "@/views/firmContent/components/blockHeader/index.vue"
import myDescriptions from "@/views/firmContent/components/descriptions/index.vue"
import qxBasicinfo from "./qxBasicInfo/index.vue"
export default {
data() {
return {
@ -341,42 +343,69 @@ export default {
// }
id:null,
token:null,
isYppzwh:false,
isHzp:false,
isTsHzp:false,
isylqx:false,
qxzczh:null
}
},
components:{blockHeader,myDescriptions},
components:{blockHeader,myDescriptions,qxBasicinfo},
props:['transinformation'],
computed:{
getDescriptions(){
if(this.isYppzwh) {
return this.descriptions
} else if(this.isHzp) {
return this.descriptionsTwo
} else if(this.isTsHzp) {
return this.descriptionsFour
} else {
return this.descriptions
}
}
},
mounted(){
let search = window.location.search.slice(1);
let params = search.split('&');
let paramsLabel = params[2].split('=')[0]
localStorage.setItem("Authentication",params[1].split('=')[1]);
console.log(params)
if (params[0].includes('b')) {
this.id = params[0].split('=')[1]
this.token = params[1].split('=')[1]
}
if(this.id == '1') {
this.goback = true;
} else {
this.goback = false;
if (paramsLabel == 'yppzwh') {
this.isYppzwh = true;
this.token = params[1].split('=')[1];
this.getVRdgYpwhGxwz(params[2].split('=')[1]);
} else if(paramsLabel == 'bah') {
this.isHzp = true;
this.token = params[1].split('=')[1];
this.getGccp(params[2].split('=')[1]);
} else if(paramsLabel == 'zczh') {
this.isTsHzp = true;
this.token = params[1].split('=')[1];
} else if(paramsLabel == 'qxzczh') {
this.isylqx = true;
this.token = params[1].split('=')[1];
this.qxzczh = params[2].split('=')[1]
// this.ylqxJnyelcp(params[2].split('=')[1]);
}
},
methods:{
async getVRdgYpwhGxwz(res){
let data = await this.$api.productDetails.vRdgYpwhGxwz(res); //
let { yptymc,yptymcyw,ypspmc,ypfl,jx,ypgg,bzgg,pzrq,yppzwh,yppzwhyxq,ypypzwh,ypyzczh,ssxkcyr,ssxkcyryw,ssxkcyrdz,ssxkcyrdzyw,ypscqymc,scdz,ypbm,ypbmbz,qymczw,qymcyw,scdzzw,scdzyw,dzgjhdqScc,sccszgdqyw,qymcGs,gsmcyw,gsdzzw,gsdzyw,gsszgdqzw,gsszgdqyw,fbzpzwh,fbzwhpzrq,fbzpzwhyxq,qymcFbz,scdzFbz } = data.data
let objtwo = { yptymc,yptymcyw,ypspmc,ypfl,jx,ypgg,bzgg,pzrq,yppzwh,yppzwhyxq,ypypzwh,ypyzczh,ssxkcyr,ssxkcyryw,ssxkcyrdz,ssxkcyrdzyw,ypscqymc,scdz,ypbm,ypbmbz,qymczw,qymcyw,scdzzw,scdzyw,dzgjhdqScc,sccszgdqyw,qymcGs,gsmcyw,gsdzzw,gsdzyw,gsszgdqzw,gsszgdqyw,fbzpzwh,fbzwhpzrq,fbzpzwhyxq,qymcFbz,scdzFbz };
this.changeDescriptions(this.descriptions,...Object.values(objtwo))
},
async getGccp(res){
let data = await this.$api.productDetails.gccp(res);
console.log(data)
},
async ylqxJnyelcp(res){
let data = await this.$api.productDetails.ylqxJnyelcp(res);
console.log(data)
}
},
// mounted(){
// this.$nextTick(()=>{
// let dom = document.getElementsByClassName('drugBasicInfo');
// let height = dom[0].getBoundingClientRect();
// let windowWidth = window.innerWidth;
// let windowHeight = window.innerHeight;
// let relativeHeight = windowHeight - height.top - (26 / 1920 * windowWidth)
// this.drugBasicInfoStyle.height = relativeHeight + 'px'
// })
// }
}
</script>
<style lang="scss" scoped>
@import "@/assets/styles/utils.scss";
.drugBasicInfo {
// overflow-y: scroll;
// height: vh(783);
}
</style>

@ -3,9 +3,9 @@
<div class="drugInfo-top">
<div class="top-left">
<div class="drug-name">
<span>药品通用名</span>
<!-- <span class="Name">{{ 暂无 }}</span> -->
<span class="Name">暂无</span>
<span v-if="isYppzwh"></span>
<span v-else></span>
<span class="Name">{{ name }}</span>
</div>
<div class="drug-tag">
<span v-for="item in tags" :key="item.id">{{ item.name }}</span>
@ -111,6 +111,9 @@ export default {
goback:true,
id:null,
token:null,
isYppzwh:false,
isHzp:false,
isTsHzp:false,
}
},
components:{
@ -158,6 +161,14 @@ export default {
let windowHeight = window.innerHeight;
let relativeHeight = windowHeight - height.top - 10
this.drugExitStyle.height = relativeHeight + 'px'
},
async getVRdgYpwhGxwz(res){
let data = await this.$api.productDetails.vRdgYpwhGxwz(res);
this.name = data.data.yptymc;
},
async ylqxJnyelcp(res){
let data = await this.$api.productDetails.ylqxJnyelcp(res);
this.name = data.data.cpmc;
}
},
// watch: {
@ -202,10 +213,17 @@ export default {
// this.row = this.$route.params.row;
let search = window.location.search.slice(1);
let params = search.split('&');
if (params[0].includes('b')) {
this.id = params[0].split('=')[1]
this.token = params[1].split('=')[1]
let paramsLabel = params[2].split('=')[0]
this.id = params[0].split('=')[1];
this.token = params[1].split('=')[1];
if (paramsLabel == 'yppzwh') {
this.isYppzwh = true;
this.getVRdgYpwhGxwz(params[2].split('=')[1]);
} else if(paramsLabel == 'qxzczh') {
this.ylqxJnyelcp(params[2].split('=')[1]);
}
// X
if(this.id == '1') {
this.goback = true;
} else {

@ -1,342 +0,0 @@
<template>
<div class="affair">
<div class="affair-title">
<img src="@/assets/images/home/location.png" alt="" />
<p style="margin: 0 20px 0 0"><span>企业门户 / </span>企业中心</p>
<el-dropdown
size="mini"
split-button
type="primary"
trigger="click"
@command="handleCommand"
>
{{ TestName }}
<el-dropdown-menu slot="dropdown">
<el-dropdown-item
:command="item"
v-for="(item, index) in TestLise"
:key="index"
>{{ item.businessDomainName }}</el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
</div>
<div class="affair-main">
<div class="main-left" v-if="num">
<div
v-for="(name, index) in typeName"
class="left-tabs"
:class="active == index ? 'active-tabs' : ''"
@click="activeTabs(index, name)"
:key="index"
>
<span>{{ name }}</span>
</div>
</div>
<div class="main-right">
<router-view></router-view>
</div>
</div>
</div>
</template>
<script>
import TestLise from "@/utils/TestList.js";
export default {
name: "firmContent",
data() {
return {
activeName: "first",
active: 0,
toPath: [],
num: true,
typeName: [],
componentsRoute: "firmInfo",
//
TestName: "测试切换企业",
TestLise: TestLise,
};
},
methods: {
activeTabs(id, name) {
this.active = id;
/*
* 由于此页面有监听路由变化点击切换左侧tabs时会监听到就会重新调取getFrimType()会导致给localStorage存储的currentFrimTypeName重新赋值
* 导致子页面显示不正确tabs切换了currentFrimTypeName被重新赋值存储typeName的第0子页面的内容不会发生改变
* 所以如果触发此事件 activeTabs() 说明该企业的经营类型肯定不止一个所以localStorage存储的currentFrimTypeNameIsClick就是用来记录切换企业
* 的经营类型了在此方法里 activeTabs() 又对localStorage存储的currentFrimTypeName进行了最新点击的赋值路由传参query带的typeName
* 发生了变化路由监听会继续调用getFrimType()方法 此时localStorage存储的currentFrimTypeNameIsClick为true 字符串 所以getFrimType()方法
* 里对localStorage存储的currentFrimTypeNameIsClick进行了判断不会对localStorage存储的currentFrimTypeName重新赋值为typeName的第0
* 子页面内容就会发生变化了
*/
//
this.$router.push({ name: "firmInfo", query: { typeName: name } });
//
localStorage.setItem("currentFrimTypeName", JSON.stringify(name));
// tabs
localStorage.setItem("currentFrimTypeNameIsClick", true);
},
getFrimType(type) {
if (type.includes("化妆品生产")) {
//
this.typeName.push("化妆品生产");
}
if (type.includes("药品上市许可持有人")) {
//
this.typeName.push("药品上市许可持有人");
}
if (type.includes("药品生产企业")) {
//
this.typeName.push("药品生产");
}
if (type.includes("医疗机构制剂室")) {
//
this.typeName.push("制剂室");
}
if (type.includes("药品批发企业")) {
//
this.typeName.push("药品经营");
}
if (type.includes("药品零售连锁总部")) {
//
this.typeName.push("药品经营");
}
if (type.includes("器械生产")) {
//
this.typeName.push("器械生产");
}
if (type.includes("GCP机构")) {
//
this.typeName.push("临床试验");
}
//
localStorage.setItem("typeName", JSON.stringify(this.typeName));
// currentFrimTypeName
if (localStorage.getItem("currentFrimTypeNameIsClick") !== 'true') {
//
localStorage.setItem("currentFrimTypeName",JSON.stringify(this.typeName[0]));
}
},
async getData() {
let frimInfo = JSON.parse(localStorage.getItem("frimCenterInfo"));
//
let businessDomainName = frimInfo.businessDomainName.split(",");
// tabs
if (businessDomainName.length > 1) {
this.num = true;
} else {
this.num = false;
}
//
this.getFrimType(businessDomainName);
// let getAllTypeCount = await this.$api.frimCenter.getAllTypeCount();
// let six = {
// "pageNum": 1,
// "pageSize": 10,
// "licenseCode": frimInfo.uniscid,
// type: frimInfo.businessDomainName
// }
// let licenseRecord = await this.$api.frimCenter.licenseRecord(six);
// console.log("3",getAllTypeCount);
// console.log("6",licenseRecord);
},
handleCommand(command) {
console.log(command)
localStorage.setItem("frimCenterInfo",JSON.stringify(command))
localStorage.setItem("currentFrimTypeNameIsClick",false)
this.$router.push({name:'basicInfo'})
location.reload();
},
},
async mounted() {
// let frimInfo = JSON.parse(localStorage.getItem("loginName"));
// let data = {
// "corpName": "",
// "uniscid": "",
// "location": "",
// "enterpriseStatusId": "",
// "licenseCode": "",
// "type": [],
// "startDate": "",
// "endDate": "",
// "pageNum": 1,
// "pageSize": 10
// }
// let info = await this.$api.frimCenter.getEnterpriseLicenseByPage(data);
// localStorage.setItem('frimCenterInfo',JSON.stringify(info.result.list[3]))
// this.$nextTick(()=>{
// let businessDomainName = info.result.list[3].businessDomainName.split(',');
// if(businessDomainName.length > 1){
// this.num = true;
// }
// })
// this.getFrimType(businessDomainName)
// let businessLicense = await this.$api.frimCenter.businessLicense(info.result.list[0].uniscid);
// let getAllTypeCount = await this.$api.frimCenter.getAllTypeCount();
// let four = {
// "pageNum": 1,
// "pageSize": 10,
// "uniscid": info.result.list[0].uniscid,
// "type": info.result.list[0].businessDomainName
// }
// let six = {
// "pageNum": 1,
// "pageSize": 10,
// "licenseCode": info.result.list[3].uniscid,
// type: info.result.list[3].businessDomainName
// }
// let getEnterpriseLicenseList = await this.$api.frimCenter.getEnterpriseLicenseList(four);
// let xkxx = await this.$api.frimCenter.licenseInformation({'licenseCode':info.result.list[0].xkzbh,'type':info.result.list[0].businessDomainName});
// let xkxx = await this.$api.frimCenter.licenseInformation(info.result.list[0].xkzbh,info.result.list[0].businessDomainName);
// let licenseRecord = await this.$api.frimCenter.licenseRecord(six);
// console.log("1",info);
// console.log("2",businessLicense); //
// console.log("3",getAllTypeCount);
// console.log("4",getEnterpriseLicenseList);
// console.log("5",xkxx);
// console.log("6",licenseRecord);
},
async created() {
this.getData();
this.TestName = JSON.parse(
localStorage.getItem("frimCenterInfo")
).businessDomainName;
},
watch: {
$route: {
handler(to, from) {
// console.log('firmContent',to)
// console.log(to.path);
if (JSON.parse(localStorage.getItem("currentFrimTypeName"))) {
let arr = JSON.parse(localStorage.getItem("typeName"));
// tabs
arr.map((item, index) => {
if (
item == JSON.parse(localStorage.getItem("currentFrimTypeName"))
) {
this.active = index;
}
});
}
},
immediate: true, //
},
},
};
</script>
<style lang="scss" scoped>
@import "@/assets/styles/utils.scss";
p {
margin: 0;
}
// $bg-height: vh(60);
.affair {
padding: vh(12) vw(18) 0 vw(18);
// min-height: calc(100vh - $bg-height / 1080 * 100vh);
// height: 100%;
background-image: url("../../assets/images/home/banner.png");
background-size: 100% 100%;
.affair-title {
padding: 0 0 vh(10) vw(51);
display: flex;
align-items: center;
img {
width: (16);
height: vh(18);
margin-right: vw(10);
}
p {
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #8e8e8e;
line-height: 17px;
span {
color: #292f38;
}
}
}
.affair-main {
display: flex;
// justify-content: flex-end;
min-height: 90vh;
.main-left {
visibility: visible;
display: flex;
flex-direction: column;
// height: vh(430);
margin-top: vh(9);
.left-tabs {
// width: vw(40);
// height: vh(113);
text-align: center;
padding: vh(25) vw(15);
background: url("../../assets/images/home/default-bg.png") no-repeat;
background-size: 100% 100%;
cursor: pointer;
margin: 0;
span {
// display: inline-block;
font-size: vw(16);
// width: vw(20);
// height: vh(200);
font-family: Source Han Sans CN;
font-weight: 400;
color: #8d8d8d;
/*文字居中*/
/*文字竖排*/
writing-mode: vertical-lr; /*从左向右 从右向左是 writing-mode: vertical-rl;*/
writing-mode: tb-lr; /*IE浏览器的从左向右 从右向左是 writing-mode: tb-rl*/
}
}
.active-tabs {
background: url("../../assets/images/home/active-bg.png") no-repeat;
background-size: 100% 100%;
span {
font-size: vw(16);
font-family: Source Han Sans CN;
font-weight: 500;
color: #ffffff;
text-shadow: 0px 2px 6px rgba(15, 88, 209, 0.77);
}
}
}
.main-right {
flex: 1;
min-height: 90vh;
::v-deep .el-tabs__nav-scroll {
padding: vh(5) 0 vh(5) vw(23);
}
::v-deep .el-tabs__item {
font-size: vw(16);
font-family: Source Han Sans CN;
font-weight: 500;
color: #8e8e8e;
}
::v-deep .is-active {
color: #292f38;
font-size: vw(17);
font-family: Source Han Sans CN;
font-weight: bold;
}
::v-deep .el-tabs__active-bar {
height: vh(5);
border-radius: vw(50);
// width: vw(42) !important;
bottom: vh(-5);
}
::v-deep .el-tabs__nav-wrap::after {
background-color: #edeef0;
height: vh(1.5);
}
}
}
}
</style>
Loading…
Cancel
Save