postdischarge-ui/src/views/manage/propaganda/index.vue

1725 lines
47 KiB
Vue
Raw Normal View History

2024-03-01 17:02:23 +08:00
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="创建时间" prop="">
<el-date-picker
v-model="queryParams.createTimeStart"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
@change="changecreateTimeStart"
2024-03-07 10:21:15 +08:00
:picker-options="pickerStartTime"
2024-03-01 17:02:23 +08:00
>
2024-03-29 09:11:57 +08:00
</el-date-picker>
-
2024-03-01 17:02:23 +08:00
<el-date-picker
v-model="queryParams.createTimeEnd"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
@change="changecreateTimeEnd"
2024-03-07 10:21:15 +08:00
:picker-options="pickerEndTime"
2024-03-01 17:02:23 +08:00
>
</el-date-picker>
</el-form-item>
<el-form-item label="宣教类型" prop="propagandaType">
<el-select v-model="queryParams.propagandaType" placeholder="请选择">
<el-option
v-for="item in optionstype"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="宣教来源" prop="hospitalAgencyId">
2024-04-18 16:18:14 +08:00
<el-select
v-model="queryParams.hospitalAgencyId"
filterable
placeholder="请选择医院"
style="width: 200px"
clearable
>
<el-option
v-for="item in hospitalAgencylist"
:key="item.id"
:label="item.agencyName"
:value="item.id"
>
</el-option>
</el-select>
<!-- <el-input
2024-03-01 17:02:23 +08:00
v-model="queryParams.hospitalAgencyId"
placeholder="请输入宣教来源"
clearable
@keyup.enter.native="handleQuery"
2024-04-18 16:18:14 +08:00
/> -->
2024-03-01 17:02:23 +08:00
</el-form-item>
<el-form-item label="宣教状态" prop="propagandaStatus">
<el-select v-model="queryParams.propagandaStatus" placeholder="请选择">
<el-option
v-for="item in optionsstate"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<!-- <el-input
v-model="queryParams.diseaseTypeName"
placeholder="请输入所属病种名称"
clearable
@keyup.enter.native="handleQuery"
/> -->
</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-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:propaganda:add']"
>新增</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-row :gutter="20">
<el-col :span="5">
2024-03-07 15:17:40 +08:00
<div class="leftpro" ref="box">
2024-03-01 17:02:23 +08:00
<div class="name">科室名称</div>
<div>
<el-input
v-model="name"
placeholder="请输入科室名称"
clearable
@keyup.enter.native="handleQuery"
/>
</div>
<div class="listitem">
<div
:class="itemname == null ? 'allactive' : 'all'"
@click="itemdata()"
>
全部
</div>
<span class="count">{{ count }}</span>
</div>
<div
class="listitem"
v-for="(item, index) in DepartmentoList"
:key="index"
@click="itemdata(item)"
>
<div :class="itemname == item.id ? 'allactive' : 'all'">
{{ item.departmentName }}
</div>
<span class="count">{{ item.countNum }}</span>
</div>
</div>
</el-col>
<el-col :span="19">
<el-table
v-loading="loading"
:data="propagandaList"
@selection-change="handleSelectionChange"
>
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="序号" align="center" prop="id" type="index" />
<el-table-column
label="宣教名称"
align="center"
prop="propagandaTitle"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
label="宣教类型"
align="center"
prop="propagandaType"
>
<template slot-scope="scope">
{{
scope.row.propagandaType == "MEDICATION_KNOWLEDGE"
? "用药知识"
: ""
}}
{{
scope.row.propagandaType == "DISEASE_POPULARIZATION"
? "疾病科普"
: ""
}}
{{
scope.row.propagandaType == "SPORT_NUTRITION" ? "运动营养" : ""
}}
{{
scope.row.propagandaType == "OTHER_KNOWLEDGE" ? "其他知识" : ""
}}
{{
scope.row.propagandaType == "CUSTOMIZED_CONTENT"
? "定制内容"
: ""
}}
</template>
</el-table-column>
<el-table-column
label="宣教ID"
align="center"
prop="propagandaCode"
2024-03-29 10:51:30 +08:00
:show-overflow-tooltip="true"
2024-03-01 17:02:23 +08:00
/>
<el-table-column
label="宣教状态"
align="center"
prop="propagandaStatus"
>
<template slot-scope="scope">
{{
scope.row.propagandaStatus == "CREATE_PROCESS" ? "创作中" : ""
}}
{{
scope.row.propagandaStatus == "CREATE_COMPLETE"
? "创作完成"
: ""
}}
{{ scope.row.propagandaStatus == "IN_REVIEW" ? "审核中" : "" }}
{{ scope.row.propagandaStatus == "APPROVED" ? "审核通过" : "" }}
{{
scope.row.propagandaStatus == "REVIEW_FAILED"
? "审核不通过"
: ""
}}
<div></div>
</template>
</el-table-column>
<el-table-column
label="宣教来源"
align="center"
2024-04-18 16:18:14 +08:00
prop="hospitalAgencyName"
2024-03-01 17:02:23 +08:00
/>
<el-table-column label="创建时间" align="center" prop="createTime" />
<el-table-column label="更新时间" align="center" prop="updateTime" />
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="300%"
>
<template slot-scope="scope">
<el-button
type="text"
icon="el-icon-zoom-in"
size="mini"
@click="Preview(scope.row)"
>预览</el-button
>
<el-button
type="text"
icon="el-icon-tickets"
size="mini"
@click="copyUrl(scope.row)"
>复制</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-aim"
2024-03-29 09:11:57 +08:00
v-if="scope.row.propagandaStatus == 'CREATE_COMPLETE'"
2024-03-01 17:02:23 +08:00
@click="examine(scope.row)"
>审核</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['manage:propaganda:edit']"
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['manage:propaganda:remove']"
>删除</el-button
>
<!-- <el-button
size="mini"
type="text"
icon="el-icon-copy-document"
@click="copylink(scope.row)"
>复制链接</el-button
> -->
</template>
</el-table-column>
</el-table>
2024-03-29 09:11:57 +08:00
<pagination
2024-03-29 10:51:30 +08:00
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
2024-03-29 09:11:57 +08:00
</el-col>
</el-row>
2024-03-01 17:02:23 +08:00
<!-- 添加或修改患者宣教信息对话框 -->
<el-dialog
:title="title"
:visible.sync="open"
2024-03-29 09:11:57 +08:00
width="1000px"
2024-03-01 17:02:23 +08:00
append-to-body
>
2024-03-29 09:11:57 +08:00
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="100px"
:inline="true"
>
2024-03-01 17:02:23 +08:00
<el-form-item label="宣教标题" prop="propagandaTitle">
<el-input
v-model="form.propagandaTitle"
placeholder="请输入宣教标题"
/>
</el-form-item>
2024-03-29 09:11:57 +08:00
<el-form-item label="宣教ID" prop="propagandaCode">
2024-04-18 16:18:14 +08:00
<el-input
v-model="form.propagandaCode"
placeholder="请输入宣教ID"
onKeyUp="value=value.replace(/[\W]/g,'')"
/>
2024-03-29 09:11:57 +08:00
</el-form-item>
2024-03-01 17:02:23 +08:00
<el-form-item label="宣教类型" prop="propagandaType">
<el-select
v-model="form.propagandaType"
placeholder="请选择"
2024-03-29 09:11:57 +08:00
style="width: 206px"
2024-03-01 17:02:23 +08:00
>
<el-option
v-for="item in optionstype"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="医院名称" prop="hospitalAgencyName">
2024-03-29 09:11:57 +08:00
<el-select
v-model="form.hospitalAgencyName"
filterable
placeholder="请选择医院"
style="width: 200px"
clearable
2024-04-19 13:47:54 +08:00
@change="changehospitalAgency"
2024-03-29 09:11:57 +08:00
>
<el-option
v-for="item in hospitalAgencylist"
:key="item.id"
:label="item.agencyName"
:value="item.id"
>
</el-option>
</el-select>
<!-- <el-input
2024-03-01 17:02:23 +08:00
v-model="form.hospitalAgencyName"
placeholder="请输入医院名称"
2024-03-29 09:11:57 +08:00
/> -->
2024-03-01 17:02:23 +08:00
</el-form-item>
2024-03-29 09:11:57 +08:00
2024-03-01 17:02:23 +08:00
<el-form-item label="科室名称" prop="departmentId">
2024-03-29 09:11:57 +08:00
<el-select
v-model="form.departmentName"
filterable
placeholder="请选择医院"
style="width: 200px"
clearable
@change="changeDepartment"
@focus="onBlur"
>
<el-option
v-for="item in Departmentdata"
:key="item.id"
:label="item.departmentName"
2024-04-23 09:04:53 +08:00
:value="item.id"
2024-03-29 09:11:57 +08:00
>
</el-option>
</el-select>
2024-03-29 10:51:30 +08:00
2024-03-29 09:11:57 +08:00
<!-- <el-button
2024-03-01 17:02:23 +08:00
type=""
v-if="departmentName == '请选择科室'"
@click="clickinnerVisible()"
style="
2024-03-29 09:11:57 +08:00
width: 206px;
2024-03-01 17:02:23 +08:00
text-align: left;
height: 36px;
color: #c0c4cc;
overflow: hidden;
"
>{{ departmentName }}</el-button
>
<el-button
@click="clickinnerVisible()"
type=""
v-else
style="
2024-03-29 09:11:57 +08:00
width: 206px;
2024-03-01 17:02:23 +08:00
text-align: left;
height: 36px;
padding-left: -10px;
overflow: hidden;
"
>{{ departmentName }}</el-button
2024-03-29 09:11:57 +08:00
> -->
2024-03-01 17:02:23 +08:00
</el-form-item>
<el-form-item label="病种名称" prop="diseaseTypeName">
<el-button
type=""
v-if="diseaseTypeName == '请选择病种'"
@click="clickdisease()"
style="
2024-03-29 09:11:57 +08:00
width: 206px;
2024-03-01 17:02:23 +08:00
text-align: left;
height: 36px;
color: #c0c4cc;
overflow: hidden;
"
>{{ diseaseTypeName }}</el-button
>
<el-button
@click="clickdisease()"
type=""
v-else
style="
2024-03-29 09:11:57 +08:00
width: 206px;
2024-03-01 17:02:23 +08:00
text-align: left;
height: 36px;
padding-left: -10px;
overflow: hidden;
"
>{{ diseaseTypeName }}</el-button
>
</el-form-item>
2024-03-29 09:11:57 +08:00
2024-03-01 17:02:23 +08:00
<el-form-item label="语音播报" prop="voicebroadcast">
<el-input
v-model="form.voicebroadcast"
type="textarea"
2024-03-29 09:11:57 +08:00
style="width: 206px"
2024-03-01 17:02:23 +08:00
placeholder="请输入语音播报"
/>
</el-form-item>
2024-04-18 16:18:14 +08:00
<el-form-item label="文章摘要" prop="articleSummary">
2024-03-01 17:02:23 +08:00
<el-input
2024-04-18 16:18:14 +08:00
v-model="form.articleSummary"
2024-03-01 17:02:23 +08:00
type="textarea"
2024-03-29 09:11:57 +08:00
style="width: 206px"
2024-04-18 16:18:14 +08:00
placeholder="请输入文章摘要"
maxlength="300"
2024-03-01 17:02:23 +08:00
/>
</el-form-item>
2024-03-29 09:11:57 +08:00
<el-form-item label="添加封面" prop="propagandaCoverPath">
<stationAcatar
2024-04-18 16:18:14 +08:00
v-if="open"
2024-03-29 09:11:57 +08:00
@imgUrl="imgUrl"
:img="form.propagandaCoverPath"
:type="'propagandaCoverUrl'"
/>
</el-form-item>
<el-form-item label="素材选择" prop="imgPath">
<div class="propagandaselect" @click="material" v-if="!form.imgPath">
<div class="add">+</div>
</div>
<img
@click="material"
class="propagandaselect"
:src="baseUrl + form.imgPath"
alt=""
v-else-if="
form.imgPath && querymaterial.materialsType == 'IMAGE_TEXT'
"
/>
<video
@click="material"
style="height: 200px; width: 300px"
v-else-if="form.imgPath && querymaterial.materialsType == 'VIDEO'"
ref="myVideo"
:src="baseUrl + form.imgPath"
controls
></video>
</el-form-item>
2024-04-18 16:18:14 +08:00
<el-form-item label="正文内容" prop="propagandaContent">
<editor
v-model="form.propagandaContent"
:min-height="192"
style="width: 800px"
@input="checkContentLength"
/>
2024-03-01 17:02:23 +08:00
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 科室弹框 -->
<el-dialog
title=""
:visible.sync="innerVisibleshow"
width="1000px"
append-to-body
:before-close="innerVisiblecancel"
>
<el-form
ref="queryForm"
:model="informationqueryParams"
:rules="rules"
label-width="80px"
:inline="true"
>
<el-form-item label="科室名称" prop="departmentName" label-width="120">
<el-input
v-model="informationqueryParams.departmentName"
placeholder="请输入科室名称"
clearable
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="informationInfoinfo"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="addresetQuerylist"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table
:data="infolist"
@cell-dblclick="nurseclick"
v-loading="loading"
>
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
v-if="form.departmentId == scope.row.departmentCode"
circle
@click="nurseclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="nurseclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="departmentName"
label="科室名称"
align="center"
:show-overflow-tooltip="true"
>
</el-table-column>
</el-table>
<pagination
v-show="totaldepartment > 0"
:total="totaldepartment"
:page.sync="informationqueryParams.pageNum"
:limit.sync="informationqueryParams.pageSize"
@pagination="informationInfoinfo"
/>
</el-dialog>
<!-- 病种弹框 -->
<el-dialog
title=""
:visible.sync="diseaseshowst"
width="1000px"
append-to-body
:before-close="canceldiseases"
>
<el-form
ref="queryForm"
:model="querydisease"
:rules="rules"
label-width="80px"
:inline="true"
>
2024-03-06 11:56:58 +08:00
<el-form-item label="病种名称" prop="diseaseTypeName" label-width="120">
2024-03-01 17:02:23 +08:00
<el-input
2024-03-06 11:56:58 +08:00
v-model="querydisease.diseaseTypeName"
2024-03-01 17:02:23 +08:00
placeholder="请输入病种名称"
clearable
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="infodisease"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetdisease"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table
:data="listdisease"
@cell-dblclick="nurseclickdisease"
v-loading="loading"
>
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
v-if="form.diseaseTypeId == scope.row.diseaseTypeCode"
circle
@click="nurseclickdisease(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="nurseclickdisease(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="diseaseTypeName"
label="病种名称"
align="center"
:show-overflow-tooltip="true"
>
</el-table-column>
</el-table>
<pagination
v-show="diseasetotal > 0"
:total="diseasetotal"
:page.sync="querydisease.pageNum"
:limit.sync="querydisease.pageSize"
@pagination="infodisease"
/>
</el-dialog>
<!-- 审核弹框 -->
<el-dialog
title="提示"
:visible.sync="dialogexamine"
width="30%"
:before-close="handleClose"
center
>
<span style="font-size: 18px; margin-left: 55px">是否同意审核</span>
<span slot="footer" class="dialog-footer">
<el-button @click="cancelamine">同意</el-button>
<el-button type="primary" @click="submitamine">不同意</el-button>
</span>
</el-dialog>
<!-- 预览弹框 -->
<el-dialog
title="预览"
:visible.sync="dialogview"
width="30%"
:before-close="handleview"
>
<div class="titletop">文章模板:{{ formview.propagandaTitle }}</div>
<div class="bodytop">
2024-03-07 10:49:46 +08:00
<div class="titledata">{{ formview.propagandaTitle }}</div>
2024-03-01 17:02:23 +08:00
<!-- <div class="audiotop">
<audio controls="controls" ref="audio"></audio>
</div> -->
<div>
2024-03-29 09:11:57 +08:00
<img :src="baseUrl + formview.propagandaCoverPath" alt="" />
2024-03-01 17:02:23 +08:00
<div class="know">知识卡片</div>
<div class="knowlist">
2024-04-23 09:04:53 +08:00
<Editorxj
v-model="formview.propagandaContent"
:min-height="192"
style="width: 800px"
/>
<!-- {{ formview.propagandaContent }} -->
2024-03-01 17:02:23 +08:00
<!-- 二甲双胍的用药安全性良好已经过多年临床用药实践论证但不用于10岁以下患者肝功能不全患者(尤其转氨酶高于3倍正常值的患者)肾功能异 -->
</div>
</div>
</div>
</el-dialog>
2024-03-29 09:11:57 +08:00
<!-- 素材选择弹框 -->
<el-dialog
title="请选择素材"
:visible.sync="dialogmaterial"
width="900px"
:before-close="materialClose"
>
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="素材名称" prop="materialsName">
<el-input
v-model="querymaterial.materialsName"
placeholder="请输入素材名称"
clearable
@keyup.enter.native="handleQuerysc"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuerysc"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuerysc"
>重置</el-button
>
</el-form-item>
</el-form>
<el-tabs
v-model="querymaterial.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> -->
<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"
/>
<div class="texttitle">{{ item.materialsName }}</div>
<div class="dataliat">
创建人/创建时间<span>{{ item.createBy }}</span
>/<span>{{ item.createTime }}</span>
</div>
2024-04-01 16:06:56 +08:00
<!-- <div class="dataliat">素材来源</div> -->
2024-03-29 09:11:57 +08:00
<!-- <div class="dataliat">标签暂无</div> -->
2024-04-18 16:18:14 +08:00
<div
class="dataliat bq"
v-if="
item.indications ||
item.drugName ||
item.applicableDiseases ||
item.surgicalName ||
item.inspectionItems ||
item.checkItems
"
>
2024-03-29 09:11:57 +08:00
标签
<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.surgicalName">{{ item.surgicalName }}</span>
<span v-if="item.inspectionItems"
>{{ item.inspectionItems }}</span
>
<span v-if="item.checkItems">{{ item.checkItems }}</span>
</div>
2024-04-18 16:18:14 +08:00
<div class="dataliat bq" v-else>标签暂无</div>
2024-03-29 09:11:57 +08:00
</div>
<div class="label" @click.stop="labelchange(item)">加到文章</div>
</div>
</div>
<pagination
v-show="totalmaterial > 0"
:total="totalmaterial"
:page.sync="querymaterial.pageNum"
:limit.sync="querymaterial.pageSize"
@pagination="getmaterial"
/>
</el-dialog>
<!-- 预览弹框 -->
<el-dialog title="预览" :visible.sync="openview" width="60%">
<div class="viewbody">
<div class="left">
<video
v-if="querymaterial.materialsType == 'VIDEO'"
ref="myVideo"
:src="baseUrl + viewform.materialsFilePath"
controls
></video>
<img
:src="baseUrl + viewform.materialsFilePath"
alt=""
v-if="querymaterial.materialsType == 'IMAGE_TEXT'"
/>
</div>
<div class="right">
<div class="nametitle">素材名称</div>
<div class="nameitem">{{ viewform.materialsName }}</div>
<div class="nametitle">创建人员</div>
<div class="nameitem">{{ viewform.createBy }}</div>
<div class="nametitle">创建时间</div>
<div class="nameitem">{{ viewform.createTime }}</div>
<div class="nametitle">素材摘要</div>
<div class="nameitem">{{ viewform.materialsAbstract }}</div>
2024-04-01 15:00:45 +08:00
<div class="nametitle">素材标签</div>
2024-03-29 09:11:57 +08:00
<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>
2024-03-01 17:02:23 +08:00
</div>
</template>
<script>
2024-03-04 15:07:08 +08:00
import { listPropaganda, getPropaganda, delPropaganda, addPropaganda, updatePropaganda, selectNumByDept, copy, updateStatus } from "@/api/manage/propaganda";
2024-03-29 09:11:57 +08:00
import { listMaterials } from "@/api/manage/materials";
import { selectAgencyList, getDepartmentList } from "@/api/manage/selectAgencyList";
2024-03-01 17:02:23 +08:00
import stationAcatar from "../../system/stationAvatar/index.vue";
2024-04-23 09:04:53 +08:00
import Editorxj from "../../system/Editorxj/index.vue";
2024-03-01 17:02:23 +08:00
import { department, listDisease } from "@/api/manage/script";
export default {
name: "Propaganda",
2024-04-23 09:04:53 +08:00
components: { stationAcatar ,Editorxj},
2024-03-01 17:02:23 +08:00
data() {
2024-04-18 16:18:14 +08:00
//验证身份证
var isimgPath = (rule, value, callback) => {
2024-04-07 15:00:38 +08:00
console.log(value)
if (!this.form.imgPath) {
callback(new Error("素材选择不能为空"));
} else {
2024-04-18 16:18:14 +08:00
callback();
2024-04-07 15:00:38 +08:00
}
};
2024-03-01 17:02:23 +08:00
return {
2024-04-18 16:18:14 +08:00
maxLength: 20000,
2024-03-01 17:02:23 +08:00
itemname: null,
departmentName: null,
diseaseTypeName: null,
name: '',
departmentId: null,
count: '',//全部
DepartmentoList: [],//左侧数组
// 左侧传值
querydepartmen: {
departmentName: "",
// pageNum: 1,
// pageSize: 10,
},
innerVisibleshow: false, //科室弹框
// 科室
informationqueryParams: {
pageNum: 1,
pageSize: 10,
departmentName: null,
},
infolist: [],
totaldepartment: 0,
diseaseshowst: false,//病种弹框
querydisease: {
pageNum: 1,
pageSize: 10,
2024-03-29 09:11:57 +08:00
diseaseTypeName: null,
departmentId: null,
2024-03-01 17:02:23 +08:00
},
listdisease: [],
diseasetotal: 0,
dialogexamine: false,//审核
dialogview: false,//预览
formview: {
articleSummary: null,
propagandaTitle: null,
},//预览数据
copyid: null,//复制id
examineid: null,//审核id
optionstype: [{
value: 'MEDICATION_KNOWLEDGE',
label: '用药知识'
}, {
value: 'DISEASE_POPULARIZATION',
label: '疾病科普'
}, {
value: 'SPORT_NUTRITION',
label: '运动营养'
}, {
value: 'OTHER_KNOWLEDGE',
label: '其他知识'
}, {
value: 'CUSTOMIZED_CONTENT',
label: '定制内容'
}],
value: '',
optionsstate: [{
value: 'CREATE_PROCESS',
label: '创作中'
}, {
value: 'CREATE_COMPLETE',
label: '创作完成'
}, {
value: 'IN_REVIEW',
label: '审核中'
}, {
value: 'APPROVED',
label: '审核通过'
}, {
value: 'REVIEW_FAILED',
label: '审核不通过'
}],
2024-03-29 09:11:57 +08:00
// 素材弹框
dialogmaterial: false,
// 素材信息表格数据
materialsList: [],
// 查询参数
querymaterial: {
pageNum: 1,
pageSize: 10,
materialsType: 'IMAGE_TEXT',
materialsName: null,
materialsStatus: null,
createTime: null,
},
totalmaterial: 0,
baseUrl: process.env.VUE_APP_BASE_API,
openview: false,
viewform: [],
//医院list
hospitalAgencylist: [],
Departmentdata: [],
2024-03-01 17:02:23 +08:00
value: '',
// 遮罩层
// loading: true,
loading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 患者宣教信息表格数据
propagandaList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
patientId: null,
propagandaId: null,
departmentName: null,
createTimeStart: null,
createTimeEnd: null,
propagandaTitle: null,
propagandaType: null,
propagandaCode: null,
propagandaContent: null,
propagandaCoverPath: null,
articleSummary: null,
voicebroadcast: null,
diseaseTypeName: null,
propagandaLink: null,
propagandaBarcodePath: null,
},
// 表单参数
2024-03-29 09:11:57 +08:00
form: {
materialsInfoList: [],
},
2024-03-01 17:02:23 +08:00
// 表单校验
rules: {
2024-03-29 09:11:57 +08:00
hospitalAgencyName: [
{ required: true, message: "医院名称不能为空", trigger: "blur" }
],
2024-03-01 17:02:23 +08:00
departmentId: [
2024-03-20 13:04:35 +08:00
{ required: true, message: "科室名称不能为空", trigger: "blur" }
2024-03-01 17:02:23 +08:00
],
propagandaType: [
{ required: true, message: "宣教类型不能为空", trigger: "blur" }
],
2024-03-29 09:11:57 +08:00
propagandaCoverPath: [
{ required: true, message: "封面不能为空", trigger: "blur" }
],
imgPath: [
2024-04-18 16:18:14 +08:00
{ required: true, message: "", validator: isimgPath, trigger: "blur" }
2024-03-04 15:16:14 +08:00
],
2024-03-07 10:21:15 +08:00
},
2024-03-01 17:02:23 +08:00
};
},
2024-03-07 10:21:15 +08:00
computed: {
pickerStartTime() {
return {
disabledDate: (time) => {
if (this.queryParams.createTimeEnd) {
let edtTime = this.queryParams.createTimeEnd.replace(/-/g, "/");
return time.getTime() > new Date(edtTime);
}
},
};
},
pickerEndTime() {
return {
disabledDate: (time) => {
if (this.queryParams.createTimeStart) {
let startTime = this.queryParams.createTimeStart.replace(/-/g, "/");
return time.getTime() < new Date(startTime);
}
},
};
},
},
2024-03-01 17:02:23 +08:00
created() {
this.Departmentlist();
this.getList();
2024-03-29 09:11:57 +08:00
this.selectAgencyinfo();
2024-03-01 17:02:23 +08:00
},
watch: {
name(val) {
this.querydepartmen.departmentName = val
this.Departmentlist();
}
},
methods: {
2024-04-18 16:18:14 +08:00
checkContentLength() {
// console.log(this.form.propagandaContent.length, 'this.form.propagandaContent.length')
if (this.form.propagandaContent.length - 7 > this.maxLength) {
this.$message({
type: "error",
message: "已达到最大输入长度"
});
}
},
2024-03-29 09:11:57 +08:00
//获取医院list
selectAgencyinfo() {
let query = {
nodeType: 'HOSPITAL',
}
selectAgencyList(query).then(res => {
this.hospitalAgencylist = res.data
})
},
// 医院
changehospitalAgency(e) {
2024-04-19 13:47:54 +08:00
console.log(e,'00000')
2024-03-29 09:11:57 +08:00
this.form.hospitalAgencyName = this.hospitalAgencylist.find(f => f.id == e).agencyName
2024-03-29 10:51:30 +08:00
this.form.hospitalAgencyId = e
2024-03-29 09:11:57 +08:00
this.form.departmentName = ''
this.form.departmentId = ''
this.diseaseTypeName = '请选择病种'
this.form.diseaseTypeId = '';
let query = {
nodeType: 'DEPARTMENT',
agencyId: e,
}
getDepartmentList(query).then(res => {
this.Departmentdata = res.data
})
},
// 科室点击事件
changeDepartment(e) {
2024-03-29 10:51:30 +08:00
this.form.departmentId = e
2024-03-29 09:11:57 +08:00
this.form.departmentName = this.Departmentdata.find(f => f.departmentCode == e).departmentName
this.diseaseTypeName = '请选择病种'
this.form.diseaseTypeId = '';
console.log(this.form)
},
2024-03-29 10:51:30 +08:00
onBlur() {
console.log(this.form, '------------------')
2024-03-29 09:11:57 +08:00
if (!this.form.hospitalAgencyName) {
this.$modal.msgError("请先选择医院");
}
},
// 素材选择
material() {
this.dialogmaterial = true
this.querymaterial.materialsType = 'IMAGE_TEXT',
this.getmaterial()
},
// 关闭素材
materialClose() {
this.dialogmaterial = false
},
// 复选框点击事件
// 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
// }
// },
// 图片/视频
handleClick(e) {
this.querymaterial.materialsType = e.name
this.getmaterial()
},
// 加到文章
labelchange(item) {
this.form.materialsInfoList = []
this.form.imgPath = item.materialsFilePath
this.form.materialsInfoList.push(item)
this.dialogmaterial = false
console.log(item)
},
// 预览
viewshow(item) {
this.openview = true
this.viewform = item
},
/** 查询素材信息列表 */
getmaterial() {
this.loading = true;
this.querymaterial.params = {};
listMaterials(this.querymaterial).then(response => {
this.materialsList = response.rows;
this.totalmaterial = response.total;
this.loading = false;
});
},
2024-03-01 17:02:23 +08:00
// 开始时间
changecreateTimeStart(e) {
this.queryParams.createTimeStart = e
console.log(e)
},
// 结束时间
changecreateTimeEnd(e) {
this.queryParams.createTimeEnd = e
},
// 复制
copyUrl(row) {
this.copyid = row.id
console.log(this.copyid, '00000')
this.$confirm('确定复制该文章内容?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
console.log(this.copyid)
copy(this.copyid).then(response => {
this.$message({
type: "success",
message: "复制成功"
});
this.getList()
2024-03-06 09:55:36 +08:00
this.Departmentlist()
2024-03-01 17:02:23 +08:00
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消复制'
});
});
},
// 复制链接
copylink() {
},
// 预览
Preview(row) {
console.log(row)
const id = row.id || this.ids
getPropaganda(id).then(response => {
this.formview = response.data;
this.dialogview = true
});
},
// 关闭预览
handleview() {
this.dialogview = false
},
// 审核
examine(row) {
this.examineid = row.id
this.dialogexamine = true
},
// 审核同意按钮
cancelamine() {
var formexmine = {
id: this.examineid,
propagandaStatus: 'APPROVED'
}
updateStatus(formexmine).then(response => {
this.$message({
type: "success",
message: "审核通过"
});
this.getList()
});
this.dialogexamine = false
},
// 审核关闭按钮
handleClose() {
this.dialogexamine = false
},
// 审核不同意按钮
submitamine() {
var formexmine = {
id: this.examineid,
propagandaStatus: 'REVIEW_FAILED'
}
updateStatus(formexmine).then(response => {
this.$message({
type: "success",
message: "审核不通过"
});
this.getList()
});
this.dialogexamine = false
},
// 左侧科室列表
Departmentlist() {
this.loading = true;
2024-03-04 15:07:08 +08:00
selectNumByDept(this.querydepartmen).then(response => {
2024-03-01 17:02:23 +08:00
this.DepartmentoList = response.data;
2024-03-06 09:55:36 +08:00
let sum = 0;
this.DepartmentoList.forEach((item) => {
if (item.countNum != null) {
console.log(item.countNum)
sum += item.countNum;
}
this.count = sum;
});
2024-03-01 17:02:23 +08:00
this.loading = false;
});
},
// 左侧科室
itemdata(item) {
if (item) {
this.itemname = item.id
2024-03-29 09:11:57 +08:00
// this.departmentName = item.departmentName
2024-03-01 17:02:23 +08:00
this.loading = true;
this.queryParams.departmentId = item.id
this.getList()
} else {
this.queryParams.departmentId = ''
this.itemname = null
this.getList()
}
},
/** 查询患者宣教信息列表 */
getList() {
this.loading = true;
listPropaganda(this.queryParams).then(response => {
this.propagandaList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 点击科室
clickinnerVisible() {
this.innerVisibleshow = true;
if (this.itemname) {
this.informationqueryParams.departmentId = this.itemname
} else {
this.informationqueryParams.departmentId = null
}
this.informationInfoinfo();
},
// 科室列表
informationInfoinfo() {
department(this.informationqueryParams).then((response) => {
this.infolist = response.rows;
this.totaldepartment = response.total;
this.loading = false;
});
// this.informationqueryParams.page = 1;
},
// 科室名称重置
addresetQuerylist() {
this.informationqueryParams = {
pageNum: 1,
pageSize: 10,
};
this.informationInfoinfo();
},
innerVisiblecancel() {
this.innerVisibleshow = false;
},
// 科室名称圆点按钮
nurseclick(row) {
this.form.departmentId = row.departmentCode;
this.departmentName = row.departmentName;
2024-03-06 11:56:58 +08:00
this.form.diseaseTypeId = '';
this.diseaseTypeName = '请选择病种';
2024-03-01 17:02:23 +08:00
this.innerVisibleshow = false;
},
// 病种列表
infodisease() {
listDisease(this.querydisease).then((response) => {
this.listdisease = response.rows;
this.diseasetotal = response.total;
this.loading = false;
});
},
// 点击病种
clickdisease() {
2024-03-29 09:11:57 +08:00
if (!this.form.departmentName) {
2024-03-01 17:02:23 +08:00
this.$modal.msgError("请先选择科室");
} else {
this.diseaseshowst = true;
this.querydisease.departmentId = this.form.departmentId
this.infodisease()
}
},
// 病种名称圆点按钮
nurseclickdisease(row) {
this.form.diseaseTypeId = row.diseaseTypeCode;
this.diseaseTypeName = row.diseaseTypeName;
this.diseaseshowst = false;
},
// 重置
resetdisease() {
querydisease = {
pageNum: 1,
pageSize: 10,
};
this.infodisease()
},
canceldiseases() {
this.diseaseshowst = false;
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
2024-03-29 09:11:57 +08:00
imgPath: null,
materialsInfoList: [],
2024-03-29 10:51:30 +08:00
hospitalAgencyId: null,
2024-03-01 17:02:23 +08:00
id: null,
patientId: null,
propagandaId: null,
2024-03-29 09:11:57 +08:00
propagandaStatus: null,
2024-03-01 17:02:23 +08:00
departmentName: null,
propagandaTitle: null,
2024-03-29 09:11:57 +08:00
propagandaCode: null,
departmentId: null,
2024-03-01 17:02:23 +08:00
propagandaType: null,
propagandaCode: null,
propagandaContent: null,
propagandaCoverPath: null,
articleSummary: null,
voicebroadcast: null,
diseaseTypeName: null,
propagandaLink: null,
propagandaBarcodePath: null,
remark: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
2024-03-29 09:11:57 +08:00
handleQuerysc() {
this.querymaterial.pageNum = 1;
this.getmaterial();
},
resetQuerysc() {
this.querymaterial.materialsName = null
this.handleQuerysc()
},
2024-03-01 17:02:23 +08:00
/** 重置按钮操作 */
resetQuery() {
// this.queryParams.departmentId = null;
this.queryParams.createTimeEnd = null,
this.queryParams.createTimeStart = null,
this.itemname = null;
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
2024-03-29 09:11:57 +08:00
this.selectAgencyinfo();
this.form.propagandaStatus = 'CREATE_COMPLETE'
2024-03-01 17:02:23 +08:00
this.diseaseTypeName = "请选择病种"
2024-03-29 10:51:30 +08:00
this.Departmentdata = []
2024-03-01 17:02:23 +08:00
this.open = true;
this.title = "新增宣教";
2024-03-29 10:51:30 +08:00
console.log(this.form, '90909090')
2024-03-01 17:02:23 +08:00
},
/** 修改按钮操作 */
handleUpdate(row) {
2024-03-29 09:11:57 +08:00
this.reset();
const id = row.id || this.ids
getPropaganda(id).then(response => {
this.form = response.data;
this.form.suitTaskTypeIds = response.data.suitTaskTypeIds
this.diseaseTypeName = response.data.diseaseTypeName
// this.form.agencyName = response.data.hospitalAgencyName
2024-04-03 16:01:58 +08:00
this.form.imgPath = response.data.materialsInfoList[0]?.materialsFilePath
this.querymaterial.materialsType = response.data.materialsInfoList[0]?.materialsType
2024-03-29 09:11:57 +08:00
this.open = true;
this.title = "修改患者宣教信息";
});
2024-03-04 15:07:08 +08:00
// }
2024-03-01 17:02:23 +08:00
},
// 上传封面
imgUrl(imgUrl) {
this.form.propagandaCoverPath = imgUrl;
},
/** 提交按钮 */
submitForm() {
2024-03-29 09:11:57 +08:00
// return
2024-03-01 17:02:23 +08:00
console.log(this.form)
2024-04-18 16:18:14 +08:00
if (this.form.propagandaContent.length - 7 > this.maxLength) {
this.$message({
type: "error",
message: "已达到最大输入长度"
});
}else{
2024-03-29 09:11:57 +08:00
2024-03-01 17:02:23 +08:00
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
2024-03-29 09:11:57 +08:00
2024-03-01 17:02:23 +08:00
this.form.diseaseTypeName = this.diseaseTypeName
updatePropaganda(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
2024-04-10 09:20:19 +08:00
if (this.diseaseTypeName == '请选择病种') {
2024-03-29 10:51:30 +08:00
this.form.diseaseTypeName = null
2024-04-18 16:18:14 +08:00
} else if (this.diseaseTypeName) {
2024-03-29 10:51:30 +08:00
this.form.diseaseTypeName = this.diseaseTypeName
2024-03-01 17:02:23 +08:00
}
addPropaganda(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
2024-03-06 09:55:36 +08:00
this.Departmentlist()
2024-03-01 17:02:23 +08:00
});
}
}
});
2024-04-18 16:18:14 +08:00
}
2024-03-01 17:02:23 +08:00
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除该宣教信息?').then(function () {
return delPropaganda(ids);
}).then(() => {
this.getList();
2024-03-06 09:55:36 +08:00
this.Departmentlist()
2024-03-01 17:02:23 +08:00
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download('manage/propaganda/export', {
...this.queryParams
}, `propaganda_${new Date().getTime()}.xlsx`)
}
}
};
</script>
2024-03-26 10:59:35 +08:00
<style lang="scss" scoped>
2024-04-01 15:00:45 +08:00
// ::v-deep .el-form-item--medium .el-form-item__content{
// width: 800px;
// }
2024-03-29 09:11:57 +08:00
.propagandaselect {
width: 100px;
height: 100px;
background: #fafafa;
.add {
color: #b6b6b7;
font-size: 22px;
line-height: 100px;
text-align: center; //水平居中
// margin: 0 auto;
}
}
2024-03-07 15:17:40 +08:00
.leftpro {
2024-03-26 14:24:56 +08:00
height: 760px;
2024-03-01 17:02:23 +08:00
overflow: auto;
.name {
font-weight: 700;
margin-bottom: 10px;
}
.listitem {
width: 100%;
height: 50px;
border-bottom: 1px solid #dcdfe6;
.count {
display: inline-block;
position: relative;
// right: -172px;
left: 210px;
color: #a4a6aa;
top: -35px;
font-size: 13px;
}
.all {
height: 50px;
line-height: 50px;
padding-left: 13px;
}
.allactive {
background: #e8f4ff;
height: 50px;
line-height: 50px;
padding-left: 13px;
border-left: 3px solid #4d9de7;
}
}
}
.button {
display: inline-block;
position: relative;
left: 20px;
top: -11px;
}
audio {
width: 350px;
// background: #4d9de7;
}
.titletop {
font-size: 16px;
font-weight: 700;
}
.bodytop {
position: relative;
top: 20px;
height: 500px;
overflow: auto;
border: 1px solid #e2e2e2;
.titledata {
margin: 30px 0px 15px 30px;
top: 14px;
font-size: 20px;
}
.audiotop {
margin: 10px 0px 10px 30px;
}
img {
2024-03-29 09:11:57 +08:00
// width: 100%;
// width: 362px;
// height: 127px;
2024-03-01 17:02:23 +08:00
margin: 0px 0px 0px 30px;
}
.know {
margin: 11px 0px 10px 30px;
font-size: 16px;
}
.knowlist {
margin: 10px 0px 10px 30px;
font-size: 16px;
}
}
2024-03-29 09:11:57 +08:00
.viewbody {
width: 100%;
height: 500px;
// background: #409eff;
display: flex;
.left {
overflow: auto;
width: 77%;
height: 500px;
// background: #989992;
video {
height: 500px;
width: 100%;
}
}
img {
// height: 100%;
// width: 100%;
}
.right {
width: 20%;
// background: red;
2024-04-01 15:00:45 +08:00
overflow: auto;
2024-03-29 09:11:57 +08:00
margin-left: 30px;
.nametitle {
font-size: 14px;
font-weight: 600;
}
.nameitem {
color: #959595;
2024-04-01 15:00:45 +08:00
margin: 13px;
2024-03-29 09:11:57 +08:00
}
}
}
.bodytopxj {
width: 100%;
display: flex;
white-space: wrap;
align-items: center;
flex-wrap: wrap;
justify-content: flex-start;
// align-content: space-between;
.bodylist {
width: 31%;
height: 221px;
border: 2px solid #e2e3e5;
border-radius: 10px;
position: relative;
// margin-bottom: 10px;
margin: 6px;
.texttitle {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-weight: 700;
margin: 5px 0px 5px 10px;
}
//
.dataliat {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin: 0px 0px 5px 10px;
font-size: 12px;
color: #989992;
}
.bq {
width: 155px;
}
img {
width: 100%;
height: 100px;
}
.label {
position: absolute;
right: 0px;
right: 18px;
color: #409eff;
bottom: 23px;
font-size: 13px;
}
}
}
2024-03-20 13:04:35 +08:00
</style>