护理站人员 居住社区 区域修改

This commit is contained in:
shidongli 2022-09-28 09:54:37 +08:00
parent 741a5f9f2b
commit 5166dc59f1
5 changed files with 337 additions and 125 deletions

View File

@ -31,6 +31,13 @@ export function SecondaryLevelInfo(id) {
method: 'get',
})
}
//省市区
export function getSubordinateRegions(Code) {
return request({
url: `/system/area/getSubordinateRegions?areaCode=${Code}`,
method: 'get'
})
}
// 新增被护理人基本信息
export function addPatientArchives(data) {
return request({

View File

@ -175,7 +175,7 @@
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
<!-- <el-table-column label="所属区域编码" align="center" prop="areaCode" />
<el-table-column label="社区编码" align="center" prop="communityCode" /> -->
<el-table-column label="所属区域" align="center" prop="areaName" />
<el-table-column label="所属区域" align="center" prop="area" width="300"/>
<el-table-column label="社区名称" align="center" prop="communityName" />
<el-table-column
label="社区经度"
@ -218,7 +218,7 @@
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
@pagination="liststationinfo"
/>
<!-- 添加居住社区信息对话框 -->
<el-dialog
@ -238,7 +238,6 @@
v-for="(item, index) in form.communityInfoList"
:key="index"
style="margin-top: 20px; border-bottom: 1px solid #f3f3f3"
>
<el-form-item
label="所属区域"
@ -287,7 +286,7 @@
</el-option>
</el-select>
<el-select
v-model="item.areaCode"
v-model="item.code"
clearable
placeholder="请选择街道"
style="margin-left: 10px"
@ -297,6 +296,7 @@
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
@click.native="clickcode(item, index)"
>
</el-option>
</el-select>
@ -362,8 +362,19 @@
</el-dialog>
<!-- 修改居住社区信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1060px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true">
<el-dialog
:title="title"
:visible.sync="open"
width="1060px"
append-to-body
>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="80px"
:inline="true"
>
<!-- <el-form-item label="所属区域" prop="areaCode">
<el-input
v-model="form.areaName"
@ -371,73 +382,70 @@
maxlength="20"
/>
</el-form-item> -->
<el-form-item
label="所属区域"
prop="areaCode"
>
<el-select v-model="form.province" clearable placeholder="请选择省" >
<el-option
v-for="item in arealist"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
@click.native="province3(item)"
>
</el-option>
</el-select>
<el-form-item label="所属区域" prop="areaCode">
<el-select v-model="form.province" clearable placeholder="请选择省">
<el-option
v-for="item in arealist"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
@click.native="province3(item)"
>
</el-option>
</el-select>
<el-select
v-model="form.city"
clearable
placeholder="请选择市"
style="margin-left: 10px"
<el-select
v-model="form.city"
clearable
placeholder="请选择市"
style="margin-left: 10px"
>
<el-option
v-for="item in citylist"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
@click.native="clickcity3(item)"
>
<el-option
v-for="item in citylist"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
@click.native="clickcity3(item)"
>
</el-option>
</el-select>
<el-select
v-model="form.area"
clearable
placeholder="请选择区"
style="margin-left: 10px"
</el-option>
</el-select>
<el-select
v-model="form.area"
clearable
placeholder="请选择区"
style="margin-left: 10px"
>
<el-option
v-for="item in arealists"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
@click.native="clickarea3(item)"
>
<el-option
v-for="item in arealists"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
@click.native="clickarea3(item)"
>
</el-option>
</el-select>
<el-select
v-model="form.areaCode"
clearable
placeholder="请选择街道"
style="margin-left: 10px"
</el-option>
</el-select>
<el-select
v-model="form.code"
clearable
placeholder="请选择街道"
style="margin-left: 10px"
>
<el-option
v-for="item in streetlist"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
@click.native='clickcode2(item)'
>
<el-option
v-for="item in streetlist"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
>
</el-option>
</el-select>
</el-form-item>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="社区名称" prop="communityName">
<el-input
v-model="form.communityName"
placeholder="请输入社区名称"
maxlength="30"
style="width:200px"
style="width: 200px"
/>
</el-form-item>
<el-form-item label="社区经度" prop="communityLongitude">
@ -445,7 +453,7 @@
v-model="form.communityLongitude"
placeholder="请输入社区经度"
maxlength="20"
style="width:200px"
style="width: 200px"
/>
</el-form-item>
<el-form-item label="社区纬度" prop="communityLatitude">
@ -453,7 +461,7 @@
v-model="form.communityLatitude"
placeholder="请输入社区纬度"
maxlength="20"
style="width:200px"
style="width: 200px"
/>
</el-form-item>
</el-form>
@ -496,7 +504,17 @@ export default {
total2: 0,
total: 0,
//
communityInfoList: [],
communityInfoList: [
{
sysAreaVOList: [
{
provinceName: null,
cityName: null,
streetName: null,
},
],
},
],
//
arealist: [],
citylist: [],
@ -614,6 +632,18 @@ export default {
this.Provincelist();
},
methods: {
clickcode2(item) {
this.form.areaCode = Number(item.areaCode);
console.log(this.form);
},
clickcode(item, index) {
console.log(item);
this.form.communityInfoList[index].areaCode = Number(item.areaCode);
// this.form.communityInfoList[index].areaCode = Number(this.form.communityInfoList[index].areaCode);
console.log(this.form);
},
//
province(item) {
// this.form.xxx[index].code=''
@ -647,7 +677,7 @@ export default {
console.log(item);
this.form.city = "";
this.form.area = "";
this.form.areaCode = "";
this.form.code = "";
SecondaryLevelInfo(item.id).then((res) => {
console.log(res);
// this.SecondaryLevelInfolist = res.data;
@ -659,8 +689,8 @@ export default {
clickcity(item) {
console.log(item);
SecondaryLevelInfo(item.id).then((res) => {
this.queryParams.area = "";
this.queryParams.areaCode = "";
this.queryParams.area = "";
this.queryParams.areaCode = "";
console.log(res);
this.arealists = res.data;
});
@ -671,7 +701,7 @@ export default {
// this.queryParams.areaCode = "";
// this.value2 = "";
// this.value3 = "";
this.form.communityInfoList[index].area = "";
this.form.communityInfoList[index].area = "";
this.form.communityInfoList[index].areaCode = "";
console.log(item);
SecondaryLevelInfo(item.id).then((res) => {
@ -680,11 +710,11 @@ export default {
});
},
//
clickcity3(item) {
clickcity3(item) {
console.log(item);
SecondaryLevelInfo(item.id).then((res) => {
this.form.area = "";
this.form.areaCode = "";
this.form.area = "";
this.form.code = "";
console.log(res);
this.arealists = res.data;
});
@ -704,7 +734,7 @@ export default {
clickarea2(item, index) {
// this.queryParams.areaCode = "";
// this.value3 = "";
this.form.communityInfoList[index].areaCode = "";
console.log(item);
SecondaryLevelInfo(item.id).then((res) => {
@ -713,8 +743,8 @@ export default {
});
},
clickarea3(item) {
this.form.areaCode = "";
clickarea3(item) {
this.form.code = "";
// this.queryParams.areaCode = "";
// this.value3 = "";
console.log(item);
@ -785,12 +815,13 @@ export default {
},
/** 查询居住社区信息列表 */
getList() {
this.liststationinfo();
this.loading = true;
listCommunityInfo(this.queryParams).then((response) => {
this.communityInfoList = response.rows;
this.total = response.total;
this.loading = false;
});
// listCommunityInfo(this.queryParams).then((response) => {
// this.communityInfoList = response.rows;
// this.total = response.total;
// this.loading = false;
// });
},
//
cancel() {
@ -801,6 +832,7 @@ export default {
//
reset() {
this.form = {
code: null,
communityInfoList: [
{
province: "",
@ -818,18 +850,63 @@ export default {
this.resetForm("form");
},
/** 搜索按钮操作 */
liststationinfo() {
listCommunityInfo(this.queryParams).then((response) => {
response.rows.forEach((e) => {
if (e.sysAreaVOList == []) {
} else if (e.sysAreaVOList == null) {
} else if (!e.sysAreaVOList) {
} else if (e.sysAreaVOList.length == 0) {
} else if (e.sysAreaVOList.length > 0) {
e.area =
e.sysAreaVOList[0].provinceName +
"-" +
e.sysAreaVOList[0].cityName +
"-" +
e.sysAreaVOList[0].regionName +
"-" +
e.sysAreaVOList[0].streetName;
}
});
this.communityInfoList = response.rows;
this.total = response.total;
this.loading = false;
});
// listStation(this.queryParams).then((response) => {
// response.rows.forEach((e) => {
// if (e.sysAreaVOList == []) {
// } else if (e.sysAreaVOList == null) {
// } else if (!e.sysAreaVOList) {
// } else if (e.sysAreaVOList.length == 0) {
// } else if (e.sysAreaVOList.length > 0) {
// e.area =
// e.sysAreaVOList[0].provinceName +
// "-" +
// e.sysAreaVOList[0].cityName +
// "-" +
// e.sysAreaVOList[0].regionName +
// "-" +
// e.sysAreaVOList[0].streetName;
// }
// });
// this.stationList = response.rows;
// this.total = response.total;
// this.loading = false;
// });
},
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.liststationinfo();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
// this.arealist="",
this.arealists="",
this.streetlist="",
this.citylist="",
(this.queryParams = {
this.arealists = "";
this.streetlist = "";
this.citylist = "";
this.queryParams = {
pageNum: 1,
pageSize: 10,
searchValue: null,
@ -839,8 +916,8 @@ export default {
areaCode: null,
areaName: null,
areaLevel: null,
}),
this.handleQuery();
};
this.handleQuery();
},
//
handleSelectionChange(selection) {
@ -862,28 +939,32 @@ export default {
const id = row.id || this.ids;
getCommunityInfo(id).then((response) => {
this.form = response.data;
// this.form.province=response.data;
// this.form.city=response.data;
// this.form.area=response.data;
// this.form.areaCode=response.data;
this.open = true;
this.title = "修改居住社区信息";
SubordinateRegions(response.data.areaCode).then((res) => {
console.log(res)
if(res.data!==null){
this.form.province = res.data.provinceCode;
this.form.code = null;
console.log(1);
SubordinateRegions(response.data.areaCode).then((res) => {
console.log(res);
if (res.data !== null) {
this.form.province = String(res.data.provinceCode);
// this.form.province = res.data.provinceCode;
this.form.city = res.data.cityName;
this.form.area = res.data.regionName;
this.form.areaCode = res.data.streetName;
}
});
// this.form.areaCode = res.data.streetName;
this.form.code = res.data.streetName;
console.log(this.form);
this.open = true;
}
});
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
// let newStr = JSON.stringify(this.form.areaCode);
// let newObj = JSON.parse(newStr);
if (this.form.id != null) {
updateCommunityInfo(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
@ -906,7 +987,7 @@ export default {
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除居住社区信息的数据项?')
.confirm("是否确认删除居住社区信息的数据项?")
.then(function () {
return delCommunityInfo(ids);
})

View File

@ -136,7 +136,7 @@
<el-table v-loading="loading" :data="patientArchivesList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="姓名" align="center" prop="patientName" />
<el-table-column label="所属区域" align="center" prop="areaName" />
<el-table-column label="所属区域" align="center" prop="area" width="300"/>
<el-table-column label="居住小区" align="center" prop="communityAliasName" />
<el-table-column label="身份证号" align="center" prop="cardNo" />
<el-table-column label="联系电话" align="center" prop="phone" />
@ -168,7 +168,7 @@
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
@pagination="liststationinfo"
/>
<!-- 添加或修改被护理人基本信息对话框 -->
@ -177,26 +177,98 @@
<el-form-item label="姓名" prop="patientName">
<el-input v-model="form.patientName" placeholder="请输入姓名" :disabled="true"/>
</el-form-item>
<el-form-item label="所属区域" prop="areaName">
<!-- <el-form-item label="所属区域" prop="areaName">
<el-input v-model="form.areaName" placeholder="请输入所属区域" :disabled="true"/>
</el-form-item>
<el-form-item label="居住小区" prop="communityAliasName">
<el-input v-model="form.communityAliasName" placeholder="请输入居住小区" maxlength="100"/>
</el-form-item>
</el-form-item> -->
<el-form-item
label="所属区域"
prop="areaCode"
:disabled="true"
>
<!-- <el-input v-model="form.province" placeholder="请输入姓名" :disabled="true"/> -->
<!-- <el-input v-model="form.city" placeholder="请输入姓名" :disabled="true" style="width:100px"/> -->
<!-- <input type="text"> -->
<el-select v-model="form.province" clearable placeholder="请选择省" :disabled="true" style="width:100px">
<el-option
v-for="item in arealist"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
@click.native="province3(item)"
>
</el-option>
</el-select>
<el-select
v-model="form.city"
clearable
placeholder="请选择市"
:disabled="true"
style="margin-left: 10px;width:100px"
>
<el-option
v-for="item in citylist"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
@click.native="clickcity3(item)"
>
</el-option>
</el-select>
<el-select
v-model="form.area"
clearable
placeholder="请选择区"
:disabled="true"
style="margin-left: 10px;width:100px"
>
<el-option
v-for="item in arealists"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
@click.native="clickarea3(item)"
>
</el-option>
</el-select>
<el-select
v-model="form.code"
clearable
placeholder="请选择街道"
:disabled="true"
style="margin-left: 10px;width:200px"
>
<el-option
v-for="item in streetlist"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="客户编号" prop="patientCode">
<el-input v-model="form.patientCode" placeholder="请输入客户编号" />
<el-input v-model="form.patientCode" placeholder="请输入客户编号" :disabled="true"/>
</el-form-item>
<el-form-item label="客户姓名" prop="patientName">
<el-input v-model="form.patientName" placeholder="请输入客户姓名" maxlength="20"/>
<el-input v-model="form.patientName" placeholder="请输入客户姓名" maxlength="20" :disabled="true"/>
</el-form-item>
<el-form-item label="联系电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入手机号码" maxlength="11" :disabled="true"/>
</el-form-item>
<el-form-item label="身份证号" prop="cardNo">
<el-input v-model="form.cardNo" placeholder="请输入身份证号" maxlength="18"/>
</el-form-item>
<el-form-item label="联系电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入手机号码" maxlength="11"/>
</el-form-item>
<el-form-item label="居住地址" prop="address">
<el-input v-model="form.address" placeholder="请输入居住地址" maxlength="100"/>
</el-form-item>
<el-form-item label="居住小区" prop="communityAliasName">
<el-input v-model="form.communityAliasName" placeholder="请输入居住小区" maxlength="100"/>
</el-form-item>
<el-form-item label="紧急联系人" prop="urgentContactName" >
<el-input v-model="form.urgentContactName" placeholder="请输入紧急联系人名称" maxlength="20"/>
@ -207,13 +279,14 @@
<el-form-item label="居住住址经度" prop="homeLongitude">
<el-input v-model="form.homeLongitude" placeholder="请输入住址经度" maxlength="20"/>
</el-form-item>
<el-form-item label="居住住址纬度" prop="homeLatitude">
<el-input v-model="form.homeLatitude" placeholder="请输入住址纬度" maxlength="11"/>
</el-form-item>
<el-form-item label="头像" prop="headPictureUrl">
<!-- <img src="/profile/avatar/2022/09/08/1662624067718_20220908160250A001.jpg" alt=""> -->
<img :src="baseUrl + form.headPictureUrl" style="width: 500px;height: 400px">
<img slot="reference" :src="baseUrl + form.headPictureUrl" style="width: 200px;height: 150px">
<img :src="baseUrl + form.headPictureUrl" style="width: 350px;height: 350px">
<img slot="reference" :src="baseUrl + form.headPictureUrl" style="width: 300px;height: 300px">
<!-- <el-input v-model="form.headPictureUrl" placeholder="请输入个人头像地址" /> -->
</el-form-item>
@ -228,7 +301,7 @@
</template>
<script>
import { listPatientArchives, getPatientArchives, delPatientArchives, addPatientArchives, updatePatientArchives,FirstLevel,SecondaryLevelInfo} from "@/api/system/patientArchives";
import { listPatientArchives, getPatientArchives, delPatientArchives, addPatientArchives, updatePatientArchives,FirstLevel,SecondaryLevelInfo,getSubordinateRegions,} from "@/api/system/patientArchives";
export default {
name: "PatientArchives",
@ -294,8 +367,22 @@ export default {
value2: "",
value1: "",
value: "",
arealist: [],
citylist: [],
arealists: [],
streetlist: [],
//
patientArchivesList: [],
patientArchivesList: [
{
sysAreaVOList: [
{
provinceName: null,
cityName: null,
streetName: null,
},
],
},
],
//
arealist:[],
//
@ -465,12 +552,9 @@ export default {
},
/** 查询被护理人基本信息列表 */
getList() {
this.liststationinfo();
this.loading = true;
listPatientArchives(this.queryParams).then(response => {
this.patientArchivesList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
@ -517,8 +601,33 @@ export default {
this.resetForm("form");
},
/** 搜索按钮操作 */
liststationinfo() {
listPatientArchives(this.queryParams).then(response => {
response.rows.forEach((e) => {
if (e.sysAreaVOList == []) {
} else if (e.sysAreaVOList == null) {
} else if (!e.sysAreaVOList) {
} else if (e.sysAreaVOList.length == 0) {
} else if (e.sysAreaVOList.length > 0) {
e.area =
e.sysAreaVOList[0].provinceName +
"-" +
e.sysAreaVOList[0].cityName +
"-" +
e.sysAreaVOList[0].regionName +
"-" +
e.sysAreaVOList[0].streetName;
}
});
this.patientArchivesList = response.rows;
this.total = response.total;
this.loading = false;
});
},
handleQuery() {
this.queryParams.pageNum = 1;
this.liststationinfo();
this.getList();
},
/** 重置按钮操作 */
@ -555,18 +664,32 @@ export default {
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getPatientArchives(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改被护理人基本信息";
getSubordinateRegions(response.data.areaCode).then((res) => {
if(res.data!==null){
this.form.province= String(res.data.provinceCode);
// this.form.province = res.data.provinceCode;
this.form.city = res.data.cityName;
this.form.area = res.data.regionName;
this.form.code = res.data.streetName;
this.open = true;
}
});
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
// this.form.areaCode = Number(item.areaCode);
if (this.form.id != null) {
updatePatientArchives(this.form).then(response => {
this.$modal.msgSuccess("修改成功");

View File

@ -41,7 +41,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属科室" prop="departmentName">
<el-form-item label="所属科室" prop="departmentName" style="margin-left:25px">
<el-input
v-model="queryParams.departmentName"
placeholder="请输入所属科室"

View File

@ -195,6 +195,7 @@
label="护理站编号"
align="center"
prop="nurseStationCode"
width="150"
/>
<el-table-column
label="护理站名称"