ll
liukangdong
2024-08-29 1382a7990e9b13f60c6416ada5477673a934dd16
ll
已修改22个文件
973 ■■■■ 文件已修改
admin/.env.development 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/platform/index.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/App.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/api/driver.js 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/main.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/driver/index.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/driver/queueUp.vue 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/driver/reserved.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/driver/taskConfirm.vue 133 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/driver/taskDetail.vue 120 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/utils/service.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pda/App.vue 166 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pda/api/index.js 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pda/main.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pda/manifest.json 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pda/pages/index/center.vue 67 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pda/pages/index/control.vue 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pda/pages/index/login.vue 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pda/pages/index/queueup.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pda/pages/index/set.vue 95 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pda/utils/service.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/.env.development
@@ -2,4 +2,4 @@
NODE_ENV = 'development'
VUE_APP_API_URL  = 'http://localhost:10010'
#VUE_APP_API_URL  = 'http://192.168.0.173/admin_interface'
VUE_APP_API_URL  = 'http://192.168.0.136:10010'
admin/src/api/platform/index.js
@@ -1,10 +1,8 @@
import request from '@/utils/request'
// 月台列表
export function getPlatform (data) {
  return request.post('/visitsAdmin/cloudService/business/platform/page', data, {
    trim: true
  })
export function getPlatformGroupList (data) {
  return request.post('/visitsAdmin/cloudService/business/platformGroup/getPlatformGroupList', data)
}
// 月台列表 编辑
export function PlatformEdit (data) {
h5/App.vue
@@ -125,6 +125,9 @@
  color: #999999 !important;
  font-size: 28rpx;
}
.red{
    color: red;
}
//设置圆角
checkbox .uni-checkbox-input {
@@ -225,6 +228,9 @@
.ml12 {
  margin-left: 12rpx;
}
.ml6 {
  margin-left: 6rpx;
}
.mt6 {
  margin-top: 6rpx;
}
h5/api/driver.js
@@ -97,3 +97,19 @@
    data
  })
}
// 任务确认
export const driverConfirmTask = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/web/driverPlatform/confirmTask',
    method: 'post',
    data
  })
}
// 任务签到
export const driverSignInTask = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/web/driverPlatform/signIn',
    method: 'post',
    data
  })
}
h5/main.js
@@ -18,11 +18,13 @@
Vue.prototype.$jump = (url) => {uni.navigateTo({url})}
Vue.prototype.$goBack = () => { uni.navigateBack() }
Vue.prototype.showToast = (str) => {
    setTimeout(() => {
    uni.showToast({
      title: str,
      icon: 'none',
      duration: 2000
    })
    })
}
Vue.prototype.$eventBus = new Vue()
Vue.prototype.$onWait = new Promise((resolve) => {
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.135:10010", // 代理服务器域名或IP地址
                    "target" : "http://192.168.0.136:10010", // 代理服务器域名或IP地址
                    "changeOrigin" : true, // 允许跨域 
                    "pathRewrite" : {
                        "^/admin_interface" : "" // 重写地址,如果实际接口中是不带/dev-api,需要将这个前缀置空,因为这个前缀只是为了识别用,识别完之后就没用了
h5/pages/driver/index.vue
@@ -43,7 +43,7 @@
                                <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="handleQueup(item)">查看排队</view>
                                <view v-if="item.status == 2" class="sub_btn" @click="handleQueue(item)">查看排队</view>
                            </view>
                        </view>
                    </view>
@@ -110,13 +110,18 @@
                url: '/pages/driver/taskDetail?id=' + item.id
            });
        },
        handleQueup(item) {},
        handleQueue(item) {
            uni.navigateTo({
                url:'/pages/driver/queueUp?jobId=' + item.id
            })
        },
        initData() {
            driverHomeData().then(res => {
                if (res.code == 200) {
                    uni.setStorageSync('driverGuide', {
                        bookingTips: res.data.bookingTips,
                        reservationMap: res.data.reservationMap
                        reservationMap: res.data.reservationMap,
                        signDistance: res.data.signDistance
                    });
                    this.taskList = res.data.platformJobList || []
                }
@@ -129,14 +134,9 @@
                url: '/pages/driver/login'
            });
        },
        handleTask(status) {
            if (status == 1) {
                return uni.navigateTo({
                    url: '/pages/driver/taskDetail'
                });
            }
        handleTask(item) {
            uni.navigateTo({
                url: '/pages/driver/taskConfirm'
                url: '/pages/driver/taskConfirm?id=' + item.id
            });
        }
    }
h5/pages/driver/queueUp.vue
@@ -1,7 +1,9 @@
<template>
  <view class="main_app">
    <view class="main_name">
      <text class="mr12">物流入库月台</text>
      <text class="mr12" @click="showPlat = true">{{
        activePlatform.name
      }}</text>
      <u-icon name="arrow-down" color="#777777"></u-icon>
    </view>
    <!--  -->
