@@ -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 {
};