瀏覽代碼

Merge remote-tracking branch 'origin/V1.0.11' into V1.0.11

jingyuanchao 11 月之前
父節點
當前提交
51664ac406

+ 20 - 0
src/api/iot/diagnoseMission.js

@@ -17,3 +17,23 @@ export function missionTypeList() {
     method: 'get',
   })
 }
+
+
+//绑定任务
+export function bindMission(query) {
+  return request({
+    url: '/iot/diagnoseMission/bindMission',
+    method: 'post',
+    data: query
+  })
+}
+
+
+//解绑任务
+export function unbindMission(query) {
+  return request({
+    url: '/iot/diagnoseMission/unbindMission',
+    method: 'post',
+    data: query
+  })
+}

+ 20 - 0
src/api/iot/diagnoseThreshold.js

@@ -17,3 +17,23 @@ export function thresholdTypeList() {
     method: 'get',
   })
 }
+
+
+//绑定阈值
+export function bindThreshold(query) {
+  return request({
+    url: '/iot/diagnoseThreshold/bindThreshold',
+    method: 'post',
+    data: query
+  })
+}
+
+
+//解绑阈值
+export function unbindThreshold(query) {
+  return request({
+    url: '/iot/diagnoseThreshold/unbindThreshold',
+    method: 'post',
+    data: query
+  })
+}

+ 19 - 0
src/api/iot/videoChannelPlan.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+
+// 查询iot服务列表
+export function list(query) {
+  return request({
+    url: '/iot/video/channelPlan/page',
+    method: 'get',
+    params: query
+  })
+}
+
+export function channelPlanTimeList(query) {
+  return request({
+    url: '/iot/video/channelPlanTime/detail',
+    method: 'get',
+    params: query
+  })
+}

+ 141 - 0
src/views/iot/diagnoseMission/dialog.bindMission.vue

@@ -0,0 +1,141 @@
+<template>
+  <div class="rule-type">
+    <DialogCom
+      title="设置任务关联摄像机"
+      :visible.sync="isShow"
+      @close="onHide"
+      width="800px"
+    >
+      <div class="page-body">
+        <el-form
+          :model="formData"
+          :rules="formDataRules"
+          size="small"
+          ref="form"
+          label-position="right"
+          label-width="150px"
+          label-prefix=":"
+        >
+          <el-form-item label="任务名称" prop="bindMissionId">
+            <el-select
+              label="任务名称"
+              v-model="formData.bindMissionId"
+              placeholder="请选择任务名称"
+              clearable
+              style="width: 80%;"
+            >
+            <el-option
+                    v-for="dict in deviceTypes"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
+                  ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-form>
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="onSubmit">确定</el-button>
+        <el-button @click="isShow = false">取消</el-button>
+      </div>
+    </DialogCom>
+  </div>
+</template>
+
+<script>
+import { mapState, mapMutations, mapGetters } from "vuex";
+import {missionTypeList,bindMission} from "@/api/iot/diagnoseMission";
+import { listIdName } from "@/api/system/device";
+export default {
+  dicts: ["alarm_deal_type"],
+  data() {
+    return {
+      id: null,
+      isShow: false,
+      formData: this.reset(),
+      formDataRules: {
+        bindMissionId: [{ required: true, message: "请选择任务名称" }]
+      },
+      // 查询参数
+      queryParams: {
+        checkSub: true,
+        missionCode: null,
+        state: null,
+        bindMissionId: null,
+      },
+      deviceTypes: [],
+      labelStyle: {
+        color: "#000",
+        "text-align": "center",
+        height: "40px",
+        "min-width": "150px",
+        "word-break": "keep-all",
+      },
+    };
+  },
+  props: {},
+  computed: {
+    ...mapGetters(["orgId"]),
+  },
+  methods: {
+    ...mapMutations([]),
+    initDeviceTypeList(){
+          missionTypeList()
+            .then((r) => {
+              // 使用 map 而不是 filter 进行数据转换
+              const transformedList = r.map((item) => ({
+                value: item.value,
+                label: item.label,
+                type: item.type,
+              }));
+
+              // 将转换后的数据推送到 this.deviceTypeList
+              this.deviceTypes.push(...transformedList);
+            })
+            .catch((error) => {
+              // 处理错误
+              console.error('Error fetching device type list:', error);
+            });
+    },
+    reset() {
+      return {
+        bindMissionId:null,
+      };
+    },
+    async show(queryParams, deviceTypes) {
+      this.queryParams = queryParams;
+      this.deviceTypes.push(deviceTypes);
+      this.isShow = true;
+    },
+    // 事件
+    onHide() {
+      this.$refs.form.resetFields();
+      this.formData = this.reset();
+    },
+    onSubmit() {
+      this.$refs.form.validate(async (isValidate) => {
+        if (!isValidate) return;
+        this.queryParams.bindMissionId = this.formData.bindMissionId;
+        await bindMission(this.queryParams);
+        this.$emit("success");
+        this.isShow = false;
+      });
+    },
+  },
+  created() {
+      this.initDeviceTypeList();
+  },
+  mounted() {},
+  components: { },
+};
+</script>
+
+<style lang="scss" scoped>
+.brand_info {
+  .el-form {
+    width: 600px;
+    padding-top: 40px;
+  }
+}
+</style>

