更改了bug

master
李劲龙 2 years ago
parent aa2112aaff
commit f820b8faca

@ -7,13 +7,32 @@
</div> </div>
<div class="title--right" v-if="edit"> <div class="title--right" v-if="edit">
<div class="anniu--btn--left"> <div class="anniu--btn--left">
<el-button type="primary" plain size="mini" class="informant-btn" @click="sendEdit(0)"> <el-button
<img :src=" clickEdit ? require('@/assets/images/home/chongzhi@2x.png') :require('@/assets/images/home/edit@2x.png')" alt="" /> type="primary"
{{ clickEdit ? '重置':'编辑' }} plain
size="mini"
class="informant-btn"
@click="sendEdit(0)"
>
<img
:src="
clickEdit
? require('@/assets/images/home/chongzhi@2x.png')
: require('@/assets/images/home/edit@2x.png')
"
alt=""
/>
{{ clickEdit ? "重置" : "编辑" }}
</el-button> </el-button>
</div> </div>
<div class="anniu--btn--right" v-if="clickEdit"> <div class="anniu--btn--right" v-if="clickEdit">
<el-button type="primary" plain size="mini" class="informant-btnTwo" @click="sendEdit(1)"> <el-button
type="primary"
plain
size="mini"
class="informant-btnTwo"
@click="sendEdit(1)"
>
<img src="@/assets/images/home/baocun@2x.png" alt="" /> <img src="@/assets/images/home/baocun@2x.png" alt="" />
保存 保存
</el-button> </el-button>
@ -27,43 +46,43 @@
</template> </template>
<script> <script>
export default { export default {
name:'blockHeader', name: "blockHeader",
props: { props: {
title: { title: {
type: String, type: String,
required:true required: true,
}, },
edit: { edit: {
type: Boolean, type: Boolean,
default: false, default: false,
} },
}, },
data() { data() {
return { return {
clickEdit: false, clickEdit: false,
} };
}, },
methods: { methods: {
sendEdit(id) { sendEdit(id) {
if (id) { if (id) {
// //
this.$emit('btnClick',2); this.$emit("btnClick", 2);
this.clickEdit = false; this.clickEdit = false;
} else { } else {
// //
if (this.clickEdit) { if (this.clickEdit) {
// //
// this.clickEdit = false; // this.clickEdit = false;
this.$emit('btnClick',3); this.$emit("btnClick", 3);
} else { } else {
// //
this.clickEdit = true; this.clickEdit = true;
this.$emit('btnClick',1); this.$emit("btnClick", 1);
}
} }
} }
}, },
} },
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/assets/styles/utils.scss"; @import "@/assets/styles/utils.scss";
@ -78,14 +97,14 @@ export default {
.line { .line {
width: vw(4); width: vw(4);
height: vh(22); height: vh(22);
background: #1E80EB; background: #1e80eb;
margin-right: vw(9); margin-right: vw(9);
} }
.title { .title {
font-size: vw(16); font-size: vw(16);
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: bold; font-weight: bold;
color: #1E80EB; color: #1e80eb;
} }
} }
.title--right { .title--right {
@ -97,7 +116,7 @@ export default {
width: vw(84); width: vw(84);
height: vh(40); height: vh(40);
background: #e4effd; background: #e4effd;
border: vw(1) solid #1E80EB; border: vw(1) solid #1e80eb;
border-radius: vw(4); border-radius: vw(4);
line-height: vh(33); line-height: vh(33);
display: flex; display: flex;
@ -113,7 +132,7 @@ export default {
font-size: vw(14); font-size: vw(14);
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #1E80EB; color: #1e80eb;
} }
} }
} }
@ -123,13 +142,13 @@ export default {
width: vw(84); width: vw(84);
height: vh(40); height: vh(40);
background: #e4effd; background: #e4effd;
border: vw(1) solid #1E80EB; border: vw(1) solid #1e80eb;
border-radius: vw(4); border-radius: vw(4);
line-height: vh(33); line-height: vh(33);
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background-color: #1E80EB; background-color: #1e80eb;
img { img {
width: vw(13); width: vw(13);
margin-right: vw(5); margin-right: vw(5);
@ -149,4 +168,7 @@ export default {
margin-top: vh(24); margin-top: vh(24);
} }
} }
::v-deep .el-descriptions--mini.is-bordered .el-descriptions-item__cell {
padding: vh(15) vw(10);
}
</style> </style>

