护理项目+护理站
This commit is contained in:
parent
c2e69ad8c4
commit
15855dc827
@ -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({
|
||||
|
||||
@ -16,15 +16,14 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属护理站" prop="nurseStationName">
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input
|
||||
v-model="getListByUserquery.nurseStationName"
|
||||
placeholder="请输入护理站"
|
||||
placeholder="请输入护理站名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -38,7 +37,6 @@
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
@ -78,10 +76,9 @@
|
||||
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="info"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="nurseStationlist"
|
||||
@ -100,7 +97,6 @@
|
||||
prop="nurseStationName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column label="所属区域" align="center" prop="area">
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
@ -148,7 +144,6 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
@ -156,7 +151,7 @@
|
||||
:limit.sync="getListByUserquery.pageSize"
|
||||
@pagination="info"
|
||||
/>
|
||||
<!-- 新增护理站信息对话框 -->
|
||||
<!-- 新增修改护理站信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
@ -270,13 +265,40 @@
|
||||
maxlength="11"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input
|
||||
placeholder="请输入排序"
|
||||
v-model="form.sort"
|
||||
maxlength="8"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
/>
|
||||
<el-form-item label="护理机构分类" required>
|
||||
<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
|
||||
@ -292,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"
|
||||
@ -355,8 +441,8 @@
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.labelSort"
|
||||
maxlength="10"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="5"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -384,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"
|
||||
@ -424,11 +605,15 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- station/list -->
|
||||
<script>
|
||||
// import stationjs from "./stationjs";
|
||||
// export default stationjs;
|
||||
|
||||
import {
|
||||
listStation,
|
||||
getStation,
|
||||
delStation,
|
||||
listStationClassify,
|
||||
addStation,
|
||||
updateStation,
|
||||
getFirstLevelInfo,
|
||||
@ -443,38 +628,37 @@ 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: "",
|
||||
imageUrl2: "",
|
||||
imgtwo: "",
|
||||
imgone: "",
|
||||
handstationlist: [], //页面搜索list
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
@ -486,8 +670,7 @@ export default {
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url:
|
||||
process.env.VUE_APP_BASE_API +
|
||||
url: process.env.VUE_APP_BASE_API +
|
||||
"/system/station/insertNurseStationImportList",
|
||||
},
|
||||
//护理类型
|
||||
@ -505,53 +688,61 @@ export default {
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
total2: 0,
|
||||
//所属护理类型
|
||||
typelooks: [],
|
||||
classifytotal: 0,
|
||||
//所属标签
|
||||
looknurseStationLabel: [
|
||||
{
|
||||
looknurseStationLabel: [{
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
idd: 1,
|
||||
},
|
||||
],
|
||||
},],
|
||||
// 护理站信息表格数据
|
||||
stationList: [
|
||||
{
|
||||
sysAreaVOList: [
|
||||
{
|
||||
stationList: [{
|
||||
sysAreaVOList: [{
|
||||
provinceName: null,
|
||||
cityName: null,
|
||||
streetName: null,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},],
|
||||
},],
|
||||
nurseStationlist: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
typeopen: false,
|
||||
nurseStationLabelopen: false,
|
||||
Classifyshow: false,
|
||||
afternoonOpenStartTimeStr: "",
|
||||
afternoonOpenEndTimeStr: "",
|
||||
//权限查询
|
||||
getListByUserquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 查询参数
|
||||
// 表单参数
|
||||
form: {},
|
||||
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" },
|
||||
],
|
||||
@ -564,22 +755,18 @@ export default {
|
||||
nurseStationDescription: [
|
||||
{ required: true, message: "护理站总概述不能为空", trigger: "blur" },
|
||||
],
|
||||
phone: [
|
||||
{
|
||||
phone: [{
|
||||
required: true,
|
||||
validator: checkMobile,
|
||||
// validator: checkMobile,
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
},
|
||||
],
|
||||
message: "请输入手机号",
|
||||
},],
|
||||
|
||||
dutyPhone: [
|
||||
{
|
||||
validator: checkMobile2,
|
||||
dutyPhone: [{
|
||||
// validator: checkMobile2,
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
},
|
||||
],
|
||||
message: "请输入联系电话",
|
||||
},],
|
||||
sort: [{ required: true, message: "排序不能为空", trigger: "blur" }],
|
||||
address: [{ required: true, message: "地址不能为空", trigger: "blur" }],
|
||||
longitude: [
|
||||
@ -598,12 +785,14 @@ export default {
|
||||
{ required: true, message: "请选择护理站类型", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
|
||||
checkedDataList: []// 选择的护理机构分类
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getaddress();
|
||||
this.info();
|
||||
this.infos();
|
||||
this.classifylistInfo();
|
||||
},
|
||||
methods: {
|
||||
imgs(item) {
|
||||
@ -620,13 +809,11 @@ export default {
|
||||
console.log();
|
||||
// this.looknurseStationLabel.splice(index,1)
|
||||
if (this.looknurseStationLabel.length === 1) {
|
||||
this.looknurseStationLabel = [
|
||||
{
|
||||
this.looknurseStationLabel = [{
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
idd: 1,
|
||||
},
|
||||
];
|
||||
},];
|
||||
} else {
|
||||
this.looknurseStationLabel.splice(index, 1);
|
||||
}
|
||||
@ -647,7 +834,6 @@ export default {
|
||||
}
|
||||
console.log(this.looknurseStationLabel);
|
||||
},
|
||||
|
||||
//点击街道
|
||||
clickstreet(item) {
|
||||
this.form.areaCode = item.areaCode;
|
||||
@ -680,12 +866,16 @@ export default {
|
||||
this.citylist = res.data;
|
||||
});
|
||||
},
|
||||
/** 查询护理站信息列表 */
|
||||
/** 获取省列表 */
|
||||
getaddress() {
|
||||
getFirstLevelInfo().then((res) => {
|
||||
this.provincelist = res.data;
|
||||
});
|
||||
},
|
||||
getList() {
|
||||
this.info();
|
||||
},
|
||||
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
var obj = { pictureUrlList: [] };
|
||||
@ -696,18 +886,17 @@ 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;
|
||||
this.reset();
|
||||
this.arealist = [];
|
||||
this.citylist = [];
|
||||
this.streetlist = [];
|
||||
this.arealist = []
|
||||
this.citylist = []
|
||||
this.streetlist = []
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
@ -731,13 +920,82 @@ 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");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
liststationinfo() {
|
||||
this.loading = true;
|
||||
this.info();
|
||||
//护理机构分类
|
||||
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)
|
||||
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
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
this.loading = false
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
this.loading = true;
|
||||
@ -778,13 +1036,11 @@ export default {
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.looknurseStationLabel = [
|
||||
{
|
||||
this.looknurseStationLabel = [{
|
||||
labelDescription: "",
|
||||
sort: "",
|
||||
idd: 1,
|
||||
},
|
||||
];
|
||||
},];
|
||||
this.title = "添加护理站信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
@ -793,6 +1049,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;
|
||||
@ -805,9 +1067,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);
|
||||
@ -821,20 +1102,20 @@ export default {
|
||||
if (this.imgtwo != this.form.stationPictureUrl) {
|
||||
obj.pictureUrlList.push(this.imgtwo);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => { });
|
||||
}
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.info();
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addStation(this.form).then((response) => {
|
||||
if (response.code) {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.info();
|
||||
this.getList();
|
||||
} else {
|
||||
this.form.nurseStationType = obj;
|
||||
}
|
||||
@ -856,18 +1137,17 @@ 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.info();
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/station/export",
|
||||
{
|
||||
"system/station/export", {
|
||||
...this.getListByUserquery,
|
||||
},
|
||||
`station_${new Date().getTime()}.xlsx`
|
||||
@ -881,8 +1161,7 @@ export default {
|
||||
/** 下载模板操作 */
|
||||
importTemplate() {
|
||||
this.download(
|
||||
"/system/station/downloadTemplate?fileType=nurseStation",
|
||||
{},
|
||||
"/system/station/downloadTemplate?fileType=nurseStation", {},
|
||||
`护理站信息导入模板.xlsx`
|
||||
);
|
||||
},
|
||||
@ -899,34 +1178,14 @@ export default {
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
"</div>",
|
||||
"导入结果",
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
"导入结果", { dangerouslyUseHTMLString: true }
|
||||
);
|
||||
this.info();
|
||||
this.getList();
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
//护理站限列表
|
||||
info() {
|
||||
//加个所属区域
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
infos() {
|
||||
var queryFor = {
|
||||
pageNum: 1,
|
||||
pageSize: 9999,
|
||||
};
|
||||
getListByUser(queryFor).then((res) => {
|
||||
console.log(res);
|
||||
this.handstationlist = res.rows;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -283,6 +283,47 @@
|
||||
>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item label="提前预约时长" prop="nurseStationItem.advanceAppointDuration">
|
||||
<el-select
|
||||
v-model="form.nurseStationItem.advanceAppointDuration"
|
||||
placeholder="请选择提前预约时长"
|
||||
style="width:208px"
|
||||
>
|
||||
<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="form.nurseStationItem.appointmentLimitCount"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="8"
|
||||
/>
|
||||
</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="请输入排序"
|
||||
@ -821,6 +862,31 @@ export default {
|
||||
total2: 0,
|
||||
total3: 0,
|
||||
total4: 0,
|
||||
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: '一天'
|
||||
}, ],
|
||||
//耗材
|
||||
stationConsumableList: [],
|
||||
// 护理站护理项目表格数据
|
||||
@ -882,6 +948,15 @@ export default {
|
||||
"nurseStationItem.sort": [
|
||||
{ required: true, message: "排序不能为空", trigger: "blur" },
|
||||
],
|
||||
"nurseStationItem.advanceAppointDuration": [
|
||||
{ required: true, message: "提前预约时长不能为空", trigger: "blur" },
|
||||
],
|
||||
// }, ],
|
||||
"nurseStationItem.appointmentTimeInterval": [{
|
||||
required: true,
|
||||
trigger: "blur",
|
||||
message: "请选择预约时间点间隔",
|
||||
}, ],
|
||||
// "nurseStationItem.advanceAppointDuration": [
|
||||
// { required: true, message: "提前预约时长不能为空", trigger: "blur" },
|
||||
// ],
|
||||
@ -1266,7 +1341,7 @@ export default {
|
||||
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;
|
||||
@ -1276,7 +1351,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();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user