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