|
@@ -28,7 +28,7 @@
|
|
|
<div class="ques-list" v-show="showQues">
|
|
|
<template v-for="item of questData">
|
|
|
<el-checkbox :label="item.id" v-if="item.isShow == 1" :key="item.value">{{ item.type
|
|
|
- }}</el-checkbox>
|
|
|
+ }}</el-checkbox>
|
|
|
</template>
|
|
|
</div>
|
|
|
</el-collapse-transition>
|
|
@@ -1352,8 +1352,8 @@ export default class Order extends Vue {
|
|
|
queryOrderTimeConfig({ pageSize: 20, pageNum: 1 }).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.orderTimeConfigOptions = res.rows
|
|
|
- //将this.orderTimeConfigOptions[0].timeout的小时数值换成秒钟,如0.1小时=360秒
|
|
|
- const tv = Number(this.orderTimeConfigOptions[0].timeout as number) * 60;
|
|
|
+
|
|
|
+ const tv = Number(this.orderTimeConfigOptions[0].timeout as number);
|
|
|
(this.$refs.orderTable as any).setOrderTimeoutVal(tv);
|
|
|
}
|
|
|
})
|
|
@@ -1368,9 +1368,9 @@ export default class Order extends Vue {
|
|
|
const to = this.data[i].orderTimeout;
|
|
|
const cr = this.data[i].createTime;
|
|
|
|
|
|
- //this.orderTimeConfigOptions[0].timeout的小时数值换成秒钟,如0.1小时=360秒
|
|
|
+ //this.orderTimeConfigOptions[0].timeout的小时数值换成秒钟
|
|
|
let timeout: number = Number(this.orderTimeConfigOptions[0].timeout as number);
|
|
|
- let timeoutSec = timeout * 60 * 60;
|
|
|
+ let timeoutSec = timeout * 60;
|
|
|
|
|
|
//orderTimeout属性YYYY-MM-DD HH:mm:ss和当前时间比较,返回相差多少小时多少分钟,如:超时2小时23分
|
|
|
let time = this.data[i].orderTimeout.split(' ');
|
|
@@ -1394,12 +1394,12 @@ export default class Order extends Vue {
|
|
|
let diffMin = Math.floor(Math.abs((diff / 1000 / 60)));
|
|
|
//计算小时
|
|
|
let diffHour = Math.floor(Math.abs((diff / 1000 / 60 / 60)));
|
|
|
- if (Math.abs(diffSec) === 0) {
|
|
|
- this.data[i].orderTimeout = "未超时";// + ',' + to + ',' + cr;
|
|
|
- continue;
|
|
|
- }
|
|
|
- if (diff >= timeoutSec) {
|
|
|
+ //this.data[i].orderTimeout = `${diffSec},${timeoutSec}`;
|
|
|
+ if (diffSec > timeoutSec) {
|
|
|
this.data[i].isOrderTimeout = true;
|
|
|
+ } else {
|
|
|
+ this.data[i].orderTimeout = "未超时";// + ',' + to + ',' + cr + ',' + diffSec + ',' + timeoutSec;
|
|
|
+ continue;
|
|
|
}
|
|
|
console.info(diffSec, diffMin, diffHour, this.data[i].createTime, this.data[i].orderTimeout, timeoutSec, timeout);
|
|
|
if (diffSec < 60 && diffSec > 0) {
|
|
@@ -1407,7 +1407,7 @@ export default class Order extends Vue {
|
|
|
continue;
|
|
|
}
|
|
|
if (diffMin < 60) {
|
|
|
- this.data[i].orderTimeout = "超时" + Math.abs(Math.round(diffSec)) + "分";
|
|
|
+ this.data[i].orderTimeout = "超时" + Math.abs(Math.round(diffMin)) + "分";// + ',' + to + ',' + cr + ',' + diffSec + ',' + timeoutSec;
|
|
|
continue;
|
|
|
}
|
|
|
if (diffHour > 0) {
|