+ 0 - 112
src/views/iot/diagnoseMission/dialog.detail.vue

@@ -1,112 +0,0 @@
-<template>
-  <DialogCom
-    title="上报历史"
-    :visible.sync="isShow"
-    class="g-dialog-select-safe-check"
-    :close-on-click-modal="false"
-    width="55%"
-    top="10vh"
-    append-to-body
-  >
-    <div class="el-dialog-div" style="margin-bottom:20px">
-      <g-search-table
-        ref="st"
-        url="/iot/sensor/data/log"
-        method="post"
-        :search-data="search"
-        :pageable="true"
-        :select="true"
-        :select-default="selectList"
-        :drag="false"
-        @select="onSelect"
-      >
-        <!-- 搜索 -->
-        <template slot="searchs">
-          <el-form-item class="searchTitle" label="上报时间">
-            <DataRangePicker
-              v-model="search.dateRange"
-              key="daterange"
-              type="daterange"
-              :clearable="timeClearable"
-            />
-          </el-form-item>
-        </template>
-
-        <!-- 表格 -->
-        <template slot="columns">
-          <el-table-column label="设备名称" align="center" prop="deviceName" width="300"/>
-          <el-table-column label="上报时间" prop="createTime" width="300"/>
-          <el-table-column label="上报内容" prop="info" width="300"/>
-        </template>
-      </g-search-table>
-    </div>
-
-    <div slot="footer" class="dialog-footer">
-      <el-button @click="onHide">关 闭</el-button>
-    </div>
-  </DialogCom>
-</template>
-<script>
-import GSearchTable from "@/components/table/gx.search.table.vue";
-import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
-
-export default {
-  components: {GSearchTable, DataRangePicker},
-  data() {
-    return {
-      isShow: false,
-      selectList: [],
-      search: null,
-      timeClearable: true,
-    };
-  },
-  computed: {},
-  watch: {
-    orgId(newval) {
-      this.search.orgId = newval;
-    },
-    dateRange(newval) {
-      this.search.dateRange = newval;
-    },
-  },
-  props: {
-    defaultSelect: {
-      type: Array
-    },
-    orgId: {},
-    dateRange: [],
-  },
-  methods: {
-    show(row) {
-      this.search = this.initSearchData(row);
-      this.isShow = true;
-      this.selectList = this.defaultSelect;
-    },
-    onHide() {
-      this.isShow = false;
-    },
-    onSelect(item) {
-      this.selectList = item;
-    },
-    initSearchData(row) {
-      let data = {"deviceStatusId": row.deviceStatusId, "orgId": row.orgId, "dateRange": []};
-      return data;
-    },
-    emptySearch() {
-      return {
-        deviceCode: null,
-        orgId: this.$store.getters.orgId,
-      };
-    },
-
-  },
-  mounted() {
-
-  },
-};
-</script>
-<style lang="scss" scoped>
-.el-dialog-div {
-  overflow: auto;
-}
-</style>

+ 34 - 10
src/views/iot/diagnoseMission/index.vue

@@ -76,7 +76,24 @@
                   >重置
                 </el-button>
               </el-col>
-
+              <el-col :span="1.5">
+                <el-button
+                  type="primary"
+                  icon="el-icon-refresh"
+                  size="mini"
+                  @click="unbindMission()"
+                  >解绑任务
+                </el-button>
+              </el-col>
+              <el-col :span="1.5">
+                <el-button
+                  type="primary"
+                  icon="el-icon-refresh"
+                  size="mini"
+                  @click="bindMission()"
+                  >绑定任务
+                </el-button>
+              </el-col>
 
               <el-col :span="1.5">
                 <el-button