@@ -9,7 +11,9 @@
      <view class="item" @click="handleCheck()">
        <view class="h1">作业中车辆</view>
        <view class="h2">
          <text>4</text>
          <text v-if="activePlatform.signJobList">{{
            activePlatform.signJobList.length
          }}</text>
          <text class="unit">辆</text>
        </view>
        <image
@@ -19,9 +23,11 @@
        ></image>
      </view>
      <view class="item cyan">
        <view class="h1">作业中车辆</view>
        <view class="h1">已签到车辆</view>
        <view class="h2">
          <text>4</text>
          <text v-if="activePlatform.workJobList">{{
            activePlatform.workJobList.length
          }}</text>
          <text class="unit">辆</text>
        </view>
        <image
@@ -31,6 +37,14 @@
        ></image>
      </view>
    </view>
    <u-picker
      :show="showPlat"
      keyName="name"
      :columns="[platformGroupList]"
      @cancel="showPlat = false"
      @confirm="platConfirm"
    ></u-picker>
  </view>
</template>
@@ -39,19 +53,32 @@
export default {
  data() {
    return {
      activePlatform: {},
      platformGroupList: [],
      showPlat: false
    }
  },
    onLoad() {
        this.getData()
  onLoad(option) {
    this.getData(option.jobId || '')
    },
  methods: {
        getData() {
    getData(jobId) {
            driverLineUpDetail({
                  mobile: uni.getStorageSync('driverInfo').mobile,
                  queryType: 0
        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) {
          this.activePlatform = res.data.platformGroupList[0]
        }
            })
        },
    platConfirm(e) {
      const index = e.indexs[0]
      this.activePlatform = this.platformGroupList[index]
      this.showPlat = false
    },
    handleCheck() {
      uni.navigateTo({
        url: "/pages/driver/queueUpRecord"
h5/pages/driver/reserved.vue
@@ -211,12 +211,14 @@
            this.$forceUpdate();
            this.closeInput();
        },
        closeInput() {
            this.$refs.keyboard.close();
        },
        copy(){
            if(this.param.carCodeFront){
                this.$set(this.param, 'carCodeBack', this.param.carCodeFront)
                this.showToast('复制成功');
            }
        },
        handleUpload() {
            let token = uni.getStorageSync('token') || ''
@@ -260,9 +262,6 @@
              }
            })
        },
        closeInput() {
            this.$refs.keyboard.close();
        }
    }
};
</script>
h5/pages/driver/taskConfirm.vue
@@ -1,75 +1,62 @@
<template>
  <view class="main_app">
    <view class="status_wrap">
      <image
        class="bg"
        src="../../static/driver/bg_renwu@2x.png"
        mode=""
      ></image>
      <view class="name">作业已完成</view>
      <view class="id_card">皖AD1212</view>
      <view class="status">作业完成</view>
            <image class="bg" src="../../static/driver/bg_renwu@2x.png" mode=""></image>
            <view class="name">请确认任务</view>
            <view class="id_card">{{ param.carCodeFront }}</view>
            <view class="status">任务待确认</view>
    </view>
    <!--  -->
    <view class="main_content">
      <view class="line">
        <view class="label">司机姓名</view>
        <view class="value">刘某</view>
                <view class="value">{{ param.driverName }}</view>
      </view>
      <view class="line">
        <view class="label">手机号</view>
        <view class="value">188</view>
                <view class="value">{{ param.drivierPhone }}</view>
      </view>
      <view class="line">
        <view class="label">运输单号</view>
        <view class="value" @click="showDetail = true">
          <text class="waybill_num">Y111</text>
                    <text class="waybill_num">{{ param.contractNum }}</text>
          <text class="btn">运单详情</text>
        </view>
      </view>
      <view class="line">
        <view class="label">作业类型</view>
        <view class="value">入园装货</view>
                <view class="value">{{ param.inType == 0 ? '整托盘' : '件烟' }}</view>
      </view>
      <view class="empty"></view>
      <!--  -->
      <view class="line">
        <view class="label">车前牌照号</view>
        <view class="value" @click="openInput(1)">
          <text :style="{ color: param.carNos ? '#000000' : '#999999' }">{{
            param.carNos ? param.carNos : "请输入车前牌照号"
          }}</text>
                <view class="label">到场日期<text class="red ml6">*</text></view>
                <view class="value" @click="showDate = true">
                    <view :class="param.date ? '' : 'placeholder9'">{{ param.date ? param.date : '请选择' }}</view>
                    <u-icon color="#999999" name="arrow-right"></u-icon>
        </view>
      </view>
      <view class="line">
        <view class="label">车后牌照号</view>
                <view class="label">车前牌照号</view>
                <view class="value" @click="openInput(1)">
                    <text :style="{ color: param.carCodeFront ? '#000000' : '#999999' }">{{ param.carCodeFront ? param.carCodeFront : '请输入车前牌照号' }}</text>
                </view>
            </view>
            <view class="line">
                <view class="label">车后牌照号<text class="red ml6">*</text></view>
        <view class="value">
          <text
            @click="openInput(1)"
            :style="{ color: param.carNos ? '#000000' : '#999999' }"
            >{{ param.carNos ? param.carNos : "请输入车后牌照号" }}</text
          >
          <text class="copy">复制车前牌照号</text>
                    <text @click="openInput(2)" :style="{ color: param.carCodeBack ? '#000000' : '#999999' }">{{ param.carCodeBack ? param.carCodeBack : '请输入车后牌照号' }}</text>
                    <text class="copy" @click="copy">复制车前牌照号</text>
        </view>
      </view>
      <!--  -->
    </view>
    <view class="space"></view>
    <!-- 等待叫号 -->
    <view class="sub_wrap">
      <view class="btn check">确认任务</view>
    </view>
        <view class="sub_wrap"><view class="btn check" @click="onSubmit">确认任务</view></view>
    <!-- modal -->
    <u-popup
      :show="showDetail"
      :round="10"
      :safeAreaInsetBottom="true"
      closeOnClickOverlay
      :closeable="true"
      mode="bottom"
      @close="showDetail = false"
    >
        <u-popup :show="showDetail" :round="10" :safeAreaInsetBottom="true" closeOnClickOverlay :closeable="true" mode="bottom" @close="showDetail = false">
      <view class="detail_modal">
        <view class="modal_title">运单详情</view>
        <view class="id_card">
