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

1247 lines
34 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
>
</el-date-picker
2024-03-07 10:21:15 +08:00
> -
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-input
v-model="queryParams.departmentName"
placeholder="请输入所属科室名称"
clearable
@keyup.enter.native="handleQuery"
/> -->
</el-form-item>
<el-form-item label="宣教来源" prop="hospitalAgencyId">
<el-input
v-model="queryParams.hospitalAgencyId"
placeholder="请输入宣教来源"
clearable
@keyup.enter.native="handleQuery"
/>
</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"
/>
<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"
prop="hospitalAgencyId"
/>
<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"
v-if="scope.row.propagandaStatus=='CREATE_COMPLETE'"
@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>
</el-col>
</el-row>
<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="500px"
append-to-body
v-if="open"
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="宣教标题" prop="propagandaTitle">
<el-input
v-model="form.propagandaTitle"
placeholder="请输入宣教标题"
/>
</el-form-item>
<el-form-item label="宣教类型" prop="propagandaType">
<el-select
v-model="form.propagandaType"
placeholder="请选择"
style="width: 378px"
>
<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">
<el-input
v-model="form.hospitalAgencyName"
placeholder="请输入医院名称"
/>
</el-form-item>
2024-03-07 10:49:46 +08:00
<!-- <el-form-item label="医生名称" prop="departmentName">
2024-03-01 17:02:23 +08:00
<el-input
v-model="form.departmentName"
placeholder="请输入医生名称"
/>
2024-03-07 10:49:46 +08:00
</el-form-item> -->
2024-03-01 17:02:23 +08:00
<el-form-item label="科室名称" prop="departmentId">
<el-button
type=""
v-if="departmentName == '请选择科室'"
@click="clickinnerVisible()"
style="
width: 379px;
text-align: left;
height: 36px;
color: #c0c4cc;
overflow: hidden;
"
>{{ departmentName }}</el-button
>
<el-button
@click="clickinnerVisible()"
type=""
v-else
style="
width: 379px;
text-align: left;
height: 36px;
padding-left: -10px;
overflow: hidden;
"
>{{ departmentName }}</el-button
>
</el-form-item>
<el-form-item label="病种名称" prop="diseaseTypeName">
<el-button
type=""
v-if="diseaseTypeName == '请选择病种'"
@click="clickdisease()"
style="
width: 379px;
text-align: left;
height: 36px;
color: #c0c4cc;
overflow: hidden;
"
>{{ diseaseTypeName }}</el-button
>
<el-button
@click="clickdisease()"
type=""
v-else
style="
width: 379px;
text-align: left;
height: 36px;
padding-left: -10px;
overflow: hidden;
"
>{{ diseaseTypeName }}</el-button
>
</el-form-item>
<el-form-item label="添加封面" prop="propagandaCoverPath">
<stationAcatar
@imgUrl="imgUrl"
:img="form.propagandaCoverPath"
:type="'propagandaCoverUrl'"
/>
</el-form-item>
<el-form-item label="语音播报" prop="voicebroadcast">
<el-input
v-model="form.voicebroadcast"
type="textarea"
placeholder="请输入语音播报"
/>
</el-form-item>
<el-form-item label="宣教正文内容" prop="propagandaContent">
<el-input
v-model="form.propagandaContent"
type="textarea"
placeholder="请输入宣教正文内容"
/>
</el-form-item>
<el-form-item label="文章摘要" prop="articleSummary">
<editor v-model="form.articleSummary" :min-height="192" />
</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>
<img src="@/assets/system/userinfo.jpg" alt="" />
<div class="know">知识卡片</div>
<div class="knowlist">
{{ formview.propagandaContent }}
<!-- 二甲双胍的用药安全性良好已经过多年临床用药实践论证但不用于10岁以下患者肝功能不全患者(尤其转氨酶高于3倍正常值的患者)肾功能异 -->
</div>
</div>
</div>
</el-dialog>
</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-01 17:02:23 +08:00
import stationAcatar from "../../system/stationAvatar/index.vue";
import { department, listDisease } from "@/api/manage/script";
export default {
name: "Propaganda",
components: { stationAcatar },
data() {
return {
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-06 11:56:58 +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: '审核不通过'
}],
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,
},
// 表单参数
form: {},
// 表单校验
rules: {
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-04 15:16:14 +08:00
propagandaCoverPath:[
{ required: true, message: "封面不能为空", trigger: "blur" }
],
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();
},
watch: {
name(val) {
this.querydepartmen.departmentName = val
this.Departmentlist();
}
},
methods: {
// 开始时间
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
this.departmentName = item.departmentName
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() {
if (this.departmentName == '请选择科室') {
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 = {
id: null,
patientId: null,
propagandaId: null,
propagandaStatus:null,
departmentName: null,
propagandaTitle: null,
2024-03-20 13:04:35 +08:00
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();
},
/** 重置按钮操作 */
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();
this.form.propagandaStatus='CREATE_COMPLETE'
if (this.itemname) {
this.form.departmentName = this.departmentName
this.form.departmentId = this.itemname
} else if (this.itemname == null) {
this.departmentName = "请选择科室"
}
else {
this.departmentName = "请选择科室"
}
this.diseaseTypeName = "请选择病种"
this.open = true;
this.title = "新增宣教";
},
/** 修改按钮操作 */
// handleUpdate(row) {
// this.reset();
// const id = row.id || this.ids
// getPropaganda(id).then(response => {
// this.form = response.data;
// this.open = true;
// this.title = "修改患者宣教信息";
// });
// },
/** 修改按钮操作 */
handleUpdate(row) {
2024-03-04 15:07:08 +08:00
// if (!this.itemname) {
// this.$modal.msgError("请先选择科室");
// } else {
2024-03-01 17:02:23 +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.departmentName = response.data.departmentName
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() {
console.log(this.form)
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
this.form.departmentName = this.departmentName
this.form.diseaseTypeName = this.diseaseTypeName
updatePropaganda(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
if (this.diseaseTypeName == "请选择病种") {
this.form.diseaseTypeName == null
} else {
this.form.diseaseTypeName = this.diseaseTypeName
}
if (this.itemname) {
this.form.departmentName = this.departmentName
this.form.departmentId = this.itemname
} else {
this.form.departmentName = this.departmentName
}
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
});
}
}
});
},
/** 删除按钮操作 */
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>
<style lang="scss">
2024-03-07 15:17:40 +08:00
.leftpro {
height: 690px;
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 {
width: 362px;
height: 127px;
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-20 13:04:35 +08:00
</style>