h5/App.vue
@@ -126,7 +126,7 @@ font-size: 28rpx; } .red{ color: red; color: red !important; } //设置åè§ h5/main.js
@@ -16,7 +16,7 @@ Vue.component('navigation', navigation) Vue.prototype.$store = store Vue.prototype.$jump = (url) => {uni.navigateTo({url})} Vue.prototype.$goBack = () => { uni.navigateBack() } Vue.prototype.$goBack = () => { setTimeout(() => {uni.navigateBack()},300) } Vue.prototype.showToast = (str) => { setTimeout(() => { uni.showToast({ h5/manifest.json
@@ -92,7 +92,7 @@ "/admin_interface" : { // è¿ä¸ªå段åéä¸ä½ é ç½®çbasePrefixUrlä¸è´ï¼ç³»ç»è¯å«å°å¸¦æ/dev-api请æ±çå°åæ¶ï¼ä¼å¨å颿¼æ¥ä¸ä»£çæå¡å¨å°å // "target" : "http://192.168.0.173/admin_interface", // 代çæå¡å¨ååæIPå°å "target" : "http://192.168.0.136:10010", // 代çæå¡å¨ååæIPå°å "target" : "http://192.168.0.139:10010", // 代çæå¡å¨ååæIPå°å "changeOrigin" : true, // å 许跨å "pathRewrite" : { "^/admin_interface" : "" // éåå°åï¼å¦æå®é æ¥å£ä¸æ¯ä¸å¸¦/dev-apiï¼éè¦å°è¿ä¸ªåç¼ç½®ç©ºï¼å 为è¿ä¸ªåç¼åªæ¯ä¸ºäºè¯å«ç¨ï¼è¯å«å®ä¹å就没ç¨äº h5/pages/driver/forgetPsd.vue
@@ -7,7 +7,7 @@ <view class="login_list"> <view class="login_list_item"> <image src="@/static/login_ic_phone@2x.png" mode="widthFix" /> <input v-model="form.phone" maxlength="18" placeholder="请è¾å ¥ææºå·" /> <input v-model="form.phone" :maxlength="11" placeholder="请è¾å ¥ææºå·" /> </view> <view class="login_list_item"> <image src="@/static/ic_captcha.png" mode="widthFix"></image> @@ -55,7 +55,10 @@ } }, onLoad() { onLoad(option) { if(option.phone){ this.$set(this.form, 'phone', option.phone) } }, methods: { @@ -102,16 +105,12 @@ ...form }).then(res => { if (res && res.code == 200) { this.showToast('å¯ç ä¿®æ¹æå,è¯·éæ°ç»å½') setTimeout(() => { uni.showToast({ title: 'å¯ç ä¿®æ¹æå,è¯·éæ°ç»å½', icon: 'success', duration: 2000 }) }) uni.redirectTo({ url: "/pages/staffLogin/login" }) uni.redirectTo({ url: "/pages/driver/login" }) }, 500) } }) } h5/pages/driver/index.vue
@@ -13,7 +13,7 @@ <!-- --> <view class="task_list"> <swiper circular class="task_swiper"> <swiper-item v-for="item in taskList" :key="item.id"> <swiper-item v-for="item in taskList" :key="item.id" @click="taskClick(item)"> <view class="item"> <view class="head"> <view class="name">è¿è¾å{{ item.contractNum }}</view> @@ -41,9 +41,9 @@ </view> <view class="sub"> <view class="time" v-if="item.arriveDate">{{ item.arriveDate.slice(5) }}</view> <view v-if="item.status == 0" class="sub_btn" @click="handleTask(item)">确认任å¡</view> <view v-if="item.status == 1" class="sub_btn" @click="handleSign(item)">ç«å³ç¾å°</view> <view v-if="item.status == 2" class="sub_btn" @click="handleQueue(item)">æ¥çæé</view> <view v-if="item.status == 0" class="sub_btn">确认任å¡</view> <view v-if="item.status == 1" class="sub_btn">ç«å³ç¾å°</view> <view v-if="item.status == 2" class="sub_btn">æ¥çæé</view> </view> </view> </view> @@ -101,20 +101,10 @@ }; }, created() { onShow() { this.initData(); }, methods: { handleSign(item) { uni.navigateTo({ url: '/pages/driver/taskDetail?id=' + item.id }); }, handleQueue(item) { uni.navigateTo({ url:'/pages/driver/queueUp?jobId=' + item.id }) }, initData() { driverHomeData().then(res => { if (res.code == 200) { @@ -134,11 +124,32 @@ url: '/pages/driver/login' }); }, taskClick(item) { const status = item.status console.log(item); if(status == 0){ uni.navigateTo({url: '/pages/driver/taskConfirm?id=' + item.id}); }else if(status == 2){ uni.navigateTo({url:'/pages/driver/queueUp?jobId=' + item.id}) }else{ uni.navigateTo({url: `/pages/driver/taskDetail?id=${item.id}&status=${item.status}`}); } }, handleTask(item) { uni.navigateTo({ url: '/pages/driver/taskConfirm?id=' + item.id }); } }, handleSign(item) { uni.navigateTo({ url: `/pages/driver/taskDetail?id=${item.id}&status=${item.status}` }); }, handleQueue(item) { uni.navigateTo({ url:'/pages/driver/queueUp?jobId=' + item.id }) }, } }; </script> @@ -175,7 +186,7 @@ position: relative; width: 688rpx; height: 270rpx; margin-bottom: 40rpx; margin-bottom: 28rpx; .h1 { font-weight: bold; line-height: 66rpx; @@ -249,17 +260,17 @@ } } .task_list { margin-bottom: 48rpx; margin-bottom: 0rpx; .task_swiper { padding: 16rpx 10rpx; height: 320rpx; padding: 12rpx 10rpx; height: 340rpx; width: 730rpx; margin-left: -20rpx; box-sizing: border-box; } .item { background: #ffffff; box-shadow: 0rpx 0rpx 12rpx 0rpx rgba(39, 155, 170, 0.32); box-shadow: 0rpx 6rpx 24rpx 0rpx rgba(39, 155, 170, 0.32); border-radius: 16rpx; height: 280rpx; width: 98%; h5/pages/driver/login.vue
@@ -57,7 +57,7 @@ }, handleSetPsd() { uni.navigateTo({ url: "/pages/driver/forgetPsd" url: "/pages/driver/forgetPsd?phone=" + this.form.username }) }, dealChange(e) { h5/pages/driver/queueUp.vue
@@ -8,11 +8,11 @@ </view> <!-- --> <view class="main_list"> <view class="item" @click="handleCheck()"> <view class="item" @click="handleCheck(1)"> <view class="h1">ä½ä¸ä¸è½¦è¾</view> <view class="h2"> <text v-if="activePlatform.signJobList">{{ activePlatform.signJobList.length activePlatform.workJobList.length }}</text> <text class="unit">è¾</text> </view> @@ -22,11 +22,11 @@ mode="" ></image> </view> <view class="item cyan"> <view class="item cyan" @click="handleCheck(0)"> <view class="h1">å·²ç¾å°è½¦è¾</view> <view class="h2"> <text v-if="activePlatform.workJobList">{{ activePlatform.workJobList.length activePlatform.signJobList.length }}</text> <text class="unit">è¾</text> </view> @@ -55,10 +55,12 @@ return { activePlatform: {}, platformGroupList: [], showPlat: false showPlat: false, jobId: '' } }, onLoad(option) { this.jobId = option.jobId this.getData(option.jobId || '') }, methods: { @@ -79,10 +81,17 @@ this.activePlatform = this.platformGroupList[index] this.showPlat = false }, handleCheck() { uni.navigateTo({ url: "/pages/driver/queueUpRecord" }) handleCheck(type) { if(this.jobId){ uni.navigateTo({ url: `/pages/driver/queueUpRecord?type=${type}&platformId=${this.activePlatform.id}&jobId=${this.jobId}` }) }else{ uni.navigateTo({ url: `/pages/driver/queueUpRecord?type=${type}&platformId=${this.activePlatform.id}` }) } } } } h5/pages/driver/queueUpRecord.vue
@@ -1,147 +1,193 @@ <template> <view class="main_app"> <view class="main_name"> <text class="mr12">ç©æµå ¥åºæå°</text> <u-icon name="arrow-down" color="#777777"></u-icon> </view> <!-- --> <view class="main_list"> <view class="item"> <view class="status">ä½ä¸ä¸</view> <image class="avatar" src="@/static/driver/ic_truck@2x.png" mode="" ></image> <view class="content"> <view class="id_card">çA</view> <view class="line"> <view class="address">4å·æå°</view> <view class="time"> <u-icon class="mr6" name="clock" color="#4d98a8"></u-icon> <text>01:02:02</text> </view> </view> </view> </view> <view class="item active"> <view class="status padding">ä½ä¸ä¸</view> <view class="me">æ</view> <image class="avatar" src="@/static/driver/ic_truck@2x.png" mode="" ></image> <view class="content"> <view class="id_card">çA</view> <view class="line"> <view class="address">4å·æå°</view> <view class="time"> <u-icon class="mr6" name="clock" color="#4d98a8"></u-icon> <text>01:02:02</text> </view> </view> </view> </view> </view> </view> <view class="main_app"> <view class="main_name"> <text class="mr12">{{ platformObj.name }}</text> <!-- <u-icon name="arrow-down" color="#777777"></u-icon> --> </view> <!-- --> <view class="main_list"> <view class="item" :class="{ active: item.driverId == driverInfo.memberId }" v-for="item in dataList" :key="item.id"> <view class="status padding" v-if="item.status == 2">æéä¸</view> <view class="status" v-else :class="{ padding: item.status != 5 }">{{ statusMap[item.status] }}</view> <view v-if="item.driverId == driverInfo.memberId" class="me">æ</view> <image v-if="item.driverId == driverInfo.memberId" class="avatar" src="@/static/driver/ic_truck_mine@2x.png" mode=""></image> <image v-else class="avatar" src="@/static/driver/ic_truck@2x.png" mode=""></image> <view class="content"> <view class="id_card" v-if="item.carCodeFront">{{ item.carCodeFront.slice(0, 4) }}**{{ item.carCodeFront.slice(6) }}</view> <view class="line"> <view class="address">{{ item.platformName || 'çå¾ åé æå°' }}</view> <view class="time" v-if="item.status == 5"> <u-icon class="mr6" name="clock" color="#4d98a8"></u-icon> <text>{{item.callDateTemp}}</text> </view> </view> </view> </view> </view> </view> </template> <script> import { driverLineUpDetail } from '@/api'; import { statusMap } from '@/utils/config.js'; import dayjs from 'dayjs'; import duration from 'dayjs/plugin/duration' dayjs.extend(duration) export default { data() { return { } } } data() { return { statusMap, platformId: '', type: '', dataList: [], platformObj: {}, driverInfo: uni.getStorageSync('driverInfo') }; }, onLoad(option) { this.type = option.type; this.platformId = option.platformId; this.getData(option.jobId || ''); }, methods: { getData(jobId) { const { platformId, type } = this; driverLineUpDetail({ mobile: jobId ? '' : uni.getStorageSync('driverInfo').mobile, queryType: jobId ? 1 : 0, jobId: jobId }).then(res => { this.platformGroupList = res.data.platformGroupList; if (res.data && res.data.platformGroupList && res.data.platformGroupList.length > 0) { res.data.platformGroupList.forEach(item => { if (item.id == platformId) { this.platformObj = { ...item }; if (type == 0) { this.dataList = item.signJobList; } else { this.dataList = item.workJobList; } this.circulInitTaskList() setInterval(() => { this.circulInitTaskList() }, 1000) } }); } }); }, circulInitTaskList() { let time = new Date(); this.dataList.forEach(item => { if (item.callDate) { let timeNum = time.getTime() - new Date(item.callDate).getTime(); if (timeNum > 3600000) { item.callDateTemp = dayjs.duration(timeNum).format('HH:mm:ss'); } else { item.callDateTemp = dayjs.duration(timeNum).format('mm:ss'); } } if (item.startDate) { let timeNum = time.getTime() - new Date(item.startDate).getTime(); if (timeNum > 3600000) { item.startDateTemp = dayjs.duration(timeNum).format('HH:mm:ss'); } else { item.startDateTemp = dayjs.duration(timeNum).format('mm:ss'); } } }); this.$forceUpdate(); } } }; </script> <style lang="scss"> page { background-color: #f7f7f7; background-color: #f7f7f7; } .main_app { .main_name { display: flex; justify-content: center; align-items: center; height: 104rpx; font-weight: 600; font-size: 32rpx; color: #111111; background-color: #fff; margin: 0 -30rpx 20rpx; } .main_list { .item { display: flex; align-items: center; position: relative; padding: 30rpx; background-color: #fff; margin-bottom: 20rpx; border-radius: 8rpx; .status { position: absolute; top: 0; right: 0; height: 50rpx; line-height: 50rpx; padding: 0 20rpx; background: $uni-color-primary; color: #fff; font-size: 26rpx; border-radius: 0rpx 8rpx 0rpx 25rpx; } .me { position: absolute; top: 0; left: 0; background: #00ba67; border-radius: 8rpx 0rpx 8rpx 0rpx; height: 42rpx; line-height: 42rpx; width: 64rpx; text-align: center; color: #fff; font-size: 24rpx; z-index: 11; } .padding { background: #e9f5f6; color: $uni-color-primary; } .avatar { width: 84rpx; height: 84rpx; margin-right: 20rpx; } .content { flex: 1; .id_card { font-weight: 600; font-size: 30rpx; color: #111111; } .line { display: flex; justify-content: space-between; align-items: center; font-size: 26rpx; color: #999999; margin-top: 6rpx; .time { display: flex; align-items: center; color: $uni-color-primary; } } } } .active { background: linear-gradient(270deg, #ffffff 0%, #e1f7fe 100%); } } .main_name { display: flex; justify-content: center; align-items: center; height: 104rpx; font-weight: 600; font-size: 32rpx; color: #111111; background-color: #fff; margin: 0 -30rpx 20rpx; } .main_list { .item { display: flex; align-items: center; position: relative; padding: 30rpx; background-color: #fff; margin-bottom: 20rpx; border-radius: 8rpx; .status { position: absolute; top: 0; right: 0; height: 50rpx; line-height: 50rpx; padding: 0 20rpx; background: $uni-color-primary; color: #fff; font-size: 26rpx; border-radius: 0rpx 8rpx 0rpx 25rpx; } .me { position: absolute; top: 0; left: 0; background: #00ba67; border-radius: 8rpx 0rpx 8rpx 0rpx; height: 42rpx; line-height: 42rpx; width: 64rpx; text-align: center; color: #fff; font-size: 24rpx; z-index: 11; } .padding { background: #e9f5f6; color: $uni-color-primary; } .avatar { width: 84rpx; height: 84rpx; margin-right: 20rpx; background-color: #fff; } .content { flex: 1; .id_card { font-weight: 500; font-size: 30rpx; color: #111111; } .line { display: flex; justify-content: space-between; align-items: center; font-size: 26rpx; color: #999999; margin-top: 6rpx; .time { display: flex; align-items: center; color: $uni-color-primary; } } } } .active { background: linear-gradient(270deg, #ffffff 0%, #e1f7fe 100%); } } } </style> h5/pages/driver/register.vue
@@ -102,16 +102,12 @@ ...form }).then(res => { if (res && res.code == 200) { this.showToast('注åæå,请åå¾ç»å½') setTimeout(() => { uni.showToast({ title: '注åæå,请åå¾ç»å½', icon: 'none', duration: 2000 }) }) uni.redirectTo({ url: "/pages/driver/login" }) uni.redirectTo({ url: "/pages/driver/login" }) }, 500) } }) } h5/pages/driver/reservedDetail.vue
@@ -3,7 +3,9 @@ <view class="status_wrap"> <view class="name">{{info.driverName}}çå ¥åé¢çº¦</view> <view class="desc">{{info.carCodeFront}}</view> <view class="status">{{ statusMap[info.status] }}</view> <view class="status" v-if="info.status != 2 && info.status != 3">{{ statusMap[info.status] }}</view> <image v-if="info.status == 2" class="icon" src="../../static/ic_passed@2x.png" mode=""></image> <image v-if="info.status == 3" class="icon" src="../../static/ic_refused@2x.png" mode=""></image> </view> <!-- --> <view class="emyty"></view> @@ -123,8 +125,8 @@ statusMap: { 0: 'å¾ å®¡æ¹', 1: '审æ¹ä¸', 2: '审æ¹éè¿', 3: '审æ¹ä¸éè¿', 2: 'å·²éè¿', 3: 'å·²æç»', 4: '已忶', }, } @@ -348,7 +350,6 @@ .status_wrap { position: relative; padding: 30rpx 0; .name { font-weight: 600; font-size: 32rpx; @@ -372,6 +373,15 @@ background-color: #e9edff; color: $uni-color-primary; } .icon{ width: 120rpx; height: 120rpx; border-radius: 50%; position: absolute; right: 0rpx; top: 20rpx; } } .main_footer { h5/pages/driver/reservedRecord.vue
@@ -10,7 +10,7 @@ > <view class="box_list_item_head"> <text>{{item.driverName}}çå ¥åé¢çº¦</text> <text class="loading">{{ statusMap[item.status] }}</text> <text class="loading" :class="{red: item.status == 3}">{{ statusMap[item.status] }}</text> </view> <view class="box_list_item_nr"> <view class="box_list_item_nr_item"> @@ -53,8 +53,8 @@ statusMap: { 0: 'å¾ å®¡æ¹', 1: '审æ¹ä¸', 2: '审æ¹éè¿', 3: '审æ¹ä¸éè¿', 2: 'å·²éè¿', 3: 'å·²æç»', 4: '已忶', } } h5/pages/driver/taskConfirm.vue
@@ -146,7 +146,7 @@ arriveDate: param.date + ':59' }).then(res =>{ this.showToast('确认æå') uni.navigateBack() this.$goBack() }) }, getDetail(jobId) { h5/pages/driver/taskDetail.vue
@@ -11,10 +11,7 @@ <view class="name" v-if="param.status == 5">æå°ä½ä¸ä¸</view> <view class="name" v-if="param.status == 6">ä½ä¸å·²å®æ</view> <view class="id_card">{{ param.carCodeFront }}</view> <view class="status" v-if="param.status == 1">çå¾ ç¾å°</view> <view class="status" v-if="param.status == 2">çå¾ å«å·</view> <view class="status" v-if="param.status == 5">ä½ä¸ä¸</view> <view class="status" v-if="param.status == 6">ä½ä¸å®æ</view> <view class="status">{{statusMap[param.status]}}</view> </view> <!-- --> <view class="main_content"> @@ -26,7 +23,7 @@ <view class="label">ææºå·</view> <view class="value">{{param.drivierPhone}}</view> </view> <template v-if="param.type == 4"> <template v-if="param.type != 4"> <view class="line"> <view class="label">è¿è¾åå·</view> <view class="value" @click="showDetail = true"> @@ -68,11 +65,19 @@ </view> </view> </view> <view class="line" v-if="param.status == 2"> <view class="line" v-if="param.signDate"> <view class="label">ç¾å°æ¶é´</view> <view class="value">{{param.signDate}}</view> </view> <view class="warnning"> <view class="line" v-if="param.startDate"> <view class="label">å¼å§ä½ä¸</view> <view class="value">{{param.startDate}}</view> </view> <view class="line" v-if="param.doneDate"> <view class="label">ä½ä¸å®æ</view> <view class="value">{{param.doneDate}}</view> </view> <view v-if="param.status == 1" class="warnning"> <u-icon name="info-circle" color="#ED4545" class="mr12"></u-icon> 妿 æ³è·åå®ä½ï¼è¯·ç¨å¾®ä¿¡æ«æååºå¤§å±äºç»´ </view> @@ -173,10 +178,12 @@ <script> import { driverTaskJobDetail, driverSignInTask } from '@/api'; import { statusMap } from '@/utils/config.js'; import dayjs from 'dayjs'; export default { data() { return { statusMap, param: { status: '0' }, h5/pages/staff/task/driver.vue
@@ -3,7 +3,9 @@ <view class="status_wrap"> <view class="name">{{info.driverName}}çå ¥åé¢çº¦</view> <view class="desc">{{info.carCodeFront}}</view> <view class="status">{{ statusMap[info.status] }}</view> <view class="status" v-if="info.status != 2 && info.status != 3">{{ statusMap[info.status] }}</view> <image v-if="info.status == 2" class="icon" src="@/static/ic_passed@2x.png" mode=""></image> <image v-if="info.status == 3" class="icon" src="@/static/ic_refused@2x.png" mode=""></image> </view> <!-- --> <view class="emyty"></view> @@ -147,8 +149,8 @@ statusMap: { 0: 'å¾ å®¡æ¹', 1: '审æ¹ä¸', 2: '审æ¹éè¿', 3: '审æ¹ä¸éè¿', 2: 'å·²éè¿', 3: 'å·²æç»', 4: '已忶', }, } @@ -387,6 +389,15 @@ background-color: #e9edff; color: $uni-color-primary; } .icon{ width: 120rpx; height: 120rpx; border-radius: 50%; position: absolute; right: 0rpx; top: 20rpx; } } .main_footer { h5/pages/staff/task/index.vue
@@ -542,6 +542,7 @@ .info { font-size: 26rpx; font-weight: 400; width: 110rpx; } } .box_list_item_nr { h5/static/driver/ic_truck_mine@2x.png
h5/utils/config.js
@@ -2,3 +2,18 @@ export const baseUrl = 'admin_interface/' export const uploadAvatar = `${baseUrl}visitsAdmin/cloudService/web/public/uploadFtp.do` export const uploadUrl = `${baseUrl}visitsAdmin/cloudService/public/uploadBatch` export const statusMap = { 0: 'å¾ ç¡®è®¤', 1: 'çå¾ ç¾å°', 2: 'çå¾ å«å·', // çå¾ å«å· 3: 'å ¥åçå¾ ', 4: 'æå°çå¾ ', //å·²å«å· 5: 'ä½ä¸ä¸', 6: 'ä½ä¸å®æ', 7: '转移ä¸', 8: 'å¼å¸¸æèµ·', 9: 'å·²ææç¦»å', 10: '已离å', 11: 'å·²è¿å·', } pda/App.vue
@@ -1,17 +1,17 @@ <script> export default { onLaunch: function () { console.log('App Launch') }, onShow: function () { console.log('App Show') }, onHide: function () { console.log('App Hide') } } </script> <script> export default { onLaunch: function () { console.log('App Launch') }, onShow: function () { console.log('App Show') }, onHide: function () { console.log('App Hide') } } </script> <style lang="scss"> /*æ¯ä¸ªé¡µé¢å ¬å ±css */ @import "uview-ui/index.scss"; @@ -21,7 +21,18 @@ justify-content: space-between; align-items: center; } .empty_wrap{ padding-top: 280rpx; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #999999; image{ width: 220rpx; height: 238rpx; } } .container { height: 100%; width: 100%; @@ -125,7 +136,7 @@ font-size: 28rpx; } .red{ color: red; color: red !important ; } //设置åè§ @@ -235,5 +246,5 @@ } .mr6 { margin-right: 6rpx; } </style> } </style> pda/api/index.js
@@ -70,6 +70,22 @@ data }) } // å«å·å表 export const platformCallList = (data) => { return http({ url: 'visitsAdmin/cloudService/web/pdaPlatform/platformCallList', method: 'post', data }) } // å ¥åå«å· export const platformInPark = (data) => { return http({ url: 'visitsAdmin/cloudService/web/pdaPlatform/platformInPark', method: 'post', data }) } // æå°å«å· export const platformCallNumber = (data) => { return http({ pda/manifest.json
@@ -19,7 +19,7 @@ "/admin_interface" : { // è¿ä¸ªå段åéä¸ä½ é ç½®çbasePrefixUrlä¸è´ï¼ç³»ç»è¯å«å°å¸¦æ/dev-api请æ±çå°åæ¶ï¼ä¼å¨å颿¼æ¥ä¸ä»£çæå¡å¨å°å // "target" : "http://192.168.0.173/admin_interface", // 代çæå¡å¨ååæIPå°å "target" : "http://192.168.0.136:10010", // 代çæå¡å¨ååæIPå°å "target" : "http://192.168.0.139:10010", // 代çæå¡å¨ååæIPå°å "changeOrigin" : true, // å 许跨å "pathRewrite" : { "^/admin_interface" : "" // éåå°åï¼å¦æå®é æ¥å£ä¸æ¯ä¸å¸¦/dev-apiï¼éè¦å°è¿ä¸ªåç¼ç½®ç©ºï¼å 为è¿ä¸ªåç¼åªæ¯ä¸ºäºè¯å«ç¨ï¼è¯å«å®ä¹å就没ç¨äº pda/package-lock.json
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,11 @@ { "requires": true, "lockfileVersion": 1, "dependencies": { "dayjs": { "version": "1.11.13", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==" } } } pda/pages.json
@@ -47,9 +47,9 @@ } ], "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTextStyle": "white", "navigationBarTitleText": "", "navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#4d99a9", "backgroundColor": "#ffffff" }, "uniIdRouter": {} pda/pages/index/center.vue
@@ -2,7 +2,8 @@ <view class="main_app"> <view class="main_content"> <view class="title" @click="showPlatformgroup = true" >{{ activePlatformGroup.name }}<u-icon >{{ activePlatformGroup.name }}<u-icon name="arrow-down" size="20" class="ml12" @@ -12,10 +13,10 @@ <view class="platform_list"> <view class="item" :class="{ active: item.id === activePlatformId }" :class="{ active: item.id === activePlatform.id }" v-for="(item, index) in activePlatformGroup.platformList" :key="index" @click="platformClick(item.id)" @click="platformClick(item)" >{{ item.name }}</view > </view> @@ -35,43 +36,92 @@ </view> </view> <!-- --> <view v-if="true" class="platform_ing"> <view class="head"> <view class="code"> <text>ç</text> <text>AD1212</text> <view style="padding-bottom: 140rpx"> <view v-for="item in platformTaskInfo.platformJobList" :key="item.id" class="platform_ing" > <view class="head"> <view class="code"> <text>{{ item.carCodeFront.slice(0, 1) }}</text> <text>{{ item.carCodeFront.slice(1, 2) }}</text> <text>·</text> <text>{{ item.carCodeFront.slice(2) }}</text> </view> <view class="status" v-if="item.status != 4 && item.status != 5" :class="{ red: item.status == 8 }" >{{ statusMap[item.status] }}</view > <view class="status" v-if="item.status == 4" >å«å·ä¸ {{ item.callDateTemp }}</view > <view class="status scs" v-if="item.status == 5" >å·²ä½ä¸ {{ item.startDateTemp }}</view > </view> <view class="status">å«å·ä¸</view> <view class="line" v-if="item.type == 4"> <text class="label">åååå·</text> <text class="value">{{ item.contractNum }}</text> </view> <view class="line" v-else> <text class="label">è¿è¾åå·</text> <text class="value">{{ item.code }}</text> <text class="primaryColor" @click="handleDetail()">è¿å详æ </text> </view> <view class="line"> <text class="label">驾驶å</text> <text class="value" >{{ item.driverName }} {{ item.drivierPhone }}</text > </view> <view class="line"> <text class="label">æ»è¿è¾é</text> <text class="value">{{ item.totalNum }}䏿¯</text> </view> <view class="line" v-if="item.type != 4"> <text class="label">è¿è¾å ¬å¸</text> <text class="value">{{ item.carrierName }}</text> </view> <view class="btns"> <view v-if="item.status == 4" class="btn" @click="handlePass(item)" >è¿å·</view > <view v-if="item.status == 4" class="btn active" @click="handleWork(item)" >å¼å§ä½ä¸</view > <view v-if="item.status == 5" class="btn" @click="handleErr(item)" >å¼å¸¸æèµ·</view > <view v-if="item.status == 5 || item.status == 8" class="btn" @click="handleTransform(item)" >转移æå°</view > <view v-if="item.status == 5 || item.status == 8" class="btn active" @click="handleFinish(item)" >宿ä½ä¸</view > </view> </view> <view class="line"> <text class="label">è¿è¾åå·</text> <text class="value">11111</text> <text class="primaryColor" @click="handleDetail()">è¿å详æ </text> </view> <view class="line"> <text class="label">æ»è¿è¾é</text> <text class="value">11111</text> </view> <view class="line"> <text class="label">驾驶å</text> <text class="value">11111</text> </view> <view class="btns"> <view class="btn">è¿å·</view> <view class="btn" @click="handleTransform">转移æå°</view> <view class="btn active">å¼å§ä½ä¸</view> <view v-if="!platformTaskInfo.platformJobList || platformTaskInfo.platformJobList.length == 0" class="empty_wrap"> <image src="@/static/default_nodata@2x.png" /> <text>ææ ä½ä¸è½¦è¾</text> </view> </view> <image v-if="true" class="empty" src="@/static/default_nodata@2x.png" mode="widthFix" ></image> <!-- --> <view class="main_footer"> <view class="btn">å ¥åå«å·</view> <view class="btn active" @click="PlatformCallClick">æå°å«å·</view> <view class="btn" @click="PlatformCallClick(1)">å ¥åå«å·</view> <view class="btn active" @click="PlatformCallClick(2)">æå°å«å·</view> </view> <!-- å«å· --> <u-popup @@ -81,45 +131,69 @@ round="10" @close="showPlatformCall = false" > <view class="PlatformCallModal"> <view class="title">æå°å«å·(1å·æå°)</view> <view class="PlatformCallModal" :style="{ height: 'calc(100vh - ' + windowTop + 'px)' }" > <view class="title" v-if="callType == 2" >æå°å«å·({{ activePlatform.name }})</view > <view class="title" v-else>å ¥åå«å·</view> <view class="input_wrap"> <u-icon name="search" class="mr12" size="19" color="#999999" /> <input v-model="platformCallSearch" type="text" placeholder="æç´¢è½¦è¾çç §" placeholder-class="placeholder9" @confirm="callQuery" /> </view> <view class="order_list"> <scroll-view scroll-y="true" class="scroll_view"> <view class="platform_ing" v-for="i in 8"> <scroll-view scroll-y="true" @scrolltolower="callScrolltolower" class="scroll_view"> <view class="platform_ing" v-for="item in platformCallList" :key="item.id" > <view class="head"> <view class="code"> <text>ç</text> <text>AD1212</text> <view v-if="item.carCodeFront" class="code"> <text>{{ item.carCodeFront.slice(0, 1) }}</text> <text>{{ item.carCodeFront.slice(1, 2) }}</text> <text>·</text> <text>{{ item.carCodeFront.slice(2) }}</text> </view> <view class="status">å«å·ä¸</view> <view class="status" :class="{ scs: item.status == 4 }">{{ statusMap[item.status] }}</view> </view> <view class="line"> <view class="line" v-if="item.type == 4"> <text class="label">åååå·</text> <text class="value">{{ item.contractNum }}</text> </view> <view class="line" v-else> <text class="label">è¿è¾åå·</text> <text class="value">11111</text> <text class="primaryColor">è¿å详æ </text> <text class="value">{{ item.code }}</text> <text class="primaryColor" @click="handleDetail()" >è¿å详æ </text > </view> <view class="line"> <text class="label">驾驶å</text> <text class="value">11111</text> <text class="value" >{{ item.driverName }} {{ item.drivierPhone }}</text > </view> <view class="line"> <text class="label">æ»è¿è¾é</text> <text class="value">11111</text> <text class="value">{{ item.totalNum }}䏿¯</text> </view> <view class="line"> <view class="line" v-if="item.type != 4"> <text class="label">è¿è¾å ¬å¸</text> <text class="value">11111</text> <text class="value">{{ item.carrierName }}</text> </view> <view class="btns"> <view class="btn active">å«å·</view> <view class="btn active" @click="handleCall(item)">å«å·</view> </view> </view> </scroll-view> @@ -134,7 +208,10 @@ round="10" @close="showDetail = false" > <view class="PlatformCallModal"> <view class="PlatformCallModal" :style="{ height: 'calc(100vh - ' + windowTop + 'px)' }" > <view class="title">è¿å详æ </view> <view class="platform_ing" style="padding: 0"> <view class="head"> @@ -194,88 +271,265 @@ round="10" @close="showTransform = false" > <view class="PlatformCallModal TransformModal"> <view class="TransformModal"> <view class="title">转移æå°</view> <view class="transform_list"> <view class="line" v-for="item,index in 9"> <view class="name">1å·æå°</view> <view class="status">(空é²)</view> <image v-if="index == 1" src="@/static/ic_select@2x.png" class="checked" /> <view class="line" @click="transformPlatClick(item)" v-for="item in activePlatformGroup.platformList" :key="item.id" > <view class="name">{{ item.name }}</view> <view class="status" :class="{ green: item.workStatus == 1 }" >({{ item.workStatus == 0 ? "空é²" : "ä½ä¸ä¸" }})</view > <image v-if="transformPlatId == item.id" src="@/static/ic_select@2x.png" class="checked" /> </view> </view> <view class="btns"> <view class="btn" @click="showTransform = false">åæ¶</view> <view class="btn active">ç¡®å®</view> <view class="btn" @click="transformCancel">åæ¶</view> <view class="btn active" @click="transformSub">ç¡®å®</view> </view> </view> </u-popup> <!-- --> <u-picker :show="showPlatformgroup" keyName="name" :columns="[platformGroupList]" @cancel="showPlatformgroup = false" @confirm="platConfirm"></u-picker> <!-- --> <u-picker :show="showPlatformgroup" keyName="name" :columns="[platformGroupList]" @cancel="showPlatformgroup = false" @confirm="platConfirm" ></u-picker> </view> </template> <script> import { getPlatformGroupList, getPlatformWorkData } from '@/api' import { getPlatformGroupList, getPlatformWorkData, platformCallList, platformCallNumber, platformInPark, beginWork, finishWork, platformMove, platformErr, platformOverNumber } from '@/api' import { statusMap } from '@/utils/config.js' import dayjs from 'dayjs' import duration from 'dayjs/plugin/duration' dayjs.extend(duration) export default { data() { return { statusMap, windowTop: 44, showPlatformCall: false, // æå°å«å· showDetail: false, showTransform: false, // 转移 showPlatformgroup: false, platformGroupList: [], activePlatformGroup: {}, platformTaskInfo: {}, activePlatformId: '', platformGroupList: [], activePlatformGroup: {}, platformTaskInfo: {}, activePlatform: {}, platformCallList: [],//å«å·å表 platformCallSearch: '', platformCallTotal: 0, platformCallPage: 1, callType: 1, transformPlatId: '', // è½¬ç§»è®°å½æå°id transformId: '', // 转移记å½ä»»å¡id } }, onLoad() { this.getPlatformGroup() this.getPlatformGroup() const res = uni.getWindowInfo() this.windowTop = res.windowTop }, methods: { getPlatformGroup() { getPlatformGroupList({ queryData: 1, queryType: 0 }).then(res => { this.platformGroupList = res.data || [] if(this.platformGroupList.length > 0){ this.activePlatformGroup = this.platformGroupList[0] if(this.activePlatformGroup.platformList && this.activePlatformGroup.platformList.length > 0){ this.activePlatformId = this.activePlatformGroup.platformList[0].id this.getPlatformTask() } } }) }, getPlatformTask() { getPlatformWorkData({platformId: this.activePlatformId}).then(res => { this.platformTaskInfo = res.data }) }, platConfirm(e) { const index = e.indexs[0] this.activePlatformGroup = this.platformGroupList[index] if(this.activePlatformGroup.platformList && this.activePlatformGroup.platformList.length > 0){ this.activePlatformId = this.activePlatformGroup.platformList[0].id this.getPlatformTask() } this.showPlatformgroup =false }, platformClick(id) { this.activePlatformId = id this.getPlatformTask() }, getPlatformGroup() { getPlatformGroupList({ queryData: 1, queryType: 0 }).then(res => { this.platformGroupList = res.data || [] if (this.platformGroupList.length > 0) { this.activePlatformGroup = this.platformGroupList[0] if (this.activePlatformGroup.platformList && this.activePlatformGroup.platformList.length > 0) { this.activePlatform = this.activePlatformGroup.platformList[0] this.getPlatformTask() } } }) }, getPlatformTask() { getPlatformWorkData({ platformId: this.activePlatform.id }).then(res => { this.platformTaskInfo = res.data this.circulInitTaskList() setInterval(() => { this.circulInitTaskList() }, 1000) }) }, circulInitTaskList() { if (this.platformTaskInfo && this.platformTaskInfo.platformJobList && this.platformTaskInfo.platformJobList.length > 0) { let time = new Date() this.platformTaskInfo.platformJobList.forEach(item => { if (item.callDate) { let timeNum = time.getTime() - new Date(item.callDate).getTime() if (timeNum > 3600000) { item.callDateTemp = dayjs.duration(timeNum).format('Hå°æ¶måsç§') } else { item.callDateTemp = dayjs.duration(timeNum).format('måsç§') } } if (item.startDate) { let timeNum = time.getTime() - new Date(item.startDate).getTime() if (timeNum > 3600000) { item.startDateTemp = dayjs.duration(timeNum).format('Hå°æ¶måssç§') } else { item.startDateTemp = dayjs.duration(timeNum).format('måsç§') } } }) this.$forceUpdate() } }, platConfirm(e) { const index = e.indexs[0] this.activePlatformGroup = this.platformGroupList[index] if (this.activePlatformGroup.platformList && this.activePlatformGroup.platformList.length > 0) { this.activePlatform = this.activePlatformGroup.platformList[0] this.getPlatformTask() } this.showPlatformgroup = false }, platformClick(item) { this.activePlatform = item this.getPlatformTask() }, handleDetail() { this.showDetail = true }, PlatformCallClick() { this.showPlatformCall = true handleFinish(item) { finishWork({ jobId: item.id }).then(res => { this.showToast('宿ä½ä¸') this.getPlatformTask() }) }, handleTransform() { handleWork(item) { // å¼å§ä½ä¸ beginWork({ jobId: item.id }).then(res => { this.showToast('å·²å¼å§ä½ä¸') this.getPlatformTask() }) }, handlePass(item) { uni.showModal({ content: 'æ¨ç¡®è®¤è¦å¯¹è¯¥ä»»å¡è¿è¡è¿å·å', success: (res) => { if (res.confirm) { platformOverNumber({ jobId: item.id, platformId: this.activePlatform.id }).then(res => { this.showToast('è¿å·æå') this.getPlatformTask() }) } } }) }, handleCall(item) { const { callType, activePlatform } = this this.platformCallList = [] this.platformCallPage = 1 if (callType == 1) { // å ¥åå«å· platformInPark({ jobId: item.id }).then(res => { this.showToast('å«å·æå') this.getPlatformCallList() }) } else { // æå°å«å· platformCallNumber({ platformId: activePlatform.id, jobId: item.id }).then(res => { this.showToast('å«å·æå') this.getPlatformCallList() this.getPlatformTask() }) } }, PlatformCallClick(callType) { this.callType = callType this.showPlatformCall = true this.platformCallList = [] this.platformCallPage = 1 this.platformCallSearch = '' this.getPlatformCallList() }, callQuery() { this.platformCallList = [] this.platformCallPage = 1 this.getPlatformCallList() }, callScrolltolower() { const { platformCallTotal, platformCallList } = this if(platformCallTotal > platformCallList.length){ this.getPlatformCallList() } }, getPlatformCallList() { const { platformCallPage, callType, activePlatform, platformCallSearch } = this platformCallList({ model: { callType, platformId: activePlatform.id, carCodeFront: platformCallSearch }, capacity: 10, page: platformCallPage }).then(res => { if (res.data && res.data.records) { this.platformCallList = [ ...this.platformCallList, ...res.data.records] this.platformCallTotal = res.data.total } }) }, transformPlatClick(item) { this.transformPlatId = item.id }, transformCancel() { this.transformPlatId = '' this.showTransform = false }, transformSub() { const { transformPlatId, transformId } = this platformMove({ platformId: transformPlatId, jobId: transformId }).then(res => { this.showToast('转移æå°æå') this.transformCancel() this.getPlatformTask() }) }, handleTransform(item) { let { activePlatform } = this this.transformId = item.id this.transformPlatId = activePlatform.id this.showTransform = true }, handleErr(item) { uni.showModal({ content: 'æ¨ç¡®è®¤è¦å¯¹è¯¥ä»»å¡è¿è¡å¼å¸¸æèµ·å', success: (res) => { if (res.confirm) { platformErr({ jobId: item.id }).then(ress => { this.showToast('å¼å¸¸æèµ·æå') this.getPlatformTask() }) } } }) } } } </script> @@ -366,15 +620,24 @@ border-radius: 8rpx; border: 1rpx solid #dfdede; text { padding: 0 12rpx; &:nth-of-type(1) { background: #e9f5f6; padding: 0 12rpx; } &:nth-of-type(2) { padding-left: 4rpx; } &:nth-of-type(4) { padding-right: 6rpx; } } } .status { font-size: 30rpx; color: $uni-color-primary; } .scs { color: #00ba67; } } .line { @@ -442,7 +705,7 @@ } } .PlatformCallModal { height: calc(100vh - 50px); height: calc(100vh - 44px); padding: 30rpx; .title { text-align: center; @@ -458,7 +721,7 @@ padding: 0 30rpx; } .order_list { height: calc(100% - 120rpx); height: calc(100% - 140rpx); .scroll_view { height: 100%; } @@ -508,8 +771,62 @@ } } } .btns { display: flex; align-items: center; justify-content: space-between; .btn { width: 336rpx; height: 88rpx; border-radius: 44rpx; border: 1rpx solid $uni-color-primary; color: $uni-color-primary; font-size: 32rpx; display: flex; justify-content: center; align-items: center; } .active { color: #fff; background-color: $uni-color-primary; } } } .TransformModal { height: 900rpx; padding: 30rpx; position: relative; .title { text-align: center; margin: 0 0 30rpx; } .btns { display: flex; align-items: center; justify-content: space-between; position: absolute; z-index: 999; left: 30rpx; bottom: 30rpx; .btn { width: 336rpx; height: 88rpx; border-radius: 44rpx; border: 1rpx solid $uni-color-primary; color: $uni-color-primary; font-size: 32rpx; display: flex; justify-content: center; align-items: center; } .active { color: #fff; margin-left: 18rpx; background-color: $uni-color-primary; } } .transform_list { height: 760rpx; height: 660rpx; margin-bottom: 30rpx; overflow: auto; .line { @@ -528,34 +845,14 @@ color: $uni-color-primary; margin-left: 12rpx; } .green { color: #00ba67; } .checked { width: 40rpx; height: 40rpx; } } } .btns { display: flex; align-items: center; justify-content: space-between; .btn { width: 336rpx; height: 88rpx; border-radius: 44rpx; border: 1rpx solid $uni-color-primary; color: $uni-color-primary; font-size: 32rpx; display: flex; justify-content: center; align-items: center; } .active{ color: #fff; background-color: $uni-color-primary; } } } .TransformModal{ height: 1000rpx; } </style> pda/pages/index/queueup.vue
@@ -1,8 +1,9 @@ <template> <view class="main_app"> <view class="main_content"> <view class="title" >宿³°ç©æµè£ è´§å¹³å°<u-icon <view class="title" @click="showPlatformgroup = true" >{{ platformGroup.name }}<u-icon name="arrow-down" size="20" class="ml12" @@ -12,81 +13,135 @@ <view class="input_wrap"> <u-icon name="search" class="mr12" size="19" color="#999999" /> <input v-model="carCodeFront" type="text" placeholder="æç´¢è½¦è¾çç §" placeholder-class="placeholder9" @confirm="handleQuery" /> </view> <view class="count" >å·²ç¾å°è½¦è¾ï¼<text>{{ 10 }}</text></view >å·²ç¾å°è½¦è¾ï¼<text>{{ total }}</text></view > </view> <!-- --> <div class="dataList"> <div class="item"> <view class="dataList"> <view class="item" v-for="item in platformLineUpList" :key="item.id"> <view class="head"> <view class="code"> <text>ç</text> <text>AD1212</text> <view v-if="item.carCodeFront" class="code"> <text>{{ item.carCodeFront.slice(0, 1) }}</text> <text>{{ item.carCodeFront.slice(1, 2) }}</text> <text>·</text> <text>{{ item.carCodeFront.slice(2) }}</text> </view> <view class="status">ç¾å°æ¶é´ï¼{{ 11 }}</view> <view class="status" v-if="item.signDate" >ç¾å°æ¶é´ï¼{{ item.signDate.slice(11, 16) }}</view > </view> <view class="line"> <view class="line" v-if="item.type == 4"> <text class="label">åååå·</text> <text class="value">{{ item.contractNum }}</text> </view> <view class="line" v-else> <text class="label">è¿è¾åå·</text> <text class="value">11111</text> <text class="value">{{ item.code }}</text> <text class="primaryColor" @click="handleDetail()">è¿å详æ </text> </view> <view class="line"> <text class="label">驾驶å</text> <text class="value">11111</text> <text class="value" >{{ item.driverName }} {{ item.drivierPhone }}</text > </view> <view class="line"> <text class="label">æ»è¿è¾é</text> <text class="value">11111</text> <text class="value">{{ item.totalNum }}䏿¯</text> </view> <view class="line"> <view class="line" v-if="item.type != 4"> <text class="label">è¿è¾å ¬å¸</text> <text class="value">11111</text> <text class="value">{{ item.carrierName }}</text> </view> <view class="btns"> <!-- <view class="btns"> <view class="btn active">å ¥å</view> </view> </div> </div> </view> --> </view> <view v-if="platformLineUpList.length == 0" class="empty_wrap"> <image src="@/static/default_nodata@2x.png" /> <text>ææ ä½ä¸è½¦è¾</text> </view> </view> <u-picker :show="showPlatformgroup" keyName="name" :columns="[platformGroupList]" @cancel="showPlatformgroup = false" @confirm="platConfirm" ></u-picker> </view> </template> <script> import { platformLineUpPage, getPlatformGroupList } from '@/api' import { platformLineUpPage, getPlatformGroupList } from '@/api' export default { data() { return { showDetail: false, capacity: 10, page: 1, platformGroupId: '', platformGroupList: [] showPlatformgroup: false, capacity: 10, page: 1, total: 0, carCodeFront: '', platformGroup: {}, platformGroupList: [], platformLineUpList: [] } }, onLoad() { this.getPlatformGroup() this.initData() this.getPlatformGroup() }, onReachBottom() { if(this.total > this.platformLineUpList.length){ this.getList() } }, methods: { handleDetail() { this.showDetail = true }, getPlatformGroup() { getPlatformGroupList().then(res => { }) }, initData(){ const { page, capacity } = this platformLineUpPage({ capacity, page, model: {} }) } getPlatformGroup() { getPlatformGroupList({ queryData: 1, queryType: 0 }).then(res => { this.platformGroupList = res.data || [] if (this.platformGroupList && this.platformGroupList.length > 0) { this.platformGroup = this.platformGroupList[0] this.getList() } }) }, getList() { const { page, capacity, platformGroup, carCodeFront } = this platformLineUpPage({ capacity, page, model: { platformGroupId: platformGroup.id, callType: 2, carCodeFront } }).then(res => { if (res.data) { this.platformLineUpList = [...this.platformLineUpList, ...res.data.records || []] this.total = res.data.total || 0 } }) }, handleQuery() { this.page = 1 this.platformLineUpList = [] this.getList() }, platConfirm(e) { const index = e.indexs[0] this.platformGroup = this.platformGroupList[index] this.getList() this.showPlatformgroup = false }, } } </script> @@ -152,9 +207,15 @@ border-radius: 8rpx; border: 1rpx solid #dfdede; text { padding: 0 12rpx; &:nth-of-type(1) { background: #e9f5f6; padding: 0 12rpx; } &:nth-of-type(2) { padding-left: 4rpx; } &:nth-of-type(4) { padding-right: 6rpx; } } } pda/static/default_nodata@2x.pngpda/utils/config.js
@@ -2,3 +2,18 @@ export const baseUrl = 'admin_interface/' export const uploadAvatar = `${baseUrl}visitsAdmin/cloudService/web/public/uploadFtp.do` export const uploadUrl = `${baseUrl}visitsAdmin/cloudService/public/uploadBatch` export const statusMap = { 0: 'å¾ ç¡®è®¤', 1: 'å¾ ç¾å°', 2: 'çå¾ å«å·', 3: 'å ¥åçå¾ ', 4: 'æå°çå¾ ', //å·²å«å· 5: 'ä½ä¸ä¸', 6: 'ä½ä¸å®æ', 7: '转移ä¸', 8: 'å¼å¸¸æèµ·', 9: 'å·²ææç¦»å', 10: '已离å', 11: 'å·²è¿å·', }