ll
liukangdong
2025-03-06 27e3f8859a099e23baad49db716c48bcdc98adbf
ll
已修改7个文件
242 ■■■■ 文件已修改
admin/src/api/business/hiddenDanger.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/dangerStatic.vue 208 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/platform/queueUp.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/login/login.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/utils/config.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pda/App.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pda/pages/index/queueup.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/business/hiddenDanger.js
@@ -45,3 +45,7 @@
    }
  })
}
// 修改
export function hiddenDangerDataPost (data) {
  return request.post('/visitsAdmin/cloudService/business/hiddenDanger/hiddenDangerData', data)
}
admin/src/views/business/dangerStatic.vue
@@ -3,7 +3,7 @@
    <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getData(1)" @clear="clear"
      @changeForm='changeForm'>
      <template #fastdate>
        <el-radio-group v-model="filters.fastdate" size="small" @input="changeForm">
        <el-radio-group v-model="filters.fastdate" size="small" @input="changeRadio">
          <el-radio-button label="0">当天</el-radio-button>
          <el-radio-button label="6">近7天</el-radio-button>
          <el-radio-button label="29">近30天</el-radio-button>
@@ -13,11 +13,11 @@
    <div class="main_content">
      <div class="type_wrap">
        <div class="title">隐患类型统计</div>
        <div class="type" ref="typeRef"></div>
        <div class="echart1" ref="typeRef"></div>
      </div>
      <div class="dept_wrap">
        <div class="title">隐患归属部门统计</div>
        <div class="dept" ref="deptRef"></div>
        <div class="echart2" ref="deptRef"></div>
      </div>
    </div>
  </div>
