|
|
|
@ -7,17 +7,27 @@
|
|
|
|
|
<!-- <span class="Name">{{ 暂无 }}</span> -->
|
|
|
|
|
<span class="Name">{{ pruduct.value || "暂无" }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="drug-tag">
|
|
|
|
|
<el-tag :key="index" v-for="(tag, index) in dynamicTags" closable :disable-transitions="false"
|
|
|
|
|
<div class="drug-tag">
|
|
|
|
|
<el-tag :key="index" v-for="(tag, index) in dynamicTags" :closable="urlA.leixing != 'ggfw'" :disable-transitions="false"
|
|
|
|
|
@close="handleClose(tag)">
|
|
|
|
|
{{ tag }}
|
|
|
|
|
</el-tag>
|
|
|
|
|
<el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small"
|
|
|
|
|
@keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm">
|
|
|
|
|
</el-input>
|
|
|
|
|
<el-button v-else class="button-new-tag" size="small" @click="showInput">+添加标签</el-button>
|
|
|
|
|
</div> -->
|
|
|
|
|
|
|
|
|
|
<el-button class="button-new-tag" size="small" @click="showInput"
|
|
|
|
|
v-if="urlA.leixing != 'ggfw'">+添加标签</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<el-dialog title="编辑产品标签" :visible.sync="inputVisible" width="30%">
|
|
|
|
|
<el-select class="input-new-tag" v-model="inputValue" ref="saveTagInput" size="small" @change="">
|
|
|
|
|
<el-option v-for="item in options" :key="item" :label="item" :value="item">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="inputVisible = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="handleInputConfirm">确 定</el-button>
|
|
|
|
|
</span>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<div class="isbuttom">
|
|
|
|
|
<!-- <el-button type="primary" plain @click="gohuaxianga"
|
|
|
|
|
v-show="urlA.type != 4 && urlA.leixing != 'ggfw'">产品画像</el-button> -->
|
|
|
|
@ -28,7 +38,8 @@
|
|
|
|
|
<div class="drugInfo-bottom">
|
|
|
|
|
<div class="content-tabs">
|
|
|
|
|
<div class="tabs" ref="tabs">
|
|
|
|
|
<div class="tab" @click="actionTab(1, $event)" :class="action == 1 ? 'actionTab' : ''" v-show="urlA.type != 4">
|
|
|
|
|
<div class="tab" @click="actionTab(1, $event)" :class="action == 1 ? 'actionTab' : ''"
|
|
|
|
|
v-show="urlA.type != 4">
|
|
|
|
|
<img :class="action !== 1 ? 'actionImage' : ''" :src="action == 1
|
|
|
|
|
? `${require('@/assets/images/home/icon1-1@2x.png')}`
|
|
|
|
|
: `${require('@/assets/images/home/icon1-2@2x.png')}`
|
|
|
|
@ -36,14 +47,16 @@
|
|
|
|
|
<span>基本信息</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="tab" @click="actionTab(2, $event)" :class="action == 2 ? 'actionTab' : ''" v-show="urlA.type != 4&&pruduct.type != '原料药'">
|
|
|
|
|
<div class="tab" @click="actionTab(2, $event)" :class="action == 2 ? 'actionTab' : ''"
|
|
|
|
|
v-show="urlA.type != 4 && pruduct.type != '原料药'">
|
|
|
|
|
<img :src="action == 2
|
|
|
|
|
? `${require('@/assets/images/home/icon2-1@2x.png')}`
|
|
|
|
|
: `${require('@/assets/images/home/icon2-2@2x.png')}`
|
|
|
|
|
" alt="" />
|
|
|
|
|
<span>抽样信息</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab" @click="actionTab(3, $event)" :class="action == 3 ? 'actionTab' : ''" v-show="urlA.type != 4&&pruduct.type != '原料药'">
|
|
|
|
|
<div class="tab" @click="actionTab(3, $event)" :class="action == 3 ? 'actionTab' : ''"
|
|
|
|
|
v-show="urlA.type != 4 && pruduct.type != '原料药'">
|
|
|
|
|
<img :src="action == 3
|
|
|
|
|
? `${require('@/assets/images/home/icon5-1@2x.png')}`
|
|
|
|
|
: `${require('@/assets/images/home/icon5-2@2x.png')}`
|
|
|
|
@ -51,21 +64,23 @@
|
|
|
|
|
<span>不良反应</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab" @click="actionTab(4, $event)" :class="action == 4 ? 'actionTab' : ''"
|
|
|
|
|
v-show="urlA.type != 1 && urlA.type != 4&&pruduct.type != '原料药'">
|
|
|
|
|
v-show="urlA.type != 1 && urlA.type != 4 && pruduct.type != '原料药'">
|
|
|
|
|
<img :src="action == 4
|
|
|
|
|
? `${require('@/assets/images/home/icon1-1@2x.png')}`
|
|
|
|
|
: `${require('@/assets/images/home/icon1-2@2x.png')}`
|
|
|
|
|
" alt="" />
|
|
|
|
|
<span>召回信息</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab" @click="actionTab(6, $event)" :class="action == 6 ? 'actionTab' : ''" v-show="urlA.type == 4">
|
|
|
|
|
<div class="tab" @click="actionTab(6, $event)" :class="action == 6 ? 'actionTab' : ''"
|
|
|
|
|
v-show="urlA.type == 4">
|
|
|
|
|
<img :class="action !== 6 ? 'actionImage' : ''" :src="action == 6
|
|
|
|
|
? `${require('@/assets/images/home/icon1-1@2x.png')}`
|
|
|
|
|
: `${require('@/assets/images/home/icon1-2@2x.png')}`
|
|
|
|
|
" alt="" />
|
|
|
|
|
<span>基本信息</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab" @click="actionTab(7, $event)" :class="action == 7 ? 'actionTab' : ''" v-show="urlA.type == 4">
|
|
|
|
|
<div class="tab" @click="actionTab(7, $event)" :class="action == 7 ? 'actionTab' : ''"
|
|
|
|
|
v-show="urlA.type == 4">
|
|
|
|
|
<img :src="action == 7
|
|
|
|
|
? `${require('@/assets/images/home/icon2-1@2x.png')}`
|
|
|
|
|
: `${require('@/assets/images/home/icon2-2@2x.png')}`
|
|
|
|
@ -168,7 +183,7 @@
|
|
|
|
|
<span>产品名称命名依据</span>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="tab" @click="actionTab(19, $event)" :class="action == 19 ? 'actionTab' : ''"
|
|
|
|
|
v-show="urlA.type != 4 && urlA.leixing != 'ggfw' && pruduct.type != 7&& pruduct.type != '原料药'">
|
|
|
|
|
v-show="urlA.type != 4 && urlA.leixing != 'ggfw' && pruduct.type != 7 && pruduct.type != '原料药'">
|
|
|
|
|
<img :src="action == 19
|
|
|
|
|
? `${require('@/assets/images/home/icon1-1@2x.png')}`
|
|
|
|
|
: `${require('@/assets/images/home/icon1-2@2x.png')}`
|
|
|
|
@ -230,12 +245,19 @@ import linchuangshiyanbeian from "./linchuangshiyanbeian/adverseReaction";
|
|
|
|
|
import duolie from "./duolie/adverseReaction";
|
|
|
|
|
// 特殊化妆品
|
|
|
|
|
import teshuhuazhuang from "./teshuhuazhuang/drugBasicInfo";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { getDicts } from "@/api/system/dict/data.js";
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
basicInfo,
|
|
|
|
|
PZchouyang,
|
|
|
|
|
adverseReaction,
|
|
|
|
|
zhaohui,
|
|
|
|
|
zhongyao,
|
|
|
|
|
zhongyaobiangeng,
|
|
|
|
|
linchuangshiyanbeian,
|
|
|
|
|
duolie,
|
|
|
|
|
teshuhuazhuang
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
row: {},
|
|
|
|
@ -260,55 +282,146 @@ export default {
|
|
|
|
|
cpib: ""
|
|
|
|
|
},
|
|
|
|
|
title: "",
|
|
|
|
|
datalist: []
|
|
|
|
|
datalist: [],
|
|
|
|
|
options: ["测试标签1", "测试标签2", "测试标签3",]
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
components: {
|
|
|
|
|
basicInfo,
|
|
|
|
|
PZchouyang,
|
|
|
|
|
adverseReaction,
|
|
|
|
|
zhaohui,
|
|
|
|
|
zhongyao,
|
|
|
|
|
zhongyaobiangeng,
|
|
|
|
|
linchuangshiyanbeian,
|
|
|
|
|
duolie,
|
|
|
|
|
teshuhuazhuang
|
|
|
|
|
mounted() {
|
|
|
|
|
// params刷新数据会丢失
|
|
|
|
|
// console.log(this.$route.params)
|
|
|
|
|
// this.row = JSON.parse(this.$route.params.row)
|
|
|
|
|
// this.row = this.$route.params.row;
|
|
|
|
|
// let search = window.location.search.slice(1);
|
|
|
|
|
// let params = search.split('&');
|
|
|
|
|
// 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 {
|
|
|
|
|
// this.goback = false;
|
|
|
|
|
// }
|
|
|
|
|
// this.$nextTick(()=>{
|
|
|
|
|
// this.getHeight();
|
|
|
|
|
// })
|
|
|
|
|
if (this.urlA.type == 4) {
|
|
|
|
|
this.action = 6
|
|
|
|
|
this.currentComponent = "zhongyao"
|
|
|
|
|
}
|
|
|
|
|
let obj = {
|
|
|
|
|
1: "yp",
|
|
|
|
|
2: "hzp",
|
|
|
|
|
3: "labelTypeYLQX"
|
|
|
|
|
}
|
|
|
|
|
this.options = []
|
|
|
|
|
this.$api.frimCenter.getDicts({ dict: obj[this.urlA.type] }).then(res => {
|
|
|
|
|
console.log(798, res);
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
res.data.map(element => {
|
|
|
|
|
this.options.push(element.dictLabel)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
// this.dynamicTags = JSON.parse(localStorage.getItem("dynamicTags")) || ['百年企业', '良心企业']
|
|
|
|
|
this.getDicAndList()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
//获取列表
|
|
|
|
|
getDicAndList() {
|
|
|
|
|
this.dynamicTags = []
|
|
|
|
|
this.$api.frimCenter.findBySoleInfo({ soleInfo: this.urlA.data }).then(res => {
|
|
|
|
|
console.log(890, res);
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
res.data.map(element => {
|
|
|
|
|
this.dynamicTags.push(element.label)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
gohuaxianga() {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
// location.href = `${location.origin}/ggfw-jcphx/#/bgpage?code=${this.pruduct.code}&name=${this.pruduct.name}&type=${this.pruduct.type}`
|
|
|
|
|
console.log(`code=${this.pruduct.code}&name=${this.pruduct.name}&type=${this.pruduct.type}`);
|
|
|
|
|
location.href = `${location.origin}/ggfw-jcphx/#/bgpage?code=${this.pruduct.code}&name=${this.pruduct.name}&type=${this.pruduct.type}`
|
|
|
|
|
// console.log(`code=${this.pruduct.code}&name=${this.pruduct.name}&type=${this.pruduct.type}`);
|
|
|
|
|
}, 0);
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//删除
|
|
|
|
|
handleClose(tag) {
|
|
|
|
|
this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
|
|
|
|
|
localStorage.setItem("dynamicTags", JSON.stringify(this.dynamicTags))
|
|
|
|
|
console.log(this.urlA);
|
|
|
|
|
this.$confirm('是否删除该标签?', '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
// this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
|
|
|
|
|
// localStorage.setItem("dynamicTags", JSON.stringify(this.dynamicTags))
|
|
|
|
|
let obj = {
|
|
|
|
|
label: tag,
|
|
|
|
|
soleInfo: this.urlA.data,
|
|
|
|
|
}
|
|
|
|
|
this.$api.frimCenter.deleteLabel(obj).then(res => {
|
|
|
|
|
console.log(101010, res);
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.getDicAndList()
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'success',
|
|
|
|
|
message: '删除成功!'
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'info',
|
|
|
|
|
message: '已取消删除'
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//新增按钮
|
|
|
|
|
showInput() {
|
|
|
|
|
this.inputVisible = true;
|
|
|
|
|
this.$nextTick(_ => {
|
|
|
|
|
this.$refs.saveTagInput.$refs.input.focus();
|
|
|
|
|
// this.$refs.saveTagInput.focus();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//新增
|
|
|
|
|
handleInputConfirm() {
|
|
|
|
|
console.log(123);
|
|
|
|
|
console.log(this.inputValue);
|
|
|
|
|
let inputValue = this.inputValue;
|
|
|
|
|
if (inputValue) {
|
|
|
|
|
this.dynamicTags.push(inputValue);
|
|
|
|
|
localStorage.setItem("dynamicTags", JSON.stringify(this.dynamicTags))
|
|
|
|
|
|
|
|
|
|
if (this.dynamicTags.indexOf(inputValue) == -1) {
|
|
|
|
|
let obj = {
|
|
|
|
|
label: inputValue,
|
|
|
|
|
soleInfo: this.urlA.data,
|
|
|
|
|
}
|
|
|
|
|
this.$api.frimCenter.groductsLabel(obj).then(res => {
|
|
|
|
|
console.log(101010, res);
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.getDicAndList()
|
|
|
|
|
this.inputVisible = false;
|
|
|
|
|
this.inputValue = '';
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'info',
|
|
|
|
|
message: '请勿重复添加标签'
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
//获取名称
|
|
|
|
|
getCPName(e) {
|
|
|
|
|
|
|
|
|
|
this.pruduct.key = e.key;
|
|
|
|
|
this.pruduct.value = e.value;
|
|
|
|
|
this.pruduct.code = e.code;
|
|
|
|
@ -316,7 +429,7 @@ export default {
|
|
|
|
|
this.pruduct.type = e.type;
|
|
|
|
|
// 医疗器械第几类
|
|
|
|
|
this.pruduct.cpib = e.cpib;
|
|
|
|
|
console.log(798,this.pruduct);
|
|
|
|
|
console.log(798, this.pruduct);
|
|
|
|
|
},
|
|
|
|
|
goBack() {
|
|
|
|
|
this.$router.go(-1);
|
|
|
|
@ -561,37 +674,7 @@ export default {
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
// params刷新数据会丢失
|
|
|
|
|
// console.log(this.$route.params)
|
|
|
|
|
// this.row = JSON.parse(this.$route.params.row)
|
|
|
|
|
// this.row = this.$route.params.row;
|
|
|
|
|
// let search = window.location.search.slice(1);
|
|
|
|
|
// let params = search.split('&');
|
|
|
|
|
// 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 {
|
|
|
|
|
// this.goback = false;
|
|
|
|
|
// }
|
|
|
|
|
// this.$nextTick(()=>{
|
|
|
|
|
// this.getHeight();
|
|
|
|
|
// })
|
|
|
|
|
if (this.urlA.type == 4) {
|
|
|
|
|
this.action = 6
|
|
|
|
|
this.currentComponent = "zhongyao"
|
|
|
|
|
}
|
|
|
|
|
this.dynamicTags = JSON.parse(localStorage.getItem("dynamicTags")) || ['百年企业', '良心企业']
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@ -641,7 +724,7 @@ export default {
|
|
|
|
|
margin-left: vw(10);
|
|
|
|
|
|
|
|
|
|
.input-new-tag {
|
|
|
|
|
width: vw(80);
|
|
|
|
|
width: vw(160);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
span {
|
|
|
|
@ -737,4 +820,8 @@ export default {
|
|
|
|
|
font-size: vb(16);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .el-select {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|