|
|
|
@ -8,17 +8,17 @@
|
|
|
|
|
<span class="Name">{{ pruduct.value || "暂无" }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="drug-tag">
|
|
|
|
|
<el-tag :key="index" v-for="(tag, index) in dynamicTags" :closable="urlA.leixing != 'ggfw'" :disable-transitions="false"
|
|
|
|
|
@close="handleClose(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-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-dialog title="编辑产品标签" :visible.sync="inputVisible" width="40%">
|
|
|
|
|
<el-select class="input-new-tag" v-model="inputValue" ref="saveTagInput" size="small" @change="" multiple
|
|
|
|
|
clearable @remove-tag="handleCloseTow">
|
|
|
|
|
<el-option v-for="item in options" :key="item" :label="item" :value="item">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
@ -39,52 +39,52 @@
|
|
|
|
|
<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">
|
|
|
|
|
v-show="urlA.type != 4 || urlA.type == 'yagao'">
|
|
|
|
|
<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="" />
|
|
|
|
|
? `${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(2, $event)" :class="action == 2 ? 'actionTab' : ''"
|
|
|
|
|
v-show="urlA.type != 4 && pruduct.type != '原料药'">
|
|
|
|
|
v-show="urlA.type != 4 && pruduct.type != '原料药'&& urlA.type != 'yagao'">
|
|
|
|
|
<img :src="action == 2
|
|
|
|
|
? `${require('@/assets/images/home/icon2-1@2x.png')}`
|
|
|
|
|
: `${require('@/assets/images/home/icon2-2@2x.png')}`
|
|
|
|
|
" alt="" />
|
|
|
|
|
? `${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 != '原料药'">
|
|
|
|
|
v-show="urlA.type != 4 && pruduct.type != '原料药'&& urlA.type != 'yagao'">
|
|
|
|
|
<img :src="action == 3
|
|
|
|
|
? `${require('@/assets/images/home/icon5-1@2x.png')}`
|
|
|
|
|
: `${require('@/assets/images/home/icon5-2@2x.png')}`
|
|
|
|
|
" alt="" />
|
|
|
|
|
? `${require('@/assets/images/home/icon5-1@2x.png')}`
|
|
|
|
|
: `${require('@/assets/images/home/icon5-2@2x.png')}`
|
|
|
|
|
" alt="" />
|
|
|
|
|
<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 != '原料药'&& urlA.type != 'yagao'">
|
|
|
|
|
<img :src="action == 4
|
|
|
|
|
? `${require('@/assets/images/home/icon1-1@2x.png')}`
|
|
|
|
|
: `${require('@/assets/images/home/icon1-2@2x.png')}`
|
|
|
|
|
" alt="" />
|
|
|
|
|
? `${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">
|
|
|
|
|
<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="" />
|
|
|
|
|
? `${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">
|
|
|
|
|
v-show="urlA.type == 4&& urlA.type != 'yagao'">
|
|
|
|
|
<img :src="action == 7
|
|
|
|
|
? `${require('@/assets/images/home/icon2-1@2x.png')}`
|
|
|
|
|
: `${require('@/assets/images/home/icon2-2@2x.png')}`
|
|
|
|
|
" alt="" />
|
|
|
|
|
? `${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(5, $event)" :class="action == 5 ? 'actionTab' : ''" v-show="urlA.type == 3">
|
|
|
|
@ -183,11 +183,11 @@
|
|
|
|
|
<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 != '原料药'&& urlA.type != 'yagao'">
|
|
|
|
|
<img :src="action == 19
|
|
|
|
|
? `${require('@/assets/images/home/icon1-1@2x.png')}`
|
|
|
|
|
: `${require('@/assets/images/home/icon1-2@2x.png')}`
|
|
|
|
|
" alt="" />
|
|
|
|
|
? `${require('@/assets/images/home/icon1-1@2x.png')}`
|
|
|
|
|
: `${require('@/assets/images/home/icon1-2@2x.png')}`
|
|
|
|
|
" alt="" />
|
|
|
|
|
<span>产品画像</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -316,12 +316,15 @@ export default {
|
|
|
|
|
this.currentComponent = "zhongyao"
|
|
|
|
|
}
|
|
|
|
|
let obj = {
|
|
|
|
|
1: "yp",
|
|
|
|
|
2: "hzp",
|
|
|
|
|
3: "labelTypeYLQX"
|
|
|
|
|
1: "labelTypeHZP",
|
|
|
|
|
"yagao": "labelTypeHZP",
|
|
|
|
|
2: "labelTypeYP",
|
|
|
|
|
3: "labelTypeYLQX",
|
|
|
|
|
4: "labelTypeYP",
|
|
|
|
|
5: "labelTypeYP",
|
|
|
|
|
}
|
|
|
|
|
this.options = []
|
|
|
|
|
this.$api.frimCenter.getDicts({ dict: obj[this.urlA.type] }).then(res => {
|
|
|
|
|
this.$api.frimCenter.getDicts({ dict: obj[this.urlA.type] || "zw" }).then(res => {
|
|
|
|
|
console.log(798, res);
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
res.data.map(element => {
|
|
|
|
@ -335,13 +338,36 @@ export default {
|
|
|
|
|
methods: {
|
|
|
|
|
//获取列表
|
|
|
|
|
getDicAndList() {
|
|
|
|
|
let mystring = ""
|
|
|
|
|
this.dynamicTags = []
|
|
|
|
|
this.$api.frimCenter.findBySoleInfo({ soleInfo: this.urlA.data }).then(res => {
|
|
|
|
|
console.log(890, res);
|
|
|
|
|
this.inputValue = []
|
|
|
|
|
let datamy = ""
|
|
|
|
|
if (this.urlA.type == "5" || this.urlA.type == "4") {
|
|
|
|
|
if (this.urlA.bah.substr(-2) === "#/") {
|
|
|
|
|
console.log("后两位是 '#/'");
|
|
|
|
|
let bah = this.urlA.bah.slice(0, -2); // 使用 slice() 方法删除最后两位
|
|
|
|
|
console.log("删除后两位后的字符串是: " + bah);
|
|
|
|
|
datamy = bah
|
|
|
|
|
} else {
|
|
|
|
|
console.log("后两位不是 '#/'");
|
|
|
|
|
datamy = this.urlA.bah
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
datamy = this.urlA.data
|
|
|
|
|
}
|
|
|
|
|
this.$api.frimCenter.findBySoleInfo({ soleInfo: datamy }).then(res => {
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
console.log(res);
|
|
|
|
|
res.data.map(element => {
|
|
|
|
|
this.dynamicTags.push(element.label)
|
|
|
|
|
// mystring = element.label
|
|
|
|
|
// var arr = mystring.split(',');
|
|
|
|
|
// arr.map((item) => {
|
|
|
|
|
// this.dynamicTags.push(item)
|
|
|
|
|
// })
|
|
|
|
|
});
|
|
|
|
|
this.inputValue = this.dynamicTags
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
@ -353,15 +379,10 @@ export default {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
//删除
|
|
|
|
|
handleClose(tag) {
|
|
|
|
|
handleCloseTow(tag) {
|
|
|
|
|
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))
|
|
|
|
|
console.log(tag);
|
|
|
|
|
if (this.dynamicTags.includes(tag)) {
|
|
|
|
|
let obj = {
|
|
|
|
|
label: tag,
|
|
|
|
|
soleInfo: this.urlA.data,
|
|
|
|
@ -376,13 +397,64 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handleClose(tag) {
|
|
|
|
|
console.log(this.urlA);
|
|
|
|
|
console.log(tag);
|
|
|
|
|
if (this.dynamicTags.includes(tag)) {
|
|
|
|
|
this.$confirm('是否删除该标签?', '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
// this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
|
|
|
|
|
// localStorage.setItem("dynamicTags", JSON.stringify(this.dynamicTags))
|
|
|
|
|
|
|
|
|
|
let obj = {}
|
|
|
|
|
if (this.urlA.type == "5" || this.urlA.type == "4") {
|
|
|
|
|
if (this.urlA.bah.substr(-2) === "#/") {
|
|
|
|
|
console.log("后两位是 '#/'");
|
|
|
|
|
let bah = this.urlA.bah.slice(0, -2); // 使用 slice() 方法删除最后两位
|
|
|
|
|
console.log("删除后两位后的字符串是: " + bah);
|
|
|
|
|
obj = {
|
|
|
|
|
label: tag,
|
|
|
|
|
soleInfo: bah,
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
console.log("后两位不是 '#/'");
|
|
|
|
|
obj = {
|
|
|
|
|
label: tag,
|
|
|
|
|
soleInfo: this.urlA.bah,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
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: '已取消删除'
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'info',
|
|
|
|
|
message: '已取消删除'
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
//新增按钮
|
|
|
|
|
showInput() {
|
|
|
|
@ -395,29 +467,65 @@ export default {
|
|
|
|
|
handleInputConfirm() {
|
|
|
|
|
console.log(123);
|
|
|
|
|
console.log(this.inputValue);
|
|
|
|
|
let inputValue = this.inputValue;
|
|
|
|
|
if (inputValue) {
|
|
|
|
|
if (this.dynamicTags.indexOf(inputValue) == -1) {
|
|
|
|
|
let obj = {
|
|
|
|
|
label: inputValue,
|
|
|
|
|
soleInfo: this.urlA.data,
|
|
|
|
|
let this_ = this;
|
|
|
|
|
function add(inputValue) {
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
let obj = {}
|
|
|
|
|
|
|
|
|
|
if (this_.urlA.type == "5" || this_.urlA.type == "4") {
|
|
|
|
|
if (this_.urlA.bah.substr(-2) === "#/") {
|
|
|
|
|
console.log("后两位是 '#/'");
|
|
|
|
|
let bah = this_.urlA.bah.slice(0, -2); // 使用 slice() 方法删除最后两位
|
|
|
|
|
console.log("删除后两位后的字符串是: " + bah);
|
|
|
|
|
obj = {
|
|
|
|
|
label: inputValue,
|
|
|
|
|
soleInfo: bah,
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
console.log("后两位不是 '#/'");
|
|
|
|
|
obj = {
|
|
|
|
|
label: inputValue,
|
|
|
|
|
soleInfo: this_.urlA.bah,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
obj = {
|
|
|
|
|
label: inputValue,
|
|
|
|
|
soleInfo: this_.urlA.data,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.$api.frimCenter.groductsLabel(obj).then(res => {
|
|
|
|
|
|
|
|
|
|
console.log(obj);
|
|
|
|
|
this_.$api.frimCenter.groductsLabel(obj).then(res => {
|
|
|
|
|
console.log(101010, res);
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
this.getDicAndList()
|
|
|
|
|
this.inputVisible = false;
|
|
|
|
|
this.inputValue = '';
|
|
|
|
|
resolve(true)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'info',
|
|
|
|
|
message: '请勿重复添加标签'
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
Promise.all(this.inputValue.map(inputValue => {
|
|
|
|
|
if (!this.dynamicTags.includes(inputValue)) {
|
|
|
|
|
return add(inputValue)
|
|
|
|
|
}
|
|
|
|
|
})).then(responses => {
|
|
|
|
|
// 所有接口都成功了
|
|
|
|
|
console.log('所有接口都成功了', responses);
|
|
|
|
|
this.getDicAndList()
|
|
|
|
|
this.inputValue = []
|
|
|
|
|
this.inputVisible = false
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
.catch(error => {
|
|
|
|
|
// 其中一个接口失败了
|
|
|
|
|
console.error('其中一个接口失败了', error);
|
|
|
|
|
this.inputValue = []
|
|
|
|
|
this.inputVisible = false
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
//获取名称
|
|
|
|
@ -685,7 +793,7 @@ export default {
|
|
|
|
|
height: 100%;
|
|
|
|
|
background: rgba(255, 255, 255, 0.9);
|
|
|
|
|
box-shadow: 0px 0px vw(12) 0px rgba(194, 212, 226, 0.64);
|
|
|
|
|
border-radius: vw(10) vw(10) 0 0;
|
|
|
|
|
border-radius: vw(10) vw(10) 0 0;
|
|
|
|
|
|
|
|
|
|
.drugInfo-top {
|
|
|
|
|
display: flex;
|
|
|
|
@ -719,8 +827,10 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.drug-tag {
|
|
|
|
|
width: vw(1000);
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
margin-left: vw(10);
|
|
|
|
|
|
|
|
|
|
.input-new-tag {
|
|
|
|
@ -728,6 +838,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
span {
|
|
|
|
|
margin: vh(10) vw(10);
|
|
|
|
|
margin-right: vw(10);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -824,4 +935,26 @@ export default {
|
|
|
|
|
::v-deep .el-select {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .el-dialog__title {
|
|
|
|
|
font-size: vb(16);
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .el-dialog__headerbtn .el-dialog__close {
|
|
|
|
|
font-size: vb(14);
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
color: #000;
|
|
|
|
|
margin-top: vh(-8);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::v-deep .el-dialog__body {
|
|
|
|
|
|
|
|
|
|
.el-input__inner {
|
|
|
|
|
height: vh(55);
|
|
|
|
|
font-size: vb(16);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/* 修改滚动条样式 .title_state为div盒子*/
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|