@@ -25,14 +25,20 @@
<script>
import QueryForm from '@/components/common/QueryForm'
import echarts from 'echarts'
import * as echarts from 'echarts'
import { hiddenDangerDataPost } from '@/api/business/hiddenDanger'
import dayjs from 'dayjs'
export default {
  components: {
    QueryForm,
  },
  data() {
    return {
      filters: {},
      filters: {
        fastdate: '0',
        queryStartTime: '',
        queryEndTime: ''
      },
      queryFormConfig: {
        formItems: [
          {
@@ -40,16 +46,14 @@
            type: 'select',
            label: '状态',
            options: [
              { label: '访客申请', value: '0' },
              { label: '访客报备', value: '1' },
              { label: '用车申请', value: '2' },
              { label: '隐患随手拍', value: '3' },
              { label: '物流车申请', value: '6' }
              { label: '待处理', value: '0' },
              { label: '已处理', value: '1' },
              { label: '不处理', value: '2' },
            ]
          },
          {
            filed1: 'startDate',
            filed2: 'endDate',
            filed1: 'queryStartTime',
            filed2: 'queryEndTime',
            type: 'datetime',
            label: '提报时间'
          },
@@ -61,17 +65,167 @@
        ],
        online: true
      },
      typeList: [],
      deptList: [],
    }
  },
  methods: {
    getData(page) {
      console.log(this.filters)
  mounted() {
    this.changeRadio('0')
    },
    changeForm(form) {
      console.log(form)
  methods: {
    changeRadio(day) {
      const arr = [dayjs().subtract(day, 'day').format('YYYY-MM-DD') + ' 00:00:00', dayjs().format('YYYY-MM-DD') + ' 23:59:59']
      this.filters.queryStartTime = arr[0]
      this.filters.queryEndTime = arr[1]
      this.getData()
    },
    getData(page) {
      hiddenDangerDataPost({ ...this.filters }).then(res => {
        if (res) {
          this.typeList = res.cateList || []
          this.deptList = res.departmentList || []
          this.initType()
          this.initDept()
        }
      })
    },
    changeForm(e) {
      this.getData()
    },
    initType() {
      const myChart = echarts.init(document.querySelector('.echart1'))
      let total = 0
      this.typeList.forEach(i => {
        total += i.total
      })
      let colors = ['#d75a44', '#e39f4d', '#7ac7f6', '#7ac7f6', '#4469ee', '#698af0', '#9fb5f4', '#b6c7f7', '#c8d5f8']
      let option = {
        title: [
          {
            text: '隐患总数',
            top: '46%',
            left: '46%',
            textStyle: {
              color: '#666666',
              fontSize: 16,
            },
          }, {
            text: total,
            top: '50%',
            left: '48%',
            textStyle: {
              color: '#080404',
              fontSize: 24,
              fontWeight: 'bold',
            },
          }],
        legend: {
          left: 'center',
          bottom: '8%',
          itemGap: 30,
          itemWidth: 30,
          icon: 'circle',
          formatter: (name) => {
            const item = this.typeList.filter((item) => item.name === name)[0]
            if (item) {
              return ` ${name} ${item.total} | ${item.rata}%`
            } else {
              return ` ${name} 0 | 0%`
            }
          }
        },
        series: [
          {
            name: 'Access From',
            type: 'pie',
            radius: ['28%', '46%'],
            label: {
              formatter: "{a|{b}}\n\n{c} | {d}%",
              rich: {
                a: {
                  color: '#333333',
                  fontSize: 14,
                  fontWeight: 500
                }
              }
            },
            labelLine: {
              showAbove: true,
              show: true,
              length: 24,
              length2: 64,
              lineStyle: {
                width: 2      // 线条宽度
              }
            },
            data: this.typeList.map((i, index) => {
              return {
                value: i.total,
                name: i.name,
                itemStyle: {
                  color: colors[index]
                }
              }
            })
          }
        ]
      }
      myChart.setOption(option)
      window.addEventListener('resize', function () { // 执行
        myChart.resize()
      })
    },
    initDept() {
      const myChart = echarts.init(document.querySelector('.echart2'))
      let option = {
        xAxis: {
          type: 'category',
          data: this.deptList.map(i => i.name),
          axisLabel: {
            color: '#333333',
            fontSize: 14,
            fontWeight: 'bold'
          }
        },
        yAxis: {
          type: 'value',
          name: '隐患数',
          axisLine: {
            show: true,
          },
        },
        series: [
          {
            data: this.deptList.map(i => i.total),
            type: 'bar',
            barWidth: 40,
            itemStyle: {
              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                { offset: 0, color: '#d75e45' }, // 渐变起始色
                { offset: 1, color: '#db924c' }  // 渐变终止色
              ])
            },
            label: {
              show: true,      // 显示标签
              position: 'top', // 让标签显示在柱子顶部
              color: '#666666',   // 文字颜色
              fontSize: 14,    // 文字大小
            }
          }
        ]
      }
      myChart.setOption(option)
      window.addEventListener('resize', function () { // 执行
        myChart.resize()
      })
    },
    clear() {
      this.filters = {}
      this.getData()
    }
  }
}
@@ -84,7 +238,8 @@
.main_content {
  display: flex;
  height: calc(100% - 110px);
  height: calc(100% - 100px);
  .title {
    font-weight: 600;
    font-size: 16px;
@@ -96,17 +251,26 @@
  .type_wrap {
    flex: 5;
    flex-shrink: 0;
    border: 1px solid #E5E5E5;
    height: 100%;
    height: calc(100% - 20px);
    border-right: 12px solid #f7f7f7;
    .echart1 {
      width: 100%;
      height: calc(100% - 60px);
    }
  }
  .dept_wrap {
    flex: 4;
    flex-shrink: 0;
    border: 1px solid #E5E5E5;
    height: 100%;
    height: calc(100% - 20px);
    padding-left: 20px;
    .echart2 {
      width: 100%;
      height: calc(100% - 60px);
    }
  }
}
</style>
admin/src/views/platform/queueUp.vue
@@ -21,7 +21,7 @@
        <span></span>
      </div>
    </div>
    <el-table v-loading="loading" :data="dataList" stripe row-key="id" default-expand-all>
    <el-table  class="mb20" v-loading="loading" :data="dataList" stripe row-key="id" default-expand-all>
      <el-table-column type="index" label="序号" width="80" />
      <el-table-column label="车牌号" width="130">
        <template slot-scope="{ row }">
@@ -55,6 +55,13 @@
        </template>
      </el-table-column>
      <el-table-column prop="signDate" label="签到时间" min-width="150" />
      <el-table-column label="状态" align="center" width="80">
        <template slot-scope="{ row }">
          <span v-if="row.status == 2" class="red">月台等待</span>
          <span v-if="row.status == 3" class="primaryColor">入园等待</span>
          <span v-if="row.status == 7" class="primaryColor">转移中</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" width="100" fixed="right">
        <template slot-scope="{ row }">
          <el-button v-if="row.billCode" type="text" @click="handleDetail(row)"
h5/pages/login/login.vue
@@ -41,7 +41,7 @@
    export default {
        data() {
            return {
                code: '11'
                code: ''
            }
        },
        onLoad(option) {
h5/utils/config.js
@@ -1,8 +1,8 @@
export const baseUrl = 'zhyq_interface/'
// export const baseUrl = 'zhyq_interface/'
// export const baseUrl = 'http://192.168.0.173/gateway_interface/'
// export const baseUrl = 'http://10.50.250.253:8088/gateway_interface/'
// export const baseUrl = 'https://atwl.ahzyssl.com/zhyq_interface/'
export const baseUrl = 'https://atwl.ahzyssl.com/zhyq_interface/'
export const app_url = 'https://atwl.ahzyssl.com/zhyq_h5/#/'
pda/App.vue
@@ -204,7 +204,7 @@
  font-size: 28rpx;
}
.primaryColor {
  color: $uni-color-primary;
  color: $uni-color-primary !important;
}
.avatar {
  width: 64rpx;
pda/pages/index/queueup.vue
@@ -34,9 +34,9 @@
            <text>·</text>
            <text>{{ item.carCodeFront.slice(2) }}</text>
          </view>
          <view class="status" v-if="item.signDate"
            >签到时间:{{ item.signDate.slice(5, 16) }}</view
          >
          <view class="status green" v-if="item.status == 2">月台等待</view >
          <view class="status" v-if="item.status == 3">入园等待</view >
          <view class="status" v-if="item.status == 7">转移中</view >
        </view>
        <view class="line" v-if="item.billCode">
          <text class="label">运输单号</text>
@@ -65,6 +65,10 @@
        <view class="line" v-if="item.carrierName">
          <text class="label">运输公司</text>
          <text class="value">{{ item.carrierName }}</text>
        </view>
                <view class="line">
                  <text class="label primaryColor">签到时间</text>
                  <text class="value primaryColor" v-if="item.signDate">{{ item.signDate.slice(5, 16) }}</text>
        </view>
        <!-- <view class="btns">
          <view class="btn active">入园</view>
@@ -301,6 +305,9 @@
          font-size: 30rpx;
          color: $uni-color-primary;
        }
                .green{
                    color: #00BA67;
                }
      }
      .line {
        display: flex;