diff --git a/src/views/system/informationInfo/index.vue b/src/views/system/informationInfo/index.vue index 3ec9806..92d1772 100644 --- a/src/views/system/informationInfo/index.vue +++ b/src/views/system/informationInfo/index.vue @@ -355,6 +355,7 @@ import { listInformationCategory, } from "@/api/system/informationInfo"; import stationAcatar from "../stationAvatar/index.vue"; +import { updatePicture } from "@/api/system/station"; export default { components: { stationAcatar }, name: "InformationInfo", @@ -450,17 +451,14 @@ export default { // ], }, infolist: [], + imgone: "", }; }, created() { this.getList(); }, methods: { - // 取消按钮 - cancel() { - this.addopen = false; - // this.reset(); - }, + innerVisiblecancel() { this.innerVisible = false; @@ -520,16 +518,28 @@ export default { }, // 取消按钮 cancel() { + var obj = { pictureUrlList: [] }; + if (this.imgone != this.form.leadThumbnailUrl) { + if (this.form.leadThumbnailUrl) { + obj.pictureUrlList.push(this.form.leadThumbnailUrl); + } + } + if (obj.pictureUrlList.length > 0) { + updatePicture(obj).then((res) => {}); + } + // var obj = { pictureUrlList: [] }; + // if (this.form.leadThumbnailUrl != this.leadThumbnailUrl) { + // obj.pictureUrlList.push(this.leadThumbnailUrl); + // } + // updatePicture(obj).then((res) => { + // this.open = false; + // }); this.open = false; this.reset(); }, nurseclick(row) { console.log(row); - // if (this.homenumber) { - // console.log(this.homenumber); - // this.form.hospitalName = row.hospitalName; - // this.form.hospitalId = row.id; - // } else { + this.form.informationCategoryId = row.id; this.form.informationCategoryName = row.informationCategoryName; @@ -595,6 +605,7 @@ export default { const id = row.id || this.ids; getInformationInfo(id).then((response) => { this.form = response.data; + this.imgone = this.form.leadThumbnailUrl; this.open = true; this.title = "修改资讯信息管理"; }); @@ -606,6 +617,13 @@ export default { if (this.form.id != null) { updateInformationInfo(this.form).then((response) => { this.$modal.msgSuccess("修改成功"); + var obj = { pictureUrlList: [] }; + if (this.imgone != this.form.leadThumbnailUrl) { + obj.pictureUrlList.push(this.imgone); + } + if (obj.pictureUrlList.length > 0) { + updatePicture(obj).then((res) => {}); + } this.open = false; this.getList(); }); diff --git a/src/views/system/station/index.vue b/src/views/system/station/index.vue index ee1102a..0bccbcd 100644 --- a/src/views/system/station/index.vue +++ b/src/views/system/station/index.vue @@ -510,7 +510,7 @@ @@ -554,7 +554,7 @@ el == e.id)) { - this.form.nurseStationClassifyIds = this.form.nurseStationClassifyIds.filter(ele => ele != e.id) + if (this.checkedDataList.find(el => el == e.id)) { + this.checkedDataList = this.checkedDataList.filter(ele => ele != e.id) } else { // 不存在 添加进id - this.form.nurseStationClassifyIds.push(e.id); + this.checkedDataList.push(e.id); } - + }, + // 完成选择 + choiceclassify() { + this.form.nurseStationClassifyIds = JSON.parse(JSON.stringify(this.checkedDataList)); // 根据id获取到所有name - console.log(this.classifylist) - this.form.classifyNameList = ""; - this.form.nurseStationClassifyIds.forEach(f => { - let classify = this.classifylist.find(d => d.id == f) - this.form.classifyNameList += classify.classifyName - }) - + if (this.form.nurseStationClassifyIds.length == 0) { + this.form.classifyNameList = '请选择护理站所属机构分类' + } else { + this.form.classifyNameList = ""; + this.form.nurseStationClassifyIds.forEach(f => { + let classify = this.classifylist.find(d => d.id == f) + this.form.classifyNameList += classify.classifyName + "," + }) + } + this.cancelClassifyshow(); }, /** 查询护理机构分类信息列表 */ classifylistInfo() { @@ -359,7 +370,7 @@ export default { }); }, cancelClassifyshow() { - this.classifylistInfo(); + // this.classifylistInfo(); this.Classifyshow = false; },