|
@@ -5,10 +5,11 @@
|
|
|
<view class="left">车牌号</view>
|
|
<view class="left">车牌号</view>
|
|
|
<view class="right2">
|
|
<view class="right2">
|
|
|
<view class="item">
|
|
<view class="item">
|
|
|
- <view :class="['select', form.selectValue ? 'selected' : '']" @tap="handleMultiple(form.selectIndex)">
|
|
|
|
|
|
|
+ <view :class="['select', form.selectValue != 0 ? 'selected' : '']" @tap="handleMultiple(form.selectIndex)">
|
|
|
{{ form.selectValue != 0 ? form.selectValue : '请选择' }}
|
|
{{ form.selectValue != 0 ? form.selectValue : '请选择' }}
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="right-img"><img src="../../static/bottom.png" /></view>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 车牌号选项弹窗区域 -->
|
|
<!-- 车牌号选项弹窗区域 -->
|
|
|
<transition>
|
|
<transition>
|
|
@@ -39,8 +40,8 @@
|
|
|
<!-- 发车时间区域 -->
|
|
<!-- 发车时间区域 -->
|
|
|
<view class="box">
|
|
<view class="box">
|
|
|
<view class="left">发车时间</view>
|
|
<view class="left">发车时间</view>
|
|
|
- <picker style="width: 40%;" @change="bindPickerChange($event, 1)" mode="time" :value="info.ci_time">
|
|
|
|
|
- <view class="right">
|
|
|
|
|
|
|
+ <picker style="width: 40%;" @change="bindPickerChange($event, 1)" mode="time" :value="info.ci_time" :start="getCurrentTime()">
|
|
|
|
|
+ <view :class="['right', info.ci_time != 0 ? '' : 'unSelect']">
|
|
|
{{ info.ci_time != 0 ? info.ci_time : '请选择' }}
|
|
{{ info.ci_time != 0 ? info.ci_time : '请选择' }}
|
|
|
<view class="right-img"><img src="../../static/bottom.png" /></view>
|
|
<view class="right-img"><img src="../../static/bottom.png" /></view>
|
|
|
</view>
|
|
</view>
|
|
@@ -51,7 +52,7 @@
|
|
|
<view class="box">
|
|
<view class="box">
|
|
|
<view class="left">扫码开始时间</view>
|
|
<view class="left">扫码开始时间</view>
|
|
|
<picker style="width: 40%;" @change="bindPickerChange($event, 4)" mode="time" :value="info.sm_start">
|
|
<picker style="width: 40%;" @change="bindPickerChange($event, 4)" mode="time" :value="info.sm_start">
|
|
|
- <view class="right">
|
|
|
|
|
|
|
+ <view :class="['right', info.sm_start != 0 ? '' : 'unSelect']">
|
|
|
{{ info.sm_start != 0 ? info.sm_start : '请选择' }}
|
|
{{ info.sm_start != 0 ? info.sm_start : '请选择' }}
|
|
|
<view class="right-img"><img src="../../static/bottom.png" /></view>
|
|
<view class="right-img"><img src="../../static/bottom.png" /></view>
|
|
|
</view>
|
|
</view>
|
|
@@ -62,7 +63,7 @@
|
|
|
<view class="box">
|
|
<view class="box">
|
|
|
<view class="left">扫码结束时间</view>
|
|
<view class="left">扫码结束时间</view>
|
|
|
<picker style="width: 40%;" @change="bindPickerChange($event, 5)" mode="time" :value="info.sm_end">
|
|
<picker style="width: 40%;" @change="bindPickerChange($event, 5)" mode="time" :value="info.sm_end">
|
|
|
- <view class="right">
|
|
|
|
|
|
|
+ <view :class="['right', info.sm_end != 0 ? '' : 'unSelect']">
|
|
|
{{ info.sm_end != 0 ? info.sm_end : '请选择' }}
|
|
{{ info.sm_end != 0 ? info.sm_end : '请选择' }}
|
|
|
<view class="right-img"><img src="../../static/bottom.png" /></view>
|
|
<view class="right-img"><img src="../../static/bottom.png" /></view>
|
|
|
</view>
|
|
</view>
|
|
@@ -74,8 +75,8 @@
|
|
|
<view class="left">路线</view>
|
|
<view class="left">路线</view>
|
|
|
|
|
|
|
|
<picker style="width: 60%;" @change="bindPickerChange($event, 2)" :range="pathList" range-key="route">
|
|
<picker style="width: 60%;" @change="bindPickerChange($event, 2)" :range="pathList" range-key="route">
|
|
|
- <view class="right">
|
|
|
|
|
- {{ info.route }}
|
|
|
|
|
|
|
+ <view :class="['right', info.route ? '' : 'unSelect']">
|
|
|
|
|
+ {{ info.route ? info.route : '请选择' }}
|
|
|
<view class="right-img"><img src="../../static/bottom.png" /></view>
|
|
<view class="right-img"><img src="../../static/bottom.png" /></view>
|
|
|
</view>
|
|
</view>
|
|
|
</picker>
|
|
</picker>
|
|
@@ -86,7 +87,7 @@
|
|
|
<view class="left">终点站</view>
|
|
<view class="left">终点站</view>
|
|
|
|
|
|
|
|
<picker style="width: 60%;" @change="bindPickerChange($event, 3)" :range="endList" range-key="route_end">
|
|
<picker style="width: 60%;" @change="bindPickerChange($event, 3)" :range="endList" range-key="route_end">
|
|
|
- <view class="right">
|
|
|
|
|
|
|
+ <view :class="['right', info.route_end ? '' : 'unSelect']">
|
|
|
{{ info.route_end ? info.route_end : '请选择' }}
|
|
{{ info.route_end ? info.route_end : '请选择' }}
|
|
|
<view class="right-img"><img src="../../static/bottom.png" /></view>
|
|
<view class="right-img"><img src="../../static/bottom.png" /></view>
|
|
|
</view>
|
|
</view>
|
|
@@ -140,28 +141,35 @@ import { time_to_sec } from '@/util/formatTime.js'
|
|
|
|
|
|
|
|
onLoad(options => {
|
|
onLoad(options => {
|
|
|
if (isWeixin()) {
|
|
if (isWeixin()) {
|
|
|
- info.value = JSON.parse(options.info)
|
|
|
|
|
- // console.log(info.value)
|
|
|
|
|
- // 获取人员列表
|
|
|
|
|
- getData(info.value)
|
|
|
|
|
- // 获取路线数组
|
|
|
|
|
- getPathList()
|
|
|
|
|
- // 获取终点站列表
|
|
|
|
|
- getEndList()
|
|
|
|
|
- // 获取车牌号列表
|
|
|
|
|
- getBusList()
|
|
|
|
|
- // 处理车牌号数据
|
|
|
|
|
- form.value.selectValue = info.value.car_number
|
|
|
|
|
-
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- let temList = []
|
|
|
|
|
- selectMultiple.value.columns.forEach(item => {
|
|
|
|
|
- if (item.label == form.value.selectValue) {
|
|
|
|
|
- temList.push(item.value)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ let userInfo = JSON.parse(uni.getStorageSync('bus-userInfo'))
|
|
|
|
|
+ if (userInfo.user_zz !== '车队长') {
|
|
|
|
|
+ uni.redirectTo({
|
|
|
|
|
+ url: '/pages/404/404?message=暂无权限'
|
|
|
})
|
|
})
|
|
|
- form.value.selectIndex = temList
|
|
|
|
|
- }, 500)
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ info.value = JSON.parse(options.info)
|
|
|
|
|
+ // console.log(info.value)
|
|
|
|
|
+ // 获取人员列表
|
|
|
|
|
+ getData(info.value)
|
|
|
|
|
+ // 获取路线数组
|
|
|
|
|
+ getPathList()
|
|
|
|
|
+ // 获取终点站列表
|
|
|
|
|
+ getEndList()
|
|
|
|
|
+ // 获取车牌号列表
|
|
|
|
|
+ getBusList()
|
|
|
|
|
+ // 处理车牌号数据
|
|
|
|
|
+ form.value.selectValue = info.value.car_number
|
|
|
|
|
+
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ let temList = []
|
|
|
|
|
+ selectMultiple.value.columns.forEach(item => {
|
|
|
|
|
+ if (item.label == form.value.selectValue) {
|
|
|
|
|
+ temList.push(item.value)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ form.value.selectIndex = temList
|
|
|
|
|
+ }, 500)
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
uni.redirectTo({
|
|
uni.redirectTo({
|
|
|
url: '/pages/404/404?message=请在微信客户端打开链接'
|
|
url: '/pages/404/404?message=请在微信客户端打开链接'
|
|
@@ -416,6 +424,13 @@ const bindPickerChange = (e, type) => {
|
|
|
info.value.sm_end = e.detail.value
|
|
info.value.sm_end = e.detail.value
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+// 获取当前时间 hh:mm
|
|
|
|
|
+const getCurrentTime = () => {
|
|
|
|
|
+ const date = new Date()
|
|
|
|
|
+ let H = (date.getHours() + '').padStart(2, '0')
|
|
|
|
|
+ let M = (date.getMinutes() + '').padStart(2, '0')
|
|
|
|
|
+ return `${H}:${M}`
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -458,9 +473,10 @@ const bindPickerChange = (e, type) => {
|
|
|
flex: 2;
|
|
flex: 2;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
justify-content: flex-end;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
|
|
|
.item {
|
|
.item {
|
|
|
- width: 100%;
|
|
|
|
|
|
|
+ flex: 1;
|
|
|
padding: 20rpx 0;
|
|
padding: 20rpx 0;
|
|
|
|
|
|
|
|
.select {
|
|
.select {
|
|
@@ -480,6 +496,22 @@ const bindPickerChange = (e, type) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ .right-img {
|
|
|
|
|
+ margin-left: 27rpx;
|
|
|
|
|
+ margin-top: -30rpx;
|
|
|
|
|
+ width: 17rpx;
|
|
|
|
|
+ height: 12rpx;
|
|
|
|
|
+
|
|
|
|
|
+ img {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .unSelect {
|
|
|
|
|
+ color: #ccc;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|