From 6fcfa80e05f25578a1c284c79b32462209fa7209 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com>
Date: Fri, 17 Feb 2023 10:49:09 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8A=A4=E7=90=86=E6=9C=BA=E6=9E=84=E5=88=86?=
=?UTF-8?q?=E7=B1=BB+=E6=8A=A4=E7=90=86=E9=A1=B9=E7=9B=AE=E9=A2=84?=
=?UTF-8?q?=E7=BA=A6=E4=BA=BA=E6=95=B0=E4=B8=8A=E9=99=90=E6=A0=A1=E9=AA=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/system/station.js | 9 +-
src/views/system/station/index.vue | 27 ++++-
src/views/system/station/stationjs.js | 104 +++++++++++++++---
src/views/system/stationItem/stationItemjs.js | 29 ++---
4 files changed, 130 insertions(+), 39 deletions(-)
diff --git a/src/api/system/station.js b/src/api/system/station.js
index 418a9ec..ad0f5f5 100644
--- a/src/api/system/station.js
+++ b/src/api/system/station.js
@@ -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({
diff --git a/src/views/system/station/index.vue b/src/views/system/station/index.vue
index 1528e26..ed8a482 100644
--- a/src/views/system/station/index.vue
+++ b/src/views/system/station/index.vue
@@ -268,6 +268,7 @@
{{ form.classifyNameList }}{{ form.classifyName }}
{{ form.classifyNameList }}{{ form.classifyName }}
@@ -469,7 +471,7 @@
-
+ 选择完成
+
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;
@@ -290,11 +304,53 @@ export default {
afternoonOpenEndTime: null, //下午结束
morningOpenEndTime: null, //上午结束
morningOpenStartTime: null, //上午开始
- nurseStationClassifyIds: null,
- classifyNameList: '请选择护理站所属机构分类',
+ nurseStationClassifyIds: [],
+ classifyName: '请选择护理站所属机构分类',
};
this.resetForm("form");
},
+ //护理机构分类
+ clickinnerVisible() {
+ this.classifylistInfo();
+ this.Classifyshow = true;
+ },
+
+ classifylistcancel() {
+ this.classifyquery = {
+ pageNum: 1,
+ pageSize: 10,
+ classifyCode: "",
+ classifyName: "",
+ };
+ this.classifylistInfo();
+ },
+ choiceclassify(e) {
+ if (this.form.classifyName == '请选择护理站所属机构分类') {
+ this.form.classifyName = e.classifyName;
+ } else {
+ this.form.classifyName = this.form.classifyName + e.classifyName;
+ }
+ if ( this.form.nurseStationClassifyIds.find(el => el == e.id)) {
+ this.form.nurseStationClassifyIds = this.form.nurseStationClassifyIds.filter(ele => ele != e.id)
+ }
+ else {
+ this.form.nurseStationClassifyIds.push(e.id);
+ }
+ console.log(this.form.nurseStationClassifyIds)
+ },
+ /** 查询护理机构分类信息列表 */
+ classifylistInfo() {
+ // this.loading = true;
+ listStationClassify(this.classifyquery).then((response) => {
+ this.classifylist = response.rows;
+ this.classifytotal = response.total;
+ this.loading = false;
+ });
+ },
+ cancelClassifyshow() {
+ this.Classifyshow = false;
+ // this。
+ },
//护理站列表
info() {
this.loading = true
@@ -347,7 +403,7 @@ export default {
labelDescription: "",
sort: "",
idd: 1,
- }, ];
+ },];
this.title = "添加护理站信息";
},
/** 修改按钮操作 */
@@ -356,7 +412,15 @@ 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.classifyName=response.data.classifyNameList;
this.form.streetCode = this.form.streetName;
this.imgone = this.form.stationIntroducePcitureUrl;
this.imgtwo = this.form.stationPictureUrl;
@@ -368,6 +432,10 @@ export default {
},
/** 提交按钮 */
submitForm() {
+ // this.form.nurseStationClassifyIds.forEach((e) => {
+ // e.classifyNameList = e.id;
+ // });
+ this.form.classifyNameList=this.form.classifyName
this.form.afternoonOpenStartTime = this.form.afternoonOpenStartTime + ':00'
this.form.afternoonOpenStartTime = this.form.afternoonOpenStartTime.slice(0, 8)
this.form.afternoonOpenEndTime = this.form.afternoonOpenEndTime + ':00'
@@ -393,7 +461,7 @@ export default {
}
this.imgsurl = { pictureUrlList: [] };
if (obj.pictureUrlList.length > 0) {
- updatePicture(obj).then((res) => {});
+ updatePicture(obj).then((res) => { });
}
this.$modal.msgSuccess("修改成功");
this.open = false;
@@ -418,7 +486,7 @@ export default {
const ids = row.id || this.ids;
this.$modal
.confirm("是否确认删除此护理站信息?")
- .then(function() {
+ .then(function () {
return delStation(ids);
})
.then(() => {
@@ -426,19 +494,19 @@ export default {
obj.pictureUrlList.push(row.stationIntroducePcitureUrl);
obj.pictureUrlList.push(row.stationPictureUrl);
if (obj.pictureUrlList.length > 0) {
- updatePicture(obj).then((res) => {});
+ updatePicture(obj).then((res) => { });
}
this.getList();
this.$modal.msgSuccess("删除成功");
})
- .catch(() => {});
+ .catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download(
"system/station/export", {
- ...this.getListByUserquery,
- },
+ ...this.getListByUserquery,
+ },
`station_${new Date().getTime()}.xlsx`
);
},
diff --git a/src/views/system/stationItem/stationItemjs.js b/src/views/system/stationItem/stationItemjs.js
index 865b22f..69b0e7e 100644
--- a/src/views/system/stationItem/stationItemjs.js
+++ b/src/views/system/stationItem/stationItemjs.js
@@ -78,7 +78,7 @@ export default {
value: 'TWO_HOUR',
label: '两小时'
}
-
+
],
value:"",
optionlist: [{
@@ -88,8 +88,8 @@ export default {
value: 'ONE_DAY',
label: '一小时'
},
-
-
+
+
],
value1:"",
//权限查询
@@ -134,7 +134,7 @@ export default {
nurseClassifyId: '',
appointmentLimitCount:"",
appointmentTimeInterval:"",
-
+
},
},
idd: 1,
@@ -157,11 +157,11 @@ export default {
trigger: "blur",
message: "请选择项目头像",
}, ],
- "nurseStationItem.appointmentLimitCount": [{
- required: true,
- trigger: "blur",
- message: "请输入预约人数上限",
- }, ],
+ // "nurseStationItem.appointmentLimitCount": [{
+ // required: true,
+ // trigger: "blur",
+ // message: "请输入预约人数上限",
+ // }, ],
"nurseStationItem.appointmentTimeInterval": [{
required: true,
trigger: "blur",
@@ -204,8 +204,8 @@ export default {
},
//选中
choiceclassify(e) {
- this.form.nurseStationItem.nurseClassifyId = e.id
- this.form.nurseStationItem.classifyName = e.classifyName
+ this.form.nurseStationItem.nurseClassifyId = e.id;
+ this.form.nurseStationItem.classifyName = e.classifyName;
this.Classifyshow = false
},
//重置
@@ -504,6 +504,7 @@ export default {
this.StationConsumablequeryParams.nurseStationId = null;
const id = row.id || this.ids;
getNurseItem(id).then((response) => {
+ this.form = response.data;
if (response.data.nurseStationItemConsumables) {
response.data.nurseStationItemConsumables.forEach(e => {
e.id = e.nurseStationConsumableId
@@ -511,7 +512,7 @@ export default {
} else {
response.data.nurseStationItemConsumables = []
}
- this.form = response.data;
+
this.StationConsumablequeryParams.nurseStationId =
response.data.nurseStationItem.nurseStationId;
this.imgone = this.form.nurseStationItem.itemPictureUrl;
@@ -568,7 +569,7 @@ export default {
this.form.nurseStationItemPrices.forEach(e => {
e.price = Number(e.price)
})
-
+
updateNurseItem(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
@@ -578,7 +579,7 @@ export default {
this.form.nurseStationItemPrices.forEach(e => {
e.price = Number(e.price)
})
-
+
addNurseItem(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.$forceUpdate();