From 9ba32ef0f81492becbeaaf971413ba5d5dabfbdb 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, 28 Apr 2023 13:52:50 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/poser/index.vue | 171 +++++++++++++++++++------------
1 file changed, 106 insertions(+), 65 deletions(-)
diff --git a/src/views/system/poser/index.vue b/src/views/system/poser/index.vue
index cdee2f4..cac1f08 100644
--- a/src/views/system/poser/index.vue
+++ b/src/views/system/poser/index.vue
@@ -283,41 +283,84 @@
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
新增
@@ -485,7 +528,7 @@ import {
getListBy,
updatePoser,
updatePicture,
- selectPosterImageJump
+ selectPosterImageJump,
} from "@/api/system/poser";
import { list } from "@/api/system/nurseItem";
import stationAcatar from "../stationAvatar/index.vue";
@@ -499,7 +542,7 @@ export default {
loading: true,
getListByUserquery: {
pageNum: 1,
- pageSize: 10
+ pageSize: 10,
},
nurseStationlist: [],
nurseStationshow: false,
@@ -541,7 +584,7 @@ export default {
pageNum: 1,
pageSize: 10,
nurseItemCode: null,
- nurseItemName: null
+ nurseItemName: null,
},
// 查询参数
queryParams: {
@@ -558,7 +601,7 @@ export default {
moduleType: null,
poserSort: null,
jumpLink: null,
- jumpType: null
+ jumpType: null,
},
// 表单参数
form: {
@@ -570,42 +613,42 @@ export default {
nurseStationId: null,
nurseStationName: "请选择所属护理站",
nurseItemName: "请选择所属护理项目",
- nurseItemId: null
+ nurseItemId: null,
},
// 表单校验
rules: {
moduleType: [
- { required: true, message: "请选择海报所属模块", trigger: "blur" }
+ { required: true, message: "请选择海报所属模块", trigger: "blur" },
],
poserName: [
- { required: true, message: "请输入海报名称", trigger: "blur" }
+ { required: true, message: "请输入海报名称", trigger: "blur" },
],
nurseStationId: [
- { required: true, message: "请选择所属护理站", trigger: "blur" }
+ { required: true, message: "请选择所属护理站", trigger: "blur" },
],
posterIntroduce: [
- { required: true, message: "请输入海报简介", trigger: "blur" }
+ { required: true, message: "请输入海报简介", trigger: "blur" },
],
posterVideoUrl: [
- { required: true, message: "请选择海报视频", trigger: "blur" }
+ { required: true, message: "请选择海报视频", trigger: "blur" },
],
poserSort: [
- { required: true, message: "请输入海报顺序", trigger: "blur" }
+ { required: true, message: "请输入海报顺序", trigger: "blur" },
],
nurseItemId: [
- { required: true, message: "请选择所属护理项目", trigger: "blur" }
- ]
+ { required: true, message: "请选择所属护理项目", trigger: "blur" },
+ ],
},
options: [
{
value: "NURSE_AGENCY_MODULE",
- label: "护理机构模块"
+ label: "护理机构模块",
},
{
value: "NURSE_ITEM_MODULE",
- label: "护理项目模块"
- }
+ label: "护理项目模块",
+ },
// {
// value: "HEALTH_CONSUTION_MODULE",
// label: "健康咨询模块",
@@ -633,8 +676,8 @@ export default {
isShowUploadVideo: false,
//显示上传按钮
videoForm: {
- showVideoPath: "" //回显的变量
- }
+ showVideoPath: "", //回显的变量
+ },
};
},
created() {
@@ -648,7 +691,7 @@ export default {
},
//类型字典
PosterImageJump() {
- selectPosterImageJump().then(res => {
+ selectPosterImageJump().then((res) => {
this.jumpTypes = res.data;
});
},
@@ -664,17 +707,15 @@ export default {
if (this.form.posterPictureUrlLists.length == 1) {
this.$message.error("最后一条不可删除");
} else {
- this.form.posterPictureUrlLists = this.form.posterPictureUrlLists.filter(
- e => e.idd != item.idd
- );
+ this.form.posterPictureUrlLists =
+ this.form.posterPictureUrlLists.filter((e) => e.idd != item.idd);
}
} else if (!item.idd && item.id) {
if (this.form.posterPictureUrlLists.length == 1) {
this.$message.error("最后一条不可删除");
} else {
- this.form.posterPictureUrlLists = this.form.posterPictureUrlLists.filter(
- e => e.id != item.id
- );
+ this.form.posterPictureUrlLists =
+ this.form.posterPictureUrlLists.filter((e) => e.id != item.id);
}
}
},
@@ -686,7 +727,7 @@ export default {
jumpType: null,
idd: this.idd,
jumpLink: null,
- jumpDictId: null
+ jumpDictId: null,
};
if (this.form.posterPictureUrlLists.length >= 5) {
this.$message.error("最多新增5条");
@@ -727,7 +768,7 @@ export default {
},
//搜索
nurseItemlistInfo() {
- list(this.nurseItemquery).then(res => {
+ list(this.nurseItemquery).then((res) => {
this.nurseItemlist = res.rows;
this.nurseItemtotal = res.total;
});
@@ -768,12 +809,12 @@ export default {
},
//护理站list
getlistinfo() {
- getListBy(this.queryParams).then(res => {
+ getListBy(this.queryParams).then((res) => {
this.nurseStationlist = res.rows;
});
},
info() {
- getListBy(this.queryParams).then(res => {
+ getListBy(this.queryParams).then((res) => {
this.nurseStationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
this.nurseItemquery.nurseStationId = res.rows[0].id;
@@ -790,7 +831,7 @@ export default {
stationcancel() {
this.getListByUserquery = {
pageNum: 1,
- pageSize: 10
+ pageSize: 10,
};
this.info();
},
@@ -832,7 +873,7 @@ export default {
/** 查询泉医到家系统海报模块信息(包含咨询简介信息)列表 */
getList() {
this.loading = true;
- listPoser(this.queryParams).then(response => {
+ listPoser(this.queryParams).then((response) => {
this.poserList = response.rows;
this.total = response.total;
this.loading = false;
@@ -842,12 +883,12 @@ export default {
cancel() {
var obj = { pictureUrlList: [] };
if (this.form.posterPictureUrlLists) {
- this.form.posterPictureUrlLists.forEach(e => {
+ this.form.posterPictureUrlLists.forEach((e) => {
obj.pictureUrlList.push(e.posterPictureUrl);
});
}
if (obj.pictureUrlList.length > 0) {
- updatePicture({ pictureUrlList: this.deletNewImgs }).then(res => {
+ updatePicture({ pictureUrlList: this.deletNewImgs }).then((res) => {
this.open = false;
});
}
@@ -866,8 +907,8 @@ export default {
jumpType: null,
idd: this.idd,
jumpLink: null,
- jumpDictId: null
- }
+ jumpDictId: null,
+ },
],
moduleType: null,
id: null,
@@ -878,7 +919,7 @@ export default {
nurseStationName: "请选择所属护理站",
nurseStationId: null,
nurseItemName: "请选择所属护理项目",
- nurseItemId: null
+ nurseItemId: null,
};
this.deletNewImgs = [];
this.resetForm("form");
@@ -903,9 +944,9 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection) {
- this.ids = selection.map(item => item.nurseStationId);
- this.itemids = selection.map(item => item.nurseItemId);
- this.Types = selection.map(item => item.moduleType);
+ this.ids = selection.map((item) => item.nurseStationId);
+ this.itemids = selection.map((item) => item.nurseItemId);
+ this.Types = selection.map((item) => item.moduleType);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
@@ -921,7 +962,7 @@ export default {
const id = row.nurseStationId || this.ids;
const itemid = row.nurseItemId || this.itemids;
const type = row.moduleType || this.Types;
- getPoser(type, id, itemid).then(response => {
+ getPoser(type, id, itemid).then((response) => {
this.form = response.data;
if (response.data.goodAttributeDetailsLists) {
this.goodDetailsLists = response.data.goodAttributeDetailsLists;
@@ -933,22 +974,22 @@ export default {
},
/** 提交按钮 */
submitForm() {
- this.form.posterPictureUrlLists.forEach(e => {
+ this.form.posterPictureUrlLists.forEach((e) => {
if (!e.jumpType || e.jumpType == "") {
e.jumpDictId = null;
}
});
- this.$refs["form"].validate(valid => {
+ this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
- updatePoser(this.form).then(response => {
+ updatePoser(this.form).then((response) => {
var obj = { pictureUrlList: [] };
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
- addPoser(this.form).then(response => {
+ addPoser(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
@@ -971,7 +1012,7 @@ export default {
}
this.$modal
.confirm("是否确认删除?")
- .then(function() {
+ .then(function () {
return delPoser(nurseStationIds, moduleTypes, nurseItemIds);
})
.then(() => {
@@ -985,12 +1026,12 @@ export default {
this.download(
"system/poser/export",
{
- ...this.queryParams
+ ...this.queryParams,
},
`poser_${new Date().getTime()}.xlsx`
);
- }
- }
+ },
+ },
};