Merge remote-tracking branch 'origin/dev'
# Conflicts: # src/views/system/stationItem/index.vue
This commit is contained in:
commit
c825d5db4a
44
src/api/system/InformationCategory.js
Normal file
44
src/api/system/InformationCategory.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询资讯分类列表
|
||||
export function listInformationCategory(query) {
|
||||
return request({
|
||||
url: '/system/InformationCategory/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询资讯分类详细
|
||||
export function getInformationCategory(id) {
|
||||
return request({
|
||||
url: '/system/InformationCategory/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增资讯分类
|
||||
export function addInformationCategory(data) {
|
||||
return request({
|
||||
url: '/system/InformationCategory/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改资讯分类
|
||||
export function updateInformationCategory(data) {
|
||||
return request({
|
||||
url: '/system/InformationCategory/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除资讯分类
|
||||
export function delInformationCategory(id) {
|
||||
return request({
|
||||
url: '/system/InformationCategory/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
src/api/system/classifyItem.js
Normal file
44
src/api/system/classifyItem.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询护理机构和护理项目分类信息列表
|
||||
export function listInfo(query) {
|
||||
return request({
|
||||
url: '/classifyItem/info/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询护理机构和护理项目分类信息详细
|
||||
export function getInfo(id) {
|
||||
return request({
|
||||
url: '/classifyItem/info/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增护理机构和护理项目分类信息
|
||||
export function addInfo(data) {
|
||||
return request({
|
||||
url: '/classifyItem/info/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改护理机构和护理项目分类信息
|
||||
export function updateInfo(data) {
|
||||
return request({
|
||||
url: '/classifyItem/info/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除护理机构和护理项目分类信息
|
||||
export function delInfo(id) {
|
||||
return request({
|
||||
url: '/classifyItem/info/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
src/api/system/hospital.js
Normal file
44
src/api/system/hospital.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询医院信息管理列表
|
||||
export function listHospital(query) {
|
||||
return request({
|
||||
url: '/system/hospital/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询医院信息管理详细
|
||||
export function getHospital(id) {
|
||||
return request({
|
||||
url: '/system/hospital/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增医院信息管理
|
||||
export function addHospital(data) {
|
||||
return request({
|
||||
url: '/system/hospital/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改医院信息管理
|
||||
export function updateHospital(data) {
|
||||
return request({
|
||||
url: '/system/hospital/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除医院信息管理
|
||||
export function delHospital(id) {
|
||||
return request({
|
||||
url: '/system/hospital/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
53
src/api/system/hospitalDepartment.js
Normal file
53
src/api/system/hospitalDepartment.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询科室信息管理列表
|
||||
export function listHospitalDepartment(query) {
|
||||
return request({
|
||||
url: '/system/hospitalDepartment/list',
|
||||
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/system/hospital/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询科室信息管理详细
|
||||
export function getHospitalDepartment(id) {
|
||||
return request({
|
||||
url: '/system/hospitalDepartment/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增科室信息管理
|
||||
export function addHospitalDepartment(data) {
|
||||
return request({
|
||||
url: '/system/hospitalDepartment/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改科室信息管理
|
||||
export function updateHospitalDepartment(data) {
|
||||
return request({
|
||||
url: '/system/hospitalDepartment/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除科室信息管理
|
||||
export function delHospitalDepartment(id) {
|
||||
return request({
|
||||
url: '/system/hospitalDepartment/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
59
src/api/system/hospitalPerson.js
Normal file
59
src/api/system/hospitalPerson.js
Normal file
@ -0,0 +1,59 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询健康咨询-科室人员信息列表
|
||||
export function listHospitalPerson(query) {
|
||||
return request({
|
||||
url: '/system/hospitalPerson/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询科室信息管理列表
|
||||
export function listHospitalDepartment(query) {
|
||||
return request({
|
||||
url: '/system/hospitalDepartment/list',
|
||||
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询健康咨询-科室人员信息详细
|
||||
export function getHospitalPerson(id) {
|
||||
return request({
|
||||
url: '/system/hospitalPerson/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增健康咨询-科室人员信息
|
||||
export function addHospitalPerson(data) {
|
||||
return request({
|
||||
url: '/system/hospitalPerson/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/system/hospital/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 修改健康咨询-科室人员信息
|
||||
export function updateHospitalPerson(data) {
|
||||
return request({
|
||||
url: '/system/hospitalPerson/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除健康咨询-科室人员信息
|
||||
export function delHospitalPerson(id) {
|
||||
return request({
|
||||
url: '/system/hospitalPerson/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
52
src/api/system/informationInfo.js
Normal file
52
src/api/system/informationInfo.js
Normal file
@ -0,0 +1,52 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询资讯信息管理列表
|
||||
export function listInformationInfo(query) {
|
||||
return request({
|
||||
url: '/system/informationInfo/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询资讯信息管理详细
|
||||
export function getInformationInfo(id) {
|
||||
return request({
|
||||
url: '/system/informationInfo/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增资讯信息管理
|
||||
export function addInformationInfo(data) {
|
||||
return request({
|
||||
url: '/system/informationInfo/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改资讯信息管理
|
||||
export function updateInformationInfo(data) {
|
||||
return request({
|
||||
url: '/system/informationInfo/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 查询资讯分类列表
|
||||
export function listInformationCategory(query) {
|
||||
return request({
|
||||
url: '/system/InformationCategory/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 删除资讯信息管理
|
||||
export function delInformationInfo(id) {
|
||||
return request({
|
||||
url: '/system/informationInfo/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
67
src/api/system/poser.js
Normal file
67
src/api/system/poser.js
Normal file
@ -0,0 +1,67 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询泉医到家系统海报模块信息(包含咨询简介信息)列表
|
||||
export function listPoser(query) {
|
||||
return request({
|
||||
url: '/system/poser/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
//取消
|
||||
export function updatePicture(data) {
|
||||
return request({
|
||||
url: '/system/patientArchives/updatePicture',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 查询护理机构和护理项目分类信息列表
|
||||
export function listInfo(query) {
|
||||
return request({
|
||||
url: '/classifyItem/info/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询泉医到家系统海报模块信息(包含咨询简介信息)详细
|
||||
|
||||
export function getPoser(moduleType, nurseStationId, nurseItemId) {
|
||||
return request({
|
||||
url: `/system/poser/getModuleType?moduleType=${moduleType}&nurseStationId=${nurseStationId}&nurseItemId=${nurseItemId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增泉医到家系统海报模块信息(包含咨询简介信息)
|
||||
export function addPoser(data) {
|
||||
return request({
|
||||
url: 'system/poser/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function getListByUser(query) {
|
||||
return request({
|
||||
url: '/system/station/list',
|
||||
method: 'GET',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 修改泉医到家系统海报模块信息(包含咨询简介信息)
|
||||
export function updatePoser(data) {
|
||||
return request({
|
||||
url: 'system/poser/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除泉医到家系统海报模块信息(包含咨询简介信息)
|
||||
export function delPoser(nurseStationId,moduleType,nurseItemId) {
|
||||
return request({
|
||||
url: `/system/poser/deletePoserInfo?moduleType=${moduleType}&nurseStationId=${nurseStationId}&nurseItemId=${nurseItemId}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@ -36,7 +36,14 @@ export function updateStation(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询护理机构分类信息列表
|
||||
export function listStationClassify(query) {
|
||||
return request({
|
||||
url: '/system/stationClassify/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 删除护理站信息
|
||||
export function delStation(id) {
|
||||
return request({
|
||||
|
||||
@ -9,8 +9,16 @@ export function updateNurseStationHeads(data) {
|
||||
})
|
||||
}
|
||||
|
||||
//海报视频上传
|
||||
|
||||
|
||||
export function updatePoserHeads(data) {
|
||||
return request({
|
||||
url: '/system/poser/updatePoserHeads',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function posts(data) {
|
||||
return request({
|
||||
|
||||
44
src/api/system/stationClassify.js
Normal file
44
src/api/system/stationClassify.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询护理机构分类信息列表
|
||||
export function listStationClassify(query) {
|
||||
return request({
|
||||
url: '/system/stationClassify/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询护理机构分类信息详细
|
||||
export function getStationClassify(id) {
|
||||
return request({
|
||||
url: '/system/stationClassify/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增护理机构分类信息
|
||||
export function addStationClassify(data) {
|
||||
return request({
|
||||
url: '/system/stationClassify/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改护理机构分类信息
|
||||
export function updateStationClassify(data) {
|
||||
return request({
|
||||
url: '/system/stationClassify/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除护理机构分类信息
|
||||
export function delStationClassify(id) {
|
||||
return request({
|
||||
url: '/system/stationClassify/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
554
src/views/system/InformationCategory/index.vue
Normal file
554
src/views/system/InformationCategory/index.vue
Normal file
@ -0,0 +1,554 @@
|
||||
<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="informationCategoryCode">
|
||||
<el-input
|
||||
v-model="queryParams.informationCategoryCode"
|
||||
placeholder="请输入资讯分类编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="资讯分类名称" prop="informationCategoryName">
|
||||
<el-input
|
||||
v-model="queryParams.informationCategoryName"
|
||||
placeholder="请输入资讯分类名称"
|
||||
clearable
|
||||
maxlength="100"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="资讯分类排序" prop="sort">
|
||||
<el-input
|
||||
v-model="queryParams.sort"
|
||||
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:InformationCategory: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:InformationCategory: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:InformationCategory:remove']"
|
||||
>删除</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:InformationCategory:export']"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="InformationCategoryList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
||||
<el-table-column
|
||||
label="资讯分类编码"
|
||||
align="center"
|
||||
prop="informationCategoryCode"
|
||||
/>
|
||||
<el-table-column
|
||||
label="资讯分类名称"
|
||||
align="center"
|
||||
prop="informationCategoryName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="资讯分类类型"
|
||||
align="center"
|
||||
prop="informationCategoryType"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
scope.row.informationCategoryType == "HEALTH_NOUS" ? "健康常识" : ""
|
||||
}}
|
||||
<!-- {{ scope.row.informationCategoryType == "OTHER" ? "其他" : "" }} -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<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:InformationCategory:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:InformationCategory: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="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加资讯分类对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="addopen"
|
||||
width="1100px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="110px"
|
||||
:inline="true"
|
||||
>
|
||||
<div
|
||||
v-for="(item, index) in form.informationCategoryList"
|
||||
:key="index"
|
||||
style="margin-top: 20px; border-bottom: 1px solid #f3f3f3"
|
||||
>
|
||||
<el-form-item
|
||||
label="资讯分类名称"
|
||||
:rules="rules.informationCategoryList.informationCategoryName"
|
||||
:prop="`informationCategoryList.${index}.informationCategoryName`"
|
||||
>
|
||||
<el-input
|
||||
maxlength="100"
|
||||
style="width: 200px"
|
||||
v-model="item.informationCategoryName"
|
||||
placeholder="请输入资讯分类名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="资讯分类排序"
|
||||
:rules="rules.informationCategoryList.sort"
|
||||
:prop="`informationCategoryList.${index}.sort`"
|
||||
>
|
||||
<el-input
|
||||
v-model.number="item.sort"
|
||||
maxlength="5"
|
||||
style="width: 200px"
|
||||
placeholder="请输入资讯分类排序"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="资讯分类类型"
|
||||
:rules="rules.informationCategoryList.informationCategoryType"
|
||||
:prop="`informationCategoryList.${index}.informationCategoryType`"
|
||||
>
|
||||
<el-select
|
||||
v-model="item.informationCategoryType"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
circle
|
||||
plain
|
||||
icon="el-icon-circle-plus-outline"
|
||||
@click="adddisease"
|
||||
v-if="index == 0"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
circle
|
||||
plain
|
||||
@click="deldisease(index)"
|
||||
v-if="index != 0"
|
||||
>
|
||||
</el-button>
|
||||
</div>
|
||||
</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="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<el-form-item label="资讯分类名称" prop="informationCategoryName">
|
||||
<el-input
|
||||
v-model="form.informationCategoryName"
|
||||
placeholder="请输入资讯分类名称"
|
||||
style="width: 250px"
|
||||
maxlength="100"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="资讯分类排序" prop="sort">
|
||||
<el-input
|
||||
v-model.number="form.sort"
|
||||
placeholder="请输入分类排序"
|
||||
style="width: 250px"
|
||||
maxlength="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="资讯分类类型" prop="informationCategoryType">
|
||||
<el-select
|
||||
v-model="form.informationCategoryType"
|
||||
placeholder="请选择"
|
||||
style="width: 250px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-radio v-model="form.informationCategoryType" label="HEALTH_NOUS"
|
||||
>健康咨询</el-radio
|
||||
>
|
||||
<el-radio v-model="form.informationCategoryType" label="OTHER"
|
||||
>其他</el-radio
|
||||
> -->
|
||||
</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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listInformationCategory,
|
||||
getInformationCategory,
|
||||
delInformationCategory,
|
||||
addInformationCategory,
|
||||
updateInformationCategory,
|
||||
} from "@/api/system/InformationCategory";
|
||||
|
||||
export default {
|
||||
name: "InformationCategory",
|
||||
data() {
|
||||
return {
|
||||
options: [
|
||||
{
|
||||
value: "HEALTH_NOUS",
|
||||
label: "健康常识",
|
||||
},
|
||||
],
|
||||
value: "",
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 资讯分类表格数据
|
||||
InformationCategoryList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
addopen: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
informationCategoryCode: null,
|
||||
informationCategoryName: null,
|
||||
informationCategoryType: null,
|
||||
sort: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
informationCategoryList: {
|
||||
informationCategoryName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择资讯分类名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
|
||||
informationCategoryType: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择资讯分类类型",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
sort: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择资讯分类排序",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
informationCategoryName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择资讯分类名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
|
||||
informationCategoryType: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择资讯分类类型",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
sort: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择资讯分类排序",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
//删除deldisease
|
||||
deldisease(index) {
|
||||
this.form.informationCategoryList.splice(index, 1);
|
||||
},
|
||||
adddisease() {
|
||||
var obj = {
|
||||
informationCategoryName: "",
|
||||
informationCategoryType: "",
|
||||
sort: "",
|
||||
};
|
||||
if (this.form.informationCategoryList.length == 5) {
|
||||
this.$message.error("最多只能5条");
|
||||
} else {
|
||||
this.form.informationCategoryList.push(obj);
|
||||
}
|
||||
},
|
||||
/** 查询资讯分类列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listInformationCategory(this.queryParams).then((response) => {
|
||||
this.InformationCategoryList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.addopen = false;
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
// reset() {
|
||||
// this.form = {
|
||||
|
||||
// id: null,
|
||||
// informationCategoryCode: null,
|
||||
// informationCategoryName: null,
|
||||
// informationCategoryType: null,
|
||||
// sort: null,
|
||||
// createBy: null,
|
||||
// createTime: null,
|
||||
// updateBy: null,
|
||||
// updateTime: null
|
||||
// };
|
||||
|
||||
// this.resetForm("form");
|
||||
// },
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
informationCategoryList: [
|
||||
{
|
||||
// id: null,
|
||||
// informationCategoryCode: null,
|
||||
informationCategoryName: null,
|
||||
informationCategoryType: null,
|
||||
sort: null,
|
||||
// createBy: null,
|
||||
// createTime: null,
|
||||
// updateBy: null,
|
||||
// updateTime: null
|
||||
},
|
||||
],
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
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.addopen = true;
|
||||
this.title = "添加资讯分类";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getInformationCategory(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改资讯分类";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
if (this.form.id != null) {
|
||||
updateInformationCategory(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
|
||||
addInformationCategory(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.addopen = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm('是否确认删除资讯分类编号为"' + ids + '"的数据项?')
|
||||
.then(function () {
|
||||
return delInformationCategory(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/InformationCategory/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`InformationCategory_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -73,7 +73,8 @@ export default {
|
||||
],
|
||||
// goodAttributeDetailsLists:[],
|
||||
goodDetailsLists: [],
|
||||
ids: 9999999,
|
||||
idd: 9999999,
|
||||
ids: [],
|
||||
// 查询参数
|
||||
shangjia: {
|
||||
id: null,
|
||||
@ -201,28 +202,28 @@ export default {
|
||||
// if (this.goodDetailsLists.length == 5) {
|
||||
// this.$message.error("最多只能5条");
|
||||
// } else {
|
||||
this.ids++;
|
||||
this.idd++;
|
||||
var obj = {
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
attributeDetailsSort: null,
|
||||
ids: this.ids,
|
||||
idd: this.idd,
|
||||
};
|
||||
this.goodDetailsLists.push(obj);
|
||||
// }
|
||||
},
|
||||
// 删除
|
||||
delgoodAttributeDetail(item) {
|
||||
if (item.ids && !item.attributeDetailsId) {
|
||||
if (item.idd && !item.attributeDetailsId) {
|
||||
if (this.goodDetailsLists.length == 1) {
|
||||
this.$message.error("最后一条不可删除");
|
||||
} else {
|
||||
this.goodDetailsLists = this.goodDetailsLists.filter(
|
||||
(e) => e.ids != item.ids
|
||||
(e) => e.idd != item.idd
|
||||
);
|
||||
}
|
||||
} else if (!item.ids && item.attributeDetailsId) {
|
||||
} else if (!item.idd && item.attributeDetailsId) {
|
||||
if (this.goodDetailsLists.length == 1) {
|
||||
this.$message.error("最后一条不可删除");
|
||||
} else {
|
||||
@ -322,7 +323,7 @@ export default {
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
attributeDetailsSort: null,
|
||||
ids: 9999999,
|
||||
idd: 9999999,
|
||||
}, ];
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -363,7 +364,7 @@ export default {
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: null,
|
||||
ids: 9999999,
|
||||
idd: 9999999,
|
||||
}, ];
|
||||
this.open = true;
|
||||
},
|
||||
@ -464,13 +465,13 @@ export default {
|
||||
},
|
||||
attributePitureitem(item) {
|
||||
let items = JSON.parse(item);
|
||||
if (items.ids && !items.id) {
|
||||
if (items.idd && !items.id) {
|
||||
this.goodDetailsLists.forEach((e) => {
|
||||
if (e.ids == items.ids) {
|
||||
if (e.idd == items.idd) {
|
||||
e.attributePitureUrl = items.attributePitureUrl;
|
||||
}
|
||||
});
|
||||
} else if (!items.ids && items.attributeDetailsId) {
|
||||
} else if (!items.idd && items.attributeDetailsId) {
|
||||
this.goodDetailsLists.forEach((e) => {
|
||||
if (e.attributeDetailsId == items.attributeDetailsId) {
|
||||
e.attributePitureUrl = items.attributePitureUrl;
|
||||
|
||||
@ -181,7 +181,6 @@ export default {
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
nurseStationId: null,
|
||||
departmentCode: null,
|
||||
departmentName: null,
|
||||
departmentPerson: null,
|
||||
@ -322,4 +321,4 @@ export default {
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
531
src/views/system/classifyItem/index.vue
Normal file
531
src/views/system/classifyItem/index.vue
Normal file
@ -0,0 +1,531 @@
|
||||
<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="classifyCode">
|
||||
<el-input
|
||||
v-model="queryParams.classifyCode"
|
||||
placeholder="请输入分类编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类名称" prop="classifyName">
|
||||
<el-input
|
||||
v-model="queryParams.classifyName"
|
||||
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:classifyItem: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:classifyItem: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:classifyItem:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['classify:info:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="分类编码" align="center" prop="classifyCode" />
|
||||
<el-table-column label="分类名称" align="center" prop="classifyName" />
|
||||
<!-- <el-table-column label="分类类型" align="center" prop="classifyType">
|
||||
<template slot-scope="scope"
|
||||
>{{ scope.row.classifyType == "NURSE_AGNECY" ? "护理机构分类" : "" }}
|
||||
{{ scope.row.classifyType == "NURSE_ITEM" ? "护理项目分类" : "" }}
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="分类排序" align="center" prop="classifySort" />
|
||||
<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:classifyItem:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:classifyItem: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="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加护理项目分类信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
:before-close="cancel"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
:inline="true"
|
||||
:before-close="cancel"
|
||||
>
|
||||
<div
|
||||
v-for="(item, index) in form.nurseClassifyInfoList"
|
||||
:key="index"
|
||||
style="margin-bottom: 30px"
|
||||
>
|
||||
<el-form-item
|
||||
label="分类名称"
|
||||
:rules="rules.nurseClassifyInfoList.classifyName"
|
||||
:prop="`nurseClassifyInfoList.${index}.classifyName`"
|
||||
>
|
||||
<el-input
|
||||
maxlength="30"
|
||||
style="width: 200px"
|
||||
v-model="item.classifyName"
|
||||
placeholder="请输入分类名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="分类排序"
|
||||
:rules="rules.nurseClassifyInfoList.classifySort"
|
||||
:prop="`nurseClassifyInfoList.${index}.classifySort`"
|
||||
>
|
||||
<el-input
|
||||
style="width: 200px"
|
||||
v-model.number="item.classifySort"
|
||||
placeholder="请输入分类排序"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxlength="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="分类图标"
|
||||
:rules="rules.nurseClassifyInfoList.classifyPictureUrl"
|
||||
:prop="`nurseClassifyInfoList.${index}.classifyPictureUrl`"
|
||||
>
|
||||
<stationAcatar
|
||||
style="margin-top: -25px"
|
||||
@imgUrl="imgclassifyPictureUrl"
|
||||
@item="imgclassifyPictureitem"
|
||||
:img="item.classifyPictureUrl"
|
||||
:type="'nurseItemClassifyUrl'"
|
||||
:item="item"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-circle-plus-outline"
|
||||
style="margin-top: 2px; margin-left: 50px"
|
||||
v-if="index == 0"
|
||||
@click="addnurseClassifyitem"
|
||||
></el-button>
|
||||
<!-- circle -->
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
plain
|
||||
style="margin-top: 2px; margin-left: 50px"
|
||||
v-if="index != 0"
|
||||
@click="delnurseClassifyitem(index)"
|
||||
></el-button>
|
||||
</div>
|
||||
</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="editopen"
|
||||
width="500px"
|
||||
append-to-body
|
||||
:before-close="cancel"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="分类名称" prop="classifyName">
|
||||
<el-input v-model="form.classifyName" placeholder="请输入分类名称" maxlength="30" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分类图标" prop="classifyPictureUrl">
|
||||
<stationAcatar
|
||||
@imgUrl="imgclassifyPictureUrl"
|
||||
@item="imgclassifyPictureitem"
|
||||
:img="form.classifyPictureUrl"
|
||||
:type="'nurseItemClassifyUrl'"
|
||||
:item="form"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类排序" prop="classifySort">
|
||||
<el-input
|
||||
v-model.number="form.classifySort"
|
||||
placeholder="请输入分类排序"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxlength="5"
|
||||
/>
|
||||
</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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
import {
|
||||
listInfo,
|
||||
getInfo,
|
||||
delInfo,
|
||||
addInfo,
|
||||
updateInfo
|
||||
} from "@/api/system/classifyItem.js";
|
||||
import { updatePicture } from "@/api/system/station";
|
||||
export default {
|
||||
name: "classify",
|
||||
components: { stationAcatar },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
imgone: "",
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 护理机构和护理项目分类信息表格数据
|
||||
infoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
editopen: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
parentId: null,
|
||||
classifyCode: null,
|
||||
classifyName: null,
|
||||
|
||||
classifyLevel: null,
|
||||
classifyType: null,
|
||||
classifyPictureUrl: null,
|
||||
classifySort: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
nurseClassifyInfoList: []
|
||||
},
|
||||
idd: 0,
|
||||
classifyPictureUrl: null,
|
||||
imgsurl: { pictureUrlList: [] },
|
||||
// 表单校验
|
||||
rules: {
|
||||
nurseClassifyInfoList: {
|
||||
classifyName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入分类名称",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
classifyPictureUrl: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择分类图标",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
classifySort: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入分类排序",
|
||||
trigger: "blur"
|
||||
}
|
||||
]
|
||||
},
|
||||
classifyName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入分类名称",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
classifyPictureUrl: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择分类图标",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
classifySort: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入分类排序",
|
||||
trigger: "blur"
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
//添加时删除item
|
||||
delnurseClassifyitem(index) {
|
||||
this.form.nurseClassifyInfoList.splice(index, 1);
|
||||
},
|
||||
//添加时新增item
|
||||
addnurseClassifyitem() {
|
||||
this.idd++;
|
||||
var obj = {
|
||||
classifyName: "",
|
||||
classifyPictureUrl: "",
|
||||
classifySort: null,
|
||||
idd: this.idd
|
||||
};
|
||||
if (this.form.nurseClassifyInfoList.length == 5) {
|
||||
this.$message.error("最多批量添加5条");
|
||||
} else {
|
||||
this.form.nurseClassifyInfoList.push(obj);
|
||||
}
|
||||
},
|
||||
//接收图片
|
||||
imgclassifyPictureUrl(e) {},
|
||||
//接收图片所属的item
|
||||
imgclassifyPictureitem(item) {
|
||||
let items = JSON.parse(item);
|
||||
if (items.idd && !items.id) {
|
||||
this.form.nurseClassifyInfoList.forEach(e => {
|
||||
if (e.idd == items.idd) {
|
||||
e.classifyPictureUrl = items.classifyPictureUrl;
|
||||
}
|
||||
});
|
||||
} else if (!items.idd && items.id) {
|
||||
this.form.classifyPictureUrl = items.classifyPictureUrl;
|
||||
}
|
||||
},
|
||||
/** 查询护理机构和护理项目分类信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listInfo(this.queryParams).then(response => {
|
||||
this.infoList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
if (this.editopen) {
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.form.classifyPictureUrl != this.imgone) {
|
||||
obj.pictureUrlList.push(this.form.classifyPictureUrl);
|
||||
}
|
||||
updatePicture(obj).then(res => {
|
||||
this.editopen = false;
|
||||
});
|
||||
}
|
||||
if (this.open) {
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.form.nurseClassifyInfoList) {
|
||||
this.form.nurseClassifyInfoList.forEach(e => {
|
||||
obj.pictureUrlList.push(e.classifyPictureUrl);
|
||||
});
|
||||
}
|
||||
updatePicture(obj).then(res => {
|
||||
this.open = false;
|
||||
});
|
||||
}
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
parentId: null,
|
||||
classifyCode: null,
|
||||
classifyName: null,
|
||||
classifyLevel: null,
|
||||
classifyType: null,
|
||||
classifyPictureUrl: null,
|
||||
classifySort: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
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.form = {
|
||||
nurseClassifyInfoList: [
|
||||
{
|
||||
classifyName: "",
|
||||
classifyPictureUrl: "",
|
||||
classifySort: null,
|
||||
idd: this.idd
|
||||
}
|
||||
]
|
||||
};
|
||||
this.open = true;
|
||||
this.title = "添加护理项目分类信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getInfo(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.imgone = this.form.classifyPictureUrl;
|
||||
this.classifyPictureUrl = response.data.classifyPictureUrl;
|
||||
this.editopen = true;
|
||||
this.title = "修改护理项目分类信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.form.classifySort = Number(this.form.classifySort);
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
if (this.form.classifyPictureUrl != this.imgone) {
|
||||
var obj = { pictureUrlList: [] };
|
||||
obj.pictureUrlList.push(this.imgone);
|
||||
updatePicture(obj).then(res => {});
|
||||
}
|
||||
this.editopen = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
|
||||
addInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
console.log(row);
|
||||
this.$modal
|
||||
.confirm("是否确认删除?")
|
||||
.then(function() {
|
||||
return delInfo(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"classify/info/export",
|
||||
{
|
||||
...this.queryParams
|
||||
},
|
||||
`info_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -69,7 +69,7 @@ export default {
|
||||
},
|
||||
],
|
||||
goodDetailsLists: [],
|
||||
ids: 9999999,
|
||||
idd: 9999999,
|
||||
// 查询参数
|
||||
shangjia: {
|
||||
id: null,
|
||||
@ -180,28 +180,28 @@ export default {
|
||||
if (this.goodDetailsLists.length == 5) {
|
||||
this.$message.error("最多只能5条");
|
||||
} else {
|
||||
this.ids++;
|
||||
this.idd++;
|
||||
var obj = {
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: "",
|
||||
ids: this.ids,
|
||||
idd: this.idd,
|
||||
};
|
||||
this.goodDetailsLists.push(obj);
|
||||
}
|
||||
},
|
||||
// 删除
|
||||
delgoodAttributeDetail(item) {
|
||||
if (item.ids && !item.attributeDetailsId) {
|
||||
if (item.idd && !item.attributeDetailsId) {
|
||||
if (this.goodDetailsLists.length == 1) {
|
||||
this.$message.error("最后一条不可删除");
|
||||
} else {
|
||||
this.goodDetailsLists = this.goodDetailsLists.filter(
|
||||
(e) => e.ids != item.ids
|
||||
(e) => e.idd != item.idd
|
||||
);
|
||||
}
|
||||
} else if (!item.ids && item.attributeDetailsId) {
|
||||
} else if (!item.idd && item.attributeDetailsId) {
|
||||
if (this.goodDetailsLists.length == 1) {
|
||||
this.$message.error("最后一条不可删除");
|
||||
} else {
|
||||
@ -293,7 +293,7 @@ export default {
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: "",
|
||||
ids: 9999999,
|
||||
idd: 9999999,
|
||||
}, ];
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -329,7 +329,7 @@ export default {
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
sort: "",
|
||||
ids: 9999999,
|
||||
idd: 9999999,
|
||||
}, ];
|
||||
this.open = true;
|
||||
},
|
||||
@ -390,7 +390,6 @@ export default {
|
||||
var obj = { pictureUrlList: [] };
|
||||
obj.pictureUrlList.push(row.goodsPictureUrl);
|
||||
updatePicture(obj).then((res) => {});
|
||||
|
||||
delGoodsInfo(row.goodsInfoId).then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
this.getList();
|
||||
@ -404,13 +403,13 @@ export default {
|
||||
attributePitureUrl(imgUrl) {},
|
||||
attributePitureitem(item) {
|
||||
let items = JSON.parse(item);
|
||||
if (items.ids && !items.id) {
|
||||
if (items.idd && !items.id) {
|
||||
this.goodDetailsLists.forEach((e) => {
|
||||
if (e.ids == items.ids) {
|
||||
if (e.idd == items.idd) {
|
||||
e.attributePitureUrl = items.attributePitureUrl;
|
||||
}
|
||||
});
|
||||
} else if (!items.ids && items.attributeDetailsId) {
|
||||
} else if (!items.idd && items.attributeDetailsId) {
|
||||
this.goodDetailsLists.forEach((e) => {
|
||||
if (e.attributeDetailsId == items.attributeDetailsId) {
|
||||
e.attributePitureUrl = items.attributePitureUrl;
|
||||
|
||||
357
src/views/system/hospital/index.vue
Normal file
357
src/views/system/hospital/index.vue
Normal file
@ -0,0 +1,357 @@
|
||||
<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="hospitalName">
|
||||
<el-input
|
||||
v-model="queryParams.hospitalName"
|
||||
placeholder="请输入医院名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="医院编码" prop="hospitalCode">
|
||||
<el-input
|
||||
v-model="queryParams.hospitalCode"
|
||||
placeholder="请输入医院编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="医院地址" prop="hospitalAddress">
|
||||
<el-input
|
||||
v-model="queryParams.hospitalAddress"
|
||||
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:hospital: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:hospital: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:hospital:remove']"
|
||||
>删除</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:hospital:export']"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="hospitalList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
||||
<el-table-column label="医院名称" align="center" prop="hospitalName" />
|
||||
<el-table-column label="医院编码" align="center" prop="hospitalCode" />
|
||||
<el-table-column label="医院地址" align="center" prop="hospitalAddress" />
|
||||
<el-table-column label="联系电话" align="center" prop="phone" />
|
||||
<!-- <el-table-column label="医院简介" align="center" prop="hospitalIntroduce" /> -->
|
||||
<el-table-column label="显示顺序" align="center" prop="hospitalSort" />
|
||||
<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:hospital:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:hospital: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="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改医院信息管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true">
|
||||
<el-form-item label="医院名称" prop="hospitalName">
|
||||
<el-input v-model="form.hospitalName" style="width:200px" placeholder="请输入医院名称" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="医院编码" prop="hospitalCode">
|
||||
<el-input v-model="form.hospitalCode" placeholder="请输入医院编码" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="医院地址" prop="hospitalAddress">
|
||||
<el-input style="width:200px" v-model="form.hospitalAddress" placeholder="请输入医院地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="phone">
|
||||
<el-input v-model="form.phone" style="width:200px" placeholder="请输入联系电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="显示顺序" prop="hospitalSort">
|
||||
<el-input v-model="form.hospitalSort" style="width:200px" placeholder="请输入显示顺序" />
|
||||
</el-form-item>
|
||||
<el-form-item label="医院简介" prop="hospitalIntroduce">
|
||||
<editor
|
||||
@imgs="imgs"
|
||||
:min-height="100"
|
||||
v-model="form.hospitalIntroduce"
|
||||
></editor>
|
||||
<!-- <el-input v-model="form.hospitalIntroduce" type="textarea" placeholder="请输入内容" /> -->
|
||||
</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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listHospital, getHospital, delHospital, addHospital, updateHospital } from "@/api/system/hospital";
|
||||
import editor from "@/components/Editor";
|
||||
|
||||
export default {
|
||||
components: { editor },
|
||||
name: "Hospital",
|
||||
data() {
|
||||
// 验证手机号的规则
|
||||
var checkMobile = (rule, value, cb) => {
|
||||
// 验证手机号的正则表达式
|
||||
const regMobile =
|
||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
if (regMobile.test(value)) {
|
||||
return cb();
|
||||
}
|
||||
cb(new Error("请输入正确的联系电话"));
|
||||
};
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
imgsurl: { pictureUrlList: [] },
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 医院信息管理表格数据
|
||||
hospitalList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
hospitalName: null,
|
||||
hospitalCode: null,
|
||||
hospitalAddress: null,
|
||||
phone: null,
|
||||
hospitalIntroduce: null,
|
||||
hospitalSort: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
hospitalName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择医院名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
hospitalSort: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择显示排序",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
phone: [
|
||||
{
|
||||
required: true,
|
||||
validator: checkMobile,
|
||||
message: "",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
hospitalIntroduce: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择医院简介",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
hospitalAddress: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择医院地址",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
imgs(item) {
|
||||
console.log(item)
|
||||
this.imgsurl.pictureUrlList.push(item);
|
||||
},
|
||||
/** 查询医院信息管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listHospital(this.queryParams).then(response => {
|
||||
this.hospitalList = response.rows;
|
||||
console.log(this.hospitalList)
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
hospitalName: null,
|
||||
hospitalCode: null,
|
||||
hospitalAddress: null,
|
||||
phone: null,
|
||||
hospitalIntroduce: null,
|
||||
hospitalSort: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
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
|
||||
getHospital(id).then(response => {
|
||||
this.form = response.data;
|
||||
console.log(this.form)
|
||||
this.open = true;
|
||||
this.title = "修改医院信息管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateHospital(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addHospital(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 delHospital(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/hospital/export', {
|
||||
...this.queryParams
|
||||
}, `hospital_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
826
src/views/system/hospitalDepartment/index.vue
Normal file
826
src/views/system/hospitalDepartment/index.vue
Normal file
@ -0,0 +1,826 @@
|
||||
<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="hospitalName">
|
||||
<el-input
|
||||
v-model="queryParams.hospitalName"
|
||||
placeholder="请输入医院名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="科室编码" prop="departmentCode">
|
||||
<el-input
|
||||
v-model="queryParams.departmentCode"
|
||||
placeholder="请输入科室编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="科室名称" prop="departmentName">
|
||||
<el-input
|
||||
v-model="queryParams.departmentName"
|
||||
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:hospitalDepartment: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:hospitalDepartment: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:hospitalDepartment:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="hospitalDepartmentList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键id" align="center" prop="id" />
|
||||
<el-table-column label="父级科室id" align="center" prop="parentId" />
|
||||
<el-table-column label="医院表id" align="center" prop="hospitalId" /> -->
|
||||
<el-table-column label="医院名称" align="center" prop="hospitalName" />
|
||||
<el-table-column label="科室编码" align="center" prop="departmentCode" />
|
||||
<el-table-column label="科室名称" align="center" prop="departmentName" />
|
||||
<el-table-column
|
||||
label="科室联系电话"
|
||||
align="center"
|
||||
prop="departmentPhone"
|
||||
/>
|
||||
<el-table-column
|
||||
label="科室负责人"
|
||||
align="center"
|
||||
prop="departmentPerson"
|
||||
/>
|
||||
<el-table-column
|
||||
label="科室地址"
|
||||
align="center"
|
||||
prop="departmentAddress"
|
||||
/>
|
||||
<!-- <el-table-column label="科室显示级别" align="center" prop="departmentLevel" /> -->
|
||||
<el-table-column
|
||||
label="科室显示顺序"
|
||||
align="center"
|
||||
prop="departmentSort"
|
||||
/>
|
||||
<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:hospitalDepartment:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:hospitalDepartment: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="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改科室信息管理对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="addopen"
|
||||
width="900px"
|
||||
append-to-body
|
||||
:before-close="cancel"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="110px"
|
||||
:inline="true"
|
||||
>
|
||||
<div
|
||||
v-for="(item, index) in form.hospitalDepartmentInfoList"
|
||||
:key="index"
|
||||
style="margin-top: 20px; border-bottom: 1px solid #f3f3f3"
|
||||
>
|
||||
<el-form-item
|
||||
label="所属医院"
|
||||
:rules="rules.hospitalDepartmentInfoList.hospitalId"
|
||||
:prop="`hospitalDepartmentInfoList.${index}.hospitalId`"
|
||||
>
|
||||
<el-button
|
||||
type=""
|
||||
v-if="item.hospitalName == '请选择所属医院'"
|
||||
@click="clickinnerVisible(item, index)"
|
||||
style="
|
||||
width: 250px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
color: #c0c4cc;
|
||||
overflow: hidden;
|
||||
"
|
||||
>{{ item.hospitalName }}</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="clickinnerVisible(item, index)"
|
||||
type=""
|
||||
v-else
|
||||
style="
|
||||
width: 250px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
padding-left: -10px;
|
||||
overflow: hidden;
|
||||
"
|
||||
>{{ item.hospitalName }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="科室名称"
|
||||
:rules="rules.hospitalDepartmentInfoList.departmentName"
|
||||
:prop="`hospitalDepartmentInfoList.${index}.departmentName`"
|
||||
>
|
||||
<el-input
|
||||
style="width: 250px"
|
||||
v-model="item.departmentName"
|
||||
placeholder="请输入科室名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="科室联系电话"
|
||||
:rules="rules.hospitalDepartmentInfoList.departmentPhone"
|
||||
:prop="`hospitalDepartmentInfoList.${index}.departmentPhone`"
|
||||
>
|
||||
<el-input
|
||||
style="width: 250px"
|
||||
v-model="item.departmentPhone"
|
||||
placeholder="请输入科室联系电话"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="科室负责人"
|
||||
:rules="rules.hospitalDepartmentInfoList.departmentPerson"
|
||||
:prop="`hospitalDepartmentInfoList.${index}.departmentPerson`"
|
||||
>
|
||||
<el-input
|
||||
style="width: 250px"
|
||||
v-model="item.departmentPerson"
|
||||
placeholder="请输入科室负责人名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="科室地址"
|
||||
:rules="rules.hospitalDepartmentInfoList.departmentAddress"
|
||||
:prop="`hospitalDepartmentInfoList.${index}.departmentAddress`"
|
||||
>
|
||||
<el-input
|
||||
style="width: 250px"
|
||||
v-model="item.departmentAddress"
|
||||
placeholder="请输入科室地址"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="科室显示顺序"
|
||||
:rules="rules.hospitalDepartmentInfoList.departmentSort"
|
||||
:prop="`hospitalDepartmentInfoList.${index}.departmentSort`"
|
||||
>
|
||||
<el-input
|
||||
v-model="item.departmentSort"
|
||||
placeholder="请输入科室显示顺序"
|
||||
style="width:250px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
circle
|
||||
plain
|
||||
icon="el-icon-circle-plus-outline"
|
||||
@click="adddisease"
|
||||
v-if="index == 0"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
circle
|
||||
plain
|
||||
@click="deldisease(index)"
|
||||
v-if="index != 0"
|
||||
></el-button></div
|
||||
></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="innerVisible"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
:before-close="innerVisiblecancel"
|
||||
>
|
||||
<el-form
|
||||
ref="queryForm"
|
||||
:model="hospitalqueryParams"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="医院编码" prop="hospitalCode" label-width="120">
|
||||
<el-input
|
||||
v-model="hospitalqueryParams.hospitalCode"
|
||||
placeholder="请输入科室编码"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="医院名称" prop="hospitalName" label-width="120">
|
||||
<el-input
|
||||
v-model="hospitalqueryParams.hospitalName"
|
||||
placeholder="请输入医院名称"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="info"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="addresetQuery"
|
||||
>重置</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.hospitalId == scope.row.id"
|
||||
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="hospitalCode"
|
||||
label="医院编码"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="hospitalName"
|
||||
label="医院名称"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
property="hospitalAddress"
|
||||
label="医院地址"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column
|
||||
property="hospitalIntroduce"
|
||||
label="医院介绍"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
property="phone"
|
||||
label="联系电话"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
:page.sync="hospitalqueryParams.pageNum"
|
||||
:limit.sync="hospitalqueryParams.pageSize"
|
||||
@pagination="info"
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- 修改护理站部门信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<el-form-item label="所属医院" prop="hospitalName">
|
||||
<el-input
|
||||
v-model="form.hospitalName"
|
||||
disabled
|
||||
placeholder="请输入所属医院"
|
||||
style="width: 250px"
|
||||
maxlength="15"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="科室名称" prop="departmentName">
|
||||
<el-input
|
||||
v-model="form.departmentName"
|
||||
placeholder="请输入科室名称"
|
||||
style="width: 250px"
|
||||
maxlength="15"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="科室负责人" prop="departmentPerson">
|
||||
<el-input
|
||||
v-model="form.departmentPerson"
|
||||
placeholder="请输入科室负责人"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="科室联系电话" prop="departmentPhone">
|
||||
<el-input
|
||||
v-model="form.departmentPhone"
|
||||
placeholder="请输入联系电话"
|
||||
maxlength="11"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="科室地址" prop="departmentAddress">
|
||||
<el-input
|
||||
v-model="form.departmentAddress"
|
||||
placeholder="请输入科室地址"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="科室显示顺序" prop="departmentSort">
|
||||
<el-input
|
||||
v-model="form.departmentSort"
|
||||
placeholder="请输入科室显示顺序"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
list,
|
||||
listHospitalDepartment,
|
||||
getHospitalDepartment,
|
||||
delHospitalDepartment,
|
||||
addHospitalDepartment,
|
||||
updateHospitalDepartment,
|
||||
} from "@/api/system/hospitalDepartment";
|
||||
import { get } from "http";
|
||||
|
||||
export default {
|
||||
name: "HospitalDepartment",
|
||||
data() {
|
||||
// 验证手机号的规则
|
||||
var checkMobile = (rule, value, cb) => {
|
||||
// 验证手机号的正则表达式
|
||||
const regMobile =
|
||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
if (regMobile.test(value)) {
|
||||
return cb();
|
||||
}
|
||||
cb(new Error("请输入正确的联系电话"));
|
||||
};
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
hospitalqueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
hospitalCode:"",
|
||||
hospitalName:"",
|
||||
},
|
||||
infolist: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
addopen: false,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
total2: 0,
|
||||
// 科室信息管理表格数据
|
||||
hospitalDepartmentList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
innerVisible: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
parentId: null,
|
||||
hospitalId: null,
|
||||
hospitalName: null,
|
||||
hospitalCode: null,
|
||||
departmentCode: null,
|
||||
departmentName: null,
|
||||
departmentPhone: null,
|
||||
departmentPerson: null,
|
||||
departmentAddress: null,
|
||||
departmentLevel: null,
|
||||
departmentSort: null,
|
||||
},
|
||||
homenumber: null,
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
//选择所属医院对应的下标
|
||||
nnerVisibleindex: "",
|
||||
// 表单校验
|
||||
|
||||
rules: {
|
||||
hospitalDepartmentInfoList: {
|
||||
hospitalId: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择所属医院",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
|
||||
departmentSort: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择科室显示排序",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
departmentName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择科室名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
departmentPerson: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择科室负责人",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
departmentPhone: [
|
||||
{
|
||||
required: true,
|
||||
validator: checkMobile,
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
},
|
||||
],
|
||||
departmentAddress: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择科室地址",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
departmentName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择科室名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
departmentPerson: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择科室负责人",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
departmentPhone: [
|
||||
{
|
||||
required: true,
|
||||
validator: checkMobile,
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
},
|
||||
],
|
||||
departmentAddress: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择科室地址",
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
},
|
||||
],
|
||||
departmentSort: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择科室显示顺序",
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
},
|
||||
],
|
||||
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.info();
|
||||
},
|
||||
methods: {
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.addopen = false;
|
||||
// this.reset();
|
||||
},
|
||||
|
||||
innerVisiblecancel() {
|
||||
this.innerVisible = false;
|
||||
},
|
||||
// add
|
||||
|
||||
nurseclick(row) {
|
||||
console.log(row);
|
||||
// if (this.homenumber) {
|
||||
// console.log(this.homenumber);
|
||||
// this.form.hospitalName = row.hospitalName;
|
||||
// this.form.hospitalId = row.id;
|
||||
// } else {
|
||||
this.form.hospitalDepartmentInfoList[
|
||||
this.nnerVisibleindex
|
||||
].hospitalName = row.hospitalName;
|
||||
this.form.hospitalDepartmentInfoList[this.nnerVisibleindex].hospitalId =
|
||||
row.id;
|
||||
// }
|
||||
this.innerVisible = false;
|
||||
},
|
||||
|
||||
//删除deldisease
|
||||
deldisease(index) {
|
||||
this.form.hospitalDepartmentInfoList.splice(index, 1);
|
||||
},
|
||||
adddisease() {
|
||||
var obj = {
|
||||
hospitalId: "",
|
||||
departmentCode: "",
|
||||
departmentName: "",
|
||||
departmentPerson: "",
|
||||
departmentPhone: "",
|
||||
hospitalName: "请选择所属医院",
|
||||
};
|
||||
if (this.form.hospitalDepartmentInfoList.length == 5) {
|
||||
this.$message.error("最多只能5条");
|
||||
} else {
|
||||
this.form.hospitalDepartmentInfoList.push(obj);
|
||||
}
|
||||
},
|
||||
// 新增医院按钮
|
||||
clickinnerVisible(item, index) {
|
||||
this.addresetQuery();
|
||||
this.form.hospitalId = item.hospitalId;
|
||||
this.nnerVisibleindex = index;
|
||||
console.log(this.nnerVisibleindex);
|
||||
this.innerVisible = true;
|
||||
// this.homenumber = item;
|
||||
},
|
||||
//修改医院按钮
|
||||
clickitem() {
|
||||
this.addresetQuery();
|
||||
// this.form.hospitalId = item.hospitalId;
|
||||
this.innerVisible = true;
|
||||
},
|
||||
addresetQuery() {
|
||||
this.hospitalqueryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
hospitalCode:"",
|
||||
hospitalName:"",
|
||||
};
|
||||
this.info();
|
||||
},
|
||||
/** 查询科室信息管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listHospitalDepartment(this.queryParams).then((response) => {
|
||||
this.hospitalDepartmentList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
info() {
|
||||
list(this.hospitalqueryParams,).then((response) => {
|
||||
this.infolist = response.rows;
|
||||
console.log(this.infolist)
|
||||
this.total2 = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.addopen = false;
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
hospitalDepartmentInfoList: [
|
||||
{
|
||||
hospitalId: "",
|
||||
departmentCode: "",
|
||||
departmentName: "",
|
||||
departmentPerson: "",
|
||||
departmentPhone: "",
|
||||
departmentSort: "",
|
||||
departmentAddress: "",
|
||||
hospitalName: "请选择所属医院",
|
||||
},
|
||||
],
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
hospitalName:"",
|
||||
departmentCode:"",
|
||||
departmentName:"",
|
||||
};
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.addopen = true;
|
||||
this.title = "添加科室信息管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
this.form.hospitalId = row.id;
|
||||
getHospitalDepartment(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改科室信息管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateHospitalDepartment(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addHospitalDepartment(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.addopen = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm('是否确认删除科室信息管理编号为"' + ids + '"的数据项?')
|
||||
.then(function () {
|
||||
return delHospitalDepartment(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/hospitalDepartment/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`hospitalDepartment_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
1481
src/views/system/hospitalPerson/index.vue
Normal file
1481
src/views/system/hospitalPerson/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
807
src/views/system/informationInfo/index.vue
Normal file
807
src/views/system/informationInfo/index.vue
Normal file
@ -0,0 +1,807 @@
|
||||
<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="informationTitle">
|
||||
<el-input
|
||||
v-model="queryParams.informationTitle"
|
||||
placeholder="请输入资讯标题"
|
||||
maxlength="100"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="资讯分类" prop="informationCategoryId">
|
||||
<el-button
|
||||
type=""
|
||||
v-if="queryParams.informationCategoryName == '请选择资讯分类'"
|
||||
@click="clickitem()"
|
||||
style="
|
||||
width: 250px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
color: #c0c4cc;
|
||||
overflow: hidden;
|
||||
"
|
||||
>{{ queryParams.informationCategoryName }}</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="clickitem()"
|
||||
type=""
|
||||
v-else
|
||||
style="
|
||||
width: 250px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
padding-left: -10px;
|
||||
overflow: hidden;
|
||||
"
|
||||
>{{ queryParams.informationCategoryName }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<!-- </el-form-item> -->
|
||||
<el-form-item label="资讯编码" prop="informationCode">
|
||||
<el-input
|
||||
v-model="queryParams.informationCode"
|
||||
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:informationInfo: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:informationInfo: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:informationInfo:remove']"
|
||||
>删除</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:informationInfo:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="informationInfoList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
||||
|
||||
<el-table-column
|
||||
label="资讯标题"
|
||||
align="center"
|
||||
prop="informationTitle"
|
||||
/>
|
||||
|
||||
<el-table-column label="资讯编码" align="center" prop="informationCode" />
|
||||
<el-table-column
|
||||
label="资讯分类"
|
||||
align="center"
|
||||
prop="informationCategoryName"
|
||||
/>
|
||||
<el-table-column label="显示顺序" align="center" prop="informationSort" />
|
||||
<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:informationInfo:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:informationInfo: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="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改资讯信息管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="140px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="资讯标题" prop="informationTitle">
|
||||
<el-input
|
||||
v-model="form.informationTitle"
|
||||
maxlength="100"
|
||||
placeholder="请输入资讯标题"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="资讯分类" prop="informationCategoryId">
|
||||
<el-button
|
||||
type=""
|
||||
v-if="form.informationCategoryName == '请选择资讯分类'"
|
||||
@click="clickinnerVisible()"
|
||||
style="
|
||||
width: 250px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
color: #c0c4cc;
|
||||
overflow: hidden;
|
||||
"
|
||||
>{{ form.informationCategoryName }}</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="clickinnerVisible()"
|
||||
type=""
|
||||
v-else
|
||||
style="
|
||||
width: 250px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
padding-left: -10px;
|
||||
overflow: hidden;
|
||||
"
|
||||
>{{ form.informationCategoryName }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="资讯图标" prop="leadThumbnailUrl">
|
||||
<stationAcatar
|
||||
style="width: 208px"
|
||||
@imgUrl="imgUrl"
|
||||
:img="form.leadThumbnailUrl"
|
||||
:type="'leadThumbnailUrl'"
|
||||
/>
|
||||
<!-- <el-input v-model="form.leadThumbnailUrl" placeholder="请输入资讯主缩略图地址" /> -->
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="显示顺序" prop="informationSort">
|
||||
<el-input
|
||||
v-model="form.informationSort"
|
||||
placeholder="请输入显示顺序"
|
||||
style="width: 250px"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="资讯图文内容" prop="informationContent">
|
||||
<editor
|
||||
@imgs="imgs"
|
||||
maxlength="300"
|
||||
:min-height="102"
|
||||
placeholder="请输入资讯图文内容"
|
||||
style="width: 80%; margin-left: 18%; margin-top: -5%"
|
||||
v-model="form.informationContent"
|
||||
/>
|
||||
</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="innerVisible"
|
||||
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="informationCategoryCode"
|
||||
label-width="120"
|
||||
>
|
||||
<el-input
|
||||
v-model="informationqueryParams.informationCategoryCode"
|
||||
placeholder="请输入资讯分类编码"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="资讯分类名称"
|
||||
prop="informationCategoryName"
|
||||
label-width="120"
|
||||
>
|
||||
<el-input
|
||||
v-model="informationqueryParams.informationCategoryName"
|
||||
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.informationCategoryId == scope.row.id"
|
||||
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="informationCategoryCode"
|
||||
label="资讯分类编码"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="informationCategoryName"
|
||||
label="资讯名称"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column
|
||||
property="hospitalAddress"
|
||||
label="医院地址"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column
|
||||
property="hospitalIntroduce"
|
||||
label="医院介绍"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column
|
||||
property="phone"
|
||||
label="联系电话"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
:page.sync="informationqueryParams.pageNum"
|
||||
:limit.sync="informationqueryParams.pageSize"
|
||||
@pagination="informationInfoinfo"
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- 搜索选择资讯 -->
|
||||
<el-dialog
|
||||
title="选择资讯"
|
||||
:visible.sync="innerVisiblezx"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
:before-close="innerVisiblecancelzx"
|
||||
>
|
||||
<el-form
|
||||
ref="queryForm"
|
||||
:model="informationqueryParams"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item
|
||||
label="资讯分类编码"
|
||||
prop="informationCategoryCode"
|
||||
label-width="120"
|
||||
>
|
||||
<el-input
|
||||
v-model="informationqueryParams.informationCategoryCode"
|
||||
placeholder="请输入资讯分类编码"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="资讯分类名称"
|
||||
prop="informationCategoryName"
|
||||
label-width="120"
|
||||
>
|
||||
<el-input
|
||||
v-model="informationqueryParams.informationCategoryName"
|
||||
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="nurseclickzx"
|
||||
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="queryParams.informationCategoryId == scope.row.id"
|
||||
circle
|
||||
@click="nurseclickzx(scope.row)"
|
||||
></el-button>
|
||||
<el-button
|
||||
v-else
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
@click="nurseclickzx(scope.row)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="informationCategoryCode"
|
||||
label="资讯分类编码"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="informationCategoryName"
|
||||
label="资讯名称"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
:page.sync="informationqueryParams.pageNum"
|
||||
:limit.sync="informationqueryParams.pageSize"
|
||||
@pagination="informationInfoinfo"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listInformationInfo,
|
||||
getInformationInfo,
|
||||
delInformationInfo,
|
||||
addInformationInfo,
|
||||
updateInformationInfo,
|
||||
listInformationCategory,
|
||||
} from "@/api/system/informationInfo";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
import { updatePicture } from "@/api/system/station";
|
||||
export default {
|
||||
components: { stationAcatar },
|
||||
name: "InformationInfo",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
innerVisible: false,
|
||||
innerVisiblezx: false,
|
||||
informationqueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
informationCategoryCode: "",
|
||||
informationCategoryName: "",
|
||||
informationCategoryId: "",
|
||||
},
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 资讯信息管理表格数据
|
||||
informationInfoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
total2: 0,
|
||||
imgsurl: { pictureUrlList: [] },
|
||||
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
informationCategoryName: "请选择资讯分类",
|
||||
informationCategoryId: null,
|
||||
informationTitle: null,
|
||||
informationCode: null,
|
||||
informationContent: null,
|
||||
informationClickCount: null,
|
||||
informationJumpLink: null,
|
||||
informationSource: null,
|
||||
leadThumbnailUrl: null,
|
||||
negativeOneThumbnailUrl: null,
|
||||
negativeTwoThumbnailUrl: null,
|
||||
largePictureUrl: null,
|
||||
informationSort: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
informationCategoryId: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择资讯分类",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
informationTitle: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择资讯标题",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
leadThumbnailUrl: [
|
||||
{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
message: "请选择缩略图",
|
||||
},
|
||||
],
|
||||
informationSort: [
|
||||
{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
message: "请输入显示顺序",
|
||||
},
|
||||
],
|
||||
// informationContent: [
|
||||
// { required: true, message: "请输入资讯图文内容", trigger: "blur" },
|
||||
// ],
|
||||
informationContent: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入资讯图文内容",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
infolist: [],
|
||||
imgone: "",
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
innerVisiblecancel() {
|
||||
this.innerVisible = false;
|
||||
},
|
||||
innerVisiblecancelzx() {
|
||||
this.innerVisiblezx = false;
|
||||
},
|
||||
|
||||
//重置
|
||||
addresetQuery() {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
informationCategoryCode: "",
|
||||
informationTitle: "",
|
||||
informationCategoryName: "",
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
addresetQuerylist() {
|
||||
this.informationqueryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
informationCategoryCode: "",
|
||||
informationCategoryName: "",
|
||||
};
|
||||
this.informationInfoinfo();
|
||||
},
|
||||
informationInfoinfo() {
|
||||
listInformationCategory(this.informationqueryParams).then((response) => {
|
||||
this.infolist = response.rows;
|
||||
console.log(this.infolist);
|
||||
this.total2 = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
// 新增按钮
|
||||
clickinnerVisible() {
|
||||
this.informationInfoinfo();
|
||||
this.innerVisible = true;
|
||||
},
|
||||
clickitem() {
|
||||
this.informationInfoinfo();
|
||||
this.innerVisiblezx = true;
|
||||
},
|
||||
imgUrl(imgUrl) {
|
||||
this.form.leadThumbnailUrl = imgUrl;
|
||||
},
|
||||
imgs(item) {
|
||||
this.imgsurl.pictureUrlList.push(item);
|
||||
},
|
||||
/** 查询资讯信息管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listInformationInfo(this.queryParams).then((response) => {
|
||||
this.informationInfoList = response.rows;
|
||||
console.log(this.informationInfoList);
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.imgone != this.form.leadThumbnailUrl) {
|
||||
if (this.form.leadThumbnailUrl) {
|
||||
obj.pictureUrlList.push(this.form.leadThumbnailUrl);
|
||||
}
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
if (this.imgsurl.pictureUrlList.length > 0) {
|
||||
updatePicture(this.imgsurl).then((res) => {});
|
||||
}
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
nurseclick(row) {
|
||||
console.log(row);
|
||||
this.form.informationCategoryId = row.id;
|
||||
this.form.informationCategoryName = row.informationCategoryName;
|
||||
this.innerVisible = false;
|
||||
},
|
||||
nurseclickzx(row) {
|
||||
this.queryParams.informationCategoryId = row.id;
|
||||
this.queryParams.informationCategoryName = row.informationCategoryName;
|
||||
this.innerVisiblezx = false;
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
informationCategoryId: null,
|
||||
informationTitle: null,
|
||||
informationCode: null,
|
||||
informationContent: null,
|
||||
informationClickCount: null,
|
||||
informationJumpLink: null,
|
||||
informationSource: null,
|
||||
leadThumbnailUrl: null,
|
||||
negativeOneThumbnailUrl: null,
|
||||
negativeTwoThumbnailUrl: null,
|
||||
largePictureUrl: null,
|
||||
informationSort: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
informationCategoryCode: "",
|
||||
informationCategoryName: "请选择资讯分类",
|
||||
// informationCategoryName:"",
|
||||
};
|
||||
this.informationInfoinfo();
|
||||
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.form.informationCategoryName = "请选择资讯分类";
|
||||
this.title = "添加资讯信息管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getInformationInfo(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.imgone = this.form.leadThumbnailUrl;
|
||||
this.open = true;
|
||||
this.title = "修改资讯信息管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateInformationInfo(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.imgone != this.form.leadThumbnailUrl) {
|
||||
obj.pictureUrlList.push(this.imgone);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
this.form.informationSort = parseInt(this.form.informationSort);
|
||||
addInformationInfo(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 delInformationInfo(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/informationInfo/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`informationInfo_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -8,7 +8,6 @@
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
|
||||
<el-form-item label="护理类型编码" prop="nurseTypeCode">
|
||||
<el-input
|
||||
v-model="queryParams.nurseTypeCode"
|
||||
@ -110,17 +109,9 @@
|
||||
align="center"
|
||||
prop="nurseTypeName"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
/>
|
||||
<el-table-column
|
||||
label="创建人"
|
||||
align="center"
|
||||
prop="createBy"
|
||||
/>
|
||||
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="创建人" align="center" prop="createBy" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
@ -156,59 +147,66 @@
|
||||
/>
|
||||
|
||||
<!-- 添加或修改护理类型信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open2" width="450px" append-to-body>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open2"
|
||||
width="450px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<div
|
||||
v-for="(item, index) in form.nurseTypeList"
|
||||
:key="index"
|
||||
style="margin-top:10px"
|
||||
style="margin-top: 10px"
|
||||
>
|
||||
<el-form-item label="护理类型名称"
|
||||
:rules="rules.nurseTypeList.nurseTypeName"
|
||||
:prop="`nurseTypeList.${index}.nurseTypeName`">
|
||||
<el-form-item
|
||||
label="护理类型名称"
|
||||
:rules="rules.nurseTypeList.nurseTypeName"
|
||||
:prop="`nurseTypeList.${index}.nurseTypeName`"
|
||||
>
|
||||
<el-input
|
||||
v-model="item.nurseTypeName"
|
||||
placeholder="请输入护理类型名称"
|
||||
maxlength="50"
|
||||
style="width: 200px"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
circle
|
||||
plain
|
||||
icon="el-icon-circle-plus-outline"
|
||||
@click="adddisease"
|
||||
v-if="index == 0"
|
||||
style="margin-top: 2px;margin-left: 10px;"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
circle
|
||||
plain
|
||||
icon="el-icon-circle-plus-outline"
|
||||
@click="adddisease"
|
||||
v-if="index == 0"
|
||||
style="margin-top: 2px; margin-left: 10px"
|
||||
></el-button>
|
||||
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
circle
|
||||
plain
|
||||
@click="deldisease(index)"
|
||||
style="margin-top: 2px;margin-left: 10px;"
|
||||
v-if="index != 0"
|
||||
></el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
circle
|
||||
plain
|
||||
@click="deldisease(index)"
|
||||
style="margin-top: 2px; margin-left: 10px"
|
||||
v-if="index != 0"
|
||||
></el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</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="500px" append-to-body>
|
||||
<!-- 修改疾病信息字典对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<el-form-item label="护理类型名称" prop="nurseTypeName">
|
||||
<el-input
|
||||
v-model="form.nurseTypeName"
|
||||
placeholder="请输入护理类型名称"
|
||||
maxlength="50"
|
||||
style="width: 250px"
|
||||
/>
|
||||
<el-input
|
||||
v-model="form.nurseTypeName"
|
||||
placeholder="请输入护理类型名称"
|
||||
maxlength="50"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -216,7 +214,6 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -243,7 +240,6 @@ export default {
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 护理类型信息表格数据
|
||||
@ -260,7 +256,6 @@ export default {
|
||||
userId: null,
|
||||
nurseTypeCode: null,
|
||||
nurseTypeName: null,
|
||||
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -276,12 +271,12 @@ export default {
|
||||
],
|
||||
},
|
||||
nurseTypeName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入护理类型名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
{
|
||||
required: true,
|
||||
message: "请输入护理类型名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
@ -289,8 +284,8 @@ export default {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
//删除deldisease
|
||||
deldisease(index) {
|
||||
//删除deldisease
|
||||
deldisease(index) {
|
||||
this.form.nurseTypeList.splice(index, 1);
|
||||
},
|
||||
adddisease() {
|
||||
@ -303,7 +298,7 @@ export default {
|
||||
this.form.nurseTypeList.push(obj);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/** 查询护理类型信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
@ -322,11 +317,11 @@ export default {
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
nurseTypeList:[
|
||||
nurseTypeList: [
|
||||
{
|
||||
nurseTypeName:"",
|
||||
}
|
||||
]
|
||||
nurseTypeName: "",
|
||||
},
|
||||
],
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -364,8 +359,8 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
if(this.form==null){
|
||||
this.form.nurseTypeName = this.form.nurseTypeList[0].nurseTypeName
|
||||
if (this.form == null) {
|
||||
this.form.nurseTypeName = this.form.nurseTypeList[0].nurseTypeName;
|
||||
}
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
@ -389,7 +384,7 @@ export default {
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm('是否确认删除护理类型信息的数据项?')
|
||||
.confirm("是否确认删除护理类型信息的数据项?")
|
||||
.then(function () {
|
||||
return delNurseType(ids);
|
||||
})
|
||||
|
||||
@ -169,6 +169,7 @@
|
||||
:visible.sync="open2"
|
||||
width="1048px"
|
||||
append-to-body
|
||||
:before-close="cancel"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
@ -310,7 +311,7 @@
|
||||
<el-input
|
||||
v-model="item.phone"
|
||||
placeholder="请输入联系电话"
|
||||
maxlength="11"
|
||||
maxlength="13"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@ -742,8 +743,14 @@
|
||||
@pagination="getList3"
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- 修改 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<!-- 修改护理站人员信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
width="500px"
|
||||
append-to-body
|
||||
:before-close="cancel"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item
|
||||
label="所属护理站"
|
||||
@ -840,7 +847,7 @@
|
||||
<el-input
|
||||
v-model="form.phone"
|
||||
placeholder="请输入联系电话"
|
||||
maxlength="11"
|
||||
maxlength="13"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="居住地址" prop="address">
|
||||
|
||||
@ -16,9 +16,14 @@ export default {
|
||||
// 验证手机号的规则
|
||||
var checkMobile = (rule, value, cb) => {
|
||||
// 验证手机号的正则表达式
|
||||
const regMobile =
|
||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
if (regMobile.test(value)) {
|
||||
// const regMobile =
|
||||
// /^((0\d{2,3}(-)?\d{7,8})|(13[0-9]|14[0-9]|15[0-9]|16[2567]|17[0-9]|18[0-9]|19[0-9])+\d{8})$/;;
|
||||
const isPhone = /^1([38][0-9]|4[014-9]|[59][0-35-9]|6[2567]|7[0-8])\d{8}$/ //11位合法手机号码
|
||||
const isMob0 = /0\d{2,3}\d{7,8}/ //不带-的座机:02985111752
|
||||
const isMob1 = /^([0-9]{3,4}-)?[0-9]{7,8}$/ //带一个-:029-85111752
|
||||
const isMob2 = /^([0-9]{3,4}-)?[0-9]{7,8}$/ //带二个-:029-8511-1752
|
||||
const isMob3 = /^\d{3,4}-\d{3,4}-\d{3,4}$/; //带三个-: 0752-250-520
|
||||
if (isPhone.test(value) || isMob0.test(value) || isMob1.test(value) || isMob2.test(value) || isMob3.test(value)) {
|
||||
return cb();
|
||||
}
|
||||
cb(new Error("请输入正确的联系电话"));
|
||||
@ -26,9 +31,12 @@ export default {
|
||||
// 验证手机号的规则
|
||||
var checkMobile2 = (rule, value, cb) => {
|
||||
// 验证手机号的正则表达式
|
||||
const regMobile =
|
||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
if (regMobile.test(value)) {
|
||||
// const regMobile =
|
||||
// /^((0\d{2,3}(-)?\d{7,8})|(13[0-9]|14[0-9]|15[0-9]|16[2567]|17[0-9]|18[0-9]|19[0-9])+\d{8})$/;;
|
||||
const isPhone = /^1([38][0-9]|4[014-9]|[59][0-35-9]|6[2567]|7[0-8])\d{8}$/ //11位合法手机号码
|
||||
const isMob1 = /0\d{2,3}\d{7,8}/ //不带-的座机:02985111752
|
||||
const isMob2 = /^([0-9]{3,4}-)?[0-9]{7,8}$/ //带一个-:029-85111752
|
||||
if (isPhone.test(value) || isMob1.test(value) || isMob2.test(value)) {
|
||||
return cb();
|
||||
}
|
||||
cb(new Error("请输入正确的联系电话"));
|
||||
@ -53,15 +61,12 @@ export default {
|
||||
value: "NURSE_TEACHER",
|
||||
},
|
||||
],
|
||||
|
||||
innerVisible: false,
|
||||
innerVisible2: false,
|
||||
innerVisiblexg: false,
|
||||
innerVisiblexg2: false,
|
||||
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
@ -585,4 +590,4 @@ export default {
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
983
src/views/system/poser/index.vue
Normal file
983
src/views/system/poser/index.vue
Normal file
@ -0,0 +1,983 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="110px"
|
||||
>
|
||||
<el-form-item label="护理站名称" prop="nurseStationId">
|
||||
<el-button type class="stationbtn" @click="ParamsStation(true)">
|
||||
{{
|
||||
queryParams.nurseStationName
|
||||
}}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理项目" prop="nurseItemId" label-width="100px">
|
||||
<el-button type class="stationbtn" @click="ParamsStationxm(true)">
|
||||
{{
|
||||
queryParams.nurseItemName
|
||||
}}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="海报名称" prop="poserName">
|
||||
<el-input
|
||||
v-model="queryParams.poserName"
|
||||
placeholder="请输入海报名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="海报所属模块" prop="moduleType">
|
||||
<el-select v-model="queryParams.moduleType" placeholder="请选择" style="width: 208px">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="海报编号" prop="poserCode">
|
||||
<el-input
|
||||
v-model="queryParams.poserCode"
|
||||
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:poser: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:poser: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:poser:remove']"
|
||||
>删除</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:poser:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="poserList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="所属护理站" 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="poserCode" />
|
||||
<el-table-column label="海报所属模块" align="center" prop="moduleType">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
scope.row.moduleType == "NURSE_AGENCY_MODULE" ? "护理机构模块" : ""
|
||||
}}
|
||||
{{
|
||||
scope.row.moduleType == "NURSE_ITEM_MODULE" ? "护理项目模块" : ""
|
||||
}}
|
||||
{{
|
||||
scope.row.moduleType == "HEALTH_CONSUTION_MODULE"
|
||||
? "健康咨询模块"
|
||||
: ""
|
||||
}}
|
||||
{{ scope.row.moduleType == "HOME_PAGE_MODULE" ? "首页模块" : "" }}
|
||||
{{
|
||||
scope.row.moduleType == "NURSE_AGENCY_INTRODUCE_MODULE"
|
||||
? "护理机构轮播图"
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="海报显示顺序" align="center" prop="poserSort" />
|
||||
<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:poser:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:poser: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="getList"
|
||||
/>
|
||||
<!-- 添加或修改泉医到家系统海报模块信息(包含咨询简介信息)对话框 -->
|
||||
<el-dialog
|
||||
:title="!isEditFlag ? '添加海报模块信息' : '修改海报模块信息'"
|
||||
:visible.sync="open"
|
||||
width="1100px"
|
||||
:before-close="cancel"
|
||||
append-to-body
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px" :inline="true">
|
||||
<el-form-item label="海报名称" prop="poserName">
|
||||
<el-input v-model="form.poserName" placeholder="请输入海报名称" maxlength="50" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="海报所属模块" prop="moduleType">
|
||||
<el-select
|
||||
v-model="form.moduleType"
|
||||
placeholder="请选择"
|
||||
style="width: 208px"
|
||||
:disabled="isEditFlag"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="海报显示顺序" prop="poserSort">
|
||||
<el-input
|
||||
v-model.number="form.poserSort"
|
||||
placeholder="请输入海报显示顺序"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxlength="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="所属护理站"
|
||||
prop="nurseStationId"
|
||||
v-if="
|
||||
form.moduleType == 'NURSE_AGENCY_MODULE' ||
|
||||
form.moduleType == 'NURSE_ITEM_MODULE'
|
||||
"
|
||||
>
|
||||
<template>
|
||||
<el-button
|
||||
type
|
||||
@click="ParamsStation(false)"
|
||||
:disabled="isEditFlag"
|
||||
style="
|
||||
width: 208px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #c0c4cc;
|
||||
"
|
||||
v-if="form.nurseStationName == '请选择所属护理站'"
|
||||
>{{ form.nurseStationName }}</el-button>
|
||||
<el-button
|
||||
type
|
||||
style="
|
||||
width: 208px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
"
|
||||
@click="ParamsStation(false)"
|
||||
:disabled="isEditFlag"
|
||||
v-else
|
||||
>{{ form.nurseStationName }}</el-button>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="所属护理项目"
|
||||
prop="nurseItemId"
|
||||
v-if="form.moduleType == 'NURSE_ITEM_MODULE'"
|
||||
>
|
||||
<template>
|
||||
<el-button
|
||||
:disabled="isEditFlag"
|
||||
type
|
||||
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 == '请选择所属护理项目'"
|
||||
>{{ form.nurseItemName }}</el-button>
|
||||
<el-button
|
||||
:disabled="isEditFlag"
|
||||
type
|
||||
style="
|
||||
width: 208px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
"
|
||||
@click="ParamsStationxm(false)"
|
||||
v-else
|
||||
>{{ form.nurseItemName }}</el-button>
|
||||
</template>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="海报图片" prop="posterPictureUrl">
|
||||
<el-table label-width="50px" style="margin-top: 20px" :data="form.posterPictureUrlLists">
|
||||
<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">
|
||||
<el-select v-model="scope.row.jumpType" placeholder="请选择" style="width: 208px">
|
||||
<el-option
|
||||
v-for="item in jumpTypes"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="addPictureUrl">新增</el-button>
|
||||
<el-button size="mini" type="text" @click="delPictureUrl(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
<el-form-item label="海报简介">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
style="width: 540px"
|
||||
placeholder="请输入海报简介"
|
||||
v-model="form.posterIntroduce"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="海报视频">
|
||||
<!-- <video
|
||||
v-if="videoForm.showVideoPath != ''"
|
||||
v-bind:src="videoForm.showVideoPath"
|
||||
class="avatar video-avatar"
|
||||
controls="controls"
|
||||
>
|
||||
您的浏览器不支持视频播放
|
||||
</video>-->
|
||||
<stationAcatar
|
||||
style="width: 208px"
|
||||
@imgUrl="imgUrl2"
|
||||
:tovideo="form.posterVideoUrl"
|
||||
:type="'posterVideoUrl'"
|
||||
v-if="open"
|
||||
/>
|
||||
</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="nurseStationshow"
|
||||
width="1100px"
|
||||
append-to-body
|
||||
:before-close="clicknurseStationshow"
|
||||
>
|
||||
<el-form ref="form" :model="getListByUserquery" label-width="110px" :inline="true">
|
||||
<el-form-item label="护理站编码" prop="nurseStationCode">
|
||||
<el-input v-model="getListByUserquery.nurseStationCode" placeholder="请输入护理站编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input v-model="getListByUserquery.nurseStationName" placeholder="请输入护理站名称" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<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>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="nurseStationlist" @cell-dblclick="choicestationid">
|
||||
<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)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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>
|
||||
<el-table-column
|
||||
property="address"
|
||||
label="护理站地址"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total4 > 0"
|
||||
:total="total4"
|
||||
:page.sync="getListByUserquery.pageNum"
|
||||
:limit.sync="getListByUserquery.pageSize"
|
||||
@pagination="info"
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- 护理项目 -->
|
||||
<el-dialog
|
||||
title="选择所属护理项目"
|
||||
:visible.sync="nurseItemshow"
|
||||
width="1100px"
|
||||
append-to-body
|
||||
:before-close="cancelnurseItemshow"
|
||||
>
|
||||
<el-form :model="nurseItemquery" label-width="150px" :inline="true">
|
||||
<el-form-item label="护理项目编码" prop="nurseItemCode">
|
||||
<el-input v-model="nurseItemquery.nurseItemCode" placeholder="请输入护理项目编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="护理项目名称" prop="nurseItemName">
|
||||
<el-input v-model="nurseItemquery.nurseItemName" placeholder="请输入护理项目名称" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<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>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="nurseItemlist" @cell-dblclick="choicenurseItem">
|
||||
<el-table-column label="请选择" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
@click="choicenurseItem(scope.row)"
|
||||
v-if="nurseitemid == scope.row.id"
|
||||
></el-button>
|
||||
|
||||
<el-button
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
v-else
|
||||
@click="choicenurseItem(scope.row)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属护理站" align="center" prop="nurseStationName" />
|
||||
<!-- <el-table-column label="护理类型" align="center" prop="nurseTypeName" /> -->
|
||||
<el-table-column label="护理项目编号" align="center" 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="createBy" />
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="nurseItemtotal > 0"
|
||||
:total="nurseItemtotal"
|
||||
:page.sync="nurseItemquery.pageNum"
|
||||
:limit.sync="nurseItemquery.pageSize"
|
||||
@pagination="nurseItemlistInfo"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import baseurl from "@/api/baseurl.js";
|
||||
import {
|
||||
listPoser,
|
||||
getPoser,
|
||||
delPoser,
|
||||
addPoser,
|
||||
getListByUser,
|
||||
updatePoser,
|
||||
updatePicture
|
||||
} from "@/api/system/poser";
|
||||
import { list } from "@/api/system/nurseItem";
|
||||
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,
|
||||
pageSize: 10
|
||||
},
|
||||
nurseStationlist: [],
|
||||
nurseStationshow: false,
|
||||
imgs: { pictureUrlList: [] },
|
||||
// 选中数组
|
||||
ids: [],
|
||||
nurseItemIds: [],
|
||||
moduleTypes: [],
|
||||
itemids: [],
|
||||
Types: [],
|
||||
idd: 9999999,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
nurseItemshow: false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
total2: 0,
|
||||
total4: 0,
|
||||
nurseItemtotal: 0,
|
||||
nurseItemlist: [],
|
||||
// 泉医到家系统海报模块信息(包含咨询简介信息)表格数据
|
||||
poserList: [],
|
||||
nurseItemList: [],
|
||||
// 弹出层判断新增还是修改
|
||||
isEditFlag: false,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
nurseItemquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseItemCode: null,
|
||||
nurseItemName: null
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationId: null,
|
||||
nurseItemId: null,
|
||||
nursenurseItemId: null,
|
||||
poserName: null,
|
||||
poserCode: null,
|
||||
posterIntroduce: null,
|
||||
posterPictureUrl: null,
|
||||
posterVideoUrl: null,
|
||||
moduleType: null,
|
||||
poserSort: null,
|
||||
jumpLink: null,
|
||||
jumpType: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
nurseStationId: null,
|
||||
nurseTypeId: null,
|
||||
nurseItemName: "",
|
||||
nurseItemContent: "",
|
||||
advanceAppointDuration: "",
|
||||
itemPictureUrl: "",
|
||||
poserSort: null,
|
||||
nurseStationId: null,
|
||||
nurseStationName: "请选择所属护理站",
|
||||
nurseItemName: "请选择所属护理项目",
|
||||
nurseItemId: null
|
||||
},
|
||||
imgsurl: { pictureUrlList: [] },
|
||||
// 表单校验
|
||||
rules: {
|
||||
moduleType: [
|
||||
{ required: true, message: "请选择海报所属模块", trigger: "blur" }
|
||||
],
|
||||
poserName: [
|
||||
{ required: true, message: "请输入海报名称", trigger: "blur" }
|
||||
],
|
||||
nurseStationId: [
|
||||
{ required: true, message: "请选择所属护理站", trigger: "blur" }
|
||||
],
|
||||
posterIntroduce: [
|
||||
{ required: true, message: "请输入海报简介", trigger: "blur" }
|
||||
],
|
||||
|
||||
posterVideoUrl: [
|
||||
{ required: true, message: "请选择海报视频", trigger: "blur" }
|
||||
],
|
||||
poserSort: [
|
||||
{ required: true, message: "请输入海报顺序", trigger: "blur" }
|
||||
],
|
||||
nurseItemId: [
|
||||
{ required: true, message: "请选择所属护理项目", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
options: [
|
||||
{
|
||||
value: "NURSE_AGENCY_MODULE",
|
||||
label: "护理机构模块"
|
||||
},
|
||||
{
|
||||
value: "NURSE_ITEM_MODULE",
|
||||
label: "护理项目模块"
|
||||
},
|
||||
{
|
||||
value: "HEALTH_CONSUTION_MODULE",
|
||||
label: "健康咨询模块"
|
||||
},
|
||||
{
|
||||
value: "HOME_PAGE_MODULE",
|
||||
label: "首页模块"
|
||||
},
|
||||
{
|
||||
value: "NURSE_AGENCY_INTRODUCE_MODULE",
|
||||
label: "护理机构轮播图"
|
||||
}
|
||||
],
|
||||
|
||||
objitem: [],
|
||||
jumpTypes: [
|
||||
{
|
||||
value: "NEW_PEOPLE_WELFARE",
|
||||
label: "新人福利"
|
||||
},
|
||||
{
|
||||
value: "HOME_PAGE",
|
||||
label: "首页"
|
||||
},
|
||||
{
|
||||
value: "SHOPPING",
|
||||
label: "商城"
|
||||
}
|
||||
],
|
||||
//页面链接
|
||||
stationid: "",
|
||||
imgone: [],
|
||||
nurseitemid: "",
|
||||
homenumber: false,
|
||||
videourl: "",
|
||||
videoFlag: false,
|
||||
//是否显示进度条
|
||||
videoUploadPercent: "",
|
||||
//进度条的进度,
|
||||
isShowUploadVideo: false,
|
||||
//显示上传按钮
|
||||
videoForm: {
|
||||
showVideoPath: "" //回显的变量
|
||||
},
|
||||
// 存储新上传的图片数组
|
||||
deletNewImgs: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.videourl = baseurl + "/system/station/updateNurseStationHeads";
|
||||
this.getList();
|
||||
this.nurseItemlistInfo();
|
||||
},
|
||||
methods: {
|
||||
//删除海报图片列表
|
||||
delPictureUrl(item) {
|
||||
console.log(item);
|
||||
if (item.idd && !item.id) {
|
||||
if (this.form.posterPictureUrlLists.length == 1) {
|
||||
this.$message.error("最后一条不可删除");
|
||||
} else {
|
||||
this.form.posterPictureUrlLists = this.form.posterPictureUrlLists.filter(
|
||||
e => e.idd != item.idd
|
||||
);
|
||||
}
|
||||
} else if (!item.idd && item.id) {
|
||||
if (this.form.posterPictureUrlLists.length == 1) {
|
||||
this.$message.error("最后一条不可删除");
|
||||
} else {
|
||||
this.form.posterPictureUrlLists = this.form.posterPictureUrlLists.filter(
|
||||
e => e.id != item.id
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
//新增海报图片列表
|
||||
addPictureUrl() {
|
||||
this.idd++;
|
||||
var obj = {
|
||||
posterPictureUrl: "",
|
||||
jumpType: "",
|
||||
idd: this.idd
|
||||
};
|
||||
if (this.form.posterPictureUrlLists.length >= 5) {
|
||||
this.$message.error("最多新增5条");
|
||||
} else {
|
||||
this.form.posterPictureUrlLists.push(obj);
|
||||
}
|
||||
},
|
||||
//打开遮罩层
|
||||
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,
|
||||
nurseItemName: null
|
||||
};
|
||||
this.nurseItemlistInfo();
|
||||
},
|
||||
//搜索
|
||||
nurseItemlistInfo() {
|
||||
list(this.nurseItemquery).then(res => {
|
||||
this.nurseItemlist = res.rows;
|
||||
this.nurseItemtotal = res.total;
|
||||
});
|
||||
},
|
||||
//所属护理站页面
|
||||
ParamsStation(item) {
|
||||
this.info();
|
||||
this.nurseStationshow = true;
|
||||
this.homenumber = item;
|
||||
if (this.homenumber) {
|
||||
this.stationid = this.queryParams.nurseStationId;
|
||||
} else {
|
||||
this.stationid = this.form.nurseStationId;
|
||||
}
|
||||
},
|
||||
//所属护理项目页面
|
||||
ParamsStationxm(item) {
|
||||
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;
|
||||
}
|
||||
} else {
|
||||
this.$modal.msgError("请先选择所属护理站");
|
||||
}
|
||||
},
|
||||
//护理站list
|
||||
info() {
|
||||
getListByUser(this.getListByUserquery).then(res => {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total4 = res.total;
|
||||
});
|
||||
},
|
||||
//打开护理站列表
|
||||
nurseStationshowclick() {
|
||||
this.stationcancel();
|
||||
this.stationid = this.form.nurseStationId;
|
||||
this.nurseStationshow = true;
|
||||
},
|
||||
//护理站重置
|
||||
stationcancel() {
|
||||
this.getListByUserquery = {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
};
|
||||
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();
|
||||
},
|
||||
//关闭护理站页面
|
||||
clicknurseStationshow() {
|
||||
this.nurseStationshow = false;
|
||||
},
|
||||
imgss(item) {
|
||||
this.imgs.pictureUrlList.push(item);
|
||||
},
|
||||
//图片传值过来接收
|
||||
imgUrl(imgUrl) {
|
||||
let imgUrlData = JSON.parse(imgUrl);
|
||||
// 存贮新上传的图片数组
|
||||
this.deletNewImgs.push(imgUrlData.posterPictureUrl);
|
||||
this.objitem.push(imgUrlData.posterPictureUrl);
|
||||
},
|
||||
imgUrl2(imgUrl) {
|
||||
this.videoForm.showVideoPath = baseurl + imgUrl;
|
||||
this.form.posterVideoUrl = imgUrl;
|
||||
},
|
||||
/** 查询泉医到家系统海报模块信息(包含咨询简介信息)列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listPoser(this.queryParams).then(response => {
|
||||
this.poserList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
var obj = { pictureUrlList: [] };
|
||||
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 => {
|
||||
this.open = false;
|
||||
});
|
||||
}
|
||||
this.nurseItemquery.nurseStationId = null;
|
||||
this.imgs = { pictureUrlList: [] };
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
posterPictureUrlLists: [
|
||||
{
|
||||
posterPictureUrl: "",
|
||||
jumpType: "",
|
||||
idd: this.idd
|
||||
}
|
||||
],
|
||||
id: null,
|
||||
poserName: null,
|
||||
posterPictureUrl: null,
|
||||
posterVideoUrl: null,
|
||||
posterVideoUrl2: null,
|
||||
poserSort: null,
|
||||
nurseStationName: "请选择所属护理站",
|
||||
nurseStationId: null,
|
||||
nurseItemName: "请选择所属护理项目",
|
||||
nurseItemId: null
|
||||
};
|
||||
this.deletNewImgs = [];
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.nurseItemquery = {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
};
|
||||
this.stationid = "";
|
||||
this.nurseitemid = "";
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
};
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.nurseStationId);
|
||||
this.itemids = selection.map(item => item.nurseItemId);
|
||||
this.Types = selection.map(item => item.moduleType);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.isEditFlag = false;
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.nurseStationId || this.ids;
|
||||
const itemid = row.nurseItemId || this.itemids;
|
||||
const type = row.moduleType || this.Types;
|
||||
getPoser(type, id, itemid).then(response => {
|
||||
this.form = response.data;
|
||||
if (response.data.goodAttributeDetailsLists) {
|
||||
this.goodDetailsLists = response.data.goodAttributeDetailsLists;
|
||||
}
|
||||
this.nurseItemquery.nurseStationId = response.data.nurseStationId;
|
||||
this.open = true;
|
||||
this.isEditFlag = true;
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
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;
|
||||
// });
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPoser(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
var ids = row.id || this.ids;
|
||||
var nurseStationIds = row.nurseStationId || this.nurseStationIds;
|
||||
var moduleTypes = row.moduleType || this.moduleTypes;
|
||||
var nurseItemIds = row.nurseItemId || this.nurseItemIds;
|
||||
if (nurseStationIds == undefined) {
|
||||
nurseStationIds = "";
|
||||
}
|
||||
if (nurseItemIds == undefined) {
|
||||
nurseItemIds = "";
|
||||
}
|
||||
this.$modal
|
||||
.confirm("是否确认删除?")
|
||||
.then(function() {
|
||||
return delPoser(nurseStationIds, moduleTypes, nurseItemIds);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/poser/export",
|
||||
{
|
||||
...this.queryParams
|
||||
},
|
||||
`poser_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.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;
|
||||
}
|
||||
.stationbtn {
|
||||
width: 208px;
|
||||
text-align: left;
|
||||
height: 32px;
|
||||
overflow: hidden;
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
@ -151,7 +151,7 @@
|
||||
:limit.sync="getListByUserquery.pageSize"
|
||||
@pagination="info"
|
||||
/>
|
||||
<!-- 新增护理站信息对话框 -->
|
||||
<!-- 新增修改护理站信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
@ -265,13 +265,40 @@
|
||||
maxlength="11"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input
|
||||
placeholder="请输入排序"
|
||||
v-model="form.sort"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="10"
|
||||
/>
|
||||
<el-form-item label="护理机构分类" prop="classifyNameList">
|
||||
<template>
|
||||
<el-button
|
||||
@click="clickinnerVisible()"
|
||||
type=""
|
||||
style="
|
||||
width: 208px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #c0c4cc;
|
||||
margin-top: -10px;
|
||||
"
|
||||
v-if="form.classifyNameList == '请选择护理站所属机构分类'"
|
||||
>{{ form.classifyNameList }}</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="clickinnerVisible()"
|
||||
type=""
|
||||
style="
|
||||
width: 208px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-top: -10px;
|
||||
"
|
||||
v-else
|
||||
>{{ form.classifyNameList }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人" prop="dutyPerson">
|
||||
<el-input
|
||||
@ -287,6 +314,70 @@
|
||||
maxlength="11"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input
|
||||
placeholder="请输入排序"
|
||||
v-model="form.sort"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="营业概述" prop="openingHoursDescribe">
|
||||
<el-input
|
||||
style="width: 208px"
|
||||
v-model="form.openingHoursDescribe"
|
||||
placeholder="请输入护理站营业概述"
|
||||
maxlength="150"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="上午营业时间" >
|
||||
<el-time-select
|
||||
style="width: 208px"
|
||||
placeholder="上午营业开始时间"
|
||||
v-model="form.morningOpenStartTime"
|
||||
:picker-options="{
|
||||
start: '07:00',
|
||||
step: '00:30',
|
||||
end: '14:00',
|
||||
}"
|
||||
>
|
||||
</el-time-select>
|
||||
<el-time-select
|
||||
style="width: 208px; margin-left: 10px"
|
||||
placeholder="上午营业结束时间"
|
||||
v-model="form.morningOpenEndTime"
|
||||
:picker-options="{
|
||||
start: '08:00',
|
||||
step: '00:30',
|
||||
end: '14:30',
|
||||
}"
|
||||
>
|
||||
</el-time-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="下午营业时间" >
|
||||
<el-time-select
|
||||
style="width: 208px"
|
||||
placeholder="下午营业开始时间"
|
||||
v-model="form.afternoonOpenStartTime"
|
||||
:picker-options="{
|
||||
start: '12:00',
|
||||
step: '00:30',
|
||||
end: '18:00',
|
||||
}"
|
||||
>
|
||||
</el-time-select>
|
||||
<el-time-select
|
||||
style="width: 208px; margin-left: 10px"
|
||||
placeholder="下午营业结束时间"
|
||||
v-model="form.afternoonOpenEndTime"
|
||||
:picker-options="{
|
||||
start: '13:00',
|
||||
step: '00:30',
|
||||
end: '20:00',
|
||||
}"
|
||||
>
|
||||
</el-time-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站总概述" prop="nurseStationDescription">
|
||||
<el-input
|
||||
style="width: 540px"
|
||||
@ -298,7 +389,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站简介" prop="agencyIntroduce">
|
||||
<editor
|
||||
@imgs="imgs"
|
||||
@imgs="imgs"
|
||||
:min-height="62"
|
||||
style="width: 90%; margin: 0 auto"
|
||||
v-model="form.agencyIntroduce"
|
||||
@ -351,7 +442,7 @@
|
||||
<el-input
|
||||
v-model="scope.row.labelSort"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="10"
|
||||
maxLength="5"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -379,6 +470,101 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 护理分类 -->
|
||||
<el-dialog
|
||||
title="选择护理机构分类"
|
||||
:visible.sync="Classifyshow"
|
||||
width="1100px"
|
||||
append-to-body
|
||||
:before-close="cancelClassifyshow"
|
||||
>
|
||||
<el-form :model="classifyquery" label-width="150px" :inline="true">
|
||||
<el-form-item label="护理机构分类编码" prop="classifyCode">
|
||||
<el-input
|
||||
v-model="classifyquery.classifyCode"
|
||||
placeholder="请输入护理机构分类编码"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理机构分类名称" prop="classifyName">
|
||||
<el-input
|
||||
v-model="classifyquery.classifyName"
|
||||
placeholder="请输入护理机构分类名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="classifylistInfo"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="classifylistcancel"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="classifylist"
|
||||
@cell-dblclick="setCheckedData"
|
||||
>
|
||||
<el-table-column label="请选择" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
@click="setCheckedData(scope.row)"
|
||||
v-if="checkedDataList.find((e) => e == scope.row.id)"
|
||||
></el-button>
|
||||
|
||||
<el-button
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
v-else
|
||||
@click="setCheckedData(scope.row)"
|
||||
>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="classifyCode"
|
||||
label="护理项目分类编码"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="classifyName"
|
||||
label="护理项目分类名称"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="classifytotal > 0"
|
||||
:total="classifytotal"
|
||||
:page.sync="classifyquery.pageNum"
|
||||
:limit.sync="classifyquery.pageSize"
|
||||
@pagination="classifylistInfo"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="choiceclassify"
|
||||
style="
|
||||
margin-top: 30px;
|
||||
margin-left: 85%;
|
||||
width: 100px;
|
||||
height: 50px;
|
||||
font-size: 15px;
|
||||
"
|
||||
>选择完成</el-button
|
||||
>
|
||||
</el-dialog>
|
||||
<!-- //导入 -->
|
||||
<el-dialog
|
||||
:title="upload.title"
|
||||
|
||||
@ -2,6 +2,7 @@ import {
|
||||
listStation,
|
||||
getStation,
|
||||
delStation,
|
||||
listStationClassify,
|
||||
addStation,
|
||||
updateStation,
|
||||
getFirstLevelInfo,
|
||||
@ -16,31 +17,31 @@ export default {
|
||||
components: { stationAcatar, editor },
|
||||
name: "Station",
|
||||
data() {
|
||||
var checkMobile = (rule, value, cb) => {
|
||||
// 验证手机号的正则表达式
|
||||
const regMobile =
|
||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
if (regMobile.test(value)) {
|
||||
return cb();
|
||||
}
|
||||
cb(new Error("请输入正确的联系电话"));
|
||||
};
|
||||
// var checkMobile = (rule, value, cb) => {
|
||||
// // 验证手机号的正则表达式
|
||||
// const regMobile =
|
||||
// /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
// if (regMobile.test(value)) {
|
||||
// return cb();
|
||||
// }
|
||||
// cb(new Error("请输入正确的联系电话"));
|
||||
// };
|
||||
// 验证手机号的规则
|
||||
var checkMobile2 = (rule, value, cb) => {
|
||||
// 验证手机号的正则表达式
|
||||
const regMobile =
|
||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
if (!value) {
|
||||
//所以当没有值的时候,我们直接callback,让他不校验直接执行下一步
|
||||
return cb();
|
||||
} else {
|
||||
if (regMobile.test(value)) {
|
||||
return cb();
|
||||
} else {
|
||||
cb(new Error("请输入正确的联系电话"));
|
||||
}
|
||||
}
|
||||
};
|
||||
// var checkMobile2 = (rule, value, cb) => {
|
||||
// // 验证手机号的正则表达式
|
||||
// const regMobile =
|
||||
// /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
// if (!value) {
|
||||
// //所以当没有值的时候,我们直接callback,让他不校验直接执行下一步
|
||||
// return cb();
|
||||
// } else {
|
||||
// if (regMobile.test(value)) {
|
||||
// return cb();
|
||||
// } else {
|
||||
// cb(new Error("请输入正确的联系电话"));
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
return {
|
||||
imgsurl: { pictureUrlList: [] },
|
||||
imageUrl: "",
|
||||
@ -77,40 +78,61 @@ export default {
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total2: 0,
|
||||
classifytotal: 0,
|
||||
//所属标签
|
||||
looknurseStationLabel: [{
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
}, ],
|
||||
idd: 1,
|
||||
},],
|
||||
// 护理站信息表格数据
|
||||
stationList: [{
|
||||
sysAreaVOList: [{
|
||||
provinceName: null,
|
||||
cityName: null,
|
||||
streetName: null,
|
||||
}, ],
|
||||
}, ],
|
||||
},],
|
||||
},],
|
||||
nurseStationlist: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
Classifyshow: false,
|
||||
afternoonOpenStartTimeStr: "",
|
||||
afternoonOpenEndTimeStr: "",
|
||||
//权限查询
|
||||
getListByUserquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
ids: 1,
|
||||
form: {
|
||||
nurseStationClassifyIds: [],
|
||||
},
|
||||
idd: 1,
|
||||
provincelist: [],
|
||||
arealist: [],
|
||||
citylist: [],
|
||||
streetlist: [],
|
||||
classifylist: [],
|
||||
|
||||
classifyquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
classifyCode: "",
|
||||
classifyName: "",
|
||||
},
|
||||
resid: null,
|
||||
// 表单校验
|
||||
rules: {
|
||||
|
||||
// morningOpenStartTime: [
|
||||
// { required: true, message: "请选择上午营业时间", trigger: "blur" },
|
||||
// ],
|
||||
// afternoonOpenStartTimeStr: [
|
||||
// { required: true, message: "请选择下午营业时间", trigger: "blur" },
|
||||
// ],
|
||||
agencyIntroduce: [
|
||||
{ required: true, message: "请输入护理站简介", trigger: "blur" },
|
||||
],
|
||||
@ -125,16 +147,16 @@ export default {
|
||||
],
|
||||
phone: [{
|
||||
required: true,
|
||||
validator: checkMobile,
|
||||
// validator: checkMobile,
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
}, ],
|
||||
message: "请输入手机号",
|
||||
},],
|
||||
|
||||
dutyPhone: [{
|
||||
validator: checkMobile2,
|
||||
// validator: checkMobile2,
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
}, ],
|
||||
message: "请输入联系电话",
|
||||
},],
|
||||
sort: [{ required: true, message: "排序不能为空", trigger: "blur" }],
|
||||
address: [{ required: true, message: "地址不能为空", trigger: "blur" }],
|
||||
longitude: [
|
||||
@ -153,11 +175,14 @@ export default {
|
||||
{ required: true, message: "请选择护理站类型", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
|
||||
checkedDataList: []// 选择的护理机构分类
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getaddress();
|
||||
this.info();
|
||||
this.classifylistInfo();
|
||||
},
|
||||
methods: {
|
||||
imgs(item) {
|
||||
@ -177,8 +202,8 @@ export default {
|
||||
this.looknurseStationLabel = [{
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
}, ];
|
||||
idd: 1,
|
||||
},];
|
||||
} else {
|
||||
this.looknurseStationLabel.splice(index, 1);
|
||||
}
|
||||
@ -189,11 +214,11 @@ export default {
|
||||
if (this.looknurseStationLabel.length == 5) {
|
||||
this.$message.error("最多只能5条");
|
||||
} else {
|
||||
this.ids++;
|
||||
this.idd++;
|
||||
var obj = {
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
ids: this.ids,
|
||||
idd: this.idd,
|
||||
};
|
||||
this.looknurseStationLabel.push(obj);
|
||||
}
|
||||
@ -240,6 +265,7 @@ export default {
|
||||
getList() {
|
||||
this.info();
|
||||
},
|
||||
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
var obj = { pictureUrlList: [] };
|
||||
@ -250,10 +276,10 @@ export default {
|
||||
obj.pictureUrlList.push(this.form.stationPictureUrl);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
updatePicture(obj).then((res) => { });
|
||||
}
|
||||
if (this.imgsurl.pictureUrlList.length > 0) {
|
||||
updatePicture(this.imgsurl).then((res) => {});
|
||||
updatePicture(this.imgsurl).then((res) => { });
|
||||
}
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
this.open = false;
|
||||
@ -284,9 +310,76 @@ export default {
|
||||
sort: null,
|
||||
nurseStationLabelList: [],
|
||||
streetCode: null,
|
||||
openingHoursDescribe: null,
|
||||
afternoonOpenStartTimeStr: "00:00:00", //下午开始
|
||||
afternoonOpenEndTimeStr: "00:00:00", //下午结束
|
||||
morningOpenEndTimeStr: "00:00:00", //上午结束
|
||||
morningOpenStartTimeStr: "00:00:00", //上午开始
|
||||
nurseStationClassifyIds: [],
|
||||
classifyNameList: '请选择护理站所属机构分类',
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
//护理机构分类
|
||||
clickinnerVisible() {
|
||||
this.classifylistInfo();
|
||||
// 回显数据
|
||||
this.checkedDataList = JSON.parse(JSON.stringify(this.form.nurseStationClassifyIds));
|
||||
|
||||
this.Classifyshow = true;
|
||||
},
|
||||
|
||||
classifylistcancel() {
|
||||
this.classifyquery = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
classifyCode: "",
|
||||
classifyName: "",
|
||||
};
|
||||
this.classifylistInfo();
|
||||
},
|
||||
// 设置已选数据
|
||||
setCheckedData(e) {
|
||||
// 若已存在id 则为删除
|
||||
if (this.checkedDataList.find(el => el == e.id)) {
|
||||
this.checkedDataList = this.checkedDataList.filter(ele => ele != e.id)
|
||||
}
|
||||
else {
|
||||
// 不存在 添加进id
|
||||
this.checkedDataList.push(e.id);
|
||||
}
|
||||
},
|
||||
// 完成选择
|
||||
choiceclassify() {
|
||||
this.form.nurseStationClassifyIds = JSON.parse(JSON.stringify(this.checkedDataList));
|
||||
// 根据id获取到所有name
|
||||
if (this.form.nurseStationClassifyIds.length == 0) {
|
||||
this.form.classifyNameList = '请选择护理站所属机构分类'
|
||||
} else {
|
||||
this.form.classifyNameList = "";
|
||||
this.form.nurseStationClassifyIds.forEach(f => {
|
||||
let classify = this.classifylist.find(d => d.id == f)
|
||||
if (!classify)
|
||||
return;
|
||||
this.form.classifyNameList += classify.classifyName + ","
|
||||
})
|
||||
this.form.classifyNameList = this.form.classifyNameList.substring(0, this.form.classifyNameList.length - 1)
|
||||
}
|
||||
this.cancelClassifyshow();
|
||||
},
|
||||
/** 查询护理机构分类信息列表 */
|
||||
classifylistInfo() {
|
||||
listStationClassify(this.classifyquery).then((response) => {
|
||||
this.classifylist = response.rows;
|
||||
this.classifytotal = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
cancelClassifyshow() {
|
||||
// this.classifylistInfo();
|
||||
this.Classifyshow = false;
|
||||
|
||||
},
|
||||
//护理站列表
|
||||
info() {
|
||||
this.loading = true
|
||||
@ -338,8 +431,8 @@ export default {
|
||||
this.looknurseStationLabel = [{
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
ids: 1,
|
||||
}, ];
|
||||
idd: 1,
|
||||
},];
|
||||
this.title = "添加护理站信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
@ -348,6 +441,12 @@ export default {
|
||||
this.loading = true;
|
||||
const id = row.id || this.ids;
|
||||
getStation(id).then((response) => {
|
||||
if (response.data.nurseClassifyInfoList) {
|
||||
response.data.nurseStationClassifyIds = []
|
||||
response.data.nurseClassifyInfoList.forEach(e => {
|
||||
response.data.nurseStationClassifyIds.push(e.id)
|
||||
})
|
||||
}
|
||||
this.form = response.data;
|
||||
this.form.streetCode = this.form.streetName;
|
||||
this.imgone = this.form.stationIntroducePcitureUrl;
|
||||
@ -360,9 +459,28 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
if (this.form.afternoonOpenStartTime) {
|
||||
this.form.afternoonOpenStartTimeStr = this.form.afternoonOpenStartTime
|
||||
} else {
|
||||
this.form.afternoonOpenStartTimeStr = "00:00:00"
|
||||
}
|
||||
if (!this.form.afternoonOpenEndTime) {
|
||||
this.form.afternoonOpenEndTimeStr = "00:00:00"
|
||||
} else {
|
||||
this.form.afternoonOpenEndTimeStr = this.form.afternoonOpenEndTime
|
||||
}
|
||||
if (!this.form.morningOpenStartTime) {
|
||||
this.form.morningOpenStartTimeStr = "00:00:00"
|
||||
} else {
|
||||
this.form.morningOpenStartTimeStr = this.form.morningOpenStartTime
|
||||
}
|
||||
if (!this.form.morningOpenEndTime) {
|
||||
this.form.morningOpenEndTimeStr = "00:00:00"
|
||||
} else {
|
||||
this.form.morningOpenEndTimeStr = this.form.morningOpenEndTime
|
||||
}
|
||||
this.form.nurseStationLabelList = this.looknurseStationLabel;
|
||||
this.form.nurseStationType = this.nurseStationType2;
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.areaCode = Number(this.form.areaCode);
|
||||
@ -378,7 +496,7 @@ export default {
|
||||
}
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
updatePicture(obj).then((res) => { });
|
||||
}
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
@ -403,7 +521,7 @@ export default {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm("是否确认删除此护理站信息?")
|
||||
.then(function() {
|
||||
.then(function () {
|
||||
return delStation(ids);
|
||||
})
|
||||
.then(() => {
|
||||
@ -411,19 +529,19 @@ export default {
|
||||
obj.pictureUrlList.push(row.stationIntroducePcitureUrl);
|
||||
obj.pictureUrlList.push(row.stationPictureUrl);
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
updatePicture(obj).then((res) => { });
|
||||
}
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/station/export", {
|
||||
...this.getListByUserquery,
|
||||
},
|
||||
...this.getListByUserquery,
|
||||
},
|
||||
`station_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
@ -461,4 +579,4 @@ export default {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
@ -2,9 +2,18 @@
|
||||
<div>
|
||||
<div
|
||||
class="user-info-head"
|
||||
:class="video.VideoPath ? 'wihi' : ''"
|
||||
@click="editCropper()"
|
||||
style="width: 100px; height: 100px"
|
||||
>
|
||||
<video
|
||||
style="width: 208px; height: 208px"
|
||||
v-if="video.VideoPath"
|
||||
v-bind:src="video.VideoPath"
|
||||
class="avatar video-avatar"
|
||||
controls="controls"
|
||||
>
|
||||
您的浏览器不支持视频播放
|
||||
</video>
|
||||
<img
|
||||
v-if="options.img"
|
||||
v-bind:src="options.img"
|
||||
@ -12,7 +21,7 @@
|
||||
style="width: 100px; height: 100px; line-height: 200px"
|
||||
/>
|
||||
<i
|
||||
v-else
|
||||
v-else-if="!options.img && !video.VideoPath"
|
||||
class="el-icon-plus avatar-uploader-icon"
|
||||
style="
|
||||
position: absolute;
|
||||
@ -24,7 +33,7 @@
|
||||
</div>
|
||||
|
||||
<el-dialog
|
||||
title="上传图片"
|
||||
:title="title"
|
||||
:visible.sync="openimg"
|
||||
width="950px"
|
||||
append-to-body
|
||||
@ -47,6 +56,15 @@
|
||||
</el-col>
|
||||
<el-col :xs="24" :md="12" :style="{ height: '350px' }">
|
||||
<div class="avatar-upload-preview">
|
||||
<video
|
||||
style="width: 100%; height: 100%"
|
||||
v-if="videoForm.showVideoPath"
|
||||
v-bind:src="videoForm.showVideoPath"
|
||||
class="avatar video-avatar"
|
||||
controls="controls"
|
||||
>
|
||||
您的浏览器不支持视频播放
|
||||
</video>
|
||||
<img
|
||||
style="width: 100%; height: 100%"
|
||||
v-if="previews.url"
|
||||
@ -54,7 +72,9 @@
|
||||
/>
|
||||
<div v-else></div>
|
||||
</div>
|
||||
<div class="title">请上传图片为800x800px的正方形</div>
|
||||
<div class="title" v-if="types != 'posterVideoUrl'&&types!='posterPictureUrl'">
|
||||
请上传图片为800x800px的正方形
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<br />
|
||||
@ -113,12 +133,16 @@
|
||||
<script>
|
||||
import { VueCropper } from "vue-cropper";
|
||||
import baseurl from "@/api/baseurl.js";
|
||||
import { updateNurseStationHeads, posts } from "@/api/system/stationAvatar.js";
|
||||
import {
|
||||
updateNurseStationHeads,
|
||||
posts,
|
||||
updatePoserHeads,
|
||||
} from "@/api/system/stationAvatar.js";
|
||||
|
||||
export default {
|
||||
components: { VueCropper },
|
||||
|
||||
props: ["img", "type", "item"],
|
||||
props: ["img", "type", "item", "tovideo"],
|
||||
data() {
|
||||
return {
|
||||
imageUrl: "",
|
||||
@ -128,7 +152,7 @@ export default {
|
||||
// 是否显示cropper
|
||||
visible: false,
|
||||
// 弹出层标题
|
||||
title: "上传头像",
|
||||
title: "上传图片/视频",
|
||||
options: {
|
||||
img: null, //裁剪图片的地址
|
||||
autoCrop: true, // 是否默认生成截图框
|
||||
@ -138,11 +162,26 @@ export default {
|
||||
},
|
||||
previews: {},
|
||||
items: {},
|
||||
//显示上传按钮
|
||||
videoForm: {
|
||||
showVideoPath: null, //回显的变量
|
||||
},
|
||||
video: {
|
||||
VideoPath: null, //回显的变量
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.types = this.type;
|
||||
this.items = this.item;
|
||||
if (this.tovideo == null) {
|
||||
this.video.VideoPath = null;
|
||||
} else if (this.tovideo == "") {
|
||||
this.video.VideoPath = null;
|
||||
} else {
|
||||
this.video.VideoPath = baseurl + this.tovideo;
|
||||
}
|
||||
console.log(this.video);
|
||||
if (this.img == null) {
|
||||
this.options.img = null;
|
||||
} else if (this.img == "") {
|
||||
@ -150,8 +189,16 @@ export default {
|
||||
} else {
|
||||
this.options.img = baseurl + this.img;
|
||||
}
|
||||
if (this.types == "posterVideoUrl") {
|
||||
this.title = "上传视频";
|
||||
} else {
|
||||
this.title = "上传图片";
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tovideo: {
|
||||
handler(newimg, oldimg) {},
|
||||
},
|
||||
item: {
|
||||
handler(newimg, oldimg) {
|
||||
this.items = this.item;
|
||||
@ -200,18 +247,29 @@ export default {
|
||||
},
|
||||
// 上传预处理
|
||||
beforeUpload(file) {
|
||||
if (file.type.indexOf("image/") == -1) {
|
||||
this.$modal.msgError(
|
||||
"文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
|
||||
);
|
||||
} else {
|
||||
if (this.types == "posterVideoUrl") {
|
||||
const reader = new FileReader();
|
||||
this.previews.data = file;
|
||||
this.previews.url = URL.createObjectURL(file);
|
||||
this.videoForm.showVideoPath = URL.createObjectURL(file);
|
||||
reader.readAsDataURL(file);
|
||||
reader.onload = () => {
|
||||
// this.options.img = reader.result;
|
||||
};
|
||||
} else {
|
||||
if (file.type.indexOf("image/") == -1) {
|
||||
this.$modal.msgError(
|
||||
"文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
|
||||
);
|
||||
} else {
|
||||
const reader = new FileReader();
|
||||
this.previews.data = file;
|
||||
this.previews.url = URL.createObjectURL(file);
|
||||
reader.readAsDataURL(file);
|
||||
reader.onload = () => {
|
||||
// this.options.img = reader.result;
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
// 上传图片
|
||||
@ -220,22 +278,41 @@ export default {
|
||||
if (this.previews.data) {
|
||||
formData.append("file", this.previews.data);
|
||||
formData.append("type", this.types);
|
||||
updateNurseStationHeads(formData).then((response) => {
|
||||
this.options.img = baseurl + response.imgUrl;
|
||||
this.$emit("imgUrl", response.imgUrl);
|
||||
if (this.types == "attributePitureUrl") {
|
||||
this.items.attributePitureUrl = response.imgUrl;
|
||||
this.$emit("item", JSON.stringify(this.items));
|
||||
}
|
||||
this.openimg = false;
|
||||
});
|
||||
if (this.types == "posterVideoUrl") {
|
||||
updatePoserHeads(formData).then((response) => {
|
||||
this.video.VideoPath = baseurl + response.imgUrl;
|
||||
this.$emit("imgUrl", response.imgUrl);
|
||||
this.openimg = false;
|
||||
});
|
||||
} else {
|
||||
updateNurseStationHeads(formData).then((response) => {
|
||||
this.options.img = baseurl + response.imgUrl;
|
||||
this.$emit("imgUrl", response.imgUrl);
|
||||
if (this.types == "attributePitureUrl") {
|
||||
this.items.attributePitureUrl = response.imgUrl;
|
||||
this.$emit("item", JSON.stringify(this.items));
|
||||
}
|
||||
if (this.types == "nurseItemClassifyUrl") {
|
||||
this.items.classifyPictureUrl = response.imgUrl;
|
||||
this.$emit("item", JSON.stringify(this.items));
|
||||
}
|
||||
if (this.types == "nurseStationClassifyUrl") {
|
||||
this.items.classifyPictureUrl = response.imgUrl;
|
||||
this.$emit("item", JSON.stringify(this.items));
|
||||
}
|
||||
if (this.types == "posterPictureUrl") {
|
||||
this.items.posterPictureUrl = response.imgUrl;
|
||||
this.$emit("item", JSON.stringify(this.items));
|
||||
}
|
||||
this.openimg = false;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.openimg = false;
|
||||
}
|
||||
},
|
||||
// 实时预览
|
||||
realTime(data) {
|
||||
console.log(data);
|
||||
this.previews = data;
|
||||
},
|
||||
// 关闭窗口
|
||||
@ -267,8 +344,9 @@ export default {
|
||||
.user-info-head {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
height: 120px;
|
||||
background: #fafafa;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.user-info-head:hover:after {
|
||||
@ -288,4 +366,12 @@ export default {
|
||||
line-height: 110px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.wihi {
|
||||
background-color: #fff;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
.wihi:hover:after {
|
||||
transform: translate(50%, 50%);
|
||||
}
|
||||
</style>
|
||||
|
||||
555
src/views/system/stationClassify/index.vue
Normal file
555
src/views/system/stationClassify/index.vue
Normal file
@ -0,0 +1,555 @@
|
||||
<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="classifyCode">
|
||||
<el-input
|
||||
v-model="queryParams.classifyCode"
|
||||
placeholder="请输入分类编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="分类名称" prop="classifyName">
|
||||
<el-input
|
||||
v-model="queryParams.classifyName"
|
||||
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:stationClassify: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:stationClassify: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:stationClassify:remove']"
|
||||
>删除</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:stationClassify:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="stationClassifyList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="分类编码" align="center" prop="classifyCode" />
|
||||
<el-table-column label="分类名称" align="center" prop="classifyName" />
|
||||
<el-table-column label="分类排序" align="center" prop="classifySort" />
|
||||
<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:stationClassify:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:stationClassify: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="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加护理项目分类信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
width="800px"
|
||||
append-to-body
|
||||
:before-close="cancel"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
:inline="true"
|
||||
:before-close="cancel"
|
||||
>
|
||||
<div
|
||||
v-for="(item, index) in form.nurseClassifyInfoList"
|
||||
:key="index"
|
||||
style="margin-bottom: 30px"
|
||||
>
|
||||
<el-form-item
|
||||
label="分类名称"
|
||||
:rules="rules.nurseClassifyInfoList.classifyName"
|
||||
:prop="`nurseClassifyInfoList.${index}.classifyName`"
|
||||
>
|
||||
<el-input
|
||||
maxLength="30"
|
||||
style="width: 200px"
|
||||
v-model="item.classifyName"
|
||||
placeholder="请输入分类名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="分类排序"
|
||||
:rules="rules.nurseClassifyInfoList.classifySort"
|
||||
:prop="`nurseClassifyInfoList.${index}.classifySort`"
|
||||
>
|
||||
<el-input
|
||||
style="width: 200px"
|
||||
v-model.number="item.classifySort"
|
||||
placeholder="请输入分类排序"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item
|
||||
label="分类图标"
|
||||
:rules="rules.nurseClassifyInfoList.classifyPictureUrl"
|
||||
:prop="`nurseClassifyInfoList.${index}.classifyPictureUrl`"
|
||||
>
|
||||
<stationAcatar
|
||||
style="margin-top: -25px"
|
||||
@imgUrl="imgclassifyPictureUrl"
|
||||
@item="imgclassifyPictureitem"
|
||||
:img="item.classifyPictureUrl"
|
||||
:type="'nurseStationClassifyUrl'"
|
||||
:item="item"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-circle-plus-outline"
|
||||
style="margin-top: 2px; margin-left: 50px"
|
||||
v-if="index == 0"
|
||||
@click="addnurseClassifyitem"
|
||||
></el-button>
|
||||
<!-- circle -->
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
plain
|
||||
style="margin-top: 2px; margin-left: 50px"
|
||||
v-if="index != 0"
|
||||
@click="delnurseClassifyitem(index)"
|
||||
></el-button>
|
||||
</div>
|
||||
</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="editopen"
|
||||
width="500px"
|
||||
append-to-body
|
||||
:before-close="cancel"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="分类名称" prop="classifyName">
|
||||
<el-input
|
||||
v-model="form.classifyName"
|
||||
placeholder="请输入分类名称"
|
||||
maxLength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="分类图标" prop="classifyPictureUrl">
|
||||
<stationAcatar
|
||||
@imgUrl="imgclassifyPictureUrl"
|
||||
@item="imgclassifyPictureitem"
|
||||
:img="form.classifyPictureUrl"
|
||||
:type="'nurseStationClassifyUrl'"
|
||||
:item="form"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="分类排序" prop="classifySort">
|
||||
<el-input
|
||||
v-model.number="form.classifySort"
|
||||
placeholder="请输入分类排序"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="5"
|
||||
/>
|
||||
</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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listStationClassify,
|
||||
getStationClassify,
|
||||
delStationClassify,
|
||||
addStationClassify,
|
||||
updateStationClassify,
|
||||
} from "@/api/system/stationClassify";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
import { updatePicture } from "@/api/system/station";
|
||||
|
||||
export default {
|
||||
name: "StationClassify",
|
||||
components: { stationAcatar },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
imgone:"",
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 护理机构分类信息表格数据
|
||||
stationClassifyList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
editopen: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
classifyCode: null,
|
||||
classifyName: null,
|
||||
classifySort: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
classifyPictureUrl: null,
|
||||
idd: 0,
|
||||
// 表单校验
|
||||
rules: {
|
||||
nurseClassifyInfoList: {
|
||||
classifyName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入分类名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
classifyPictureUrl: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择分类图标",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
classifySort: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入分类排序",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
classifyName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入分类名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
classifyPictureUrl: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择分类图标",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
classifySort: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入分类排序",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
//接收图片
|
||||
imgclassifyPictureUrl(e) {},
|
||||
//接收图片所属的item
|
||||
imgclassifyPictureitem(item) {
|
||||
let items = JSON.parse(item);
|
||||
if (items.idd && !items.id) {
|
||||
this.form.nurseClassifyInfoList.forEach((e) => {
|
||||
if (e.idd == items.idd) {
|
||||
e.classifyPictureUrl = items.classifyPictureUrl;
|
||||
}
|
||||
});
|
||||
} else if (!items.idd && items.id) {
|
||||
this.form.classifyPictureUrl = items.classifyPictureUrl;
|
||||
}
|
||||
},
|
||||
//添加时删除item
|
||||
delnurseClassifyitem(index) {
|
||||
this.form.nurseClassifyInfoList.splice(index, 1);
|
||||
},
|
||||
//添加时新增item
|
||||
addnurseClassifyitem() {
|
||||
this.idd++;
|
||||
var obj = {
|
||||
classifyName: "",
|
||||
classifyPictureUrl: "",
|
||||
classifySort: "",
|
||||
idd: this.idd,
|
||||
};
|
||||
if (this.form.nurseClassifyInfoList.length == 5) {
|
||||
this.$message.error("最多批量添加5条");
|
||||
} else {
|
||||
this.form.nurseClassifyInfoList.push(obj);
|
||||
}
|
||||
},
|
||||
/** 查询护理机构分类信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listStationClassify(this.queryParams).then((response) => {
|
||||
this.stationClassifyList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
if (this.editopen) {
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.form.classifyPictureUrl != this.imgone) {
|
||||
obj.pictureUrlList.push(this.form.classifyPictureUrl);
|
||||
}
|
||||
updatePicture(obj).then((res) => {
|
||||
this.editopen = false;
|
||||
});
|
||||
}
|
||||
if (this.open) {
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.form.nurseClassifyInfoList) {
|
||||
this.form.nurseClassifyInfoList.forEach((e) => {
|
||||
obj.pictureUrlList.push(e.classifyPictureUrl);
|
||||
});
|
||||
}
|
||||
updatePicture(obj).then((res) => {
|
||||
this.open = false;
|
||||
});
|
||||
}
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
parentId: null,
|
||||
classifyCode: null,
|
||||
classifyName: null,
|
||||
classifyLevel: null,
|
||||
classifyType: null,
|
||||
classifyPictureUrl: null,
|
||||
classifySort: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
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.form = {
|
||||
nurseClassifyInfoList: [
|
||||
{
|
||||
classifyName: "",
|
||||
classifyPictureUrl: "",
|
||||
classifySort: "",
|
||||
idd: this.idd,
|
||||
},
|
||||
],
|
||||
};
|
||||
this.open = true;
|
||||
this.title = "添加护理机构分类信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getStationClassify(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.imgone = this.form.classifyPictureUrl;
|
||||
this.classifyPictureUrl = response.data.classifyPictureUrl;
|
||||
this.editopen = true;
|
||||
this.title = "修改护理机构分类信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
if (this.form.id != null) {
|
||||
updateStationClassify(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
if (this.form.classifyPictureUrl != this.imgone) {
|
||||
var obj = { pictureUrlList: [] };
|
||||
obj.pictureUrlList.push(this.imgone);
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
this.editopen = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
// if(this.form.nurseClassifyInfoList[0].classifySort){
|
||||
// this.form.nurseClassifyInfoList[0].classifySort=parseInt(this.form.nurseClassifyInfoList[0].classifySort)
|
||||
// }
|
||||
|
||||
addStationClassify(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id ? [row.id] : this.ids;
|
||||
let names = "";
|
||||
ids.forEach((id) => {
|
||||
let selected = this.stationClassifyList.find((f) => f.id == id);
|
||||
names += selected.classifyName + ",";
|
||||
});
|
||||
names = names.substring(0, names.length - 1);
|
||||
this.$modal
|
||||
.confirm('是否确认删除护理机构分类名称为"' + names + '"的数据项?')
|
||||
.then(function () {
|
||||
return delStationClassify(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/stationClassify/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`stationClassify_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -8,14 +8,12 @@
|
||||
v-show="showSearch"
|
||||
label-width="110px"
|
||||
>
|
||||
<el-form-item
|
||||
label="护理站名称"
|
||||
prop="nurseStationId"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-button type="" class="stationbtn" @click="ParamsStation(true)">{{
|
||||
<el-form-item label="护理站名称" prop="nurseStationId" >
|
||||
<el-button type class="stationbtn" @click="ParamsStation(true)">
|
||||
{{
|
||||
queryParams.nurseStationName
|
||||
}}</el-button>
|
||||
}}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理项目编号" prop="nurseItemCode">
|
||||
<el-input
|
||||
@ -34,16 +32,8 @@
|
||||
/>
|
||||
</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-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">
|
||||
@ -55,8 +45,7 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:stationItem:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -67,8 +56,7 @@
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:stationItem:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -79,8 +67,7 @@
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:stationItem:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -90,19 +77,11 @@
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:stationItem:importStationItem']"
|
||||
>导入</el-button
|
||||
>
|
||||
>导入</el-button>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="nurseItemList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table v-loading="loading" :data="nurseItemList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
@ -112,50 +91,26 @@
|
||||
v-for="(item, index) in props.row.nurseStationItemPrices"
|
||||
:key="index"
|
||||
style="display: block"
|
||||
>
|
||||
{{ item.serveDurationUnit }}
|
||||
</div>
|
||||
>{{ item.serveDurationUnit }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="价格(元)" style="margin-left: 30px">
|
||||
<div
|
||||
v-for="(item, index) in props.row.nurseStationItemPrices"
|
||||
:key="index"
|
||||
style="display: block"
|
||||
>
|
||||
{{ item.price }}
|
||||
</div>
|
||||
>{{ item.price }}</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="所属护理站"
|
||||
align="center"
|
||||
prop="nurseStationName"
|
||||
/>
|
||||
<el-table-column label="所属护理站" align="center" prop="nurseStationName" />
|
||||
<!-- <el-table-column label="护理类型" align="center" prop="nurseTypeName" /> -->
|
||||
<el-table-column
|
||||
label="护理项目编号"
|
||||
align="center"
|
||||
prop="nurseItemCode"
|
||||
/>
|
||||
<el-table-column
|
||||
label="护理项目名称"
|
||||
align="center"
|
||||
prop="nurseItemName"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="提前预约时长(h)"
|
||||
align="center"
|
||||
prop="advanceAppointDuration"
|
||||
/> -->
|
||||
<el-table-column label="护理项目编号" align="center" prop="nurseItemCode" />
|
||||
<el-table-column label="护理项目名称" align="center" prop="nurseItemName" />
|
||||
<el-table-column label="护理项目分类名称" align="center" prop="classifyName" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="创建人" align="center" prop="createBy" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@ -163,16 +118,14 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:stationItem:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:stationItem:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -191,17 +144,11 @@
|
||||
append-to-body
|
||||
:before-close="cancel"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="130px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="所属护理站" required v-if="addxg == 'add'">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="130px" :inline="true">
|
||||
<el-form-item label="所属护理站" prop="nurseStationId" v-if="addxg == 'add'">
|
||||
<template>
|
||||
<el-button
|
||||
type=""
|
||||
type
|
||||
@click="nurseStationshowclick"
|
||||
style="
|
||||
width: 208px;
|
||||
@ -213,10 +160,9 @@
|
||||
this.form.nurseStationItem.nurseStationName ==
|
||||
'请选择所属护理站'
|
||||
"
|
||||
>{{ form.nurseStationItem.nurseStationName }}</el-button
|
||||
>
|
||||
>{{ form.nurseStationItem.nurseStationName }}</el-button>
|
||||
<el-button
|
||||
type=""
|
||||
type
|
||||
@click="nurseStationshowclick"
|
||||
v-else
|
||||
style="
|
||||
@ -228,56 +174,107 @@
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
"
|
||||
>{{ form.nurseStationItem.nurseStationName }}</el-button
|
||||
>
|
||||
>{{ form.nurseStationItem.nurseStationName }}</el-button>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属护理站" required v-else>
|
||||
<template>
|
||||
<el-button
|
||||
type=""
|
||||
type
|
||||
disabled
|
||||
style="
|
||||
width: 208px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
padding-left: -10px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
"
|
||||
>{{ form.nurseStationItem.nurseStationName }}</el-button
|
||||
>
|
||||
>{{ form.nurseStationItem.nurseStationName }}</el-button>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="护理项目名称"
|
||||
prop="nurseStationItem.nurseItemName"
|
||||
>
|
||||
<el-form-item label="护理项目分类">
|
||||
<template>
|
||||
<el-button
|
||||
type
|
||||
style="
|
||||
width: 208px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #c0c4cc;
|
||||
"
|
||||
@click="clickClassifyshow"
|
||||
v-if="form.nurseStationItem.classifyName == '请选择护理项目分类'"
|
||||
>{{ form.nurseStationItem.classifyName }}</el-button>
|
||||
<el-button
|
||||
type
|
||||
style="
|
||||
width: 208px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
"
|
||||
@click="clickClassifyshow"
|
||||
v-else
|
||||
>{{ form.nurseStationItem.classifyName }}</el-button>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理项目名称" prop="nurseStationItem.nurseItemName">
|
||||
<el-input
|
||||
v-model="form.nurseStationItem.nurseItemName"
|
||||
placeholder="请输入护理项目名称"
|
||||
maxlength="50"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item
|
||||
label="提前预约时长"
|
||||
prop="nurseStationItem.advanceAppointDuration"
|
||||
>
|
||||
<el-input
|
||||
<el-form-item label="提前预约时长" prop="nurseStationItem.advanceAppointDuration">
|
||||
<el-select
|
||||
v-model="form.nurseStationItem.advanceAppointDuration"
|
||||
placeholder="提前预约时长(单位小时)"
|
||||
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+0)} if(value.length>5){value=value.slice(0,5)}"
|
||||
type="number"
|
||||
min="0"
|
||||
placeholder="请选择提前预约时长"
|
||||
style="width:208px"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
style="width:208px"
|
||||
v-for="item in optionlist"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="预约人数上限" prop="nurseStationItem.appointmentLimitCount">
|
||||
<el-input
|
||||
placeholder="请输入预约人数上限"
|
||||
v-model.number="form.nurseStationItem.appointmentLimitCount"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxlength="8"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="排序" prop="nurseStationItem.sort">
|
||||
</el-form-item>
|
||||
<el-form-item label="预约时间间隔" prop="nurseStationItem.appointmentTimeInterval">
|
||||
<el-select
|
||||
style="width:208px"
|
||||
v-model="form.nurseStationItem.appointmentTimeInterval"
|
||||
placeholder="请选择预约时间间隔"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="nurseStationItem.sort">
|
||||
<el-input
|
||||
placeholder="请输入排序"
|
||||
v-model="form.nurseStationItem.sort"
|
||||
v-model.number="form.nurseStationItem.sort"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="9"
|
||||
maxlength="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目头像" prop="nurseStationItem.itemPictureUrl">
|
||||
@ -288,26 +285,14 @@
|
||||
:type="'itemPictureUrl'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="项目内容简介"
|
||||
prop="nurseStationItem.nurseItemContent"
|
||||
>
|
||||
<!-- <el-input
|
||||
maxlength="300"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder="请输入内容"
|
||||
style="width: 208px"
|
||||
v-model="form.nurseStationItem.nurseItemContent"
|
||||
>
|
||||
</el-input> -->
|
||||
<el-form-item label="项目内容简介" prop="nurseStationItem.nurseItemContent">
|
||||
<editor
|
||||
@imgs="imgs"
|
||||
maxlength="300"
|
||||
@imgs="imgs"
|
||||
maxlength="300"
|
||||
:min-height="82"
|
||||
placeholder="请输入内容"
|
||||
placeholder="请输入内容"
|
||||
style="width: 90%"
|
||||
v-model="form.nurseStationItem.nurseItemContent"
|
||||
v-model="form.nurseStationItem.nurseItemContent"
|
||||
></editor>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目时长和价格" required>
|
||||
@ -316,22 +301,14 @@
|
||||
:data="form.nurseStationItemPrices"
|
||||
style="margin-top: 20px; width: 900px"
|
||||
>
|
||||
<el-table-column
|
||||
property="serveDurationUnit"
|
||||
label="服务时长和单位"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column property="serveDurationUnit" label="服务时长和单位" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.serveDurationUnit"
|
||||
maxlength="6"
|
||||
></el-input>
|
||||
<el-input v-model="scope.row.serveDurationUnit" maxlength="6"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="price" label="价格" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
|
||||
v-model="scope.row.price"
|
||||
placeholder="小数点后两位(元)"
|
||||
type="number"
|
||||
@ -342,92 +319,45 @@
|
||||
</el-table-column>
|
||||
<el-table-column property="description" label="描述" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.description"
|
||||
maxlength="300"
|
||||
></el-input>
|
||||
<el-input v-model="scope.row.description" maxlength="300"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="addnurseStationItemPrices"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="delnurseStationItemPrices(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button size="mini" type="text" @click="addnurseStationItemPrices">新增</el-button>
|
||||
<el-button size="mini" type="text" @click="delnurseStationItemPrices(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理项目耗材">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
plain
|
||||
@click="listStationConsumableinfo"
|
||||
>添加护理项目耗材</el-button
|
||||
>
|
||||
<el-button type="primary" size="small" plain @click="listStationConsumableinfo">添加护理项目耗材</el-button>
|
||||
<el-table
|
||||
ref="singleTable"
|
||||
:data="form.nurseStationItemConsumables"
|
||||
style="margin-top: 20px; width: 900px"
|
||||
>
|
||||
<el-table-column
|
||||
property="nurseStationConsumableId"
|
||||
label="耗材包名称"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.consumableDetail }}
|
||||
</template>
|
||||
<el-table-column property="nurseStationConsumableId" label="耗材包名称" align="center">
|
||||
<template slot-scope="scope">{{ scope.row.consumableDetail }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
property="consumableCount"
|
||||
label="耗材包数量"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column property="consumableCount" label="耗材包数量" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.consumableCount"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="9"
|
||||
maxlength="9"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="consumablePrice"
|
||||
label="耗材包单位"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.consumableUnit }}
|
||||
</template>
|
||||
<el-table-column property="consumablePrice" label="耗材包单位" align="center">
|
||||
<template slot-scope="scope">{{ scope.row.consumableUnit }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="consumablePrice"
|
||||
label="耗材包单价"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.consumablePrice }}
|
||||
</template>
|
||||
<el-table-column property="consumablePrice" label="耗材包单价" align="center">
|
||||
<template slot-scope="scope">{{ scope.row.consumablePrice }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="delConsumable(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button size="mini" type="text" @click="delConsumable(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -438,6 +368,56 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 护理项目分类 -->
|
||||
<el-dialog
|
||||
title="选择护理项目分类"
|
||||
:visible.sync="Classifyshow"
|
||||
width="1100px"
|
||||
append-to-body
|
||||
:before-close="cancelClassifyshow"
|
||||
>
|
||||
<el-form :model="classifyquery" label-width="150px" :inline="true">
|
||||
<el-form-item label="护理项目分类编码" prop="classifyCode">
|
||||
<el-input v-model="classifyquery.classifyCode" placeholder="请输入护理项目分类编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="护理项目分类名称" prop="classifyName">
|
||||
<el-input v-model="classifyquery.classifyName" placeholder="请输入护理项目分类名称" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="classifylistInfo">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="classifylistcancel">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="classifylist" @cell-dblclick="choiceclassify">
|
||||
<el-table-column label="请选择" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
@click="choiceclassify(scope.row)"
|
||||
v-if="form.nurseStationItem.nurseClassifyId == scope.row.id"
|
||||
></el-button>
|
||||
|
||||
<el-button
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
v-else
|
||||
@click="choiceclassify(scope.row)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="classifyCode" label="护理项目分类编码" align="center"></el-table-column>
|
||||
<el-table-column property="classifyName" label="护理项目分类名称" align="center"></el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="classifytotal > 0"
|
||||
:total="classifytotal"
|
||||
:page.sync="classifyquery.pageNum"
|
||||
:limit.sync="classifyquery.pageSize"
|
||||
@pagination="classifylistInfo"
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- 护理站 -->
|
||||
<el-dialog
|
||||
title="选择护理站"
|
||||
@ -446,42 +426,19 @@
|
||||
append-to-body
|
||||
:before-close="clicknurseStationshow"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="getListByUserquery"
|
||||
label-width="110px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form ref="form" :model="getListByUserquery" label-width="110px" :inline="true">
|
||||
<el-form-item label="护理站编码" prop="nurseStationCode">
|
||||
<el-input
|
||||
v-model="getListByUserquery.nurseStationCode"
|
||||
placeholder="请输入护理站编码"
|
||||
/>
|
||||
<el-input v-model="getListByUserquery.nurseStationCode" placeholder="请输入护理站编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input
|
||||
v-model="getListByUserquery.nurseStationName"
|
||||
placeholder="请输入护理站名称"
|
||||
/>
|
||||
<el-input v-model="getListByUserquery.nurseStationName" placeholder="请输入护理站名称" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<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
|
||||
>
|
||||
<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>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="nurseStationlist"
|
||||
@cell-dblclick="choicestationid"
|
||||
>
|
||||
<el-table v-loading="loading" :data="nurseStationlist" @cell-dblclick="choicestationid">
|
||||
<el-table-column label="请选择" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -497,31 +454,18 @@
|
||||
circle
|
||||
v-else
|
||||
@click="choicestationid(scope.row)"
|
||||
>
|
||||
</el-button>
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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>
|
||||
<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>
|
||||
<el-table-column
|
||||
property="address"
|
||||
label="护理站地址"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@ -540,17 +484,9 @@
|
||||
append-to-body
|
||||
:before-close="clickstationConsumableshow"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="StationConsumablequeryParams"
|
||||
label-width="110px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form ref="form" :model="StationConsumablequeryParams" label-width="110px" :inline="true">
|
||||
<el-form-item label="耗材包名称" prop="nurseStationId">
|
||||
<el-input
|
||||
v-model="StationConsumablequeryParams.consumableDetail"
|
||||
placeholder="请输入耗材包名称"
|
||||
/>
|
||||
<el-input v-model="StationConsumablequeryParams.consumableDetail" placeholder="请输入耗材包名称" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
@ -558,14 +494,8 @@
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="listStationConsumableinfo"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="listStationConsumableinfocancel"
|
||||
>重置</el-button
|
||||
>
|
||||
>搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="listStationConsumableinfocancel">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
@ -594,31 +524,11 @@
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="护理站名称"
|
||||
align="center"
|
||||
prop="nurseStationName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="耗材包编号"
|
||||
align="center"
|
||||
prop="consumableCode"
|
||||
/>
|
||||
<el-table-column
|
||||
label="耗材包名称"
|
||||
align="center"
|
||||
prop="consumableDetail"
|
||||
/>
|
||||
<el-table-column
|
||||
label="耗材包单位"
|
||||
align="center"
|
||||
prop="consumableUnit"
|
||||
/>
|
||||
<el-table-column
|
||||
label="耗材包价格"
|
||||
align="center"
|
||||
prop="consumablePrice"
|
||||
/>
|
||||
<el-table-column label="护理站名称" align="center" prop="nurseStationName" />
|
||||
<el-table-column label="耗材包编号" align="center" prop="consumableCode" />
|
||||
<el-table-column label="耗材包名称" align="center" prop="consumableDetail" />
|
||||
<el-table-column label="耗材包单位" align="center" prop="consumableUnit" />
|
||||
<el-table-column label="耗材包价格" align="center" prop="consumablePrice" />
|
||||
</el-table>
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -631,8 +541,7 @@
|
||||
height: 40px;
|
||||
font-size: 15px;
|
||||
"
|
||||
>选择完成</el-button
|
||||
>
|
||||
>选择完成</el-button>
|
||||
<pagination
|
||||
v-show="total3 > 0"
|
||||
:total="total3"
|
||||
@ -642,12 +551,7 @@
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- //导入 -->
|
||||
<el-dialog
|
||||
:title="upload.title"
|
||||
:visible.sync="upload.open"
|
||||
width="400px"
|
||||
append-to-body
|
||||
>
|
||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:limit="1"
|
||||
@ -661,7 +565,10 @@
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<div class="el-upload__text">
|
||||
将文件拖到此处,或
|
||||
<em>点击上传</em>
|
||||
</div>
|
||||
<div class="el-upload__tip text-center" slot="tip">
|
||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||
<el-link
|
||||
@ -669,8 +576,7 @@
|
||||
:underline="false"
|
||||
style="font-size: 12px; vertical-align: baseline"
|
||||
@click="importTemplate"
|
||||
>下载模板</el-link
|
||||
>
|
||||
>下载模板</el-link>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import { listStationConsumable } from "@/api/system/stationConsumable";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
|
||||
import {
|
||||
listInfo,
|
||||
} from "@/api/system/classifyItem.js";
|
||||
import {
|
||||
list,
|
||||
getNurseItem,
|
||||
@ -17,6 +19,8 @@ export default {
|
||||
name: "NurseItem",
|
||||
data() {
|
||||
return {
|
||||
// 弹出层判断新增还是修改
|
||||
isEditFlag: false,
|
||||
imgsurl: { pictureUrlList: [] },
|
||||
imageUrl: "",
|
||||
imgone: "",
|
||||
@ -37,6 +41,7 @@ export default {
|
||||
loading: true,
|
||||
stationConsumableshow: false,
|
||||
nurseStationshow: false,
|
||||
Classifyshow: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
@ -60,6 +65,32 @@ export default {
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
options: [{
|
||||
value: 'HALF_HOUR',
|
||||
label: '半小时'
|
||||
}, {
|
||||
value: 'ONE_HOUR',
|
||||
label: '一小时'
|
||||
},
|
||||
{
|
||||
value: 'NINETY_MINUTES',
|
||||
label: '九十分钟'
|
||||
},
|
||||
{
|
||||
value: 'TWO_HOUR',
|
||||
label: '两小时'
|
||||
}
|
||||
|
||||
],
|
||||
value: "",
|
||||
optionlist: [{
|
||||
value: 'HALF_DAY',
|
||||
label: '半天'
|
||||
}, {
|
||||
value: 'ONE_DAY',
|
||||
label: '一天'
|
||||
}, ],
|
||||
value1: "",
|
||||
//权限查询
|
||||
nurseStationlist: [],
|
||||
nurseStationlist2: [],
|
||||
@ -92,20 +123,30 @@ export default {
|
||||
nurseStationItem: {
|
||||
nurseStationId: null,
|
||||
nurseTypeId: null,
|
||||
nurseItemName: "",
|
||||
nurseItemContent: "",
|
||||
advanceAppointDuration: "",
|
||||
itemPictureUrl: "",
|
||||
sort: "",
|
||||
nurseItemName: null,
|
||||
nurseItemContent: null,
|
||||
advanceAppointDuration: null,
|
||||
itemPictureUrl: null,
|
||||
sort: null,
|
||||
nurseStationName: "请选择所属护理站",
|
||||
classifyName: '请选择护理项目分类',
|
||||
nurseClassifyId: null,
|
||||
appointmentLimitCount: null,
|
||||
appointmentTimeInterval: null,
|
||||
},
|
||||
},
|
||||
ids: 1,
|
||||
idd: 1,
|
||||
// 表单校验
|
||||
rules: {
|
||||
"nurseStationItem.nurseItemName": [
|
||||
{ required: true, message: "护理项目名称不能为空", trigger: "blur" },
|
||||
],
|
||||
"nurseStationItem.classifyName": [
|
||||
{ required: true, message: "护理项目分类不能为空", trigger: "blur" },
|
||||
],
|
||||
"nurseStationItem.nurseStationName": [
|
||||
{ required: true, message: "护理项目分类不能为空", trigger: "blur" },
|
||||
],
|
||||
"nurseStationItem.nurseItemContent": [
|
||||
{ required: true, message: "项目内容简介不能为空", trigger: "blur" },
|
||||
],
|
||||
@ -115,11 +156,21 @@ export default {
|
||||
// "nurseStationItem.advanceAppointDuration": [
|
||||
// { required: true, message: "提前预约时长不能为空", trigger: "blur" },
|
||||
// ],
|
||||
// }, ],
|
||||
"nurseStationItem.appointmentTimeInterval": [{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
message: "请选择预约时间点间隔",
|
||||
}, ],
|
||||
"nurseStationItem.itemPictureUrl": [{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
message: "请选择项目头像",
|
||||
},],
|
||||
}, ],
|
||||
// "nurseStationItem.appointmentLimitCount": [{
|
||||
// required: true,
|
||||
// trigger: "blur",
|
||||
// message: "请输入预约人数上限",
|
||||
nurseStationId: [
|
||||
{ required: true, trigger: "blur", message: "请选择所属护理站" },
|
||||
],
|
||||
@ -130,15 +181,62 @@ export default {
|
||||
homenumber: null,
|
||||
stationid: null,
|
||||
addxg: null,
|
||||
classifyquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
classifyCode: null,
|
||||
classifyName: null,
|
||||
},
|
||||
classifylist: [],
|
||||
classifytotal: 0,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.classifylistInfo();
|
||||
},
|
||||
methods: {
|
||||
//// //护理项目list
|
||||
//打开遮罩层
|
||||
clickClassifyshow() {
|
||||
this.Classifyshow = true
|
||||
this.classifylistcancel()
|
||||
},
|
||||
//关闭遮罩层
|
||||
cancelClassifyshow() {
|
||||
this.Classifyshow = false
|
||||
},
|
||||
//选中或者取消选中
|
||||
choiceclassify(e) {
|
||||
if (this.form.nurseStationItem.nurseClassifyId == e.id) {
|
||||
this.form.nurseStationItem.nurseClassifyId = null
|
||||
this.form.nurseStationItem.classifyName = null
|
||||
} else {
|
||||
this.form.nurseStationItem.nurseClassifyId = e.id;
|
||||
this.form.nurseStationItem.classifyName = e.classifyName;
|
||||
}
|
||||
this.Classifyshow = false
|
||||
},
|
||||
//重置
|
||||
classifylistcancel() {
|
||||
this.classifyquery = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
classifyCode: null,
|
||||
classifyName: null,
|
||||
}
|
||||
this.classifylistInfo();
|
||||
},
|
||||
//搜索
|
||||
classifylistInfo() {
|
||||
listInfo(this.classifyquery).then(res => {
|
||||
this.classifylist = res.rows
|
||||
this.classifytotal = res.total
|
||||
})
|
||||
},
|
||||
imgs(item) {
|
||||
this.imgsurl.pictureUrlList.push(item);
|
||||
},
|
||||
},
|
||||
imgUrl(imgUrl) {
|
||||
|
||||
this.form.nurseStationItem.itemPictureUrl = imgUrl;
|
||||
@ -295,12 +393,12 @@ export default {
|
||||
obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => { });
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
if (this.imgsurl.pictureUrlList.length > 0) {
|
||||
updatePicture(this.imgsurl).then((res) => {});
|
||||
}
|
||||
this.imgsurl={pictureUrlList:[]};
|
||||
}
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
|
||||
this.open = false;
|
||||
this.reset();
|
||||
@ -310,25 +408,25 @@ export default {
|
||||
if (this.form.nurseStationItemPrices.length == 5) {
|
||||
this.$message.error("最多只能5条");
|
||||
} else {
|
||||
this.ids++;
|
||||
this.idd++;
|
||||
var obj = {
|
||||
serveDurationUnit: "",
|
||||
price: "",
|
||||
description: "",
|
||||
ids: this.ids,
|
||||
idd: this.idd,
|
||||
};
|
||||
this.form.nurseStationItemPrices.push(obj);
|
||||
}
|
||||
},
|
||||
delnurseStationItemPrices(item) {
|
||||
if (item.ids && !item.nurseItemPriceId) {
|
||||
if (item.idd && !item.nurseItemPriceId) {
|
||||
if (this.form.nurseStationItemPrices.length == 1) {
|
||||
this.$message.error("最后一条不可删除");
|
||||
} else {
|
||||
this.form.nurseStationItemPrices =
|
||||
this.form.nurseStationItemPrices.filter((e) => e.ids != item.ids);
|
||||
this.form.nurseStationItemPrices.filter((e) => e.idd != item.idd);
|
||||
}
|
||||
} else if (!item.ids && item.nurseItemPriceId) {
|
||||
} else if (!item.idd && item.nurseItemPriceId) {
|
||||
if (this.form.nurseStationItemPrices.length == 1) {
|
||||
this.$message.error("最后一条不可删除");
|
||||
} else {
|
||||
@ -351,6 +449,9 @@ export default {
|
||||
itemPictureUrl: null,
|
||||
sort: null,
|
||||
nurseStationName: "请选择所属护理站",
|
||||
classifyName: '请选择护理项目分类',
|
||||
nurseClassifyId: null,
|
||||
appointmentLimitCount: null,
|
||||
},
|
||||
nurseStationItemConsumables: [
|
||||
// {
|
||||
@ -363,8 +464,8 @@ export default {
|
||||
serveDurationUnit: null,
|
||||
price: null,
|
||||
description: null,
|
||||
ids: this.ids,
|
||||
},],
|
||||
idd: this.idd,
|
||||
}, ],
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -398,6 +499,7 @@ export default {
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.isEditFlag = false;
|
||||
this.addxg = 'add'
|
||||
this.homenumber = null;
|
||||
this.reset();
|
||||
@ -407,12 +509,14 @@ export default {
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.isEditFlag = true;
|
||||
this.addxg = 'xg';
|
||||
this.homenumber = null;
|
||||
this.reset();
|
||||
this.StationConsumablequeryParams.nurseStationId = null;
|
||||
const id = row.id || this.ids;
|
||||
getNurseItem(id).then((response) => {
|
||||
this.form = response.data;
|
||||
if (response.data.nurseStationItemConsumables) {
|
||||
response.data.nurseStationItemConsumables.forEach(e => {
|
||||
e.id = e.nurseStationConsumableId
|
||||
@ -420,36 +524,18 @@ export default {
|
||||
} else {
|
||||
response.data.nurseStationItemConsumables = []
|
||||
}
|
||||
this.form = response.data;
|
||||
this.StationConsumablequeryParams.nurseStationId =
|
||||
response.data.nurseStationItem.nurseStationId;
|
||||
this.imgone = this.form.nurseStationItem.itemPictureUrl;
|
||||
if (this.form.nurseStationItemPrices == []) {
|
||||
if (this.form.nurseStationItemPrices.length <= 0) {
|
||||
var obj = {
|
||||
serveDurationUnit: "",
|
||||
price: "",
|
||||
description: "",
|
||||
ids: this.ids,
|
||||
};
|
||||
this.form.nurseStationItemPrices.push(obj);
|
||||
} else if (this.form.nurseStationItemPrices.length == 0) {
|
||||
var obj = {
|
||||
serveDurationUnit: "",
|
||||
price: "",
|
||||
description: "",
|
||||
ids: this.ids,
|
||||
};
|
||||
this.form.nurseStationItemPrices.push(obj);
|
||||
} else if (this.form.nurseStationItemPrices == null) {
|
||||
var obj = {
|
||||
serveDurationUnit: "",
|
||||
price: "",
|
||||
description: "",
|
||||
ids: this.ids,
|
||||
idd: this.idd,
|
||||
};
|
||||
this.form.nurseStationItemPrices.push(obj);
|
||||
}
|
||||
console.log(this.form)
|
||||
this.open = true;
|
||||
this.title = "修改护理站护理项目";
|
||||
});
|
||||
@ -460,6 +546,9 @@ export default {
|
||||
e.nurseStationConsumableId = e.id;
|
||||
});
|
||||
this.form.nurseStationItem.nurseTypeId = this.form.nurseTypeId;
|
||||
if (!this.form.nurseStationItem.appointmentLimitCount) {
|
||||
this.form.nurseStationItem.appointmentLimitCount = null
|
||||
}
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.nurseStationItem.id != null) {
|
||||
@ -471,13 +560,12 @@ export default {
|
||||
obj.pictureUrlList.push(this.imgone);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => { });
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
this.imgsurl={pictureUrlList:[]};
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
this.form.nurseStationItemPrices.forEach(e => {
|
||||
e.price = Number(e.price)
|
||||
})
|
||||
this.form.nurseStationItem.advanceAppointDuration=0
|
||||
updateNurseItem(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
@ -487,7 +575,6 @@ export default {
|
||||
this.form.nurseStationItemPrices.forEach(e => {
|
||||
e.price = Number(e.price)
|
||||
})
|
||||
this.form.nurseStationItem.advanceAppointDuration=0
|
||||
addNurseItem(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.$forceUpdate();
|
||||
@ -504,16 +591,16 @@ export default {
|
||||
var that = this;
|
||||
this.$modal
|
||||
.confirm("是否确认删除此护理站护理项目?")
|
||||
.then(function () {
|
||||
.then(function() {
|
||||
delNurseItem(ids).then(res => {
|
||||
var obj = { pictureUrlList: [] };
|
||||
obj.pictureUrlList.push(row.itemPictureUrl);
|
||||
updatePicture(obj).then((res) => { });
|
||||
updatePicture(obj).then((res) => {});
|
||||
that.getList();
|
||||
that.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handleExport() {
|
||||
@ -521,4 +608,4 @@ export default {
|
||||
this.upload.open = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
@ -25,7 +25,7 @@
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div>
|
||||
</el-col> -->
|
||||
</el-col>-->
|
||||
<!--用户数据-->
|
||||
<el-col :span="24" :xs="24">
|
||||
<el-form
|
||||
@ -81,16 +81,8 @@
|
||||
></el-date-picker>
|
||||
</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-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>
|
||||
|
||||
@ -103,8 +95,7 @@
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:user:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -115,8 +106,7 @@
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -127,8 +117,7 @@
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
@ -149,19 +138,11 @@
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:user:export']"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
:columns="columns"
|
||||
></right-toolbar>
|
||||
</el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="userList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column
|
||||
label="用户编号"
|
||||
@ -195,12 +176,7 @@
|
||||
v-if="columns[4].visible"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
align="center"
|
||||
key="status"
|
||||
v-if="columns[5].visible"
|
||||
>
|
||||
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
@ -234,16 +210,14 @@
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:user:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
>删除</el-button>
|
||||
<el-dropdown
|
||||
size="mini"
|
||||
@command="(command) => handleCommand(command, scope.row)"
|
||||
@ -257,14 +231,12 @@
|
||||
command="handleResetPwd"
|
||||
icon="el-icon-key"
|
||||
v-hasPermi="['system:user:resetPwd']"
|
||||
>重置密码</el-dropdown-item
|
||||
>
|
||||
>重置密码</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
command="handleAuthRole"
|
||||
icon="el-icon-circle-check"
|
||||
v-hasPermi="['system:user:edit']"
|
||||
>分配角色</el-dropdown-item
|
||||
>
|
||||
>分配角色</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
@ -280,18 +252,13 @@
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="用户昵称" prop="nickName">
|
||||
<el-input
|
||||
v-model="form.nickName"
|
||||
placeholder="请输入用户昵称"
|
||||
maxlength="30"
|
||||
/>
|
||||
<el-input v-model="form.nickName" placeholder="请输入用户昵称" maxlength="30" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@ -310,48 +277,28 @@
|
||||
<el-form-item label="归属部门" prop="deptId">
|
||||
<treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-col>-->
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="手机号码" prop="phonenumber">
|
||||
<el-input
|
||||
v-model="form.phonenumber"
|
||||
placeholder="请输入手机号码"
|
||||
maxlength="11"
|
||||
/>
|
||||
<el-input v-model="form.phonenumber" placeholder="请输入手机号码" maxlength="11" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="邮箱" prop="email">
|
||||
<el-input
|
||||
v-model="form.email"
|
||||
placeholder="请输入邮箱"
|
||||
maxlength="50"
|
||||
/>
|
||||
<el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
v-if="form.userId == undefined"
|
||||
label="用户名称"
|
||||
prop="userName"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.userName"
|
||||
placeholder="请输入用户名称"
|
||||
maxlength="30"
|
||||
/>
|
||||
<el-form-item v-if="form.userId == undefined" label="用户名称" prop="userName">
|
||||
<el-input v-model="form.userName" placeholder="请输入用户名称" maxlength="30" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
v-if="form.userId == undefined"
|
||||
label="用户密码"
|
||||
prop="password"
|
||||
>
|
||||
<el-form-item v-if="form.userId == undefined" label="用户密码" prop="password">
|
||||
<el-input
|
||||
v-model="form.password"
|
||||
placeholder="请输入用户密码"
|
||||
@ -364,20 +311,14 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<!-- multiple -->
|
||||
<el-form-item label="护理站" prop="nurseStationIds">
|
||||
<el-select
|
||||
v-model="form.nurseStationIds"
|
||||
placeholder="请选择护理站"
|
||||
v-loadmore="loadMore"
|
||||
>
|
||||
<el-select v-model="form.nurseStationIds" placeholder="请选择护理站" multiple>
|
||||
<el-option
|
||||
v-for="item in nurseStationlist"
|
||||
:key="item.id"
|
||||
:label="item.nurseStationName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -388,8 +329,7 @@
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}</el-radio
|
||||
>
|
||||
>{{ dict.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -407,14 +347,10 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-col>-->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="角色">
|
||||
<el-select
|
||||
v-model="form.roleIds"
|
||||
multiple
|
||||
placeholder="请选择角色"
|
||||
>
|
||||
<el-select v-model="form.roleIds" multiple placeholder="请选择角色">
|
||||
<el-option
|
||||
v-for="item in roleOptions"
|
||||
:key="item.roleId"
|
||||
@ -429,11 +365,7 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注">
|
||||
<el-input
|
||||
v-model="form.remark"
|
||||
type="textarea"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -443,14 +375,8 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 用户导入对话框 -->
|
||||
<el-dialog
|
||||
:title="upload.title"
|
||||
:visible.sync="upload.open"
|
||||
width="400px"
|
||||
append-to-body
|
||||
>
|
||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:limit="1"
|
||||
@ -464,11 +390,13 @@
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<div class="el-upload__text">
|
||||
将文件拖到此处,或
|
||||
<em>点击上传</em>
|
||||
</div>
|
||||
<div class="el-upload__tip text-center" slot="tip">
|
||||
<div class="el-upload__tip" slot="tip">
|
||||
<el-checkbox v-model="upload.updateSupport" />
|
||||
是否更新已经存在的用户数据
|
||||
<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
|
||||
</div>
|
||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||
<el-link
|
||||
@ -476,8 +404,7 @@
|
||||
:underline="false"
|
||||
style="font-size: 12px; vertical-align: baseline"
|
||||
@click="importTemplate"
|
||||
>下载模板</el-link
|
||||
>
|
||||
>下载模板</el-link>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -487,7 +414,6 @@
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listUser,
|
||||
@ -496,7 +422,7 @@ import {
|
||||
addUser,
|
||||
updateUser,
|
||||
resetUserPwd,
|
||||
changeUserStatus,
|
||||
changeUserStatus
|
||||
} from "@/api/system/user";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { treeselect } from "@/api/system/dept";
|
||||
@ -545,7 +471,7 @@ export default {
|
||||
form: {},
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "label",
|
||||
label: "label"
|
||||
},
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
@ -560,7 +486,7 @@ export default {
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + "/system/user/importData",
|
||||
url: process.env.VUE_APP_BASE_API + "/system/user/importData"
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
@ -569,12 +495,12 @@ export default {
|
||||
userName: undefined,
|
||||
phonenumber: undefined,
|
||||
status: undefined,
|
||||
deptId: undefined,
|
||||
deptId: undefined
|
||||
},
|
||||
// 查询参数
|
||||
nurseStationqueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
pageSize: 999,
|
||||
areaCode: null,
|
||||
userId: null,
|
||||
nurseStationCode: null,
|
||||
@ -589,7 +515,7 @@ export default {
|
||||
dutyPerson: null,
|
||||
dutyPhone: null,
|
||||
stationPictureUrl: null,
|
||||
sort: null,
|
||||
sort: null
|
||||
},
|
||||
// 列信息
|
||||
columns: [
|
||||
@ -599,7 +525,7 @@ export default {
|
||||
{ key: 3, label: `部门`, visible: true },
|
||||
{ key: 4, label: `手机号码`, visible: true },
|
||||
{ key: 5, label: `状态`, visible: true },
|
||||
{ key: 6, label: `创建时间`, visible: true },
|
||||
{ key: 6, label: `创建时间`, visible: true }
|
||||
],
|
||||
// 表单校验
|
||||
rules: {
|
||||
@ -609,14 +535,14 @@ export default {
|
||||
min: 2,
|
||||
max: 20,
|
||||
message: "用户名称长度必须介于 2 和 20 之间",
|
||||
trigger: "blur",
|
||||
},
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
// nurseStationIds: [
|
||||
// { required: true, message: "护理站不能为空", trigger: "blur" },
|
||||
// ],
|
||||
nickName: [
|
||||
{ required: true, message: "用户昵称不能为空", trigger: "blur" },
|
||||
{ required: true, message: "用户昵称不能为空", trigger: "blur" }
|
||||
],
|
||||
password: [
|
||||
{ required: true, message: "用户密码不能为空", trigger: "blur" },
|
||||
@ -624,70 +550,53 @@ export default {
|
||||
min: 5,
|
||||
max: 20,
|
||||
message: "用户密码长度必须介于 5 和 20 之间",
|
||||
trigger: "blur",
|
||||
},
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
email: [
|
||||
{
|
||||
type: "email",
|
||||
message: "请输入正确的邮箱地址",
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
trigger: ["blur", "change"]
|
||||
}
|
||||
],
|
||||
phonenumber: [
|
||||
{
|
||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||
message: "请输入正确的手机号码",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
trigger: "blur"
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 根据名称筛选部门树
|
||||
deptName(val) {
|
||||
this.$refs.tree.filter(val);
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getTreeselect();
|
||||
this.listinfo();
|
||||
this.getConfigKey("sys.user.initPassword").then((response) => {
|
||||
this.getConfigKey("sys.user.initPassword").then(response => {
|
||||
this.initPassword = response.msg;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
listinfo() {
|
||||
list(this.nurseStationqueryParams).then((res) => {
|
||||
list(this.nurseStationqueryParams).then(res => {
|
||||
console.log(res);
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
});
|
||||
},
|
||||
loadMore() {
|
||||
var a = Math.ceil(this.total2 / 10);
|
||||
console.log(this.nurseStationlist.length);
|
||||
if (this.nurseStationlist.length + 1 >= this.total2) {
|
||||
} else {
|
||||
if (this.nurseStationqueryParams.pageNum >= a) {
|
||||
} else {
|
||||
this.nurseStationqueryParams.pageNum++;
|
||||
list(this.nurseStationqueryParams).then((res) => {
|
||||
console.log(res);
|
||||
res.rows.forEach((e) => {
|
||||
this.nurseStationlist.push(e);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
/** 查询用户列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
|
||||
(response) => {
|
||||
response => {
|
||||
this.userList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
@ -696,7 +605,7 @@ export default {
|
||||
},
|
||||
/** 查询部门下拉树结构 */
|
||||
getTreeselect() {
|
||||
treeselect().then((response) => {
|
||||
treeselect().then(response => {
|
||||
this.deptOptions = response.data;
|
||||
});
|
||||
},
|
||||
@ -715,13 +624,13 @@ export default {
|
||||
let text = row.status === "0" ? "启用" : "停用";
|
||||
this.$modal
|
||||
.confirm('确认要"' + text + '""' + row.userName + '"用户吗?')
|
||||
.then(function () {
|
||||
.then(function() {
|
||||
return changeUserStatus(row.userId, row.status);
|
||||
})
|
||||
.then(() => {
|
||||
this.$modal.msgSuccess(text + "成功");
|
||||
})
|
||||
.catch(function () {
|
||||
.catch(function() {
|
||||
row.status = row.status === "0" ? "1" : "0";
|
||||
});
|
||||
},
|
||||
@ -744,7 +653,7 @@ export default {
|
||||
status: "0",
|
||||
remark: undefined,
|
||||
postIds: [],
|
||||
roleIds: [],
|
||||
roleIds: []
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
@ -761,7 +670,7 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.userId);
|
||||
this.ids = selection.map(item => item.userId);
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
@ -782,7 +691,7 @@ export default {
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.getTreeselect();
|
||||
getUser().then((response) => {
|
||||
getUser().then(response => {
|
||||
this.postOptions = response.posts;
|
||||
this.roleOptions = response.roles;
|
||||
this.open = true;
|
||||
@ -795,13 +704,16 @@ export default {
|
||||
this.reset();
|
||||
this.getTreeselect();
|
||||
const userId = row.userId || this.ids;
|
||||
getUser(userId).then((response) => {
|
||||
getUser(userId).then(response => {
|
||||
this.form = response.data;
|
||||
if (!this.form.nurseStationIds) {
|
||||
this.form.nurseStationIds = ''
|
||||
if (this.form.nurseStationIds) {
|
||||
this.form.nurseStationIds = this.form.nurseStationIds.split(",");
|
||||
this.form.nurseStationIds = this.form.nurseStationIds.map(e => {
|
||||
return (e = Number(e));
|
||||
});
|
||||
// this.form.nurseStationIds = [];
|
||||
} else {
|
||||
this.form.nurseStationIds = Number(this.form.nurseStationIds);
|
||||
|
||||
// this.form.nurseStationIds = Number(this.form.nurseStationIds);
|
||||
}
|
||||
// if (
|
||||
// !this.form.nurseStationIds ||
|
||||
@ -809,10 +721,7 @@ export default {
|
||||
// this.form.nurseStationIds.length == 0
|
||||
// ) {getList
|
||||
// } else {
|
||||
// this.form.nurseStationIds = this.form.nurseStationIds.split(",");
|
||||
// this.form.nurseStationIds = this.form.nurseStationIds.map((e) => {
|
||||
// return (e = Number(e));
|
||||
// });
|
||||
|
||||
// }
|
||||
console.log(this.form);
|
||||
this.postOptions = response.posts;
|
||||
@ -826,60 +735,55 @@ export default {
|
||||
},
|
||||
/** 重置密码按钮操作 */
|
||||
handleResetPwd(row) {
|
||||
|
||||
this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
closeOnClickModal: false,
|
||||
inputPattern: /^.{5,20}$/,
|
||||
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
|
||||
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间"
|
||||
})
|
||||
.then(({ value }) => {
|
||||
resetUserPwd(row.userId, value).then((response) => {
|
||||
resetUserPwd(row.userId, value).then(response => {
|
||||
this.$modal.msgSuccess("修改成功,新密码是:" + value);
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 分配角色操作 */
|
||||
handleAuthRole: function (row) {
|
||||
handleAuthRole: function(row) {
|
||||
const userId = row.userId;
|
||||
this.$router.push("/system/user-auth/role/" + userId);
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
submitForm: function() {
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
// this.form.nurseStationIds = this.form.nurseStationIds.join(",");
|
||||
// this.form.nurseStationIds = JSON.stringify(this.form.nurseStationIds);
|
||||
// var obj = [];
|
||||
// obj.push(this.form.nurseStationIds);
|
||||
// console.log(obj)
|
||||
// this.form.nurseStationIds = obj;
|
||||
|
||||
if (this.form.userId != undefined) {
|
||||
if (!this.form.nurseStationIds) {
|
||||
this.form.nurseStationIds = null
|
||||
updateUser(this.form).then((response) => {
|
||||
this.form.nurseStationIds = null;
|
||||
updateUser(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
// console.log('bbb',this.form)
|
||||
});
|
||||
} else {
|
||||
this.form.nurseStationIds = Number(this.form.nurseStationIds);
|
||||
|
||||
updateUser(this.form).then((response) => {
|
||||
|
||||
// this.form.nurseStationIds = Number(this.form.nurseStationIds);
|
||||
this.form.nurseStationIds = this.form.nurseStationIds.join(",");
|
||||
updateUser(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
// console.log('bbb',this.form)
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
addUser(this.form).then((response) => {
|
||||
addUser(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
@ -893,21 +797,21 @@ export default {
|
||||
const userIds = row.userId || this.ids;
|
||||
this.$modal
|
||||
.confirm("是否确认删除此用户?")
|
||||
.then(function () {
|
||||
.then(function() {
|
||||
return delUser(userIds);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/user/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
...this.queryParams
|
||||
},
|
||||
`user_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
@ -936,8 +840,8 @@ export default {
|
||||
this.$refs.upload.clearFiles();
|
||||
this.$alert(
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
"</div>",
|
||||
response.msg +
|
||||
"</div>",
|
||||
"导入结果",
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
);
|
||||
@ -946,7 +850,7 @@ export default {
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit();
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user