NurseStationOperateUI/src/views/system/poser/index.vue

978 lines
30 KiB
Vue
Raw Normal View History

2023-02-13 10:41:29 +08:00
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
2023-02-20 09:25:18 +08:00
label-width="110px"
2023-02-13 10:41:29 +08:00
>
2023-02-15 09:03:08 +08:00
<el-form-item label="护理站名称" prop="nurseStationId">
2023-02-22 11:10:40 +08:00
<el-button type class="stationbtn" @click="ParamsStation(true)">
{{
2023-02-20 09:25:18 +08:00
queryParams.nurseStationName
2023-02-22 11:10:40 +08:00
}}
</el-button>
2023-02-13 10:41:29 +08:00
</el-form-item>
2023-02-15 09:03:08 +08:00
<el-form-item label="护理项目" prop="nurseItemId" label-width="100px">
2023-02-22 11:10:40 +08:00
<el-button type class="stationbtn" @click="ParamsStationxm(true)">
{{
2023-02-20 09:25:18 +08:00
queryParams.nurseItemName
2023-02-22 11:10:40 +08:00
}}
</el-button>
2023-02-13 10:41:29 +08:00
</el-form-item>
<el-form-item label="海报名称" prop="poserName">
<el-input
v-model="queryParams.poserName"
placeholder="请输入海报名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
2023-02-15 09:03:08 +08:00
<el-form-item label="海报所属模块" prop="moduleType">
2023-02-22 11:10:40 +08:00
<el-select v-model="queryParams.moduleType" placeholder="请选择" style="width: 208px">
2023-02-16 11:02:11 +08:00
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
2023-02-22 11:10:40 +08:00
></el-option>
2023-02-16 11:02:11 +08:00
</el-select>
2023-02-13 10:41:29 +08:00
</el-form-item>
2023-02-20 09:25:18 +08:00
<el-form-item label="海报编号" prop="poserCode">
<el-input
v-model="queryParams.poserCode"
placeholder="请输入海报编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
2023-02-13 10:41:29 +08:00
<el-form-item>
2023-02-22 11:10:40 +08:00
<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>
2023-02-13 10:41:29 +08:00
</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="['system:poser:add']"
2023-02-22 11:10:40 +08:00
>新增</el-button>
2023-02-13 10:41:29 +08:00
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:poser:edit']"
2023-02-22 11:10:40 +08:00
>修改</el-button>
2023-02-13 10:41:29 +08:00
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:poser:remove']"
2023-02-22 11:10:40 +08:00
>删除</el-button>
2023-02-13 10:41:29 +08:00
</el-col>
2023-02-17 18:11:09 +08:00
<!-- <el-col :span="1.5">
2023-02-13 10:41:29 +08:00
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:poser:export']"
>导出</el-button
>
2023-02-22 11:10:40 +08:00
</el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
2023-02-13 10:41:29 +08:00
</el-row>
2023-02-22 11:10:40 +08:00
<el-table v-loading="loading" :data="poserList" @selection-change="handleSelectionChange">
2023-02-13 10:41:29 +08:00
<el-table-column type="selection" width="55" align="center" />
2023-02-22 11:10:40 +08:00
<el-table-column label="所属护理站" align="center" prop="nurseStationName" />
<el-table-column label="所属护理项目" align="center" prop="nurseItemName" />
2023-02-13 10:41:29 +08:00
<el-table-column label="海报名称" align="center" prop="poserName" />
<el-table-column label="海报编号" align="center" prop="poserCode" />
2023-02-15 09:03:08 +08:00
<el-table-column label="海报所属模块" align="center" prop="moduleType">
<template slot-scope="scope">
{{
2023-02-22 11:10:40 +08:00
scope.row.moduleType == "NURSE_AGENCY_MODULE" ? "护理机构模块" : ""
2023-02-15 09:03:08 +08:00
}}
{{
2023-02-22 11:10:40 +08:00
scope.row.moduleType == "NURSE_ITEM_MODULE" ? "护理项目模块" : ""
2023-02-15 09:03:08 +08:00
}}
{{
2023-02-22 11:10:40 +08:00
scope.row.moduleType == "HEALTH_CONSUTION_MODULE"
? "健康咨询模块"
: ""
2023-02-15 09:03:08 +08:00
}}
{{ scope.row.moduleType == "HOME_PAGE_MODULE" ? "首页模块" : "" }}
2023-02-20 16:12:05 +08:00
{{
2023-02-22 11:10:40 +08:00
scope.row.moduleType == "NURSE_AGENCY_INTRODUCE_MODULE"
? "护理机构简介模块"
: ""
2023-02-20 16:12:05 +08:00
}}
2023-02-15 09:03:08 +08:00
</template>
</el-table-column>
2023-02-13 10:41:29 +08:00
<el-table-column label="海报显示顺序" align="center" prop="poserSort" />
2023-02-22 11:10:40 +08:00
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
2023-02-13 10:41:29 +08:00
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:poser:edit']"
2023-02-22 11:10:40 +08:00
>修改</el-button>
2023-02-13 10:41:29 +08:00
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:poser:remove']"
2023-02-22 11:10:40 +08:00
>删除</el-button>
2023-02-13 10:41:29 +08:00
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改泉医到家系统海报模块信息包含咨询简介信息对话框 -->
2023-02-15 16:00:47 +08:00
<el-dialog
2023-02-20 16:12:05 +08:00
:title="!isEditFlag ? '添加海报模块信息' : '修改海报模块信息'"
2023-02-15 16:00:47 +08:00
:visible.sync="open"
2023-02-17 14:09:17 +08:00
width="1100px"
2023-02-15 16:00:47 +08:00
:before-close="cancel"
append-to-body
>
2023-02-22 11:10:40 +08:00
<el-form ref="form" :model="form" :rules="rules" label-width="110px" :inline="true">
2023-02-13 10:41:29 +08:00
<el-form-item label="海报名称" prop="poserName">
2023-02-22 11:10:40 +08:00
<el-input v-model="form.poserName" placeholder="请输入海报名称" maxlength="50" />
2023-02-13 10:41:29 +08:00
</el-form-item>
2023-02-20 16:12:05 +08:00
2023-02-15 09:03:08 +08:00
<el-form-item label="海报所属模块" prop="moduleType">
<el-select
v-model="form.moduleType"
placeholder="请选择"
style="width: 208px"
2023-02-20 16:12:05 +08:00
:disabled="isEditFlag"
2023-02-15 09:03:08 +08:00
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
2023-02-22 11:10:40 +08:00
></el-option>
2023-02-15 09:03:08 +08:00
</el-select>
2023-02-13 10:41:29 +08:00
</el-form-item>
2023-02-20 10:00:58 +08:00
<el-form-item label="海报显示顺序" prop="poserSort">
<el-input
2023-02-22 11:15:40 +08:00
v-model.number="form.poserSort"
2023-02-20 10:00:58 +08:00
placeholder="请输入海报显示顺序"
oninput="value=value.replace(/[^\d]/g,'')"
2023-02-22 11:10:40 +08:00
maxlength="5"
2023-02-20 10:00:58 +08:00
/>
</el-form-item>
2023-02-15 16:00:47 +08:00
<el-form-item
label="所属护理站"
prop="nurseStationId"
v-if="
form.moduleType == 'NURSE_AGENCY_MODULE' ||
form.moduleType == 'NURSE_ITEM_MODULE'
"
>
2023-02-15 09:03:08 +08:00
<template>
<el-button
2023-02-22 11:10:40 +08:00
type
2023-02-15 09:03:08 +08:00
@click="ParamsStation(false)"
2023-02-20 16:12:05 +08:00
:disabled="isEditFlag"
2023-02-15 09:03:08 +08:00
style="
width: 208px;
text-align: left;
height: 36px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #c0c4cc;
"
v-if="form.nurseStationName == '请选择所属护理站'"
2023-02-22 11:10:40 +08:00
>{{ form.nurseStationName }}</el-button>
2023-02-15 09:03:08 +08:00
<el-button
2023-02-22 11:10:40 +08:00
type
2023-02-15 09:03:08 +08:00
style="
width: 208px;
text-align: left;
height: 36px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
"
@click="ParamsStation(false)"
2023-02-20 16:12:05 +08:00
:disabled="isEditFlag"
2023-02-15 09:03:08 +08:00
v-else
2023-02-22 11:10:40 +08:00
>{{ form.nurseStationName }}</el-button>
2023-02-15 09:03:08 +08:00
</template>
2023-02-13 10:41:29 +08:00
</el-form-item>
2023-02-15 16:00:47 +08:00
<el-form-item
label="所属护理项目"
prop="nurseItemId"
v-if="form.moduleType == 'NURSE_ITEM_MODULE'"
>
2023-02-15 09:03:08 +08:00
<template>
<el-button
2023-02-20 17:18:57 +08:00
:disabled="isEditFlag"
2023-02-22 11:10:40 +08:00
type
2023-02-15 09:03:08 +08:00
style="
width: 208px;
text-align: left;
height: 36px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #c0c4cc;
"
@click="ParamsStationxm(false)"
v-if="form.nurseItemName == '请选择所属护理项目'"
2023-02-22 11:10:40 +08:00
>{{ form.nurseItemName }}</el-button>
2023-02-15 09:03:08 +08:00
<el-button
2023-02-20 17:18:57 +08:00
:disabled="isEditFlag"
2023-02-22 11:10:40 +08:00
type
2023-02-15 09:03:08 +08:00
style="
width: 208px;
text-align: left;
height: 36px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
"
@click="ParamsStationxm(false)"
v-else
2023-02-22 11:10:40 +08:00
>{{ form.nurseItemName }}</el-button>
</template>
</el-form-item>
2023-02-20 16:12:05 +08:00
2023-02-21 19:22:18 +08:00
<el-form-item label="海报图片" prop="posterPictureUrl">
2023-02-22 11:10:40 +08:00
<el-table label-width="50px" style="margin-top: 20px" :data="form.posterPictureUrlLists">
2023-02-15 09:03:08 +08:00
<el-table-column label="图片" align="center" width="300">
<template slot-scope="scope">
<stationAcatar
@item="imgUrl"
:img="scope.row.posterPictureUrl"
:type="'posterPictureUrl'"
:item="scope.row"
/>
</template>
</el-table-column>
<el-table-column label="图片跳转标识" align="center" width="300">
<template slot-scope="scope">
2023-02-22 11:10:40 +08:00
<el-select v-model="scope.row.jumpType" placeholder="请选择" style="width: 208px">
2023-02-15 09:03:08 +08:00
<el-option
2023-02-15 16:00:47 +08:00
v-for="item in jumpTypes"
2023-02-15 09:03:08 +08:00
:key="item.value"
:label="item.label"
:value="item.value"
2023-02-22 11:10:40 +08:00
></el-option>
2023-02-15 09:03:08 +08:00
</el-select>
</template>
</el-table-column>
2023-02-17 14:09:17 +08:00
<el-table-column label="操作" align="center" width="250">
2023-02-15 09:03:08 +08:00
<template slot-scope="scope">
2023-02-22 11:10:40 +08:00
<el-button size="mini" type="text" @click="addPictureUrl">新增</el-button>
<el-button size="mini" type="text" @click="delPictureUrl(scope.row)">删除</el-button>
2023-02-15 09:03:08 +08:00
</template>
</el-table-column>
</el-table>
2023-02-13 10:41:29 +08:00
</el-form-item>
2023-02-17 18:11:09 +08:00
<el-form-item label="海报简介">
<el-input
type="textarea"
:rows="5"
style="width: 540px"
placeholder="请输入海报简介"
v-model="form.posterIntroduce"
2023-02-22 11:10:40 +08:00
></el-input>
2023-02-17 18:11:09 +08:00
</el-form-item>
2023-02-17 14:09:17 +08:00
<el-form-item label="海报视频">
2023-02-15 09:03:08 +08:00
<!-- <video
v-if="videoForm.showVideoPath != ''"
v-bind:src="videoForm.showVideoPath"
class="avatar video-avatar"
controls="controls"
>
您的浏览器不支持视频播放
2023-02-22 11:10:40 +08:00
</video>-->
2023-02-15 09:03:08 +08:00
<stationAcatar
style="width: 208px"
@imgUrl="imgUrl2"
2023-02-15 16:00:47 +08:00
:tovideo="form.posterVideoUrl"
2023-02-15 09:03:08 +08:00
:type="'posterVideoUrl'"
2023-02-15 16:00:47 +08:00
v-if="open"
2023-02-13 10:41:29 +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
2023-02-15 09:03:08 +08:00
title="选择所属护理站"
2023-02-13 10:41:29 +08:00
:visible.sync="nurseStationshow"
width="1100px"
append-to-body
:before-close="clicknurseStationshow"
>
2023-02-22 11:10:40 +08:00
<el-form ref="form" :model="getListByUserquery" label-width="110px" :inline="true">
2023-02-13 10:41:29 +08:00
<el-form-item label="护理站编码" prop="nurseStationCode">
2023-02-22 11:10:40 +08:00
<el-input v-model="getListByUserquery.nurseStationCode" placeholder="请输入护理站编码" />
2023-02-13 10:41:29 +08:00
</el-form-item>
<el-form-item label="护理站名称" prop="nurseStationName">
2023-02-22 11:10:40 +08:00
<el-input v-model="getListByUserquery.nurseStationName" placeholder="请输入护理站名称" />
2023-02-13 10:41:29 +08:00
</el-form-item>
<el-form-item>
2023-02-22 11:10:40 +08:00
<el-button type="primary" icon="el-icon-search" size="mini" @click="info">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="stationcancel">重置</el-button>
2023-02-13 10:41:29 +08:00
</el-form-item>
</el-form>
2023-02-22 11:10:40 +08:00
<el-table v-loading="loading" :data="nurseStationlist" @cell-dblclick="choicestationid">
2023-02-13 10:41:29 +08:00
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
circle
@click="choicestationid(scope.row)"
v-if="stationid == scope.row.id"
></el-button>
<el-button
style="width: 15px; height: 15px"
circle
v-else
@click="choicestationid(scope.row)"
2023-02-22 11:10:40 +08:00
></el-button>
2023-02-13 10:41:29 +08:00
</template>
</el-table-column>
2023-02-22 11:10:40 +08:00
<el-table-column property="nurseStationCode" label="护理站编码" align="center"></el-table-column>
<el-table-column property="nurseStationName" label="护理站名称" align="center"></el-table-column>
<el-table-column property="phone" label="联系电话" align="center"></el-table-column>
2023-02-13 10:41:29 +08:00
<el-table-column
property="address"
label="护理站地址"
align="center"
:show-overflow-tooltip="true"
2023-02-22 11:10:40 +08:00
></el-table-column>
2023-02-13 10:41:29 +08:00
</el-table>
<pagination
v-show="total4 > 0"
:total="total4"
:page.sync="getListByUserquery.pageNum"
:limit.sync="getListByUserquery.pageSize"
@pagination="info"
/>
</el-dialog>
2023-02-15 09:03:08 +08:00
<!-- 护理项目 -->
<el-dialog
title="选择所属护理项目"
:visible.sync="nurseItemshow"
2023-02-13 10:41:29 +08:00
width="1100px"
append-to-body
2023-02-15 09:03:08 +08:00
:before-close="cancelnurseItemshow"
2023-02-13 10:41:29 +08:00
>
2023-02-15 09:03:08 +08:00
<el-form :model="nurseItemquery" label-width="150px" :inline="true">
<el-form-item label="护理项目编码" prop="nurseItemCode">
2023-02-22 11:10:40 +08:00
<el-input v-model="nurseItemquery.nurseItemCode" placeholder="请输入护理项目编码" />
2023-02-13 10:41:29 +08:00
</el-form-item>
2023-02-15 09:03:08 +08:00
<el-form-item label="护理项目名称" prop="nurseItemName">
2023-02-22 11:10:40 +08:00
<el-input v-model="nurseItemquery.nurseItemName" placeholder="请输入护理项目名称" />
2023-02-13 10:41:29 +08:00
</el-form-item>
<el-form-item>
2023-02-22 11:10:40 +08:00
<el-button type="primary" icon="el-icon-search" size="mini" @click="nurseItemlistInfo">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="nurseItemlistcancel">重置</el-button>
2023-02-13 10:41:29 +08:00
</el-form-item>
</el-form>
2023-02-22 11:10:40 +08:00
<el-table v-loading="loading" :data="nurseItemlist" @cell-dblclick="choicenurseItem">
2023-02-13 10:41:29 +08:00
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
circle
2023-02-15 09:03:08 +08:00
@click="choicenurseItem(scope.row)"
v-if="nurseitemid == scope.row.id"
2023-02-13 10:41:29 +08:00
></el-button>
<el-button
style="width: 15px; height: 15px"
circle
v-else
2023-02-15 09:03:08 +08:00
@click="choicenurseItem(scope.row)"
2023-02-22 11:10:40 +08:00
></el-button>
2023-02-13 10:41:29 +08:00
</template>
</el-table-column>
2023-02-22 11:10:40 +08:00
<el-table-column label="所属护理站" align="center" prop="nurseStationName" />
2023-02-15 09:03:08 +08:00
<!-- <el-table-column label="护理类型" align="center" prop="nurseTypeName" /> -->
2023-02-22 11:10:40 +08:00
<el-table-column label="护理项目编号" align="center" prop="nurseItemCode" />
<el-table-column label="护理项目名称" align="center" prop="nurseItemName" />
<el-table-column label="护理项目分类名称" align="center" prop="nurseItemName" />
2023-02-15 09:03:08 +08:00
<el-table-column label="创建时间" align="center" prop="createTime" />
<el-table-column label="创建人" align="center" prop="createBy" />
2023-02-13 10:41:29 +08:00
</el-table>
<pagination
2023-02-15 09:03:08 +08:00
v-show="nurseItemtotal > 0"
:total="nurseItemtotal"
:page.sync="nurseItemquery.pageNum"
:limit.sync="nurseItemquery.pageSize"
@pagination="nurseItemlistInfo"
2023-02-13 10:41:29 +08:00
/>
</el-dialog>
</div>
</template>
<script>
2023-02-15 09:03:08 +08:00
import baseurl from "@/api/baseurl.js";
2023-02-13 10:41:29 +08:00
import {
listPoser,
getPoser,
delPoser,
addPoser,
getListByUser,
updatePoser,
2023-02-22 11:10:40 +08:00
updatePicture
2023-02-13 10:41:29 +08:00
} from "@/api/system/poser";
2023-02-15 09:03:08 +08:00
import { list } from "@/api/system/nurseItem";
2023-02-13 10:41:29 +08:00
import stationAcatar from "../stationAvatar/index.vue";
import editor from "@/components/Editor";
export default {
name: "Poser",
components: { stationAcatar, editor },
data() {
return {
// 遮罩层
loading: true,
getListByUserquery: {
pageNum: 1,
2023-02-22 11:10:40 +08:00
pageSize: 10
2023-02-13 10:41:29 +08:00
},
nurseStationlist: [],
2023-02-15 09:03:08 +08:00
nurseStationshow: false,
imgs: { pictureUrlList: [] },
2023-02-13 10:41:29 +08:00
// 选中数组
ids: [],
2023-02-20 16:12:05 +08:00
nurseItemIds: [],
2023-02-20 11:10:42 +08:00
moduleTypes: [],
2023-02-16 11:02:11 +08:00
itemids: [],
Types: [],
2023-02-15 09:03:08 +08:00
idd: 9999999,
2023-02-13 10:41:29 +08:00
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
2023-02-15 09:03:08 +08:00
nurseItemshow: false,
2023-02-13 10:41:29 +08:00
// 总条数
total: 0,
total2: 0,
total4: 0,
2023-02-15 09:03:08 +08:00
nurseItemtotal: 0,
nurseItemlist: [],
2023-02-13 10:41:29 +08:00
// 泉医到家系统海报模块信息(包含咨询简介信息)表格数据
poserList: [],
2023-02-15 09:03:08 +08:00
nurseItemList: [],
2023-02-20 16:12:05 +08:00
// 弹出层判断新增还是修改
isEditFlag: false,
2023-02-13 10:41:29 +08:00
// 是否显示弹出层
open: false,
2023-02-15 09:03:08 +08:00
nurseItemquery: {
pageNum: 1,
pageSize: 10,
nurseItemCode: null,
2023-02-22 11:10:40 +08:00
nurseItemName: null
2023-02-15 09:03:08 +08:00
},
2023-02-13 10:41:29 +08:00
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
nurseStationId: null,
nurseItemId: null,
2023-02-15 09:03:08 +08:00
nursenurseItemId: null,
2023-02-13 10:41:29 +08:00
poserName: null,
poserCode: null,
posterIntroduce: null,
posterPictureUrl: null,
posterVideoUrl: null,
moduleType: null,
poserSort: null,
jumpLink: null,
2023-02-22 11:10:40 +08:00
jumpType: null
2023-02-13 10:41:29 +08:00
},
// 表单参数
form: {
2023-02-15 09:03:08 +08:00
nurseStationId: null,
nurseTypeId: null,
nurseItemName: "",
nurseItemContent: "",
advanceAppointDuration: "",
itemPictureUrl: "",
2023-02-22 11:15:40 +08:00
poserSort: null,
nurseStationId: null,
2023-02-15 09:03:08 +08:00
nurseStationName: "请选择所属护理站",
nurseItemName: "请选择所属护理项目",
2023-02-22 11:15:40 +08:00
nurseItemId: null
2023-02-13 10:41:29 +08:00
},
2023-02-21 19:22:18 +08:00
imgsurl: { pictureUrlList: [] },
2023-02-13 10:41:29 +08:00
// 表单校验
rules: {
2023-02-15 09:03:08 +08:00
moduleType: [
2023-02-22 11:10:40 +08:00
{ required: true, message: "请选择海报所属模块", trigger: "blur" }
2023-02-15 09:03:08 +08:00
],
2023-02-13 10:41:29 +08:00
poserName: [
2023-02-22 11:10:40 +08:00
{ required: true, message: "请输入海报名称", trigger: "blur" }
2023-02-13 10:41:29 +08:00
],
2023-02-15 09:03:08 +08:00
nurseStationId: [
2023-02-22 11:10:40 +08:00
{ required: true, message: "请选择所属护理站", trigger: "blur" }
2023-02-13 10:41:29 +08:00
],
posterIntroduce: [
2023-02-22 11:10:40 +08:00
{ required: true, message: "请输入海报简介", trigger: "blur" }
2023-02-13 10:41:29 +08:00
],
2023-02-20 17:18:57 +08:00
2023-02-13 10:41:29 +08:00
posterVideoUrl: [
2023-02-22 11:10:40 +08:00
{ required: true, message: "请选择海报视频", trigger: "blur" }
2023-02-13 10:41:29 +08:00
],
poserSort: [
2023-02-22 11:10:40 +08:00
{ required: true, message: "请输入海报顺序", trigger: "blur" }
2023-02-13 10:41:29 +08:00
],
2023-02-15 09:03:08 +08:00
nurseItemId: [
2023-02-22 11:10:40 +08:00
{ required: true, message: "请选择所属护理项目", trigger: "blur" }
]
2023-02-13 10:41:29 +08:00
},
2023-02-15 09:03:08 +08:00
options: [
{
value: "NURSE_AGENCY_MODULE",
2023-02-22 11:10:40 +08:00
label: "护理机构模块"
2023-02-15 09:03:08 +08:00
},
{
value: "NURSE_ITEM_MODULE",
2023-02-22 11:10:40 +08:00
label: "护理项目模块"
2023-02-15 09:03:08 +08:00
},
{
value: "HEALTH_CONSUTION_MODULE",
2023-02-22 11:10:40 +08:00
label: "健康咨询模块"
2023-02-15 09:03:08 +08:00
},
{
value: "HOME_PAGE_MODULE",
2023-02-22 11:10:40 +08:00
label: "首页模块"
2023-02-15 09:03:08 +08:00
},
2023-02-17 18:11:09 +08:00
{
value: "NURSE_AGENCY_INTRODUCE_MODULE",
2023-02-22 11:10:40 +08:00
label: "护理机构简介模块"
}
2023-02-15 09:03:08 +08:00
],
2023-02-22 11:10:40 +08:00
objitem: [],
2023-02-15 16:00:47 +08:00
jumpTypes: [
{
value: "NEW_PEOPLE_WELFARE",
2023-02-22 11:10:40 +08:00
label: "新人福利"
2023-02-15 16:00:47 +08:00
},
{
value: "HOME_PAGE",
2023-02-22 11:10:40 +08:00
label: "首页"
2023-02-15 16:00:47 +08:00
},
{
value: "SHOPPING",
2023-02-22 11:10:40 +08:00
label: "商城"
}
2023-02-15 16:00:47 +08:00
],
2023-02-15 09:03:08 +08:00
//页面链接
stationid: "",
2023-02-22 11:10:40 +08:00
imgone: [],
2023-02-15 09:03:08 +08:00
nurseitemid: "",
homenumber: false,
videourl: "",
videoFlag: false,
//是否显示进度条
videoUploadPercent: "",
//进度条的进度,
isShowUploadVideo: false,
//显示上传按钮
videoForm: {
2023-02-22 11:10:40 +08:00
showVideoPath: "" //回显的变量
2023-02-15 09:03:08 +08:00
},
2023-02-21 19:22:18 +08:00
// 存储新上传的图片数组
2023-02-22 11:10:40 +08:00
deletNewImgs: []
2023-02-13 10:41:29 +08:00
};
},
created() {
2023-02-15 09:03:08 +08:00
this.videourl = baseurl + "/system/station/updateNurseStationHeads";
2023-02-13 10:41:29 +08:00
this.getList();
2023-02-15 09:03:08 +08:00
this.nurseItemlistInfo();
2023-02-13 10:41:29 +08:00
},
methods: {
2023-02-15 09:03:08 +08:00
//删除海报图片列表
delPictureUrl(item) {
2023-02-16 11:11:24 +08:00
console.log(item);
2023-02-15 09:03:08 +08:00
if (item.idd && !item.id) {
2023-02-15 16:00:47 +08:00
if (this.form.posterPictureUrlLists.length == 1) {
2023-02-15 09:03:08 +08:00
this.$message.error("最后一条不可删除");
} else {
2023-02-22 11:10:40 +08:00
this.form.posterPictureUrlLists = this.form.posterPictureUrlLists.filter(
e => e.idd != item.idd
);
2023-02-15 09:03:08 +08:00
}
} else if (!item.idd && item.id) {
2023-02-15 16:00:47 +08:00
if (this.form.posterPictureUrlLists.length == 1) {
2023-02-15 09:03:08 +08:00
this.$message.error("最后一条不可删除");
} else {
2023-02-22 11:10:40 +08:00
this.form.posterPictureUrlLists = this.form.posterPictureUrlLists.filter(
e => e.id != item.id
);
2023-02-15 09:03:08 +08:00
}
}
},
//新增海报图片列表
addPictureUrl() {
this.idd++;
var obj = {
posterPictureUrl: "",
jumpType: "",
2023-02-22 11:10:40 +08:00
idd: this.idd
2023-02-15 09:03:08 +08:00
};
2023-02-16 11:11:24 +08:00
if (this.form.posterPictureUrlLists.length >= 5) {
this.$message.error("最多新增5条");
} else {
this.form.posterPictureUrlLists.push(obj);
}
2023-02-15 09:03:08 +08:00
},
//打开遮罩层
clicknurseItemshow() {
this.nurseItemshow = true;
this.nurseItemlistcancel();
},
//关闭遮罩层
cancelnurseItemshow() {
this.nurseItemshow = false;
},
//选中护理项目
choicenurseItem(e) {
this.nurseitemid = e.id;
if (this.homenumber) {
this.queryParams.nurseItemName = e.nurseItemName;
this.queryParams.nurseItemId = e.id;
this.form.nurseItemId = e.id;
} else {
this.form.nurseItemId = e.id;
this.form.nurseItemName = e.nurseItemName;
}
this.nurseItemshow = false;
},
//重置
nurseItemlistcancel() {
this.nurseItemquery = {
pageNum: 1,
pageSize: 10,
nurseItemCode: null,
2023-02-22 11:10:40 +08:00
nurseItemName: null
2023-02-15 09:03:08 +08:00
};
this.nurseItemlistInfo();
},
//搜索
nurseItemlistInfo() {
2023-02-22 11:10:40 +08:00
list(this.nurseItemquery).then(res => {
2023-02-15 09:03:08 +08:00
this.nurseItemlist = res.rows;
this.nurseItemtotal = res.total;
});
},
//所属护理站页面
2023-02-13 10:41:29 +08:00
ParamsStation(item) {
this.info();
this.nurseStationshow = true;
this.homenumber = item;
2023-02-15 09:03:08 +08:00
if (this.homenumber) {
this.stationid = this.queryParams.nurseStationId;
} else {
this.stationid = this.form.nurseStationId;
}
2023-02-13 10:41:29 +08:00
},
2023-02-15 09:03:08 +08:00
//所属护理项目页面
ParamsStationxm(item) {
2023-02-16 11:02:11 +08:00
if (this.nurseItemquery.nurseStationId) {
this.nurseItemlistInfo();
this.homenumber = item;
this.nurseItemshow = true;
if (this.homenumber) {
this.nurseitemid = this.queryParams.nurseItemId;
} else {
this.nurseitemid = this.form.nurseItemId;
}
2023-02-15 09:03:08 +08:00
} else {
2023-02-16 11:02:11 +08:00
this.$modal.msgError("请先选择所属护理站");
2023-02-15 09:03:08 +08:00
}
2023-02-13 10:41:29 +08:00
},
//护理站list
info() {
2023-02-22 11:10:40 +08:00
getListByUser(this.getListByUserquery).then(res => {
2023-02-13 10:41:29 +08:00
this.nurseStationlist = res.rows;
this.total4 = res.total;
});
},
2023-02-15 09:03:08 +08:00
//打开护理站列表
nurseStationshowclick() {
this.stationcancel();
this.stationid = this.form.nurseStationId;
this.nurseStationshow = true;
},
//护理站重置
stationcancel() {
this.getListByUserquery = {
pageNum: 1,
2023-02-22 11:10:40 +08:00
pageSize: 10
2023-02-15 09:03:08 +08:00
};
this.info();
},
//护理站页面 =》选择护理站
choicestationid(item) {
if (this.homenumber) {
this.queryParams.nurseStationName = item.nurseStationName;
this.queryParams.nurseStationId = item.id;
} else {
this.stationid = item.id;
this.form.nurseStationId = item.id;
this.form.nurseStationName = item.nurseStationName;
}
this.nurseItemquery.nurseStationId = item.id;
this.nurseStationshow = false;
this.stationcancel();
2023-02-13 10:41:29 +08:00
},
2023-02-15 09:03:08 +08:00
//关闭护理站页面
clicknurseStationshow() {
this.nurseStationshow = false;
},
imgss(item) {
this.imgs.pictureUrlList.push(item);
},
//图片传值过来接收
2023-02-13 10:41:29 +08:00
imgUrl(imgUrl) {
2023-02-22 11:10:40 +08:00
let imgUrlData = JSON.parse(imgUrl);
2023-02-21 19:22:18 +08:00
// 存贮新上传的图片数组
2023-02-22 11:10:40 +08:00
this.deletNewImgs.push(imgUrlData.posterPictureUrl);
this.objitem.push(imgUrlData.posterPictureUrl);
2023-02-15 09:03:08 +08:00
},
imgUrl2(imgUrl) {
this.videoForm.showVideoPath = baseurl + imgUrl;
2023-02-15 16:00:47 +08:00
this.form.posterVideoUrl = imgUrl;
2023-02-13 10:41:29 +08:00
},
/** 查询泉医到家系统海报模块信息(包含咨询简介信息)列表 */
getList() {
this.loading = true;
2023-02-22 11:10:40 +08:00
listPoser(this.queryParams).then(response => {
2023-02-13 10:41:29 +08:00
this.poserList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
var obj = { pictureUrlList: [] };
2023-02-22 11:10:40 +08:00
if (this.form.posterPictureUrlLists) {
this.form.posterPictureUrlLists.forEach(e => {
obj.pictureUrlList.push(e.posterPictureUrl);
});
}
if (obj.pictureUrlList.length > 0) {
updatePicture({ pictureUrlList: this.deletNewImgs }).then(res => {
2023-02-21 19:22:18 +08:00
this.open = false;
});
2023-02-22 11:10:40 +08:00
}
2023-02-16 11:02:11 +08:00
this.nurseItemquery.nurseStationId = null;
2023-02-15 09:03:08 +08:00
this.imgs = { pictureUrlList: [] };
2023-02-13 10:41:29 +08:00
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
2023-02-15 16:00:47 +08:00
posterPictureUrlLists: [
2023-02-15 09:03:08 +08:00
{
posterPictureUrl: "",
jumpType: "",
2023-02-22 11:10:40 +08:00
idd: this.idd
}
2023-02-15 09:03:08 +08:00
],
2023-02-13 10:41:29 +08:00
id: null,
poserName: null,
posterPictureUrl: null,
posterVideoUrl: null,
2023-02-15 16:00:47 +08:00
posterVideoUrl2: null,
2023-02-13 10:41:29 +08:00
poserSort: null,
2023-02-15 09:03:08 +08:00
nurseStationName: "请选择所属护理站",
nurseStationId: null,
nurseItemName: "请选择所属护理项目",
2023-02-22 11:10:40 +08:00
nurseItemId: null
2023-02-13 10:41:29 +08:00
};
2023-02-22 11:10:40 +08:00
this.deletNewImgs = [];
2023-02-13 10:41:29 +08:00
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
2023-02-15 09:03:08 +08:00
this.nurseItemquery = {
pageNum: 1,
2023-02-22 11:10:40 +08:00
pageSize: 10
2023-02-15 09:03:08 +08:00
};
this.stationid = "";
this.nurseitemid = "";
this.queryParams = {
pageNum: 1,
2023-02-22 11:10:40 +08:00
pageSize: 10
2023-02-15 09:03:08 +08:00
};
2023-02-13 10:41:29 +08:00
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
2023-02-22 11:10:40 +08:00
this.ids = selection.map(item => item.nurseStationId);
this.itemids = selection.map(item => item.nurseItemId);
this.Types = selection.map(item => item.moduleType);
2023-02-13 10:41:29 +08:00
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
2023-02-20 16:12:05 +08:00
this.isEditFlag = false;
2023-02-13 10:41:29 +08:00
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
2023-02-16 11:02:11 +08:00
const id = row.nurseStationId || this.ids;
2023-02-16 15:27:26 +08:00
const itemid = row.nurseItemId || this.itemids;
2023-02-16 11:02:11 +08:00
const type = row.moduleType || this.Types;
2023-02-22 11:10:40 +08:00
getPoser(type, id, itemid).then(response => {
2023-02-13 10:41:29 +08:00
this.form = response.data;
if (response.data.goodAttributeDetailsLists) {
this.goodDetailsLists = response.data.goodAttributeDetailsLists;
}
2023-02-16 11:02:11 +08:00
this.nurseItemquery.nurseStationId = response.data.nurseStationId;
2023-02-13 10:41:29 +08:00
this.open = true;
2023-02-20 16:12:05 +08:00
this.isEditFlag = true;
2023-02-13 10:41:29 +08:00
});
},
/** 提交按钮 */
submitForm() {
2023-02-22 11:10:40 +08:00
this.$refs["form"].validate(valid => {
2023-02-13 10:41:29 +08:00
if (valid) {
if (this.form.id != null) {
2023-02-22 11:10:40 +08:00
updatePoser(this.form).then(response => {
// var obj = { pictureUrlList: [] };
// if (this.form.posterPictureUrlLists) {
// this.form.posterPictureUrlLists.forEach((e) => {
// obj.pictureUrlList.push(e.posterPictureUrl);
// });
// }
// updatePicture({pictureUrlList:this.deletNewImgs}).then((res) => {
// this.open = false;
// });
2023-02-13 10:41:29 +08:00
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
2023-02-22 11:10:40 +08:00
addPoser(this.form).then(response => {
2023-02-13 10:41:29 +08:00
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
2023-02-20 16:12:05 +08:00
const ids = row.id || this.ids;
2023-02-20 11:10:42 +08:00
const nurseStationIds = row.nurseStationId || this.nurseStationIds;
2023-02-20 16:12:05 +08:00
const moduleTypes = row.moduleType || this.moduleTypes;
const nurseItemIds = row.nurseItemId || this.nurseItemIds;
2023-02-13 10:41:29 +08:00
this.$modal
2023-02-22 11:10:40 +08:00
.confirm("是否确认删除?")
.then(function() {
2023-02-20 16:12:05 +08:00
return delPoser(nurseStationIds, moduleTypes, nurseItemIds);
2023-02-13 10:41:29 +08:00
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download(
"system/poser/export",
{
2023-02-22 11:10:40 +08:00
...this.queryParams
2023-02-13 10:41:29 +08:00
},
`poser_${new Date().getTime()}.xlsx`
);
2023-02-22 11:10:40 +08:00
}
}
2023-02-13 10:41:29 +08:00
};
</script>
2023-02-22 11:10:40 +08:00
<style lang="scss" scoped>
2023-02-15 09:03:08 +08:00
.avatar-uploader-icon {
border: 1px dashed #d9d9d9 !important;
}
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9 !important;
border-radius: 6px !important;
position: relative !important;
overflow: hidden !important;
}
.avatar-uploader .el-upload:hover {
border: 1px dashed #d9d9d9 !important;
border-color: #409eff;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 208px;
height: 178px;
line-height: 178px;
text-align: center;
}
.avatar {
width: 208px;
height: 178px;
display: block;
}
2023-02-13 10:41:29 +08:00
.stationbtn {
width: 208px;
text-align: left;
height: 32px;
overflow: hidden;
font-size: 14px;
2023-02-15 09:03:08 +08:00
}
2023-02-17 14:09:17 +08:00
</style>