jiangping
2024-11-07 3e84978d39cf6399e2335f9a5b10ca144ee9f606
Merge remote-tracking branch 'origin/master'
已修改15个文件
966 ■■■■ 文件已修改
admin/public/template/cars.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/business/category.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/business/OperaCarUseBookWindow.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/operation/OperCarUseBookParamWindow.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/operation/serviceCar/apprRecord.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/vehicle/cars.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/vehicle/category.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/staff/vehicle/apply.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/staff/vehicle/shinei.vue 835 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/staff/vehicle/shiwai.vue 44 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/utils/service.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/assets/base.css 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/views/FireFighting.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/views/LogisticsCenter.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
screen/src/views/SecurityControl.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/public/template/cars.xlsx
Binary files differ
admin/src/api/business/category.js
@@ -12,7 +12,13 @@
    trim: true
  })
}
// 导出Excel
export function exportExcel (data) {
  return request.post('/visitsAdmin/cloudService/business/category/exportChildExcel', data, {
    trim: true,
    download: true
  })
}
// 创建
export function create (data) {
  return request.post('/visitsAdmin/cloudService/business/category/create', data)
admin/src/components/business/OperaCarUseBookWindow.vue
@@ -52,11 +52,11 @@
            </div>
            <div class="item">
              <div class="label">预计出发时间</div>
              <div class="value">{{ model.planUseDate || '' }}</div>
              <div class="value" v-if="model.planUseDate">{{ model.planUseDate.slice(0,16) }}</div>
            </div>
            <div class="item">
              <div class="label">用车时段</div>
              <div class="value">始:{{ model.startTime || '' }}<br>止:{{ model.endTime || '' }}</div>
              <div class="value">始:<span v-if="model.startTime">{{ model.startTime.slice(0,16) }}</span><br>止:<span v-if="model.endTime">{{ model.endTime.slice(0,16) }}</span></div>
            </div>
          </div>
        </div>
admin/src/components/operation/OperCarUseBookParamWindow.vue
@@ -139,7 +139,10 @@
      </div>
      <span slot="footer" class="dialog-footer">
        <div>已选择:{{ selDatetime }}</div>
        <div style="text-align: left;">
          <div>已选择:{{ selDatetime }}</div>
          <div class="red">{{ selPastDatetime }}</div>
        </div>
        <div class="btn" :class="{ disable: info && info.length > 0 }" @click="subTime">确认时间</div>
      </span>
    </el-dialog>
@@ -376,7 +379,6 @@
        })
      }
      console.log('form', this.form)
    },
    datetimeClick(item, index) {
      if (item.carUseBookId) {
@@ -443,8 +445,14 @@
      if (str && str == 1) {
        this.$set(this.form, 'endTime', '')
      }
      if (form.startTime && form.endTime) {
        this.selDatetime = form.startTime + ' - ' + form.endTime
        if(new Date(form.startTime).getTime() < new Date().getTime()){
          this.selPastDatetime = '当前选择包含已经过去时间,请确认后再提交;'
        }else{
          this.selPastDatetime = ''
        }
        carUseBookList({
          carId: form.carId,
          startTime: form.startTime + ':00',
@@ -452,6 +460,8 @@
        }).then(res => {
          this.info = res || []
        })
      }else{
        this.selPastDatetime = ''
      }
    },
    gettimes() {
admin/src/views/operation/serviceCar/apprRecord.vue
@@ -136,16 +136,20 @@
        ></el-table-column>
        <el-table-column label="用车时间" min-width="170px">
          <template slot-scope="{ row }">
            <span>起:{{ row.startTime || "" }}</span
            <span v-if="row.startTime">起:{{ row.startTime.slice(0,16) }}</span
            ><br />
            <span>止:{{ row.endTime || "" }}</span>
            <span v-if="row.endTime">止:{{ row.endTime.slice(0,16) }}</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="planUseDate"
          label="出发时间"
          min-width="150px"
        ></el-table-column>
        >
        <template slot-scope="{ row }">
          <span v-if="row.planUseDate">{{ row.planUseDate.slice(0,16) }}</span>
        </template>
      </el-table-column>
        <el-table-column label="目的地" min-width="200px">
          <template slot-scope="{ row }">
            <span class="status-green" v-if="row.type === 0">【市内】</span>
admin/src/views/vehicle/cars.vue
@@ -10,7 +10,7 @@
          @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="" prop="catePName" title="分类名称">
        <el-cascader v-model="searchForm.cateIds" @change="changeSel" clearable :options="cateList" :props="{
        <el-cascader v-model="searchForm.cateIds" @change="changeSel" placeholder="请选择分类" clearable :options="cateList" :props="{
          label: 'name',
          value: 'id',
          children: 'childCategoryList',
admin/src/views/vehicle/category.vue
@@ -18,8 +18,11 @@
            <ul class="toolbar" v-permissions="['business:category:create', 'business:category:delete']">
                <li><el-button type="primary" @click="handleEdit()" icon="el-icon-plus"
                        v-permissions="['business:category:create']">新建</el-button></li>
                <li v-permissions="['business:category:exportExcel']"><el-button type="primary" @click="exportExcel"
                        >导出</el-button></li>
            </ul>
            <el-table row-key="id" :tree-props="{children: 'childCategoryList'}" v-loading="isWorking.search" :data="dataList" stripe @selection-change="handleSelectionChange">
            <el-table row-key="id" :tree-props="{ children: 'childCategoryList' }" v-loading="isWorking.search"
                :data="dataList" stripe @selection-change="handleSelectionChange">
                <el-table-column prop="name" label="分类名称" min-width="100px"></el-table-column>
                <el-table-column prop="remark" label="备注" min-width="100px"></el-table-column>
                <!-- <el-table-column prop="status" label="状态" min-width="100px">
@@ -27,7 +30,7 @@
                        <span v-if="row.status === 0">启用</span>
                        <span v-if="row.status === 1">禁用</span>
                    </template>
                </el-table-column> -->
</el-table-column> -->
                <el-table-column prop="createDate" label="创建时间" min-width="100px"></el-table-column>
                <el-table-column v-if="containPermissions(['business:category:update', 'business:category:delete'])"
                    label="操作" min-width="120" fixed="right">
@@ -43,7 +46,8 @@
            </pagination>
        </template>
        <!-- 新建/修改 -->
        <OperaCategoryWindow v-if="isShowEdit" @close="isShowEdit = false" ref="operaCategoryWindow" @success="getList" />
        <OperaCategoryWindow v-if="isShowEdit" @close="isShowEdit = false" ref="operaCategoryWindow"
            @success="getList" />
    </TableLayout>
</template>
@@ -74,6 +78,12 @@
        }
    },
    created() {
        this.config({
      module: '车辆信息表',
      api: '/business/category',
      'field.id': 'id',
      'field.main': 'id'
    })
        this.getList()
    },
    methods: {
@@ -83,7 +93,7 @@
            this.$nextTick(() => {
                this.$refs.operaCategoryWindow.open(str)
                this.$refs.operaCategoryWindow.getList()
                if(row && row.id){
                if (row && row.id) {
                    this.$refs.operaCategoryWindow.getDetail(row.id)
                }
            })
h5/pages/staff/vehicle/apply.vue
@@ -172,7 +172,7 @@
    console.log(option)
    this.param = { ...option }
    this.minDate = new Date().getTime()
        this.param.planUseDate = dayjs(this.param.startTime).format('YYYY-MM-DD HH:mm')
  },
  methods: {
    handleSub() {
h5/pages/staff/vehicle/shinei.vue
@@ -1,398 +1,437 @@
<template>
  <view class="main_app">
    <view class="app_header">
      <view class="item" @click="isShowCar = true">
        <text v-if="param.carCode">{{ param.carCode }}</text>
        <text v-else class="placeholder9">选择车辆</text>
        <u-icon name="arrow-down" color="#999999" />
      </view>
      <view class="item" @click="isShowDate = true">
        <text v-if="param.queryDate">{{ param.queryDate }}</text>
        <text v-else class="placeholder9">选择日期</text>
        <u-icon name="arrow-down" color="#999999" />
      </view>
    </view>
    <!--  -->
    <view class="time_list">
      <view
        class="item"
        :class="{
          disable: item.isUse == 1,
          active: item.checked == '1',
          hasSub: item.carUseBookId,
        }"
        @click="datetimeClick(item, i)"
        v-for="(item, i) in timeList"
        :key="i"
        >{{ item.startHours }}-{{ item.endHours }}</view
      >
    </view>
    <!--  -->
    <view class="main_footer">
      <view class="df_ac">
        <view>已选择:</view>
        <view class="sel_time">{{ selDatetime }}</view>
      </view>
      <view class="btns">
        <view class="left">
          <view class="item" v-for="item in colorOptions" :key="item.name">
            <view class="box" :style="{ background: item.color }"></view>
            <view class="">{{ item.name }}</view>
          </view>
        </view>
        <view class="sub" @click="onSubmit">确认预约</view>
      </view>
    </view>
    <!--  -->
    <!-- 选择车辆 -->
    <u-picker
      keyName="code"
      :show="isShowCar"
      :columns="carsList"
      @confirm="seletedCar"
      @cancel="isShowCar = false"
    ></u-picker>
    <!-- 日期 -->
    <u-datetime-picker
      :show="isShowDate"
      :minDate="minDate"
      @confirm="confirmDate"
      @cancel="isShowDate = false"
      mode="date"
    ></u-datetime-picker>
    <!-- 详情 -->
    <u-popup
      :show="isShowDetail"
      :round="12"
      mode="bottom"
      @close="isShowDetail = false"
    >
      <view class="detail_modal">
        <view class="title">车辆预约情况</view>
        <view class="h1">{{ activeInfo.carCode }}</view>
        <view class="line">
          <view class="label">预计用车时段</view>
          <view class="value" v-if="activeInfo.startTime"
            >{{ activeInfo.startTime.slice(5, 16) }} -
            {{ activeInfo.endTime.slice(5, 16) }}</view
          >
        </view>
        <view class="line">
          <view class="label">目的地</view>
          <view class="value">{{ activeInfo.addr }}</view>
        </view>
        <view class="line">
          <view class="label">乘车人数</view>
          <view class="value" v-if="activeInfo.memberIds"
            >{{ activeInfo.memberIds.split(",").length }}人</view
          >
        </view>
        <view class="line">
          <view class="label">用车事由</view>
          <view class="value">{{ activeInfo.content || "" }}</view>
        </view>
        <view class="line">
          <view class="label">申请人</view>
          <view class="value"
            >{{ activeInfo.memberName }}
            <text class="primaryColor ml12">{{
              activeInfo.memberPhone
            }}</text></view
          >
        </view>
        <view class="btn" @click="isShowDetail = false">关闭</view>
      </view>
    </u-popup>
  </view>
</template>
<script>
import dayjs from 'dayjs'
import { getCarsList, carCanReservationDate, carUseBookDetail } from '@/api'
export default {
  data() {
    return {
      isShowCar: false,
      isShowDate: false,
      param: {},
      isShowDetail: false,
      activeInfo: {},
      minDate: '',
      carsList: [[{ name: 'aa', value: '11' }]],
      timeList: [],
      selDatetime: '',
      colorOptions: [
        { color: this.$store.state.primaryColor, name: '已选择' },
        { color: '#F7F7F7', name: '可预约' },
        { color: '#cccccc', name: '不可预约' },
      ]
    }
  },
  onLoad() {
    this.minDate = new Date().getTime()
    this.initData()
  },
  methods: {
    onSubmit() {
      const { param } = this
      const selTimeList = this.timeList.filter(i => i.checked == '1')
      if (selTimeList.length == 0) {
        return uni.showToast({
          title: '请先选择用车时间段',
          icon: 'none'
        })
      }
      const obj = {
        carCode: param.carCode,
        carId: param.carId,
        startTime: selTimeList[0].startTime,
        endTime: selTimeList[selTimeList.length - 1].endTime,
        dateDay: param.queryDate,
        type: '0'
      }
      uni.navigateTo({
        url: `/pages/staff/vehicle/apply?carCode=${obj.carCode}&carId=${obj.carId}&startTime=${obj.startTime}&endTime=${obj.endTime}&dateDay=${obj.dateDay}&type=${obj.type}`
      })
      // this.$jump('/pages/staff/vehicle/apply')
    },
    datetimeClick(item, index) {
      if (item.carUseBookId) {
        this.getDetail(item.carUseBookId)
        return
      }
      if (item.isUse == '1') return
      const { timeList } = this
      const selTimeList = timeList.filter(i => i.checked == '1')
      if (selTimeList.length === 0) {
        this.timeList.forEach((ite, i) => {
          if (i === index) {
            ite.checked = '1'
            this.$forceUpdate()
          }
        })
      } else {
        const findIndex = selTimeList.findIndex(i => i.index === index)
        console.log('findIndex', findIndex)
        if (findIndex === -1) {
          const startNum = index - selTimeList[0].index
          const endNum = index - selTimeList[selTimeList.length - 1].index
          if (startNum == 1 || startNum == -1 || endNum == 1 || endNum == -1) {
            console.log('相邻')
            item.checked = true
            this.$forceUpdate()
          } else {
            return uni.showToast({
              title: '请选择相邻的时间段',
              icon: 'none'
            })
          }
        } else {
          if (index === selTimeList[0].index || index === selTimeList[selTimeList.length - 1].index) {
            item.checked = false
            this.$forceUpdate()
          } else {
            return uni.showToast({
              title: '请先取消最外层的时间段',
              icon: 'none'
            })
          }
        }
      }
      const selTimeLists = this.timeList.filter(i => i.checked == '1')
      // console.log('selTimeList', selTimeList);
      if (selTimeLists.length === 0) {
        this.selDatetime = ''
      } else {
        this.selDatetime = this.param.queryDate.slice(5) + ' ' + selTimeLists[0].startHours + '-' + selTimeLists[selTimeLists.length - 1].endHours
      }
    },
    getDetail(id) {
      carUseBookDetail(
        id
      ).then(res => {
        this.activeInfo = res.data
        this.isShowDetail = true
      })
    },
    confirmDate(e) {
      this.param.queryDate = dayjs(e.value).format('YYYY-MM-DD')
      this.isShowDate = false
      if (this.param.carId && this.param.queryDate) {
        this.gettimes()
      }
    },
    initData() {
      getCarsList({
        type: 0
      }).then(res => {
        this.carsList = [res.data]
      })
    },
    gettimes() {
      const { param } = this
      carCanReservationDate({
        dateDay: param.queryDate,
        carId: param.carId
      }).then(res => {
        if (res.code === 200) {
          this.timeList = res.data || []
          this.timeList.forEach((i, j) => {
            i.checked = '0',
              i.index = j
            if (dayjs().format('YYYY-MM-DD') == param.queryDate) {
              let endTime = new Date(i.endTime).getTime()
              let nowTime = new Date().getTime()
              if (endTime < nowTime) {
                i.isUse = 1
              }
            }
          })
        }
      })
    },
    seletedCar(e) {
      const item = e.value[0]
      this.$set(this.param, 'carCode', item.code)
      this.$set(this.param, 'carId', item.id)
      if (this.param.carId && this.param.queryDate) {
        this.gettimes()
      }
      this.isShowCar = false
    }
  }
};
</script>
<style lang="scss">
.main_app {
  .app_header {
    display: flex;
    align-items: center;
    margin: 0 -15rpx;
    .item {
      width: 330rpx;
      height: 72rpx;
      margin: 15rpx;
      padding: 0 30rpx;
      border-radius: 36rpx;
      border: 1rpx solid #e5e5e5;
      display: flex;
      align-items: center;
      justify-content: space-between;
      align-items: center;
    }
  }
  .main_footer {
    position: absolute;
    width: 100%;
    left: 0;
    bottom: 0;
    padding: 20rpx 30rpx 84rpx;
    box-shadow: 0rpx -3rpx 6rpx 0rpx #eeeeee;
    .sel_time {
      color: $uni-color-primary;
    }
    .btns {
      margin-top: 10rpx;
      display: flex;
      justify-content: space-between;
      align-items: center;
      .left {
        display: flex;
        .item {
          display: flex;
          align-items: center;
          margin-right: 20rpx;
          .box {
            margin-right: 10rpx;
            width: 32rpx;
            height: 32rpx;
          }
        }
      }
      .sub {
        width: 184rpx;
        height: 72rpx;
        line-height: 72rpx;
        text-align: center;
        background: $uni-color-primary;
        box-shadow: 0rpx -1rpx 0rpx 0rpx #eeeeee;
        border-radius: 36rpx;
        font-size: 30rpx;
        color: #ffffff;
      }
    }
  }
  .time_list {
    display: flex;
    padding: 30rpx 0 240rpx;
    flex-wrap: wrap;
    .item {
      width: 220rpx;
      height: 80rpx;
      line-height: 80rpx;
      text-align: center;
      background: #f7f7f7;
      border-radius: 4rpx;
      margin-bottom: 24rpx;
      font-size: 30rpx;
      margin-right: 15rpx;
      &:nth-of-type(3n) {
        margin-right: 0;
      }
    }
    .active {
      background-color: $uni-color-primary;
      color: #fff;
    }
    .disable {
      background: #f7f7f7;
      color: #cccccc;
    }
    .hasSub {
      color: #fff;
      background: #cccccc;
    }
  }
}
.detail_modal {
  padding: 40rpx 30rpx;
  .title {
    text-align: center;
    font-weight: 600;
    font-size: 32rpx;
    margin-bottom: 40rpx;
  }
  .h1 {
    font-weight: 600;
    font-size: 32rpx;
    margin-bottom: 30rpx;
  }
  .line {
    display: flex;
    margin-bottom: 20rpx;
    .label {
      width: 180rpx;
      color: #888888;
    }
    .value {
      color: #333333;
    }
  }
  .btn {
    margin-top: 230rpx;
    width: 690rpx;
    height: 88rpx;
    line-height: 88rpx;
    text-align: center;
    background: $uni-color-primary;
    border-radius: 44rpx;
    font-weight: 600;
    font-size: 32rpx;
    color: #ffffff;
  }
}
</style>
<template>
    <view class="main_app">
        <view class="app_header">
            <view class="item" @click="isShowCar = true">
                <text v-if="param.carCode">{{ param.carCode }}</text>
                <text v-else class="placeholder9">选择车辆</text>
                <u-icon name="arrow-down" color="#999999" />
            </view>
            <view class="item" @click="showDate">
                <text v-if="param.queryDate">{{ param.queryDate }}</text>
                <text v-else class="placeholder9">选择日期</text>
                <u-icon name="arrow-down" color="#999999" />
            </view>
        </view>
        <!-- pastFlag -->
        <view class="time_list">
            <view class="item" :class="{
          disable: item.pastFlag,
          active: item.checked == '1',
          hasSub: item.carUseBookId,
        }" @click="datetimeClick(item, i)" v-for="(item, i) in timeList" :key="i">
                {{ item.startHours }}-{{ item.endHours }}
            </view>
        </view>
        <!--  -->
        <view class="main_footer">
            <view class="df_ac">
                <view>已选择:</view>
                <view class="sel_time">{{ selDatetime }}</view>
            </view>
            <view class="df_ac red">
                {{selPastDatetime}}
            </view>
            <view class="btns">
                <view class="left">
                    <view class="item" v-for="item in colorOptions" :key="item.name">
                        <view class="box" :style="{ background: item.color }"></view>
                        <view class="">{{ item.name }}</view>
                    </view>
                </view>
                <view class="sub" @click="onSubmit">确认预约</view>
            </view>
        </view>
        <!--  -->
        <!-- 选择车辆 -->
        <u-picker keyName="code" :show="isShowCar" :columns="carsList" @confirm="seletedCar"
            @cancel="isShowCar = false"></u-picker>
        <!-- 日期 -->
        <u-datetime-picker ref="startPick" :show="isShowDate" :minDate="minDate" @confirm="confirmDate"
            @cancel="isShowDate = false" mode="date"></u-datetime-picker>
        <!-- 详情 -->
        <u-popup :show="isShowDetail" :round="12" mode="bottom" @close="isShowDetail = false">
            <view class="detail_modal">
                <view class="title">车辆预约情况</view>
                <view class="h1">{{ activeInfo.carCode }}</view>
                <view class="line">
                    <view class="label">预计用车时段</view>
                    <view class="value" v-if="activeInfo.startTime">{{ activeInfo.startTime.slice(5, 16) }} -
                        {{ activeInfo.endTime.slice(5, 16) }}
                    </view>
                </view>
                <view class="line">
                    <view class="label">目的地</view>
                    <view class="value">{{ activeInfo.addr }}</view>
                </view>
                <view class="line">
                    <view class="label">乘车人数</view>
                    <view class="value" v-if="activeInfo.memberIds">{{ activeInfo.memberIds.split(",").length }}人</view>
                </view>
                <view class="line">
                    <view class="label">用车事由</view>
                    <view class="value">{{ activeInfo.content || "" }}</view>
                </view>
                <view class="line">
                    <view class="label">申请人</view>
                    <view class="value">{{ activeInfo.memberName }}
                        <text class="primaryColor ml12">{{
              activeInfo.memberPhone
            }}</text>
                    </view>
                </view>
                <view class="btn" @click="isShowDetail = false">关闭</view>
            </view>
        </u-popup>
    </view>
</template>
<script>
    import dayjs from 'dayjs'
    import {
        getCarsList,
        carCanReservationDate,
        carUseBookDetail
    } from '@/api'
    export default {
        data() {
            return {
                isShowCar: false,
                isShowDate: false,
                param: {},
                isShowDetail: false,
                activeInfo: {},
                minDate: '',
                carsList: [
                    [{
                        name: 'aa',
                        value: '11'
                    }]
                ],
                timeList: [],
                selDatetime: '',
                selPastDatetime: '',
                colorOptions: [{
                        color: this.$store.state.primaryColor,
                        name: '已选择'
                    },
                    {
                        color: '#F7F7F7',
                        name: '可预约'
                    },
                    {
                        color: '#cccccc',
                        name: '不可预约'
                    },
                ]
            }
        },
        onLoad() {
            this.minDate = new Date().getTime() - (6 * 24 * 60 * 60 * 1000)
            this.initData()
        },
        methods: {
            onSubmit() {
                const {
                    param
                } = this
                const selTimeList = this.timeList.filter(i => i.checked == '1')
                if (selTimeList.length == 0) {
                    return uni.showToast({
                        title: '请先选择用车时间段',
                        icon: 'none'
                    })
                }
                const obj = {
                    carCode: param.carCode,
                    carId: param.carId,
                    startTime: selTimeList[0].startTime,
                    endTime: selTimeList[selTimeList.length - 1].endTime,
                    dateDay: param.queryDate,
                    type: '0'
                }
                uni.navigateTo({
                    url: `/pages/staff/vehicle/apply?carCode=${obj.carCode}&carId=${obj.carId}&startTime=${obj.startTime}&endTime=${obj.endTime}&dateDay=${obj.dateDay}&type=${obj.type}`
                })
                // this.$jump('/pages/staff/vehicle/apply')
            },
            showDate() {
                this.isShowDate = true
                if (!this.param.queryDate) {
                    this.$refs.startPick.innerValue = new Date().getTime()
                }
            },
            datetimeClick(item, index) {
                if (item.carUseBookId) {
                    this.getDetail(item.carUseBookId)
                    return
                }
                if (item.isUse == '1') return
                const {
                    timeList
                } = this
                const selTimeList = timeList.filter(i => i.checked == '1')
                if (selTimeList.length === 0) {
                    this.timeList.forEach((ite, i) => {
                        if (i === index) {
                            ite.checked = '1'
                            this.$forceUpdate()
                        }
                    })
                } else {
                    const findIndex = selTimeList.findIndex(i => i.index === index)
                    console.log('findIndex', findIndex)
                    if (findIndex === -1) {
                        const startNum = index - selTimeList[0].index
                        const endNum = index - selTimeList[selTimeList.length - 1].index
                        if (startNum == 1 || startNum == -1 || endNum == 1 || endNum == -1) {
                            console.log('相邻')
                            item.checked = true
                            this.$forceUpdate()
                        } else {
                            return uni.showToast({
                                title: '请选择相邻的时间段',
                                icon: 'none'
                            })
                        }
                    } else {
                        if (index === selTimeList[0].index || index === selTimeList[selTimeList.length - 1].index) {
                            item.checked = false
                            this.$forceUpdate()
                        } else {
                            return uni.showToast({
                                title: '请先取消最外层的时间段',
                                icon: 'none'
                            })
                        }
                    }
                }
                const selTimeLists = this.timeList.filter(i => i.checked == '1')
                // console.log('selTimeList', selTimeList);
                if (selTimeLists.length === 0) {
                    this.selDatetime = ''
                    this.selPastDatetime = ''
                } else {
                    let pastList = selTimeLists.filter(i => i.pastFlag)
                    if (pastList.length > 0) {
                        this.selPastDatetime = '当前选择包含已经过去时间,请确认后再提交;'
                    } else {
                        this.selPastDatetime = ''
                    }
                    this.selDatetime = this.param.queryDate.slice(5) + ' ' + selTimeLists[0].startHours + '-' + selTimeLists[
                        selTimeLists.length - 1].endHours
                }
            },
            getDetail(id) {
                carUseBookDetail(
                    id
                ).then(res => {
                    this.activeInfo = res.data
                    this.isShowDetail = true
                })
            },
            confirmDate(e) {
                this.param.queryDate = dayjs(e.value).format('YYYY-MM-DD')
                this.isShowDate = false
                if (this.param.carId && this.param.queryDate) {
                    this.gettimes()
                }
            },
            initData() {
                getCarsList({
                    type: 0
                }).then(res => {
                    this.carsList = [res.data]
                })
            },
            gettimes() {
                const {
                    param
                } = this
                carCanReservationDate({
                    dateDay: param.queryDate,
                    carId: param.carId
                }).then(res => {
                    if (res.code === 200) {
                        this.timeList = res.data || []
                        this.timeList.forEach((i, j) => {
                            i.checked = '0',
                                i.index = j
                            // if (dayjs().format('YYYY-MM-DD') == param.queryDate) {
                            // let endTime = new Date(i.endTime).getTime()
                            // let nowTime = new Date().getTime()
                            i.pastFlag = new Date().getTime() > new Date(i.startTime).getTime()
                            // if (endTime < nowTime) {
                            //   i.isUse = 1
                            // }
                            // }
                        })
                    }
                })
            },
            seletedCar(e) {
                const item = e.value[0]
                this.$set(this.param, 'carCode', item.code)
                this.$set(this.param, 'carId', item.id)
                if (this.param.carId && this.param.queryDate) {
                    this.gettimes()
                }
                this.isShowCar = false
            }
        }
    };
</script>
<style lang="scss">
    .main_app {
        .app_header {
            display: flex;
            align-items: center;
            margin: 0 -15rpx;
            .item {
                width: 330rpx;
                height: 72rpx;
                margin: 15rpx;
                padding: 0 30rpx;
                border-radius: 36rpx;
                border: 1rpx solid #e5e5e5;
                display: flex;
                align-items: center;
                justify-content: space-between;
                align-items: center;
            }
        }
        .main_footer {
            position: absolute;
            width: 100%;
            left: 0;
            bottom: 0;
            padding: 20rpx 30rpx 84rpx;
            box-shadow: 0rpx -3rpx 6rpx 0rpx #eeeeee;
            .sel_time {
                color: $uni-color-primary;
            }
            .btns {
                margin-top: 10rpx;
                display: flex;
                justify-content: space-between;
                align-items: center;
                .left {
                    display: flex;
                    .item {
                        display: flex;
                        align-items: center;
                        margin-right: 20rpx;
                        .box {
                            margin-right: 10rpx;
                            width: 32rpx;
                            height: 32rpx;
                        }
                    }
                }
                .sub {
                    width: 184rpx;
                    height: 72rpx;
                    line-height: 72rpx;
                    text-align: center;
                    background: $uni-color-primary;
                    box-shadow: 0rpx -1rpx 0rpx 0rpx #eeeeee;
                    border-radius: 36rpx;
                    font-size: 30rpx;
                    color: #ffffff;
                }
            }
        }
        .time_list {
            display: flex;
            padding: 30rpx 0 240rpx;
            flex-wrap: wrap;
            .item {
                width: 220rpx;
                height: 80rpx;
                line-height: 80rpx;
                text-align: center;
                background: #f7f7f7;
                border-radius: 4rpx;
                margin-bottom: 24rpx;
                font-size: 30rpx;
                margin-right: 15rpx;
                &:nth-of-type(3n) {
                    margin-right: 0;
                }
            }
            .disable {
                background: #f7f7f7;
                color: #cccccc;
            }
            .active {
                background-color: $uni-color-primary;
                color: #fff;
            }
            .hasSub {
                color: #999999;
                background: #cccccc;
            }
        }
    }
    .detail_modal {
        padding: 40rpx 30rpx;
        .title {
            text-align: center;
            font-weight: 600;
            font-size: 32rpx;
            margin-bottom: 40rpx;
        }
        .h1 {
            font-weight: 600;
            font-size: 32rpx;
            margin-bottom: 30rpx;
        }
        .line {
            display: flex;
            margin-bottom: 20rpx;
            .label {
                width: 180rpx;
                color: #888888;
            }
            .value {
                color: #333333;
            }
        }
        .btn {
            margin-top: 230rpx;
            width: 690rpx;
            height: 88rpx;
            line-height: 88rpx;
            text-align: center;
            background: $uni-color-primary;
            border-radius: 44rpx;
            font-weight: 600;
            font-size: 32rpx;
            color: #ffffff;
        }
    }
</style>
h5/pages/staff/vehicle/shiwai.vue
@@ -21,7 +21,7 @@
          <text>*</text>
          <text>预计用车时段</text>
        </view>
        <view class="value" @click="isShowDate = true">
        <view class="value" @click="showDate">
          <text
            class="mr6"
            :style="{ color: param.startTime ? '#000000' : '#999999' }"
@@ -66,11 +66,14 @@
      </view>
    </view>
    <view class="main_footer">
      <text>已选择:</text>
      <text class="sel" v-if="param.startTime"
        >{{ param.startHours }}至{{ param.endHours }}</text
      >
      <text class="btn" :class="{disable: info && info.length > 0}" @click="onSubmit">确认预约</text>
      <view class="df_sb">
                <text>已选择:</text>
                <text class="sel" v-if="param.startTime"
                  >{{ param.startHours }}至{{ param.endHours }}</text
                >
                <text class="btn" :class="{disable: info && info.length > 0}" @click="onSubmit">确认预约</text>
            </view>
            <view class="red">{{placeStr}}</view>
    </view>
    <!--  -->
    <!-- 选择车辆 -->
@@ -97,6 +100,7 @@
        <u-datetime-picker
           mode="datetime"
           :show="isShowDate"
            ref="startPick"
           title="开始时间"
           :minDate="minDate"
           @close="isShowDate = false"
@@ -130,15 +134,22 @@
      carsList: [],
      info: [],
      minDate: ''
      minDate: '',
            placeStr: ''
    }
  },
  onLoad() {
    this.minDate = new Date(dayjs().format('YYYY-MM-DD HH:mm') + ':00').getTime()
    console.log('minDate', this.minDate);
    // this.minDate = new Date(dayjs().format('YYYY-MM-DD HH:mm') + ':00').getTime()
    this.minDate = new Date().getTime() - (6 * 24 * 60 * 60 * 1000)
    this.initData()
  },
  methods: {
        showDate() {
            this.isShowDate = true
            if (!this.param.startTime) {
                this.$refs.startPick.innerValue = new Date().getTime()
            }
        },
    onSubmit() {
      const { param, info } = this
      if (info.length > 0) return
@@ -198,6 +209,12 @@
      if (this.param.carId && this.param.startTime) {
        this.getInfo()
      }
            console.log(e);
            if(new Date(this.param.startTime).getTime() < new Date().getTime() - 60 * 1000){
                this.placeStr = '当前选择包含已经过去时间,请确认后再提交;'
            }else{
                this.placeStr = ''
            }
      this.$forceUpdate()
    },
    endtimeClose() {
@@ -328,9 +345,12 @@
  bottom: 0;
  padding: 20rpx 30rpx 84rpx;
  box-shadow: 0rpx -3rpx 6rpx 0rpx #eeeeee;
  display: flex;
  align-items: center;
  justify-content: space-between;
    .df_sb{
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
  .btn {
    width: 184rpx;
    height: 72rpx;
h5/utils/service.js
@@ -34,7 +34,7 @@
                                duration: 2000
                            })
                        })
                        if (data.code === 500) {
                        if (data.code === 500 || data.code === 5112) {
                            uni.clearStorageSync()
                            return uni.navigateTo({
                                url: '/pages/login/login'
screen/src/assets/base.css
@@ -5,6 +5,19 @@
    background-color 0.5s;
  margin: 0;
}
html {
  -ms-overflow-style: none;
  overflow: -moz-scrollbars-none;
}
html::-webkit-scrollbar {
  width: 0px
}
::-webkit-scrollbar {
  display: none;
}
p{
  padding: 0;
  margin: 0;
screen/src/views/FireFighting.vue
@@ -3,7 +3,7 @@
    <div class="main_app">
      <img src="@/assets/images/FireFighting/bg@2x.png" class="main_bg" alt="" />
      <div class="main_header">
        <img src="@/assets/images/maintitle@2x.png" class="main_header_bg" alt="" />
        <img src="@/assets/images/maintitle.gif" class="main_header_bg" alt="" />
        <div class="title">安泰智慧物流园区-消防态势监控</div>
        <div class="time_wrap">
          <span class="date">{{ date }}</span>
@@ -913,7 +913,6 @@
    .left_box_one {
      width: 100%;
      margin-bottom: 20px;
      border: 1px solid;
      .list_wrap {
        padding: 10px 0;
@@ -977,7 +976,6 @@
      .police_wrap {
        padding: 15px 20px 0;
        height: 225px;
        border: 1px solid;
        .item {
          margin-bottom: 5px;
@@ -996,7 +994,6 @@
    .left_box_three {
      .dispose_wrap {
        border: 1px solid;
        height: 210px;
        width: 100%;
@@ -1176,7 +1173,7 @@
                  font-weight: 500;
                  span {
                    font-style: 14px;
                    font-size: 14px;
                    font-weight: 400;
                  }
                }
@@ -1404,7 +1401,7 @@
        overflow: auto;
        margin-top: 15px;
        scrollbar-width: none;
        .item {
          display: flex;
          font-size: 13px;
screen/src/views/LogisticsCenter.vue
@@ -1497,7 +1497,6 @@
      width: 100%;
      flex: 1;
      /* border: 1px solid; */
      .echart_map {
        width: 100%;
        height: 100%;
@@ -1512,7 +1511,6 @@
    .right_box_one {
      margin-top: 20px;
      padding: 0px 10px 30px 20px;
      border: 1px solid;
      .content_wrap {
        display: flex;
@@ -1609,7 +1607,6 @@
    }
    .right_box_two {
      border: 1px solid;
      padding: 10px 15px;
      .echart4_wrap {
@@ -1624,7 +1621,6 @@
    }
    .right_box_three {
      border: 1px solid;
      .echart5_wrap {
        height: 240px;
screen/src/views/SecurityControl.vue
@@ -775,7 +775,6 @@
.main_content {
  display: flex;
  padding: 20px 25px 0;
  border: 1px solid;
  .left_box {
    width: 360px;