zhanghua
2022-11-01 3b256e6746661117724e7222fb509284ec9affde
智能巡查页面
2个文件已修改
10个文件已添加
577 ■■■■■ 已修改文件
src/api/intelligentPatrol/statistics.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/index.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/intelligentPatrol/statistics.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/intelligentPatrol/illegalSearch/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/intelligentPatrol/statistics/unlawful/area/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/intelligentPatrol/statistics/unlawful/point/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/intelligentPatrol/statistics/unlawful/shop/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/intelligentPatrol/statistics/unlawful/time/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/intelligentPatrol/statistics/unlawful/type/index.vue 356 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/intelligentPatrol/studyJudge/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/intelligentPatrol/trendAnalysis/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/intelligentPatrol/statistics.js
New file
@@ -0,0 +1,19 @@
import axios from "axios";
import {
    getToken
} from '@/utils/helper'
const baseUrl = '/sccg/intelligentPatrol/statistics'
const token = {
    'Authorization': getToken()
}
export default {
    // 按违规类型统计
    searchByType: (data) => axios({
        method: 'get',
        url: baseUrl + '/unlawful/type',
        headers: {
            ...token
        },
        params: data
    }),
};
src/router/index.js
@@ -1,8 +1,7 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [
  {
const routes = [{
    path: "/",
    name: 'index',
    redirect: '/home'
@@ -14,18 +13,15 @@
    meta: {
      needLogin: true,
    },
    children: [
      {
    children: [{
        path: 'system',
        name: 'system',
        component: () => import('@/views/systemSetting'),
        children: [
          {
        children: [{
            path: 'userSetting',
            name: 'userSetting',
            component: () => import('@/views/systemSetting/baseSetting'),
            children: [
              {
            children: [{
                path: "user",
                name: "user",
                component: () => import('@/views/systemSetting/baseSetting/user')
@@ -47,8 +43,7 @@
            path: 'platform',
            name: 'platform',
            component: () => import('@/views/systemSetting/platform'),
            children: [
              {
            children: [{
                path: 'portalSetting',
                name: 'portalSetting',
                component: () => import('@/views/systemSetting/platform/portalSetting')
@@ -69,8 +64,7 @@
            path: 'device',
            name: 'device',
            component: () => import('@/views/systemSetting/device'),
            children: [
              {
            children: [{
                path: 'bayonet',
                name: 'bayonet',
                component: () => import('@/views/systemSetting/device/bayonet')
@@ -89,8 +83,7 @@
                path: 'handheldTerminal',
                name: 'handheldTerminal',
                component: () => import('@/views/systemSetting/device/handheldTerminal'),
              }
              ,
              },
              {
                path: 'loudspeaker',
                name: 'loudspeaker',
@@ -104,13 +97,11 @@
        path: "operate",
        name: 'operate',
        component: () => import('@/views/operate'),
        children: [
          {
        children: [{
            path: 'baseSetting',
            name: 'baseSetting',
            component: () => import('@/views/operate/baseSetting'),
            children: [
              {
            children: [{
                path: "violation",
                name: 'violation',
                component: () => import('@/views/operate/baseSetting/violation'),
@@ -126,8 +117,7 @@
            path: 'casepool',
            name: 'casepool',
            component: () => import('@/views/operate/disposal'),
            children: [
              {
            children: [{
                path: 'pool',
                name: 'pool',
                component: () => import('@/views/operate/disposal/casepool/pool'),
@@ -158,8 +148,7 @@
            path: "fivepack",
            name: 'fivepack',
            component: () => import('@/views/operate/fivepack'),
            children: [
              {
            children: [{
                path: "shop",
                name: 'shop',
                component: () => import('@/views/operate/fivepack/shop'),
@@ -180,8 +169,7 @@
            path: 'rectification',
            name: 'rectification',
            component: () => import('@/views/operate/rectification'),
            children: [
              {
            children: [{
                path: "taskList",
                name: 'taskList',
                component: () => import('@/views/operate/rectification/taskList'),
@@ -208,8 +196,7 @@
            name: 'management',
            component: () => import('@/views/operate/management'),
            redirect: '/home/operate/management/myIndex',
            children: [
              {
            children: [{
                path: 'myIndex',
                name: 'myIndex',
                component: () => import('@/views/operate/management/myIndex'),
@@ -225,8 +212,7 @@
            path: 'car',
            name: 'car',
            component: () => import('@/views/operate/car'),
            children: [
              {
            children: [{
                path: 'carIndex',
                name: 'carIndex',
                component: () => import('@/views/operate/car/myIndex'),
@@ -247,8 +233,7 @@
            path: 'message',
            name: 'message',
            component: () => import('@/views/operate/message'),
            children: [
              {
            children: [{
                path: 'messageIndex',
                name: 'messageIndex',
                component: () => import('@/views/operate/message/myIndex'),
@@ -292,6 +277,49 @@
        name: 'info',
        component: () => import('@/views/info')
      },
      //  智能巡查
      {
        path: 'studyJudge', // 预警研判
        name: 'studyJudge',
        component: () => import('@/views/intelligentPatrol/studyJudge'),
      },
      {
        path: 'illegalSearch', // 违规检索
        name: 'illegalSearch',
        component: () => import('@/views/intelligentPatrol/illegalSearch'),
      },
      {
        path: 'trendAnalysis', // 趋势分析
        name: 'trendAnalysis',
        component: () => import('@/views/intelligentPatrol/trendAnalysis'),
      },
      // 违法统计
      {
        path: 'typeStatistics', // 按违规类型统计
        name: 'typeStatistics',
        component: () => import('@/views/intelligentPatrol/statistics/unlawful/type'),
      },
      {
        path: 'pointStatistics', //按点位统计
        name: 'pointStatistics',
        component: () => import('@/views/intelligentPatrol/statistics/unlawful/point'),
      },
      {
        path: 'timeStatistics', //按时间统计
        name: 'timeStatistics',
        component: () => import('@/views/intelligentPatrol/statistics/unlawful/time'),
      },
      {
        path: 'areaStatistics', //按区域统计
        name: 'areaStatistics',
        component: () => import('@/views/intelligentPatrol/statistics/unlawful/area'),
      },
      {
        path: 'shopStatistics', //门前三包统计
        name: 'shopStatistics',
        component: () => import('@/views/intelligentPatrol/statistics/unlawful/shop'),
      }
    ]
  },
  {
@@ -319,7 +347,10 @@
    name: "/success",
    component: () => import('@/views/info/Success'),
  },
  { path: '*', redirect: '/404' }
  {
    path: '*',
    redirect: '/404'
  }
]
const router = new VueRouter({
@@ -331,4 +362,4 @@
router.push = function push(location) {
  return originalPush.call(this, location).catch(err => err);
}
export default router
export default router
src/store/index.js
@@ -6,6 +6,7 @@
import loudspeaker from './system/loudspeaker'
import handheldTerminal from './system/handheldTerminal'
import shortMessage from './operate/managenment/shortMessage'
import statistics from './intelligentPatrol/statistics'
Vue.use(Vuex)
export default new Vuex.Store({
@@ -19,6 +20,7 @@
    bayonet,
    shortMessage,
    loudspeaker,
    handheldTerminal
    handheldTerminal,
    statistics
  }
})
src/store/intelligentPatrol/statistics.js
New file
@@ -0,0 +1,12 @@
import api from "@/api/intelligentPatrol/statistics";
export default {
    namespaced: true,
    state: {
        userInfo: {},
    },
    actions: {
        searchByType(context, params) {
            return api.searchByType(params);
        }
    },
};
src/views/intelligentPatrol/illegalSearch/index.vue
New file
@@ -0,0 +1,13 @@
<template>
  <div>违规检索</div>
</template>
<script>
export default {
}
</script>
<style>
</style>
src/views/intelligentPatrol/statistics/unlawful/area/index.vue
New file
@@ -0,0 +1,13 @@
<template>
  <div>按区域统计</div>
</template>
<script>
export default {
}
</script>
<style>
</style>
src/views/intelligentPatrol/statistics/unlawful/point/index.vue
New file
@@ -0,0 +1,13 @@
<template>
  <div>按点位统计</div>
</template>
<script>
export default {
}
</script>
<style>
</style>
src/views/intelligentPatrol/statistics/unlawful/shop/index.vue
New file
@@ -0,0 +1,13 @@
<template>
  <div>门前三包统计</div>
</template>
<script>
export default {
}
</script>
<style>
</style>
src/views/intelligentPatrol/statistics/unlawful/time/index.vue
New file
@@ -0,0 +1,13 @@
<template>
  <div>按时间统计</div>
</template>
<script>
export default {
}
</script>
<style>
</style>
src/views/intelligentPatrol/statistics/unlawful/type/index.vue
New file
@@ -0,0 +1,356 @@
<template>
  <div class="list">
    <header>
      <div class="header-content">
        <div class="search">
          <span style="padding-right: 20px">时间范围:</span>
          <el-date-picker
            v-model="value2"
            type="daterange"
            align="right"
            unlink-panels
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            :picker-options="pickerOptions"
          >
          </el-date-picker>
        </div>
        <div class="find">
          <el-button
            type="primary"
            icon="el-icon-search"
            @click="setTableDataHandle"
            >查询</el-button
          >
          <el-button icon="el-icon-delete-solid" @click="resetTableData"
            >重置</el-button
          >
        </div>
        <div class="main-nav-right">
          <el-button type="primary" icon="el-icon-upload2" @click="handleExport"
            >导出</el-button
          >
        </div>
      </div>
    </header>
    <main>
      <div class="main-content">
        <!-- 数据展示 -->
        <el-table
          ref="multipleTable"
          :header-cell-style="{
            background: '#06122c',
            'font-size': '12px',
            color: '#4b9bb7',
            'font-weight': '650',
            'line-height': '45px',
          }"
          :row-class-name="tableRowClassName"
          :data="list"
          style="width: 100%"
        >
          <el-table-column type="selection" min-width="5"> </el-table-column>
          <el-table-column prop="name" label="类型名称" min-width="10">
          </el-table-column>
          <el-table-column prop="count" label="事件总数" min-width="5">
          </el-table-column>
          <el-table-column prop="ratio" label="占比" min-width="5">
          </el-table-column>
          <el-table-column prop="register" label="立案" min-width="5">
          </el-table-column>
          <el-table-column prop="notRegister" label="暂不立案" min-width="5">
          </el-table-column>
          <el-table-column prop="closing" label="结案" min-width="5">
          </el-table-column>
          <el-table-column prop="relearn" label="再学习" min-width="5">
          </el-table-column>
          <el-table-column prop="checked" label="已审核" min-width="5">
          </el-table-column>
          <el-table-column prop="checkedRatio" label="审核率" min-width="5">
          </el-table-column>
          <el-table-column prop="registerRatio" label="立案率" min-width="5">
          </el-table-column>
        </el-table>
      </div>
      <!-- tools -->
      <div class="tools">
        <div class="funs"></div>
        <div class="pagination">
          <el-pagination
            background
            :current-page="currentPage"
            layout="prev, pager, next"
            :total="totalNum"
            :page-size="pageSize"
            @current-change="changeCurrentPage"
            @prev-click="handlePrev"
            @next-click="handleNext"
          >
          </el-pagination>
        </div>
      </div>
    </main>
  </div>
</template>
  <script>
import { createNamespacedHelpers } from "vuex";
const { mapActions } = createNamespacedHelpers("statistics");
export default {
  data() {
    return {
      pickerOptions: {
        shortcuts: [
          {
            text: "最近一周",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近一个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近三个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
              picker.$emit("pick", [start, end]);
            },
          },
        ],
      },
      value1: "",
      value2: "",
      list: [],
      totalNum: 0,
      pageSize: 10,
      currentPage: 1,
    };
  },
  created() {
    this.setTableData();
  },
  methods: {
    ...mapActions(["searchByType"]),
    handleExport(e) {},
    setTableDataHandle(e) {},
    resetTableData(e) {},
    // 设置表格斑马纹
    tableRowClassName({ row, rowIndex }) {
      if ((rowIndex + 1) % 2 == 0) {
        return "warning-row";
      } else {
        return "success-row";
      }
      return "";
    },
    // 设置tableData
    setTableData() {
      const { currentPage, pageSize, context } = this;
      this.searchByType({
        currentPage,
        pageSize,
        beginTime:'2022-05-01 00:00:00',
        endTime:'2022-09-01 00:00:00'
      }).then((res) => {
        if (res.data.code == 200) {
          this.list = res.data.data.records;
          this.totalNum = res.data.data.total;
        }
      });
    },
    // 当前页改变触发事件
    changeCurrentPage(page) {
      this.currentPage = page;
      this.setTableData();
    },
    // 上一页点击事件
    handlePrev(page) {
      this.currentPage = page;
      this.setTableData();
    },
    // 下一页点击事件
    handleNext(page) {
      this.currentPage = page;
      this.setTableData();
    },
  },
};
</script>
  <style lang="scss" scoped>
.list {
  text-align: left;
  margin: 10px 20px;
  color: #4b9bb7;
  header {
    background-color: #09152f;
    border: 1pox solid #fff;
    .header-content {
      padding: 0 40px;
      display: flex;
      line-height: 100px;
      justify-content: space-between;
      align-items: center;
      .search {
        // display: flex;
        justify-content: flex-start;
        span {
          flex: 1;
        }
        .el-input {
          flex: 2;
          color: #1d3f57;
          &::v-deep .el-input__inner {
            background-color: #09152f;
            border: 1px solid #17324c;
          }
        }
        .el-select {
          flex: 1;
        }
        .el-date-editor {
          flex: 1;
        }
        :deep(.el-range-input) {
          background-color: #09152f;
        }
      }
      .find {
        margin-right: auto;
        margin-left: 30px;
      }
    }
  }
  :deep(.el-range-separator) {
    padding: 0px !important;
  }
  main {
    background-color: #09152f;
    margin-top: 20px;
    padding-bottom: 50px;
    border: 1pox solid #fff;
    .main-title {
      line-height: 60px;
      padding: 10px 20px;
    }
    .tools {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 20px;
      .funs {
        display: flex;
        .funsItem {
          line-height: 28px;
          display: flex;
          align-items: center;
          border: 1px solid #17324c;
          border-radius: 4px;
          font-size: 12px;
          margin-left: 10px;
          .el-checkbox {
            width: 80px;
            padding: 0 10px;
          }
          .el-select {
            width: 120px;
          }
          &::v-deep .el-input__inner {
            border: none;
            background-color: #09152f;
          }
          &:hover {
            border: 1px solid #4b9bb7;
          }
          &:hover .el-checkbox {
            color: #4b9bb7;
          }
        }
      }
      .pagination {
        margin-top: 50px;
        display: flex;
        line-height: 50px;
        justify-content: center;
        .el-pagination {
          &::v-deep li,
          &::v-deep .btn-prev,
          &::v-deep .btn-next {
            background-color: #071f39;
            color: #4b9bb7;
          }
          &::v-deep .active {
            background-color: #409eff;
            color: #fff;
          }
        }
      }
    }
    &::v-deep .warning-row {
      background-color: #06122c;
    }
    &::v-deep .success-row {
      background-color: #071f39;
    }
    .operationBox {
      display: flex;
    }
    .el-divider {
      background-color: #4b9bb7;
    }
    .el-table {
      color: #4b9bb7;
      font-size: 10px;
      .operation {
        display: flex;
        .line {
          padding: 0 5px;
        }
        span:hover {
          cursor: pointer;
        }
      }
    }
  }
}
</style>
src/views/intelligentPatrol/studyJudge/index.vue
New file
@@ -0,0 +1,13 @@
<template>
  <div>预警研判</div>
</template>
<script>
export default {
}
</script>
<style>
</style>
src/views/intelligentPatrol/trendAnalysis/index.vue
New file
@@ -0,0 +1,13 @@
<template>
  <div>趋势分析</div>
</template>
<script>
export default {
}
</script>
<style>
</style>