897 lines
26 KiB
Vue
897 lines
26 KiB
Vue
|
|
<template>
|
|||
|
|
<div class="app-container">
|
|||
|
|
<el-form
|
|||
|
|
:model="queryParams"
|
|||
|
|
ref="queryForm"
|
|||
|
|
size="small"
|
|||
|
|
:inline="true"
|
|||
|
|
v-show="showSearch"
|
|||
|
|
label-width="100px"
|
|||
|
|
>
|
|||
|
|
<!-- <el-form-item label="区域编码" prop="areaCode">
|
|||
|
|
<el-input
|
|||
|
|
v-model="queryParams.areaCode"
|
|||
|
|
placeholder="请输入所属区域编码"
|
|||
|
|
clearable
|
|||
|
|
@keyup.enter.native="handleQuery"
|
|||
|
|
/>
|
|||
|
|
</el-form-item> -->
|
|||
|
|
|
|||
|
|
<el-form-item label="护理站名称" prop="nurseStationName">
|
|||
|
|
<el-input
|
|||
|
|
v-model="queryParams.nurseStationName"
|
|||
|
|
placeholder="请输入护理站名称"
|
|||
|
|
clearable
|
|||
|
|
@keyup.enter.native="handleQuery"
|
|||
|
|
/> </el-form-item
|
|||
|
|
><el-form-item label="护理站编号" prop="nurseStationCode">
|
|||
|
|
<el-input
|
|||
|
|
v-model="queryParams.nurseStationCode"
|
|||
|
|
placeholder="请输入护理站编号"
|
|||
|
|
clearable
|
|||
|
|
@keyup.enter.native="handleQuery"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理站类型" prop="nurseStationName">
|
|||
|
|
<el-select
|
|||
|
|
v-model="queryParams.nurseStationType"
|
|||
|
|
clearable
|
|||
|
|
placeholder="请选择护理类型"
|
|||
|
|
style="width: 208px"
|
|||
|
|
>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in nurseStationTypelist"
|
|||
|
|
:key="item.nurseTypeCode"
|
|||
|
|
:label="item.nurseTypeName"
|
|||
|
|
:value="item.nurseTypeCode"
|
|||
|
|
>
|
|||
|
|
</el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
<!-- <el-form-item label="联系电话" prop="phone">
|
|||
|
|
<el-input
|
|||
|
|
v-model="queryParams.phone"
|
|||
|
|
placeholder="请输入联系电话"
|
|||
|
|
clearable
|
|||
|
|
@keyup.enter.native="handleQuery"
|
|||
|
|
/>
|
|||
|
|
</el-form-item> -->
|
|||
|
|
<!-- <el-form-item label="护理站地址" prop="address">
|
|||
|
|
<el-input
|
|||
|
|
v-model="queryParams.address"
|
|||
|
|
placeholder="请输入护理站地址"
|
|||
|
|
clearable
|
|||
|
|
@keyup.enter.native="handleQuery"
|
|||
|
|
/>
|
|||
|
|
</el-form-item> -->
|
|||
|
|
<!-- <el-form-item label="负责人" prop="dutyPerson">
|
|||
|
|
<el-input
|
|||
|
|
v-model="queryParams.dutyPerson"
|
|||
|
|
placeholder="请输入负责人"
|
|||
|
|
clearable
|
|||
|
|
@keyup.enter.native="handleQuery"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="负责人电话" prop="dutyPhone">
|
|||
|
|
<el-input
|
|||
|
|
v-model="queryParams.dutyPhone"
|
|||
|
|
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="['system:station:add']"
|
|||
|
|
>新增</el-button
|
|||
|
|
>
|
|||
|
|
</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:station:edit']"
|
|||
|
|
>修改</el-button
|
|||
|
|
>
|
|||
|
|
</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:station:remove']"
|
|||
|
|
>删除</el-button
|
|||
|
|
>
|
|||
|
|
</el-col>
|
|||
|
|
<el-col :span="1.5">
|
|||
|
|
<el-button
|
|||
|
|
type="info"
|
|||
|
|
plain
|
|||
|
|
icon="el-icon-upload2"
|
|||
|
|
size="mini"
|
|||
|
|
@click="handledata"
|
|||
|
|
v-hasPermi="['system:station:importData']"
|
|||
|
|
>导入</el-button
|
|||
|
|
>
|
|||
|
|
</el-col>
|
|||
|
|
<!-- <el-col :span="1.5">
|
|||
|
|
<el-button
|
|||
|
|
type="warning"
|
|||
|
|
plain
|
|||
|
|
icon="el-icon-download"
|
|||
|
|
size="mini"
|
|||
|
|
@click="handleExport"
|
|||
|
|
v-hasPermi="['system:station:export']"
|
|||
|
|
>导出</el-button
|
|||
|
|
>
|
|||
|
|
</el-col> -->
|
|||
|
|
<right-toolbar
|
|||
|
|
:showSearch.sync="showSearch"
|
|||
|
|
@queryTable="getList"
|
|||
|
|
></right-toolbar>
|
|||
|
|
</el-row>
|
|||
|
|
|
|||
|
|
<el-table
|
|||
|
|
v-loading="loading"
|
|||
|
|
:data="stationList"
|
|||
|
|
@selection-change="handleSelectionChange"
|
|||
|
|
>
|
|||
|
|
<el-table-column type="selection" width="55" align="center" />
|
|||
|
|
<el-table-column label="所属区域编码" align="center" prop="areaCode" />
|
|||
|
|
<el-table-column
|
|||
|
|
label="护理站编号"
|
|||
|
|
align="center"
|
|||
|
|
prop="nurseStationCode"
|
|||
|
|
/>
|
|||
|
|
<el-table-column
|
|||
|
|
label="护理站名称"
|
|||
|
|
align="center"
|
|||
|
|
prop="nurseStationName"
|
|||
|
|
/>
|
|||
|
|
<el-table-column label="护理类型" align="center" prop="nurseTypeName">
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<div v-for="(item, index) in scope.row.nurseTypeList" :key="index">
|
|||
|
|
<span>
|
|||
|
|
{{ item.nurseTypeName }}
|
|||
|
|
</span>
|
|||
|
|
<span v-if="scope.row.nurseTypeList.length > 1">.</span>
|
|||
|
|
</div>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
<el-table-column
|
|||
|
|
label="护理站简介"
|
|||
|
|
align="center"
|
|||
|
|
prop="agencyIntroduce"
|
|||
|
|
:show-overflow-tooltip="true"
|
|||
|
|
/>
|
|||
|
|
<el-table-column
|
|||
|
|
label="护理站总概述"
|
|||
|
|
align="center"
|
|||
|
|
prop="nurseStationDescription"
|
|||
|
|
:show-overflow-tooltip="true"
|
|||
|
|
/>
|
|||
|
|
<el-table-column label="护理站经度" align="center" prop="longitude" />
|
|||
|
|
<el-table-column label="护理站纬度" align="center" prop="latitude" />
|
|||
|
|
<el-table-column label="联系电话" align="center" prop="phone" />
|
|||
|
|
<el-table-column label="护理站地址" align="center" prop="address" />
|
|||
|
|
<el-table-column label="负责人" align="center" prop="dutyPerson" />
|
|||
|
|
<el-table-column label="负责人电话" align="center" prop="dutyPhone" />
|
|||
|
|
<el-table-column label="排序" align="center" prop="sort" />
|
|||
|
|
<el-table-column
|
|||
|
|
label="操作"
|
|||
|
|
align="center"
|
|||
|
|
class-name="small-padding fixed-width"
|
|||
|
|
>
|
|||
|
|
<template slot-scope="scope">
|
|||
|
|
<el-button
|
|||
|
|
size="mini"
|
|||
|
|
type="text"
|
|||
|
|
icon="el-icon-edit"
|
|||
|
|
@click="handleUpdate(scope.row)"
|
|||
|
|
v-hasPermi="['system:station:edit']"
|
|||
|
|
>修改</el-button
|
|||
|
|
>
|
|||
|
|
<el-button
|
|||
|
|
size="mini"
|
|||
|
|
type="text"
|
|||
|
|
icon="el-icon-delete"
|
|||
|
|
@click="handleDelete(scope.row)"
|
|||
|
|
v-hasPermi="['system:station:remove']"
|
|||
|
|
>删除</el-button
|
|||
|
|
>
|
|||
|
|
</template>
|
|||
|
|
</el-table-column>
|
|||
|
|
</el-table>
|
|||
|
|
|
|||
|
|
<pagination
|
|||
|
|
v-show="total > 0"
|
|||
|
|
:total="total"
|
|||
|
|
:page.sync="queryParams.pageNum"
|
|||
|
|
:limit.sync="queryParams.pageSize"
|
|||
|
|
@pagination="liststationinfo"
|
|||
|
|
/>
|
|||
|
|
|
|||
|
|
<!-- 新增护理站信息对话框 -->
|
|||
|
|
<el-dialog
|
|||
|
|
:title="title"
|
|||
|
|
:visible.sync="open"
|
|||
|
|
width="800px"
|
|||
|
|
append-to-body
|
|||
|
|
:before-close="cancel"
|
|||
|
|
>
|
|||
|
|
<el-form
|
|||
|
|
:inline="true"
|
|||
|
|
ref="form"
|
|||
|
|
:model="form"
|
|||
|
|
:rules="rules"
|
|||
|
|
label-width="120px"
|
|||
|
|
>
|
|||
|
|
<el-form-item label="所属区域" prop="areaCode">
|
|||
|
|
<el-select
|
|||
|
|
v-model="value"
|
|||
|
|
clearable
|
|||
|
|
placeholder="请选择省"
|
|||
|
|
style="width: 127px"
|
|||
|
|
>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in provincelist"
|
|||
|
|
:key="item.areaCode"
|
|||
|
|
:label="item.areaName"
|
|||
|
|
:value="item.areaCode"
|
|||
|
|
@click.native="province(item)"
|
|||
|
|
>
|
|||
|
|
</el-option>
|
|||
|
|
</el-select>
|
|||
|
|
<el-select
|
|||
|
|
v-model="value1"
|
|||
|
|
clearable
|
|||
|
|
placeholder="请选择市"
|
|||
|
|
style="width: 127px; margin-left: 10px"
|
|||
|
|
>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in citylist"
|
|||
|
|
:key="item.areaCode"
|
|||
|
|
:label="item.areaName"
|
|||
|
|
:value="item.areaCode"
|
|||
|
|
@click.native="clickcity(item)"
|
|||
|
|
>
|
|||
|
|
</el-option>
|
|||
|
|
</el-select>
|
|||
|
|
<el-select
|
|||
|
|
v-model="value2"
|
|||
|
|
clearable
|
|||
|
|
placeholder="请选择区"
|
|||
|
|
style="width: 127px; margin-left: 10px"
|
|||
|
|
>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in arealist"
|
|||
|
|
:key="item.areaCode"
|
|||
|
|
:label="item.areaName"
|
|||
|
|
:value="item.areaCode"
|
|||
|
|
@click.native="clickarea(item)"
|
|||
|
|
>
|
|||
|
|
</el-option>
|
|||
|
|
</el-select>
|
|||
|
|
<el-select
|
|||
|
|
v-model="form.areaCode"
|
|||
|
|
clearable
|
|||
|
|
placeholder="请选择街道"
|
|||
|
|
style="width: 127px; margin-left: 10px"
|
|||
|
|
>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in streetlist"
|
|||
|
|
:key="item.areaCode"
|
|||
|
|
:label="item.areaName"
|
|||
|
|
:value="item.areaCode"
|
|||
|
|
@click.native="clickstreet(item)"
|
|||
|
|
>
|
|||
|
|
</el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理站名称" prop="nurseStationName">
|
|||
|
|
<el-input
|
|||
|
|
v-model="form.nurseStationName"
|
|||
|
|
placeholder="请输入护理站名称"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理站地址" prop="address">
|
|||
|
|
<el-input v-model="form.address" placeholder="请输入护理站地址" />
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理站经度" prop="longitude">
|
|||
|
|
<el-input v-model="form.longitude" placeholder="请输入护理站经度" />
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理站纬度" prop="latitude">
|
|||
|
|
<el-input v-model="form.latitude" placeholder="请输入护理站纬度" />
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理类型" prop="nurseStationType">
|
|||
|
|
<el-select
|
|||
|
|
v-model="form.nurseStationType"
|
|||
|
|
multiple
|
|||
|
|
placeholder="请选择护理类型"
|
|||
|
|
style="width: 208px"
|
|||
|
|
>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in nurseStationTypelist"
|
|||
|
|
:key="item.nurseTypeCode"
|
|||
|
|
:label="item.nurseTypeName"
|
|||
|
|
:value="item.nurseTypeCode"
|
|||
|
|
>
|
|||
|
|
</el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="联系电话" prop="phone">
|
|||
|
|
<el-input v-model="form.phone" placeholder="请输入联系电话" />
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="负责人" prop="dutyPerson">
|
|||
|
|
<el-input v-model="form.dutyPerson" placeholder="请输入负责人" />
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="负责人电话" prop="dutyPhone">
|
|||
|
|
<el-input
|
|||
|
|
v-model="form.dutyPhone"
|
|||
|
|
placeholder="请输入负责人联系电话"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="排序" prop="sort">
|
|||
|
|
<el-input v-model="form.sort" placeholder="请输入排序" />
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理站总概述" prop="nurseStationDescription">
|
|||
|
|
<el-input
|
|||
|
|
style="width: 208px"
|
|||
|
|
v-model="form.nurseStationDescription"
|
|||
|
|
placeholder="请输入护理站信息总概述"
|
|||
|
|
type="textarea"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理站简介" prop="agencyIntroduce">
|
|||
|
|
<editor
|
|||
|
|
style="width: 90%; margin: 0 auto"
|
|||
|
|
v-model="form.agencyIntroduce"
|
|||
|
|
></editor>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理站头像" prop="stationPictureUrl">
|
|||
|
|
<stationAcatar
|
|||
|
|
:img="form.stationPictureUrl"
|
|||
|
|
:type="'stationPictureUrl'"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理站简介头像" prop="stationPictureUrl">
|
|||
|
|
<stationAcatar
|
|||
|
|
:img="form.stationPictureUrl"
|
|||
|
|
:type="'stationIntroducePcitureUrl'"
|
|||
|
|
/>
|
|||
|
|
</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="title" :visible.sync="open" width="800px" append-to-body>
|
|||
|
|
<el-form
|
|||
|
|
ref="form"
|
|||
|
|
:model="form"
|
|||
|
|
:rules="rules"
|
|||
|
|
label-width="120px"
|
|||
|
|
:inline="true"
|
|||
|
|
>
|
|||
|
|
<el-form-item label="所属区域" prop="areaCode">
|
|||
|
|
<el-select
|
|||
|
|
v-model="value"
|
|||
|
|
clearable
|
|||
|
|
placeholder="请选择省"
|
|||
|
|
style="width: 127px"
|
|||
|
|
>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in provincelist"
|
|||
|
|
:key="item.areaCode"
|
|||
|
|
:label="item.areaName"
|
|||
|
|
:value="item.areaCode"
|
|||
|
|
@click.native="province(item)"
|
|||
|
|
>
|
|||
|
|
</el-option>
|
|||
|
|
</el-select>
|
|||
|
|
<el-select
|
|||
|
|
v-model="value1"
|
|||
|
|
clearable
|
|||
|
|
placeholder="请选择市"
|
|||
|
|
style="width: 127px; margin-left: 10px"
|
|||
|
|
>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in citylist"
|
|||
|
|
:key="item.areaCode"
|
|||
|
|
:label="item.areaName"
|
|||
|
|
:value="item.areaCode"
|
|||
|
|
@click.native="clickcity(item)"
|
|||
|
|
>
|
|||
|
|
</el-option>
|
|||
|
|
</el-select>
|
|||
|
|
<el-select
|
|||
|
|
v-model="value2"
|
|||
|
|
clearable
|
|||
|
|
placeholder="请选择区"
|
|||
|
|
style="width: 127px; margin-left: 10px"
|
|||
|
|
>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in arealist"
|
|||
|
|
:key="item.areaCode"
|
|||
|
|
:label="item.areaName"
|
|||
|
|
:value="item.areaCode"
|
|||
|
|
@click.native="clickarea(item)"
|
|||
|
|
>
|
|||
|
|
</el-option>
|
|||
|
|
</el-select>
|
|||
|
|
<el-select
|
|||
|
|
v-model="form.areaCode"
|
|||
|
|
clearable
|
|||
|
|
placeholder="请选择街道"
|
|||
|
|
style="width: 127px; margin-left: 10px"
|
|||
|
|
>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in streetlist"
|
|||
|
|
:key="item.areaCode"
|
|||
|
|
:label="item.areaName"
|
|||
|
|
:value="item.areaCode"
|
|||
|
|
@click.native="clickstreet(item)"
|
|||
|
|
>
|
|||
|
|
</el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理站名称" prop="nurseStationName">
|
|||
|
|
<el-input
|
|||
|
|
v-model="form.nurseStationName"
|
|||
|
|
placeholder="请输入护理站名称"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理站经度" prop="longitude">
|
|||
|
|
<el-input v-model="form.longitude" placeholder="请输入护理站经度" />
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理站纬度" prop="latitude">
|
|||
|
|
<el-input v-model="form.latitude" placeholder="请输入护理站纬度" />
|
|||
|
|
</el-form-item>
|
|||
|
|
|
|||
|
|
<el-form-item label="护理站地址" prop="address">
|
|||
|
|
<el-input v-model="form.address" placeholder="请输入护理站地址" />
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理类型" prop="nurseStationType">
|
|||
|
|
<el-select
|
|||
|
|
v-model="form.nurseStationType"
|
|||
|
|
multiple
|
|||
|
|
placeholder="请选择护理类型"
|
|||
|
|
style="width: 208px"
|
|||
|
|
>
|
|||
|
|
<el-option
|
|||
|
|
v-for="item in nurseStationTypelist"
|
|||
|
|
:key="item.nurseTypeCode"
|
|||
|
|
:label="item.nurseTypeName"
|
|||
|
|
:value="item.nurseTypeCode"
|
|||
|
|
>
|
|||
|
|
</el-option>
|
|||
|
|
</el-select>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="联系电话" prop="phone">
|
|||
|
|
<el-input v-model="form.phone" placeholder="请输入联系电话" />
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="负责人" prop="dutyPerson">
|
|||
|
|
<el-input v-model="form.dutyPerson" placeholder="请输入负责人" />
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="负责人电话" prop="dutyPhone">
|
|||
|
|
<el-input
|
|||
|
|
v-model="form.dutyPhone"
|
|||
|
|
placeholder="请输入负责人联系电话"
|
|||
|
|
maxlength="11"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="排序" prop="sort">
|
|||
|
|
<el-input v-model="form.sort" placeholder="请输入排序" />
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理站总概述" prop="nurseStationDescription">
|
|||
|
|
<el-input
|
|||
|
|
style="width: 208px"
|
|||
|
|
v-model="form.nurseStationDescription"
|
|||
|
|
type="textarea"
|
|||
|
|
placeholder="请输入内容"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理站简介" prop="agencyIntroduce">
|
|||
|
|
<editor
|
|||
|
|
style="margin: 0 auto"
|
|||
|
|
v-model="form.agencyIntroduce"
|
|||
|
|
></editor>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理站头像" prop="stationPictureUrl">
|
|||
|
|
<stationAcatar
|
|||
|
|
:img="form.stationPictureUrl"
|
|||
|
|
:type="'stationPictureUrl'"
|
|||
|
|
/>
|
|||
|
|
</el-form-item>
|
|||
|
|
<el-form-item label="护理站简介头像" prop="stationPictureUrl">
|
|||
|
|
<stationAcatar
|
|||
|
|
:img="form.stationPictureUrl"
|
|||
|
|
:type="'stationIntroducePcitureUrl'"
|
|||
|
|
/>
|
|||
|
|
</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="upload.title"
|
|||
|
|
:visible.sync="upload.open"
|
|||
|
|
width="400px"
|
|||
|
|
append-to-body
|
|||
|
|
>
|
|||
|
|
<el-upload
|
|||
|
|
ref="upload"
|
|||
|
|
:limit="1"
|
|||
|
|
accept=".xlsx, .xls"
|
|||
|
|
:headers="upload.headers"
|
|||
|
|
:action="upload.url"
|
|||
|
|
:disabled="upload.isUploading"
|
|||
|
|
:on-progress="handleFileUploadProgress"
|
|||
|
|
:on-success="handleFileSuccess"
|
|||
|
|
:auto-upload="false"
|
|||
|
|
drag
|
|||
|
|
>
|
|||
|
|
<i class="el-icon-upload"></i>
|
|||
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|||
|
|
<div class="el-upload__tip text-center" slot="tip">
|
|||
|
|
<span>仅允许导入xls、xlsx格式文件。</span>
|
|||
|
|
<el-link
|
|||
|
|
type="primary"
|
|||
|
|
:underline="false"
|
|||
|
|
style="font-size: 12px; vertical-align: baseline"
|
|||
|
|
@click="importTemplate"
|
|||
|
|
>下载模板</el-link
|
|||
|
|
>
|
|||
|
|
</div>
|
|||
|
|
</el-upload>
|
|||
|
|
<div slot="footer" class="dialog-footer">
|
|||
|
|
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
|||
|
|
<el-button @click="upload.open = false">取 消</el-button>
|
|||
|
|
</div>
|
|||
|
|
</el-dialog>
|
|||
|
|
</div>
|
|||
|
|
</template>
|
|||
|
|
|
|||
|
|
<script>
|
|||
|
|
import editor from "@/components/Editor";
|
|||
|
|
|
|||
|
|
import {
|
|||
|
|
listStation,
|
|||
|
|
getStation,
|
|||
|
|
delStation,
|
|||
|
|
addStation,
|
|||
|
|
updateStation,
|
|||
|
|
getFirstLevelInfo,
|
|||
|
|
getSecondaryLevelInfo,
|
|||
|
|
} from "@/api/system/station";
|
|||
|
|
import { getInfoList } from "@/api/system/nurseItem";
|
|||
|
|
import stationAcatar from "../stationAvatar/index.vue";
|
|||
|
|
import { getToken } from "@/utils/auth";
|
|||
|
|
|
|||
|
|
export default {
|
|||
|
|
components: { stationAcatar, editor },
|
|||
|
|
name: "Station",
|
|||
|
|
data() {
|
|||
|
|
return {
|
|||
|
|
imageUrl: "",
|
|||
|
|
imageUrl2: "",
|
|||
|
|
// 用户导入参数
|
|||
|
|
upload: {
|
|||
|
|
// 是否显示弹出层(用户导入)
|
|||
|
|
open: false,
|
|||
|
|
// 弹出层标题(用户导入)
|
|||
|
|
title: "",
|
|||
|
|
// 是否禁用上传
|
|||
|
|
isUploading: false,
|
|||
|
|
// 设置上传的请求头部
|
|||
|
|
headers: { Authorization: "Bearer " + getToken() },
|
|||
|
|
// 上传的地址
|
|||
|
|
url:
|
|||
|
|
process.env.VUE_APP_BASE_API +
|
|||
|
|
"/system/station/insertNurseStationImportList",
|
|||
|
|
},
|
|||
|
|
//护理类型
|
|||
|
|
nurseTypeCode: "nurse_type_code",
|
|||
|
|
nurseStationTypelist: [],
|
|||
|
|
//shengshiqu
|
|||
|
|
value3: "",
|
|||
|
|
value2: "",
|
|||
|
|
value1: "",
|
|||
|
|
value: "",
|
|||
|
|
// 遮罩层
|
|||
|
|
loading: true,
|
|||
|
|
// 选中数组
|
|||
|
|
ids: [],
|
|||
|
|
// 非单个禁用
|
|||
|
|
single: true,
|
|||
|
|
// 非多个禁用
|
|||
|
|
multiple: true,
|
|||
|
|
// 显示搜索条件
|
|||
|
|
showSearch: true,
|
|||
|
|
// 总条数
|
|||
|
|
total: 0,
|
|||
|
|
// 护理站信息表格数据
|
|||
|
|
stationList: [],
|
|||
|
|
// 弹出层标题
|
|||
|
|
title: "",
|
|||
|
|
// 是否显示弹出层
|
|||
|
|
open: false,
|
|||
|
|
openadd: false,
|
|||
|
|
// 查询参数
|
|||
|
|
queryParams: {
|
|||
|
|
pageNum: 1,
|
|||
|
|
pageSize: 10,
|
|||
|
|
areaCode: null,
|
|||
|
|
userId: null,
|
|||
|
|
nurseStationCode: null,
|
|||
|
|
nurseStationName: null,
|
|||
|
|
nurseStationType: null,
|
|||
|
|
agencyIntroduce: null,
|
|||
|
|
nurseStationDescription: null,
|
|||
|
|
longitude: null,
|
|||
|
|
latitude: null,
|
|||
|
|
phone: null,
|
|||
|
|
address: null,
|
|||
|
|
dutyPerson: null,
|
|||
|
|
dutyPhone: null,
|
|||
|
|
stationPictureUrl: null,
|
|||
|
|
sort: null,
|
|||
|
|
},
|
|||
|
|
// 表单参数
|
|||
|
|
form: {},
|
|||
|
|
provincelist: [],
|
|||
|
|
arealist: [],
|
|||
|
|
citylist: [],
|
|||
|
|
streetlist: [],
|
|||
|
|
// 表单校验
|
|||
|
|
rules: {
|
|||
|
|
areaCode: [
|
|||
|
|
{ required: true, message: "所属区域不能为空", trigger: "blur" },
|
|||
|
|
],
|
|||
|
|
},
|
|||
|
|
};
|
|||
|
|
},
|
|||
|
|
created() {
|
|||
|
|
this.getList();
|
|||
|
|
},
|
|||
|
|
methods: {
|
|||
|
|
handleAvatarSuccess2(res, file) {
|
|||
|
|
this.imageUrl2 = URL.createObjectURL(file.raw);
|
|||
|
|
},
|
|||
|
|
handleAvatarSuccess(res, file) {
|
|||
|
|
this.imageUrl = URL.createObjectURL(file.raw);
|
|||
|
|
},
|
|||
|
|
//点击街道
|
|||
|
|
clickstreet(item) {
|
|||
|
|
this.form.areaCode = item.areaCode;
|
|||
|
|
console.log(this.form);
|
|||
|
|
},
|
|||
|
|
//点击区县城
|
|||
|
|
clickarea(item) {
|
|||
|
|
this.value3 = "";
|
|||
|
|
console.log(item);
|
|||
|
|
getSecondaryLevelInfo(item.id).then((res) => {
|
|||
|
|
console.log(res);
|
|||
|
|
this.streetlist = res.data;
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
//点击市
|
|||
|
|
clickcity(item) {
|
|||
|
|
this.value2 = "";
|
|||
|
|
this.value3 = "";
|
|||
|
|
console.log(item);
|
|||
|
|
getSecondaryLevelInfo(item.id).then((res) => {
|
|||
|
|
console.log(res);
|
|||
|
|
this.arealist = res.data;
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
//点击省
|
|||
|
|
province(item) {
|
|||
|
|
console.log(item);
|
|||
|
|
this.value1 = "";
|
|||
|
|
this.value2 = "";
|
|||
|
|
this.value3 = "";
|
|||
|
|
getSecondaryLevelInfo(item.id).then((res) => {
|
|||
|
|
console.log(res);
|
|||
|
|
this.citylist = res.data;
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
/** 查询护理站信息列表 */
|
|||
|
|
getList() {
|
|||
|
|
this.loading = true;
|
|||
|
|
this.liststationinfo();
|
|||
|
|
|
|||
|
|
getFirstLevelInfo().then((res) => {
|
|||
|
|
this.provincelist = res.data;
|
|||
|
|
});
|
|||
|
|
getInfoList().then((res) => {
|
|||
|
|
this.nurseStationTypelist = res.data;
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
// 取消按钮
|
|||
|
|
cancel() {
|
|||
|
|
this.open = false;
|
|||
|
|
// this.openadd = false;
|
|||
|
|
this.reset();
|
|||
|
|
this.value3 = "";
|
|||
|
|
this.value2 = "";
|
|||
|
|
this.value1 = "";
|
|||
|
|
this.value = "";
|
|||
|
|
},
|
|||
|
|
// 表单重置
|
|||
|
|
reset() {
|
|||
|
|
this.form = {
|
|||
|
|
id: null,
|
|||
|
|
areaCode: null,
|
|||
|
|
nurseStationCode: null,
|
|||
|
|
nurseStationName: null,
|
|||
|
|
nurseStationType: null,
|
|||
|
|
agencyIntroduce: null,
|
|||
|
|
nurseStationDescription: null,
|
|||
|
|
longitude: null,
|
|||
|
|
latitude: null,
|
|||
|
|
phone: null,
|
|||
|
|
address: null,
|
|||
|
|
dutyPerson: null,
|
|||
|
|
dutyPhone: null,
|
|||
|
|
stationPictureUrl: null,
|
|||
|
|
sort: null,
|
|||
|
|
};
|
|||
|
|
this.resetForm("form");
|
|||
|
|
},
|
|||
|
|
/** 搜索按钮操作 */
|
|||
|
|
liststationinfo() {
|
|||
|
|
listStation(this.queryParams).then((response) => {
|
|||
|
|
this.stationList = response.rows;
|
|||
|
|
this.total = response.total;
|
|||
|
|
this.loading = false;
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
handleQuery() {
|
|||
|
|
this.queryParams.pageNum = 1;
|
|||
|
|
this.liststationinfo();
|
|||
|
|
},
|
|||
|
|
/** 重置按钮操作 */
|
|||
|
|
resetQuery() {
|
|||
|
|
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.open = true;
|
|||
|
|
this.title = "添加护理站信息";
|
|||
|
|
},
|
|||
|
|
/** 修改按钮操作 */
|
|||
|
|
handleUpdate(row) {
|
|||
|
|
this.reset();
|
|||
|
|
const id = row.id || this.ids;
|
|||
|
|
getStation(id).then((response) => {
|
|||
|
|
this.form = response.data;
|
|||
|
|
this.open = true;
|
|||
|
|
this.title = "修改护理站信息";
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
/** 提交按钮 */
|
|||
|
|
submitForm() {
|
|||
|
|
console.log(this.form);
|
|||
|
|
this.$refs["form"].validate((valid) => {
|
|||
|
|
if (valid) {
|
|||
|
|
if (this.form.id != null) {
|
|||
|
|
updateStation(this.form).then((response) => {
|
|||
|
|
this.$modal.msgSuccess("修改成功");
|
|||
|
|
this.open = false;
|
|||
|
|
this.getList();
|
|||
|
|
});
|
|||
|
|
} else {
|
|||
|
|
addStation(this.form).then((response) => {
|
|||
|
|
this.$modal.msgSuccess("新增成功");
|
|||
|
|
this.open = false;
|
|||
|
|
this.getList();
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
},
|
|||
|
|
/** 删除按钮操作 */
|
|||
|
|
handleDelete(row) {
|
|||
|
|
const ids = row.id || this.ids;
|
|||
|
|
this.$modal
|
|||
|
|
.confirm('是否确认删除护理站信息编号为"' + ids + '"的数据项?')
|
|||
|
|
.then(function () {
|
|||
|
|
return delStation(ids);
|
|||
|
|
})
|
|||
|
|
.then(() => {
|
|||
|
|
this.getList();
|
|||
|
|
this.$modal.msgSuccess("删除成功");
|
|||
|
|
})
|
|||
|
|
.catch(() => {});
|
|||
|
|
},
|
|||
|
|
/** 导出按钮操作 */
|
|||
|
|
handleExport() {
|
|||
|
|
this.download(
|
|||
|
|
"system/station/export",
|
|||
|
|
{
|
|||
|
|
...this.queryParams,
|
|||
|
|
},
|
|||
|
|
`station_${new Date().getTime()}.xlsx`
|
|||
|
|
);
|
|||
|
|
},
|
|||
|
|
/** 导入按钮操作 */
|
|||
|
|
handledata() {
|
|||
|
|
this.upload.title = "用户导入";
|
|||
|
|
this.upload.open = true;
|
|||
|
|
},
|
|||
|
|
/** 下载模板操作 */
|
|||
|
|
importTemplate() {
|
|||
|
|
this.download(
|
|||
|
|
"/system/station/downloadTemplate?fileType=nurseStation",
|
|||
|
|
{},
|
|||
|
|
`护理站模板.xlsx`
|
|||
|
|
);
|
|||
|
|
},
|
|||
|
|
// 提交上传文件
|
|||
|
|
submitFileForm() {
|
|||
|
|
this.$refs.upload.submit();
|
|||
|
|
},
|
|||
|
|
// 文件上传成功处理
|
|||
|
|
handleFileSuccess(response, file, fileList) {
|
|||
|
|
this.upload.open = false;
|
|||
|
|
this.upload.isUploading = false;
|
|||
|
|
this.$refs.upload.clearFiles();
|
|||
|
|
this.$alert(
|
|||
|
|
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
|||
|
|
response.msg +
|
|||
|
|
"</div>",
|
|||
|
|
"导入结果",
|
|||
|
|
{ dangerouslyUseHTMLString: true }
|
|||
|
|
);
|
|||
|
|
this.getList();
|
|||
|
|
},
|
|||
|
|
// 文件上传中处理
|
|||
|
|
handleFileUploadProgress(event, file, fileList) {
|
|||
|
|
this.upload.isUploading = true;
|
|||
|
|
},
|
|||
|
|
},
|
|||
|
|
};
|
|||
|
|
</script>
|