diff --git a/common/config.js b/common/config.js
index 2207b79..4247ede 100644
--- a/common/config.js
+++ b/common/config.js
@@ -1,4 +1,5 @@
const mode = process.env.NODE_ENV;
+//const mode = 'development';
let ROOTPATH = ''; //域名
switch (mode) {
case 'development':
diff --git a/pages/detailNursing/detailNursing.vue b/pages/detailNursing/detailNursing.vue
index fa2790a..8b8660f 100644
--- a/pages/detailNursing/detailNursing.vue
+++ b/pages/detailNursing/detailNursing.vue
@@ -66,14 +66,15 @@
-
-
- {{item.name}}
+
+
+ {{item.info.name}}
-
+
分钟
@@ -96,8 +97,7 @@
签退
{{$u.timeFormat(time,'hh:MM:ss')}}
-
+
更新定位
{{$u.timeFormat(time,'hh:MM:ss')}}
@@ -153,13 +153,9 @@
upload_list: [],
},
skuList: [],
- // subForm: {
- // id: '',
- // sku_time_list: []
- // },
detail: {},
time: new Date(),
-
+ timer: null,
}
},
methods: {
@@ -176,11 +172,13 @@
this.detail = res
this.skuList = res.sku.map(item => {
return {
- id: item.id,
- name: item.sku_info?.name,
+ info: item.sku_info,
isSelect: item.time ? true : false,
- sku_id: item.sku_id,
- time: item.time || ''
+ form: {
+ id: item.id,
+ time: item.time || '',
+ sku_id: item.sku_id,
+ }
}
})
this.form.schedule_list_id = this.id
@@ -230,6 +228,7 @@
icon: 'none',
title: '更新定位成功'
})
+ this.flag = true
})
},
@@ -259,10 +258,8 @@
return Promise.all(promiseAll)
} else {
- uni.showToast({
- icon: 'none',
- title: '上传失败'
- })
+
+ return Promise.reject(res[0].errMsg)
}
},
@@ -302,19 +299,28 @@
title: '操作失败,请重试'
})
})
+ }).catch(err => {
+ uni.showToast({
+ icon: 'none',
+ title: '图片上传失败'
+ })
})
},
//保存服务项目
saveSku() {
return new Promise((resolve, reject) => {
- let list = this.skuList.filter(item => {
+ let temp1 = this.skuList.filter(item => {
return item.isSelect
})
+ let temp2 = temp1.map(item => {
+ return item.form
+ })
+
this.$u.api.nurseSave({
id: this.id,
- sku_time_list: list
+ sku_time_list: temp2
}).then(res => {
resolve(res)
}).catch(err => {
@@ -333,7 +339,7 @@
//验证是否有选择服务项目并填写
let flag = false
for (let i of this.skuList) {
- if (i.isSelect && i.time) {
+ if (i.isSelect && i.form.time) {
flag = true
}
}
@@ -367,7 +373,7 @@
//验证是否有选择服务项目并填写
let flag = false
for (let i of this.skuList) {
- if (i.isSelect && i.time) {
+ if (i.isSelect && i.form.time) {
flag = true
}
}
@@ -378,6 +384,23 @@
})
return
}
+ //验证服务时间是否都已完成
+ let flag2 = 0
+ let tempArr = []
+ for (let i of this.skuList) {
+ if (i.isSelect && (i.form.time >= i.info.time_lenth)) {
+ flag2++
+ } else {
+ tempArr.push(i.info.name)
+ }
+ }
+ if (flag2 < this.skuList.length) {
+ uni.showToast({
+ icon: 'none',
+ title: `${tempArr.toString()}服务时间未满`
+ })
+ return
+ }
this.saveSku().then(() => {
this.clock(3)
@@ -405,16 +428,21 @@
}
},
onLoad(option) {
- this.load()
-
this.getDeatil(option.id)
this.id = option.id
- this.getLoaction()
-
- setInterval(() => {
+ },
+ onShow() {
+ this.timer = setInterval(() => {
this.time = new Date()
}, 1000)
+ },
+ onHide() {
+ clearInterval(this.timer)
+ },
+ mounted() {
+ this.load()
+ this.getLoaction()
}
}
@@ -687,4 +715,8 @@
margin: 46rpx auto;
}
+
+ ::v-deep .u-checkbox__icon-wrap--disabled {
+ background: #1d5cba !important;
+ }
diff --git a/pages/list/list.vue b/pages/list/list.vue
index 7399ca9..a71c45e 100644
--- a/pages/list/list.vue
+++ b/pages/list/list.vue
@@ -46,7 +46,7 @@
-
+
@@ -208,6 +208,14 @@
}
},
+ //跳转详情
+ toDetail(item) {
+ uni.$u.throttle(() => {
+ uni.navigateTo({
+ url: `/pages/detailNursing/detailNursing?id=${item.id}`
+ })
+ })
+ },
toThere(item) {
this.$u.throttle(() => {
uni.openLocation({
diff --git a/pages/map/map.vue b/pages/map/map.vue
index 5d24c79..3ac30ff 100644
--- a/pages/map/map.vue
+++ b/pages/map/map.vue
@@ -124,15 +124,15 @@
joinCluster: true,
label: { // 定制聚合簇样式
content: markerIds.length + '人',
- fontSize: 16,
+ fontSize: 13,
color: '#36596A',
- width: 50,
+ width: 64,
height: 25,
bgColor: '#FFFFFF',
borderRadius: 5,
textAlign: 'center',
- anchorX: -10,
- anchorY: 0,
+ anchorX: -32,
+ anchorY: 4,
}
}
clusterMarkers.push(clusterObj)
@@ -163,15 +163,15 @@
joinCluster: true,
label: {
content: item.customer.name,
- fontSize: 14,
+ fontSize: 13,
color: '#36596A',
- width: 54,
+ width: 64,
height: 25,
bgColor: '#FFFFFF',
borderRadius: 5,
textAlign: 'center',
- anchorX: -7,
- anchorY: 0,
+ anchorX: -32,
+ anchorY: 4,
},
info: item
}
@@ -203,9 +203,10 @@
this.mapCtx.initMarkerCluster({
enableDefaultStyle: false,
zoomOnClick: true,
- gridSize: 20
+ gridSize: 40
})
this.mapCtx.on("markerClusterCreate", e => {
+ console.log(e);
this.updateClusters(e.clusters)
})
diff --git a/pages/nursingCalendar/nursingCalendar.vue b/pages/nursingCalendar/nursingCalendar.vue
index d6aaa06..28b4909 100644
--- a/pages/nursingCalendar/nursingCalendar.vue
+++ b/pages/nursingCalendar/nursingCalendar.vue
@@ -17,7 +17,7 @@
-
+
{{select.month}}月
@@ -88,7 +88,9 @@
{{item.customer.name}}
- {{$u.timeFormat(new Date(item.start_time),'hh:MM')}}
+
+ {{$u.timeFormat(new Date(item.start_time),'hh:MM')}}~{{$u.timeFormat(new Date(item.end_time),'hh:MM')}}
+
@@ -106,6 +108,15 @@
+
+
@@ -116,6 +127,7 @@
export default {
data() {
return {
+ showPicker: false,
statusDay: [{
date: 1,
status: 2
@@ -136,7 +148,7 @@
],
opsionts: (() => {
let res = []
- for (let i = 0; i < 20; i++) {
+ for (let i = -1; i < 20; i++) {
res.push(new Date().getFullYear() - i)
}
return res
@@ -176,6 +188,9 @@
}
},
methods: {
+ monthPick(e) {
+ this.select.month = Number(e.month)
+ },
monthPlus() {
this.$u.throttle(() => {
if (this.select.month < 12) {
@@ -648,7 +663,6 @@
padding-top: 18rpx;
.time {
- width: 100rpx;
background: #F9F9F9;
height: 40rpx;
font-size: 28rpx;
@@ -658,6 +672,8 @@
line-height: 40rpx;
text-align: center;
border-radius: 10rpx;
+
+ padding: 0 4rpx;
}
.list-status-icon {