素材信息 校验

This commit is contained in:
shidongli 2024-03-25 10:53:03 +08:00
parent 11cc5abfb7
commit 26d3d5ebe8
2 changed files with 68 additions and 65 deletions

View File

@ -647,7 +647,7 @@ export default {
}
};
</script>
<style lang="scss">
<style lang="scss" scoped>
.el-input-number .el-input__inner {
text-align: left;
}

View File

@ -124,22 +124,26 @@
</div>
<div class="dataliat">素材来源</div>
<!-- <div class="dataliat">标签暂无</div> -->
<div class="dataliat">标签
<div class="dataliat">
标签
<span v-if="item.indications">{{ item.indications }}</span>
<span v-if="item.drugName">{{ item.drugName }}</span>
<span v-if="item.applicableDiseases">{{ item.applicableDiseases }}</span>
<span v-if="item.applicableDiseases"
>{{ item.applicableDiseases }}</span
>
<span v-if="item.surgicalName">{{ item.surgicalName }}</span>
<span v-if="item.inspectionItems">{{ item.inspectionItems }}</span>
<span v-if="item.inspectionItems"
>{{ item.inspectionItems }}</span
>
<span v-if="item.checkItems">{{ item.checkItems }}</span>
</div>
</div>
</div>
<div class="label" @click.stop="labelchange(item)">标签管理</div>
</div>
</div>
<pagination
v-show="total > 0"
:total="total"
@ -156,7 +160,7 @@
append-to-body
v-if="open"
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form ref="form" :model="form" :rules="rules" label-width="80px" >
<el-form-item label="素材名称" prop="materialsName">
<el-input v-model="form.materialsName" placeholder="请输入素材名称" />
</el-form-item>
@ -190,12 +194,11 @@
prop="materialsFilePath"
v-if="form.materialsType == 'VIDEO'"
>
<trainingAvatar
@imgUrl="imgUrl2"
:tovideo="form.materialsFilePath"
:type="'materialsVideoUrl'"
/>
<trainingAvatar
@imgUrl="imgUrl2"
:tovideo="form.materialsFilePath"
:type="'materialsVideoUrl'"
/>
</el-form-item>
<el-form-item
@ -218,7 +221,6 @@
/>
</el-form-item>
<el-form-item label="适用症状" prop="indications">
<el-input v-model="form.indications" placeholder="请输入适用症状" />
</el-form-item>
@ -258,9 +260,7 @@
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -285,21 +285,23 @@
</div>
<div class="right">
<div class="nametitle">素材名称</div>
<div class="nameitem">{{viewform.materialsName}}</div>
<div class="nameitem">{{ viewform.materialsName }}</div>
<div class="nametitle">创建人员</div>
<div class="nameitem">{{viewform.createBy}}</div>
<div class="nameitem">{{ viewform.createBy }}</div>
<div class="nametitle">创建时间</div>
<div class="nameitem">{{viewform.createTime}}</div>
<div class="nameitem">{{ viewform.createTime }}</div>
<div class="nametitle">素材摘要</div>
<div class="nameitem">{{viewform.materialsAbstract}}</div>
<div class="nameitem">{{ viewform.materialsAbstract }}</div>
<div class="nametitle">素材标签</div>
<div class="nameitem">适用症状{{viewform.indications}}</div>
<div class="nameitem">药物名称{{viewform.drugName}}</div>
<div class="nameitem">适用疾病{{viewform.applicableDiseases}}</div>
<div class="nameitem">手术名称{{viewform.surgicalName}}</div>
<div class="nameitem">检验项目{{viewform.inspectionItems}}</div>
<div class="nameitem">检查项目{{viewform.checkItems}}</div>
<div class="nameitem">人群{{viewform.crowName}}</div>
<div class="nameitem">适用症状{{ viewform.indications }}</div>
<div class="nameitem">药物名称{{ viewform.drugName }}</div>
<div class="nameitem">
适用疾病{{ viewform.applicableDiseases }}
</div>
<div class="nameitem">手术名称{{ viewform.surgicalName }}</div>
<div class="nameitem">检验项目{{ viewform.inspectionItems }}</div>
<div class="nameitem">检查项目{{ viewform.checkItems }}</div>
<div class="nameitem">人群{{ viewform.crowName }}</div>
</div>
</div>
</el-dialog>
@ -307,13 +309,13 @@
</template>
<script>
import { listMaterials, getMaterials, delMaterials, addMaterials, updateMaterials,crowdInfo } from "@/api/manage/materials";
import { listMaterials, getMaterials, delMaterials, addMaterials, updateMaterials, crowdInfo } from "@/api/manage/materials";
import stationAcatar from "../../system/stationAvatar/index.vue";
import trainingAvatar from "../../system/trainingAvatar/index.vue";
export default {
name: "Materials",
components: { stationAcatar ,trainingAvatar},
components: { stationAcatar, trainingAvatar },
dicts: ['crowd_type', 'materials_type', 'video_cover_type'],
data() {
return {
@ -410,12 +412,12 @@ export default {
materialsFilePath: [
{ required: true, message: "素材上传不能为空", trigger: "blur" },
],
videoCoverFilePath:[
videoCoverFilePath: [
{ required: true, message: "视频封面不能为空", trigger: "blur" },
],
}
};
},
@ -430,12 +432,14 @@ export default {
},
//
radioChange(e) {
if(e=='VIDEO'){
this.form.materialsFilePath=null
this.form.videoCoverFilePath=null
}else if(e=='IMAGE_TEXT'){
this.form.materialsFilePath=null
this.form.videoCoverFilePath=null
this.$refs.form.clearValidate();
if (e == 'VIDEO') {
this.form.materialsFilePath = null
this.form.videoCoverFilePath = null
} else if (e == 'IMAGE_TEXT') {
this.form.materialsFilePath = null
this.form.videoCoverFilePath = null
}
@ -460,10 +464,10 @@ export default {
//
changecheck(e, item) {
this.ids = this.materialsList.map(item => item.checked ? item.id : undefined).filter(e => e)
if(this.ids.length>0){
this.multiple = false
}else{
this.multiple = true
if (this.ids.length > 0) {
this.multiple = false
} else {
this.multiple = true
}
},
@ -473,18 +477,18 @@ export default {
this.viewform = item
},
getcrowdInfo(){
crowdInfo().then(response=>{
this.optionscrowName=response.data
getcrowdInfo() {
crowdInfo().then(response => {
this.optionscrowName = response.data
})
},
//
crowNamechange(e){
this.form.crowName=this.optionscrowName.find(f=>f.id==e).crowdName
this.form.crowdId=e
crowNamechange(e) {
this.form.crowName = this.optionscrowName.find(f => f.id == e).crowdName
this.form.crowdId = e
},
/** 查询素材信息列表 */
getList() {
@ -543,7 +547,7 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.daterangeCreateTime = [];
this.queryParams={
this.queryParams = {
pageNum: 1,
pageSize: 10,
materialsType: 'IMAGE_TEXT',
@ -605,20 +609,20 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
this.getList();
if(this.ids.length==0){
if (this.ids.length == 0) {
this.$modal.msgError("请先选择一条数据");
}else{
} else {
const ids = this.ids;
this.$modal.confirm('是否确认删除该素材信息?').then(function () {
return delMaterials(ids);
}).then(() => {
this.$modal.msgSuccess("删除成功");
// this.ids=[];
this.getList();
this.$modal.confirm('是否确认删除该素材信息?').then(function () {
return delMaterials(ids);
}).then(() => {
this.$modal.msgSuccess("删除成功");
// this.ids=[];
this.getList();
this.multiple = true
this.multiple = true
}).catch(() => { });
}).catch(() => { });
}
@ -652,10 +656,9 @@ video {
height: 500px;
// background: #989992;
}
img{
img {
height: 100%;
width: 100%;
}
.right {
width: 20%;
@ -709,7 +712,7 @@ video {
right: 0px;
right: 18px;
color: #409eff;
bottom:8px;
bottom: 8px;
font-size: 13px;
}
}