cxxm/ruoyi-ui/src/views/index.vue

487 lines
16 KiB
Vue
Raw Normal View History

2019-10-08 09:14:38 +08:00
<template>
2024-04-07 15:04:02 +08:00
<div class="app-container">
2020-11-07 10:38:35 +08:00
<el-row :gutter="20">
2024-04-07 15:04:02 +08:00
<!--部门数据-->
<el-col :span="4" :xs="24">
<el-tree
:data="deptOptions"
:props="defaultProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
node-key="id"
default-expand-all
highlight-current
@node-click="handleNodeClick"/>
2019-10-08 09:14:38 +08:00
</el-col>
2024-04-07 15:04:02 +08:00
<el-col :span="20" :xs="24">
2024-06-12 11:29:14 +08:00
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="部省监管" name="1" :lazy="true">
2024-04-16 09:13:33 +08:00
<el-row :gutter="20">
2024-06-12 11:29:14 +08:00
<el-col :span="4" v-for="(value, key) in ztStatistics">
<div style="text-align: center;margin: 5px;padding: 10px;border: 1px solid #1c6ec4">
<h3>{{ key }}</h3>
<div>{{ value }}</div>
2024-04-16 09:13:33 +08:00
</div>
</el-col>
2024-06-12 11:29:14 +08:00
<el-col>
<div style="margin-top: 20px">
<ve-histogram :data="ztHistogram"></ve-histogram>
2024-04-16 09:13:33 +08:00
</div>
</el-col>
</el-row>
2024-06-12 11:29:14 +08:00
</el-tab-pane>
<el-tab-pane label="执法踏勘" name="2" :lazy="true">
<el-row :gutter="20">
<el-col :span="4" v-for="(value, key) in zftkStatistics">
<div style="text-align: center;margin: 5px;padding: 10px;border: 1px solid #1c6ec4">
<h3>{{ key }}</h3>
<div>{{ value }}</div>
2024-04-16 09:13:33 +08:00
</div>
</el-col>
2024-06-12 11:29:14 +08:00
<el-col>
<div style="margin-top: 20px">
<ve-histogram :data="zftkHistogram"></ve-histogram>
2024-04-16 09:13:33 +08:00
</div>
</el-col>
</el-row>
2024-06-12 11:29:14 +08:00
</el-tab-pane>
<el-tab-pane label="自提图斑" name="3" :lazy="true">
<el-row :gutter="20">
<el-col :span="4" v-for="(value, key) in zttbStatistics">
<div style="text-align: center;margin: 5px;padding: 10px;border: 1px solid #1c6ec4">
<h3>{{ key }}</h3>
<div>{{ value }}</div>
2024-04-16 09:13:33 +08:00
</div>
</el-col>
2024-06-12 11:29:14 +08:00
<el-col>
<div style="margin-top: 20px">
<ve-histogram :data="zttbHistogram"></ve-histogram>
2024-04-16 09:13:33 +08:00
</div>
</el-col>
</el-row>
2024-06-12 11:29:14 +08:00
</el-tab-pane>
</el-tabs>
2019-10-08 09:14:38 +08:00
</el-col>
</el-row>
2024-06-12 11:29:14 +08:00
<!-- <el-col :span="20" :xs="24">-->
<!-- <el-card>-->
<!-- <div>-->
<!-- <span>导入时间</span>-->
<!-- <el-date-picker style="width:200px"-->
<!-- v-model="queryParams.drsjQuery"-->
<!-- type="monthrange"-->
<!-- align="right"-->
<!-- unlink-panels-->
<!-- range-separator="至"-->
<!-- start-placeholder="开始月份"-->
<!-- end-placeholder="结束月份"-->
<!-- value-format="yyyy-MM"-->
<!-- @change="handleQuery"-->
<!-- :picker-options="pickerOptions">-->
<!-- </el-date-picker>-->
<!-- </div>-->
<!-- <el-card>-->
<!-- <h3>整体情况</h3>-->
<!-- <el-row :gutter="20">-->
<!-- <el-col :span="4" style="margin-bottom: 10px">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :value="statisticsData.total"-->
<!-- title="图斑总数">-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- :value="statisticsData.kc"-->
<!-- title="矿产图斑">-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :value="statisticsData.td"-->
<!-- title="土地图斑">-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :value="statisticsData.yxf"-->
<!-- title="已下发">-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :value="statisticsData.wxf"-->
<!-- title="未下发">-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row :gutter="20" style="margin-bottom: 10px">-->
<!-- <el-col :span="4">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :value="statisticsData.yxc"-->
<!-- title="已巡查">-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :value="statisticsData.zjxc"-->
<!-- title="州级巡查">-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :value="statisticsData.xjxc"-->
<!-- title="县级巡查">-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :value="statisticsData.wxc"-->
<!-- title="未巡查">-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-row :gutter="20" style="margin-bottom: 10px">-->
<!-- <el-col :span="4">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :value="statisticsData.wzg"-->
<!-- title="未整改">-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :value="statisticsData.wzgdw"-->
<!-- title="整改未到位">-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :value="statisticsData.yzg"-->
<!-- title="整改到位">-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :value="statisticsData.shtg"-->
<!-- title="审核通过">-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :span="4">-->
<!-- <div>-->
<!-- <el-statistic-->
<!-- group-separator=","-->
<!-- :value="statisticsData.shbtg"-->
<!-- title="审核不通过">-->
<!-- </el-statistic>-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </el-card>-->
<!-- <el-card>-->
<!-- <h3>巡查情况统计</h3>-->
<!-- <ve-histogram :data="histogramData" :settings="chartSettings"></ve-histogram>-->
<!-- </el-card>-->
<!-- </el-card>-->
<!-- <el-card>-->
<!-- <div>-->
<!-- <span>巡查月份</span>-->
<!-- <el-date-picker-->
<!-- v-model="queryParams.lineDateQuery"-->
<!-- type="month"-->
<!-- align="right"-->
<!-- value-format="yyyy-MM"-->
<!-- @change="handleLineDataQuery"-->
<!-- placeholder="选择月份">-->
<!-- </el-date-picker>-->
<!-- </div>-->
<!-- <el-card>-->
<!-- <h3>每日巡查情况</h3>-->
<!-- <ve-line :data="lineData" :settings="chartSettings"></ve-line>-->
<!-- </el-card>-->
<!-- </el-card>-->
<!-- </el-col>-->
<!-- </el-row>-->
2019-10-08 09:14:38 +08:00
</div>
</template>
<script>
2024-06-12 11:29:14 +08:00
import {getStatistics} from "@/api/cxxm/statistics";
2024-04-07 15:04:02 +08:00
import {deptTreeSelect, getUser} from "@/api/system/user";
2019-10-08 09:14:38 +08:00
export default {
2021-08-13 10:10:29 +08:00
name: "Index",
2019-10-08 09:14:38 +08:00
data() {
return {
2024-06-12 11:29:14 +08:00
zftkStatistics: {
"图斑总数": 0,
"已巡查图斑": 0,
"未巡查图斑": 0,
"巡查总次数": 0,
"州级巡查次数": 0,
"县级巡查次数": 0,
},
zftkHistogram: {
columns: ['所在市县', '图斑总数', '已巡查图斑', '未巡查图斑', '巡查总次数', '州级巡查次数', '县级巡查次数'],
rows: []
},
zttbStatistics: {
"图斑总数": 0,
"已巡查图斑": 0,
"未巡查图斑": 0,
"巡查总次数": 0,
"州级巡查次数": 0,
"县级巡查次数": 0,
},
zttbHistogram: {
columns: ['所在市县', '图斑总数', '已巡查图斑', '未巡查图斑', '巡查总次数', '州级巡查次数', '县级巡查次数'],
rows: []
},
ztStatistics: {
"图斑总数": 0,
"已巡查图斑": 0,
"未巡查图斑": 0,
"巡查总次数": 0,
"州级巡查次数": 0,
"县级巡查次数": 0,
},
ztHistogram: {
columns: ['所在市县', '图斑总数', '已巡查图斑', '未巡查图斑', '巡查总次数', '州级巡查次数', '县级巡查次数'],
rows: []
},
activeName: "1",
2024-04-07 15:04:02 +08:00
// 显示搜索条件
showSearch: true,
// 部门树选项
deptOptions: null,
defaultProps: {
children: "children",
label: "label"
},
// 查询参数
queryParams: {
deptId: null,
drsjQuery: [],
lineDateQuery: null
},
// 日期区间选择
pickerOptions: {
shortcuts: [{
text: '本月',
onClick(picker) {
picker.$emit('pick', [new Date(), new Date()]);
}
}, {
text: '今年至今',
onClick(picker) {
const end = new Date();
const start = new Date(new Date().getFullYear(), 0);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近六个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setMonth(start.getMonth() - 6);
picker.$emit('pick', [start, end]);
}
}]
},
statisticsData: null,
chartSettings: {
yAxisType: ['KMB'],
yAxisName: ['数值'],
labelMap: {
'deptName': '部门名称',
'yxf': '已下发',
'wxf': '未下发',
'yxc': '已巡查',
'wxc': '未巡查',
'zjxc': '州级巡查',
'xjxc': '县级巡查',
'yzg': '已整改',
'wzg': '未整改',
'wzgdw': '未整改到位',
'shtg': '审核通过',
'shbtg': '审核不通过',
},
},
histogramData: {
columns: ['deptName', 'yxf', 'wxf', 'yxc', 'wxc', 'zjxc', 'xjxc', 'yzg', 'wzg', 'wzgdw', 'shtg', 'shbtg'],
rows: []
},
lineData: {
columns: ['日期', "楚雄市", "禄丰市", "大姚县", "姚安县", "武定县", "双柏县", "牟定县", "南华县", "永仁县", "元谋县"],
rows: []
},
2020-11-07 10:38:35 +08:00
};
2019-10-08 09:14:38 +08:00
},
2024-04-07 15:04:02 +08:00
created() {
2024-06-12 11:29:14 +08:00
this.getDeptTree();
this.getStatistics();
2024-04-07 15:04:02 +08:00
},
2019-10-08 09:14:38 +08:00
methods: {
2024-06-12 11:29:14 +08:00
getStatistics() {
getStatistics(this.queryParams).then(response => {
this.zftkStatistics = response.data.zftkStatistics;
this.zftkHistogram.rows = response.data.zftkHistogram;
this.ztStatistics = response.data.ztStatistics;
this.ztHistogram.rows = response.data.ztHistogram;
this.zttbStatistics = response.data.zttbStatistics;
this.zttbHistogram.rows = response.data.zttbHistogram;
})
},
/** 查询部门下拉树结构 */
getDeptTree() {
deptTreeSelect().then(response => {
this.deptOptions = response.data;
});
2024-04-07 15:04:02 +08:00
},
// 筛选节点
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
// 节点单击事件
handleNodeClick(data) {
this.queryParams.deptId = data.id;
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
2024-06-12 11:29:14 +08:00
this.getStatistics();
2024-04-07 15:04:02 +08:00
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.drsjQuery = []
this.resetForm("queryForm");
this.handleQuery();
},
2024-06-12 11:29:14 +08:00
handleClick(tab, event) {
console.log(tab, event);
},
2023-01-01 09:09:25 +08:00
}
2020-11-07 10:38:35 +08:00
};
2019-10-08 09:14:38 +08:00
</script>
2020-11-07 10:38:35 +08:00
<style scoped lang="scss">
.home {
blockquote {
padding: 10px 20px;
margin: 0 0 20px;
font-size: 17.5px;
border-left: 5px solid #eee;
}
2024-04-07 15:04:02 +08:00
2020-11-07 10:38:35 +08:00
hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0;
border-top: 1px solid #eee;
}
2024-04-07 15:04:02 +08:00
2020-11-07 10:38:35 +08:00
.col-item {
margin-bottom: 20px;
}
ul {
padding: 0;
margin: 0;
}
2019-10-08 09:14:38 +08:00
2020-11-07 10:38:35 +08:00
font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
color: #676a6c;
overflow-x: hidden;
ul {
list-style-type: none;
2019-10-08 09:14:38 +08:00
}
2020-11-07 10:38:35 +08:00
h4 {
margin-top: 0px;
}
h2 {
margin-top: 10px;
font-size: 26px;
font-weight: 100;
}
p {
margin-top: 10px;
b {
font-weight: 700;
}
}
.update-log {
ol {
display: block;
list-style-type: decimal;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0;
margin-inline-end: 0;
padding-inline-start: 40px;
}
2019-10-08 09:14:38 +08:00
}
}
2024-04-16 09:13:33 +08:00
2024-06-12 11:29:14 +08:00
span {
2024-04-16 09:13:33 +08:00
font-size: 16px;
font-weight: bold;
color: #1890ff;
margin-right: 10px;
}
2024-06-12 11:29:14 +08:00
</style>
<style>
.el-statistic .head {
font-size: 18px !important;
}
2019-10-08 09:14:38 +08:00
</style>
2020-11-07 10:38:35 +08:00