af8a72f0f43279cfe778af0ba683917032d95746..155dbc01da52ccee7a968bfe7297b5fc0357e6bb
2026-03-20 zxl
Merge remote-tracking branch 'origin/show-demo' into show_demo
155dbc 对比 | 目录
2026-03-20 zxl
修改
d5f3ca 对比 | 目录
2026-03-20 peng
调整
8caf42 对比 | 目录
6个文件已修改
186 ■■■■■ 已修改文件
src/components/menu/index.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/analysisScreen/operationBigdata.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dashboard/Analysis.vue 77 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataAnalysis/components/CarInfoDetail.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/jyz/CameraList.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/menu/index.js
@@ -112,6 +112,7 @@
      return null
    },
    renderMenuItem(menu) {
      // === 注释掉机构类型限制,只要配置了权限就能看到菜单 ===
      let userDepartCategory = JSON.parse(localStorage.getItem("userDepartInfo")).orgCategory
      if(userDepartCategory==3){
        if(menu.meta.title=='运营分析(机构)'||menu.meta.title=='告警分析(机构)'){
@@ -131,6 +132,7 @@
          menu = Object.assign(menu, { hidden: true })
        }
      }
      // === 机构类型限制注释结束 ===
      const target = menu.meta.target || null
      let tag = target && 'a' || 'router-link'
      let props = { to: { name: menu.name } }
@@ -169,7 +171,7 @@
          this.selectedKeys=this.chooseKeys.length?this.chooseKeys:['/dashboard/analysis']
        }, 100);
      }
    },
    renderSubMenu(menu) {
      const itemArr = []
src/views/analysisScreen/operationBigdata.vue
@@ -1,7 +1,8 @@
<template>
  <div>
    <div class="content">
      <div class="header_ct">{{ localInfo.operationViewName }}</div>
      <div class="header_ct"><span class="blue-text">{{ localInfo.operationViewName }}</span>
        可视化大屏</div>
      <div class="tab_page">
        <div class="operation">运营数据分析</div>
        <div class="alarm" @click="goAlarmPage">告警数据分析</div>
@@ -186,8 +187,8 @@
          <div class="block monthly_sales_statis">
            <div class="block_title">
              <div>
                <span class="blue_text">销售</span>
                <span>趋势</span>
                <span class="blue_text">月度销售</span>
                <span>统计</span>
              </div>
            </div>
            <img class="title_line" src="@/assets/img/bigdata/daoh.png" alt="" />
@@ -274,8 +275,10 @@
    //获取运营概况数据
    getOverviewData() {
      getAction('/jyz/operationData/overview', {}).then((res) => {
        console.log('运营概况数据')
        console.log(res)
        this.overviewData = res.result
        this.setTurnInRateChart()
        this.setRefuelingRateChart()
      })
@@ -1367,6 +1370,10 @@
    text-align: center;
    font-size: 40px;
    color: #fff;
    .blue-text {
      color: #5a81f9;
    }
  }
  .tab_page {
    display: flex;
src/views/dashboard/Analysis.vue
@@ -17,7 +17,7 @@
            placeholder="请选择终端设备"
            style="width: 200px"
            v-model="selectCameraCode"
            @change="alarmLogInit"
            @change="onCameraChange"
          >
            <a-select-option :value="''" :key="''">全部</a-select-option>
            <a-select-option :value="item.code" v-for="item in cameraList" :key="item.code">
@@ -111,7 +111,7 @@
    AnalysisDetailModal,
  },
  data() {
    data() {
    return {
      selectOrg: '',
      show: false,
@@ -122,16 +122,14 @@
      cameraList: [],
      selectCameraCode: '',
      videoConfig: {
        variable: 'player', //播放函数名称,该属性必需设置,值等于下面的new ckplayer()的对象
        // live: true,
        variable: 'player',
        backLive: false,
        track: null, //字幕
        track: null,
        crossorigin: '',
        playbackrateOpen: true,
        autoplay: true,
        loop: true, //是否需要循环播放
        video: 'https://ckplayer-video.oss-cn-shanghai.aliyuncs.com/mp4/1_640x480.mp4', //视频地址,
        // loaded: "loadedHandler", //播放器加载完成后调用该函数
        loop: true,
        video: '',
      },
      categoryOptions: [
        {
@@ -160,6 +158,8 @@
      url: {
        list: '/jyz/oilEvent/eventList',
        eventPopup: '/jyz/oilEvent/eventPopup',
        localVideoRandom: '/jyz/video/random',
        randomImages: '/jyz/video/random-images',
      },
    }
  },
@@ -176,25 +176,56 @@
  mounted() {
    // this.one_video_ckplayera()
    this.getCameraList()
    this.getLocalVideo()
    this.timer = setInterval(this.playAudio, 30000)
  },
  methods: {
    // 获取本地随机视频
    getLocalVideo() {
      getAction(this.url.localVideoRandom).then((res) => {
        if (res.code === 200 && res.result) {
          this.hasVideo = true
          this.eventVideoPlay(res.result)
        }
      })
    },
    assignRandomImages(recordList) {
      if (!recordList || !recordList.length) {
        return Promise.resolve([])
      }
      return getAction(this.url.randomImages, { count: recordList.length })
        .then((imageRes) => {
          if (imageRes.code === 200 && Array.isArray(imageRes.result) && imageRes.result.length) {
            return recordList.map((item, index) => {
              return {
                ...item,
                imgPath: imageRes.result[index % imageRes.result.length],
              }
            })
          }
          return recordList
        })
        .catch(() => recordList)
    },
    // Alarm Log 告警记录
    alarmLogInit(isFirst) {
      getAction(this.url.list, { limit: 20, cameraCode: this.selectCameraCode }).then((res) => {
        if (res.code === 200) {
          this.takeList = res.result
          if (res.result.length > 0 && isFirst) {
            if (res.result[0].videoPath) {
              this.hasVideo = true
              this.eventVideoPlay(res.result[0].videoPath)
            } else {
              this.hasVideo = false
              this.player && this.player.remove()
          const sourceList = Array.isArray(res.result) ? res.result : []
          this.assignRandomImages(sourceList).then((finalList) => {
            this.takeList = finalList
            if (finalList.length > 0 && isFirst) {
              if (finalList[0].videoPath) {
                this.hasVideo = true
                this.eventVideoPlay(finalList[0].videoPath)
              } else {
                this.hasVideo = false
                this.player && this.player.remove()
              }
            }
          }
          })
        } else {
          this.$message.error('获取失败!')
        }
@@ -230,12 +261,16 @@
      this.videoConfig.video = video
      this.player && this.player.remove()
      var videoObject = {
        ...this.videoConfig, // 通用配置
        container: '.one_video', //“#”代表容器的ID,“.”或“”代表容器的class
        ...this.videoConfig,
        container: '.one_video',
      }
      this.player = new ckplayer(videoObject) //初始化播放器
      this.player = new ckplayer(videoObject)
    },
    handleScroll() {},
    onCameraChange() {
      this.alarmLogInit(false)
      this.getLocalVideo()
    },
    onTreeNodeSelect(id, node) {
      this.selectOrg = node.selectedNodes[0].data.props.orgCode
      console.log(id, this.selectOrg)
src/views/dataAnalysis/components/CarInfoDetail.vue
@@ -14,7 +14,8 @@
        <a-col :span="6" style="border-right: 1px solid #343a44">
          <div class="flex" style="justify-content: space-between">
            <viewer>
              <img class="car_img" :src="detailData.imgPath" alt="" />
              <!-- <img class="car_img" :src="detailData.imgPath2" alt="" /> -->
              <img class="car_img" :src="getImgUrl(detailData.imgPath2)" alt="" />
            </viewer>
            <div class="flex flex-column" style="justify-content: space-between; height: 90px; align-items: flex-start">
              <div class="blue_text" style="font-size: 16px">{{ detailData.licenseNum }}</div>
@@ -88,7 +89,7 @@
          >
            <span slot="imgPath" slot-scope="imgPath">
              <viewer v-if="imgPath">
                <img :src="imgPath" alt="" style="width:100px;"/>
                <img :src="getImgUrl(imgPath)" alt="" style="width:100px;"/>
              </viewer>
              <span v-else>--</span>
            </span>
@@ -199,11 +200,19 @@
      oilPositionChart: null, //加油位偏好echarts
      visible: false,
      symIng: img,
      staticUrl: window._CONFIG['staticDomainURL'],
      detailData: {
        labelName: '',
      },
      columns: [
        {
        // {
        //   title: '进站图片',
        //   align: 'center',
        //   dataIndex: 'imgPath',
        //   width: 100,
        //   scopedSlots: { customRender: 'imgPath' },
        // },
         {
          title: '进站图片',
          align: 'center',
          dataIndex: 'imgPath',
@@ -266,7 +275,20 @@
  },
  props: ['orgCode'],
  methods: {
    getImgUrl(path) {
      if (!path) return this.symIng
      if (path.startsWith('http://') || path.startsWith('https://')) return path
      if (path.includes(':\\') || path.includes('/')) {
        try {
          return require('@/image/' + path.split(/[\\/]/).pop())
        } catch (e) {
          return this.symIng
        }
      }
      return this.staticUrl + path
    },
    show(data) {
      console.log(data)
      this.detailData = data
      this.visible = true
      this.loadData()
src/views/jyz/CameraList.vue
@@ -31,35 +31,8 @@
            <a-col :xl="6" :lg="7" :md="8" :sm="24">
              <a-space>
                <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
                <!--<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>-->
                <!--<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
                <!--<a-button type="primary" icon="download" @click="handleExportXls('Camera')">导出</a-button>-->
                <!--<a-button type="primary" icon="upload" @click="showImport">导入</a-button>-->
                <!--<j-import-modal ref="importModal" :url="url.importXlsUrl" @ok="handleImportExcel"></j-import-modal>-->
                <!--<a-upload-->
                <!--name="file"-->
                <!--:showUploadList="false"-->
                <!--:headers="tokenHeader"-->
                <!--:action="getImportXlsUrl"-->
                <!--@change="handleImportExcel"-->
                <!--&gt;-->
                <!--<a-button type="primary" icon="upload">-->
                <!--批量导入-->
                <!--</a-button>-->
                <!--</a-upload>-->
                <!--<a-dropdown v-if="selectedRowKeys.length > 0">-->
                <!--<a-menu slot="overlay">-->
                <!--<a-menu-item key="1" @click="batchDel">-->
                <!--<a-icon type="delete" />-->
                <!--删除-->
                <!--</a-menu-item>-->
                <!--</a-menu>-->
                <!--<a-button style="margin-left: 8px">-->
                <!--批量操作-->
                <!--<a-icon type="down" />-->
                <!--</a-button>-->
                <!--</a-dropdown>-->
                <a-button type="primary" @click="handleAdd" icon="plus">新增</a-button>
                <a-button type="primary" icon="download" @click="handleExportXls('Camera')">导出</a-button>
              </a-space>
            </a-col>
          </span>
vue.config.js
@@ -1,6 +1,7 @@
const path = require('path')
const CompressionPlugin = require('compression-webpack-plugin')
const GenerateFilePlugin = require('generate-file-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
function resolve(dir) {
  return path.join(__dirname, dir)
@@ -20,6 +21,15 @@
  // 打包app时放开该配置
  // publicPath:'./',
  configureWebpack: config => {
    // 复制 video-test 文件夹到 public 目录 (已注释,不再自动复制)
    // config.plugins.push(
    //   new CopyWebpackPlugin([{
    //     from: path.resolve(__dirname, '../video-test'),
    //     to: 'video-test',
    //     ignore: ['.*']
    //   }])
    // )
    // 生产环境取消 console.log
    if (process.env.NODE_ENV === 'production') {
      config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true
@@ -101,18 +111,17 @@
  devServer: {
    port: 10086,
    open: true,
    host:"0.0.0.0"
    // public: '25.30.13.141:3000'
    // proxy: {
    //   '/cube': {
    //     target: 'http://localhost:8080', // 请求本地 cube后台项目
    //     ws: false,
    //     changeOrigin: true,
    //     pathRewrite: {
    //       '/cube': '' // 默认所有请求都加了cube前缀,需要去掉
    //     }
    //   }
    // }
    host:"0.0.0.0",
    proxy: {
      '/cube': {
        target: 'http://localhost:8080',
        ws: false,
        changeOrigin: true,
        pathRewrite: {
          '/cube': ''
        }
      }
    }
  },
  lintOnSave: undefined