@@ -118,7 +135,6 @@
             <el-table-column label="所属主机" align="center" prop="hostName" width="280"/>
             <el-table-column label="任务" align="center" prop="missionName" width="380"/>
           </el-table>
-          <DetailDialog ref="detailDialog" @success="refresh(true)"></DetailDialog>
           <pagination
             v-show="total > 0"
             :total="total"
@@ -129,18 +145,18 @@
         </div>
       </el-col>
     </el-row>
+    <dialog-bind-mission ref="bindMissionDialog" @success="getList()"></dialog-bind-mission>
   </div>
 </template>
 
 <script>
-import { list,missionTypeList} from "@/api/iot/diagnoseMission";
-import  DetailDialog  from "./dialog.detail.vue";
+import { list,missionTypeList,unbindMission} from "@/api/iot/diagnoseMission";
+import DialogBindMission from "./dialog.bindMission.vue";
 import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
-import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
 import { mapGetters } from "vuex";
 import dayjs from "dayjs";
 export default {
-  components: { OrgTree, DataRangePicker,DetailDialog },
+  components: { OrgTree,DialogBindMission },
   name: "Task",
   dicts: ["sys_org_type",'sensor_alarm_status','sensor_device_type'],
   data() {
@@ -273,6 +289,7 @@ export default {
       this.queryParams.pageNum = 1;
       this.getList();
     },
+
     /** 重置按钮操作 */
     resetQuery() {
       this.resetForm("queryForm");
@@ -283,10 +300,17 @@ export default {
       this.$refs["orgTree"].setCheckSub(this.queryParams.checkSub);
       this.handleQuery();
     },
-
-    /** 修改按钮操作 */
-    lookView(row) {
-      this.$refs["detailDialog"].show(row);
+    /** 绑定任务 */
+    bindMission() {
+      this.$refs["bindMissionDialog"].show(this.queryParams, this.deviceTypes);
+    },
+    /** 解绑任务 */
+    unbindMission() {
+      this.loading = true;
+      unbindMission(this.queryParams).then((response) => {
+           this.loading = false;
+           this.getList();
+      });
     },
 
     /** 导出按钮操作 */

+ 142 - 0
src/views/iot/diagnoseThreshold/dialog.bindThreshold.vue

@@ -0,0 +1,142 @@
+<template>
+  <div class="rule-type">
+    <DialogCom
+      title="绑定阈值关联摄像机"
+      :visible.sync="isShow"
+      @close="onHide"
+      width="800px"
+    >
+      <div class="page-body">
+        <el-form
+          :model="formData"
+          :rules="formDataRules"
+          size="small"
+          ref="form"
+          label-position="right"
+          label-width="150px"
+          label-prefix=":"
+        >
+          <el-form-item label="阈值名称" prop="bindThresholdCodes">
+            <el-select
+              label="阈值名称"
+              v-model="formData.bindThresholdCodes"
+              placeholder="请选择阈值名称"
+              clearable
+              multiple
+              style="width: 80%;"
+            >
+            <el-option
+                    v-for="dict in deviceTypes"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
+                  ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-form>
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="onSubmit">确定</el-button>
+        <el-button @click="isShow = false">取消</el-button>
+      </div>
+    </DialogCom>
+  </div>
+</template>
+
+<script>
+import { mapState, mapMutations, mapGetters } from "vuex";
+import {thresholdTypeList,bindThreshold} from "@/api/iot/diagnoseThreshold";
+import { listIdName } from "@/api/system/device";
+export default {
+  dicts: ["alarm_deal_type"],
+  data() {
+    return {
+      id: null,
+      isShow: false,
+      formData: this.reset(),
+      formDataRules: {
+        bindThresholdCodes: [{ required: true, message: "请选择阈值名称" }]
+      },
+      // 查询参数
+      queryParams: {
+        checkSub: true,
+        missionCode: null,
+        state: null,
+        bindThresholdCodes: [],
+      },
+      deviceTypes: [],
+      labelStyle: {
+        color: "#000",
+        "text-align": "center",
+        height: "40px",
+        "min-width": "150px",
+        "word-break": "keep-all",
+      },
+    };
+  },
+  props: {},
+  computed: {
+    ...mapGetters(["orgId"]),
+  },
+  methods: {
+    ...mapMutations([]),
+    initDeviceTypeList(){
+          thresholdTypeList()
+            .then((r) => {
+              // 使用 map 而不是 filter 进行数据转换
+              const transformedList = r.map((item) => ({
+                value: item.value,
+                label: item.label,
+                type: item.type,
+              }));
+
+              // 将转换后的数据推送到 this.deviceTypeList
+              this.deviceTypes.push(...transformedList);
+            })
+            .catch((error) => {
+              // 处理错误
+              console.error('Error fetching device type list:', error);
+            });
+    },
+    reset() {
+      return {
+        bindThresholdCodes:null,
+      };
+    },
+    async show(queryParams, deviceTypes) {
+      this.queryParams = queryParams;
+      this.deviceTypes.push(deviceTypes);
+      this.isShow = true;
+    },
+    // 事件
+    onHide() {
+      this.$refs.form.resetFields();
+      this.formData = this.reset();
+    },
+    onSubmit() {
+      this.$refs.form.validate(async (isValidate) => {
+        if (!isValidate) return;
+        this.queryParams.bindThresholdCodes = this.formData.bindThresholdCodes;
+        await bindThreshold(this.queryParams);
+        this.$emit("success");
+        this.isShow = false;
+      });
+    },
+  },
+  created() {
+      this.initDeviceTypeList();
+  },
+  mounted() {},
+  components: { },
+};
+</script>
+
+<style lang="scss" scoped>
+.brand_info {
+  .el-form {
+    width: 600px;
+    padding-top: 40px;
+  }
+}
+</style>

+ 0 - 112
src/views/iot/diagnoseThreshold/dialog.detail.vue

@@ -1,112 +0,0 @@
-<template>
-  <DialogCom
-    title="上报历史"
-    :visible.sync="isShow"
-    class="g-dialog-select-safe-check"
-    :close-on-click-modal="false"
-    width="55%"
-    top="10vh"
-    append-to-body
-  >
-    <div class="el-dialog-div" style="margin-bottom:20px">
-      <g-search-table
-        ref="st"
-        url="/iot/sensor/data/log"
-        method="post"
-        :search-data="search"
-        :pageable="true"
-        :select="true"
-        :select-default="selectList"
-        :drag="false"
-        @select="onSelect"
-      >
-        <!-- 搜索 -->
-        <template slot="searchs">
-          <el-form-item class="searchTitle" label="上报时间">
-            <DataRangePicker
-              v-model="search.dateRange"
-              key="daterange"
-              type="daterange"
-              :clearable="timeClearable"
-            />
-          </el-form-item>
-        </template>
-
-        <!-- 表格 -->
-        <template slot="columns">
-          <el-table-column label="设备名称" align="center" prop="deviceName" width="300"/>
-          <el-table-column label="上报时间" prop="createTime" width="300"/>
-          <el-table-column label="上报内容" prop="info" width="300"/>
-        </template>
-      </g-search-table>
-    </div>
-
-    <div slot="footer" class="dialog-footer">
-      <el-button @click="onHide">关 闭</el-button>
-    </div>
-  </DialogCom>
-</template>
-<script>
-import GSearchTable from "@/components/table/gx.search.table.vue";
-import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
-
-export default {
-  components: {GSearchTable, DataRangePicker},
-  data() {
-    return {
-      isShow: false,
-      selectList: [],
-      search: null,
-      timeClearable: true,
-    };
-  },
-  computed: {},
-  watch: {
-    orgId(newval) {
-      this.search.orgId = newval;
-    },
-    dateRange(newval) {
-      this.search.dateRange = newval;
-    },
-  },
-  props: {
-    defaultSelect: {
-      type: Array
-    },
-    orgId: {},
-    dateRange: [],
-  },
-  methods: {
-    show(row) {
-      this.search = this.initSearchData(row);
-      this.isShow = true;
-      this.selectList = this.defaultSelect;
-    },
-    onHide() {
-      this.isShow = false;
-    },
-    onSelect(item) {
-      this.selectList = item;
-    },
-    initSearchData(row) {
-      let data = {"deviceStatusId": row.deviceStatusId, "orgId": row.orgId, "dateRange": []};
-      return data;
-    },
-    emptySearch() {
-      return {
-        deviceCode: null,
-        orgId: this.$store.getters.orgId,
-      };
-    },
-
-  },
-  mounted() {
-
-  },
-};
-</script>
-<style lang="scss" scoped>
-.el-dialog-div {
-  overflow: auto;
-}
-</style>

+ 142 - 0
src/views/iot/diagnoseThreshold/dialog.unbindThreshold.vue

@@ -0,0 +1,142 @@
+<template>
+  <div class="rule-type">
+    <DialogCom
+      title="解绑阈值关联摄像机"
+      :visible.sync="isShow"
+      @close="onHide"
+      width="800px"
+    >
+      <div class="page-body">
+        <el-form
+          :model="formData"
+          :rules="formDataRules"
+          size="small"
+          ref="form"
+          label-position="right"
+          label-width="150px"
+          label-prefix=":"
+        >
+          <el-form-item label="阈值名称" prop="bindThresholdCodes">
+            <el-select
+              label="阈值名称"
+              v-model="formData.bindThresholdCodes"
+              placeholder="请选择阈值名称"
+              clearable
+              multiple
+              style="width: 80%;"
+            >
+            <el-option
+                    v-for="dict in deviceTypes"
+                    :key="dict.value"
+                    :label="dict.label"
+                    :value="dict.value"
+                  ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-form>
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="onSubmit">确定</el-button>
+        <el-button @click="isShow = false">取消</el-button>
+      </div>
+    </DialogCom>
+  </div>
+</template>
+
+<script>
+import { mapState, mapMutations, mapGetters } from "vuex";
+import {thresholdTypeList,unbindThreshold} from "@/api/iot/diagnoseThreshold";
+import { listIdName } from "@/api/system/device";
+export default {
+  dicts: ["alarm_deal_type"],
+  data() {
+    return {
+      id: null,
+      isShow: false,
+      formData: this.reset(),
+      formDataRules: {
+        bindThresholdCodes: [{ required: true, message: "请选择阈值名称" }]
+      },
+      // 查询参数
+      queryParams: {
+        checkSub: true,
+        missionCode: null,
+        state: null,
+        bindThresholdCodes: [],
+      },
+      deviceTypes: [],
+      labelStyle: {
+        color: "#000",
+        "text-align": "center",
+        height: "40px",
+        "min-width": "150px",
+        "word-break": "keep-all",
+      },
+    };
+  },
+  props: {},
+  computed: {
+    ...mapGetters(["orgId"]),
+  },
+  methods: {
+    ...mapMutations([]),
+    initDeviceTypeList(){
+          thresholdTypeList()
+            .then((r) => {
+              // 使用 map 而不是 filter 进行数据转换
+              const transformedList = r.map((item) => ({
+                value: item.value,
+                label: item.label,
+                type: item.type,
+              }));
+
+              // 将转换后的数据推送到 this.deviceTypeList
+              this.deviceTypes.push(...transformedList);
+            })
+            .catch((error) => {
+              // 处理错误
+              console.error('Error fetching device type list:', error);
+            });
+    },
+    reset() {
+      return {
+        bindThresholdCodes:null,
+      };
+    },
+    async show(queryParams, deviceTypes) {
+      this.queryParams = queryParams;
+      this.deviceTypes.push(deviceTypes);
+      this.isShow = true;
+    },
+    // 事件
+    onHide() {
+      this.$refs.form.resetFields();
+      this.formData = this.reset();
+    },
+    onSubmit() {
+      this.$refs.form.validate(async (isValidate) => {
+        if (!isValidate) return;
+        this.queryParams.bindThresholdCodes = this.formData.bindThresholdCodes;
+        await unbindThreshold(this.queryParams);
+        this.$emit("success");
+        this.isShow = false;
+      });
+    },
+  },
+  created() {
+      this.initDeviceTypeList();
+  },
+  mounted() {},
+  components: { },
+};
+</script>
+
+<style lang="scss" scoped>
+.brand_info {
+  .el-form {
+    width: 600px;
+    padding-top: 40px;
+  }
+}
+</style>

+ 30 - 8
src/views/iot/diagnoseThreshold/index.vue

@@ -76,7 +76,24 @@
                   >重置
                 </el-button>
               </el-col>
-
+              <el-col :span="1.5">
+                <el-button
+                  type="primary"
+                  icon="el-icon-refresh"
+                  size="mini"
+                  @click="unbindThreshold()"
+                  >解绑阈值
+                </el-button>
+              </el-col>
+              <el-col :span="1.5">
+                <el-button
+                  type="primary"
+                  icon="el-icon-refresh"
+                  size="mini"
+                  @click="bindThreshold()"
+                  >绑定阈值
+                </el-button>
+              </el-col>
 
               <el-col :span="1.5">
                 <el-button
@@ -118,7 +135,6 @@
             <el-table-column label="所属主机" align="center" prop="hostName" width="280"/>
             <el-table-column label="阈值" align="center" prop="thresholdName" width="380"/>
           </el-table>
-          <DetailDialog ref="detailDialog" @success="refresh(true)"></DetailDialog>
           <pagination
             v-show="total > 0"
             :total="total"
@@ -129,18 +145,20 @@
         </div>
       </el-col>
     </el-row>
+    <dialog-bind-threshold ref="bindThresholdDialog" @success="getList()"></dialog-bind-threshold>
+    <dialog-unbind-threshold ref="unbindThresholdDialog" @success="getList()"></dialog-unbind-threshold>
   </div>
 </template>
 
 <script>
 import { list,thresholdTypeList} from "@/api/iot/diagnoseThreshold";
-import  DetailDialog  from "./dialog.detail.vue";
+import DialogBindThreshold from "./dialog.bindThreshold.vue";
+import DialogUnbindThreshold  from "./dialog.unbindThreshold.vue";
 import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
-import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
 import { mapGetters } from "vuex";
 import dayjs from "dayjs";
 export default {
-  components: { OrgTree, DataRangePicker,DetailDialog },
+  components: { OrgTree,DialogBindThreshold,DialogUnbindThreshold},
   name: "Task",
   dicts: ["sys_org_type",'sensor_alarm_status','sensor_device_type'],
   data() {
@@ -284,9 +302,13 @@ export default {
       this.handleQuery();
     },
 
-    /** 修改按钮操作 */
-    lookView(row) {
-      this.$refs["detailDialog"].show(row);
+    /** 绑定阈值 */
+    bindThreshold() {
+      this.$refs["bindThresholdDialog"].show(this.queryParams, this.deviceTypes);
+    },
+    /** 解绑阈值 */
+    unbindThreshold() {
+      this.$refs["unbindThresholdDialog"].show(this.queryParams, this.deviceTypes);
     },
 
     /** 导出按钮操作 */

+ 137 - 0
src/views/iot/videoChannelPlan/channelPlanTimeDialog.vue

@@ -0,0 +1,137 @@
+
+<template>
+  <div class="edu-training-edit">
+    <DialogCom title="通道前端录像配置详情" :visible.sync="isShow" width="1200px" >
+      <div class="page-body">
+        <div class="extend_mod" style="max-height: 500px;">
+          <el-table :data="formData" border style="width: 100%;max-height: 700px;overflow-y: auto;">
+            <el-table-column
+              type="week"
+              label="星期"
+              align="center"
+            >
+              <template slot-scope="scope">
+                {{ getWeekDesc(scope.row.week)}}
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="type"
+              label="计划类型"
+              align="center"
+            >
+              <template slot-scope="scope">
+                {{ getTypeDesc(scope.row.type)}}
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="startTime"
+              label="起始时间"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="endTime"
+              label="结束时间"
+            >
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="onHide">关闭</el-button>
+      </div>
+    </DialogCom>
+  </div>
+</template>
+
+<script>
+import {
+  channelPlanTimeList
+} from "@/api/iot/videoChannelPlan";
+
+export default {
+  name: "IotVideoChannelPlanTime",
+  components: {},
+  dicts: [],
+  data() {
+    return {
+      isShow: false,
+      formData: this.reset(),
+    };
+  },
+  props: {},
+  watch: {},
+  computed: {
+  },
+  methods: {
+    reset() {
+      return {
+        week: null,
+        type: null,
+        startTime: null,
+        endTime: null,
+      };
+    },
+    getWeekDesc(val){
+      switch (val){
+        case 1:
+          return "星期一";
+        case 2:
+          return "星期二";
+        case 3:
+          return "星期三";
+        case 4:
+          return "星期四";
+        case 5:
+          return "星期五";
+        case 6:
+          return "星期六";
+        case 7:
+          return "星期日";
+      }
+    },
+    getTypeDesc(val){
+      //0-定时录像,1-移动侦测录像,2-报警录像,3-移动侦测或报警录像,4-移动侦测和报警录像)
+      switch (val){
+        case 0:
+          return "定时录像";
+        case 1:
+          return "移动侦测录像";
+        case 2:
+          return "报警录像";
+        case 3:
+          return "移动侦测或报警录像";
+        case 4:
+          return "移动侦测和报警录像";
+      }
+    },
+    async refresh(deviceId) {
+      let query = {
+        deviceId: deviceId,
+        week: -1
+      };
+      console.log("11111")
+      console.log("11111:"+query)
+      channelPlanTimeList(query).then(response => {
+        this.formData = response.data;
+        this.loading = false;
+      })
+    },
+    async show(deviceId) {
+      await this.refresh(deviceId);
+      this.isShow = true;
+    },
+    // 事件
+    onHide() {
+      this.isShow = false;
+      this.formData = this.reset();
+    },
+  },
+  mounted() {
+  },
+};
+</script>
+<style lang="scss">
+</style>

+ 282 - 0
src/views/iot/videoChannelPlan/index.vue

@@ -0,0 +1,282 @@
+<template>
+  <div class="app-container">
+    <div class="main-right-box">
+      <div class="main-search-box">
+        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
+          <el-form-item label="组织机构">
+            <org-tree
+              v-model="queryParams.orgId"
+              @defaultOrg="getDefaultOrg"
+              @checkChange="checkChange"
+              @click="clickTreeNode"
+              ref="orgTree"
+            ></org-tree>
+          </el-form-item>
+
+          <el-form-item label="设备名称" prop="dvsName">
+            <el-input clearable v-model="queryParams.dvsName" placeholder="请输入关键字" maxlength="50"
+                      @keyup.enter.native="handleQuery"/>
+          </el-form-item>
+
+          <el-form-item label="通道名称" prop="channelName">
+            <el-input clearable v-model="queryParams.channelName" placeholder="请输入关键字" maxlength="50"
+                      @keyup.enter.native="handleQuery"/>
+          </el-form-item>
+
+<!--          <el-form-item label="设备类型" prop="deviceType" label-width="80">-->
+<!--            <el-select style="width: 100%;" v-model="queryParams.deviceType" placeholder="设备类型"-->
+<!--                       @change="searchChangeSelectDeviceType" clearable>-->
+<!--              <el-option v-for="dict in deviceTypeSelectList" :key="dict.value" :label="dict.label"-->
+<!--                         :value="`${dict.value}`"></el-option>-->
+<!--            </el-select>-->
+<!--          </el-form-item>-->
+
+<!--          <el-form-item label="网络状态" prop="netStatus" label-width="80" v-if="activeName!='fsu' ">-->
+<!--            <el-select style="width: 100%;" v-model="queryParams.netStatus" placeholder="网络状态"-->
+<!--                       @change="searchChangeSelectNetStatus" clearable>-->
+<!--              <el-option v-for="dict in netStatusList" :key="dict.value" :label="dict.label"-->
+<!--                         :value="`${dict.value}`"></el-option>-->
+<!--            </el-select>-->
+<!--          </el-form-item>-->
+        </el-form>
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              icon="el-icon-search"
+              size="mini"
+              @click="handleQuery"
+            >搜索</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              icon="el-icon-refresh"
+              size="mini"
+              @click="resetQuery">重置
+            </el-button>
+          </el-col>
+          <right-toolbar :showSearch.sync="showSearch"  @queryTable="getList"></right-toolbar>
+        </el-row>
+      </div>
+      <el-table
+        border
+        height="646"
+        size="small"
+        v-loading="loading"
+        :data="dataList"
+      >
+        <el-table-column label="序号" align="center" min-width="30">
+          <template v-slot:default="scope">
+            <span v-text="getPageIndex(scope.$index)"> </span>
+          </template>
+        </el-table-column>
+        <el-table-column label="设备名称" align="center" prop="dvsName"/>
+        <el-table-column label="通道名称" align="center" prop="channelName" show-overflow-tooltip/>
+        <el-table-column label="设备IP地址" align="center" prop="netAddress"/>
+        <el-table-column label="所属机构" align="center" prop="orgName"/>
+        <el-table-column
+          label="前端录像类型"
+          align="center"
+          prop="planType"
+        >
+          <template slot-scope="scope">
+            {{ getPlanTypeDesc(scope.row) }}
+          </template>
+        </el-table-column>
+        <el-table-column label="录像检测模板" align="center" prop="templateName" show-overflow-tooltip/>
+        <el-table-column label="前端设备起始时间" align="center" prop="minTime" min-width="100"/>
+        <el-table-column label="前端设备结束时间" align="center" prop="maxTime" min-width="100"/>
+        <el-table-column label="更新时间" align="center" prop="planUpdateTime" show-overflow-tooltip/>
+        <el-table-column label="异常原因" align="center" prop="failRemark">
+          <template slot-scope="scope">
+            {{ scope.row.failRemark || '-' }}
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="操作"
+          align="center"
+          class-name="small-padding fixed-width"
+        >
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-detail"
+              @click="showPlanTimeDetail(scope.row)"
+            >查看
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+    <channel-plan-time-dialog ref="channelPlanTime"></channel-plan-time-dialog>
+  </div>
+</template>
+
+<script>
+import OrgTree from "@/components/orgTree/orgQuerySelector.vue";
+import channelPlanTimeDialog from "./channelPlanTimeDialog.vue"
+import {deptTreeSelect} from "@/api/system/public";
+import {list,} from "@/api/iot/videoChannelPlan";
+
+export default {
+  name: "IotVideoChannelPlanPage",
+  components: {OrgTree, channelPlanTimeDialog },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个停用
+      single: true,
+      //搜索tree
+      deptName: null,
+      // 非多个停用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      inparm: 0,
+      // 【请填写功能名称】表格数据
+      dataList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      dept: {
+        id: null,
+      },
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        orgId: null,
+        orgName: null,
+        dvsName: null,
+        channelName: null,
+        planType: null,
+        templateName: null,
+        checkSub: true,
+      },
+      //修改新增中的机构树
+      deptOptions: [],
+      selectOrgId: null,
+      defaultKeys: [],
+    };
+  },
+  created() {
+    this.getDeptTree();
+  },
+
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    },
+  },
+
+  methods: {
+    getPlanTypeDesc(row) {
+      //'录像计划类型(0:全天定时录像;1:分时段定时录像;2:全天移动侦测;3:混合录像计划)',
+      let val = row.planType;
+      if (val === 0) {
+        return "全天定时录像";
+      } else if (val === 1) {
+        return "分时段定时录像";
+      } else if (val === 2) {
+        return "全天移动侦测";
+      } else if (val === 3) {
+        return "混合录像计划";
+      }
+    },
+    onOrgSelect(node) {
+      this.form.orgPath = node.path;
+      this.form.orgName = node.name;
+    },
+    //切换tab栏刷新数据
+    handleClick() {
+      this.getList();
+    },
+
+    getDefaultOrg(node) {
+      this.queryParams.orgId = node.id;
+      this.getList();
+    },
+    //单选框状态改变
+    checkChange(state) {
+      this.queryParams.checkSub = state;
+      this.getList();
+    },
+    // 节点单击事件
+    clickTreeNode(data) {
+      if (data == null) {
+        return;
+      }
+      this.queryParams.orgId = data.id;
+      this.getList();
+    },
+
+    getPageIndex($index) {
+      //表格序号
+      return (
+        (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
+      );
+    },
+    /** 查询【请填写功能名称】列表 */
+    getList() {
+      this.loading = true;
+      list(this.queryParams).then((response) => {
+        this.dataList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+
+    /** 查询部门下拉树结构 */
+    getDeptTree() {
+      deptTreeSelect().then((response) => {
+        this.deptOptions = response.data;
+        this.defaultKeys.push(response.data[0].id);
+        this.queryParams.orgId = response.data[0].id;
+        this.selectOrgId = response.data[0].id;
+
+        this.handleQuery();
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.queryParams.deviceType = null;
+      this.resetForm("queryForm");
+      this.handleClick();
+      this.handleQuery();
+    },
+    showPlanTimeDetail(row) {
+      console.log("id:"+row.deviceId)
+      this.$refs.channelPlanTime.show(row.deviceId);
+    },
+  },
+};
+</script>
+<style lang="scss">
+.el-checkbox {
+  display: -webkit-box !important;
+}
+</style>