修改
This commit is contained in:
parent
295ba6123e
commit
1afb367b26
@ -355,6 +355,7 @@ import {
|
|||||||
listInformationCategory,
|
listInformationCategory,
|
||||||
} from "@/api/system/informationInfo";
|
} from "@/api/system/informationInfo";
|
||||||
import stationAcatar from "../stationAvatar/index.vue";
|
import stationAcatar from "../stationAvatar/index.vue";
|
||||||
|
import { updatePicture } from "@/api/system/station";
|
||||||
export default {
|
export default {
|
||||||
components: { stationAcatar },
|
components: { stationAcatar },
|
||||||
name: "InformationInfo",
|
name: "InformationInfo",
|
||||||
@ -450,17 +451,14 @@ export default {
|
|||||||
// ],
|
// ],
|
||||||
},
|
},
|
||||||
infolist: [],
|
infolist: [],
|
||||||
|
imgone: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.addopen = false;
|
|
||||||
// this.reset();
|
|
||||||
},
|
|
||||||
|
|
||||||
innerVisiblecancel() {
|
innerVisiblecancel() {
|
||||||
this.innerVisible = false;
|
this.innerVisible = false;
|
||||||
@ -520,16 +518,28 @@ export default {
|
|||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
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.open = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
nurseclick(row) {
|
nurseclick(row) {
|
||||||
console.log(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.informationCategoryId = row.id;
|
||||||
this.form.informationCategoryName = row.informationCategoryName;
|
this.form.informationCategoryName = row.informationCategoryName;
|
||||||
|
|
||||||
@ -595,6 +605,7 @@ export default {
|
|||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
getInformationInfo(id).then((response) => {
|
getInformationInfo(id).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
this.imgone = this.form.leadThumbnailUrl;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改资讯信息管理";
|
this.title = "修改资讯信息管理";
|
||||||
});
|
});
|
||||||
@ -606,6 +617,13 @@ export default {
|
|||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateInformationInfo(this.form).then((response) => {
|
updateInformationInfo(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
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.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
|
|||||||
@ -510,7 +510,7 @@
|
|||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="classifylist"
|
:data="classifylist"
|
||||||
@cell-dblclick="choiceclassify"
|
@cell-dblclick="setCheckedData"
|
||||||
>
|
>
|
||||||
<el-table-column label="请选择" width="70" align="center">
|
<el-table-column label="请选择" width="70" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -518,15 +518,15 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
style="width: 15px; height: 15px"
|
style="width: 15px; height: 15px"
|
||||||
circle
|
circle
|
||||||
@click="choiceclassify(scope.row)"
|
@click="setCheckedData(scope.row)"
|
||||||
v-if="form.nurseStationClassifyIds.find((e) => e == scope.row.id)"
|
v-if="checkedDataList.find((e) => e == scope.row.id)"
|
||||||
></el-button>
|
></el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
style="width: 15px; height: 15px"
|
style="width: 15px; height: 15px"
|
||||||
circle
|
circle
|
||||||
v-else
|
v-else
|
||||||
@click="choiceclassify(scope.row)"
|
@click="setCheckedData(scope.row)"
|
||||||
>
|
>
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -554,7 +554,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="cancelClassifyshow"
|
@click="choiceclassify"
|
||||||
style="
|
style="
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
margin-left: 85%;
|
margin-left: 85%;
|
||||||
|
|||||||
@ -124,6 +124,12 @@ export default {
|
|||||||
resid: null,
|
resid: null,
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
morningOpenStartTime: [
|
||||||
|
{ required: true, message: "请选择上午营业时间", trigger: "blur" },
|
||||||
|
],
|
||||||
|
afternoonOpenStartTime: [
|
||||||
|
{ required: true, message: "请选择下午营业时间", trigger: "blur" },
|
||||||
|
],
|
||||||
agencyIntroduce: [
|
agencyIntroduce: [
|
||||||
{ required: true, message: "请输入护理站简介", trigger: "blur" },
|
{ required: true, message: "请输入护理站简介", trigger: "blur" },
|
||||||
],
|
],
|
||||||
@ -166,6 +172,8 @@ export default {
|
|||||||
{ required: true, message: "请选择护理站类型", trigger: "blur" },
|
{ required: true, message: "请选择护理站类型", trigger: "blur" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
checkedDataList: []// 选择的护理机构分类
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -312,7 +320,9 @@ export default {
|
|||||||
//护理机构分类
|
//护理机构分类
|
||||||
clickinnerVisible() {
|
clickinnerVisible() {
|
||||||
this.classifylistInfo();
|
this.classifylistInfo();
|
||||||
// this.form.classifyNameList=this.form.classifyName
|
// 回显数据
|
||||||
|
this.checkedDataList = JSON.parse(JSON.stringify(this.form.nurseStationClassifyIds));
|
||||||
|
|
||||||
this.Classifyshow = true;
|
this.Classifyshow = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -325,30 +335,31 @@ export default {
|
|||||||
};
|
};
|
||||||
this.classifylistInfo();
|
this.classifylistInfo();
|
||||||
},
|
},
|
||||||
choiceclassify(e) {
|
// 设置已选数据
|
||||||
console.log(e)
|
setCheckedData(e) {
|
||||||
if (this.form.classifyNameList == '请选择护理站所属机构分类') {
|
|
||||||
this.form.classifyNameList = e.classifyName;
|
|
||||||
} else {
|
|
||||||
this.form.classifyNameList = this.form.classifyNameList + e.classifyName;
|
|
||||||
}
|
|
||||||
// 若已存在id 则为删除
|
// 若已存在id 则为删除
|
||||||
if (this.form.nurseStationClassifyIds.find(el => el == e.id)) {
|
if (this.checkedDataList.find(el => el == e.id)) {
|
||||||
this.form.nurseStationClassifyIds = this.form.nurseStationClassifyIds.filter(ele => ele != e.id)
|
this.checkedDataList = this.checkedDataList.filter(ele => ele != e.id)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// 不存在 添加进id
|
// 不存在 添加进id
|
||||||
this.form.nurseStationClassifyIds.push(e.id);
|
this.checkedDataList.push(e.id);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 完成选择
|
||||||
|
choiceclassify() {
|
||||||
|
this.form.nurseStationClassifyIds = JSON.parse(JSON.stringify(this.checkedDataList));
|
||||||
// 根据id获取到所有name
|
// 根据id获取到所有name
|
||||||
console.log(this.classifylist)
|
if (this.form.nurseStationClassifyIds.length == 0) {
|
||||||
this.form.classifyNameList = "";
|
this.form.classifyNameList = '请选择护理站所属机构分类'
|
||||||
this.form.nurseStationClassifyIds.forEach(f => {
|
} else {
|
||||||
let classify = this.classifylist.find(d => d.id == f)
|
this.form.classifyNameList = "";
|
||||||
this.form.classifyNameList += classify.classifyName
|
this.form.nurseStationClassifyIds.forEach(f => {
|
||||||
})
|
let classify = this.classifylist.find(d => d.id == f)
|
||||||
|
this.form.classifyNameList += classify.classifyName + ","
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.cancelClassifyshow();
|
||||||
},
|
},
|
||||||
/** 查询护理机构分类信息列表 */
|
/** 查询护理机构分类信息列表 */
|
||||||
classifylistInfo() {
|
classifylistInfo() {
|
||||||
@ -359,7 +370,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancelClassifyshow() {
|
cancelClassifyshow() {
|
||||||
this.classifylistInfo();
|
// this.classifylistInfo();
|
||||||
this.Classifyshow = false;
|
this.Classifyshow = false;
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user