Merge remote-tracking branch 'origin/jihan_0203_运营管理端功能开发' into jihan_0203_运营管理端功能开发

# Conflicts:
#	src/views/system/poser/index.vue
This commit is contained in:
曹辉 2023-02-17 18:12:24 +08:00
commit d2f07f6e5f
6 changed files with 151 additions and 109 deletions

View File

@ -202,6 +202,7 @@
> >
<el-input <el-input
v-model="item.sort" v-model="item.sort"
maxlength="5"
style="width: 200px" style="width: 200px"
placeholder="请输入资讯分类排序" placeholder="请输入资讯分类排序"
/> />
@ -265,6 +266,7 @@
v-model="form.sort" v-model="form.sort"
placeholder="请输入分类排序" placeholder="请输入分类排序"
style="width: 250px" style="width: 250px"
maxlength="5"
/> />
</el-form-item> </el-form-item>
<el-form-item label="资讯分类类型" prop="informationCategoryType"> <el-form-item label="资讯分类类型" prop="informationCategoryType">

View File

@ -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();
}); });

View File

@ -319,7 +319,7 @@
placeholder="请输入排序" placeholder="请输入排序"
v-model="form.sort" v-model="form.sort"
oninput="value=value.replace(/[^\d]/g,'')" oninput="value=value.replace(/[^\d]/g,'')"
maxLength="10" maxLength="5"
/> />
</el-form-item> </el-form-item>
<el-form-item label="营业概述" prop="openingHoursDescribe"> <el-form-item label="营业概述" prop="openingHoursDescribe">
@ -442,7 +442,7 @@
<el-input <el-input
v-model="scope.row.labelSort" v-model="scope.row.labelSort"
oninput="value=value.replace(/[^\d]/g,'')" oninput="value=value.replace(/[^\d]/g,'')"
maxLength="10" maxLength="5"
></el-input> ></el-input>
</template> </template>
</el-table-column> </el-table-column>
@ -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%;

View File

