This commit is contained in:
曹辉 2023-02-21 16:42:57 +08:00
parent 575076f798
commit 16dbca114c
3 changed files with 389 additions and 774 deletions

View File

@ -8,22 +8,18 @@
v-show="showSearch" v-show="showSearch"
label-width="110px" label-width="110px"
> >
<el-form-item <el-form-item label="护理站名称" prop="nurseStationId">
label="护理站名称"
prop="nurseStationId"
label-width="100px"
>
<el-select <el-select
v-model="queryParams.nurseStationId" v-model="queryParams.nurseStationId"
placeholder="请选择护理站" placeholder="请选择护理站"
@change="nurseStationidchange"
> >
<el-option <el-option
v-for="item in nurseStationlist" v-for="item in nurseStationlist"
:key="item.id" :key="item.id"
:label="item.nurseStationName" :label="item.nurseStationName"
:value="item.id" :value="item.id"
> ></el-option>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item label="护理站名称" prop="nurseStationId"> <!-- <el-form-item label="护理站名称" prop="nurseStationId">
@ -31,10 +27,12 @@
queryParams.nurseStationName queryParams.nurseStationName
}}</el-button> }}</el-button>
</el-form-item>--> </el-form-item>-->
<el-form-item label="护理项目" prop="nurseItemId" label-width="100px"> <el-form-item label="护理项目" prop="nurseItemId">
<el-button type="" class="stationbtn" @click="ParamsStationitem(true)">{{ <el-button
queryParams.nurseItemName type
}}</el-button> class="stationbtn"
@click="ParamsStationitem(true)"
>{{ queryParams.nurseItemName }}</el-button>
</el-form-item> </el-form-item>
<el-form-item label="海报名称" prop="poserName"> <el-form-item label="海报名称" prop="poserName">
<el-input <el-input
@ -56,8 +54,7 @@
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
> ></el-option>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="海报编号" prop="poserCode"> <el-form-item label="海报编号" prop="poserCode">
@ -69,16 +66,8 @@
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
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-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
@ -90,8 +79,7 @@
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['system:poser:add']" v-hasPermi="['system:poser:add']"
>新增</el-button >新增</el-button>
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -102,8 +90,7 @@
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['system:poser:edit']" v-hasPermi="['system:poser:edit']"
>修改</el-button >修改</el-button>
>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -114,8 +101,7 @@
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['system:poser:remove']" v-hasPermi="['system:poser:remove']"
>删除</el-button >删除</el-button>
>
</el-col> </el-col>
<!-- <el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
@ -128,27 +114,12 @@
>导出</el-button >导出</el-button
> >
</el-col>--> </el-col>-->
<right-toolbar <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<el-table <el-table v-loading="loading" :data="poserList" @selection-change="handleSelectionChange">
v-loading="loading"
:data="poserList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column <el-table-column label="所属护理站" align="center" prop="nurseStationName" />
label="所属护理站" <el-table-column label="所属护理项目" align="center" prop="nurseItemName" />
align="center"
prop="nurseStationName"
/>
<el-table-column
label="所属护理项目"
align="center"
prop="nurseItemName"
/>
<el-table-column label="海报名称" align="center" prop="poserName" /> <el-table-column label="海报名称" align="center" prop="poserName" />
<el-table-column label="海报编号" align="center" prop="poserCode" /> <el-table-column label="海报编号" align="center" prop="poserCode" />
<el-table-column label="海报所属模块" align="center" prop="moduleType"> <el-table-column label="海报所属模块" align="center" prop="moduleType">
@ -173,11 +144,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="海报显示顺序" align="center" prop="poserSort" /> <el-table-column label="海报显示顺序" align="center" prop="poserSort" />
<el-table-column <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -185,16 +152,14 @@
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:poser:edit']" v-hasPermi="['system:poser:edit']"
>修改</el-button >修改</el-button>
>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:poser:remove']" v-hasPermi="['system:poser:remove']"
>删除</el-button >删除</el-button>
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -213,21 +178,10 @@
:before-close="cancel" :before-close="cancel"
append-to-body append-to-body
> >
<el-form <el-form ref="form" :model="form" :rules="rules" label-width="110px" :inline="true">
ref="form"
:model="form"
:rules="rules"
label-width="110px"
:inline="true"
>
<el-form-item label="海报名称" prop="poserName"> <el-form-item label="海报名称" prop="poserName">
<el-input <el-input v-model="form.poserName" placeholder="请输入海报名称" maxlength="50" />
v-model="form.poserName"
placeholder="请输入海报名称"
maxlength="50"
/>
</el-form-item> </el-form-item>
<el-form-item label="海报所属模块" prop="moduleType"> <el-form-item label="海报所属模块" prop="moduleType">
<el-select <el-select
v-model="form.moduleType" v-model="form.moduleType"
@ -240,8 +194,7 @@
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
> ></el-option>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="海报显示顺序" prop="poserSort"> <el-form-item label="海报显示顺序" prop="poserSort">
@ -249,7 +202,7 @@
v-model="form.poserSort" v-model="form.poserSort"
placeholder="请输入海报显示顺序" placeholder="请输入海报显示顺序"
oninput="value=value.replace(/[^\d]/g,'')" oninput="value=value.replace(/[^\d]/g,'')"
maxLength="5" maxlength="5"
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -262,7 +215,7 @@
> >
<template> <template>
<el-button <el-button
type="" type
@click="ParamsStation(false)" @click="ParamsStation(false)"
:disabled="isEditFlag" :disabled="isEditFlag"
style=" style="
@ -275,10 +228,9 @@
color: #c0c4cc; color: #c0c4cc;
" "
v-if="form.nurseStationName == '请选择所属护理站'" v-if="form.nurseStationName == '请选择所属护理站'"
>{{ form.nurseStationName }}</el-button >{{ form.nurseStationName }}</el-button>
>
<el-button <el-button
type="" type
style=" style="
width: 208px; width: 208px;
text-align: left; text-align: left;
@ -290,8 +242,7 @@
@click="ParamsStation(false)" @click="ParamsStation(false)"
:disabled="isEditFlag" :disabled="isEditFlag"
v-else v-else
>{{ form.nurseStationName }}</el-button >{{ form.nurseStationName }}</el-button>
>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -302,7 +253,7 @@
<template> <template>
<el-button <el-button
:disabled="isEditFlag" :disabled="isEditFlag"
type="" type
style=" style="
width: 208px; width: 208px;
text-align: left; text-align: left;
@ -314,11 +265,10 @@
" "
@click="ParamsStationxm(false)" @click="ParamsStationxm(false)"
v-if="form.nurseItemName == '请选择所属护理项目'" v-if="form.nurseItemName == '请选择所属护理项目'"
>{{ form.nurseItemName }}</el-button >{{ form.nurseItemName }}</el-button>
>
<el-button <el-button
:disabled="isEditFlag" :disabled="isEditFlag"
type="" type
style=" style="
width: 208px; width: 208px;
text-align: left; text-align: left;
@ -329,17 +279,12 @@
" "
@click="ParamsStationxm(false)" @click="ParamsStationxm(false)"
v-else v-else
>{{ form.nurseItemName }}</el-button >{{ form.nurseItemName }}</el-button>
> </template>
</template></el-form-item </el-form-item>
>
<el-form-item label="海报图片" prop="posterPictureUrl"> <el-form-item label="海报图片" :required="true">
<el-table <el-table label-width="50px" style="margin-top: 20px" :data="form.posterPictureUrlLists">
label-width="50px"
style="margin-top: 20px"
:data="form.posterPictureUrlLists"
>
<el-table-column label="图片" align="center" width="300"> <el-table-column label="图片" align="center" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<stationAcatar <stationAcatar
@ -352,32 +297,20 @@
</el-table-column> </el-table-column>
<el-table-column label="图片跳转标识" align="center" width="300"> <el-table-column label="图片跳转标识" align="center" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select <el-select v-model="scope.row.jumpType" placeholder="请选择" style="width: 208px">
v-model="scope.row.jumpType"
placeholder="请选择"
style="width: 208px"
>
<el-option <el-option
v-for="item in jumpTypes" v-for="item in jumpTypes"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
> ></el-option>
</el-option>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="250"> <el-table-column label="操作" align="center" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" @click="addPictureUrl" <el-button size="mini" type="text" @click="addPictureUrl">新增</el-button>
>新增</el-button <el-button size="mini" type="text" @click="delPictureUrl(scope.row)">删除</el-button>
>
<el-button
size="mini"
type="text"
@click="delPictureUrl(scope.row)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -389,8 +322,7 @@
style="width: 540px" style="width: 540px"
placeholder="请输入海报简介" placeholder="请输入海报简介"
v-model="form.posterIntroduce" v-model="form.posterIntroduce"
> ></el-input>
</el-input>
</el-form-item> </el-form-item>
<el-form-item label="海报视频"> <el-form-item label="海报视频">
<!-- <video <!-- <video
@ -423,42 +355,19 @@
append-to-body append-to-body
:before-close="clicknurseStationshow" :before-close="clicknurseStationshow"
> >
<el-form <el-form ref="form" :model="getListByUserquery" label-width="110px" :inline="true">
ref="form"
:model="getListByUserquery"
label-width="110px"
:inline="true"
>
<el-form-item label="护理站编码" prop="nurseStationCode"> <el-form-item label="护理站编码" prop="nurseStationCode">
<el-input <el-input v-model="getListByUserquery.nurseStationCode" placeholder="请输入护理站编码" />
v-model="getListByUserquery.nurseStationCode"
placeholder="请输入护理站编码"
/>
</el-form-item> </el-form-item>
<el-form-item label="护理站名称" prop="nurseStationName"> <el-form-item label="护理站名称" prop="nurseStationName">
<el-input <el-input v-model="getListByUserquery.nurseStationName" placeholder="请输入护理站名称" />
v-model="getListByUserquery.nurseStationName"
placeholder="请输入护理站名称"
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="info">搜索</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="stationcancel">重置</el-button>
icon="el-icon-search"
size="mini"
@click="info"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="stationcancel"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table v-loading="loading" :data="nurseStationlist" @cell-dblclick="choicestationid">
v-loading="loading"
:data="nurseStationlist"
@cell-dblclick="choicestationid"
>
<el-table-column label="请选择" width="70" align="center"> <el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -474,31 +383,18 @@
circle circle
v-else v-else
@click="choicestationid(scope.row)" @click="choicestationid(scope.row)"
> ></el-button>
</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column property="nurseStationCode" label="护理站编码" align="center"></el-table-column>
property="nurseStationCode" <el-table-column property="nurseStationName" label="护理站名称" align="center"></el-table-column>
label="护理站编码" <el-table-column property="phone" label="联系电话" align="center"></el-table-column>
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>
<el-table-column <el-table-column
property="address" property="address"
label="护理站地址" label="护理站地址"
align="center" align="center"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> ></el-table-column>
</el-table-column>
</el-table> </el-table>
<pagination <pagination
@ -519,38 +415,17 @@
> >
<el-form :model="nurseItemquery" label-width="150px" :inline="true"> <el-form :model="nurseItemquery" label-width="150px" :inline="true">
<el-form-item label="护理项目编码" prop="nurseItemCode"> <el-form-item label="护理项目编码" prop="nurseItemCode">
<el-input <el-input v-model="nurseItemquery.nurseItemCode" placeholder="请输入护理项目编码" />
v-model="nurseItemquery.nurseItemCode"
placeholder="请输入护理项目编码"
/>
</el-form-item> </el-form-item>
<el-form-item label="护理项目名称" prop="nurseItemName"> <el-form-item label="护理项目名称" prop="nurseItemName">
<el-input <el-input v-model="nurseItemquery.nurseItemName" placeholder="请输入护理项目名称" />
v-model="nurseItemquery.nurseItemName"
placeholder="请输入护理项目名称"
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="nurseItemlistInfo">搜索</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="nurseItemlistcancel">重置</el-button>
icon="el-icon-search"
size="mini"
@click="nurseItemlistInfo"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="nurseItemlistcancel"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table v-loading="loading" :data="nurseItemlist" @cell-dblclick="choicenurseItem">
v-loading="loading"
:data="nurseItemlist"
@cell-dblclick="choicenurseItem"
>
<el-table-column label="请选择" width="70" align="center"> <el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -566,31 +441,14 @@
circle circle
v-else v-else
@click="choicenurseItem(scope.row)" @click="choicenurseItem(scope.row)"
> ></el-button>
</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="所属护理站" align="center" prop="nurseStationName" />
label="所属护理站"
align="center"
prop="nurseStationName"
/>
<!-- <el-table-column label="护理类型" align="center" prop="nurseTypeName" /> --> <!-- <el-table-column label="护理类型" align="center" prop="nurseTypeName" /> -->
<el-table-column <el-table-column label="护理项目编号" align="center" prop="nurseItemCode" />
label="护理项目编号" <el-table-column label="护理项目名称" align="center" prop="nurseItemName" />
align="center" <el-table-column label="护理项目分类名称" align="center" prop="nurseItemName" />
prop="nurseItemCode"
/>
<el-table-column
label="护理项目名称"
align="center"
prop="nurseItemName"
/>
<el-table-column
label="护理项目分类名称"
align="center"
prop="nurseItemName"
/>
<el-table-column label="创建时间" align="center" prop="createTime" /> <el-table-column label="创建时间" align="center" prop="createTime" />
<el-table-column label="创建人" align="center" prop="createBy" /> <el-table-column label="创建人" align="center" prop="createBy" />
</el-table> </el-table>
@ -615,13 +473,11 @@ import {
getListByUser, getListByUser,
getListBy, getListBy,
updatePoser, updatePoser,
updatePicture, updatePicture
} from "@/api/system/poser"; } from "@/api/system/poser";
import { list } from "@/api/system/nurseItem"; import { list } from "@/api/system/nurseItem";
// import { getListByUser } from "@/api/system/userlist.js";
import stationAcatar from "../stationAvatar/index.vue"; import stationAcatar from "../stationAvatar/index.vue";
import editor from "@/components/Editor"; import editor from "@/components/Editor";
export default { export default {
name: "Poser", name: "Poser",
components: { stationAcatar, editor }, components: { stationAcatar, editor },
@ -631,7 +487,7 @@ export default {
loading: true, loading: true,
getListByUserquery: { getListByUserquery: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10
}, },
nurseStationlist: [], nurseStationlist: [],
nurseStationshow: false, nurseStationshow: false,
@ -639,11 +495,12 @@ export default {
// //
ids: [], ids: [],
nurseItemIds: [], nurseItemIds: [],
//
nurseItemnuser: null,
moduleTypes: [], moduleTypes: [],
itemids: [], itemids: [],
Types: [], Types: [],
idd: 9999999, idd: 9999999,
handstationlist: [],
// //
single: true, single: true,
// //
@ -668,7 +525,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
nurseItemCode: null, nurseItemCode: null,
nurseItemName: null, nurseItemName: null
}, },
// //
queryParams: { queryParams: {
@ -685,7 +542,7 @@ export default {
moduleType: null, moduleType: null,
poserSort: null, poserSort: null,
jumpLink: null, jumpLink: null,
jumpType: null, jumpType: null
}, },
// //
form: { form: {
@ -699,42 +556,42 @@ export default {
nurseStationId: "", nurseStationId: "",
nurseStationName: "请选择所属护理站", nurseStationName: "请选择所属护理站",
nurseItemName: "请选择所属护理项目", nurseItemName: "请选择所属护理项目",
nurseItemId: "", nurseItemId: ""
}, },
// //
rules: { rules: {
moduleType: [ moduleType: [
{ required: true, message: "请选择海报所属模块", trigger: "blur" }, { required: true, message: "请选择海报所属模块", trigger: "blur" }
], ],
poserName: [ poserName: [
{ required: true, message: "请输入海报名称", trigger: "blur" }, { required: true, message: "请输入海报名称", trigger: "blur" }
], ],
nurseStationId: [ nurseStationId: [
{ required: true, message: "请选择所属护理站", trigger: "blur" }, { required: true, message: "请选择所属护理站", trigger: "blur" }
], ],
posterIntroduce: [ posterIntroduce: [
{ required: true, message: "请输入海报简介", trigger: "blur" }, { required: true, message: "请输入海报简介", trigger: "blur" }
], ],
posterVideoUrl: [ posterVideoUrl: [
{ required: true, message: "请选择海报视频", trigger: "blur" }, { required: true, message: "请选择海报视频", trigger: "blur" }
], ],
poserSort: [ poserSort: [
{ required: true, message: "请输入海报顺序", trigger: "blur" }, { required: true, message: "请输入海报顺序", trigger: "blur" }
], ],
nurseItemId: [ nurseItemId: [
{ required: true, message: "请选择所属护理项目", trigger: "blur" }, { required: true, message: "请选择所属护理项目", trigger: "blur" }
], ]
}, },
options: [ options: [
{ {
value: "NURSE_AGENCY_MODULE", value: "NURSE_AGENCY_MODULE",
label: "护理机构模块", label: "护理机构模块"
}, },
{ {
value: "NURSE_ITEM_MODULE", value: "NURSE_ITEM_MODULE",
label: "护理项目模块", label: "护理项目模块"
}, }
// { // {
// value: "HEALTH_CONSUTION_MODULE", // value: "HEALTH_CONSUTION_MODULE",
// label: "", // label: "",
@ -751,16 +608,16 @@ export default {
jumpTypes: [ jumpTypes: [
{ {
value: "NEW_PEOPLE_WELFARE", value: "NEW_PEOPLE_WELFARE",
label: "新人福利", label: "新人福利"
}, },
{ {
value: "HOME_PAGE", value: "HOME_PAGE",
label: "首页", label: "首页"
}, },
{ {
value: "SHOPPING", value: "SHOPPING",
label: "商城", label: "商城"
}, }
], ],
// //
stationid: "", stationid: "",
@ -774,39 +631,20 @@ export default {
isShowUploadVideo: false, isShowUploadVideo: false,
// //
videoForm: { videoForm: {
showVideoPath: "", // showVideoPath: "" //
}, }
}; };
}, },
created() { created() {
this.videourl = baseurl + "/system/station/updateNurseStationHeads"; this.videourl = baseurl + "/system/station/updateNurseStationHeads";
this.getList();
this.info(); this.info();
this.nurseItemlistInfo();
// this.infos();
}, },
methods: { methods: {
// infos() { nurseStationidchange(e) {
// var queryFor = { this.nurseItemquery.nurseStationId = e;
// pageNum: 1, this.queryParams.nurseItemName = "";
// pageSize: 9999, this.nurseitemid = "";
// }; },
// getListByUser(queryFor).then((res) => {
// this.handstationlist = res.rows;
// this.queryParams.nurseStationId = res.rows[0].id;
// this.getListlb();
// });
// },
// /** */
// getListlb() {
// this.loading = true;
// list(this.queryParams).then((response) => {
// this.nurseItemList = response.rows;
// this.total = response.total;
// this.loading = false;
// });
// },
// //
delPictureUrl(item) { delPictureUrl(item) {
console.log(item); console.log(item);
@ -814,15 +652,17 @@ export default {
if (this.form.posterPictureUrlLists.length == 1) { if (this.form.posterPictureUrlLists.length == 1) {
this.$message.error("最后一条不可删除"); this.$message.error("最后一条不可删除");
} else { } else {
this.form.posterPictureUrlLists = this.form.posterPictureUrlLists = this.form.posterPictureUrlLists.filter(
this.form.posterPictureUrlLists.filter((e) => e.idd != item.idd); e => e.idd != item.idd
);
} }
} else if (!item.idd && item.id) { } else if (!item.idd && item.id) {
if (this.form.posterPictureUrlLists.length == 1) { if (this.form.posterPictureUrlLists.length == 1) {
this.$message.error("最后一条不可删除"); this.$message.error("最后一条不可删除");
} else { } else {
this.form.posterPictureUrlLists = this.form.posterPictureUrlLists = this.form.posterPictureUrlLists.filter(
this.form.posterPictureUrlLists.filter((e) => e.id != item.id); e => e.id != item.id
);
} }
} }
}, },
@ -832,7 +672,7 @@ export default {
var obj = { var obj = {
posterPictureUrl: "", posterPictureUrl: "",
jumpType: "", jumpType: "",
idd: this.idd, idd: this.idd
}; };
if (this.form.posterPictureUrlLists.length >= 5) { if (this.form.posterPictureUrlLists.length >= 5) {
this.$message.error("最多新增5条"); this.$message.error("最多新增5条");
@ -864,25 +704,23 @@ export default {
}, },
// //
nurseItemlistcancel() { nurseItemlistcancel() {
this.nurseItemquery = { this.nurseItemquery.pageNum = 1;
pageNum: 1, this.nurseItemquery.nurseItemCode = null;
pageSize: 10, this.nurseItemquery.pageSize = 10;
nurseItemCode: null, this.nurseItemquery.pageNum = 1;
nurseItemName: null, this.nurseItemName = null;
};
this.nurseItemlistInfo(); this.nurseItemlistInfo();
}, },
// //
nurseItemlistInfo() { nurseItemlistInfo() {
list(this.nurseItemquery).then((res) => { list(this.nurseItemquery).then(res => {
this.nurseItemlist = res.rows; this.nurseItemlist = res.rows;
this.nurseItemtotal = res.total; this.nurseItemtotal = res.total;
this.getList();
}); });
}, },
// //
ParamsStation(item) { ParamsStation(item) {
this.info(); this.getlistinfo();
this.nurseStationshow = true; this.nurseStationshow = true;
this.homenumber = item; this.homenumber = item;
if (this.homenumber) { if (this.homenumber) {
@ -893,6 +731,7 @@ export default {
}, },
// //
ParamsStationxm(item) { ParamsStationxm(item) {
this.nurseItemquery.nurseStationId = this.nurseItemnuser;
if (this.nurseItemquery.nurseStationId) { if (this.nurseItemquery.nurseStationId) {
this.nurseItemlistInfo(); this.nurseItemlistInfo();
this.homenumber = item; this.homenumber = item;
@ -902,48 +741,44 @@ export default {
} else { } else {
this.nurseitemid = this.form.nurseItemId; this.nurseitemid = this.form.nurseItemId;
} }
} } else {
else {
this.$modal.msgError("请先选择所属护理站"); this.$modal.msgError("请先选择所属护理站");
} }
}, },
ParamsStationitem(item) { ParamsStationitem(item) {
console.log(item) this.nurseItemquery.nurseStationId = this.queryParams.nurseStationId;
// if (this.queryParams.nurseStationId) {
this.nurseItemlistInfo(); this.nurseItemlistInfo();
this.homenumber = item; this.homenumber = item;
this.nurseItemshow = true; this.nurseItemshow = true;
// if (this.homenumber) {
this.nurseitemid = this.queryParams.nurseItemId; this.nurseitemid = this.queryParams.nurseItemId;
// }
// else {
// this.$modal.msgError("");
// }
}, },
//list //list
info() { getlistinfo() {
getListBy(this.queryParams).then((res) => { getListBy(this.queryParams).then(res => {
this.nurseStationlist = res.rows; this.nurseStationlist = res.rows;
console.log(this.nurseStationlist)
// this.total4 = res.total;
this.queryParams.nurseStationId = res.rows[0].id;
// this.getList();
}); });
}, },
info() {
getListBy(this.queryParams).then(res => {
this.nurseStationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
this.nurseItemquery.nurseStationId = JSON.parse(
JSON.stringify(res.rows[0].id)
);
});
this.getList();
},
// //
nurseStationshowclick() { nurseStationshowclick() {
this.stationcancel(); this.stationcancel();
this.stationid = this.form.nurseStationId; this.stationid = this.form.nurseStationId;
this.nurseStationshow = true; this.nurseStationshow = true;
}, },
// //
stationcancel() { stationcancel() {
this.getListByUserquery = { this.getListByUserquery = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10
}; };
this.info(); this.info();
}, },
@ -957,9 +792,12 @@ export default {
this.form.nurseStationId = item.id; this.form.nurseStationId = item.id;
this.form.nurseStationName = item.nurseStationName; this.form.nurseStationName = item.nurseStationName;
} }
this.nurseItemquery.nurseStationId = item.id; this.form.nurseItemName = null;
this.form.nurseItemId = null;
this.nurseitemid = null
this.nurseStationshow = false; this.nurseStationshow = false;
this.stationcancel(); this.nurseItemnuser = item.id;
this.nurseItemquery.nurseStationId = item.id;
}, },
// //
clicknurseStationshow() { clicknurseStationshow() {
@ -979,7 +817,7 @@ export default {
/** 查询泉医到家系统海报模块信息(包含咨询简介信息)列表 */ /** 查询泉医到家系统海报模块信息(包含咨询简介信息)列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listPoser(this.queryParams).then((response) => { listPoser(this.queryParams).then(response => {
this.poserList = response.rows; this.poserList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -989,11 +827,12 @@ export default {
cancel() { cancel() {
var obj = { pictureUrlList: [] }; var obj = { pictureUrlList: [] };
if (obj.pictureUrlList.length > 0) { if (obj.pictureUrlList.length > 0) {
updatePicture(obj).then((res) => {}); updatePicture(obj).then(res => {});
} }
if (this.imgs.pictureUrlList.length > 0) { if (this.imgs.pictureUrlList.length > 0) {
updatePicture(this.imgs).then((res) => {}); updatePicture(this.imgs).then(res => {});
} }
this.nurseItemnuser = null;
this.nurseItemquery.nurseStationId = null; this.nurseItemquery.nurseStationId = null;
this.imgs = { pictureUrlList: [] }; this.imgs = { pictureUrlList: [] };
this.open = false; this.open = false;
@ -1006,8 +845,8 @@ export default {
{ {
posterPictureUrl: "", posterPictureUrl: "",
jumpType: "", jumpType: "",
idd: this.idd, idd: this.idd
}, }
], ],
id: null, id: null,
poserName: null, poserName: null,
@ -1018,7 +857,7 @@ export default {
nurseStationName: "请选择所属护理站", nurseStationName: "请选择所属护理站",
nurseStationId: null, nurseStationId: null,
nurseItemName: "请选择所属护理项目", nurseItemName: "请选择所属护理项目",
nurseItemId: null, nurseItemId: null
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -1028,24 +867,24 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.nurseItemquery = { this.nurseItemquery.pageNum = 1;
pageNum: 1, this.nurseItemquery.pageSize = 10;
pageSize: 10,
};
// this.stationid = ""; // this.stationid = "";
this.nurseitemid = ""; this.nurseitemid = "";
this.queryParams = { this.queryParams.pageNum = 1;
pageNum: 1, this.queryParams.pageSize = 10;
pageSize: 10, this.queryParams.nurseItemId = "";
}; this.queryParams.nurseItemName = "";
this.resetForm("queryForm"); this.queryParams.poserName = "";
this.queryParams.moduleType = "";
this.queryParams.poserCode = "";
this.handleQuery(); this.handleQuery();
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map((item) => item.nurseStationId); this.ids = selection.map(item => item.nurseStationId);
this.itemids = selection.map((item) => item.nurseItemId); this.itemids = selection.map(item => item.nurseItemId);
this.Types = selection.map((item) => item.moduleType); this.Types = selection.map(item => item.moduleType);
this.single = selection.length !== 1; this.single = selection.length !== 1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
@ -1061,7 +900,7 @@ export default {
const id = row.nurseStationId || this.ids; const id = row.nurseStationId || this.ids;
const itemid = row.nurseItemId || this.itemids; const itemid = row.nurseItemId || this.itemids;
const type = row.moduleType || this.Types; const type = row.moduleType || this.Types;
getPoser(type, id, itemid).then((response) => { getPoser(type, id, itemid).then(response => {
this.form = response.data; this.form = response.data;
if (response.data.goodAttributeDetailsLists) { if (response.data.goodAttributeDetailsLists) {
this.goodDetailsLists = response.data.goodAttributeDetailsLists; this.goodDetailsLists = response.data.goodAttributeDetailsLists;
@ -1073,10 +912,10 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
updatePoser(this.form).then((response) => { updatePoser(this.form).then(response => {
var obj = { pictureUrlList: [] }; var obj = { pictureUrlList: [] };
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
@ -1086,7 +925,7 @@ export default {
if (this.form.poserSort) { if (this.form.poserSort) {
this.form.poserSort = parseInt(this.form.poserSort); this.form.poserSort = parseInt(this.form.poserSort);
} }
addPoser(this.form).then((response) => { addPoser(this.form).then(response => {
if (this.form.poserSort) { if (this.form.poserSort) {
this.form.poserSort = parseInt(this.form.poserSort); this.form.poserSort = parseInt(this.form.poserSort);
} }
@ -1100,7 +939,6 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
console.log(row);
const ids = row.id || this.ids; const ids = row.id || this.ids;
const nurseStationIds = row.nurseStationId || this.nurseStationIds; const nurseStationIds = row.nurseStationId || this.nurseStationIds;
const moduleTypes = row.moduleType || this.moduleTypes; const moduleTypes = row.moduleType || this.moduleTypes;
@ -1125,12 +963,12 @@ export default {
this.download( this.download(
"system/poser/export", "system/poser/export",
{ {
...this.queryParams, ...this.queryParams
}, },
`poser_${new Date().getTime()}.xlsx` `poser_${new Date().getTime()}.xlsx`
); );
}, }
}, }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

File diff suppressed because it is too large Load Diff