cxxm/ruoyi-ui/src/views/index.vue
2025-04-20 08:02:06 +08:00

506 lines
17 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="app-container">
<el-row :gutter="20">
<!--部门数据-->
<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"/>
</el-col>
<el-col :span="20" :xs="24">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="持续监管" name="1" :lazy="true">
<el-row :gutter="20">
<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>
</div>
</el-col>
<el-col>
<div style="margin-top: 20px">
<ve-histogram :data="ztHistogram"></ve-histogram>
</div>
</el-col>
</el-row>
</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>
</div>
</el-col>
<el-col>
<div style="margin-top: 20px">
<ve-histogram :data="zftkHistogram"></ve-histogram>
</div>
</el-col>
</el-row>
</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>
</div>
</el-col>
<el-col>
<div style="margin-top: 20px">
<ve-histogram :data="zttbHistogram"></ve-histogram>
</div>
</el-col>
</el-row>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
<!-- <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>-->
<el-dialog title="系统迁移提示!!!" :visible.sync="newVersion" width="1000px" append-to-body>
<div style="color: red"><h3>本系统已迁移到正式服务器请勿在当前测试环境进行操作!!!</h3></div>
<div style="color: red"><h3>请按照下面操作切换至正式版本!!!</h3></div>
<div><h3>1点击下面链接跳转到正式服务器</h3></div>
<div><a style="margin-top: 50px;text-decoration: underline;color: #13ce66;font-size: larger;"
href="http://1.95.66.168">http://1.95.66.168</a></div>
<div><h3>2下载正式版本app</h3></div>
<div>
<img src="./getLastVersionApK.png" width="300" height="300"/>
<a style="margin-top: 50px;text-decoration: underline;color: #13ce66;font-size: larger;"
href="http://1.95.66.168/prod-api/cxxm/api/version/getLastVersionApK">http://1.95.66.168/prod-api/cxxm/api/version/getLastVersionApK</a>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="newVersion = false">我已知晓</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {getStatistics} from "@/api/cxxm/statistics";
import {deptTreeSelect, getUser} from "@/api/system/user";
export default {
name: "Index",
data() {
return {
newVersion: false,
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",
// 显示搜索条件
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: []
},
};
},
created() {
this.getDeptTree();
this.getStatistics();
},
methods: {
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;
});
},
// 筛选节点
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
// 节点单击事件
handleNodeClick(data) {
this.queryParams.deptId = data.id;
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
this.getStatistics();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.drsjQuery = []
this.resetForm("queryForm");
this.handleQuery();
},
handleClick(tab, event) {
console.log(tab, event);
},
}
};
</script>
<style scoped lang="scss">
.home {
blockquote {
padding: 10px 20px;
margin: 0 0 20px;
font-size: 17.5px;
border-left: 5px solid #eee;
}
hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0;
border-top: 1px solid #eee;
}
.col-item {
margin-bottom: 20px;
}
ul {
padding: 0;
margin: 0;
}
font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
color: #676a6c;
overflow-x: hidden;
ul {
list-style-type: none;
}
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;
}
}
}
span {
font-size: 16px;
font-weight: bold;
color: #1890ff;
margin-right: 10px;
}
</style>
<style>
.el-statistic .head {
font-size: 18px !important;
}
</style>