“yueshang” 1 жил өмнө
parent
commit
99996e4307

+ 16 - 0
src/api/backend/statistics.js

@@ -41,4 +41,20 @@ export function getDdlist() {
       method: "get",
     })
   }
+
+  //监督员
+  export function watcherorglist() {
+    return request({
+      url: '/backend/tongji/watcherorglist',
+      method: "get",
+    })
+  }
+    //实时统计
+  export function activetimeTongji() {
+    return request({
+      url:'/backend/activetime-tongji/page',
+      method: "get",
+    })
+  }
+    
   

+ 160 - 44
src/views/backend/actdateTongji/index.vue

@@ -1,15 +1,32 @@
 <template>
   <div class="app-container">
-
     <!-- 搜索工作栏 -->
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
       <el-form-item label="大队id" prop="deptid">
-        <el-select v-model="queryParams.deptid" placeholder="请选择大队id" clearable size="small">
-          <el-option label="请选择字典生成" value="" />
+        <el-select
+          v-model="queryParams.deptid"
+          clearable
+          placeholder="请选择消防大队"
+        >
+          <el-option
+            :label="item.deptName"
+            :value="item.id"
+            v-for="item in deptData"
+            :key="item.id"
+          ></el-option>
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
+        <el-button type="primary" icon="el-icon-search" @click="handleQuery"
+          >搜索</el-button
+        >
         <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
@@ -17,45 +34,105 @@
     <!-- 操作工具栏 -->
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
-        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
-                   v-hasPermi="['backend:actdate-tongji:create']">新增</el-button>
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['backend:actdate-tongji:create']"
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
-        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
-                   v-hasPermi="['backend:actdate-tongji:export']">导出</el-button>
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          :loading="exportLoading"
+          v-hasPermi="['backend:actdate-tongji:export']"
+          >导出</el-button
+        >
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
     </el-row>
 
     <!-- 列表 -->
     <el-table v-loading="loading" :data="list">
       <el-table-column label="id" align="center" prop="id" />
-      <el-table-column label="大队id" align="center" prop="deptid" />
+      <el-table-column label="消防大队" align="center" prop="deptid">
+        <template v-slot="scope">
+          {{ deptList(scope.row.deptid) }}
+        </template>
+      </el-table-column>
       <el-table-column label="统计日期" align="center" prop="actdate" />
       <el-table-column label="活跃单位数" align="center" prop="actorgs" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template v-slot="scope">
-          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
-                     v-hasPermi="['backend:actdate-tongji:update']">修改</el-button>
-          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
-                     v-hasPermi="['backend:actdate-tongji:delete']">删除</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['backend:actdate-tongji:update']"
+            >修改</el-button
+          >
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['backend:actdate-tongji:delete']"
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
     <!-- 分页组件 -->
-    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
-                @pagination="getList"/>
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNo"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
 
     <!-- 对话框(添加 / 修改) -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="500px"
+      v-dialogDrag
+      append-to-body
+    >
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="大队id" prop="deptid">
-          <el-select v-model="form.deptid" placeholder="请选择大队id">
-            <el-option label="请选择字典生成" value="" />
+        <el-form-item label="消防大队" prop="deptid">
+          <el-select v-model="form.deptid" placeholder="请选择消防大队">
+            <el-option
+              :label="item.deptName"
+              :value="item.id"
+              v-for="item in deptData"
+              :key="item.id"
+            ></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="统计日期" prop="actdate">
-          <el-date-picker clearable v-model="form.actdate" type="date" value-format="timestamp" placeholder="选择统计日期" />
+          <el-date-picker
+            clearable
+            v-model="form.actdate"
+            type="date"
+            value-format="timestamp"
+            placeholder="选择统计日期"
+          />
         </el-form-item>
         <el-form-item label="活跃单位数" prop="actorgs">
           <el-input v-model="form.actorgs" placeholder="请输入活跃单位数" />
@@ -70,12 +147,18 @@
 </template>
 
 <script>