@@ -120,59 +107,85 @@
        </view>
      </view>
    </u-popup>
        <u-datetime-picker :show="showDate" v-model="param.date" :minDate="minDate" @confirm="dateEnter" @cancel="showDate = false" mode="datetime"></u-datetime-picker>
    <keyboardInput ref="keyboard" @export="setPlate" @close="closeInput" />
  </view>
  <!--  -->
</template>
<script>
import keyboardInput from '@/components/keyboard-input/keyboard-input.vue'
import keyboardInput from '@/components/keyboard-input/keyboard-input.vue';
import { driverTaskJobDetail, driverConfirmTask } from '@/api';
import dayjs from 'dayjs'
export default {
  components: {
    keyboardInput
  },
  data() {
    return {
      param: {
        status: '0'
      },
            param: {},
            showDate: false,
      showDetail: false,
            minDate: '',
      inputType: ''
    }
        };
    },
    onLoad(option) {
        this.getDetail(option.id);
        this.minDate = new Date().getTime()
  },
  methods: {
    handleSignIn() {
        onSubmit(){
      const { param } = this
      this.param.status = param.status == '0' ? '1' : '0'
    },
    getLocation() {
      uni.getLocation({
        type: 'wgs84',
        success: function (res) {
          console.log('当前位置的经度:' + res.longitude)
          console.log('当前位置的纬度:' + res.latitude)
        }
            if(!param.date) return this.showToast('请选择到场日期')
            if(!param.carCodeBack) return this.showToast('请输入车后牌照号')
            driverConfirmTask({
                id: param.id,
                carCodeBack: param.carCodeBack,
                arriveDate: param.date + ':59'
            }).then(res =>{
                this.showToast('确认成功')
                uni.navigateBack()
      })
    },
        getDetail(jobId) {
            driverTaskJobDetail({
                jobId
            }).then(ress => {
                this.param = { ...ress.data, carCodeBack: '' };
            });
        },
        dateEnter(e) {
            setTimeout(() => {
                this.$set(this.param, 'date', dayjs(e.value).format('YYYY-MM-DD HH:mm'))
            })
            this.showDate = false
        },
    openInput(type) {
      this.inputType = type
      this.$refs.keyboard.open()
            this.inputType = type;
            this.$refs.keyboard.open();
        },
        copy() {
            if (this.param.carCodeFront) {
                this.$set(this.param, 'carCodeBack', this.param.carCodeFront);
                this.showToast('复制成功');
            }
    },
    setPlate(e) {
      if (this.inputType === 1) {
        this.param.carNos = e
                this.$set(this.param, 'carCodeFront', e);
      } else if (this.inputType === 2) {
        this.param.carNos = e
                this.$set(this.param, 'carCodeBack', e);
      }
      this.$forceUpdate()
      this.closeInput()
            this.$forceUpdate();
            this.closeInput();
    },
    closeInput() {
      this.$refs.keyboard.close()
            this.$refs.keyboard.close();
    }
  }
}
};
</script>
<style lang="scss">
@@ -189,7 +202,7 @@
    padding: 16rpx 30rpx;
    position: relative;
    bottom: 32rpx;
        z-index: 999;
    .line {
      padding: 24rpx 0 28rpx;
      border-bottom: 1rpx solid #e5e5e5;
h5/pages/driver/taskDetail.vue
@@ -20,37 +20,57 @@
    <view class="main_content">
      <view class="line">
        <view class="label">司机姓名</view>
        <view class="value">{{param.lineUpNum}}</view>
        <view class="value">{{param.driverName}}</view>
      </view>
      <view class="line">
        <view class="label">手机号</view>
        <view class="value">{{param.lineUpNum}}</view>
        <view class="value">{{param.drivierPhone}}</view>
      </view>
            <template v-if="param.type == 4">
      <view class="line">
        <view class="label">运输单号</view>
        <view class="value" @click="showDetail = true">
          <text class="waybill_num">{{param.lineUpNum}}</text>
                    <text class="waybill_num">{{param.code}}</text>
          <text class="btn">运单详情</text>
        </view>
      </view>
      <view class="line">
        <view class="label">作业类型</view>
        <view class="value">{{param.lineUpNum}}</view>
                  <view class="value">市公司外协车卸货</view>
      </view>
            </template>
            <template v-else>
                <view class="line">
                  <view class="label">合同编号</view>
                  <view class="value">{{param.contractNum}}</view>
                </view>
                <view class="line">
                  <view class="label">入库类型</view>
                  <view class="value">{{param.inType == 0 ? '整托盘' : '件烟'}}</view>
                </view>
                <view class="line">
                  <view class="label">作业量</view>
                  <view class="value">{{param.totalNum}}万支</view>
                </view>
            </template>
      <view class="line">
        <view class="label">车牌照</view>
        <view class="value">{{param.lineUpNum}}</view>
        <view class="value">前:{{param.carCodeFront}} | 后:{{param.carCodeBack}}</view>
      </view>
      <!--  -->
      <view class="line">
      <view class="line" v-if="param.status == 1">
        <view class="label">距离园区</view>
        <view class="value">
          <view class="">0 公里</view>
          <view class="">{{param.getDistance}}公里</view>
          <view class="btn" @click="getLocation">
                        <image class="icon mr6" src="../../static/driver/position.png"></image>
            重新定位
          </view>
        </view>
      </view>
            <view class="line" v-if="param.status == 2">
              <view class="label">签到时间</view>
              <view class="value">{{param.signDate}}</view>
      </view>
      <view class="warnning">
        <u-icon name="info-circle" color="#ED4545" class="mr12"></u-icon>
@@ -68,25 +88,24 @@
                <view class="label">作业完成</view>
                <view class="value">2022</view>
            </view> -->
      <view class="signIn_wrap" @click="handleSignIn">
      <view v-if="param.status == 1" class="signIn_wrap" @click="handleSignIn">
        <image
          :src="
            param.status == '0'
            param.getDistance < signDistance
              ? require('@/static/driver/btn_qiandao@2x.png')
              : require('@/static/driver/btn_qiandao_fail@2x.png')
          "
          class="img"
          mode="widthFix"
        ></image>
        <view class="handle">签到</view>
        <view class="time">09:10</view>
        <view class="handle">{{ param.getDistance > signDistance ? '无法签到' : '签到' }}</view>
        <view class="time">{{nowTime}}</view>
      </view>
    </view>
    <view class="space"></view>
    <!-- 等待叫号 -->
    <view class="padding_wrap">
      <view class="btn cancel">取消签到</view>
      <view class="btn check">查看排队情况</view>
    <view v-if="param.status == 2" class="padding_wrap">
      <view class="btn check" @click="handleQueue">查看排队情况</view>
    </view>
    <!-- modal -->
@@ -153,42 +172,79 @@
</template>
<script>
    import { driverTaskJobDetail } from '@/api'
    import { driverTaskJobDetail, driverSignInTask } from '@/api';
    import dayjs from 'dayjs';
export default {
  data() {
    return {
      param: {
        status: '0'
      },
            jobId: '',
            lat: '',
            lnt: '',
            nowTime: '',
            signDistance: uni.getStorageSync('driverGuide').signDistance,
      showDetail: false,
    }
  },
    onLoad(option) {
        this.getLocation(option.id)
        this.jobId = option.id
        if(option.status && option.status == '1'){
            this.getLocation()
        }else{
            this.getDetail()
        }
        // this.getDetail({
        //     jobId: option.id,
        //     lat: 31.769137,
        //     lnt: 117.232241,
        // })
        setInterval(() => {
            this.nowTime = dayjs().format('HH:mm:ss')
        })
    },
  methods: {
    handleSignIn() {
      const { param } = this
      this.param.status = param.status == '0' ? '1' : '0'
            const { param, signDistance, lat, lnt, jobId } = this
            if(param.getDistance > signDistance) return
            driverSignInTask({
                jobId, lat, lnt,signType: 0
            }).then(res => {
                this.showToast('签到成功')
                this.getDetail()
            })
    },
    getLocation(jobId) {
      uni.getLocation({
        type: 'wgs84',
        success: function (res) {
        getDetail() {
            const { jobId, lat, lnt } = this
                    driverTaskJobDetail({
                        jobId,
                        lat: res.latitude,
                        lnt: res.longitude,
                jobId: this.jobId,
                lat,
                lnt
                    }).then(ress => {
                        this.param = { ...ress.data }
                    })
                    console.log(res);
          console.log('当前位置的经度:' + res.longitude)
          console.log('当前位置的纬度:' + res.latitude)
        },
    getLocation() {
            const { jobId } = this
      uni.getLocation({
        type: 'wgs84',
        success: (res) => {
                    this.lat = res.latitude
                    this.lnt = res.longitude
                    this.getDetail()
        },
                fail:(err) => {
                    console.log('err', err);
        }
      })
    }
    },
        handleQueue() {
            uni.navigateTo({
                url:'/pages/driver/queueUp?jobId=' + this.jobId
            })
        },
  }
}
</script>
@@ -202,6 +258,7 @@
    padding: 16rpx 30rpx;
    position: relative;
    bottom: 32rpx;
        z-index: 999;
    .line {
      padding: 24rpx 0 28rpx;
      border-bottom: 1rpx solid #e5e5e5;
@@ -308,6 +365,7 @@
  }
  .padding_wrap {
    position: fixed;
        z-index: 999;
    padding: 0 30rpx 64rpx;
    bottom: 0;
    left: 0;
@@ -318,7 +376,7 @@
      height: 96rpx;
      line-height: 96rpx;
      text-align: center;
      width: 336rpx;
      width: 100%;
      font-size: 36rpx;
      color: #333333;
      background: #ffffff;
h5/utils/service.js
@@ -34,10 +34,11 @@
                                duration: 2000
                            })
                        })
                        return
                    }
                    if (data.code === 5112) {
                        uni.clearStorageSync()
                        uni.navigateTo({
                        return uni.navigateTo({
                            url: '/pages/login/login'
                        })
                    }
pda/App.vue
@@ -13,8 +13,141 @@
</script>
<style lang="scss">
@import "uview-ui/index.scss";
/*每个页面公共css */
@import "uview-ui/index.scss";
.flex-cb {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.container {
  height: 100%;
  width: 100%;
  max-width: 800rpx;
  overflow-y: auto;
}
.doumee-container .ivu-tabs-nav {
  width: 100%;
}
.doumee-container .ivu-tabs-nav .ivu-tabs-tab {
  width: calc(100% / 3);
}
.doumee-container .ivu-tabs-nav .ivu-tabs-tab {
  margin-right: 0;
  text-align: center;
}
.cell {
  background-color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 100rpx;
  padding: 24rpx 30rpx;
  box-sizing: border-box;
  border-bottom: 1rpx solid #eee;
  font-size: 15rpx;
  position: relative;
}
.cell .title {
  flex-shrink: 0;
  color: #222;
  line-height: 20rpx;
  height: 20rpx;
  width: 28%;
  margin-right: 5%;
}
.cell .content {
  flex: 1;
  font-size: 28rpx;
  font-weight: 400;
  color: #999999;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.cell .content .input {
  width: 100%;
  height: 100%;
  font-size: 28rpx;
  font-weight: 400;
  color: #333333;
  text-align: right;
}
.cell.is-link::after {
  content: "";
  display: block;
  width: 8rpx;
  height: 8rpx;
  transform: rotate(-45deg);
  border-right: 1rpx solid #999999;
  border-bottom: 1rpx solid #999999;
  margin-left: 5rpx;
}
.card {
  background-color: #fff;
  padding: 16rpx;
  position: relative;
}
.card::after {
  content: "";
  display: block;
  position: absolute;
  width: calc(100% - 32rpx);
  height: 0;
  bottom: 0;
  left: 16rpx;
  border-bottom: 1rpx solid #f7f7f7;
}
.card .title {
  color: #777777;
  margin-bottom: 12rpx;
}
.card .content {
  color: #222;
}
.placeholder9 {
  color: #999999 !important;
  font-size: 28rpx;
}
.red{
    color: red;
}
//设置圆角
checkbox .uni-checkbox-input {
  border-radius: 50%;
}
checkbox .uni-checkbox-input.uni-checkbox-input-checked {
  color: #fff !important;
  border: 1px solid #4d99a8 !important;
  background-color: #4d99a8 !important;
}
checkbox .uni-checkbox-input.uni-checkbox-input-checked:before {
  /* color: #4d99a8 !important;  */
  /* border: 1px solid #4d99a8 !important; */
  /* font-size: 58rpx; */
  /* border-radius: 50%; */
}
//
view {
  box-sizing: border-box;
}
@@ -50,8 +183,29 @@
  font-size: 28rpx;
  color: #333333;
}
.popupShow {
  overflow: hidden;
  position: fixed;
  width: 100%;
}
.placeholder6 {
  color: #666666;
  font-size: 28rpx;
}
.primaryColor{
  color: $uni-color-primary;
}
.avatar {
  width: 64rpx;
  height: 64rpx;
  border-radius: 50%;
  margin-right: 20rpx;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: $uni-color-primary;
  color: #fff;
  font-size: 30rpx;
}
.placeholder9 {
  color: #999999;
@@ -63,6 +217,9 @@
.mr24 {
  margin-right: 24rpx;
}
.mt24 {
  margin-top: 24rpx;
}
.mr12 {
  margin-right: 12rpx;
@@ -70,7 +227,12 @@
.ml12 {
  margin-left: 12rpx;
}
.ml6 {
  margin-left: 6rpx;
}
.mt6 {
  margin-top: 6rpx;
}
.mr6 {
  margin-right: 6rpx;
}
pda/api/index.js
@@ -18,6 +18,18 @@
    data
  })
}
export const getUserInfo = () => {
  return http({
    url: 'getUserInfo',
    method: 'get'
  })
}
export const loginCaptcha = () => {
  return http({
    url: 'captcha',
    method: 'get'
  })
}
//  发送短信验证码
export const sendSms = (data) => {
  return http({
@@ -26,3 +38,99 @@
    data
  })
}
//  登录
export const loginPost = (data) => {
  return http({
    url: 'loginH5',
    method: 'post',
    data
  })
}
//  获取月台组信息
export const getPlatformGroupList = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/web/pdaPlatform/getPlatformGroupList',
    method: 'post',
    data
  })
}
//  获取月台 任务信息
export const getPlatformWorkData = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/web/pdaPlatform/getPlatformWorkData',
    method: 'get',
    data
  })
}
//  车辆排队情况
export const platformLineUpPage = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/web/pdaPlatform/platformLineUpPage',
    method: 'post',
    data
  })
}
//  月台叫号
export const platformCallNumber = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/web/pdaPlatform/platformCallNumber',
    method: 'post',
    data
  })
}
//  异常挂起
export const platformErr = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/web/pdaPlatform/platformErr',
    method: 'post',
    data
  })
}
//  转移月台
export const platformMove = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/web/pdaPlatform/platformMove',
    method: 'post',
    data
  })
}
//  月台过号
export const platformOverNumber = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/web/pdaPlatform/platformOverNumber',
    method: 'post',
    data
  })
}
//  完成作业
export const finishWork = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/web/pdaPlatform/finishWork',
    method: 'post',
    data
  })
}
//  手动开始作业
export const beginWork = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/web/pdaPlatform/beginWork',
    method: 'post',
    data
  })
}
//  更新月台配置信息
export const updUserPlatformConfig = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/web/pdaPlatform/updUserPlatformConfig',
    method: 'get',
    data
  })
}
//  修改禁启用状态
export const updPlatformStatus = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/web/pdaPlatform/updPlatformStatus',
    method: 'post',
    data
  })
}
pda/main.js
@@ -8,6 +8,17 @@
Vue.use(uView)
Vue.config.productionTip = false
Vue.prototype.$store = store
Vue.prototype.$jump = (url) => {uni.navigateTo({url})}
Vue.prototype.$goBack = () => { uni.navigateBack() }
Vue.prototype.showToast = (str) => {
    setTimeout(() => {
        uni.showToast({
          title: str,
          icon: 'none',
          duration: 2000
        })
    },100)
}
App.mpType = 'app'
const app = new Vue({
pda/manifest.json
@@ -5,6 +5,30 @@
    "versionName" : "1.0.0",
    "versionCode" : "100",
    "transformPx" : false,
        "h5" : {
            "router" : {
                "mode" : "hash",
                "base" : "./"
            },
            // "base" : "/h5/"
            "devServer" : {
                "port" : 8090,
                "historyApiFallback" : true,
                "disableHostCheck" : true,
                "proxy" : {
                    "/admin_interface" : {
                        // 这个字段名需与你配置的basePrefixUrl一致,系统识别到带有/dev-api请求的地址时,会在前面拼接上代理服务器地址
                        // "target" : "http://192.168.0.173/admin_interface", // 代理服务器域名或IP地址
                        "target" : "http://192.168.0.136:10010", // 代理服务器域名或IP地址
                        "changeOrigin" : true, // 允许跨域
                        "pathRewrite" : {
                            "^/admin_interface" : "" // 重写地址,如果实际接口中是不带/dev-api,需要将这个前缀置空,因为这个前缀只是为了识别用,识别完之后就没用了
                        }
                    }
                },
                "https" : false
            }
        },
    /* 5+App特有相关 */
    "app-plus" : {
        "usingComponents" : true,
pda/pages/index/center.vue
@@ -1,8 +1,8 @@
<template>
  <view class="main_app">
    <view class="main_content">
      <view class="title"
        >安泰物流装货平台<u-icon
      <view class="title" @click="showPlatformgroup = true"
        >{{ activePlatformGroup.name }}<u-icon
          name="arrow-down"
          size="20"
          class="ml12"
@@ -12,24 +12,25 @@
      <view class="platform_list">
        <view
          class="item"
          :class="{ active: index === 0 }"
          v-for="(i, index) in 8"
          :key="i"
          >1号月台</view
          :class="{ active: item.id === activePlatformId }"
          v-for="(item, index) in activePlatformGroup.platformList"
          :key="index"
                    @click="platformClick(item.id)"
          >{{ item.name }}</view
        >
      </view>
      <view class="status_wrap">
        <view class="status"
          >作业:<text>{{ 0 }}</text></view
          >作业:<text>{{ platformTaskInfo.workNum }}</text></view
        >
        <view class="status"
          >已叫:<text>{{ 0 }}</text></view
          >已叫:<text>{{ platformTaskInfo.callNum }}</text></view
        >
        <view class="status"
          >等待:<text>{{ 0 }}</text></view
          >等待:<text>{{ platformTaskInfo.waitNum }}</text></view
        >
        <view class="status"
          >异常:<text>{{ 0 }}</text></view
          >异常:<text>{{ platformTaskInfo.exceptionNum }}</text></view
        >
      </view>
    </view>
@@ -208,22 +209,64 @@
        </view>
      </view>
    </u-popup>
        <!--  -->
        <u-picker :show="showPlatformgroup" keyName="name" :columns="[platformGroupList]" @cancel="showPlatformgroup = false" @confirm="platConfirm"></u-picker>
  </view>
</template>
<script>
import { getPlatformGroupList, getPlatformWorkData } from '@/api'
export default {
  data() {
    return {
      showPlatformCall: false, // 月台叫号
      showDetail: false,
      showTransform: false // 转移
      showTransform: false, // 转移
      showPlatformgroup: false,
            platformGroupList: [],
            activePlatformGroup: {},
            platformTaskInfo: {},
            activePlatformId: '',
    }
  },
  onLoad() {
        this.getPlatformGroup()
  },
  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()
        },
    handleDetail() {
      this.showDetail = true
    },
pda/pages/index/control.vue
@@ -1,34 +1,47 @@
<template>
  <view class="main_app">
        <template v-for="item in platformGroupList">
    <view class="title">
      <view class="icon"></view>
      <view class="name">安泰物流卸货月台</view>
              <view class="name">{{item.name}}</view>
    </view>
    <div class="data_list">
      <div class="line">
        <div class="name">1号月台</div>
        <u-switch v-model="list"></u-switch>
      </div>
      <div class="line">
        <div class="name">1号月台</div>
        <u-switch v-model="list"></u-switch>
      </div>
    </div>
            <view class="data_list">
              <view class="line" v-for="(platform, i) in item.platformList" :key="platform.id">
                <view class="name">{{platform.name}}</view>
                <u-switch v-model="platform.status" activeColor="#279BAA" inactiveColor="#cccccc" :inactiveValue="0" :activeValue="1" @change="e => changeStatus(platform)" />
              </view>
            </view>
        </template>
  </view>
</template>
<script>
    import { getPlatformGroupList, updPlatformStatus } from '@/api'
export default {
  data() {
    return {
      list: []
      platformGroupList: []
    }
  },
  onLoad() {
        this.getPlatformGroup()
  },
  methods: {
        changeStatus(item) {
            console.log(item);
            updPlatformStatus({
                id: item.id,
                status: item.status
            })
        },
        getPlatformGroup() {
            getPlatformGroupList({
                queryData: 1,
                queryType: 0
            }).then(res => {
                this.platformGroupList = res.data || []
            })
        },
  }
}
</script>
pda/pages/index/login.vue
@@ -3,7 +3,7 @@
    <image class="login_bg" src="@/static/login_bg@2x.png" />
    <image class="login_logo" src="@/static/logo@2x.png" mode="widthFix" />
    <view class="login_title" style="marginTop: 40rpx;">安泰物流智慧园区</view>
    <view class="login_title" style="marginBottom: 80rpx;">物流车管理系统</view>
    <view class="login_title" style="marginBottom: 60rpx;">数字化月台调度平台</view>
    <view class="login_list">
      <view class="login_list_item">
        <image src="@/static/login_ic_phone@2x.png" mode="widthFix" />
@@ -42,8 +42,8 @@
  data() {
    return {
      form: {
        account: '',
        password: '',
        username: '13996529050',
        password: '123456',
      },
      isShowProtocol: false,
      ProtocolFlag: false,
@@ -53,13 +53,40 @@
  },
  onLoad() {
    // this.initCaptcha()
    this.initCaptcha()
  },
  methods: {
    ...mapMutations(["setToken", "setUserInfo"]),
    changeFalg() {
      this.ProtocolFlag = !this.ProtocolFlag
    },
        onLogin() {
          const { form, ProtocolFlag } = this
          if (!form.username) return uni.showToast({
            title: '账号不能为空',
            icon: 'none'
          })
          if (!form.password) return uni.showToast({
            title: '密码不能为空',
            icon: 'none'
          })
          loginPost({
            ...form,
                code: 1,
            uuid: this.captcha.uuid,
            openId: this.$store.state.openId
          }).then(res => {
            if (res.code === 200) {
              this.setToken(res.data)
              getUserInfo().then(ress => {
                this.setUserInfo(ress.data)
                uni.redirectTo({
                  url: "/pages/index/index"
                })
              })
            }
          })
    },
    getContent() {
      getSystemDictData({
@@ -78,41 +105,6 @@
        this.captcha = res.data
      })
    },
    onLogin() {
      const { form, ProtocolFlag } = this
      if (!ProtocolFlag) return uni.showToast({
        title: '请先阅读并同意用户协议',
        icon: 'none'
      })
      if (!form.username) return uni.showToast({
        title: '账号不能为空',
        icon: 'none'
      })
      if (!form.password) return uni.showToast({
        title: '密码不能为空',
        icon: 'none'
      })
      if (!form.code) return uni.showToast({
        title: '验证码不能为空',
        icon: 'none'
      })
      loginPost({
        ...form,
        uuid: this.captcha.uuid,
        openId: this.$store.state.openId
      }).then(res => {
        if (res.code === 200) {
          this.setToken(res.data)
          getUserInfo().then(ress => {
            this.setUserInfo(ress.data)
            uni.redirectTo({
              url: "/pages/staff/index"
            })
          })
        }
      })
    }
  }
}
</script>
@@ -120,9 +112,8 @@
<style lang="scss" scoped>
.login {
  width: 100%;
  height: 100vh;
  display: flex;
  padding-top: 160rpx;
  padding-top: 100rpx;
  box-sizing: border-box;
  align-items: center;
  flex-direction: column;
pda/pages/index/queueup.vue
@@ -57,19 +57,36 @@
</template>
<script>
    import { platformLineUpPage, getPlatformGroupList } from '@/api'
export default {
  data() {
    return {
      showDetail: false
      showDetail: false,
            capacity: 10,
            page: 1,
            platformGroupId: '',
            platformGroupList: []
    }
  },
  onLoad() {
        this.getPlatformGroup()
        this.initData()
  },
  methods: {
    handleDetail() {
      this.showDetail = true
    },
        getPlatformGroup() {
            getPlatformGroupList().then(res => {
            })
        },
        initData(){
            const { page, capacity } = this
            platformLineUpPage({
                capacity, page, model: {}
            })
        }
  }
}
</script>
pda/pages/index/set.vue
@@ -1,33 +1,74 @@
<template>
  <view class="main_app">
        <template v-for="item in platformGroupList">
    <view class="title">
      <view class="icon"></view>
      <view class="name">安泰物流卸货月台</view>
              <view class="name">{{item.name}}</view>
    </view>
    <div class="data_list">
      <div
            <view class="data_list">
              <view
        class="item"
        :class="{ active: i == 1 }"
        v-for="(item, i) in 7"
        :key="i"
                :class="{ active: platform.showConfig }"
                v-for="(platform, i) in item.platformList"
                :key="platform.id"
                    @click="platformClick(platform.id)"
      >
        {{ i }}号月台
      </div>
    </div>
                {{platform.name}}
              </view>
            </view>
        </template>
        <view class="btns">
            <div class="btn" @click="$goBack">取消</div>
            <div class="btn active" @click="updUserPlatform">确定</div>
        </view>
  </view>
</template>
<script>
import { getPlatformGroupList, updUserPlatformConfig } from '@/api'
export default {
  data() {
    return {
            platformGroupList: []
    }
  },
  onLoad() {
        this.getPlatformGroup()
  },
  methods: {
        updUserPlatform(){
            const { platformGroupList } = this
            let ids = []
            platformGroupList.forEach(item => {
                item.platformList.forEach(platform => {
                        if(platform.showConfig){
                            ids.push(platform.id)
                        }
                })
            })
            updUserPlatformConfig({ids}).then(res => {
                this.showToast('更新成功')
                this.$goBack()
            })
        },
        platformClick(id) {
            const { platformGroupList } = this
            platformGroupList.forEach(item => {
                item.platformList.forEach(platform => {
                        if(platform.id === id){
                            platform.showConfig = !platform.showConfig
                        }
                })
            })
        },
        getPlatformGroup() {
            getPlatformGroupList({
                queryData: 1,
                queryType: 1
            }).then(res => {
                this.platformGroupList = res.data || []
            })
        },
  }
}
</script>
@@ -43,6 +84,9 @@
    margin-bottom: 20rpx;
    padding: 30rpx;
     background-color: #fff;
         &:nth-last-child(1){
             margin-bottom: 120rpx;
         }
    .item {
      width: 210rpx;
      height: 80rpx;
@@ -83,4 +127,33 @@
    }
  }
}
.btns{
    position: fixed;
    left: 0;
    bottom: 0;
    width: 750rpx;
    height: 120rpx;
    background: #FFFFFF;
    box-shadow: 0rpx -4rpx 12rpx 0rpx rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30rpx;
    .btn{
        width: 336rpx;
        height: 88rpx;
        background: #FFFFFF;
        border-radius: 44rpx;
        border: 1rpx solid #999999;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 32rpx;
        color: #333333;
    }
    .active{
        background: $uni-color-primary;
        color: #fff;
    }
}
</style>
pda/utils/service.js
@@ -34,9 +34,10 @@
                                duration: 2000
                            })
                        })
                        return
                    }
                    if (data.code === 5112) {
                        uni.navigateTo({
                        return uni.navigateTo({
                            url: '/pages/login/login'
                        })
                    }