Quellcode durchsuchen

实现及调试动环诊断

jiawuxian vor 1 Jahr
Ursprung
Commit
b937ec11d5

+ 36 - 0
src/api/iot/donghuan.js

@@ -0,0 +1,36 @@
+import request from '@/utils/request'
+
+// 查询【请填写功能名称】列表
+export function list(query) {
+  return request({
+    url: '/iot/sensor/app/find',
+    method: 'post',
+    data: query
+  })
+}
+
+// 查询详情
+export function detail(id) {
+  return request({
+    url: `/iot/sensor/app/detail/${id}`,
+    method: "get",
+  });
+}
+
+
+// 查询详情
+export function stateStatistic(query) {
+  return request({
+    url: `/iot/sensor/app/state`,
+    method: 'post',
+    data: query
+  });
+}
+// // 获取某天的录像完整性
+// export function integrity(hostCode, channelCode,date) {
+//   return request({
+//     url: `/iot/VideoDiagnosis/web/integrity/${hostCode}/${channelCode}/${date}`,
+//     method: "get",
+//   });
+// }
+

+ 12 - 0
src/router/router.config.js

@@ -172,6 +172,18 @@ export let routers = [
         meta: { title: '硬盘诊断信息', keepAlive: false }
       },
       {
+        path: '/iot/donghuan',
+        name: 'iot_donghuan',
+        component: () => import('@/views/menu/iot/donghuan/index'),
+        meta: { title: '动环诊断信息', keepAlive: false }
+      },
+      {
+        path: '/iot/donghuan/detail',
+        name: 'iot_donghuan_detail',
+        component: () => import('@/views/menu/iot/donghuan/detail'),
+        meta: { title: '动环设备详情', keepAlive: false }
+      },
+      {
         path: '/monitoringCall',
         name: 'monitoringCall',
         component: () => import('@/views/menu/monitoringCall/index'),

+ 97 - 0
src/views/menu/iot/donghuan/components/item.vue

@@ -0,0 +1,97 @@
+<template>
+  <div class="flex flex-col justify-center k-app-list__item van-clearfix">
+    <van-cell-group clickable @click="itemClick">
+      <van-cell :title="data.deviceName" value-class="cell-title-value" title-style="width:100% ;margin-left:10px;">
+        <template #icon>
+          <van-tag type="primary">{{ data.deviceType }}</van-tag>
+        </template>
+        <template #right-icon>
+          <van-tag type="danger" v-if="data.state === 1">{{ data.stateText }}</van-tag>
+          <van-tag color="gray" text-color="black" v-else-if="data.state == null">"未上报"</van-tag>
+          <van-tag type="primary" v-else>{{ data.stateText }}</van-tag>
+        </template>
+      </van-cell>
+      <van-cell title="所属机构" :value="data.orgName"></van-cell>
+      <van-cell title="诊断时间" v-if="data.state != null" :value="stateUpdateTimeText"></van-cell>
+    </van-cell-group>
+  </div>
+</template>
+<script>
+import { mapGetters } from 'vuex'
+import dayjs from 'dayjs'
+export default {
+  components: {},
+  data() {
+    return {}
+  },
+  computed: {
+    ...mapGetters(['orgName', 'orgId', 'dictionary']),
+    stateUpdateTimeText() {
+      if (this.data.stateUpdateTime == null) {
+        return '未上报'
+      }
+
+      return dayjs(this.data.stateUpdateTime).format('YYYY年M月D日H时m分');
+    },    
+  },
+  watch: {},
+  props: {
+    data: {},
+    statusOptions: {}
+  },
+  methods: {
+    itemClick() {
+      this.$router.push('/iot/donghuan/detail?id=' + this.data.id)
+    }
+  },
+  async created() {},
+  async mounted() {}
+}
+</script>
+<style lang="scss" scoped>
+.cell-title-value {
+  display: none;
+}
+.k-app-list__item {
+  //   height: 11.85rem;
+  background: #ffffff;
+  margin: 0.3rem 0.325rem 0;
+  font-size: 3.733333vw;
+  .top {
+    // min-height: 3rem;
+    padding: 0.05rem 0.05rem;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    border-bottom: 1px solid #f3f4f5;
+    > label {
+      //   height: 1.38rem;
+      // font-size: 1rem;
+      //   line-height: 1.25rem;
+      color: #323233;
+      opacity: 1;
+    }
+  }
+  .bottom {
+    min-height: 7.75rem;
+    padding: 0 1rem;
+    span {
+      height: 1.25rem;
+      font-size: 0.88rem;
+      line-height: 1.25rem;
+      color: #000000;
+      opacity: 0.61;
+    }
+  }
+}
+.wrapper {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  height: 100%;
+}
+
+.time-cell-default {
+  min-width: 60vw;
+}
+</style>

+ 134 - 0
src/views/menu/iot/donghuan/detail.vue

@@ -0,0 +1,134 @@
+<template>
+  <div class="detail">
+    <nav-bar></nav-bar>
+    <van-cell-group>
+      <van-cell :title="info.deviceName" value-class="cell-title-value" title-style="width:100%;">
+        <template #icon>
+          <van-tag type="primary">{{ info.deviceTypeText }}</van-tag>
+        </template>
+      </van-cell>
+      <van-cell title="诊断时间" :value="stateUpdateTimeText" />
+      <van-cell title="持续时长" :value="durationText" />
+      <van-cell title="设备采集值" :value="gatherText" :value-class="info.state==1?'cell-gather-alarm-value':''"/>
+      <van-cell title="动环类型" :value="info.deviceTypeText" />
+      <van-cell title="所属机构" :value="info.orgName" />
+    </van-cell-group>
+  </div>
+</template>
+<script>
+import { detail } from '@/api/iot/donghuan.js'
+import NavBar from '@/components/NavBar'
+import dayjs from 'dayjs'
+export default {
+  data() {
+    return {
+      info: {},
+      search: {
+        sensorId: this.$route.query.id
+      }
+    }
+  },
+  components: { NavBar },
+  computed: {
+    stateUpdateTimeText() {
+      if (this.info.stateUpdateTime == null) {
+        return '未上报'
+      }
+
+      return dayjs(this.info.stateUpdateTime).format('YYYY年M月D日H时m分')
+    },
+    gatherText() {
+      if (!this.info.infos) {
+        return '未上报'
+      }
+
+      let array = JSON.parse(this.info.infos)
+      if (array.length === 0) {
+        return '未上报'
+      }
+
+      let text;
+      switch (this.info.deviceType) {
+        case '4183': //温湿度
+          let temporary = array.find(i => i.name === '环境温度')
+          if (temporary) {
+            text = `温度:${temporary.val }${temporary.unit};`
+          }
+
+          let humidity = array.find(i => i.name === '环境湿度')
+          if (humidity) {
+            text += `湿度:${humidity.val}${humidity.unit};`
+          }
+
+          break
+        case '4181': //红外
+          text = `红外${(array[0].val == 0 ? '正常' : '告警')}`
+          break
+        case '4182': //烟感
+          text = `烟感${array[0].val == 0 ? '正常' : '告警'}`
+          break
+        case '4184': //水浸,
+          text = `水浸${array[0].val == 0 ? '正常' : '告警'}`
+          break
+        case '4160': //智能电表
+          text = `智能电表${array[0].val == 0 ? '正常' : '告警'}`
+          break
+        case '41885': //燃气报警器
+          text = `燃气${array[0].val == 0 ? '正常' : '告警'}`
+          break
+        case '4188': //门窗磁
+          text = `门窗磁${array[0].val == 0 ? '关门' : '开门'}`
+          break
+      }
+
+      return text;
+    },
+    durationText() {
+      if (!this.info.stateStartTime) {
+        return '未上报'
+      }
+
+
+      let minutes =dayjs().diff(this.info.stateStartTime,'minute') 
+      let day=Math.floor(minutes / 60/24)
+      minutes=minutes%(60*24);
+      let hour = Math.floor(minutes / 60)
+      minutes = minutes % 60
+      let text = ''
+      if (day) {
+        text += day + '天'
+      }
+      if (hour) {
+        text += hour + '小时'
+      }
+
+      if (minutes) {
+        text += minutes + '分钟'
+      }
+
+      return text
+    }
+  },
+  mounted() {
+    this.getInfo()
+  },
+  methods: {
+    getInfo() {
+      detail(this.search.sensorId).then(r => {
+        this.info = r.data
+      })
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.cell-title-value {
+  display: none;
+}
+.detail {
+  margin: 15px;
+}
+.cell-gather-alarm-value{
+  color:#ee0a24;
+}
+</style>

+ 191 - 0
src/views/menu/iot/donghuan/index.vue

@@ -0,0 +1,191 @@
+<template>
+  <div class="page_list">
+    <nav-bar></nav-bar>
+    <van-row>
+      <van-col span="24">
+        <org-tree v-model="search.orgId" @changeItem="changeTree" @checked="orgCheckChanged" showChecked></org-tree>
+      </van-col>
+      <van-col span="24">
+        <span v-for="opt in deviceTypeOptions" :key="opt.value" class="search-devicetype">
+          <van-button
+            style="width: 20vw"
+            size="small"
+            :type="search.deviceType == opt.value ? 'info' : 'default'"
+            @click="onDeviceTypeClick(opt.value)"
+          >
+            {{ opt.text }}</van-button
+          >
+        </span>
+      </van-col>
+      <van-col span="24" class="search-state">
+        <span @click="onStateChanged(1)" :class="`${search.state === 1 ? 'alarm_state_selected' : ''}`">{{
+          alarmButtonText
+        }}</span>
+        <span @click="onStateChanged(0)" :class="`${search.state === 0 ? 'alarm_state_selected' : ''}`">{{
+          normalButtonText
+        }}</span>
+      </van-col>
+    </van-row>
+    <div class="container">
+      <k-list :list="list" :params="search" :auto="false" ref="list">
+        <template slot-scope="{ data }">
+          <item :data="data" :statusOptions="deviceTypeOptions"></item>
+        </template>
+      </k-list>
+    </div>
+  </div>
+</template>
+
+<script>
+import NavBar from '@/components/NavBar'
+// import Calendar from '@/components/Calendar';
+import { mapGetters } from 'vuex'
+import { deptTreeList } from '@/api/public'
+import { list, stateStatistic } from '@/api/iot/donghuan.js'
+import KList from '@/components/list/index.vue'
+import Item from './components/item.vue'
+import OrgTree from '@/components/orgTree'
+export default {
+  components: { NavBar, KList, Item, OrgTree },
+  data() {
+    return {
+      alarmButtonText: '告警设备',
+      normalButtonText: '正常设备',
+      search: {
+        orgId: this.orgId,
+        checkSub: false,
+        deviceType: null,
+        state: null,
+        pageNum: 1,
+        pageSize: 10
+      },
+      dicts: ['app_sensor_device_type', 'sensor_alarm_status']
+    }
+  },
+  watch: {},
+  created() {},
+  mounted() {
+    this.getTreeList()
+    this.search.orgId = this.orgId
+    this.selectedOrgName = this.orgName
+    this.stateStatistic()
+  },
+  computed: {
+    ...mapGetters(['orgName', 'orgId', 'dictionary']),
+    deviceTypeOptions() {
+      let r = [{ value:null, text: '全部' }]
+
+      let dict = this.getDictItem('app_sensor_device_type')
+      if (dict) {
+        dict.forEach(element => {
+          r.push({ value: element.dictValue, text: element.dictLabel })
+        })
+      }
+
+      return r
+    }
+  },
+  methods: {
+    list,
+    //获取机构树
+    getTreeList() {
+      deptTreeList(this.orgId).then(res => {
+        this.options = res.data
+        // this.orgInfo.orgId = this.orgId;
+        // this.orgInfo.orgName = this.orgName;
+        // console.log(res,'3333')
+      })
+    },
+    stateStatistic() {
+      stateStatistic(this.search).then(r => {
+        if (r.data) {
+          this.alarmButtonText = `告警设备(${r.data.alarm}台)`
+          this.normalButtonText = `正常设备(${r.data.normal}台)`
+        } else {
+          this.alarmButtonText = `告警设备`
+          this.normalButtonText = `正常设备`
+        }
+      })
+    },
+    onStateChanged(state) {
+      if (this.search.state === state) {
+        this.search.state = null
+      } else {
+        this.search.state = state
+      }
+    },
+    onDeviceTypeClick(deviceType) {
+      if (this.search.deviceType === deviceType) {
+        this.search.deviceType = null
+      } else {
+        this.search.deviceType = deviceType
+      }
+    },
+    //改变机构后将重新发起请求
+    changeTree(node) {
+      // console.log(selectedOptions,'aaaaaa')
+      // this.search.orgId = selectedOptions[selectedOptions.length-1].id;
+      // let option = selectedOptions[selectedOptions.length - 1]
+      this.search.orgId = node.id
+      this.selectedOrgName = node.shortName
+
+      this.stateStatistic()
+    },
+
+    orgCheckChanged(v) {
+      this.search.checkSub = v
+      this.stateStatistic()
+    },
+    onFinish({ selectedOptions }) {
+      this.showOrg = false
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.page_list {
+  background-color: transparent;
+  display: block;
+
+  .container {
+    // overflow: auto;
+    // height: calc(100vh - 11rem);
+    .k-content-repair {
+      display: flex;
+      flex-direction: column;
+      justify-content: space-between;
+      flex: 1;
+    }
+  }
+}
+
+.search-devicetype{
+  width: 25%;
+  display:inline-block;
+  text-align: center;
+  margin-top:10px;
+
+}
+.search-state {
+  width: 100%;
+  margin-top:10px;
+  padding-left: 10px;
+  padding-right: 10px;
+  > span {
+    width: 50%;
+    border: solid 1px rgb(196, 196, 196);
+    display: inline-block;
+    text-align: center;
+    padding-top: 1.2vw;
+    padding-bottom: 1.2vw;
+  }
+}
+
+.alarm_state_selected {
+  background-color: #409eff;
+  border-color: #409eff;
+  color: white;
+  font-weight: 700;
+}
+</style>

+ 0 - 153
src/views/menu/iot/donghuang/components/item.vue

@@ -1,153 +0,0 @@
-<template>
-  <div class="flex flex-col justify-center k-app-protection-list__item van-clearfix">
-    <van-cell-group clickable @click="itemClick">
-      <van-cell :title="data.name">
-        <template #right-icon>
-          <van-button
-            size="mini"
-            color="#008cd6"
-            type="info"
-            @click.stop="
-              openUpdateStateDialog(data, '1')
-              return false
-            "
-            v-if="data.status != '1' && data.orgId == orgId"
-            >布防时间登记</van-button
-          >
-          <van-button
-            size="mini"
-            color="#008cd6"
-            type="info"
-            @click.stop="
-              openUpdateStateDialog(data, '0')
-              return false
-            "
-            v-if="data.status != '0' && data.orgId == orgId"
-            >撤防时间登记</van-button
-          >
-        </template>
-      </van-cell>
-      <van-cell title="布撤防状态">
-        <template #right-icon>
-          <!-- <span v-if="data.status==1" style="color:rgb(0,164,46)">布防</span>
-            <span v-else-if="data.status==0" style="color:rgb(215,0,15)">撤防</span> -->
-          <span>{{ getDictLabel(data.status, 'protection_status', '未上报') }}</span>
-        </template>
-      </van-cell>
-      <van-cell
-        v-if="data.status == '0' || data.status == '1'"
-        :title="data.status == '0' ? '撤防时间' : '布防时间'"
-    value-class="time-cell-default"
-      >
-      <template #default>
-        <van-tag type="primary" color="rgb(184,159,113)" v-if="data.statusUpdatorName!=null">人工登记</van-tag>
-        <van-tag type="primary" v-else>自动获取</van-tag>
-        <span style="margin-left:10px">{{data.statusChangeTime}}</span>
-      </template>
-      </van-cell>
-
-    </van-cell-group>
-    <state-change-diaolog ref="stateChangeDiaolog" @success="updateStatus"/>
-  </div>
-</template>
-<script>
-import { mapGetters } from 'vuex'
-import * as api from '@/api/protection.js'
-import { Dialog } from 'vant'
-import StateChangeDiaolog from './dialog.stateChange.vue'
-import dayjs from 'dayjs'
-export default {
-  components: { StateChangeDiaolog },
-  data() {
-    return {}
-  },
-  computed: {
-    ...mapGetters(['orgName', 'orgId', 'dictionary'])
-  },
-  watch: {},
-  props: {
-    data: {},
-    statusOptions: {}
-  },
-  methods: {
-    formatDate(dateStr) {
-      return toFormatStr(dateStr)
-    },
-    openUpdateStateDialog(data, status) {
-      this.$refs.stateChangeDiaolog.open(data,status, this.getDictLabel(status, 'protection_status', '未知'))
-
-      // Dialog.confirm({
-      //   message: `是否更新${this.getDictLabel(status, 'protection_status', '未上报')}时间?`
-      // })
-      //   .then(() => {
-      //     api.updateStatus(data.id, status).then(r => {
-      //       if (r.data) {
-      //         data.status = status
-      //         data.statusUpdateTime = dayjs(r.data).format('YYYY-MM-DD HH:mm')
-      //       }
-      //     })
-      //   })
-      //   .catch(() => {
-      //     // on cancel
-      //   })
-    },
-    updateStatus(data, status,changeTime) {      
-      api.updateStatus(data.id, status,changeTime).then(r => {
-        if (r.data) {
-          data.status = status
-          data.statusChangeTime = dayjs(changeTime).format('YYYY-MM-DD HH:mm')
-        }
-      })
-    },
-    itemClick() {
-      this.$router.push('/iot/subsystem/detail?id=' + this.data.id)
-    }
-  },
-  async created() {},
-  async mounted() {}
-}
-</script>
-<style lang="scss" scoped>
-.k-app-protection-list__item {
-  //   height: 11.85rem;
-  background: #ffffff;
-  margin: 0.3rem 0.325rem 0;
-  font-size: 3.733333vw;
-  .top {
-    // min-height: 3rem;
-    padding: 0.05rem 0.05rem;
-    display: flex;
-    flex-direction: row;
-    align-items: center;
-    border-bottom: 1px solid #f3f4f5;
-    > label {
-      //   height: 1.38rem;
-      // font-size: 1rem;
-      //   line-height: 1.25rem;
-      color: #323233;
-      opacity: 1;
-    }
-  }
-  .bottom {
-    min-height: 7.75rem;
-    padding: 0 1rem;
-    span {
-      height: 1.25rem;
-      font-size: 0.88rem;
-      line-height: 1.25rem;
-      color: #000000;
-      opacity: 0.61;
-    }
-  }
-}
-.wrapper {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  height: 100%;
-}
-
-.time-cell-default{
-  min-width: 60vw;
-}
-</style>

+ 0 - 145
src/views/menu/iot/donghuang/detail.vue

@@ -1,145 +0,0 @@
-<template>
-  <div class="detail">
-    <nav-bar></nav-bar>
-    <card class="info">
-      <van-cell-group>
-        <van-cell title="控制器名称" :value="info.name" />
-        <van-cell title="所属监控主机" :value="info.hostName" v-if="info.hostName" value-class="cell-host"/>
-        <van-cell title="所属机构" :value="info.orgName" />
-      </van-cell-group>
-    </card>
-
-    <card title="布撤防历史" class="history">
-      <template>
-        <k-list :list="history" :params="search">
-          <template v-slot:header>
-            <div class="header">
-              <span>布撤防状态</span>
-              <span>布撤防时间</span>
-              <span>上报人</span>
-            </div>
-          </template>
-          <template slot-scope="{ data }">
-            <div class="datarow">
-              <!-- <span v-if="data.status == 1" style="color: rgb(0, 164, 46)">布防</span>
-              <span v-else-if="data.status == 0" style="color: rgb(215, 0, 15)">撤防</span> -->
-              <span>{{ getDictLabel(data.status, 'protection_status', '未上报') }}</span>
-              <span>{{ data.updateTime }}</span>
-              <span>{{ data.statusUpdatorName ? data.statusUpdatorName : '自动获取' }}</span>
-            </div>
-          </template>
-        </k-list>
-      </template>
-    </card>
-  </div>
-</template>
-<script>
-import KList from '@/components/list/index.vue'
-import { get, history } from '@/api/protection.js'
-import Card from '@/components/card/index.vue'
-import { getLabel } from '@/utils/optionEx'
-import NavBar from '@/components/NavBar'
-import { mapGetters } from 'vuex'
-export default {
-  data() {
-    return {
-      info: {},
-      search: {
-        protectionId: this.$route.query.id
-      },
-      statusOptions: [
-        { value: -1, text: '布撤防状态' },
-        { value: '0', text: '撤防' },
-        { value: '1', text: '布防' },
-        { value: '2', text: '未知' }
-      ],
-      dicts: ['protection_status']
-    }
-  },
-  components: { NavBar, KList, Card },
-  computed: {
-    ...mapGetters(['dictionary'])
-  },
-  mounted() {
-    this.getInfo()
-  },
-  methods: {
-    history,
-    getLabel,
-    getInfo() {
-      get(this.search.protectionId).then(r => {
-        this.info = r.data
-      })
-    }
-  }
-}
-</script>
-<style lang="scss" scoped>
-.detail {
-  margin: 15px;
-}
-.info {
-  ::v-deep .van-cell__title {
-    max-width: 40%;
-  }
-  ::v-deep .van-cell__value {
-    max-width: 60%;
-  }
-}
-.history {
-  ::v-deep .header {
-    display: flex;
-    flex-direction: row;
-    background-color: rgb(240, 240, 240);
-    padding-top: 10px;
-    padding-bottom: 10px;
-  }
-
-  ::v-deep .header > span {
-    display: inline-block;
-    text-align: center;
-  }
-
-  ::v-deep .header > span {
-    display: inline-block;
-    text-align: center;
-  }
-  ::v-deep .header > span:nth-child(1) {
-    width: 30%;
-  }
-
-  ::v-deep .header > span:nth-child(2) {
-    width: 40%;
-  }
-  ::v-deep .header > span:nth-child(3) {
-    width: 30%;
-  }
-  ::v-deep .datarow {
-    display: flex;
-    flex-direction: row;
-    padding-top: 15px;
-    padding-bottom: 10px;
-    border-bottom: 1px solid rgb(240, 240, 240);
-  }
-
-  ::v-deep .datarow > span {
-    display: inline-block;
-    text-align: center;
-  }
-
-  ::v-deep .datarow > span:nth-child(1) {
-    width: 30%;
-  }
-
-  ::v-deep .datarow > span:nth-child(2) {
-    width: 40%;
-  }
-  ::v-deep .datarow > span:nth-child(3) {
-    width: 30%;
-  }
-}
-
-.cell-host{
-  min-width: 58vw;
-}
-</style>

+ 0 - 179
src/views/menu/iot/donghuang/index.vue

@@ -1,179 +0,0 @@
-<template>
-  <div class="protection_list">
-    <nav-bar></nav-bar>
-    <van-row>
-      <van-col span="24">
-        <org-tree v-model="search.orgId" @changeItem="changeTree" @checked="orgCheckChanged" showChecked></org-tree>
-      </van-col>
-      <van-col>
-        <div></div>
-      </van-col>
-    </van-row>
-    <!-- <van-search v-model="search.key" placeholder="请输入搜索关键词" maxlength="50" /> -->
-    <van-dropdown-menu>
-      <!-- <van-dropdown-item :title="selectedOrgName" @open="onItemClick" /> -->
-      <van-dropdown-item v-model="search.status" :options="statusOptions" />
-      <van-dropdown-item v-model="search.hour" :options="hourOptions" />
-    </van-dropdown-menu>
-    <!-- <div>
-      <van-picker show-toolbar title="选择" :columns="statusOptions"/>
-    </div> -->
-    <!-- <van-popup v-model="showOrg" round position="bottom">
-      <van-cascader v-model="search.orgId" title="选择机构" :options="options" @close="showOrg = false" @change="changeTree"
-        @finish="onFinish" :field-names="fieldNames" />
-    </van-popup> -->
-    <div class="container">
-      <k-list :list="list" :params="search" :auto="false" ref="list">
-        <template slot-scope="{ data }">
-          <item :data="data" :statusOptions="getDictItem('protection_status')"></item>
-        </template>
-      </k-list>
-    </div>
-  </div>
-</template>
-
-<script>
-import NavBar from '@/components/NavBar'
-// import Calendar from '@/components/Calendar';
-import { mapGetters } from 'vuex'
-import { deptTreeList } from '@/api/public'
-import { list } from '@/api/protection.js'
-import KList from '@/components/list/index.vue'
-import Item from './components/item.vue'
-import OrgTree from '@/components/orgTree'
-export default {
-  components: { NavBar, KList, Item ,OrgTree},
-  data() {
-    return {
-      options: [],
-      search: {
-        orgId: this.orgId,
-        checkSub:false,
-        deviceType: null,
-        state:null,
-        pageNum: 1,
-        pageSize: 10
-      },
-
-     
-      fieldNames: {
-        text: 'shortName',
-        value: 'id',
-        children: 'children'
-      },
-      deviceTypeOptions:[{value:-1,label:'全部'},
-      {value:-1,label:'全部'},
-      {value:-1,label:''},
-      {value:-1,label:'全部'},
-      {value:-1,label:'全部'},
-      {value:-1,label:'全部'},
-      {value:-1,label:'全部'},
-    ],
-      dicts: ["protection_status"]
-    }
-  },
-  watch: {
-    // 'search.hour': {
-    //   handler(v) {
-    //     if (v) {
-    //       this.search.dateRange = []
-    //       this.search.dateRange[0] = dayjs(new Date(new Date().valueOf() - v * 60 * 60 * 1000)) .format("YYYY-MM-DD HH:mm:ss");
-    //       this.search.dateRange[1] =  dayjs(new Date(2099, 0,1)).format("YYYY-MM-DD HH:mm:ss");
-    //       console.info(this.search)
-    //     } else {
-    //       this.search.dateRange = []
-    //     }
-    //   }
-    // }
-  },
-  created() { },
-  mounted() {
-    this.getTreeList()
-    this.search.orgId = this.orgId
-    // this.orgOptions[0].value = this.orgId
-    // this.orgOptions[0].text = this.orgName
-    this.selectedOrgName = this.orgName
-  },
-  computed: {
-    ...mapGetters(['orgName', 'orgId', 'dictionary']),
-    statusOptions() {
-      let r = [
-        { value: null, text: '布撤防状态' }
-      ]
-
-      let dict = this.getDictItem('protection_status');
-      if (dict) {
-        dict.forEach(element => {
-          r.push({ value: element.dictValue, text: element.dictLabel })
-        });
-      }
-
-      return r;
-    }
-  },
-  methods: {
-    list,
-    //获取机构树
-    getTreeList() {
-      deptTreeList(this.orgId).then(res => {
-        this.options = res.data
-        // this.orgInfo.orgId = this.orgId;
-        // this.orgInfo.orgName = this.orgName;
-        // console.log(res,'3333')
-      })
-    },
-    onItemClick() {
-      this.showOrg = true
-    },
-    //改变机构后将重新发起请求
-    changeTree(node) {
-      // console.log(selectedOptions,'aaaaaa')
-      // this.search.orgId = selectedOptions[selectedOptions.length-1].id;
-      // let option = selectedOptions[selectedOptions.length - 1]
-      this.search.orgId = node.id
-      this.selectedOrgName = node.shortName
-    },
-    orgCheckChanged(v){
-      this.search.checkSub=v;
-    },
-    onFinish({ selectedOptions }) {
-      this.showOrg = false
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.protection_list {
-  background-color: transparent;
-  display: block;
-
-  .container {
-
-    // overflow: auto;
-    // height: calc(100vh - 11rem);
-    .k-content-repair {
-      display: flex;
-      flex-direction: column;
-      justify-content: space-between;
-      flex: 1;
-    }
-  }
-}
-
-// .form-box {
-//   height: calc(100vh - 180px);
-//   padding: 0 30px 50px 30px;
-//   overflow: auto;
-// }
-// .radio-box {
-//   height: 100px;
-//   padding: 30px;
-// }
-// .org-name {
-//   font-size: 30px;
-//   line-height: 80px;
-//   height: 80px;
-//   text-align: center;
-// }
-</style>

+ 0 - 16
src/views/menu/iot/videoDiagnosis/index.vue

@@ -140,21 +140,5 @@ export default {
   border-color: #409eff;
   color: white;
   font-weight: 700;
-
 }
-// .form-box {
-//   height: calc(100vh - 180px);
-//   padding: 0 30px 50px 30px;
-//   overflow: auto;
-// }
-// .radio-box {
-//   height: 100px;
-//   padding: 30px;
-// }
-// .org-name {
-//   font-size: 30px;
-//   line-height: 80px;
-//   height: 80px;
-//   text-align: center;
-// }
 </style>