修改知识库

This commit is contained in:
shidongli 2024-04-01 15:00:45 +08:00
parent 29099b8424
commit fb2ebeecf2
2 changed files with 93 additions and 28 deletions

View File

@ -132,9 +132,18 @@
</div>
<div class="dataliat">素材来源</div>
<!-- <div class="dataliat">标签暂无</div> -->
<div class="dataliat bq">
<div
class="dataliat bq"
v-if="
item.indications ||
item.drugName ||
item.applicableDiseases ||
item.surgicalName ||
item.inspectionItems ||
item.checkItems
"
>
标签
<span v-if="item.indications">{{ item.indications }}</span>
<span v-if="item.drugName">{{ item.drugName }}</span>
<span v-if="item.applicableDiseases"
@ -146,6 +155,7 @@
>
<span v-if="item.checkItems">{{ item.checkItems }}</span>
</div>
<div class="dataliat bq" v-else>标签暂无</div>
</div>
<div class="label" @click.stop="labelchange(item)">标签管理</div>
@ -206,18 +216,6 @@
:type="'materialsCoverUrl'"
/>
</el-form-item>
<el-form-item
label="视频素材上传"
prop="materialsFilePath"
v-if="form.materialsType == 'VIDEO'"
>
<trainingAvatar
@imgUrl="imgUrl2"
:tovideo="form.materialsFilePath"
:type="'materialsVideoUrl'"
/>
</el-form-item>
<el-form-item
label="视频封面"
prop="videoCoverFilePath"
@ -230,6 +228,18 @@
/>
</el-form-item>
<el-form-item
label="视频素材上传"
prop="materialsFilePath"
v-if="form.materialsType == 'VIDEO'"
>
<trainingAvatar
@imgUrl="imgUrl2"
:tovideo="form.materialsFilePath"
:type="'materialsVideoUrl'"
/>
</el-form-item>
<el-form-item label="素材摘要" prop="materialsAbstract">
<el-input
style="width: 530px"
@ -313,7 +323,7 @@
<div class="nameitem">{{ viewform.createTime }}</div>
<div class="nametitle">素材摘要</div>
<div class="nameitem">{{ viewform.materialsAbstract }}</div>
<div class="nametitle">素材标签</div>
<div class="nametitle">素材标签</div>
<div class="nameitem">适用症状{{ viewform.indications }}</div>
<div class="nameitem">药物名称{{ viewform.drugName }}</div>
<div class="nameitem">
@ -422,6 +432,8 @@ export default {
},
//
form: {},
id: null,
show:false,
//
rules: {
materialsName: [
@ -455,12 +467,53 @@ export default {
radioChange(e) {
this.$refs.form.clearValidate();
if (e == 'VIDEO') {
this.form.materialsFilePath = null
this.form.videoCoverFilePath = null
if (this.title == '添加素材信息') {
this.form.materialsFilePath = null
this.form.videoCoverFilePath = null
} else if (this.title == '修改素材信息') {
getMaterials(this.id).then(response => {
if(response.data.videoCoverFilePath){
this.form= response.data;
}
});
if (this.form.videoCoverFilePath) {
getMaterials(this.id).then(response => {
this.form = response.data;
});
}
else if (!this.form.videoCoverFilePath) {
this.reset()
// this.form.videoCoverFilePath=null
// this.form.materialsFilePath= null;
this.form.materialsType = 'VIDEO'
}
}
} else if (e == 'IMAGE_TEXT') {
this.form.materialsFilePath = null
this.form.videoCoverFilePath = null
if (this.title == '添加素材信息') {
this.form.materialsFilePath = null
this.form.videoCoverFilePath = null
} else if (this.title == '修改素材信息') {
getMaterials(this.id).then(response => {
if(!response.data.videoCoverFilePath){
this.form= response.data;
}
});
if (!this.form.videoCoverFilePath) {
getMaterials(this.id).then(response => {
this.form = response.data;
});
}
else if (this.form.videoCoverFilePath) {
this.reset()
this.form.materialsType = 'IMAGE_TEXT'
}
}
}
@ -471,7 +524,7 @@ export default {
},
//
imgUrl2(imgUrl) {
this.form.materialsFilePath = process.env.VUE_APP_BASE_API + imgUrl;
// this.form.materialsFilePath = process.env.VUE_APP_BASE_API + imgUrl;
this.form.materialsFilePath = imgUrl;
},
@ -600,8 +653,9 @@ export default {
this.reset();
this.open = true;
const id = item.id || this.ids
getMaterials(id).then(response => {
// const id = item.id || this.ids
this.id = item.id
getMaterials(this.id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改素材信息";
@ -663,7 +717,7 @@ export default {
// top: -84px;
left: 8px;
}
::v-deep .el-textarea__inner{
::v-deep .el-textarea__inner {
height: 100px;
}
video {
@ -688,6 +742,7 @@ video {
}
.right {
width: 20%;
overflow: auto;
// background: red;
margin-left: 30px;
.nametitle {
@ -696,7 +751,7 @@ video {
}
.nameitem {
color: #959595;
margin: 5px;
margin: 13px;
}
}
}

View File

@ -467,7 +467,7 @@
></video>
</el-form-item>
<el-form-item label="文章摘要" prop="articleSummary">
<editor v-model="form.articleSummary" :min-height="192" />
<editor v-model="form.articleSummary" :min-height="192" style="width:800px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -734,7 +734,7 @@
</div>
<div class="dataliat">素材来源</div>
<!-- <div class="dataliat">标签暂无</div> -->
<div class="dataliat bq">
<div class="dataliat bq" v-if="item.indications || item.drugName || item.applicableDiseases || item.surgicalName || item.inspectionItems || item.checkItems ">
标签
<span v-if="item.indications">{{ item.indications }}</span>
@ -748,6 +748,10 @@
>
<span v-if="item.checkItems">{{ item.checkItems }}</span>
</div>
<div class="dataliat bq" v-else>
标签暂无
</div>
</div>
<div class="label" @click.stop="labelchange(item)">加到文章</div>
@ -787,7 +791,7 @@
<div class="nameitem">{{ viewform.createTime }}</div>
<div class="nametitle">素材摘要</div>
<div class="nameitem">{{ viewform.materialsAbstract }}</div>
<div class="nametitle">素材标签</div>
<div class="nametitle">素材标签</div>
<div class="nameitem">适用症状{{ viewform.indications }}</div>
<div class="nameitem">药物名称{{ viewform.drugName }}</div>
<div class="nameitem">
@ -1482,6 +1486,11 @@ export default {
};
</script>
<style lang="scss" scoped>
// ::v-deep .el-form-item--medium .el-form-item__content{
// width: 800px;
// }
.propagandaselect {
width: 100px;
height: 100px;
@ -1596,6 +1605,7 @@ audio {
.right {
width: 20%;
// background: red;
overflow: auto;
margin-left: 30px;
.nametitle {
font-size: 14px;
@ -1603,7 +1613,7 @@ audio {
}
.nameitem {
color: #959595;
margin: 5px;
margin: 13px;
}
}
}