Commit f76408c5 authored by Morson's avatar Morson
parents e2034c6b fc124ce9
......@@ -100,16 +100,6 @@
return {
timeout: false,
timestamp: 0,
/** orderType
0 待接单、
1 待预约、
2 待签到、
3 待完工、
4 审核中、
5 异常单、
6 已完工
*/
orderType: 0
};
},
computed: {
......@@ -213,44 +203,60 @@
},
orderDistance() {
return this.distance(this.orderData.contactAddressLatitud,this.orderData.contactAddressLongitud, this.location[0], this.location[1])
}
},
created() {
/*
orderStatus:
待接单 orderStatus<31 工单状态小于31
待预约 orderStatus == 31 and appointmentDatetime == null 工单状态等于30并且预约时间为空
待签到 orderStatus == 31 and appointmentDatetime is not null 工单状态等于30并且预约时间不为空
待完工 orderStatus >31 and orderStatus < 80 工单状态大于31 小于80
审核中 orderStatus ==85 or orderStatus == 87 工单状态 等于85 或者 等于有87
异常 orderStatus ==86 or orderStatus == 88 工单状态 等于86 或者 等于有88
已完工 orderStatus in(80,81,89,110) 工单状态 等于80 or 81 or 89 or 110
},
/** orderType
0 待接单、
1 待预约、
2 待签到、
3 待完工、
4 审核中、
5 异常单、
6 已完工
*/
if (!this.type) {
if (this.orderData.orderStatus < 31) {
this.orderType = 0
} else if (this.orderData.orderStatus == 31) {
if (this.orderData.appointmentDatetime) {
this.orderType = 2
orderType() {
/*
orderStatus:
待接单 orderStatus<31 工单状态小于31
待预约 orderStatus == 31 and appointmentDatetime == null 工单状态等于30并且预约时间为空
待签到 orderStatus == 31 and appointmentDatetime is not null 工单状态等于30并且预约时间不为空
待完工 orderStatus >31 and orderStatus < 80 工单状态大于31 小于80
审核中 orderStatus ==85 or orderStatus == 87 工单状态 等于85 或者 等于有87
异常 orderStatus ==86 or orderStatus == 88 工单状态 等于86 或者 等于有88
已完工 orderStatus in(80,81,89,110) 工单状态 等于80 or 81 or 89 or 110
*/
if (!this.type) {
if (this.orderData.orderStatus < 31) {
return 0
} else if (this.orderData.orderStatus == 31) {
if (this.orderData.appointmentDatetime) {
return 2
} else {
return 1
}
} else if (this.orderData.orderStatus > 31 && this.orderData.orderStatus < 80) {
return 3
} else if (this.orderData.orderStatus == 85 || this.orderData.orderStatus == 87) {
return 4
} else if (this.orderData.orderStatus == 86 ||this.orderData.orderStatus == 88) {
return 5
} else if ([80, 81, 89, 110].indexOf(this.orderData.orderStatus) != -1) {
return 6
} else {
this.orderType = 1
return 0
}
} else if (this.orderData.orderStatus > 31 && this.orderData.orderStatus < 80) {
this.orderType = 3
} else if (this.orderData.orderStatus == 85 || this.orderData.orderStatus == 87) {
this.orderType = 4
} else if (this.orderData.orderStatus == 86 ||this.orderData.orderStatus == 88) {
this.orderType = 5
} else if ([80, 81, 89, 110].indexOf(this.orderData.orderStatus) != -1) {
this.orderType = 6
} else {
this.orderType = 0
return this.types[this.type]
}
} else {
this.orderType = this.types[this.type]
}
},
created() {
this.updateTime()
},
watch:{
'orderData.currentCellTime'(val) {
// 从后台重新获取数据之后,时间重新计算
this.updateTime()
}
this.timeout = this.orderData.currentOverTime < new Date().getTime()
this.timestamp = Math.round(Math.abs(this.orderData.currentOverTime - new Date().getTime()) / 1000)
},
methods: {
handleClick() {
......@@ -302,7 +308,12 @@
},
Rad(d){
return d * Math.PI / 180.0;//经纬度转换成三角函数中度分表形式。
},
},
updateTime() {
var time = new Date().getTime()
this.timeout = this.orderData.currentOverTime < time
this.timestamp = Math.round(Math.abs(this.orderData.currentOverTime - time) / 1000)
}
}
}
</script>
......
......@@ -92,7 +92,7 @@
Customer
},
data() {
return {
return {
status: 0, // 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',6=>'已签约',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
location: [], // 经纬度
title: false,
......@@ -249,10 +249,17 @@
if (self.search.pageNumber == 1) {
self.orderList = []
}
if (res.data.list) {
self.orderList.push(...res.data.list);
// self.orderList.push(...res.data.list)
// 更新每一条时间戳,防止后台返回的数据和原先一样,不触发ordercell的时间计算
var time = new Date().getTime()
for (var item of res.data.list) {
item.currentCellTime = time
self.orderList.push(item);
}
}
self.currentLoadStatus = res.data.total > self.orderList.length && (res.data.list || []).length == self.search.pageSize ? 'loadmore' : 'nomore'
} else {
......
......@@ -4,8 +4,9 @@
<text class="title-view">学习</text>
</u-navbar>
<image :src="bannerImage" mode="" class="banner"></image>
<u-tabs-swiper bg-color="#F4F5F7" inactive-color="#999999" font-size="28" ref="uTabs" :list="tabs" :current="current" @change="tabsChange" :is-scroll="false" :bar-width="52" swiperWidth="750"></u-tabs-swiper>
<swiper class="swiper_group" :current="swiperCurrent" @animationfinish="animationfinish">
<u-tabs-swiper bg-color="#F4F5F7" inactive-color="#999999" font-size="28" ref="uTabs" :list="tabs"
:current="current" @change="tabsChange" :is-scroll="false" :bar-width="52" swiperWidth="750"></u-tabs-swiper>
<swiper class="swiper_group" :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish">
<swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 0">
<scroll-view scroll-y style="height:100%;width:100%;">
<view class="jf-currency-class">
......@@ -22,7 +23,7 @@
</scroll-view>
</swiper-item>
<swiper-item @touchmove.stop.prevent="stopTouchMove" v-show="current == 1">
<scroll-view scroll-y style="height:100%;width:100%;" @scrolltolower="onReachBottom" scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100" @refresherpulling="onPulling" @refresherrefresh="onRefresh" @refresherrestore="onRestore" @refresherabort="onAbort">
<scroll-view scroll-y style="height:100%;width:100%;" @scrolltolower="onreachBottom" scroll-y="true" refresher-enabled="true" :refresher-triggered="triggered" :refresher-threshold="100" @refresherpulling="onPulling" @refresherrefresh="onRefresh" @refresherrestore="onRestore" @refresherabort="onAbort">
<view v-for="item in list" :key="item.id" class="notice" @click="bbb(item)">
<view class="n-head">
{{item.title}}
......@@ -246,6 +247,7 @@ var examJson = {
examId: "",
examStatus: "",
isComplete: false,
questionTime: null,
},
{
title: "接单操作",
......@@ -257,6 +259,7 @@ var examJson = {
examId: "",
examStatus: "",
isComplete: false,
questionTime: null,
},
],
test: [
......@@ -269,6 +272,7 @@ var examJson = {
id: 3,
examId: "",
examStatus: "",
questionTime: null,
isComplete: false,
},
{
......@@ -280,6 +284,7 @@ var examJson = {
id: 4,
examId: "",
examStatus: "",
questionTime: null,
isComplete: false,
},
],
......@@ -294,6 +299,7 @@ var examJson = {
examId: "",
examStatus: "",
isComplete: false,
questionTime: null,
},
{
title: "接单操作",
......@@ -305,6 +311,7 @@ var examJson = {
examId: "",
examStatus: "",
isComplete: false,
questionTime: null,
},
],
};
......@@ -379,6 +386,7 @@ export default {
examId: examListJson[0].examId,
examStatus: examListJson[0].examStatus,
isComplete: examListJson[0].isComplete,
questionTime: examListJson[0].questionTime,
},
{
title: examListJson[1].title,
......@@ -390,6 +398,7 @@ export default {
examId: examListJson[1].examId,
examStatus: examListJson[1].examStatus,
isComplete: examListJson[1].isComplete,
questionTime: examListJson[1].questionTime,
},
],
loadStatus: "loading",
......@@ -447,8 +456,13 @@ export default {
onAbort() {
console.log("onAbort");
},
transition(e) {
// swiper-item左右移动,通知tabs的滑块跟随移动
let dx = e.detail.dx;
this.$refs.uTabs.setDx(dx);
},
//scroll-view到底部加载更多
onReachBottom() {
onreachBottom() {
//上拉触底函数
if (!this.isLoadMore) {
this.isLoadMore = true;
......@@ -635,6 +649,11 @@ export default {
}
this.examList[i].examId = res.data.id;
this.examList[i].examStatus = res.data.examStatus; //i;//
this.examList[i].questionTime = res.data.questionTime;
console.log(
this.examList[i].questionTime,
"每题考试时间"
);
let examResult = res.data.examLevelResult;
this.examList[i].status =
examResult != "" ? examResult : "未通过";
......@@ -671,6 +690,9 @@ export default {
aaa(index) {
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
//考试完成分成通过、未通过
getApp().globalData.questionTime = this.examList[
index
].questionTime;
var examInfo = this.examList[index];
if (examInfo.examStatus == 0) {
console.log("这是试卷id", examInfo.id);
......
......@@ -74,8 +74,8 @@ export default {
isSelect: false,
timeDefine: {
"time-id-2": 1800,
"time-id-3": 900,
"time-id-4": 450,
"time-id-3": getApp().globalData.questionTime * 5,
"time-id-4": getApp().globalData.questionTime * 5,
},
endTime: 0,
currentTime: 100,
......@@ -130,6 +130,7 @@ export default {
if (h !== "00") res += `${h}:`;
if (m !== "00") res += `${m}:`;
res += `${s}`;
if (this.endTime == 0) res = "00:00";
return res;
},
toSubmit() {
......@@ -353,13 +354,20 @@ export default {
}
if (res.data.code == 200) {
that.currentItem = res.data.data;
console.log(that.currentItem);
that.progress = res.data.data.progress;
if (res.data.data.isQuestion) {
let str = res.data.data.question.content;
var wz = str.indexOf(".");
let str1 = str.substring(wz + 1);
console.log(that.currentItem);
that.currentItem.question.content = str1;
console.log(str1, "切割的字符串");
}
if (res.data.data.answerList) {
that.handleData();
// that.currentTime = 100
this.everyTime = 90; //每道题90s
this.everyTime = getApp().globalData.questionTime; //每道题100s
that.isSelect = false;
clearTimeout(this.timer);
that.startCounting();
......
......@@ -228,6 +228,7 @@
this.courseDesc = res.data.content.replace(/<p.*?>|<\/p>/ig, "")
this.section_id = res.data.id
this.section_content = res.data.content
this.status = res.data.isLearned ? 1 : 0
this.teacher.name = res.data.teachers[0].name
this.teacherImage = res.data.teachers[0].avatar
this.teacherIntro = res.data.teachers[0].intro.replace(/<.*?>|<\/.*?>/ig, "")
......@@ -456,7 +457,6 @@
// padding: 20rpx;
padding-left: 20rpx;
background: #fff;
white-space: nowrap;
// border: 1px solid red;
}
......
......@@ -149,7 +149,7 @@
<!-- 异常预约 ,现场拍照 这里是调用拍照的两个组件-->
<view class="right">
<view v-if="errorSignIn || scenePhoto" @click="$u.throttle(handleClickRight, 500)" :class="['button', {'active': scenePhoto}]">
<text>{{errorSignIn ? '异常签到' : '拍照'}}</text>
<text :style="errorSignIn ? 'font-size:24rpx' : ''">{{errorSignIn ? '异常\n签到' : '拍照'}}</text>
</view>
</view>
......@@ -290,46 +290,15 @@
methods: {
openLocation(address){
if(this.isAllowDianhuaAndDaohang){
// uni.getLocation({
// type: 'gcj02', //返回可以用于uni.openLocation的经纬度
// success: function (res) {
const latitude = this.order.contactAddressLatitud //res.latitude;
const longitude =this.order.contactAddressLongitud //res.longitude;
uni.openLocation({
latitude: Number(latitude),
longitude: Number(longitude),
success: function () {
console.log('success');
}
});
// }
// ,
// complete: function(res) {
// if (res.errMsg.indexOf('auth') != -1) {
// uni.showModal({
// title: '提示',
// content: '获取权限失败,请到设置页面开启权限',
// confirmText: '好的',
// success(res) {
// if (res.confirm) {
// uni.openSetting({
// success(res) {
// console.log(res.authSetting)
// }
// });
// }
// }
// })
// } else if (res.errMsg) {
// // uni.setClipboardData({
// // data: address,
// // success: function () {
// // console.log('success');
// // }
// // });
// }
// }
const latitude = this.order.contactAddressLatitud //res.latitude;
const longitude =this.order.contactAddressLongitud //res.longitude;
uni.openLocation({
latitude: Number(latitude),
longitude: Number(longitude),
success: function () {
console.log('success');
}
});
}
},
phoneToCustomer(phone){ // 联系客户
......@@ -726,7 +695,6 @@
* @return float 浮点数
*/
distance(lat1, lng1, lat2, lng2) {
console.log(lat1, lng1, lat2, lng2)
var radLat1 = this.Rad(lat1);
var radLat2 = this.Rad(lat2);
var a = radLat1 - radLat2;
......
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