mark
2022-09-28 39d577ac7950e87b593d96df0b77d5a386756566
摄像机 find 与 数据推送 的 查询(查询后加的
5个文件已修改
103 ■■■■ 已修改文件
src/Pool/VideoManageData.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataPush/components/device.vue 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/dataPush/components/point.vue 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hashrate/CameraManage/CameraRules/components/AddRuleBox.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hashrate/CameraManage/CameraRules/components/TimeSlider.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/Pool/VideoManageData.ts
@@ -1,6 +1,7 @@
import { getAllTimeRule, saveTimeRule } from "@/api/timeRule"
import { findDictionaryByType } from "@/api/dictionary"
import { findBaseByRuleEditor } from "@/api/es"
import store from "@/store"
const AllDayRule = [
  { day: 1, time_range: [{ start: "00:00", end: "24:00" }] },
@@ -27,8 +28,7 @@
  }
  public async getTimeRule() {
    let rsp: any = await getAllTimeRule("")
    console.log(rsp)
    let rsp: any = await getAllTimeRule(store.state.devId)
    if (rsp && rsp.success) {
      this.TimeRules = rsp.data.timeRules
src/views/dataPush/components/device.vue
@@ -1,5 +1,18 @@
<template>
  <div class="sub-account" v-if="!isShowAdd">
    <div class="search">
      <div class="left">
        <div class="id">
          设备名称
          <el-input v-model="inputText" placeholder="请输入" clearable></el-input>
        </div>
      </div>
      <div class="right">
        <div class="button searchBtn" @click="fetchDevicesList(1)">搜索</div>
        <!-- <div class="button resetBtn" @click="reset">重置</div> -->
      </div>
    </div>
    <div class="btns">
      <div class="button add" @click="addDevice">
        <span class="iconfont">&#xe614;</span>
@@ -16,9 +29,15 @@
        :default-sort="{ prop: 'createTime', order: 'descending' }"
      >
        <el-table-column prop="devName" label="设备名称" show-overflow-tooltip></el-table-column>
        <el-table-column prop="devId" label="设备ID" show-overflow-tooltip></el-table-column>
        <!-- <el-table-column prop="devId" label="设备ID" show-overflow-tooltip></el-table-column> -->
        <el-table-column prop="devIp" label="设备IP" show-overflow-tooltip></el-table-column>
        <el-table-column prop="devCode" label="设备编码" show-overflow-tooltip></el-table-column>
        <el-table-column prop="state" label="状态" show-overflow-tooltip>
          <template slot-scope="scope">
            <div v-if="scope.row.state == 0" class="status green">离线</div>
            <div v-else class="status">在线</div>
          </template>
        </el-table-column>
        <el-table-column prop="companyCode" label="企业编码" show-overflow-tooltip></el-table-column>
        <el-table-column label="操作" align="center" width="100px">
@@ -86,6 +105,8 @@
export default {
  data() {
    return {
      query: {},
      inputText: "", //输入框内容
      isShowAdd: false, //是否展示新增弹窗
      dataList: [],
      tip: 1,
@@ -114,15 +135,27 @@
      total: 0 //总数,
    }
  },
  created() {
    this.fetchDevicesList()
  async created() {
    let query = { pageIndex: this.page, pageSize: this.size, keyword: this.inputText }
    this.query = query
    let res = await getDevicesList(query)
    this.dataList = res.data
    this.total = res.total
  },
  mounted() {},
  methods: {
    async fetchDevicesList() {
      let res = await getDevicesList({ pageIndex: this.page, pageSize: this.size })
      this.dataList = res.data
      this.total = res.total
    async fetchDevicesList(val) {
      if (val === 1) {
        let query = { pageIndex: this.page, pageSize: this.size, keyword: this.inputText }
        this.query = query
        let res = await getDevicesList(query)
        this.dataList = res.data
        this.total = res.total
      } else {
        let res = await getDevicesList(this.query)
        this.dataList = res.data
        this.total = res.total
      }
    },
    delUser(row) {
      console.log(row, "row")
src/views/dataPush/components/point.vue
@@ -1,5 +1,18 @@
<template>
  <div class="sub-account" v-if="!isShowAdd">
    <div class="search">
      <div class="left">
        <div class="id">
          点位名称
          <el-input v-model="inputText" placeholder="请输入" clearable></el-input>
        </div>
      </div>
      <div class="right">
        <div class="button searchBtn" @click="checkCamerasList(1)">搜索</div>
        <!-- <div class="button resetBtn" @click="reset">重置</div> -->
      </div>
    </div>
    <div class="btns">
      <div class="button add" @click="addPoint">
        <span class="iconfont">&#xe614;</span>
@@ -119,6 +132,8 @@
export default {
  data() {
    return {
      query: {},
      inputText: "", //输入框内容
      cameraOptions: [],
      scene_nameOptions: [
        {
@@ -136,10 +151,6 @@
        {
          value: "区域入侵",
          label: "区域入侵"
        },
        {
          value: "人员撤离",
          label: "人员撤离"
        },
        {
          value: "人员离岗",
@@ -201,8 +212,12 @@
      total: 0 //总数,
    }
  },
  created() {
    this.checkCamerasList()
  async created() {
    let query = { pageIndex: this.page, pageSize: this.size, keyword: this.inputText }
    this.query = query
    let res = await camerasList(query)
    this.dataList = res.data
    this.total = res.total
    this.aaaaa()
  },
@@ -291,10 +306,18 @@
        this.checkCamerasList()
      })
    },
    async checkCamerasList() {
      let res = await camerasList({ pageIndex: this.page, pageSize: this.size })
      this.dataList = res.data
      this.total = res.total
    async checkCamerasList(val) {
      if (val === 1) {
        let query = { pageIndex: this.page, pageSize: this.size, keyword: this.inputText }
        this.query = query
        let res = await camerasList(query)
        this.dataList = res.data
        this.total = res.total
      } else {
        let res = await camerasList(this.query)
        this.dataList = res.data
        this.total = res.total
      }
    },
    resetUser() {
      this.ruleForm = {
src/views/hashrate/CameraManage/CameraRules/components/AddRuleBox.vue
@@ -103,10 +103,6 @@
          label: "区域入侵"
        },
        {
          value: "人员撤离",
          label: "人员撤离"
        },
        {
          value: "人员离岗",
          label: "人员离岗"
        },
src/views/hashrate/CameraManage/CameraRules/components/TimeSlider.vue
@@ -174,8 +174,6 @@
              repeat = true
            }
          })
          console.log("aaa")
          console.log(repeat)
          if (repeat) {
            this.$notify({
              message: "名称不能重复",
@@ -272,12 +270,10 @@
    windowSizeChange() {
      let timeSlideWidth = document.querySelector(".sub-time-box").clientWidth
      this.cavasLength = timeSlideWidth
      console.log("时间组件宽度:", timeSlideWidth)
    },
    updateTimeRule(rule) {
      saveTimeRule(rule)
        .then(async (rsp) => {
          console.log(rsp, "rrr1333331rrrrrrrrrrrrr")
          if (rsp && rsp.success) {
            await this.VideoManageData.getTimeRule()
            this.isAdding = false
@@ -319,7 +315,6 @@
    save() {
      saveTimeRule(this.activeTabObj)
        .then(async (rsp) => {
          console.log(rsp, "rrr112222rrrrrrrrrrrrr")
          if (rsp && rsp.success) {
            this.$notify({
              type: "success",