Commit 25bb9b43 authored by Facius's avatar Facius

Merge branch 'dev' of https://git.banshouhui.com/lijundan/self-support into dev

parents 7dbcf89f 813ec009
...@@ -76,8 +76,8 @@ ...@@ -76,8 +76,8 @@
}, },
mounted() { mounted() {
if(this.value){ if(this.value){
this.imgList = this.value.map(img =>{ this.imgList = this.value.filter(v => v).map(img =>{
return {src:img} return {src:img ? img : ''}
}) })
this.setValue() this.setValue()
} }
......
...@@ -18,18 +18,19 @@ ...@@ -18,18 +18,19 @@
<view class="line-view-top"> <view class="line-view-top">
<text>{{$u.timeFormat(record.operationDatetime, 'yyyy.mm.dd hh:MM:ss')}} </text> <text>{{$u.timeFormat(record.operationDatetime, 'yyyy.mm.dd hh:MM:ss')}} </text>
<text style="color: red;">{{record.overTime?'超时':''}}{{record.exception?'异常':''}}</text> <text style="color: red;">{{record.overTime?'超时':''}}{{record.exception?'异常':''}}</text>
<text style="color: #2272FF;" <text style="color: #2272FF;" v-show="record.isTrace">跟进</text>
v-show="record.operationType==='报备' || record.operationType==='改约'">跟进</text>
</view> </view>
<view class="line-view-item"> <view class="line-view-item">
<view> <view>
<text>{{record.operationTypeText}}</text> <text>{{record.operationTypeText}}</text>
</view> </view>
<view class="item-operation-view" <view class="item-operation-view" v-show="record.isTrace">
v-show="record.operationType==='报备' || record.operationType==='预约'|| record.operationType==='改约'"> <text class="item-label" >{{record.traceLabel + ":"}}</text>
<text>{{record.operationType==='报备' ? '下次联系时间:' : record.operationType==='改约'?'改约时间:': ''}}</text> <text class="item-content">{{record.traceTime}}</text>
<text </view>
style="color: #2272FF;word-break: break-all;">{{record.orderRecordRemark}}</text> <view class="item-operation-view" v-show="record.operationContent">
<text class="item-label">备注:</text>
<text class="item-content">{{ record.operationContent }}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -77,7 +78,7 @@ ...@@ -77,7 +78,7 @@
return this.orderRecords return this.orderRecords
} }
}, },
} },
} }
</script> </script>
...@@ -156,6 +157,7 @@ ...@@ -156,6 +157,7 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
color: #333333; color: #333333;
font-weight: bold;
font-size: 28rpx; font-size: 28rpx;
} }
...@@ -166,6 +168,12 @@ ...@@ -166,6 +168,12 @@
.item-operation-view { .item-operation-view {
margin-top: 20rpx; margin-top: 20rpx;
.item-label {
color: #2272FF;
}
.item-content {
word-break: break-all;
}
} }
} }
} }
......
...@@ -334,16 +334,26 @@ ...@@ -334,16 +334,26 @@
self.$u.api.listOrderRecord(param).then((res) => { self.$u.api.listOrderRecord(param).then((res) => {
if (res.code == 200) { if (res.code == 200) {
res.data.forEach(item =>{ res.data.forEach(item =>{
if(item.operationType === '预约'){ item.isTrace = false
item.operationTypeText = '上门时间' item.traceTime = null
}else if (item.operationType === '报备' || item.operationType === '改约'){ item.traceLabel = item.operationType
if (item.operationType === '报备' || item.operationType === '改约'){
item.isTrace = true
item.traceLabel = item.operationType === '报备' ? '下次联系时间' : '改约时间'
item.operationTypeText = item.operationType
item.traceTime = item.orderRecordRemark
let arr = item.orderRecordRemark.split(',') let arr = item.orderRecordRemark.split(',')
item.operationTypeText = arr[0] if(arr && arr.length > 1) {
if(arr.length > 1){ let remark = arr[1].substring(arr[1].indexOf(':')+1,arr[1].length)
item.orderRecordRemark = arr[1].substring(arr[1].indexOf(':')+1,arr[1].length) item.traceTime = remark
item.operationTypeText = arr[0]
} }
}else{ } else if(item.operationType === '预约') {
item.operationTypeText = item.operationType + '时间' let remark = item.orderRecordRemark.substring(item.orderRecordRemark.lastIndexOf(",")+1);
item.traceTime = remark
item.operationTypeText = `上门 ${remark}`
} else {
item.operationTypeText = item.operationType
} }
}) })
self.orderRecords = res.data self.orderRecords = res.data
......
...@@ -35,6 +35,17 @@ const setOpenid = function (openid) { ...@@ -35,6 +35,17 @@ const setOpenid = function (openid) {
} }
} }
async function validImages(imgurl) {
let exists = false
await uni.getImageInfo({
src: imgurl,
success (res) {
exists = true
}
})
return exists
}
/** /**
* ====图片本地缓存==== * ====图片本地缓存====
* @param {Object} vm 当前vue实例 * @param {Object} vm 当前vue实例
...@@ -46,8 +57,8 @@ const imageCache = function (vm, src, host) { ...@@ -46,8 +57,8 @@ const imageCache = function (vm, src, host) {
let image_url = host + src let image_url = host + src
let image_name = md5Libs.md5(image_url) let image_name = md5Libs.md5(image_url)
var arr = Object.keys(vm.vuex_cache); var arr = Object.keys(vm.vuex_cache);
if (vm.vuex_cache && arr.length && arr.includes(image_name)) { if (vm.vuex_cache && arr.length && arr.includes(image_name) &&
// call_back(vm.vuex_cache[image_name]) validImages(vm.vuex_cache[image_name])) {
return vm.vuex_cache[image_name] return vm.vuex_cache[image_name]
} else { } else {
// 本地没有缓存 需要下载 // 本地没有缓存 需要下载
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment