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 @@
},
mounted() {
if(this.value){
this.imgList = this.value.map(img =>{
return {src:img}
this.imgList = this.value.filter(v => v).map(img =>{
return {src:img ? img : ''}
})
this.setValue()
}
......
......@@ -18,18 +18,19 @@
<view class="line-view-top">
<text>{{$u.timeFormat(record.operationDatetime, 'yyyy.mm.dd hh:MM:ss')}} </text>
<text style="color: red;">{{record.overTime?'超时':''}}{{record.exception?'异常':''}}</text>
<text style="color: #2272FF;"
v-show="record.operationType==='报备' || record.operationType==='改约'">跟进</text>
<text style="color: #2272FF;" v-show="record.isTrace">跟进</text>
</view>
<view class="line-view-item">
<view>
<text>{{record.operationTypeText}}</text>
</view>
<view class="item-operation-view"
v-show="record.operationType==='报备' || record.operationType==='预约'|| record.operationType==='改约'">
<text>{{record.operationType==='报备' ? '下次联系时间:' : record.operationType==='改约'?'改约时间:': ''}}</text>
<text
style="color: #2272FF;word-break: break-all;">{{record.orderRecordRemark}}</text>
<view class="item-operation-view" v-show="record.isTrace">
<text class="item-label" >{{record.traceLabel + ":"}}</text>
<text class="item-content">{{record.traceTime}}</text>
</view>
<view class="item-operation-view" v-show="record.operationContent">
<text class="item-label">备注:</text>
<text class="item-content">{{ record.operationContent }}</text>
</view>
</view>
</view>
......@@ -77,7 +78,7 @@
return this.orderRecords
}
},
}
},
}
</script>
......@@ -156,6 +157,7 @@
align-items: center;
justify-content: space-between;
color: #333333;
font-weight: bold;
font-size: 28rpx;
}
......@@ -166,6 +168,12 @@
.item-operation-view {
margin-top: 20rpx;
.item-label {
color: #2272FF;
}
.item-content {
word-break: break-all;
}
}
}
}
......
......@@ -334,16 +334,26 @@
self.$u.api.listOrderRecord(param).then((res) => {
if (res.code == 200) {
res.data.forEach(item =>{
if(item.operationType === '预约'){
item.operationTypeText = '上门时间'
}else if (item.operationType === '报备' || item.operationType === '改约'){
item.isTrace = false
item.traceTime = null
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(',')
item.operationTypeText = arr[0]
if(arr.length > 1){
item.orderRecordRemark = arr[1].substring(arr[1].indexOf(':')+1,arr[1].length)
if(arr && arr.length > 1) {
let remark = arr[1].substring(arr[1].indexOf(':')+1,arr[1].length)
item.traceTime = remark
item.operationTypeText = arr[0]
}
}else{
item.operationTypeText = item.operationType + '时间'
} else if(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
......
......@@ -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实例
......@@ -46,8 +57,8 @@ const imageCache = function (vm, src, host) {
let image_url = host + src
let image_name = md5Libs.md5(image_url)
var arr = Object.keys(vm.vuex_cache);
if (vm.vuex_cache && arr.length && arr.includes(image_name)) {
// call_back(vm.vuex_cache[image_name])
if (vm.vuex_cache && arr.length && arr.includes(image_name) &&
validImages(vm.vuex_cache[image_name])) {
return vm.vuex_cache[image_name]
} 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