diff --git a/src/api/system/station.js b/src/api/system/station.js index ad0f5f5..cad6bad 100644 --- a/src/api/system/station.js +++ b/src/api/system/station.js @@ -111,3 +111,11 @@ export function updatePicture(data) { data: data }) } + +//生成二维码 +export function nurseStationFriends(nurseStationId) { + return request({ + url: `/system/station/nurseStationCode?nurseStationId=${nurseStationId}`, + method: 'post' + }) +} \ No newline at end of file diff --git a/src/views/system/station/index.vue b/src/views/system/station/index.vue index 3c958b3..91048a3 100644 --- a/src/views/system/station/index.vue +++ b/src/views/system/station/index.vue @@ -25,16 +25,8 @@ /> - 搜索 - 重置 + 搜索 + 重置 @@ -46,8 +38,7 @@ size="mini" @click="handleAdd" v-hasPermi="['system:station:add']" - >新增 + >新增 修改 + >修改 @@ -70,14 +60,10 @@ size="mini" @click="handledata" v-hasPermi="['system:station:importStationInfo']" - >导入 + >导入 - + - + - {{ + + {{ scope.row.areaName !== "null-null-null-null" - ? scope.row.areaName - : "" - }} + ? scope.row.areaName + : "" + }} + - + @@ -119,28 +97,28 @@ - + + 生成二维码 修改 + >修改 删除 + >删除 @@ -159,28 +137,16 @@ append-to-body :before-close="cancel" > - + - + - + > - + > - + > - + > - + - + - + {{ form.classifyNameList }} + >{{ form.classifyNameList }} {{ form.classifyNameList }} + >{{ form.classifyNameList }} - + - + @@ -330,7 +271,7 @@ maxlength="150" /> - + - + > - + > - + - + > - + > - + - + - + - + @@ -442,24 +362,18 @@ - 新增 + 新增 删除 + >删除 @@ -480,38 +394,17 @@ > - + - + - 搜索 - 重置 + 搜索 + 重置 - + - + > - - - - + + 选择完成 + >选择完成 - + - 将文件拖到此处,或点击上传 + + 将文件拖到此处,或 + 点击上传 + 仅允许导入xls、xlsx格式文件。 下载模板 + >下载模板 + + + + + + {{nurseStationFriendslist.nurseStationName}} + + + {{nurseStationFriendslist.areaName}} + + + {{nurseStationFriendslist.address}} + + + + + + @@ -609,3 +507,34 @@ import stationjs from "./stationjs"; export default stationjs; + \ No newline at end of file diff --git a/src/views/system/station/stationjs.js b/src/views/system/station/stationjs.js index 66c9d2a..788fcdd 100644 --- a/src/views/system/station/stationjs.js +++ b/src/views/system/station/stationjs.js @@ -8,6 +8,7 @@ import { getFirstLevelInfo, getSecondaryLevelInfo, updatePicture, + nurseStationFriends } from "@/api/system/station"; import stationAcatar from "../stationAvatar/index.vue"; import { getListByUser } from "@/api/system/userlist.js"; @@ -84,21 +85,25 @@ export default { labelDescription: "", sort: "", idd: 1, - }, ], + },], // 护理站信息表格数据 stationList: [{ sysAreaVOList: [{ provinceName: null, cityName: null, streetName: null, - }, ], - }, ], + },], + },], nurseStationlist: [], // 弹出层标题 title: "", // 是否显示弹出层 open: false, Classifyshow: false, + nurseStationFriendslist: { + img: undefined + }, + nurseStationFriendsshow: false, afternoonOpenStartTimeStr: "", afternoonOpenEndTimeStr: "", //权限查询 @@ -150,13 +155,13 @@ export default { // validator: checkMobile, trigger: "blur", message: "请输入手机号", - }, ], + },], dutyPhone: [{ // validator: checkMobile2, trigger: "blur", message: "请输入联系电话", - }, ], + },], sort: [{ required: true, message: "排序不能为空", trigger: "blur" }], address: [{ required: true, message: "地址不能为空", trigger: "blur" }], longitude: [ @@ -185,6 +190,16 @@ export default { this.classifylistInfo(); }, methods: { + GenerateQRcode(row) { + this.loading = true + this.nurseStationFriendslist = row; + nurseStationFriends(row.id).then(res => { + this.nurseStationFriendslist.img = + process.env.VUE_APP_BASE_API + res.msg; + this.nurseStationFriendsshow = true; + this.loading = false + }); + }, imgs(item) { this.imgsurl.pictureUrlList.push(item); }, @@ -201,7 +216,7 @@ export default { labelDescription: "", sort: "", idd: 1, - }, ]; + },]; } else { this.looknurseStationLabel.splice(index, 1); } @@ -270,10 +285,10 @@ 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; @@ -425,7 +440,7 @@ export default { labelDescription: "", sort: "", idd: 1, - }, ]; + },]; this.title = "添加护理站信息"; }, /** 修改按钮操作 */ @@ -488,17 +503,17 @@ export default { } this.imgsurl = { pictureUrlList: [] }; if (obj.pictureUrlList.length > 0) { - updatePicture(obj).then((res) => {}); + updatePicture(obj).then((res) => { }); } if (response.code == 200) { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); - } + } }); } else { addStation(this.form).then((response) => { - if (response.code==200) { + if (response.code == 200) { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); @@ -515,7 +530,7 @@ export default { const ids = row.id || this.ids; this.$modal .confirm("是否确认删除此护理站信息?") - .then(function() { + .then(function () { return delStation(ids); }) .then(() => { @@ -523,19 +538,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` ); },