luowei há 1 ano atrás
pai
commit
befc9cf165

+ 9 - 1
src/api/core/reportForms/safetyInspectReport.js

@@ -1,6 +1,6 @@
 import request from '@/utils/request'
 
-// 查询列表监控调阅计划
+
 export function listReport(query) {
   return request({
     url: '/core/safetyInspectReport/list',
@@ -9,6 +9,14 @@ export function listReport(query) {
   })
 }
 
+export function listSelfReport(query) {
+  return request({
+    url: '/core/safetyInspectReport/selfInspectList',
+    method: 'get',
+    params: query
+  })
+}
+
 
 export function selectAllOrg() {
     return request({

+ 2 - 1
src/views/core/reportForms/intrusionTestReport.vue

@@ -29,7 +29,7 @@
               <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
             </el-form-item>
           </el-form>
-          <h3 class="title">{{ this.title}}</h3>
+          <h1 class="title" style="text-align:center;">{{ this.title}}</h1>
           <el-row :gutter="10" class="mb8">
             <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
           </el-row>
@@ -168,6 +168,7 @@
   getDeptTree() {
       deptTreeSelect().then((response) => {
         this.deptOptions = response.data;
+        this.queryParams.orgId=response.data[0].id;
       });
     },
         /** treeSelect组件自定义数据*/

+ 42 - 11
src/views/core/reportForms/monitorAccessReport.vue

@@ -21,18 +21,17 @@
           </el-form-item>
 
 
-        <el-form-item label="周期" prop="cycle">
-            <el-select v-model="queryParams.cycle" placeholder="请选择周期">
-              <el-option v-for="dict in dict.type.repot_cycle" :key="dict.value" :label="dict.label"
-                :value=dict.value></el-option>
-            </el-select>
+        <el-form-item label="周期" prop="startTime">
+  
+            <el-date-picker     v-model="weeks"  type="week"   format='yyyy 第 WW 周'  placeholder="选择周" @change='setWeekNum'>
+             </el-date-picker>
           </el-form-item>
 
               <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
               <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
             </el-form-item>
           </el-form>
-          <h3 class="title">{{ this.title}}</h3>
+          <h1 class="title" style="text-align:center;">{{ this.title}}</h1>
           <el-row :gutter="10" class="mb8">
             <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
           </el-row>
@@ -47,12 +46,13 @@
                 <span v-text="getPageIndex(scope.$index)"> </span>
               </template>
             </el-table-column>
-
-            <el-table-column label="机构名称" align="center" prop="orgName" />
+            <el-table-column label="地区" align="center" prop="city" />
+            <el-table-column label="单位名称" align="center" prop="orgName" />
             <el-table-column label="网点数量" align="left" prop="networkNumber"/>
             <el-table-column label="应调阅次数" align="center" prop="planAccessNumber"/>
             <el-table-column label="调阅次数" align="center" prop="realityAccessNumber"/>
-            <el-table-column label="调阅率" align="center" prop="accessRate"/>
+            <el-table-column label="平均调阅时长" align="center" prop="duration"/>
+            <el-table-column label="完成率" align="center" prop="accessRate"/>
           </el-table>
           <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
                       :limit.sync="queryParams.pageSize"
@@ -92,7 +92,7 @@
           //区域
           roleOptions: [],
            //全部检查机构
-      orgOptions: [],
+          orgOptions: [],
           //搜索tree
           deptName: null,
           // 部门树选项
@@ -114,8 +114,18 @@
             checkName: null,
             areaId: null,
             orgId: null,
-            year:null
+            year:null,
+            cycle:null,
+            startTime:null,
+            endTime:null,
           },
+          weeks:null,
+          // 周期开始时间
+          startDate: '',
+          // 周期结束时间
+          endDate: '',
+          // 周期时间
+          finalDate: '',
           // 表单参数
           form: {},
           // 表单校验
@@ -155,10 +165,30 @@
         }
       },
       methods: {
+
+        p(s) {
+      return s < 10 ? '0' + s : s
+    },
+    // 时间
+    setWeekNum() {
+      console.log(this.weeks,'searchTime1111');
+      const newTime = this.weeks.getTime();
+      const day = this.weeks.getDay();
+      const oneDayTime = 24 * 60 * 60 * 1000;
+      const fromTime = newTime - day * oneDayTime;
+      const endTime = newTime + (7 - day) * oneDayTime;
+      const fromDate = new Date(fromTime);
+      this.startDate = fromDate.getFullYear() + '-' + this.p((fromDate.getMonth() + 1)) + '-' + this.p(fromDate.getDate() + 1);
+      const toDate = new Date(endTime);
+      this.endDate = toDate.getFullYear() + '-' + this.p((toDate.getMonth() + 1)) + '-' + this.p(toDate.getDate());
+      this.queryParams.startDate = this.startDate;
+      this.queryParams.endDate = this.endDate;
+    },
   /** 查询机构树数据 */
   getDeptTree() {
       deptTreeSelect().then((response) => {
         this.deptOptions = response.data;
+        this.queryParams.orgId=response.data[0].id;
       });
     },
         /** treeSelect组件自定义数据*/
@@ -187,6 +217,7 @@
 
         getList() {
           this.loading = true;
+          console.log(this.queryParams.searchTime,'searchTime');
           listReport(this.queryParams).then(response => {
             this.checkList = response.data;
             this.title=response.title;

+ 2 - 1
src/views/core/reportForms/resumptionReport.vue

@@ -45,7 +45,7 @@
               <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
             </el-form-item>
           </el-form>
-          <h3 class="title">{{ this.title}}</h3>
+          <h1 class="title" style="text-align:center;">{{ this.title}}</h1>
           <el-row :gutter="10" class="mb8">
             <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
           </el-row>
@@ -189,6 +189,7 @@
   getDeptTree() {
       deptTreeSelect().then((response) => {
         this.deptOptions = response.data;
+        this.queryParams.orgId=response.data[0].id;
       });
     },
         /** treeSelect组件自定义数据*/

+ 13 - 4
src/views/core/reportForms/safetyInspectReport.vue

@@ -42,20 +42,28 @@
     </el-date-picker>
         </el-form-item>
 
-            <el-form-item>
+            <!-- <el-form-item>
               <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
               <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-            </el-form-item>
+            </el-form-item> -->
           </el-form>
-
+       
           <el-row :gutter="10" class="mb8">
             <el-col :span="1.5">
+           
+              <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+              <el-button type="primary" icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+         
               <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport"
                          v-hasPermi="['core:safetyInspectReport:export']">导出
               </el-button>
             </el-col>
             <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+          
           </el-row>
+       <el-row>
+        <h1 class="title" style="text-align:center;">{{ this.title}}</h1>
+       </el-row>
           <el-table
             border
             height="800"
@@ -184,6 +192,7 @@
   getDeptTree() {
       deptTreeSelect().then((response) => {
         this.deptOptions = response.data;
+        this.queryParams.orgId=response.data[0].id;
       });
     },
            /** treeSelect组件自定义数据*/
@@ -215,7 +224,7 @@
           listReport(this.queryParams).then(response => {
          this.orgName=response.orgName;
             this.checkList = response.data;
-            // this.total = response.data.total;
+            this.   title=response.title;
             this.loading = false;
           });
         },

+ 294 - 0
src/views/core/reportForms/selfInspectReport.vue

@@ -0,0 +1,294 @@
+<template>
+    <div class="app-container">
+
+          <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"   label-width="100px">
+
+            <!-- <el-form-item label="统计机构" prop="orgId">
+
+<el-select style="width: 100%;"  v-model="queryParams.orgId" placeholder="请选择统计机构">
+  <el-option v-for="item in orgOptions" :key="item.id" :label="item.name"
+    :value="item.id"></el-option>
+</el-select>
+</el-form-item> -->
+
+<el-form-item label="组织机构"  prop="orgId" class="formTreeItem">
+            <tree-select
+              v-model="queryParams.orgId"
+              :options="deptOptions"
+              :show-count="true"
+              :normalizer="tenantIdnormalizer"
+              :props="{ checkStrictly: true, label: 'name' }"
+              placeholder="请选择归属机构"
+              clearValueText="清除"
+              :noChildrenText="''"
+              noOptionsText="没有数据"
+              noResultsText="没有搜索结果"
+            />
+          </el-form-item>
+          <el-form-item label="统计周期" prop="cycle">
+            <el-select v-model="queryParams.cycle" placeholder="请选择统计周期"  @change="clean">
+    <el-option
+      v-for="item in options"
+      :key="item.value"
+      :label="item.label"
+      :value="item.value">
+    </el-option>
+  </el-select>
+          </el-form-item>
+
+          <el-form-item label="时间" prop="year" v-if="queryParams.cycle==1 || queryParams.cycle==null">
+              <el-date-picker   value-format='yyyy-MM' v-model="queryParams.year"
+                                align="right" type="month" placeholder="请选择查询时间">
+                </el-date-picker>  
+              </el-form-item>
+
+<el-form-item label="年份" prop="year" v-if="queryParams.cycle==2">
+    <el-date-picker
+      value-format='yyyy'
+      v-model="queryParams.year"
+      type="year"
+      placeholder="选择年份">
+    </el-date-picker>
+        </el-form-item>
+
+            <el-form-item>
+              <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+              <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+            </el-form-item>
+          </el-form>
+
+          <el-row :gutter="10" class="mb8">
+            <el-col :span="1.5">
+              <el-button type="primary" icon="el-icon-download" size="mini" @click="handleExport"
+                         v-hasPermi="['core:safetyInspectReport:export']">导出
+              </el-button>
+            </el-col>
+            <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+            <h1 class="title" style="text-align:center;">{{ this.title}}</h1>
+          </el-row>
+          <el-table
+            border
+            height="800"
+            size="small"
+            v-loading="loading" :data="checkList" @selection-change="handleSelectionChange">
+
+            <el-table-column label="序号" align="center" min-width="50">
+              <template v-slot:default="scope">
+                <span v-text="getPageIndex(scope.$index)"> </span>
+              </template>
+            </el-table-column>
+            <el-table-column label="地区" align="center" prop="city" />
+            <el-table-column label="单位名称" align="center" prop="orgName" />
+            <el-table-column label="网点数量" align="left" prop="planInspectOrg"/>
+
+            <el-table-column label="应检次数" align="center" prop="planInspectNumber"/>
+            <el-table-column label="已检次数" align="center" prop="realityInspectNumber"/>
+            <el-table-column label="检查完成率" align="center" prop="inspectRate"/>
+            <el-table-column label="隐患数量" align="center" prop="pitfallNumber"/>
+            <el-table-column label="已整改数量" align="center" prop="rectificationNumber"/>
+            <el-table-column label="整改完成率" align="center" prop="rectificationRate"/>
+          </el-table>
+          <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
+                      :limit.sync="queryParams.pageSize"
+                      @pagination="getList"/>
+
+    </div>
+  </template>
+
+  <script>
+    import tableList from '@/mixins/tableList'
+    import {selectAllOrg,listSelfReport} from "@/api/core/reportForms/safetyInspectReport";
+    import treeselect from '@riophae/vue-treeselect'
+    import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+    import {deptTreeSelect,businessTreeSelect} from "@/api/system/public";
+    import orgTree from "@/components/orgTree";
+    export default {
+      name: "Check",
+      /** 引入基础minxins*/
+      mixins: [tableList],
+      components: {treeselect,orgTree},
+      dicts: ['sys_normal_disable','sys_org_type'],
+      data() {
+        return {
+            options: [{
+          value: 1,
+          label: '月'
+        }, {
+          value: 2,
+          label: '年'
+        }],
+          // 遮罩层
+          loading: true,
+          // 选中数组
+          ids: [],
+          names: [],
+          // 非单个停用
+          single: true,
+          //搜索tree
+          deptName: null,
+          // 非多个停用
+          multiple: true,
+          // 显示搜索条件
+          showSearch: true,
+          //区域
+          roleOptions: [],
+           //全部检查机构
+      orgOptions: [],
+          //搜索tree
+          deptName: null,
+          // 部门树选项
+          deptOptions: [],
+          // 总条数
+          total: 0,
+          //区域集合
+          areaList: [],
+          // 区域采集点表格数据
+          checkList: [],
+          // 弹出层标题
+          title: "",
+          // 是否显示弹出层
+          open: false,
+          // 查询参数
+          queryParams: {
+            pageNum: 1,
+            pageSize: 10,
+            orgId: null,
+            year:null,
+            cycle:null
+          },
+          // 表单参数
+          form: {},
+          // 表单校验
+          checkList: [],
+          roleOptions: [],
+          defaultKeys: [],
+          //是否关联下级
+          checked: false,
+          defaultProps: {
+            children: "children",
+            label: "name"
+          },
+
+          rules: {
+            areaId: [
+              {required: true, message: '请选择区域', trigger: 'blur'},
+            ],
+            orgType: [
+              {required: true, message: '请选择机构类型', trigger: 'blur'},
+            ],
+            checkName: [
+              {required: true, message: '请输入NFC点位名称', trigger: 'change'}
+            ],
+          },
+          defaultKeys: []
+
+        };
+      },
+      created() {
+        this.getDeptTree();
+      this. getList();
+      },
+      watch: {
+        // 根据名称筛选部门树
+        deptName(val) {
+          this.$refs.tree.filter(val);
+        }
+      },
+      methods: {
+
+     /** 查询机构树数据 */
+  getDeptTree() {
+      deptTreeSelect().then((response) => {
+        this.deptOptions = response.data;
+        this.queryParams.orgId=response.data[0].id;
+      });
+    },
+           /** treeSelect组件自定义数据*/
+           tenantIdnormalizer(node, instanceId) {
+      if (node.children && !node.children.length) {
+        delete node.children;
+      }
+      return {
+        id: node.id,
+        label: node.shortName,
+        children: node.children,
+      };
+    },
+        getPageIndex($index) {
+          //表格序号
+          return (
+            (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
+          );
+        },
+        handleExport() {
+      this.download('core/safetyInspectReport/export', {
+        ...this.queryParams
+      }, `${'【'+this.orgName+'】'+'-检查统计报表-'+this.formatTime(new Date(),'YYYYMMDD')}.xlsx`)
+    },
+
+
+        getList() {
+          this.loading = true;
+          listSelfReport(this.queryParams).then(response => {
+         this.orgName=response.orgName;
+            this.checkList = response.data;
+            this.   title=response.title;
+            this.loading = false;
+          });
+        },
+        getAllOrg() {
+          selectAllOrg().then(response => {
+        this.orgOptions = response.data;
+      })
+    },
+
+
+        // 取消按钮
+        cancel() {
+          this.open = false;
+          this.reset();
+        },
+        // 表单重置
+        reset() {
+          this.form = {
+            id: null,
+            checkName: null,
+            areaId: null,
+            orgId: null,
+            createTime: null,
+            updateTime: null,
+            updateId: null,
+            createBy: null,
+            delFlag: null,
+            updateBy: null
+          };
+          this.resetForm("form");
+        },
+        /** 搜索按钮操作 */
+        handleQuery() {
+          this.queryParams.pageNum = 1;
+          this.getList();
+        },
+        /** 重置按钮操作 */
+        resetQuery() {
+          this.resetForm("queryForm");
+          this.handleQuery();
+        },
+        // 多选框选中数据
+        handleSelectionChange(selection) {
+          this.ids = selection.map(item => item.id)
+          this.names = selection.map(item => item.checkName)
+          this.single = selection.length !== 1
+          this.multiple = !selection.length
+        },
+
+      }
+    };
+  </script>
+    <style lang="scss" scoped>
+    ::v-deep.formTreeItem {
+      .el-form-item__content {
+        width: 264px;
+      }
+    }
+    </style>

+ 2 - 1
src/views/core/reportForms/serviceBankReport.vue

@@ -29,7 +29,7 @@
               <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
             </el-form-item>
           </el-form>
-          <h3 class="title">{{ this.title}}</h3>
+          <h1 class="title" style="text-align:center;">{{ this.title}}</h1>
           <el-row :gutter="10" class="mb8">
             <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
           </el-row>
@@ -168,6 +168,7 @@
   getDeptTree() {
       deptTreeSelect().then((response) => {
         this.deptOptions = response.data;
+        this.queryParams.orgId=response.data[0].id;
       });
     },
         /** treeSelect组件自定义数据*/

+ 3 - 2
src/views/core/reportForms/standbyPowerReport.vue

@@ -19,7 +19,7 @@
               noResultsText="没有搜索结果"
             />
           </el-form-item>
-              <el-form-item label="时间" prop="searchTime">
+              <el-form-item label="统计季度" prop="searchTime">
               <!-- <el-date-picker   value-format='yyyy-MM' v-model="queryParams.searchTime"
                                 align="right" type="month" placeholder="请选择查询时间">
                 </el-date-picker>   -->
@@ -33,7 +33,7 @@
               <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
             </el-form-item>
           </el-form>
-          <h3 class="title">{{ this.title}}</h3>
+          <h1 class="title" style="text-align:center;">{{ this.title}}</h1>
           <el-row :gutter="10" class="mb8">
             <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
           </el-row>
@@ -210,6 +210,7 @@
   getDeptTree() {
       deptTreeSelect().then((response) => {
         this.deptOptions = response.data;
+        this.queryParams.orgId=response.data[0].id;
       });
     },
         /** treeSelect组件自定义数据*/