-import { createActdateTongji, updateActdateTongji, deleteActdateTongji, getActdateTongji, getActdateTongjiPage, exportActdateTongjiExcel } from "@/api/backend/actdateTongji";
-
+import {
+  createActdateTongji,
+  updateActdateTongji,
+  deleteActdateTongji,
+  getActdateTongji,
+  getActdateTongjiPage,
+  exportActdateTongjiExcel,
+} from "@/api/backend/actdateTongji";
+import { getDdlist } from "@/api/backend/statistics";
 export default {
   name: "ActdateTongji",
-  components: {
-  },
+  components: {},
   data() {
     return {
       // 遮罩层
@@ -102,24 +185,49 @@ export default {
       form: {},
       // 表单校验
       rules: {
-        deptid: [{ required: true, message: "大队id不能为空", trigger: "change" }],
-      }
+        deptid: [
+          { required: true, message: "大队id不能为空", trigger: "change" },
+        ],
+      },
+      deptData: [],
     };
   },
   created() {
     this.getList();
+    this.getDeptData();
   },
   methods: {
     /** 查询列表 */
     getList() {
       this.loading = true;
       // 执行查询
-      getActdateTongjiPage(this.queryParams).then(response => {
+      getActdateTongjiPage(this.queryParams).then((response) => {
         this.list = response.data.list;
         this.total = response.data.total;
         this.loading = false;
       });
     },
+    /** 获取消防大队下拉框数据 */
+    getDeptData() {
+      getDdlist().then((res) => {
+        this.deptData = res.data;
+      });
+    },
+    /** 列表消防大队转换 id2name*/
+    deptList(id) {
+      let thisDept;
+      const arr = JSON.parse(JSON.stringify(this.deptData));
+      arr.forEach((item) => {
+        if (item.id == id) {
+          thisDept = item;
+        }
+      });
+      if (thisDept) {
+        return thisDept.deptName;
+      } else {
+        return "";
+      }
+    },
     /** 取消按钮 */
     cancel() {
       this.open = false;
@@ -155,7 +263,7 @@ export default {
     handleUpdate(row) {
       this.reset();
       const id = row.id;
-      getActdateTongji(id).then(response => {
+      getActdateTongji(id).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改各大队每日活跃数统计";
@@ -163,13 +271,13 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (!valid) {
           return;
         }
         // 修改的提交
         if (this.form.id != null) {
-          updateActdateTongji(this.form).then(response => {
+          updateActdateTongji(this.form).then((response) => {
             this.$modal.msgSuccess("修改成功");
             this.open = false;
             this.getList();
@@ -177,7 +285,7 @@ export default {
           return;
         }
         // 添加的提交
-        createActdateTongji(this.form).then(response => {
+        createActdateTongji(this.form).then((response) => {
           this.$modal.msgSuccess("新增成功");
           this.open = false;
           this.getList();
@@ -187,27 +295,35 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const id = row.id;
-      this.$modal.confirm('是否确认删除各大队每日活跃数统计编号为"' + id + '"的数据项?').then(function() {
+      this.$modal
+        .confirm('是否确认删除各大队每日活跃数统计编号为"' + id + '"的数据项?')
+        .then(function () {
           return deleteActdateTongji(id);
-        }).then(() => {
+        })
+        .then(() => {
           this.getList();
           this.$modal.msgSuccess("删除成功");
-        }).catch(() => {});
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
       // 处理查询参数
-      let params = {...this.queryParams};
+      let params = { ...this.queryParams };
       params.pageNo = undefined;
       params.pageSize = undefined;
-      this.$modal.confirm('是否确认导出所有各大队每日活跃数统计数据项?').then(() => {
+      this.$modal
+        .confirm("是否确认导出所有各大队每日活跃数统计数据项?")
+        .then(() => {
           this.exportLoading = true;
           return exportActdateTongjiExcel(params);
-        }).then(response => {
-          this.$download.excel(response, '各大队每日活跃数统计.xls');
+        })
+        .then((response) => {
+          this.$download.excel(response, "各大队每日活跃数统计.xls");
           this.exportLoading = false;
-        }).catch(() => {});
-    }
-  }
+        })
+        .catch(() => {});
+    },
+  },
 };
 </script>

+ 49 - 13
src/views/backend/activetimeTongji/index.vue

@@ -3,11 +3,16 @@
 
     <!-- 搜索工作栏 -->
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="大队id" prop="deptid">
-        <el-select v-model="queryParams.deptid" placeholder="请选择大队id" clearable size="small">
-          <el-option label="请选择字典生成" value="" />
-        </el-select>
-      </el-form-item>
+      <el-form-item label="消防大队" prop="deptid">
+          <el-select v-model="form.deptid" placeholder="请选择消防大队">
+            <el-option
+              :label="item.deptName"
+              :value="item.id"
+              v-for="item in deptData"
+              :key="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
@@ -30,7 +35,11 @@
     <!-- 列表 -->
     <el-table v-loading="loading" :data="list">
       <el-table-column label="id" align="center" prop="id" />
-      <el-table-column label="大队id" align="center" prop="deptid" />
+      <el-table-column label="消防大队" align="center" prop="deptid">
+        <template v-slot="scope">
+          {{ deptList(scope.row.deptid) }}
+        </template>
+      </el-table-column>
       <el-table-column label="已覆盖单位数统计" align="center" prop="coverorg" />
       <el-table-column label="当日扫码检查量统计" align="center" prop="todayscan" />
       <el-table-column label="活跃用户统计" align="center" prop="actuser" />
@@ -52,11 +61,16 @@
                 @pagination="getList"/>
 
     <!-- 对话框(添加 / 修改) -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="大队id" prop="deptid">
-          <el-select v-model="form.deptid" placeholder="请选择大队id">
-            <el-option label="请选择字典生成" value="" />
+    <el-dialog :title="title" :visible.sync="open" width="600px" v-dialogDrag append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="170px">
+        <el-form-item label="消防大队" prop="deptid">
+          <el-select v-model="form.deptid" placeholder="请选择消防大队">
+            <el-option
+              :label="item.deptName"
+              :value="item.id"
+              v-for="item in deptData"
+              :key="item.id"
+            ></el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="已覆盖单位数统计" prop="coverorg">
@@ -91,7 +105,7 @@
 
 <script>
 import { createActivetimeTongji, updateActivetimeTongji, deleteActivetimeTongji, getActivetimeTongji, getActivetimeTongjiPage, exportActivetimeTongjiExcel } from "@/api/backend/activetimeTongji";
-
+import { getDdlist } from "@/api/backend/statistics";
 export default {
   name: "ActivetimeTongji",
   components: {
@@ -122,12 +136,13 @@ export default {
       form: {},
       // 表单校验
       rules: {
-        deptid: [{ required: true, message: "大队id不能为空", trigger: "change" }],
+        deptid: [{ required: true, message: "大队不能为空", trigger: "change" }],
       }
     };
   },
   created() {
     this.getList();
+    this.getDeptData();
   },
   methods: {
     /** 查询列表 */
@@ -140,6 +155,27 @@ export default {
         this.loading = false;
       });
     },
+        /** 获取消防大队下拉框数据 */
+        getDeptData() {
+      getDdlist().then((res) => {
+        this.deptData = res.data;
+      });
+    },
+    /** 列表消防大队转换 id2name*/
+    deptList(id) {
+      let thisDept;
+      const arr = JSON.parse(JSON.stringify(this.deptData));
+      arr.forEach((item) => {
+        if (item.id == id) {
+          thisDept = item;
+        }
+      });
+      if (thisDept) {
+        return thisDept.deptName;
+      } else {
+        return "";
+      }
+    },
     /** 取消按钮 */
     cancel() {
       this.open = false;

+ 2 - 2
src/views/backend/dengertypeOrder/index.vue

@@ -123,9 +123,9 @@
           <el-select v-model="form.dengertype" placeholder="请选择隐患类型">
             <el-option
               v-for="dict in this.getDictDatas(DICT_TYPE.DANGER_TYPE)"
-              :key="dict.label"
+              :key="dict.value"
               :label="dict.label"
-              :value="dict.label"
+              :value="dict.value"
             />
           </el-select>
         </el-form-item>

+ 134 - 46
src/views/backend/devscanOrder/index.vue

@@ -1,19 +1,48 @@
 <template>
   <div class="app-container">
-
     <!-- 搜索工作栏 -->
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
       <el-form-item label="大队" prop="deptid">
-        <el-input v-model="queryParams.deptid" placeholder="请输入大队id" clearable @keyup.enter.native="handleQuery"/>
+        <el-select
+          v-model="queryParams.deptid"
+          clearable
+          placeholder="请选择消防大队"
+        >
+          <el-option
+            :label="item.deptName"
+            :value="item.id"
+            v-for="item in deptData"
+            :key="item.id"
+          ></el-option>
+        </el-select>
       </el-form-item>
       <el-form-item label="设备类型" prop="inspecttype">
-        <el-input v-model="queryParams.inspecttype" placeholder="请输入设备类型" clearable @keyup.enter.native="handleQuery"/>
+        <el-input
+          v-model="queryParams.inspecttype"
+          placeholder="请输入设备类型"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
       </el-form-item>
       <el-form-item label="排行" prop="sort">
-        <el-input v-model="queryParams.sort" placeholder="请输入排行" clearable @keyup.enter.native="handleQuery"/>
+        <el-input
+          v-model="queryParams.sort"
+          placeholder="请输入排行"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
+        <el-button type="primary" icon="el-icon-search" @click="handleQuery"
+          >搜索</el-button
+        >
         <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
@@ -21,41 +50,86 @@
     <!-- 操作工具栏 -->
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
-        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
-                   v-hasPermi="['backend:devscan-order:create']">新增</el-button>
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['backend:devscan-order:create']"
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
-        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
-                   v-hasPermi="['backend:devscan-order:export']">导出</el-button>
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          :loading="exportLoading"
+          v-hasPermi="['backend:devscan-order:export']"
+          >导出</el-button
+        >
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
     </el-row>
 
     <!-- 列表 -->
     <el-table v-loading="loading" :data="list">
       <el-table-column label="id" align="center" prop="id" />
       <el-table-column label="消防大队" align="center" prop="deptid">
-          <template v-slot="scope">
-            {{ deptList(scope.row.deptid) }}
-          </template>
+        <template v-slot="scope">
+          {{ deptList(scope.row.deptid) }}
+        </template>
       </el-table-column>
       <el-table-column label="设备类型" align="center" prop="inspecttype" />
       <el-table-column label="排行" align="center" prop="sort" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template v-slot="scope">
-          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
-                     v-hasPermi="['backend:devscan-order:update']">修改</el-button>
-          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
-                     v-hasPermi="['backend:devscan-order:delete']">删除</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['backend:devscan-order:update']"
+            >修改</el-button
+          >
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['backend:devscan-order:delete']"
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
     <!-- 分页组件 -->
-    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
-                @pagination="getList"/>
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNo"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
 
     <!-- 对话框(添加 / 修改) -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" v-dialogDrag append-to-body>
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="500px"
+      v-dialogDrag
+      append-to-body
+    >
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="消防大队" prop="deptid">
           <el-select v-model="form.deptid" placeholder="请选择消防大队">
@@ -71,9 +145,9 @@
           <el-select v-model="form.inspecttype" placeholder="请选择设备类型">
             <el-option
               v-for="dict in this.getDictDatas(DICT_TYPE.DICT_FIRE_DECIVE_TYPE)"
-              :key="dict.label"
+              :key="dict.value"
               :label="dict.label"
-              :value="dict.label"
+              :value="dict.value"
             />
           </el-select>
         </el-form-item>
@@ -90,12 +164,18 @@
 </template>
 
 <script>
-import { createDevscanOrder, updateDevscanOrder, deleteDevscanOrder, getDevscanOrder, getDevscanOrderPage, exportDevscanOrderExcel } from "@/api/backend/devscanOrder";
+import {
+  createDevscanOrder,
+  updateDevscanOrder,
+  deleteDevscanOrder,
+  getDevscanOrder,
+  getDevscanOrderPage,
+  exportDevscanOrderExcel,
+} from "@/api/backend/devscanOrder";
 import { getDdlist } from "@/api/backend/statistics";
 export default {
   name: "DevscanOrder",
-  components: {
-  },
+  components: {},
   data() {
     return {
       // 遮罩层
@@ -138,20 +218,20 @@ export default {
     getList() {
       this.loading = true;
       // 执行查询
-      getDevscanOrderPage(this.queryParams).then(response => {
+      getDevscanOrderPage(this.queryParams).then((response) => {
         this.list = response.data.list;
         this.total = response.data.total;
         this.loading = false;
       });
     },
-        /** 获取消防大队下拉框数据 */
-        getDeptData() {
+    /** 获取消防大队下拉框数据 */
+    getDeptData() {
       getDdlist().then((res) => {
         this.deptData = res.data;
       });
     },
-        /** 列表消防大队转换 id2name*/
-        deptList(id) {
+    /** 列表消防大队转换 id2name*/
+    deptList(id) {
       let thisDept;
       const arr = JSON.parse(JSON.stringify(this.deptData));
       arr.forEach((item) => {
@@ -200,7 +280,7 @@ export default {
     handleUpdate(row) {
       this.reset();
       const id = row.id;
-      getDevscanOrder(id).then(response => {
+      getDevscanOrder(id).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改设备类型扫码排行";
@@ -208,13 +288,13 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (!valid) {
           return;
         }
         // 修改的提交
         if (this.form.id != null) {
-          updateDevscanOrder(this.form).then(response => {
+          updateDevscanOrder(this.form).then((response) => {
             this.$modal.msgSuccess("修改成功");
             this.open = false;
             this.getList();
@@ -222,7 +302,7 @@ export default {
           return;
         }
         // 添加的提交
-        createDevscanOrder(this.form).then(response => {
+        createDevscanOrder(this.form).then((response) => {
           this.$modal.msgSuccess("新增成功");
           this.open = false;
           this.getList();
@@ -232,27 +312,35 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const id = row.id;
-      this.$modal.confirm('是否确认删除设备类型扫码排行编号为"' + id + '"的数据项?').then(function() {
+      this.$modal
+        .confirm('是否确认删除设备类型扫码排行编号为"' + id + '"的数据项?')
+        .then(function () {
           return deleteDevscanOrder(id);
-        }).then(() => {
+        })
+        .then(() => {
           this.getList();
           this.$modal.msgSuccess("删除成功");
-        }).catch(() => {});
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
       // 处理查询参数
-      let params = {...this.queryParams};
+      let params = { ...this.queryParams };
       params.pageNo = undefined;
       params.pageSize = undefined;
-      this.$modal.confirm('是否确认导出所有设备类型扫码排行数据项?').then(() => {
+      this.$modal
+        .confirm("是否确认导出所有设备类型扫码排行数据项?")
+        .then(() => {
           this.exportLoading = true;
           return exportDevscanOrderExcel(params);
-        }).then(response => {
-          this.$download.excel(response, '设备类型扫码排行.xls');
+        })
+        .then((response) => {
+          this.$download.excel(response, "设备类型扫码排行.xls");
           this.exportLoading = false;
-        }).catch(() => {});
-    }
-  }
+        })
+        .catch(() => {});
+    },
+  },
 };
 </script>

+ 166 - 0
src/views/backend/realTime/index.vue

@@ -0,0 +1,166 @@
+<template>
+  <div class="app-container">
+    <el-tabs
+      type="border-card"
+      v-model.trim="selectedTab"
+      @tab-click="clickTab"
+    >
+      <el-tab-pane
+        :label="item.deptName"
+        v-for="(item, index) in brigade"
+        :key="index"
+        :name="item.id"
+      >
+      </el-tab-pane>
+    </el-tabs>
+    <div class="two-line">
+      <div v-for="(item, index) in scanCode" :key="index">
+        <div class="total">{{ item.count }}</div>
+        <div class="item-name">{{ item.name }}</div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+import { activetimeTongji, getDdlist } from "@/api/backend/statistics";
+export default {
+  data() {
+    return {
+      selectedTab: 0,
+      scanCode: [
+        { name: "已覆盖单位数统计", code: 1,count:0 },
+        { name: "当日扫码检查量统计", code: 2,count:0 },
+        { name: "活跃用户统计", code: 3,count:0 },
+        { name: "上报隐患数统计", code: 4,count:0 },
+        { name: "活跃重点单位统计", code: 5,count:0 },
+        { name: "每日活跃重点单位统计", code: 6,count:0 },
+        { name: "重点单位扫码量统计", code: 7,count:0 },
+      ],
+      deptid: 0,
+      brigade: [],
+    };
+  },
+  created() {
+    this.getList();
+    this.navList();
+    this.$forceUpdate()
+  },
+  methods: {
+    navList() {
+      activetimeTongji({ pageNo: 1, pageSize: 9999, deptid: this.deptid }).then(
+        (response) => {
+          if (response.data) {
+            const tongjiData = response.data.list.filter((item) => {
+              return item.deptid == this.deptId;
+            });
+            if (tongjiData.length > 0) {
+              const datas = tongjiData[0];
+              this.scanCode.forEach((item) => {
+                switch (item.code) {
+                  case 1:
+                    item.count = datas.coverorg; //
+                    break;
+                  case 2:
+                    item.count = datas.todayscan; //
+                    break;
+                  case 3:
+                    item.count = datas.actuser;
+                    break;
+                  case 4:
+                    item.count = datas.dengercount;
+                    break;
+                  case 5:
+                    item.count = datas.actimporg;
+                    break;
+                  case 6:
+                    item.count = datas.todayactimporg;
+                    break;
+                  case 7:
+                    item.count = datas.actimpscan;
+                    break;
+                  default:
+                    break;
+                }
+              });
+            } else {
+              this.scanCode.forEach((item) => {
+                item.count = 0;
+              });
+            }
+          }
+        }
+      );
+    },
+    getList() {
+      // 执行查询
+      getDdlist().then((response) => {
+        this.brigade = response.data;
+        this.brigade.unshift({ deptName: "所有大队", id: "0" });
+      });
+    },
+    //切换tab
+    clickTab(e) {
+      this.deptId = e.name;
+      this.navList();
+    },
+  },
+};
+</script>
+<style scoped lang="scss">
+.app-container {
+  background:#EDEFF2;
+  max-height: calc(100vh - 84px);
+}
+.two-line {
+  margin-top: 16px;
+  display: flex;
+  justify-content: space-between;
+  flex-wrap: wrap;
+  align-items: center;
+
+  & > div {
+    flex-basis: 23%;
+    margin-top: 16px;
+    height: 200px;
+    background: #fff;
+    position: relative;
+    .total {
+      position: absolute;
+      left: 50%;
+      text-align: center;
+      line-height: 90px;
+      font-size: 30px;
+      font-weight: 600;
+      transform: translateX(-50%);
+      top: 30px;
+      width: 106px;
+      height: 106px;
+      opacity: 1;
+      border-radius: 50%;
+      box-sizing: border-box;
+    }
+  }
+  & > div:nth-child(even) {
+    color: #01bceb;
+    .total {
+      border: 9px solid #01bceb;
+    }
+  }
+  & > div:nth-child(odd) {
+    color: #0147eb;
+    .total {
+      border: 9px solid #0147eb;
+    }
+  }
+  & > div:last-child {
+    margin-right: 0;
+  }
+  .item-name {
+    color: #657398;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    line-height: 330px;
+  }
+}
+</style>

+ 10 - 10
src/views/backend/s9Tongji/index.vue

@@ -9,16 +9,16 @@
       v-show="showSearch"
       label-width="68px"
     >
-      <el-form-item label="大队id" prop="deptid">
-        <el-select
-          v-model="queryParams.deptid"
-          placeholder="请选择大队id"
-          clearable
-          size="small"
-        >
-          <el-option label="请选择字典生成" value="" />
-        </el-select>
-      </el-form-item>
+    <el-form-item label="消防大队" prop="deptid">
+          <el-select v-model="form.deptid" placeholder="请选择消防大队">
+            <el-option
+              :label="item.deptName"
+              :value="item.id"
+              v-for="item in deptData"
+              :key="item.id"
+            ></el-option>
+          </el-select>
+        </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" @click="handleQuery"
           >搜索</el-button

+ 1 - 1
src/views/backend/stacisticsNine/StatisticsNine.vue

@@ -323,7 +323,7 @@ export default {
 <style scoped>
 .bigBox {
     width: 100%;
-    height: calc(100vh - 180px);
+    height: calc(100vh - 84px);
     /* border: 1px solid black; */
 }
 

+ 6 - 0
src/views/backend/statistics/index.vue

@@ -6,6 +6,7 @@
       >
       <el-button @click="clickFire(1)" v-else>消防监督</el-button>
       <el-button @click="clickFire(2)">九小单位</el-button>
+      <el-button @click="clickFire(3)">实时监控</el-button>
     </div>
     <div v-if="open == 1 || open == 0" style="width: 100%">
       <statisticsFire></statisticsFire>
@@ -13,16 +14,21 @@
     <div v-if="open == 2" style="background-color: #F3F5F9;">
       <StatisticsNine></StatisticsNine>
     </div>
+    <div v-if="open == 3" style="background-color: #F3F5F9;">
+      <real-time></real-time>
+    </div>
   </div>
 </template>
 <script>
 import { getDdlist } from "@/api/backend/statistics";
 import statisticsFire from "@/views/backend/statisticsFire/index";
 import StatisticsNine from "../stacisticsNine/StatisticsNine.vue";
+import realTime from "@/views/backend/realTime/index";
 export default {
   components: {
     statisticsFire,
     StatisticsNine,
+    realTime
   },
   data() {
     return {

+ 12 - 0
src/views/backend/statisticsFire/component/barChart.vue

@@ -72,6 +72,18 @@ export default {
           top: 10,
           left: 5,
         },
+        tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            type: "shadow",
+          },
+          formatter: function (params) {
+            var tar = params[0];
+            return (
+              "监督人:" + tar.name + "<br/>" + "质态数" + " : " + tar.value
+            );
+          },
+        },
         xAxis: {
           type: "category",
           data: this.people,

+ 12 - 0
src/views/backend/statisticsFire/component/unitbartChart.vue

@@ -72,6 +72,18 @@ export default {
         top:10,
         left:5
       },
+      tooltip: {
+          trigger: "axis",
+          axisPointer: {
+            type: "shadow",
+          },
+          formatter: function (params) {
+            var tar = params[0];
+            return (
+              "监督人:" + tar.name + "<br/>" + "单位数" + " : " + tar.value
+            );
+          },
+        },
       xAxis: {
         type: "category",
         data:this.people,

+ 88 - 20
src/views/backend/statisticsFire/index.vue

@@ -27,8 +27,8 @@
       <!-- 左侧版块 -->
       <div class="left-chart">
         <div class="first-line">
-          <bar-chart :watcherList="watcherList"/>
-          <unitbart-chart :watcherList="watcherList"/>
+          <bar-chart :watcherList="watcherList" />
+          <unitbart-chart :watcherList="watcherList" />
         </div>
         <div class="two-line">
           <div v-for="(item, index) in scanCode" :key="index">
@@ -96,7 +96,7 @@
           <pagination
             v-show="total > 0"
             :total="total"
-            :pager-count="4"
+            :pager-count="5"
             :page.sync="queryRader.pageNo"
             :limit.sync="queryRader.pageSize"
             layout="total, prev, pager, next, jumper"
@@ -107,7 +107,11 @@
           <div class="left">
             <div style="background: #fff">
               <div class="table-title">设备类型扫码量排行(TOP10)</div>
-              <el-table highlight-current-row :data="devscanorderList" height="376px">
+              <el-table
+                highlight-current-row
+                :data="devscanorderList"
+                height="376px"
+              >
                 <el-table-column label="序号" type="index" width="50px" />
                 <el-table-column
                   label="消防设备类型"
@@ -115,11 +119,7 @@
                   prop="inspecttype"
                 >
                 </el-table-column>
-                <el-table-column
-                  label="扫码数量"
-                  align="center"
-                  prop="sort"
-                >
+                <el-table-column label="扫码数量" align="center" prop="sort">
                 </el-table-column>
               </el-table>
             </div>
@@ -132,7 +132,11 @@
                 style="margin-top: 16px"
               >
                 <el-table-column label="序号" type="index" width="50px" />
-                <el-table-column label="隐患类型" align="center" prop="dengertype">
+                <el-table-column
+                  label="隐患类型"
+                  align="center"
+                  prop="dengertype"
+                >
                 </el-table-column>
                 <el-table-column label="数量" align="center" prop="sort">
                 </el-table-column>
@@ -141,11 +145,19 @@
           </div>
           <div class="right" style="background: #fff">
             <div class="table-title">监督员</div>
-            <el-table highlight-current-row :data="list" height="782px">
+            <el-table
+              highlight-current-row
+              :data="watcherOrgData"
+              height="782px"
+            >
               <el-table-column label="序号" type="index" width="50px" />
-              <el-table-column label="监督单位" align="center" prop="orgName">
+              <el-table-column label="监督单位" align="center" prop="org_name">
               </el-table-column>
-              <el-table-column label="监督员" align="center" prop="policeId">
+              <el-table-column
+                label="监督员"
+                align="center"
+                prop="watcher_name"
+              >
               </el-table-column>
             </el-table>
           </div>
@@ -162,12 +174,15 @@ import {
   tongjiDevscanorder,
   tongjiDengertypeorder,
   watcherPage,
+  watcherorglist,
 } from "@/api/backend/statistics";
+import { getActdateTongjiPage } from "@/api/backend/actdateTongji";
 import { currentReport } from "@/api/backend/taskInfo";
 import barChart from "./component/barChart.vue";
 import unitbartChart from "./component/unitbartChart.vue";
 import unitActive from "./component/unitActive.vue";
 import { getOrgPage } from "@/api/backend/org";
+import { DICT_TYPE, getDictDatas } from "@/utils/dict";
 export default {
   components: {
     barChart,
@@ -248,7 +263,10 @@ export default {
       allNumber: null,
       devscanorderList: null, //排行列表
       dengertypeorderList: null, //隐患类型排行榜
-      watcherList:null,//监督员质态统计
+      watcherList: null, //监督员质态统计
+      watcherOrgData: null, //监督员
+      actList: null, //单位活跃数
+      actdate: [],
     };
   },
   // 监听 Element UI 中的筛选月份变化
@@ -265,7 +283,9 @@ export default {
     this.navList();
     this.Devscanorder();
     this.Dengertypeorder();
-    this.getWatcher()
+    this.getWatcher();
+    this.getWatcherorg();
+    this.getActdateTong();
   },
   methods: {
     //得到所有的数字数据
@@ -369,7 +389,7 @@ export default {
       // 执行查询
       getDdlist().then((response) => {
         this.brigade = response.data;
-        this.brigade.unshift({ deptName: "所有大队", id: 0 });
+        this.brigade.unshift({ deptName: "所有大队", id: "0" });
       });
     },
     //切换tab
@@ -379,6 +399,9 @@ export default {
       this.Devscanorder();
       this.Dengertypeorder();
       this.getWatcher();
+      this.getWatcherorg();
+      this.getActdateTong();
+      this.$forceUpdate();
     },
     async fetchData() {
       const time = this.selectedMonths;
@@ -402,20 +425,65 @@ export default {
     },
     //top扫码排行
     Devscanorder() {
-      tongjiDevscanorder({pageNo:1,pageSize:999,deptId:this.deptId}).then((response) => {
+      tongjiDevscanorder({
+        pageNo: 1,
+        pageSize: 999,
+        deptId: this.deptId,
+      }).then((response) => {
         this.devscanorderList = response.data.list;
+        const type = this.getDictDatas(DICT_TYPE.DICT_FIRE_DECIVE_TYPE);
+        type.map((item) => {
+          this.devscanorderList.forEach((key) => {
+            if (item.value == key.inspecttype) {
+              key.inspecttype = item.label;
+            }
+          });
+        });
       });
     },
     //隐患排行
     Dengertypeorder() {
-      tongjiDengertypeorder({pageNo:1,pageSize:999,deptId:this.deptId}).then((response) => {
+      tongjiDengertypeorder({
+        pageNo: 1,
+        pageSize: 999,
+        deptId: this.deptId,
+      }).then((response) => {
         this.dengertypeorderList = response.data.list;
+        const type = this.getDictDatas(DICT_TYPE.DANGER_TYPE);
+        type.map((item) => {
+          this.dengertypeorderList.forEach((key) => {
+            if (item.value == key.dengertype) {
+              key.dengertype = item.label;
+            }
+          });
+        });
       });
     },
     //监督员质态统计
     getWatcher() {
-      watcherPage({pageNo:1,pageSize:999,deptId:this.deptId}).then((response) => {
-        this.watcherList = response.data.list;
+      watcherPage({ pageNo: 1, pageSize: 20, deptId: this.deptId }).then(
+        (response) => {
+          this.watcherList = response.data.list;
+        }
+      );
+    },
+    //监督员
+    getWatcherorgs() {
+      watcherorglist({ pageNo: 1, pageSize: 20, deptId: this.deptId }).then(
+        (response) => {
+          this.watcherOrgData = response.data.records;
+        }
+      );
+    },
+    //单位活跃数
+    getActdateTong() {
+      getActdateTongjiPage({
+        pageNo: 1,
+        pageSize: 100,
+        actdate: this.actdate,
+        deptId: this.deptId,
+      }).then((response) => {
+        this.actList = response.data.list;
       });
     },
   },