diff --git a/src/views/system/InformationCategory/index.vue b/src/views/system/InformationCategory/index.vue
index a4760d1..e079046 100644
--- a/src/views/system/InformationCategory/index.vue
+++ b/src/views/system/InformationCategory/index.vue
@@ -202,6 +202,7 @@
>
@@ -265,6 +266,7 @@
v-model="form.sort"
placeholder="请输入分类排序"
style="width: 250px"
+ maxlength="5"
/>
diff --git a/src/views/system/informationInfo/index.vue b/src/views/system/informationInfo/index.vue
index dc9a6a5..4f7a8d4 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 3078aa7..0bccbcd 100644
--- a/src/views/system/station/index.vue
+++ b/src/views/system/station/index.vue
@@ -319,7 +319,7 @@
placeholder="请输入排序"
v-model="form.sort"
oninput="value=value.replace(/[^\d]/g,'')"
- maxLength="10"
+ maxLength="5"
/>
@@ -442,7 +442,7 @@
@@ -510,7 +510,7 @@
@@ -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)"
>
@@ -554,7 +554,7 @@
{
- // 验证手机号的正则表达式
- 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) => {
diff --git a/src/views/system/stationClassify/index.vue b/src/views/system/stationClassify/index.vue
index c9f43bd..4bd3c12 100644
--- a/src/views/system/stationClassify/index.vue
+++ b/src/views/system/stationClassify/index.vue
@@ -176,7 +176,7 @@
v-model="item.classifySort"
placeholder="请输入分类排序"
oninput="value=value.replace(/[^\d]/g,'')"
- maxLength="10"
+ maxLength="5"
/>
@@ -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);
})
diff --git a/src/views/system/stationItem/index.vue b/src/views/system/stationItem/index.vue
index 3de0df4..fda3280 100644
--- a/src/views/system/stationItem/index.vue
+++ b/src/views/system/stationItem/index.vue
@@ -292,24 +292,25 @@
maxlength="50"
/>
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -331,20 +333,22 @@
-
-
-
-
-
-
+
+
+
+
+
+