|
|
|
@ -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>
|