所属机构分类
This commit is contained in:
parent
9c692783e1
commit
a881f38a0a
@ -280,8 +280,8 @@
|
|||||||
color: #c0c4cc;
|
color: #c0c4cc;
|
||||||
margin-top: -10px;
|
margin-top: -10px;
|
||||||
"
|
"
|
||||||
v-if="form.classifyName == '请选择护理站所属机构分类'"
|
v-if="form.classifyNameList == '请选择护理站所属机构分类'"
|
||||||
>{{ form.classifyName }}</el-button
|
>{{ form.classifyNameList }}</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
@click="clickinnerVisible()"
|
@click="clickinnerVisible()"
|
||||||
@ -296,7 +296,7 @@
|
|||||||
margin-top: -10px;
|
margin-top: -10px;
|
||||||
"
|
"
|
||||||
v-else
|
v-else
|
||||||
>{{ form.classifyName }}</el-button
|
>{{ form.classifyNameList }}</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@ -305,13 +305,14 @@ export default {
|
|||||||
morningOpenEndTime: null, //上午结束
|
morningOpenEndTime: null, //上午结束
|
||||||
morningOpenStartTime: null, //上午开始
|
morningOpenStartTime: null, //上午开始
|
||||||
nurseStationClassifyIds: [],
|
nurseStationClassifyIds: [],
|
||||||
classifyName: '请选择护理站所属机构分类',
|
classifyNameList: '请选择护理站所属机构分类',
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
//护理机构分类
|
//护理机构分类
|
||||||
clickinnerVisible() {
|
clickinnerVisible() {
|
||||||
this.classifylistInfo();
|
this.classifylistInfo();
|
||||||
|
// this.form.classifyNameList=this.form.classifyName
|
||||||
this.Classifyshow = true;
|
this.Classifyshow = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -325,22 +326,32 @@ export default {
|
|||||||
this.classifylistInfo();
|
this.classifylistInfo();
|
||||||
},
|
},
|
||||||
choiceclassify(e) {
|
choiceclassify(e) {
|
||||||
if (this.form.classifyName == '请选择护理站所属机构分类') {
|
console.log(e)
|
||||||
this.form.classifyName = e.classifyName;
|
if (this.form.classifyNameList == '请选择护理站所属机构分类') {
|
||||||
|
this.form.classifyNameList = e.classifyName;
|
||||||
} else {
|
} else {
|
||||||
this.form.classifyName = this.form.classifyName + e.classifyName;
|
this.form.classifyNameList = this.form.classifyNameList + e.classifyName;
|
||||||
}
|
}
|
||||||
if ( this.form.nurseStationClassifyIds.find(el => el == e.id)) {
|
// 若已存在id 则为删除
|
||||||
|
if (this.form.nurseStationClassifyIds.find(el => el == e.id)) {
|
||||||
this.form.nurseStationClassifyIds = this.form.nurseStationClassifyIds.filter(ele => ele != e.id)
|
this.form.nurseStationClassifyIds = this.form.nurseStationClassifyIds.filter(ele => ele != e.id)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
// 不存在 添加进id
|
||||||
this.form.nurseStationClassifyIds.push(e.id);
|
this.form.nurseStationClassifyIds.push(e.id);
|
||||||
}
|
}
|
||||||
console.log(this.form.nurseStationClassifyIds)
|
|
||||||
|
// 根据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
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
/** 查询护理机构分类信息列表 */
|
/** 查询护理机构分类信息列表 */
|
||||||
classifylistInfo() {
|
classifylistInfo() {
|
||||||
// this.loading = true;
|
|
||||||
listStationClassify(this.classifyquery).then((response) => {
|
listStationClassify(this.classifyquery).then((response) => {
|
||||||
this.classifylist = response.rows;
|
this.classifylist = response.rows;
|
||||||
this.classifytotal = response.total;
|
this.classifytotal = response.total;
|
||||||
@ -348,8 +359,9 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancelClassifyshow() {
|
cancelClassifyshow() {
|
||||||
|
this.classifylistInfo();
|
||||||
this.Classifyshow = false;
|
this.Classifyshow = false;
|
||||||
// this。
|
|
||||||
},
|
},
|
||||||
//护理站列表
|
//护理站列表
|
||||||
info() {
|
info() {
|
||||||
@ -412,15 +424,14 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
getStation(id).then((response) => {
|
getStation(id).then((response) => {
|
||||||
|
|
||||||
if (response.data.nurseClassifyInfoList) {
|
if (response.data.nurseClassifyInfoList) {
|
||||||
response.data.nurseStationClassifyIds=[]
|
response.data.nurseStationClassifyIds = []
|
||||||
response.data.nurseClassifyInfoList.forEach(e => {
|
response.data.nurseClassifyInfoList.forEach(e => {
|
||||||
response.data.nurseStationClassifyIds.push(e.id)
|
response.data.nurseStationClassifyIds.push(e.id)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.form.classifyName=response.data.classifyNameList;
|
// this.form.classifyName=response.data.classifyNameList;
|
||||||
this.form.streetCode = this.form.streetName;
|
this.form.streetCode = this.form.streetName;
|
||||||
this.imgone = this.form.stationIntroducePcitureUrl;
|
this.imgone = this.form.stationIntroducePcitureUrl;
|
||||||
this.imgtwo = this.form.stationPictureUrl;
|
this.imgtwo = this.form.stationPictureUrl;
|
||||||
@ -432,10 +443,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
// this.form.nurseStationClassifyIds.forEach((e) => {
|
// this.form.classifyNameList=this.form.classifyName
|
||||||
// e.classifyNameList = e.id;
|
|
||||||
// });
|
|
||||||
this.form.classifyNameList=this.form.classifyName
|
|
||||||
this.form.afternoonOpenStartTime = this.form.afternoonOpenStartTime + ':00'
|
this.form.afternoonOpenStartTime = this.form.afternoonOpenStartTime + ':00'
|
||||||
this.form.afternoonOpenStartTime = this.form.afternoonOpenStartTime.slice(0, 8)
|
this.form.afternoonOpenStartTime = this.form.afternoonOpenStartTime.slice(0, 8)
|
||||||
this.form.afternoonOpenEndTime = this.form.afternoonOpenEndTime + ':00'
|
this.form.afternoonOpenEndTime = this.form.afternoonOpenEndTime + ':00'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user