|
|
@@ -137,7 +137,7 @@ import { myRequest } from '@/util/api.js'
|
|
|
|
|
|
import { isWeixin } from '@/util/isWeixin.js'
|
|
|
|
|
|
-import { time_to_sec } from '@/util/formatTime.js'
|
|
|
+import { time_to_sec, time_change } from '@/util/formatTime.js'
|
|
|
|
|
|
onLoad(options => {
|
|
|
if (isWeixin()) {
|
|
|
@@ -157,6 +157,8 @@ onLoad(options => {
|
|
|
getEndList()
|
|
|
// 获取车牌号列表
|
|
|
getBusList()
|
|
|
+ // 获取发车时间提前推迟多少分钟可以扫码数据
|
|
|
+ getTimeConfig()
|
|
|
// 处理车牌号数据
|
|
|
form.value.selectValue = info.value.car_number
|
|
|
|
|
|
@@ -201,6 +203,11 @@ const endList = ref([])
|
|
|
// 人员列表数组
|
|
|
const listData = ref([])
|
|
|
|
|
|
+// 发车时间提前多少分钟可以扫码
|
|
|
+const time_early = ref(null)
|
|
|
+// 发车时间推迟多少分钟可以扫码
|
|
|
+const time_late = ref(null)
|
|
|
+
|
|
|
// 获取路线数组请求
|
|
|
const getPathList = async () => {
|
|
|
const res = await myRequest({
|
|
|
@@ -403,6 +410,16 @@ const getBusContain = async () => {
|
|
|
info.value.contain = res.data
|
|
|
}
|
|
|
|
|
|
+// 获取发车时间提前推迟多少分钟可以扫码数据
|
|
|
+const getTimeConfig = async () => {
|
|
|
+ const res = await myRequest({
|
|
|
+ url: '/cnqueryHb.action'
|
|
|
+ })
|
|
|
+ // console.log(res)
|
|
|
+ time_early.value = res.sm_end
|
|
|
+ time_late.value = res.sm_start
|
|
|
+}
|
|
|
+
|
|
|
// 下拉框选择时的回调
|
|
|
const changeMultiple = e => {
|
|
|
// console.log(e);
|
|
|
@@ -412,6 +429,8 @@ const changeMultiple = e => {
|
|
|
const bindPickerChange = (e, type) => {
|
|
|
if (type == 1) {
|
|
|
info.value.ci_time = e.detail.value
|
|
|
+ info.value.sm_start = time_change(info.value.ci_time, time_early.value * -1)
|
|
|
+ info.value.sm_end = time_change(info.value.ci_time, time_late.value)
|
|
|
} else if (type == 2) {
|
|
|
info.value.route = pathList.value[e.detail.value].route
|
|
|
getEndList()
|