工作提交
This commit is contained in:
parent
6b97199cfb
commit
09954788b2
@ -1,3 +1,3 @@
|
|||||||
var baseurl = "http://192.168.16.81:8081";
|
var baseurl = "http://192.168.16.81:8080";
|
||||||
|
|
||||||
export default baseurl
|
export default baseurl
|
||||||
@ -1,5 +1,7 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 查询护理站信息列表
|
// 查询护理站信息列表
|
||||||
export function listStation(query) {
|
export function listStation(query) {
|
||||||
return request({
|
return request({
|
||||||
@ -59,3 +61,38 @@ export function getSecondaryLevelInfo(id) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//省市区
|
||||||
|
export function getSubordinateRegions(Code) {
|
||||||
|
return request({
|
||||||
|
url: `/system/area/getSubordinateRegions?areaCode=${Code}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//查看所属护理类型
|
||||||
|
|
||||||
|
export function getInfoLists(Code) {
|
||||||
|
return request({
|
||||||
|
url: `/system/nurseType/getInfoList?nurseTypeCode=${Code}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//查看所属标签信息
|
||||||
|
|
||||||
|
export function nurseStationlabel(id) {
|
||||||
|
return request({
|
||||||
|
url: `/system/nurseStationlabel/list?nurseStationId=${id}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export function getLabelList(id) {
|
||||||
|
return request({
|
||||||
|
url: `/system/nurseStationlabel/getLabelList?nurseStationId=${id}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
8
src/api/system/userlist.js
Normal file
8
src/api/system/userlist.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function getListByUser(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/user/getListByUser',
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -133,6 +133,30 @@
|
|||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column type="expand">
|
||||||
|
<template slot-scope="props">
|
||||||
|
<el-form label-position="left" inline class="demo-table-expand">
|
||||||
|
<el-form-item label="护理时长" style="margin-left: 120px">
|
||||||
|
<div
|
||||||
|
v-for="(item, index) in props.row.nurseStationItemPrices"
|
||||||
|
:key="index"
|
||||||
|
style="display: block"
|
||||||
|
>
|
||||||
|
{{ 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>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="所属护理站"
|
label="所属护理站"
|
||||||
align="center"
|
align="center"
|
||||||
@ -185,7 +209,6 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total > 0"
|
v-show="total > 0"
|
||||||
:total="total"
|
:total="total"
|
||||||
@ -198,7 +221,7 @@
|
|||||||
<el-dialog
|
<el-dialog
|
||||||
:title="title"
|
:title="title"
|
||||||
:visible.sync="open"
|
:visible.sync="open"
|
||||||
width="1100px"
|
width="1120px"
|
||||||
append-to-body
|
append-to-body
|
||||||
:before-close="cancel"
|
:before-close="cancel"
|
||||||
>
|
>
|
||||||
@ -206,7 +229,7 @@
|
|||||||
ref="form"
|
ref="form"
|
||||||
:model="form"
|
:model="form"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
label-width="110px"
|
label-width="130px"
|
||||||
:inline="true"
|
:inline="true"
|
||||||
>
|
>
|
||||||
<el-form-item label="所属护理站" prop="nurseStationItem.nurseStationId">
|
<el-form-item label="所属护理站" prop="nurseStationItem.nurseStationId">
|
||||||
@ -243,6 +266,13 @@
|
|||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="护理项目名称" prop="nurseItemName">
|
||||||
|
<el-input
|
||||||
|
v-model="form.nurseStationItem.nurseItemName"
|
||||||
|
placeholder="请输入护理项目名称"
|
||||||
|
maxlength="50"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="护理类型" prop="nurseStationItem.nurseTypeId">
|
<el-form-item label="护理类型" prop="nurseStationItem.nurseTypeId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.nurseStationItem.nurseTypeId"
|
v-model="form.nurseStationItem.nurseTypeId"
|
||||||
@ -259,14 +289,6 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="护理项目名称" prop="nurseItemName">
|
|
||||||
<el-input
|
|
||||||
v-model="form.nurseStationItem.nurseItemName"
|
|
||||||
placeholder="请输入护理项目名称"
|
|
||||||
maxlength="50"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="提前预约时长" prop="advanceAppointDuration">
|
<el-form-item label="提前预约时长" prop="advanceAppointDuration">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.nurseStationItem.advanceAppointDuration"
|
v-model="form.nurseStationItem.advanceAppointDuration"
|
||||||
@ -274,16 +296,19 @@
|
|||||||
type="number"
|
type="number"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="排序" prop="sort">
|
<el-form-item label="排序" prop="sort">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.nurseStationItem.sort"
|
v-model="form.nurseStationItem.sort"
|
||||||
|
placeholder="不可输入小数点"
|
||||||
type="number"
|
type="number"
|
||||||
oninput=" if(value.length>10){value=value.slice(0,10)}"
|
min="0"
|
||||||
placeholder="请输入排序"
|
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+0)} if(value.length>10){value=value.slice(0,10)}"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目内容简介">
|
<el-form-item
|
||||||
|
label="项目内容简介"
|
||||||
|
prop="nurseStationItem.nurseItemContent"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
maxlength="300"
|
maxlength="300"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
@ -294,16 +319,16 @@
|
|||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目时长和价格">
|
<el-form-item label="项目时长和价格" required>
|
||||||
<el-table
|
<el-table
|
||||||
ref="singleTable"
|
ref="nurseStationItemPrices"
|
||||||
:data="form.nurseStationItemPrices"
|
:data="form.nurseStationItemPrices"
|
||||||
style="margin-top: 20px; width: 100%"
|
style="margin-top: 20px; width: 100%"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
property="serveDurationUnit"
|
property="serveDurationUnit"
|
||||||
label="服务时长和单位"
|
label="服务时长和单位"
|
||||||
width="140"
|
width="145"
|
||||||
align="center"
|
align="center"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -317,7 +342,7 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
property="price"
|
property="price"
|
||||||
label="价格"
|
label="价格"
|
||||||
width="161"
|
width="166"
|
||||||
align="center"
|
align="center"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -332,7 +357,7 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
property="description"
|
property="description"
|
||||||
label="描述"
|
label="描述"
|
||||||
width="135"
|
width="140"
|
||||||
align="center"
|
align="center"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -342,7 +367,7 @@
|
|||||||
></el-input>
|
></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="100">
|
<el-table-column label="操作" align="center" width="105">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -360,27 +385,14 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目头像">
|
<el-form-item label="项目头像" required>
|
||||||
<el-upload
|
<stationAcatar
|
||||||
class="avatar-uploader"
|
@imgUrl="imgUrl"
|
||||||
action="https://jsonplaceholder.typicode.com/posts/"
|
:img="form.nurseStationItem.itemPictureUrl"
|
||||||
:show-file-list="false"
|
:type="'itemPictureUrl'"
|
||||||
:on-success="handleAvatarSuccess"
|
/>
|
||||||
>
|
|
||||||
<img
|
|
||||||
v-if="imageUrl"
|
|
||||||
:src="imageUrl"
|
|
||||||
class="avatar"
|
|
||||||
style="width: 208px; margin-top: 20px"
|
|
||||||
/>
|
|
||||||
<i
|
|
||||||
v-else
|
|
||||||
class="el-icon-plus avatar-uploader-icon"
|
|
||||||
style="width: 208px; margin-top: 20px; border: 2px solid #fafafa"
|
|
||||||
></i>
|
|
||||||
</el-upload>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="护理项目耗材">
|
<el-form-item label="护理项目耗材" required>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@ -391,12 +403,11 @@
|
|||||||
<el-table
|
<el-table
|
||||||
ref="singleTable"
|
ref="singleTable"
|
||||||
:data="form.nurseStationItemConsumables"
|
:data="form.nurseStationItemConsumables"
|
||||||
style="margin-top: 20px; width: 100%"
|
style="margin-top: 20px; width: 850px"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
property="nurseStationConsumableId"
|
property="nurseStationConsumableId"
|
||||||
label="耗材包名称"
|
label="耗材包名称"
|
||||||
width="150"
|
|
||||||
align="center"
|
align="center"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -407,7 +418,6 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
property="consumableCount"
|
property="consumableCount"
|
||||||
label="耗材包数量"
|
label="耗材包数量"
|
||||||
width="180"
|
|
||||||
align="center"
|
align="center"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -422,7 +432,6 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
property="consumablePrice"
|
property="consumablePrice"
|
||||||
label="耗材包单位"
|
label="耗材包单位"
|
||||||
width="150"
|
|
||||||
align="center"
|
align="center"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -432,14 +441,13 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
property="consumablePrice"
|
property="consumablePrice"
|
||||||
label="耗材包单价"
|
label="耗材包单价"
|
||||||
width="150"
|
|
||||||
align="center"
|
align="center"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.consumablePrice }}
|
{{ scope.row.consumablePrice }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="150">
|
<el-table-column label="操作" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -452,7 +460,6 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
@ -461,7 +468,7 @@
|
|||||||
|
|
||||||
<!-- 护理站 -->
|
<!-- 护理站 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:title="title"
|
title="选择护理站"
|
||||||
:visible.sync="nurseStationshow"
|
:visible.sync="nurseStationshow"
|
||||||
width="1100px"
|
width="1100px"
|
||||||
append-to-body
|
append-to-body
|
||||||
@ -479,6 +486,12 @@
|
|||||||
placeholder="请输入护理站名称"
|
placeholder="请输入护理站名称"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="护理站编号" prop="nurseStationCode">
|
||||||
|
<el-input
|
||||||
|
v-model="nurseStationqueryParams.nurseStationCode"
|
||||||
|
placeholder="请输入护理站编号"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -700,6 +713,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listStationConsumable } from "@/api/system/stationConsumable";
|
import { listStationConsumable } from "@/api/system/stationConsumable";
|
||||||
|
import stationAcatar from "../stationAvatar/index.vue";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
list,
|
list,
|
||||||
getNurseItem,
|
getNurseItem,
|
||||||
@ -712,6 +727,7 @@ import {
|
|||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: { stationAcatar },
|
||||||
name: "NurseItem",
|
name: "NurseItem",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -796,6 +812,16 @@ export default {
|
|||||||
ids: 1,
|
ids: 1,
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
nurseItemName: [
|
||||||
|
{ required: true, message: "护理项目名称不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
"nurseStationItem.nurseItemContent": [
|
||||||
|
{ required: true, message: "项目内容简介不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
sort: [{ required: true, message: "排序不能为空", trigger: "blur" }],
|
||||||
|
advanceAppointDuration: [
|
||||||
|
{ required: true, message: "提前预约时长不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
"nurseStationItem.nurseStationId": [
|
"nurseStationItem.nurseStationId": [
|
||||||
{ required: true, message: "请选择所属护理站", trigger: "blur" },
|
{ required: true, message: "请选择所属护理站", trigger: "blur" },
|
||||||
],
|
],
|
||||||
@ -812,6 +838,10 @@ export default {
|
|||||||
// this.listStationConsumableinfo();
|
// this.listStationConsumableinfo();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
imgUrl(imgUrl) {
|
||||||
|
console.log(imgUrl);
|
||||||
|
this.form.nurseStationItem.itemPictureUrl = imgUrl;
|
||||||
|
},
|
||||||
handleAvatarSuccess(res, file) {
|
handleAvatarSuccess(res, file) {
|
||||||
this.imageUrl = URL.createObjectURL(file.raw);
|
this.imageUrl = URL.createObjectURL(file.raw);
|
||||||
},
|
},
|
||||||
@ -820,7 +850,7 @@ export default {
|
|||||||
this.download(
|
this.download(
|
||||||
"/system/stationItem/downloadTemplate?fileType=1",
|
"/system/stationItem/downloadTemplate?fileType=1",
|
||||||
{},
|
{},
|
||||||
`护理站项目模板.xlsx`
|
`护理站项目信息导入模板.xlsx`
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
// 提交上传文件
|
// 提交上传文件
|
||||||
@ -916,7 +946,6 @@ export default {
|
|||||||
liststation(this.nurseStationqueryParams).then((res) => {
|
liststation(this.nurseStationqueryParams).then((res) => {
|
||||||
this.nurseStationlist = res.rows;
|
this.nurseStationlist = res.rows;
|
||||||
this.total2 = res.total;
|
this.total2 = res.total;
|
||||||
// console.log(this.nurseStationlist);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
loadMore() {
|
loadMore() {
|
||||||
@ -968,10 +997,7 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
list(this.queryParams).then((response) => {
|
list(this.queryParams).then((response) => {
|
||||||
response.rows.forEach((e) => {
|
response.rows.forEach((e) => {
|
||||||
// console.log(e)
|
|
||||||
// e.nurseTypeId
|
|
||||||
this.typelist.forEach((el) => {
|
this.typelist.forEach((el) => {
|
||||||
// console.log(el);
|
|
||||||
if (e.nurseTypeId == el.id) {
|
if (e.nurseTypeId == el.id) {
|
||||||
e.nurseTypeName = el.nurseTypeName;
|
e.nurseTypeName = el.nurseTypeName;
|
||||||
}
|
}
|
||||||
@ -992,19 +1018,21 @@ export default {
|
|||||||
},
|
},
|
||||||
//时长价格
|
//时长价格
|
||||||
addnurseStationItemPrices(item, index) {
|
addnurseStationItemPrices(item, index) {
|
||||||
this.ids++;
|
if (this.form.nurseStationItemPrices.length == 5) {
|
||||||
var obj = {
|
this.$message.error("最多只能5条");
|
||||||
serveDurationUnit: "",
|
} else {
|
||||||
price: "",
|
this.ids++;
|
||||||
description: "",
|
var obj = {
|
||||||
ids: this.ids,
|
serveDurationUnit: "",
|
||||||
};
|
price: "",
|
||||||
this.form.nurseStationItemPrices.push(obj);
|
description: "",
|
||||||
|
ids: this.ids,
|
||||||
|
};
|
||||||
|
this.form.nurseStationItemPrices.push(obj);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
delnurseStationItemPrices(item) {
|
delnurseStationItemPrices(item) {
|
||||||
console.log(item);
|
|
||||||
if (item.ids && !item.id) {
|
if (item.ids && !item.id) {
|
||||||
console.log(1);
|
|
||||||
if (this.form.nurseStationItemPrices.length == 1) {
|
if (this.form.nurseStationItemPrices.length == 1) {
|
||||||
this.$message.error("最后一条不可删除");
|
this.$message.error("最后一条不可删除");
|
||||||
} else {
|
} else {
|
||||||
@ -1012,7 +1040,6 @@ export default {
|
|||||||
this.form.nurseStationItemPrices.filter((e) => e.ids != item.ids);
|
this.form.nurseStationItemPrices.filter((e) => e.ids != item.ids);
|
||||||
}
|
}
|
||||||
} else if (!item.ids && item.id) {
|
} else if (!item.ids && item.id) {
|
||||||
console.log(2);
|
|
||||||
if (this.form.nurseStationItemPrices.length == 1) {
|
if (this.form.nurseStationItemPrices.length == 1) {
|
||||||
this.$message.error("最后一条不可删除");
|
this.$message.error("最后一条不可删除");
|
||||||
} else {
|
} else {
|
||||||
@ -1079,7 +1106,33 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
getNurseItem(id).then((response) => {
|
getNurseItem(id).then((response) => {
|
||||||
|
console.log(response);
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
if (this.form.nurseStationItemPrices == []) {
|
||||||
|
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,
|
||||||
|
};
|
||||||
|
this.form.nurseStationItemPrices.push(obj);
|
||||||
|
}
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改护理站护理项目";
|
this.title = "修改护理站护理项目";
|
||||||
});
|
});
|
||||||
@ -1132,6 +1185,12 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .el-table__cell .el-form-item--medium .el-form-item__content {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
// ::v-deep .el-form-item__label {
|
||||||
|
// font-weight: 550;
|
||||||
|
// }
|
||||||
.avatar-uploader .el-upload {
|
.avatar-uploader .el-upload {
|
||||||
border: 1px dashed #d9d9d9;
|
border: 1px dashed #d9d9d9;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
|||||||
@ -164,7 +164,6 @@
|
|||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="所属区域编码" align="center" prop="areaCode" />
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="护理站编号"
|
label="护理站编号"
|
||||||
align="center"
|
align="center"
|
||||||
@ -175,17 +174,16 @@
|
|||||||
align="center"
|
align="center"
|
||||||
prop="nurseStationName"
|
prop="nurseStationName"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="护理类型" align="center" prop="nurseTypeName">
|
<el-table-column label="护理站类型" align="center" prop="nurseTypeName">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div v-for="(item, index) in scope.row.nurseTypeList" :key="index">
|
<el-button size="mini" type="text" @click="looktype(scope.row)"
|
||||||
<span>
|
>查看</el-button
|
||||||
{{ item.nurseTypeName }}
|
>
|
||||||
</span>
|
|
||||||
<span v-if="scope.row.nurseTypeList.length > 1">.</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column label="所属区域" align="center" prop="areaCode" />
|
||||||
|
<el-table-column label="护理站地址" align="center" prop="address" />
|
||||||
|
<!-- <el-table-column
|
||||||
label="护理站简介"
|
label="护理站简介"
|
||||||
align="center"
|
align="center"
|
||||||
prop="agencyIntroduce"
|
prop="agencyIntroduce"
|
||||||
@ -196,11 +194,10 @@
|
|||||||
align="center"
|
align="center"
|
||||||
prop="nurseStationDescription"
|
prop="nurseStationDescription"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
/>
|
/> -->
|
||||||
<el-table-column label="护理站经度" align="center" prop="longitude" />
|
<el-table-column label="护理站经度" align="center" prop="longitude" />
|
||||||
<el-table-column label="护理站纬度" align="center" prop="latitude" />
|
<el-table-column label="护理站纬度" align="center" prop="latitude" />
|
||||||
<el-table-column label="联系电话" align="center" prop="phone" />
|
<el-table-column label="联系电话" align="center" prop="phone" />
|
||||||
<el-table-column label="护理站地址" align="center" prop="address" />
|
|
||||||
<el-table-column label="负责人" align="center" prop="dutyPerson" />
|
<el-table-column label="负责人" align="center" prop="dutyPerson" />
|
||||||
<el-table-column label="负责人电话" align="center" prop="dutyPhone" />
|
<el-table-column label="负责人电话" align="center" prop="dutyPhone" />
|
||||||
<el-table-column label="排序" align="center" prop="sort" />
|
<el-table-column label="排序" align="center" prop="sort" />
|
||||||
@ -210,6 +207,13 @@
|
|||||||
class-name="small-padding fixed-width"
|
class-name="small-padding fixed-width"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="looknurseStationLabelList(scope.row)"
|
||||||
|
>查看标签信息</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@ -237,6 +241,58 @@
|
|||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="liststationinfo"
|
@pagination="liststationinfo"
|
||||||
/>
|
/>
|
||||||
|
<!-- 查看护理类型 -->
|
||||||
|
<el-dialog
|
||||||
|
title="护理类型"
|
||||||
|
:visible.sync="typeopen"
|
||||||
|
width="700px"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<el-table v-loading="loading" :data="typelooks">
|
||||||
|
<el-table-column
|
||||||
|
label="护理类型名称"
|
||||||
|
align="center"
|
||||||
|
prop="nurseTypeName"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="护理类型编号"
|
||||||
|
align="center"
|
||||||
|
prop="nurseTypeCode"
|
||||||
|
/>
|
||||||
|
</el-table>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" plain @click="typeopen = false" size="small"
|
||||||
|
>关闭窗口</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 查看标签信息 -->
|
||||||
|
<el-dialog
|
||||||
|
title="标签信息"
|
||||||
|
:visible.sync="nurseStationLabelopen"
|
||||||
|
width="700px"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<el-table v-loading="loading" :data="looknurseStationLabel">
|
||||||
|
<el-table-column
|
||||||
|
label="标签名称"
|
||||||
|
align="center"
|
||||||
|
prop="labelDescription"
|
||||||
|
/>
|
||||||
|
<el-table-column label="标签编号" align="center" prop="labelCode" />
|
||||||
|
<el-table-column label="排序" align="center" prop="sort" />
|
||||||
|
</el-table>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
@click="nurseStationLabelopen = false"
|
||||||
|
size="small"
|
||||||
|
>关闭窗口</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 新增护理站信息对话框 -->
|
<!-- 新增护理站信息对话框 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
@ -258,7 +314,7 @@
|
|||||||
v-model="value"
|
v-model="value"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择省"
|
placeholder="请选择省"
|
||||||
style="width: 127px"
|
style="width: 129px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in provincelist"
|
v-for="item in provincelist"
|
||||||
@ -273,7 +329,7 @@
|
|||||||
v-model="value1"
|
v-model="value1"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择市"
|
placeholder="请选择市"
|
||||||
style="width: 127px; margin-left: 10px"
|
style="width: 129px; margin-left: 10px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in citylist"
|
v-for="item in citylist"
|
||||||
@ -288,7 +344,7 @@
|
|||||||
v-model="value2"
|
v-model="value2"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择区"
|
placeholder="请选择区"
|
||||||
style="width: 127px; margin-left: 10px"
|
style="width: 129px; margin-left: 10px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in arealist"
|
v-for="item in arealist"
|
||||||
@ -300,10 +356,10 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.areaCode"
|
v-model="value3"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择街道"
|
placeholder="请选择街道"
|
||||||
style="width: 127px; margin-left: 10px"
|
style="width: 129px; margin-left: 10px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in streetlist"
|
v-for="item in streetlist"
|
||||||
@ -319,20 +375,12 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model="form.nurseStationName"
|
v-model="form.nurseStationName"
|
||||||
placeholder="请输入护理站名称"
|
placeholder="请输入护理站名称"
|
||||||
|
maxlength="40"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="护理站地址" prop="address">
|
|
||||||
<el-input v-model="form.address" placeholder="请输入护理站地址" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="护理站经度" prop="longitude">
|
|
||||||
<el-input v-model="form.longitude" placeholder="请输入护理站经度" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="护理站纬度" prop="latitude">
|
|
||||||
<el-input v-model="form.latitude" placeholder="请输入护理站纬度" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="护理类型" prop="nurseStationType">
|
<el-form-item label="护理类型" prop="nurseStationType">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.nurseStationType"
|
v-model="form.nurseStationType2"
|
||||||
multiple
|
multiple
|
||||||
placeholder="请选择护理类型"
|
placeholder="请选择护理类型"
|
||||||
style="width: 208px"
|
style="width: 208px"
|
||||||
@ -346,20 +394,58 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="护理站经度" prop="longitude">
|
||||||
|
<el-input
|
||||||
|
v-model="form.longitude"
|
||||||
|
placeholder="请输入护理站经度"
|
||||||
|
type="number"
|
||||||
|
oninput=" if(value.length>10){value=value.slice(0,20)}"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="护理站纬度" prop="latitude">
|
||||||
|
<el-input
|
||||||
|
v-model="form.latitude"
|
||||||
|
placeholder="请输入护理站纬度"
|
||||||
|
type="number"
|
||||||
|
oninput=" if(value.length>10){value=value.slice(0,20)}"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="护理站地址" prop="address">
|
||||||
|
<el-input
|
||||||
|
v-model="form.address"
|
||||||
|
placeholder="请输入护理站地址"
|
||||||
|
maxlength="80"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="联系电话" prop="phone">
|
<el-form-item label="联系电话" prop="phone">
|
||||||
<el-input v-model="form.phone" placeholder="请输入联系电话" />
|
<el-input
|
||||||
|
v-model="form.phone"
|
||||||
|
placeholder="请输入联系电话"
|
||||||
|
maxlength="11"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="负责人" prop="dutyPerson">
|
<el-form-item label="负责人" prop="dutyPerson">
|
||||||
<el-input v-model="form.dutyPerson" placeholder="请输入负责人" />
|
<el-input
|
||||||
|
v-model="form.dutyPerson"
|
||||||
|
placeholder="请输入负责人"
|
||||||
|
maxlength="20"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="负责人电话" prop="dutyPhone">
|
<el-form-item label="负责人电话" prop="dutyPhone">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.dutyPhone"
|
v-model="form.dutyPhone"
|
||||||
placeholder="请输入负责人联系电话"
|
placeholder="请输入负责人联系电话"
|
||||||
|
maxlength="11"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序" prop="sort">
|
<el-form-item label="排序" prop="sort">
|
||||||
<el-input v-model="form.sort" placeholder="请输入排序" />
|
<el-input
|
||||||
|
v-model="form.sort"
|
||||||
|
placeholder="排序不可输入小数点"
|
||||||
|
type="number"
|
||||||
|
min="0"
|
||||||
|
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+0)} if(value.length>10){value=value.slice(0,10)}"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="护理站总概述" prop="nurseStationDescription">
|
<el-form-item label="护理站总概述" prop="nurseStationDescription">
|
||||||
<el-input
|
<el-input
|
||||||
@ -367,6 +453,7 @@
|
|||||||
v-model="form.nurseStationDescription"
|
v-model="form.nurseStationDescription"
|
||||||
placeholder="请输入护理站信息总概述"
|
placeholder="请输入护理站信息总概述"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
maxlength="150"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="护理站简介" prop="agencyIntroduce">
|
<el-form-item label="护理站简介" prop="agencyIntroduce">
|
||||||
@ -375,18 +462,63 @@
|
|||||||
v-model="form.agencyIntroduce"
|
v-model="form.agencyIntroduce"
|
||||||
></editor>
|
></editor>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="护理站头像" prop="stationPictureUrl">
|
<el-form-item label="护理站头像" prop="stationPictureUrl" required>
|
||||||
<stationAcatar
|
<stationAcatar
|
||||||
|
@imgUrl="imgUrl"
|
||||||
:img="form.stationPictureUrl"
|
:img="form.stationPictureUrl"
|
||||||
:type="'stationPictureUrl'"
|
:type="'stationPictureUrl'"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="护理站简介头像" prop="stationPictureUrl">
|
<el-form-item label="护理站简介头像" prop="stationIntroducePcitureUrl">
|
||||||
<stationAcatar
|
<stationAcatar
|
||||||
:img="form.stationPictureUrl"
|
@imgUrl="imgUrl2"
|
||||||
|
:img="form.stationIntroducePcitureUrl"
|
||||||
:type="'stationIntroducePcitureUrl'"
|
:type="'stationIntroducePcitureUrl'"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="护理站标签信息" required label-width="130px">
|
||||||
|
<el-table
|
||||||
|
ref="looknurseStationLabel"
|
||||||
|
:data="looknurseStationLabel"
|
||||||
|
style="margin-top: 20px"
|
||||||
|
>
|
||||||
|
<el-table-column label="标签名称" width="190" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input
|
||||||
|
v-model="scope.row.labelDescription"
|
||||||
|
maxlength="40"
|
||||||
|
></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="排序" width="200" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input
|
||||||
|
v-model="scope.row.sort"
|
||||||
|
placeholder="排序不可输入小数点"
|
||||||
|
type="number"
|
||||||
|
min="0"
|
||||||
|
oninput="if(value.indexOf('.')>0){value=value.slice(0,value.indexOf('.')+0)} if(value.length>10){value=value.slice(0,10)}"
|
||||||
|
></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="addnurseStationLabelList"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="delnurseStationLabelList(scope.row)"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
@ -582,12 +714,11 @@
|
|||||||
<el-button @click="upload.open = false">取 消</el-button>
|
<el-button @click="upload.open = false">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<!-- <userlist /> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import editor from "@/components/Editor";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
listStation,
|
listStation,
|
||||||
getStation,
|
getStation,
|
||||||
@ -596,15 +727,42 @@ import {
|
|||||||
updateStation,
|
updateStation,
|
||||||
getFirstLevelInfo,
|
getFirstLevelInfo,
|
||||||
getSecondaryLevelInfo,
|
getSecondaryLevelInfo,
|
||||||
|
getSubordinateRegions,
|
||||||
|
getInfoLists,
|
||||||
|
nurseStationlabel,
|
||||||
|
getLabelList,
|
||||||
} from "@/api/system/station";
|
} from "@/api/system/station";
|
||||||
import { getInfoList } from "@/api/system/nurseItem";
|
import { getInfoList } from "@/api/system/nurseItem";
|
||||||
import stationAcatar from "../stationAvatar/index.vue";
|
import stationAcatar from "../stationAvatar/index.vue";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
|
import editor from "@/components/Editor";
|
||||||
|
import userlist from "../userlist/index.vue";
|
||||||
export default {
|
export default {
|
||||||
components: { stationAcatar, editor },
|
components: { stationAcatar, editor, userlist },
|
||||||
name: "Station",
|
name: "Station",
|
||||||
data() {
|
data() {
|
||||||
|
// 验证手机号的规则
|
||||||
|
var checkMobile = (rule, value, cb) => {
|
||||||
|
var str = String(value);
|
||||||
|
// 验证手机号的正则表达式
|
||||||
|
const regMobile =
|
||||||
|
/^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/;
|
||||||
|
// /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
|
||||||
|
// /^(?:(?:\+|0086))?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[0-9]))\d{8}$/;
|
||||||
|
const reg = /^(0[0-9]{2,3}\-)([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/;
|
||||||
|
const isTel = reg.test(value);
|
||||||
|
|
||||||
|
if (str.length == 11) {
|
||||||
|
if (regMobile.test(str)) {
|
||||||
|
return cb();
|
||||||
|
}
|
||||||
|
} else if (11 < str.length <= 13) {
|
||||||
|
if (isTel) {
|
||||||
|
return cb();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cb(new Error("请输入正确的联系电话"));
|
||||||
|
};
|
||||||
return {
|
return {
|
||||||
imageUrl: "",
|
imageUrl: "",
|
||||||
imageUrl2: "",
|
imageUrl2: "",
|
||||||
@ -643,13 +801,24 @@ export default {
|
|||||||
showSearch: true,
|
showSearch: true,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
|
//所属护理类型
|
||||||
|
typelooks: [],
|
||||||
|
//所属标签
|
||||||
|
looknurseStationLabel: [
|
||||||
|
{
|
||||||
|
labelDescription: "",
|
||||||
|
sort: "",
|
||||||
|
ids: 1,
|
||||||
|
},
|
||||||
|
],
|
||||||
// 护理站信息表格数据
|
// 护理站信息表格数据
|
||||||
stationList: [],
|
stationList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
openadd: false,
|
typeopen: false,
|
||||||
|
nurseStationLabelopen: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -672,15 +841,64 @@ export default {
|
|||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
|
ids: 1,
|
||||||
provincelist: [],
|
provincelist: [],
|
||||||
arealist: [],
|
arealist: [],
|
||||||
citylist: [],
|
citylist: [],
|
||||||
streetlist: [],
|
streetlist: [],
|
||||||
|
resid: null,
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
agencyIntroduce: [
|
||||||
|
{ required: true, message: "请输入护理站简介", trigger: "blur" },
|
||||||
|
],
|
||||||
|
stationIntroducePcitureUrl: [
|
||||||
|
{ required: true, message: "请上传护理站简介头像", trigger: "blur" },
|
||||||
|
],
|
||||||
|
stationPictureUrl: [
|
||||||
|
{ required: true, message: "请上传护理站头像", trigger: "blur" },
|
||||||
|
],
|
||||||
|
nurseStationDescription: [
|
||||||
|
{ required: true, message: "护理站总概述不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
phone: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
validator: checkMobile,
|
||||||
|
trigger: "blur",
|
||||||
|
message: "",
|
||||||
|
},
|
||||||
|
// { required: true, message: "联系电话不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
dutyPerson: [
|
||||||
|
{ required: true, message: "负责人不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
dutyPhone: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
validator: checkMobile,
|
||||||
|
trigger: "blur",
|
||||||
|
message: "",
|
||||||
|
},
|
||||||
|
// { required: true, message: "负责人电话不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
sort: [{ required: true, message: "排序不能为空", trigger: "blur" }],
|
||||||
|
address: [{ required: true, message: "地址不能为空", trigger: "blur" }],
|
||||||
|
longitude: [
|
||||||
|
{ required: true, message: "经度不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
latitude: [
|
||||||
|
{ required: true, message: "纬度不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
areaCode: [
|
areaCode: [
|
||||||
{ required: true, message: "所属区域不能为空", trigger: "blur" },
|
{ required: true, message: "所属区域不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
|
nurseStationName: [
|
||||||
|
{ required: true, message: "护理站名称不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
nurseStationType: [
|
||||||
|
{ required: true, message: "请选择护理站类型", trigger: "blur" },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -688,15 +906,71 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleAvatarSuccess2(res, file) {
|
imgUrl(imgUrl) {
|
||||||
this.imageUrl2 = URL.createObjectURL(file.raw);
|
console.log(imgUrl);
|
||||||
|
this.form.stationPictureUrl = imgUrl;
|
||||||
},
|
},
|
||||||
handleAvatarSuccess(res, file) {
|
imgUrl2(imgUrl) {
|
||||||
this.imageUrl = URL.createObjectURL(file.raw);
|
console.log(imgUrl);
|
||||||
|
this.form.stationIntroducePcitureUrl = imgUrl;
|
||||||
|
},
|
||||||
|
delnurseStationLabelList(item) {
|
||||||
|
console.log(item);
|
||||||
|
if (item.ids && !item.id) {
|
||||||
|
if (this.looknurseStationLabel.length == 1) {
|
||||||
|
this.$message.error("最后一条不可删除");
|
||||||
|
} else {
|
||||||
|
this.looknurseStationLabel = this.looknurseStationLabel.filter(
|
||||||
|
(e) => e.ids != item.ids
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else if (!item.ids && item.id) {
|
||||||
|
if (this.looknurseStationLabel.length == 1) {
|
||||||
|
this.$message.error("最后一条不可删除");
|
||||||
|
} else {
|
||||||
|
this.looknurseStationLabel = this.looknurseStationLabel.filter(
|
||||||
|
(e) => e.id != item.id
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(this.form.nurseStationLabelList);
|
||||||
|
},
|
||||||
|
addnurseStationLabelList() {
|
||||||
|
if (this.looknurseStationLabel.length == 5) {
|
||||||
|
this.$message.error("最多只能5条");
|
||||||
|
} else {
|
||||||
|
this.ids++;
|
||||||
|
var obj = {
|
||||||
|
labelDescription: "",
|
||||||
|
sort: "",
|
||||||
|
ids: this.ids,
|
||||||
|
};
|
||||||
|
this.looknurseStationLabel.push(obj);
|
||||||
|
}
|
||||||
|
console.log(this.looknurseStationLabel);
|
||||||
|
},
|
||||||
|
//查看标签
|
||||||
|
looknurseStationLabelList(item) {
|
||||||
|
console.log(item);
|
||||||
|
nurseStationlabel(item.id).then((res) => {
|
||||||
|
this.looknurseStationLabel = res.rows;
|
||||||
|
this.nurseStationLabelopen = true;
|
||||||
|
console.log(this.looknurseStationLabel);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//查看类型
|
||||||
|
looktype(item) {
|
||||||
|
console.log(item);
|
||||||
|
getInfoLists(item.nurseTypeCode).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
this.typelooks = res.data;
|
||||||
|
this.typeopen = true;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//点击街道
|
//点击街道
|
||||||
clickstreet(item) {
|
clickstreet(item) {
|
||||||
this.form.areaCode = item.areaCode;
|
this.form.areaCode = item.areaCode;
|
||||||
|
this.value3 = item.areaCode;
|
||||||
console.log(this.form);
|
console.log(this.form);
|
||||||
},
|
},
|
||||||
//点击区县城
|
//点击区县城
|
||||||
@ -744,7 +1018,6 @@ export default {
|
|||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
// this.openadd = false;
|
|
||||||
this.reset();
|
this.reset();
|
||||||
this.value3 = "";
|
this.value3 = "";
|
||||||
this.value2 = "";
|
this.value2 = "";
|
||||||
@ -759,6 +1032,7 @@ export default {
|
|||||||
nurseStationCode: null,
|
nurseStationCode: null,
|
||||||
nurseStationName: null,
|
nurseStationName: null,
|
||||||
nurseStationType: null,
|
nurseStationType: null,
|
||||||
|
nurseStationType2: [],
|
||||||
agencyIntroduce: null,
|
agencyIntroduce: null,
|
||||||
nurseStationDescription: null,
|
nurseStationDescription: null,
|
||||||
longitude: null,
|
longitude: null,
|
||||||
@ -768,7 +1042,9 @@ export default {
|
|||||||
dutyPerson: null,
|
dutyPerson: null,
|
||||||
dutyPhone: null,
|
dutyPhone: null,
|
||||||
stationPictureUrl: null,
|
stationPictureUrl: null,
|
||||||
|
stationIntroducePcitureUrl: null,
|
||||||
sort: null,
|
sort: null,
|
||||||
|
nurseStationLabelList: [],
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -786,6 +1062,25 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
|
this.queryParams = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
areaCode: null,
|
||||||
|
userId: null,
|
||||||
|
nurseStationCode: null,
|
||||||
|
nurseStationName: null,
|
||||||
|
nurseStationType: null,
|
||||||
|
agencyIntroduce: null,
|
||||||
|
nurseStationDescription: null,
|
||||||
|
longitude: null,
|
||||||
|
latitude: null,
|
||||||
|
phone: null,
|
||||||
|
address: null,
|
||||||
|
dutyPerson: null,
|
||||||
|
dutyPhone: null,
|
||||||
|
stationPictureUrl: null,
|
||||||
|
sort: null,
|
||||||
|
};
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
@ -798,24 +1093,94 @@ export default {
|
|||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
|
this.value3 = "";
|
||||||
|
this.value2 = "";
|
||||||
|
this.value1 = "";
|
||||||
|
this.value = "";
|
||||||
this.open = true;
|
this.open = true;
|
||||||
|
this.looknurseStationLabel = [
|
||||||
|
{
|
||||||
|
labelDescription: "",
|
||||||
|
sort: "",
|
||||||
|
ids: 1,
|
||||||
|
},
|
||||||
|
];
|
||||||
this.title = "添加护理站信息";
|
this.title = "添加护理站信息";
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
getStation(id).then((response) => {
|
getStation(id)
|
||||||
this.form = response.data;
|
.then((response) => {
|
||||||
this.open = true;
|
this.resid = response.data.id;
|
||||||
this.title = "修改护理站信息";
|
this.form = response.data;
|
||||||
});
|
if (
|
||||||
|
!this.form.nurseStationType ||
|
||||||
|
this.form.nurseStationType == null ||
|
||||||
|
this.form.nurseStationType.length == 0
|
||||||
|
) {
|
||||||
|
} else {
|
||||||
|
this.form.nurseStationType2 = this.form.nurseStationType.split(",");
|
||||||
|
this.form.nurseStationType = this.form.nurseStationType2;
|
||||||
|
}
|
||||||
|
// this.form.nurseStationLabelList = [];
|
||||||
|
this.title = "修改护理站信息";
|
||||||
|
getSubordinateRegions(response.data.areaCode).then((res) => {
|
||||||
|
this.value = res.data.provinceCode;
|
||||||
|
this.value1 = res.data.cityName;
|
||||||
|
this.value2 = res.data.regionName;
|
||||||
|
this.value3 = res.data.streetName;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getLabelList(this.resid).then((res) => {
|
||||||
|
this.looknurseStationLabel = res;
|
||||||
|
|
||||||
|
if (this.looknurseStationLabel.length == 0) {
|
||||||
|
var obj = {
|
||||||
|
labelDescription: "",
|
||||||
|
sort: "",
|
||||||
|
ids: 1,
|
||||||
|
};
|
||||||
|
this.looknurseStationLabel.push(obj);
|
||||||
|
} else if (this.looknurseStationLabel == []) {
|
||||||
|
var obj = {
|
||||||
|
labelDescription: "",
|
||||||
|
sort: "",
|
||||||
|
ids: 1,
|
||||||
|
};
|
||||||
|
this.looknurseStationLabel.push(obj);
|
||||||
|
} else if (this.looknurseStationLabel == null) {
|
||||||
|
var obj = {
|
||||||
|
labelDescription: "",
|
||||||
|
sort: "",
|
||||||
|
ids: 1,
|
||||||
|
};
|
||||||
|
this.looknurseStationLabel.push(obj);
|
||||||
|
}
|
||||||
|
console.log(this.looknurseStationLabel);
|
||||||
|
|
||||||
|
// console.log(this.form);
|
||||||
|
// console.log(this.form.nurseStationLabelList);
|
||||||
|
// this.form.nurseStationLabelList = obj;
|
||||||
|
|
||||||
|
// res.rows.forEach((e) => {
|
||||||
|
// this.form.nurseStationLabelList.push(e);
|
||||||
|
// });
|
||||||
|
});
|
||||||
|
console.log(this.form);
|
||||||
|
this.open = true;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
|
this.form.nurseStationLabelList = this.looknurseStationLabel;
|
||||||
|
this.form.nurseStationType = this.form.nurseStationType2;
|
||||||
console.log(this.form);
|
console.log(this.form);
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.form.nurseStationType = this.form.nurseStationType2.join(",");
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateStation(this.form).then((response) => {
|
updateStation(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
@ -824,9 +1189,13 @@ export default {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addStation(this.form).then((response) => {
|
addStation(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
if (response.code) {
|
||||||
this.open = false;
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.getList();
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
} else {
|
||||||
|
this.form.nurseStationType = obj;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -836,7 +1205,7 @@ export default {
|
|||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm('是否确认删除护理站信息编号为"' + ids + '"的数据项?')
|
.confirm("是否确认删除此护理站信息?")
|
||||||
.then(function () {
|
.then(function () {
|
||||||
return delStation(ids);
|
return delStation(ids);
|
||||||
})
|
})
|
||||||
@ -866,7 +1235,7 @@ export default {
|
|||||||
this.download(
|
this.download(
|
||||||
"/system/station/downloadTemplate?fileType=nurseStation",
|
"/system/station/downloadTemplate?fileType=nurseStation",
|
||||||
{},
|
{},
|
||||||
`护理站模板.xlsx`
|
`护理站信息导入模板.xlsx`
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
// 提交上传文件
|
// 提交上传文件
|
||||||
|
|||||||
@ -143,32 +143,23 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
console.log(this.img);
|
|
||||||
console.log(this.type);
|
|
||||||
this.types = this.type;
|
this.types = this.type;
|
||||||
if (this.img == null) {
|
if (this.img == null) {
|
||||||
console.log(1);
|
|
||||||
this.options.img = null;
|
this.options.img = null;
|
||||||
} else if (this.img == "") {
|
} else if (this.img == "") {
|
||||||
console.log(2);
|
|
||||||
this.options.img = null;
|
this.options.img = null;
|
||||||
} else {
|
} else {
|
||||||
console.log(3);
|
|
||||||
this.options.img = baseurl + this.img;
|
this.options.img = baseurl + this.img;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
img: {
|
img: {
|
||||||
handler(newimg, oldimg) {
|
handler(newimg, oldimg) {
|
||||||
console.log(this.img);
|
|
||||||
if (this.img == null) {
|
if (this.img == null) {
|
||||||
console.log(1);
|
|
||||||
this.options.img = null;
|
this.options.img = null;
|
||||||
} else if (this.img == "") {
|
} else if (this.img == "") {
|
||||||
console.log(2);
|
|
||||||
this.options.img = null;
|
this.options.img = null;
|
||||||
} else {
|
} else {
|
||||||
console.log(3);
|
|
||||||
this.options.img = baseurl + this.img;
|
this.options.img = baseurl + this.img;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -176,7 +167,6 @@ export default {
|
|||||||
type: {
|
type: {
|
||||||
handler(newimg, oldimg) {
|
handler(newimg, oldimg) {
|
||||||
this.types = this.type;
|
this.types = this.type;
|
||||||
console.log(this.types);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -208,7 +198,7 @@ export default {
|
|||||||
beforeUpload(file) {
|
beforeUpload(file) {
|
||||||
if (file.type.indexOf("image/") == -1) {
|
if (file.type.indexOf("image/") == -1) {
|
||||||
this.$modal.msgError(
|
this.$modal.msgError(
|
||||||
"文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
|
"文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。"
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
@ -222,15 +212,12 @@ export default {
|
|||||||
uploadImg() {
|
uploadImg() {
|
||||||
// console.log(this.types);
|
// console.log(this.types);
|
||||||
this.$refs.cropper.getCropBlob((data) => {
|
this.$refs.cropper.getCropBlob((data) => {
|
||||||
console.log(data);
|
|
||||||
let formData = new FormData();
|
let formData = new FormData();
|
||||||
console.log(formData);
|
|
||||||
formData.append("file", data);
|
formData.append("file", data);
|
||||||
formData.append("type", this.types);
|
formData.append("type", this.types);
|
||||||
console.log(formData);
|
|
||||||
updateNurseStationHeads(formData).then((response) => {
|
updateNurseStationHeads(formData).then((response) => {
|
||||||
console.log(response);
|
|
||||||
this.options.img = baseurl + response.imgUrl;
|
this.options.img = baseurl + response.imgUrl;
|
||||||
|
this.$emit("imgUrl", response.imgUrl);
|
||||||
this.openimg = false;
|
this.openimg = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -252,6 +239,7 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 120px;
|
height: 120px;
|
||||||
|
background: #fafafa;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-info-head:hover:after {
|
.user-info-head:hover:after {
|
||||||
|
|||||||
@ -716,7 +716,7 @@ export default {
|
|||||||
this.download(
|
this.download(
|
||||||
"/system/stationItem/downloadTemplate?fileType=2",
|
"/system/stationItem/downloadTemplate?fileType=2",
|
||||||
{},
|
{},
|
||||||
`护理站耗材模板.xlsx`
|
`护理站耗材信息导入模板.xlsx`
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
// 提交上传文件
|
// 提交上传文件
|
||||||
|
|||||||
@ -840,9 +840,10 @@ export default {
|
|||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function () {
|
submitForm: function () {
|
||||||
console.log(this.form);
|
console.log(this.form);
|
||||||
this.form.nurseStationIds = this.form.nurseStationIds.join(",");
|
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.form.nurseStationIds = this.form.nurseStationIds.join(",");
|
||||||
|
|
||||||
if (this.form.userId != undefined) {
|
if (this.form.userId != undefined) {
|
||||||
updateUser(this.form).then((response) => {
|
updateUser(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
|||||||
21
src/views/system/userlist/index.vue
Normal file
21
src/views/system/userlist/index.vue
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<template></template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getListByUser } from "@/api/system/userlist.js";
|
||||||
|
export default {
|
||||||
|
name: "userlist",
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.info()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
info() {
|
||||||
|
getListByUser().then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue
Block a user