From fb2ebeecf2547adeefea6a6434c0bdf81b765c7b Mon Sep 17 00:00:00 2001 From: shidongli Date: Mon, 1 Apr 2024 15:00:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9F=A5=E8=AF=86=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/manage/materials/index.vue | 103 ++++++++++++++++++++------ src/views/manage/propaganda/index.vue | 18 ++++- 2 files changed, 93 insertions(+), 28 deletions(-) diff --git a/src/views/manage/materials/index.vue b/src/views/manage/materials/index.vue index c64f8a0..509aefa 100644 --- a/src/views/manage/materials/index.vue +++ b/src/views/manage/materials/index.vue @@ -132,9 +132,18 @@
素材来源:
-
+
标签: - {{ item.indications }}, {{ item.drugName }}, {{ item.checkItems }},
+
标签:暂无
标签管理
@@ -206,18 +216,6 @@ :type="'materialsCoverUrl'" /> - - - - + + + + {{ viewform.createTime }}
素材摘要
{{ viewform.materialsAbstract }}
-
素材标签:
+
素材标签
适用症状:{{ viewform.indications }}
药物名称:{{ viewform.drugName }}
@@ -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; } } } diff --git a/src/views/manage/propaganda/index.vue b/src/views/manage/propaganda/index.vue index 4c0e662..0a73a26 100644 --- a/src/views/manage/propaganda/index.vue +++ b/src/views/manage/propaganda/index.vue @@ -467,7 +467,7 @@ > - +
素材来源:
-
+
标签: {{ item.indications }}, @@ -748,6 +748,10 @@ > {{ item.checkItems }},
+
+ 标签:暂无 + +
加到文章
@@ -787,7 +791,7 @@
{{ viewform.createTime }}
素材摘要
{{ viewform.materialsAbstract }}
-
素材标签:
+
素材标签
适用症状:{{ viewform.indications }}
药物名称:{{ viewform.drugName }}
@@ -1482,6 +1486,11 @@ export default { };