@ -17,31 +17,31 @@ export default {
components: { stationAcatar, editor }, components: { stationAcatar, editor },
name: "Station", name: "Station",
data() { data() {
var checkMobile = (rule, value, cb) => { // var checkMobile = (rule, value, cb) => {
// 验证手机号的正则表达式 // // 验证手机号的正则表达式
const regMobile = // const regMobile =
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/; // /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
if (regMobile.test(value)) { // if (regMobile.test(value)) {
return cb(); // return cb();
} // }
cb(new Error("请输入正确的联系电话")); // cb(new Error("请输入正确的联系电话"));
}; // };
// 验证手机号的规则 // 验证手机号的规则
var checkMobile2 = (rule, value, cb) => { // var checkMobile2 = (rule, value, cb) => {
// 验证手机号的正则表达式 // // 验证手机号的正则表达式
const regMobile = // const regMobile =
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/; // /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
if (!value) { // if (!value) {
//所以当没有值的时候我们直接callback让他不校验直接执行下一步 // //所以当没有值的时候我们直接callback让他不校验直接执行下一步
return cb(); // return cb();
} else { // } else {
if (regMobile.test(value)) { // if (regMobile.test(value)) {
return cb(); // return cb();
} else { // } else {
cb(new Error("请输入正确的联系电话")); // cb(new Error("请输入正确的联系电话"));
} // }
} // }
}; // };
return { return {
imgsurl: { pictureUrlList: [] }, imgsurl: { pictureUrlList: [] },
imageUrl: "", imageUrl: "",
@ -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" },
], ],
@ -138,15 +144,15 @@ export default {
], ],
phone: [{ phone: [{
required: true, required: true,
validator: checkMobile, // validator: checkMobile,
trigger: "blur", trigger: "blur",
message: "", message: "请输入手机号",
},], },],
dutyPhone: [{ dutyPhone: [{
validator: checkMobile2, // validator: checkMobile2,
trigger: "blur", trigger: "blur",
message: "", message: "请输入联系电话",
},], },],
sort: [{ required: true, message: "排序不能为空", trigger: "blur" }], sort: [{ required: true, message: "排序不能为空", trigger: "blur" }],
address: [{ required: true, message: "地址不能为空", trigger: "blur" }], address: [{ 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,32 @@ 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 = '请选择护理站所属机构分类'
} else {
this.form.classifyNameList = ""; this.form.classifyNameList = "";
this.form.nurseStationClassifyIds.forEach(f => { this.form.nurseStationClassifyIds.forEach(f => {
let classify = this.classifylist.find(d => d.id == f) let classify = this.classifylist.find(d => d.id == f)
this.form.classifyNameList += classify.classifyName this.form.classifyNameList += classify.classifyName + ","
}) })
this.form.classifyNameList = this.form.classifyNameList.substring(0, this.form.classifyNameList.length - 1)
}
this.cancelClassifyshow();
}, },
/** 查询护理机构分类信息列表 */ /** 查询护理机构分类信息列表 */
classifylistInfo() { classifylistInfo() {
@ -359,7 +371,7 @@ export default {
}); });
}, },
cancelClassifyshow() { cancelClassifyshow() {
this.classifylistInfo(); // this.classifylistInfo();
this.Classifyshow = false; this.Classifyshow = false;
}, },
@ -444,14 +456,14 @@ export default {
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
// this.form.classifyNameList=this.form.classifyName // 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'
this.form.afternoonOpenEndTime = this.form.afternoonOpenEndTime.slice(0, 8) // this.form.afternoonOpenEndTime = this.form.afternoonOpenEndTime.slice(0, 8)
this.form.morningOpenEndTime = this.form.morningOpenEndTime + ':00' // this.form.morningOpenEndTime = this.form.morningOpenEndTime + ':00'
this.form.morningOpenEndTime = this.form.morningOpenEndTime.slice(0, 8) // this.form.morningOpenEndTime = this.form.morningOpenEndTime.slice(0, 8)
this.form.morningOpenStartTime = this.form.morningOpenStartTime + ':00' // this.form.morningOpenStartTime = this.form.morningOpenStartTime + ':00'
this.form.morningOpenStartTime = this.form.morningOpenStartTime.slice(0, 8) // this.form.morningOpenStartTime = this.form.morningOpenStartTime.slice(0, 8)
this.form.nurseStationLabelList = this.looknurseStationLabel; this.form.nurseStationLabelList = this.looknurseStationLabel;
this.form.nurseStationType = this.nurseStationType2; this.form.nurseStationType = this.nurseStationType2;
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {

View File

@ -176,7 +176,7 @@
v-model="item.classifySort" v-model="item.classifySort"
placeholder="请输入分类排序" placeholder="请输入分类排序"
oninput="value=value.replace(/[^\d]/g,'')" oninput="value=value.replace(/[^\d]/g,'')"
maxLength="10" maxLength="5"
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -247,7 +247,7 @@
v-model="form.classifySort" v-model="form.classifySort"
placeholder="请输入分类排序" placeholder="请输入分类排序"
oninput="value=value.replace(/[^\d]/g,'')" oninput="value=value.replace(/[^\d]/g,'')"
maxLength="10" maxLength="5"
/> />
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -514,9 +514,15 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id ? [row.id] : this.ids;
let names = "";
ids.forEach((id) => {
let selected = this.stationClassifyList.find((f) => f.id == id);
names += selected.classifyName + ",";
});
names = names.substring(0, names.length - 1);
this.$modal this.$modal
.confirm('是否确认删除护理机构分类信息编号为"' + ids + '"的数据项?') .confirm('是否确认删除护理机构分类名称为"' + names + '"的数据项?')
.then(function () { .then(function () {
return delStationClassify(ids); return delStationClassify(ids);
}) })

View File

@ -292,24 +292,25 @@
maxlength="50" maxlength="50"
/> />
</el-form-item> </el-form-item>
<el-form-item label="提前预约时长" prop="nurseStationItem.advanceAppointDuration">
<el-select
v-model="form.nurseStationItem.advanceAppointDuration"
placeholder="请选择提前预约时长"
style="width:208px"
>
<el-option
style="width:208px"
v-for="item in optionlist"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="排序" prop="nurseStationItem.sort">
<el-input <el-form-item label="预约人数上限" prop="nurseStationItem.appointmentLimitCount">
placeholder="请输入排序"
v-model="form.nurseStationItem.sort"
oninput="value=value.replace(/[^\d]/g,'')"
maxLength="9"
/>
</el-form-item>
<el-form-item label="项目头像" prop="nurseStationItem.itemPictureUrl">
<stationAcatar
style="width: 208px"
@imgUrl="imgUrl"
:img="form.nurseStationItem.itemPictureUrl"
:type="'itemPictureUrl'"
/>
</el-form-item>
<el-form-item label="预约人数上限">
<el-input <el-input
placeholder="请输入预约人数上限" placeholder="请输入预约人数上限"
v-model="form.nurseStationItem.appointmentLimitCount" v-model="form.nurseStationItem.appointmentLimitCount"
@ -319,6 +320,7 @@
</el-form-item> </el-form-item>
<el-form-item label="预约时间间隔" prop="nurseStationItem.appointmentTimeInterval"> <el-form-item label="预约时间间隔" prop="nurseStationItem.appointmentTimeInterval">
<el-select <el-select
style="width:208px"
v-model="form.nurseStationItem.appointmentTimeInterval" v-model="form.nurseStationItem.appointmentTimeInterval"
placeholder="请选择预约时间间隔" placeholder="请选择预约时间间隔"
> >
@ -331,19 +333,21 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="提前预约时长" prop="nurseStationItem.advanceAppointDuration"> <el-form-item label="排序" prop="nurseStationItem.sort">
<el-select <el-input
v-model="form.nurseStationItem.advanceAppointDuration" placeholder="请输入排序"
placeholder="请选择提前预约时长" v-model="form.nurseStationItem.sort"
> oninput="value=value.replace(/[^\d]/g,'')"
<el-option maxLength="5"
v-for="item in optionlist" />
:key="item.value" </el-form-item>
:label="item.label" <el-form-item label="项目头像" prop="nurseStationItem.itemPictureUrl">
:value="item.value" <stationAcatar
> style="width: 208px"
</el-option> @imgUrl="imgUrl"
</el-select> :img="form.nurseStationItem.itemPictureUrl"
:type="'itemPictureUrl'"
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="项目内容简介" label="项目内容简介"