@ -119,4 +119,7 @@ export default {
} }
} }
} }
::v-deep .el-descriptions--mini.is-bordered .el-descriptions-item__cell{
padding: vh(15) vw(10);
}
</style> </style>

@ -545,13 +545,14 @@ export default {
this.form1.cybh = this.name; this.form1.cybh = this.name;
this.form1.size = 10; this.form1.size = 10;
this.form1.current = 1; this.form1.current = 1;
this.listyp() this.listyp();
} else if (this.urlA.type == "3") { } else if (this.urlA.type == "3") {
} }
}, },
reset() { reset() {
this.name = ""; this.name = "";
this.value = ""; this.value = "";
this.listyp();
}, },
getPagination(e) { getPagination(e) {
this.form1.current = e.page; this.form1.current = e.page;
@ -686,7 +687,7 @@ export default {
justify-content: center; justify-content: center;
} }
.informant-btn { .informant-btn {
padding: 12px 30px; padding: vw(13) vh(10);
width: vw(44); width: vw(44);
height: vh(20); height: vh(20);
background: #e4effd; background: #e4effd;
@ -706,7 +707,7 @@ export default {
} }
::v-deep .el-table td { ::v-deep .el-table td {
height: vh(40); height: vh(40);
padding: 0; padding: vh(10);
font-size: vw(14); font-size: vw(14);
font-weight: 400; font-weight: 400;
color: #292f38; color: #292f38;

@ -931,7 +931,7 @@ export default {
} }
} }
} }
::v-deep .el-descriptions--mini.is-bordered .el-descriptions-item__cell{ ::v-deep .el-descriptions--medium.is-bordered .el-descriptions-item__cell {
padding: vh(15) vw(10); padding: vh(15) vw(10);
} }
</style> </style>

