Merge remote-tracking branch 'origin/jihan_0203_运营管理端功能开发' into jihan_0203_运营管理端功能开发
# Conflicts: # src/views/system/poser/index.vue
This commit is contained in:
commit
d2f07f6e5f
@ -202,6 +202,7 @@
|
||||
>
|
||||
<el-input
|
||||
v-model="item.sort"
|
||||
maxlength="5"
|
||||
style="width: 200px"
|
||||
placeholder="请输入资讯分类排序"
|
||||
/>
|
||||
@ -265,6 +266,7 @@
|
||||
v-model="form.sort"
|
||||
placeholder="请输入分类排序"
|
||||
style="width: 250px"
|
||||
maxlength="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="资讯分类类型" prop="informationCategoryType">
|
||||
|
||||
@ -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();
|
||||
});
|
||||
|
||||
@ -319,7 +319,7 @@
|
||||
placeholder="请输入排序"
|
||||
v-model="form.sort"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="10"
|
||||
maxLength="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="营业概述" prop="openingHoursDescribe">
|
||||
@ -442,7 +442,7 @@
|
||||
<el-input
|
||||
v-model="scope.row.labelSort"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="10"
|
||||
maxLength="5"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -510,7 +510,7 @@
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="classifylist"
|
||||
@cell-dblclick="choiceclassify"
|
||||
@cell-dblclick="setCheckedData"
|
||||
>
|
||||
<el-table-column label="请选择" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
@ -518,15 +518,15 @@
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
@click="choiceclassify(scope.row)"
|
||||
v-if="form.nurseStationClassifyIds.find((e) => e == scope.row.id)"
|
||||
@click="setCheckedData(scope.row)"
|
||||
v-if="checkedDataList.find((e) => e == scope.row.id)"
|
||||
></el-button>
|
||||
|
||||
<el-button
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
v-else
|
||||
@click="choiceclassify(scope.row)"
|
||||
@click="setCheckedData(scope.row)"
|
||||
>
|
||||
</el-button>
|
||||
</template>
|
||||
@ -554,7 +554,7 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="cancelClassifyshow"
|
||||
@click="choiceclassify"
|
||||
style="
|
||||
margin-top: 30px;
|
||||
margin-left: 85%;
|
||||
|
||||
@ -17,31 +17,31 @@ export default {
|
||||
components: { stationAcatar, editor },
|
||||
name: "Station",
|
||||
data() {
|
||||
var checkMobile = (rule, value, cb) => {
|
||||
// 验证手机号的正则表达式
|
||||
const regMobile =
|
||||
/^(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)) {
|
||||
return cb();
|
||||
}
|
||||
cb(new Error("请输入正确的联系电话"));
|
||||
};
|
||||
// var checkMobile = (rule, value, cb) => {
|
||||
// // 验证手机号的正则表达式
|
||||
// const regMobile =
|
||||
// /^(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)) {
|
||||
// return cb();
|
||||
// }
|
||||
// cb(new Error("请输入正确的联系电话"));
|
||||
// };
|
||||
// 验证手机号的规则
|
||||
var checkMobile2 = (rule, value, cb) => {
|
||||
// 验证手机号的正则表达式
|
||||
const regMobile =
|
||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
if (!value) {
|
||||
//所以当没有值的时候,我们直接callback,让他不校验直接执行下一步
|
||||
return cb();
|
||||
} else {
|
||||
if (regMobile.test(value)) {
|
||||
return cb();
|
||||
} else {
|
||||
cb(new Error("请输入正确的联系电话"));
|
||||
}
|
||||
}
|
||||
};
|
||||
// var checkMobile2 = (rule, value, cb) => {
|
||||
// // 验证手机号的正则表达式
|
||||
// const regMobile =
|
||||
// /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
// if (!value) {
|
||||
// //所以当没有值的时候,我们直接callback,让他不校验直接执行下一步
|
||||
// return cb();
|
||||
// } else {
|
||||
// if (regMobile.test(value)) {
|
||||
// return cb();
|
||||
// } else {
|
||||
// cb(new Error("请输入正确的联系电话"));
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
return {
|
||||
imgsurl: { pictureUrlList: [] },
|
||||
imageUrl: "",
|
||||
@ -124,6 +124,12 @@ export default {
|
||||
resid: null,
|
||||
// 表单校验
|
||||
rules: {
|
||||
// morningOpenStartTime: [
|
||||
// { required: true, message: "请选择上午营业时间", trigger: "blur" },
|
||||
// ],
|
||||
// afternoonOpenStartTime: [
|
||||
// { required: true, message: "请选择下午营业时间", trigger: "blur" },
|
||||
// ],
|
||||
agencyIntroduce: [
|
||||
{ required: true, message: "请输入护理站简介", trigger: "blur" },
|
||||
],
|
||||
@ -138,15 +144,15 @@ export default {
|
||||
],
|
||||
phone: [{
|
||||
required: true,
|
||||
validator: checkMobile,
|
||||
// validator: checkMobile,
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
message: "请输入手机号",
|
||||
},],
|
||||
|
||||
dutyPhone: [{
|
||||
validator: checkMobile2,
|
||||
// validator: checkMobile2,
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
message: "请输入联系电话",
|
||||
},],
|
||||
sort: [{ required: true, message: "排序不能为空", trigger: "blur" }],
|
||||
address: [{ required: true, message: "地址不能为空", trigger: "blur" }],
|
||||
@ -166,6 +172,8 @@ export default {
|
||||
{ required: true, message: "请选择护理站类型", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
|
||||
checkedDataList: []// 选择的护理机构分类
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -312,7 +320,9 @@ export default {
|
||||
//护理机构分类
|
||||
clickinnerVisible() {
|
||||
this.classifylistInfo();
|
||||
// this.form.classifyNameList=this.form.classifyName
|
||||
// 回显数据
|
||||
this.checkedDataList = JSON.parse(JSON.stringify(this.form.nurseStationClassifyIds));
|
||||
|
||||
this.Classifyshow = true;
|
||||
},
|
||||
|
||||
@ -325,30 +335,32 @@ export default {
|
||||
};
|
||||
this.classifylistInfo();
|
||||
},
|
||||
choiceclassify(e) {
|
||||
console.log(e)
|
||||
if (this.form.classifyNameList == '请选择护理站所属机构分类') {
|
||||
this.form.classifyNameList = e.classifyName;
|
||||
} else {
|
||||
this.form.classifyNameList = this.form.classifyNameList + e.classifyName;
|
||||
}
|
||||
// 设置已选数据
|
||||
setCheckedData(e) {
|
||||
// 若已存在id 则为删除
|
||||
if (this.form.nurseStationClassifyIds.find(el => 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.form.classifyNameList = this.form.classifyNameList.substring(0, this.form.classifyNameList.length - 1)
|
||||
}
|
||||
this.cancelClassifyshow();
|
||||
},
|
||||
/** 查询护理机构分类信息列表 */
|
||||
classifylistInfo() {
|
||||
@ -359,7 +371,7 @@ export default {
|
||||
});
|
||||
},
|
||||
cancelClassifyshow() {
|
||||
this.classifylistInfo();
|
||||
// this.classifylistInfo();
|
||||
this.Classifyshow = false;
|
||||
|
||||
},
|
||||
@ -444,14 +456,14 @@ export default {
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
// this.form.classifyNameList=this.form.classifyName
|
||||
this.form.afternoonOpenStartTime = this.form.afternoonOpenStartTime + ':00'
|
||||
this.form.afternoonOpenStartTime = this.form.afternoonOpenStartTime.slice(0, 8)
|
||||
this.form.afternoonOpenEndTime = this.form.afternoonOpenEndTime + ':00'
|
||||
this.form.afternoonOpenEndTime = this.form.afternoonOpenEndTime.slice(0, 8)
|
||||
this.form.morningOpenEndTime = this.form.morningOpenEndTime + ':00'
|
||||
this.form.morningOpenEndTime = this.form.morningOpenEndTime.slice(0, 8)
|
||||
this.form.morningOpenStartTime = this.form.morningOpenStartTime + ':00'
|
||||
this.form.morningOpenStartTime = this.form.morningOpenStartTime.slice(0, 8)
|
||||
// this.form.afternoonOpenStartTime = this.form.afternoonOpenStartTime + ':00'
|
||||
// this.form.afternoonOpenStartTime = this.form.afternoonOpenStartTime.slice(0, 8)
|
||||
// this.form.afternoonOpenEndTime = this.form.afternoonOpenEndTime + ':00'
|
||||
// this.form.afternoonOpenEndTime = this.form.afternoonOpenEndTime.slice(0, 8)
|
||||
// this.form.morningOpenEndTime = this.form.morningOpenEndTime + ':00'
|
||||
// this.form.morningOpenEndTime = this.form.morningOpenEndTime.slice(0, 8)
|
||||
// this.form.morningOpenStartTime = this.form.morningOpenStartTime + ':00'
|
||||
// this.form.morningOpenStartTime = this.form.morningOpenStartTime.slice(0, 8)
|
||||
this.form.nurseStationLabelList = this.looknurseStationLabel;
|
||||
this.form.nurseStationType = this.nurseStationType2;
|
||||
this.$refs["form"].validate((valid) => {
|
||||
|
||||
@ -176,7 +176,7 @@
|
||||
v-model="item.classifySort"
|
||||
placeholder="请输入分类排序"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="10"
|
||||
maxLength="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@ -247,7 +247,7 @@
|
||||
v-model="form.classifySort"
|
||||
placeholder="请输入分类排序"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="10"
|
||||
maxLength="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -514,9 +514,15 @@ export default {
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
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
|
||||
.confirm('是否确认删除护理机构分类信息编号为"' + ids + '"的数据项?')
|
||||
.confirm('是否确认删除护理机构分类名称为"' + names + '"的数据项?')
|
||||
.then(function () {
|
||||
return delStationClassify(ids);
|
||||
})
|
||||
|
||||
@ -292,24 +292,25 @@
|
||||
maxlength="50"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="排序" prop="nurseStationItem.sort">
|
||||
<el-input
|
||||
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-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.appointmentLimitCount">
|
||||
<el-input
|
||||
placeholder="请输入预约人数上限"
|
||||
v-model="form.nurseStationItem.appointmentLimitCount"
|
||||
@ -319,6 +320,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="预约时间间隔" prop="nurseStationItem.appointmentTimeInterval">
|
||||
<el-select
|
||||
style="width:208px"
|
||||
v-model="form.nurseStationItem.appointmentTimeInterval"
|
||||
placeholder="请选择预约时间间隔"
|
||||
>
|
||||
@ -331,20 +333,22 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="提前预约时长" prop="nurseStationItem.advanceAppointDuration">
|
||||
<el-select
|
||||
v-model="form.nurseStationItem.advanceAppointDuration"
|
||||
placeholder="请选择提前预约时长"
|
||||
>
|
||||
<el-option
|
||||
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
|
||||
placeholder="请输入排序"
|
||||
v-model="form.nurseStationItem.sort"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="5"
|
||||
/>
|
||||
</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="项目内容简介"
|
||||
prop="nurseStationItem.nurseItemContent"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user