|
|
@@ -0,0 +1,258 @@
|
|
|
+<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="组织机构" 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="请选择周期">
|
|
|
+ <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>
|
|
|
+
|
|
|
+ <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>
|
|
|
+ <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>
|
|
|
+ </el-row>
|
|
|
+ <el-table
|
|
|
+ border
|
|
|
+ height="600"
|
|
|
+ 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="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>
|
|
|
+ <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 {listReport} from "@/api/core/reportForms/monitorAccessReport";
|
|
|
+ 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','repot_cycle'],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ // 遮罩层
|
|
|
+ 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,
|
|
|
+ checkName: null,
|
|
|
+ areaId: null,
|
|
|
+ orgId: null,
|
|
|
+ year: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. getList();
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ // 根据名称筛选部门树
|
|
|
+ deptName(val) {
|
|
|
+ this.$refs.tree.filter(val);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /** 查询机构树数据 */
|
|
|
+ getDeptTree() {
|
|
|
+ deptTreeSelect().then((response) => {
|
|
|
+ this.deptOptions = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 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;
|
|
|
+ listReport(this.queryParams).then(response => {
|
|
|
+ this.checkList = response.data.rows;
|
|
|
+ this.title=response.title;
|
|
|
+ this.total = response.data.total;
|
|
|
+ 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>
|