@ -5,7 +5,7 @@
<div class="drug-name"> <div class="drug-name">
<span>{{ pruduct.key }} </span> <span>{{ pruduct.key }} </span>
<!-- <span class="Name">{{ 暂无 }}</span> --> <!-- <span class="Name">{{ 暂无 }}</span> -->
<span class="Name">{{ pruduct.value || '暂无' }}</span> <span class="Name">{{ pruduct.value || "暂无" }}</span>
</div> </div>
<div class="drug-tag"> <div class="drug-tag">
<span v-for="item in tags" :key="item.id">{{ item.name }}</span> <span v-for="item in tags" :key="item.id">{{ item.name }}</span>
@ -18,16 +18,50 @@
<div class="drugInfo-bottom"> <div class="drugInfo-bottom">
<div class="content-tabs"> <div class="content-tabs">
<div class="tabs"> <div class="tabs">
<div class="tab" @click="actionTab(1)" :class="action == 1 ? 'actionTab':''"> <div
<img :class="action !== 1 ? 'actionImage' : ''" :src="action == 1 ? `${require('@/assets/images/home/icon1-1@2x.png')}`:`${require('@/assets/images/home/icon1-2@2x.png')}`" alt=""> class="tab"
@click="actionTab(1)"
:class="action == 1 ? 'actionTab' : ''"
>
<img
:class="action !== 1 ? 'actionImage' : ''"
:src="
action == 1
? `${require('@/assets/images/home/icon1-1@2x.png')}`
: `${require('@/assets/images/home/icon1-2@2x.png')}`
"
alt=""
/>
<span>基本信息</span> <span>基本信息</span>
</div> </div>
<div class="tab" @click="actionTab(2)" :class="action == 2 ? 'actionTab':''"> <div
<img :src="action == 2 ? `${require('@/assets/images/home/icon2-1@2x.png')}`:`${require('@/assets/images/home/icon2-2@2x.png')}`" alt=""> class="tab"
@click="actionTab(2)"
:class="action == 2 ? 'actionTab' : ''"
>
<img
:src="
action == 2
? `${require('@/assets/images/home/icon2-1@2x.png')}`
: `${require('@/assets/images/home/icon2-2@2x.png')}`
"
alt=""
/>
<span>品种抽样</span> <span>品种抽样</span>
</div> </div>
<div class="tab" @click="actionTab(3)" :class="action == 3 ? 'actionTab':''"> <div
<img :src="action == 3 ? `${require('@/assets/images/home/icon5-1@2x.png')}`:`${require('@/assets/images/home/icon5-2@2x.png')}`" alt=""> class="tab"
@click="actionTab(3)"
:class="action == 3 ? 'actionTab' : ''"
>
<img
:src="
action == 3
? `${require('@/assets/images/home/icon5-1@2x.png')}`
: `${require('@/assets/images/home/icon5-2@2x.png')}`
"
alt=""
/>
<span>不良反应</span> <span>不良反应</span>
</div> </div>
</div> </div>
@ -65,15 +99,19 @@
</div> --> </div> -->
<div class="drug-exit" :style="drugExitStyle"> <div class="drug-exit" :style="drugExitStyle">
<!-- <router-view></router-view> --> <!-- <router-view></router-view> -->
<component :is="currentComponent" :transinformation="transinformation" @getCPName="getCPName"></component> <component
:is="currentComponent"
:transinformation="transinformation"
@getCPName="getCPName"
></component>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import basicInfo from "./drugBasicInfo/drugBasicInfo" import basicInfo from "./drugBasicInfo/drugBasicInfo";
import PZchouyang from "./PZchouyang/PZchouyang" import PZchouyang from "./PZchouyang/PZchouyang";
import adverseReaction from "./adverseReaction/adverseReaction" import adverseReaction from "./adverseReaction/adverseReaction";
export default { export default {
data() { data() {
return { return {
@ -81,71 +119,72 @@ export default {
tags: [ tags: [
{ {
id: 1, id: 1,
name:'百年产品' name: "百年产品",
},{ },
{
id: 2, id: 2,
name:'疗效显著' name: "疗效显著",
}, },
], ],
action: 1, action: 1,
currentComponent:'basicInfo', currentComponent: "basicInfo",
drugExitStyle: { drugExitStyle: {
height:'', height: "",
}, },
// isOne:false, // isOne:false,
id: null, id: null,
token: null, token: null,
// //
pruduct: { pruduct: {
key:'某某产品', key: "某某产品",
value:'-' value: "-",
} },
} };
}, },
components: { components: {
basicInfo, basicInfo,
PZchouyang, PZchouyang,
adverseReaction adverseReaction,
}, },
methods: { methods: {
// //
getCPName(e) { getCPName(e) {
this.pruduct.key = e.key this.pruduct.key = e.key;
this.pruduct.value = e.value this.pruduct.value = e.value;
}, },
goBack() { goBack() {
this.$router.go(-1) this.$router.go(-1);
}, },
// tabs // tabs
actionTab(id) { actionTab(id) {
this.action = id; this.action = id;
if (id == 1) { if (id == 1) {
this.currentComponent = 'basicInfo' this.currentComponent = "basicInfo";
// this.$router.push({ name:'drugBasicInfo' }) // this.$router.push({ name:'drugBasicInfo' })
this.$nextTick(() => { this.$nextTick(() => {
this.getHeight(); this.getHeight();
}) });
} else if (id == 2) { } else if (id == 2) {
this.currentComponent = 'PZchouyang' this.currentComponent = "PZchouyang";
this.$nextTick(() => { this.$nextTick(() => {
this.getHeight(); this.getHeight();
}) });
// this.$router.push({ name:'PZchouyang' }) // this.$router.push({ name:'PZchouyang' })
} else if (id == 3) { } else if (id == 3) {
this.currentComponent = 'adverseReaction' this.currentComponent = "adverseReaction";
this.$nextTick(() => { this.$nextTick(() => {
this.getHeight(); this.getHeight();
}) });
// this.$router.push({ name:'adverseReaction' }) // this.$router.push({ name:'adverseReaction' })
} }
}, },
getHeight() { getHeight() {
let dom = document.getElementsByClassName('drug-exit'); let dom = document.getElementsByClassName("drug-exit");
let height = dom[0].getBoundingClientRect(); let height = dom[0].getBoundingClientRect();
let windowWidth = window.innerWidth; let windowWidth = window.innerWidth;
let windowHeight = window.innerHeight; let windowHeight = window.innerHeight;
let relativeHeight = windowHeight - height.top - 10 let relativeHeight = windowHeight - height.top - 10;
this.drugExitStyle.height = relativeHeight + 'px' this.drugExitStyle.height = relativeHeight + "px";
}, },
async getVRdgYpwhGxwz(res) { async getVRdgYpwhGxwz(res) {
let data = await this.$api.productDetails.vRdgYpwhGxwz(res); let data = await this.$api.productDetails.vRdgYpwhGxwz(res);
@ -154,7 +193,7 @@ export default {
async ylqxJnyelcp(res) { async ylqxJnyelcp(res) {
let data = await this.$api.productDetails.ylqxJnyelcp(res); let data = await this.$api.productDetails.ylqxJnyelcp(res);
this.name = data.data.cpmc; this.name = data.data.cpmc;
} },
}, },
// watch: { // watch: {
// $route: { // $route: {
@ -168,29 +207,29 @@ export default {
computed: { computed: {
transinformation() { transinformation() {
switch (this.currentComponent) { switch (this.currentComponent) {
case 'basicInfo': case "basicInfo":
return { return {
b: this.id, b: this.id,
token: this.token, token: this.token,
} };
case 'PZchouyang': case "PZchouyang":
return { return {
b: this.id, b: this.id,
token: this.token, token: this.token,
} };
case 'adverseReaction': case "adverseReaction":
return { return {
b: this.id, b: this.id,
token: this.token, token: this.token,
} };
default: default:
return { return {
b: 4, b: 4,
token:'暂无' token: "暂无",
} };
}
} }
}, },
},
mounted() { mounted() {
// params // params
// console.log(this.$route.params) // console.log(this.$route.params)
@ -207,7 +246,6 @@ export default {
// } else if(paramsLabel == 'qxzczh') { // } else if(paramsLabel == 'qxzczh') {
// this.ylqxJnyelcp(params[2].split('=')[1]); // this.ylqxJnyelcp(params[2].split('=')[1]);
// } // }
// // X // // X
// if(this.id == '1') { // if(this.id == '1') {
// this.goback = true; // this.goback = true;
@ -217,8 +255,8 @@ export default {
// this.$nextTick(()=>{ // this.$nextTick(()=>{
// this.getHeight(); // this.getHeight();
// }) // })
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/assets/styles/utils.scss"; @import "@/assets/styles/utils.scss";
@ -232,7 +270,7 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: vh(15) vw(25); padding: vh(15) vw(25);
border-bottom: vw(1) solid #EDEEF0; border-bottom: vw(1) solid #edeef0;
.close { .close {
cursor: pointer; cursor: pointer;
} }
@ -248,12 +286,12 @@ export default {
font-size: vw(18); font-size: vw(18);
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #6A6C6F; color: #6a6c6f;
} }
.Name { .Name {
// margin-left: ; // margin-left: ;
color: #292F38; color: #292f38;
} }
} }
.drug-tag { .drug-tag {
@ -267,19 +305,18 @@ export default {
margin-right: vw(10); margin-right: vw(10);
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #ffffff;
padding: vh(4) vw(13); padding: vh(4) vw(13);
background-color: #66C691; background-color: #66c691;
border-radius: vw(2); border-radius: vw(2);
&:nth-of-type(2) { &:nth-of-type(2) {
background-color: #EABB48; background-color: #eabb48;
} }
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
} }
} }
} }
} }
} }
@ -290,9 +327,9 @@ export default {
.tabs { .tabs {
width: 100%; width: 100%;
display: flex; display: flex;
border-bottom: vw(1) solid #DBE0E8; border-bottom: vw(1) solid #dbe0e8;
.tab { .tab {
border: vw(1) solid #DBE0E8; border: vw(1) solid #dbe0e8;
padding: vh(7) vw(22); padding: vh(7) vw(22);
display: flex; display: flex;
align-items: center; align-items: center;
@ -321,11 +358,11 @@ export default {
font-size: vw(16); font-size: vw(16);
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #2F3742; color: #2f3742;
} }
} }
.actionTab { .actionTab {
background-color: #1E80EB; background-color: #1e80eb;
span { span {
color: #fff; color: #fff;
@ -340,5 +377,8 @@ export default {
overflow-y: scroll; overflow-y: scroll;
} }
} }
}
::v-deep.pzChouyang .tables .el-table td{
} }
</style> </style>

Loading…
Cancel
Save