This commit is contained in:
2024-04-09 11:36:20 +08:00
parent f8d7d923f4
commit 4565dc1db3
11 changed files with 100 additions and 234 deletions

View File

@ -284,7 +284,7 @@ export default {
this.uploadsave();
},
uploadsave() {
if (this.signPackage.healthManageId) {
if (this.signPackage.healthManageId && this.attendingPhysicianlist?.length > 0) {
this.signPackage.healthManageName = this.attendingPhysicianlist.find(e => e.userId == this.signPackage.healthManageId).nickName
}
this.form.signPackage = this.signPackage

View File

@ -1,23 +1,9 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="创建时间">
<el-date-picker
v-model="daterangeCreateTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
<el-date-picker v-model="daterangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd" type="daterange"
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
<!-- <el-form-item label="素材状态" prop="materialsStatus">
<el-select
@ -34,12 +20,8 @@
</el-select>
</el-form-item> -->
<el-form-item label="素材名称" prop="materialsName">
<el-input
v-model="queryParams.materialsName"
placeholder="请输入素材名称"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.materialsName" placeholder="请输入素材名称" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<!-- <el-form-item label="素材来源" prop="materialsName">
<el-select
@ -58,101 +40,53 @@
</el-form-item> -->
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['manage:materials:add']"
>新增素材</el-button
>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['manage:materials:add']">新增素材</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
@click="handleDelete"
:disabled="multiple"
v-hasPermi="['manage:materials:remove']"
>批量删除</el-button
>
<el-button type="danger" plain icon="el-icon-delete" size="mini" @click="handleDelete" :disabled="multiple"
v-hasPermi="['manage:materials:remove']">批量删除</el-button>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-tabs
v-model="queryParams.materialsType"
type="card"
@tab-click="handleClick"
>
<el-tabs v-model="queryParams.materialsType" type="card" @tab-click="handleClick">
<el-tab-pane label="图片" name="IMAGE_TEXT"></el-tab-pane>
<el-tab-pane label="视频" name="VIDEO"></el-tab-pane>
</el-tabs>
<div class="bodytopxj">
<div class="bodylist" v-for="item in materialsList" :key="item.id">
<el-checkbox
v-model="item.checked"
@change="changecheck($event, item)"
></el-checkbox>
<el-checkbox v-model="item.checked" @change="changecheck($event, item)"></el-checkbox>
<div @click.stop="viewshow(item)">
<img
:src="baseUrl + item.materialsFilePath"
alt=""
v-if="item.materialsFilePath && !item.videoCoverFilePath"
/>
<img
:src="baseUrl + item.videoCoverFilePath"
alt=""
v-if="item.videoCoverFilePath && item.materialsFilePath"
/>
<img :src="baseUrl + item.materialsFilePath" alt=""
v-if="item.materialsFilePath && !item.videoCoverFilePath" />
<img :src="baseUrl + item.videoCoverFilePath" alt=""
v-if="item.videoCoverFilePath && item.materialsFilePath" />
<div class="texttitle">{{ item.materialsName }}</div>
<div class="dataliat">
创建人/创建时间<span>{{ item.createBy }}</span
>/<span>{{ item.createTime }}</span>
创建人/创建时间<span>{{ item.createBy }}</span>/<span>{{ item.createTime }}</span>
</div>
<!-- <div class="dataliat">素材来源</div>
<div class="dataliat">标签暂无</div> -->
<div
class="dataliat bq"
v-if="
item.indications ||
item.drugName ||
item.applicableDiseases ||
item.surgicalName ||
item.inspectionItems ||
item.checkItems
"
>
<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"
>{{ 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 class="dataliat bq" v-else>标签暂无</div>
@ -162,42 +96,15 @@
</div>
</div>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 添加或修改素材信息对话框 -->
<el-dialog
:title="title"
:visible.sync="open"
width="800px"
append-to-body
v-if="open"
>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="110px"
:inline="true"
>
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body v-if="open">
<el-form ref="form" :model="form" :rules="rules" label-width="110px" :inline="true">
<el-form-item label="素材类型" prop="materialsType">
<el-radio
v-model="form.materialsType"
label="IMAGE_TEXT"
@change="radioChange('IMAGE_TEXT')"
>图文</el-radio
>
<el-radio
v-model="form.materialsType"
label="VIDEO"
@change="radioChange('VIDEO')"
>视频</el-radio
>
<el-radio v-model="form.materialsType" label="IMAGE_TEXT" @change="radioChange('IMAGE_TEXT')">图文</el-radio>
<el-radio v-model="form.materialsType" label="VIDEO" @change="radioChange('VIDEO')">视频</el-radio>
</el-form-item>
<br />
<el-form-item label="素材名称" prop="materialsName">
@ -205,48 +112,19 @@
</el-form-item>
<br />
<el-form-item
label="素材上传"
prop="materialsFilePath"
v-if="form.materialsType == 'IMAGE_TEXT'"
>
<stationAcatar
@imgUrl="imgUrl"
:img="form.materialsFilePath"
:type="'materialsCoverUrl'"
/>
<el-form-item label="素材上传" prop="materialsFilePath" v-if="form.materialsType == 'IMAGE_TEXT'">
<stationAcatar @imgUrl="imgUrl" :img="form.materialsFilePath" :type="'materialsCoverUrl'" />
</el-form-item>
<el-form-item
label="视频封面"
prop="videoCoverFilePath"
v-if="form.materialsType == 'VIDEO'"
>
<stationAcatar
@imgUrl="imgUrl3"
:img="form.videoCoverFilePath"
:type="'materialsCoverUrl'"
/>
<el-form-item label="视频封面" prop="videoCoverFilePath" v-if="form.materialsType == 'VIDEO'">
<stationAcatar @imgUrl="imgUrl3" :img="form.videoCoverFilePath" :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 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"
v-model="form.materialsAbstract"
type="textarea"
placeholder="请输入内容"
/>
<el-input style="width: 530px" v-model="form.materialsAbstract" type="textarea" placeholder="请输入内容" />
</el-form-item>
<div style="margin: 20px; font-weight: 700; font-size: 18px">
标签管理
@ -256,10 +134,7 @@
<el-input v-model="form.indications" placeholder="请输入适用症状" />
</el-form-item>
<el-form-item label="适用疾病" prop="applicableDiseases">
<el-input
v-model="form.applicableDiseases"
placeholder="请输入适用疾病"
/>
<el-input v-model="form.applicableDiseases" placeholder="请输入适用疾病" />
</el-form-item>
<el-form-item label="药物名称" prop="drugName">
<el-input v-model="form.drugName" placeholder="请输入药物名称" />
@ -271,24 +146,11 @@
<el-input v-model="form.checkItems" placeholder="请输入检查项目" />
</el-form-item>
<el-form-item label="检验项目" prop="inspectionItems">
<el-input
v-model="form.inspectionItems"
placeholder="请输入检验项目"
/>
<el-input v-model="form.inspectionItems" placeholder="请输入检验项目" />
</el-form-item>
<el-form-item label="人群名称" prop="crowName">
<el-select
v-model="form.crowName"
placeholder="请选择"
style="width: 206px"
@change="crowNamechange"
>
<el-option
v-for="item in optionscrowName"
:key="item.id"
:label="item.crowdName"
:value="item.id"
>
<el-select v-model="form.crowName" placeholder="请选择" style="width: 206px" @change="crowNamechange">
<el-option v-for="item in optionscrowName" :key="item.id" :label="item.crowdName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
@ -302,17 +164,9 @@
<el-dialog title="预览" :visible.sync="openview" width="60%">
<div class="viewbody">
<div class="left">
<video
v-if="queryParams.materialsType == 'VIDEO'"
ref="myVideo"
:src="baseUrl + viewform.materialsFilePath"
controls
></video>
<img
:src="baseUrl + viewform.materialsFilePath"
alt=""
v-if="queryParams.materialsType == 'IMAGE_TEXT'"
/>
<video v-if="queryParams.materialsType == 'VIDEO'" ref="myVideo" :src="baseUrl + viewform.materialsFilePath"
controls></video>
<img :src="baseUrl + viewform.materialsFilePath" alt="" v-if="queryParams.materialsType == 'IMAGE_TEXT'" />
</div>
<div class="right">
<div class="nametitle">素材名称</div>
@ -433,7 +287,7 @@ export default {
//
form: {},
id: null,
show:false,
show: false,
//
rules: {
materialsName: [
@ -473,8 +327,8 @@ export default {
this.form.videoCoverFilePath = null
} else if (this.title == '修改素材信息') {
getMaterials(this.id).then(response => {
if(response.data.videoCoverFilePath){
this.form= response.data;
if (response.data.videoCoverFilePath) {
this.form = response.data;
}
});
if (this.form.videoCoverFilePath) {
@ -497,8 +351,8 @@ export default {
this.form.videoCoverFilePath = null
} else if (this.title == '修改素材信息') {
getMaterials(this.id).then(response => {
if(!response.data.videoCoverFilePath){
this.form= response.data;
if (!response.data.videoCoverFilePath) {
this.form = response.data;
}
});
if (!this.form.videoCoverFilePath) {
@ -612,10 +466,10 @@ export default {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
if (this.daterangeCreateTime) {
if (this.daterangeCreateTime?.length > 0) {
this.queryParams.createTimeStart = this.daterangeCreateTime[0]
this.queryParams.createTimeEnd = this.daterangeCreateTime[1]
}else{
} else {
this.queryParams.createTimeStart = null
this.queryParams.createTimeEnd = null
@ -723,18 +577,22 @@ export default {
// top: -84px;
left: 8px;
}
::v-deep .el-textarea__inner {
height: 100px;
}
video {
height: 500px;
width: 100%;
}
.viewbody {
width: 100%;
height: 500px;
// background: #409eff;
display: flex;
.left {
overflow: auto;
@ -742,25 +600,30 @@ video {
height: 500px;
// background: #989992;
}
img {
// height: 100%;
// width: 100%;
}
.right {
width: 20%;
overflow: auto;
// background: red;
margin-left: 30px;
.nametitle {
font-size: 14px;
font-weight: 600;
}
.nameitem {
color: #959595;
margin: 13px;
}
}
}
.bodytopxj {
width: 100%;
display: flex;
@ -768,6 +631,7 @@ video {
align-items: center;
flex-wrap: wrap;
justify-content: flex-start;
// align-content: space-between;
.bodylist {
width: 19%;
@ -777,6 +641,7 @@ video {
position: relative;
// margin-bottom: 10px;
margin: 6px;
.texttitle {
white-space: nowrap;
overflow: hidden;
@ -784,6 +649,7 @@ video {
font-weight: 700;
margin: 5px 0px 5px 10px;
}
//
.dataliat {
white-space: nowrap;
@ -793,13 +659,16 @@ video {
font-size: 12px;
color: #989992;
}
.bq {
width: 155px;
}
img {
width: 100%;
height: 100px;
}
.label {
position: absolute;
right: 0px;
@ -811,4 +680,3 @@ video {
}
}
</style>

View File

@ -246,10 +246,10 @@ export default {
}
},
uploadsave() {
if (this.signPackage.servicePackageId) {
if (this.signPackage.servicePackageId && this.packagelist?.length > 0) {
this.signPackage.packageName = this.packagelist.find(e => e.id == this.signPackage.servicePackageId).packageName
}
if (this.form.record.healthManageId) {
if (this.form.record.healthManageId && this.attendingPhysicianlist?.length > 0) {
this.form.record.healthManageName = this.attendingPhysicianlist.find(e => e.userId == this.form.record.healthManageId).nickName
}
this.form.signPackage = this.signPackage

View File

@ -264,11 +264,11 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
if (this.visitDate.length > 0) {
if (this.visitDate?.length > 0) {
this.queryParams.visitDateStart = this.visitDate[0]
this.queryParams.visitDateEnd = this.visitDate[1]
}
if (this.admissionTime.length > 0) {
if (this.admissionTime?.length > 0) {
this.queryParams.admissionTimeStart = this.admissionTime[0]
this.queryParams.admissionTimeEnd = this.admissionTime[1]
}

View File

@ -574,7 +574,7 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
if (this.appointmentDate.length > 0) {
if (this.appointmentDate?.length > 0) {
this.queryParams.appointmentDateStart = this.appointmentDate[0]
this.queryParams.appointmentDateEnd = this.appointmentDate[1]
}
@ -622,19 +622,19 @@ export default {
},
/** 提交按钮 */
submitForm() {
if (this.form.hospitalAgencyId && this.hospitalAgencylist.length > 0) {
if (this.form.hospitalAgencyId && this.hospitalAgencylist?.length > 0) {
this.form.hospitalAgencyName = this.hospitalAgencylist.find(e => e.id == this.form.hospitalAgencyId).agencyName
}
if (this.form.campusAgencyId && this.form_campusAgencylist.length > 0) {
if (this.form.campusAgencyId && this.form_campusAgencylist?.length > 0) {
this.form.campusAgencyName = this.form_campusAgencylist.find(e => e.id == this.form.campusAgencyId).agencyName
}
if (this.form.departmentId && this.form_departmentlist.length > 0) {
if (this.form.departmentId && this.form_departmentlist?.length > 0) {
this.form.departmentName = this.form_departmentlist.find(e => e.id == this.form.departmentId).departmentName
}
if (this.form.hospitalAgencyId && this.form_wardlist.length > 0) {
if (this.form.hospitalAgencyId && this.form_wardlist?.length > 0) {
this.form.wardName = this.form_wardlist.find(e => e.id == this.form.wardId).departmentName
}
if (this.form.certificateIssuingDoctorId && this.form_attendingPhysicianlist.length > 0) {
if (this.form.certificateIssuingDoctorId && this.form_attendingPhysicianlist?.length > 0) {
this.form.certificateIssuingDoctorName = this.form_attendingPhysicianlist.find(e => e.userId == this.form.certificateIssuingDoctorId).nickName
}
this.$refs["form"].validate(valid => {

View File

@ -607,7 +607,7 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
if (this.admissionTime.length > 0) {
if (this.admissionTime?.length > 0) {
this.queryParams.admissionTimeStart = this.admissionTime[0]
this.queryParams.admissionTimeEnd = this.admissionTime[1]
}
@ -656,19 +656,19 @@ export default {
},
/** 提交按钮 */
submitForm() {
if (this.form.hospitalAgencyId && this.hospitalAgencylist.length > 0) {
if (this.form.hospitalAgencyId && this.hospitalAgencylist?.length > 0) {
this.form.hospitalAgencyName = this.hospitalAgencylist.find(e => e.id == this.form.hospitalAgencyId).agencyName
}
if (this.form.campusAgencyId && this.form_campusAgencylist.length > 0) {
if (this.form.campusAgencyId && this.form_campusAgencylist?.length > 0) {
this.form.campusAgencyName = this.form_campusAgencylist.find(e => e.id == this.form.campusAgencyId).agencyName
}
if (this.form.departmentId && this.form_departmentlist.length > 0) {
if (this.form.departmentId && this.form_departmentlist?.length > 0) {
this.form.departmentName = this.form_departmentlist.find(e => e.id == this.form.departmentId).departmentName
}
if (this.form.hospitalAgencyId && this.form_wardlist.length > 0) {
if (this.form.hospitalAgencyId && this.form_wardlist?.length > 0) {
this.form.wardName = this.form_wardlist.find(e => e.id == this.form.wardId).departmentName
}
if (this.form.attendingPhysicianId && this.form_attendingPhysicianlist.length > 0) {
if (this.form.attendingPhysicianId && this.form_attendingPhysicianlist?.length > 0) {
this.form.attendingPhysicianName = this.form_attendingPhysicianlist.find(e => e.userId == this.form.attendingPhysicianId).nickName
}
this.$refs["form"].validate(valid => {

View File

@ -603,7 +603,7 @@ export default {
},
methods: {
addsignupload() {
if (this.addsignform.billingDoctorId && this.addsignattendingPhysicianlist.length > 0) {
if (this.addsignform.billingDoctorId && this.addsignattendingPhysicianlist?.length > 0) {
this.addsignform.billingDoctorName = this.addsignattendingPhysicianlist.find(e => e.userId == this.addsignform.billingDoctorId).nickName
}
intentionalSign(this.addsignform).then(res => {
@ -714,7 +714,7 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
if (this.dischargeTime.length > 0) {
if (this.dischargeTime?.length > 0) {
this.queryParams.dischargeTimeStart = this.dischargeTime[0]
this.queryParams.dischargeTimeEnd = this.dischargeTime[1]
}
@ -769,19 +769,19 @@ export default {
} else if (this.form.visitMethod == 'OUTPATIENT_SERVICE') {
this.form.patientType = 'OUTPATIENT'
}
if (this.form.hospitalAgencyId && this.hospitalAgencylist.length > 0) {
if (this.form.hospitalAgencyId && this.hospitalAgencylist?.length > 0) {
this.form.hospitalAgencyName = this.hospitalAgencylist.find(e => e.id == this.form.hospitalAgencyId).agencyName
}
if (this.form.campusAgencyId && this.form_campusAgencylist.length > 0) {
if (this.form.campusAgencyId && this.form_campusAgencylist?.length > 0) {
this.form.campusAgencyName = this.form_campusAgencylist.find(e => e.id == this.form.campusAgencyId).agencyName
}
if (this.form.departmentId && this.form_departmentlist.length > 0) {
if (this.form.departmentId && this.form_departmentlist?.length > 0) {
this.form.departmentName = this.form_departmentlist.find(e => e.id == this.form.departmentId).departmentName
}
if (this.form.hospitalAgencyId && this.form_wardlist.length > 0) {
if (this.form.hospitalAgencyId && this.form_wardlist?.length > 0) {
this.form.wardName = this.form_wardlist.find(e => e.id == this.form.wardId).departmentName
}
if (this.form.attendingPhysicianId && this.form_attendingPhysicianlist.length > 0) {
if (this.form.attendingPhysicianId && this.form_attendingPhysicianlist?.length > 0) {
this.form.attendingPhysicianName = this.form_attendingPhysicianlist.find(e => e.userId == this.form.attendingPhysicianId).nickName
}
this.$refs["form"].validate(valid => {

View File

@ -193,7 +193,7 @@ export default {
this.classificationform.diseaseTypeName = ''
},
changedepartment(e) {
this.classificationform.departmentName = this.departmentlist.find(el => el.id == e).departmentName
this.classificationform.departmentName = this.departmentlist?.find(el => el.id == e).departmentName
let query = {
departmentId: e
}
@ -202,7 +202,7 @@ export default {
})
},
changediseaseType(e) {
this.classificationform.diseaseTypeName = this.diseaselist.find(el => el.id == e).diseaseTypeName
this.classificationform.diseaseTypeName = this.diseaselist?.find(el => el.id == e).diseaseTypeName
},
//
switchstatus(e, item) {

View File

@ -495,9 +495,7 @@ export default {
},
//
changeTaskType(name, taskSubdivision) {
console.log(name)
console.log(this.selectTaskTypeList.find(e => e.taskTypeName == name))
let id = this.selectTaskTypeList.find(e => e.taskTypeName == name).id
let id = this.selectTaskTypeList?.find(e => e.taskTypeName == name).id
taskPartitionList(id).then(res => {
this.taskPartitionList = res.data
this.form.taskSubdivision = ''

View File

@ -567,7 +567,7 @@ export default {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
if (this.intentionalTime.length > 0) {
if (this.intentionalTime?.length > 0) {
this.queryParams.startDate = this.intentionalTime[0]
this.queryParams.endDate = this.intentionalTime[1]
}

View File

@ -205,10 +205,10 @@ export default {
},
//
submitForm() {
if (this.form.departmentId) {
if (this.form.departmentId && this.departmentlist?.length > 0) {
this.form.departmentName = this.departmentlist.find(e => e.id == this.form.departmentId).departmentName
}
if (this.form.attendingPhysicianId) {
if (this.form.attendingPhysicianId && this.attendingPhysicianlist?.length > 0) {
this.form.attendingPhysicianName = this.attendingPhysicianlist.find(e => e.userId == this.form.attendingPhysicianId).nickName
}
if (this.form.id) {