Commit 7f535c93 by zhangzhijie

单位和个人分析从西藏同步至海南

parent 785d25ef
......@@ -524,6 +524,40 @@ export default [
]
},
{
path: "/queryDwcztj",
name: "queryDwcztj",
component: () => import("@/views/rzcx/queryDwcztj.vue"),
meta: {
title: "单位操作统计主信息"
}
},
{
path: "/PerspectiveAndAnalysis",
name: "PerspectiveAndAnalysis",
component: () => import("@/views/rzcx/PerspectiveAndAnalysis.vue"),
meta: {
title: "分析"
}
},
{
path: "/grczxq",
name: "grczxq",
meta: {
title: '个人操作详情',
auth: 5
},
component: () => import("@/views/rzcx/grczxq.vue")
},
{
path: "/grczfx",
name: "grczfx",
meta: {
title: '个人操作分析',
auth: 5
},
component: () => import("@/views/rzcx/grczfx.vue")
},
{
path: "/qsajIndex",
name: "qsajIndex",
meta: {
......
export default {
/**
* 时间戳转日期格式
* @param {Object} timeStamp
*/
timeStampTurnTime(timeStamp) {
if (timeStamp != undefined && timeStamp != "" && timeStamp > 0) {
var date = new Date();
date.setTime(timeStamp);
var y = date.getFullYear();
var m = date.getMonth() + 1;
m = m < 10 ? "0" + m : m;
var d = date.getDate();
d = d < 10 ? "0" + d : d;
var h = date.getHours();
h = h < 10 ? "0" + h : h;
var minute = date.getMinutes();
var second = date.getSeconds();
minute = minute < 10 ? "0" + minute : minute;
second = second < 10 ? "0" + second : second;
return y + "-" + m + "-" + d + " " + h + ":" + minute + ":" + second;
} else {
return "";
}
},
/**
* 数值去重
* @param {Array} arr 数组
* @param {string} field 字段
*/
unique(arr, field) {
const res = new Map();
return arr.filter(a => !res.has(a[field]) && res.set(a[field], 1));
},
/**
* 判断值是否在数组中
* @param {Object} elem
* @param {Object} arr
* @param {Object} i
*/
inArray: function(elem, arr) {
return arr == null ? -1 : arr.indexOf(elem);
},
/**
* 获取某天日期
* @param {Object} day
*/
getDay: function(day) {
var today = new Date();
var targetday_milliseconds = today.getTime() + 1000 * 60 * 60 * 24 * day;
today.setTime(targetday_milliseconds);
dateToStr(from) {
let date = new Date();
date.setTime(from);
let y = date.getFullYear();
let m = date.getMonth() + 1;
m = m < 10 ? "0" + m : m;
let d = date.getDate();
d = d < 10 ? "0" + d : d;
return y + '-' + m + '-' + d;
},
/**
* 时间戳转日期格式
* @param {Object} timeStamp
*/
timeStampTurnTime(timeStamp) {
if (timeStamp != undefined && timeStamp != "" && timeStamp > 0) {
var date = new Date();
date.setTime(timeStamp);
var y = date.getFullYear();
var m = date.getMonth() + 1;
m = m < 10 ? "0" + m : m;
var d = date.getDate();
d = d < 10 ? "0" + d : d;
var h = date.getHours();
h = h < 10 ? "0" + h : h;
var minute = date.getMinutes();
var second = date.getSeconds();
minute = minute < 10 ? "0" + minute : minute;
second = second < 10 ? "0" + second : second;
return y + "-" + m + "-" + d + " " + h + ":" + minute + ":" + second;
} else {
return "";
}
},
/**
* 数值去重
* @param {Array} arr 数组
* @param {string} field 字段
*/
unique(arr, field) {
const res = new Map();
return arr.filter(a => !res.has(a[field]) && res.set(a[field], 1));
},
/**
* 判断值是否在数组中
* @param {Object} elem
* @param {Object} arr
* @param {Object} i
*/
inArray: function (elem, arr) {
return arr == null ? -1 : arr.indexOf(elem);
},
/**
* 获取某天日期
* @param {Object} day
*/
getDay: function (day) {
var today = new Date();
var targetday_milliseconds = today.getTime() + 1000 * 60 * 60 * 24 * day;
today.setTime(targetday_milliseconds);
const doHandleMonth = function(month) {
var m = month;
......
<template>
<div class="paneDiv">
<div style="text-align: right;">
<el-button
plain
style="margin-top: 1%; margin-right: 2% !important"
size="small"
@click="exportFile"
>
<i
class="fa fa-external-link"
aria-hidden="true"
style="margin-right: 5px"
></i>
导出
</el-button>
</div>
<el-row style="padding-top: 10px;">
<el-col :span="12">
<table v-loading="loading" id="table" class="table" border="1" cellpadding="0" cellspacing="0">
<tr>
<th>序号</th>
<th v-for="(item,index) in tableColumn" :key="index">{{ item.label }}</th>
</tr>
<tr v-for="(item, index) in tableData" :key="index">
<td>{{ index }}</td>
<td v-for="td in tableColumn" :key="td.prop">{{ item[td.prop] }}</td>
</tr>
</table>
</el-col>
<el-col :span="12">
<div
v-loading="loading"
id="e-charts"
style="height: 480px"
></div>
</el-col>
</el-row>
</div>
</template>
<script>
import request from "@/utils/axiosHttp";
import url from "@/api/base";
import { saveAs } from 'file-saver';
import XLSX from 'xlsx';
export default {
name: 'PerspectiveAndAnalysis',
data() {
return {
loading: false,
tableColumn: [
{
label: '日时段',
prop: 'czDay'
},
{
label: '次数',
prop: 'czCount'
}
],
tableData: [],
ExeclArr: []
}
},
methods: {
// /ywsjTj/queryDwczTjInner
initECharts(rows,cols) {
let myChart = this.$echarts.init(document.getElementById("e-charts"));
myChart.setOption({
xAxis: {
type: 'category',
data: rows
},
yAxis: {
type: 'value'
},
series: [
{
data: cols,
type: 'bar',
itemStyle: {
color: '#58a5ff'
}
},
{
data: cols,
type: 'line',
smooth: false,
itemStyle: {
color: '#298bfe'
}
}
]
});
},
initData() {
let self = this;
self.loading = true
const { unitCode, yymcdm, djsjKssj, djsjJssj } = self.$route.query
let url = `/ywsjTj/queryDwczTjInner?unitCode=${unitCode}&yymcdm=${yymcdm}&djsjKssj=${djsjKssj}&djsjJssj=${djsjJssj}`;
self.requestPost(url).then((res) => {
let { code, data } = res;
const rows = []
const cols = []
if (code == 200) {
console.log(data)
for (let i = 0; i < data.rows.length; i++) {
rows.push(data.rows[i].czDay)
cols.push(data.rows[i].czCount)
}
self.initECharts(rows, cols)
this.tableData = data.rows
this.ExeclArr = data.rows.map(item => {
return {
czDay: item.czDay,
czCount: item.czCount
}
})
}
self.loading = false
});
},
exportFile() {
var wb = XLSX.utils.table_to_book(document.querySelector('#table'), {
raw: true
});
var wbout = XLSX.write(wb, {
bookType: "xlsx",
bookSST: false,
type: "array"
});
try {
saveAs(
new Blob([wbout], { type: "application/octet-stream" }),
'单位操作分析' + ".xlsx"
);
if(this) this.$message.success("导出成功"); //导出成功的提示
} catch (e) {
if (typeof console !== "undefined") console.log(e, wbout);
}
},
requestPost(urlPath) {
return request({
url: url.rzURL + urlPath
});
}
},
mounted() {
const { unitCode } = this.$route.query
console.log(unitCode)
this.initData()
this.initECharts()
}
}
</script>
<style lang="scss" scoped>
.paneDiv{
width: 95%;
background: #ffffff;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.06);
border-radius: 4px;
margin: 15px auto;
padding: 20px;
box-sizing: border-box;
}
.table{
width: 100%;
tr{
td,th{
text-align: center;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="paneDiv" v-loading='loading'>
<el-row>
<el-col :span="24">
<span class="flTtitle">查询结果</span>
<el-button
plain
class="zdybtn export"
style="float: right; margin-top: 1%; margin-right: 2% !important"
size="small"
@click="exportFile"
>
<i
class="fa fa-external-link"
aria-hidden="true"
style="margin-right: 5px"
></i>
导出
</el-button>
</el-col>
</el-row>
<el-row style="padding-top: 10px">
<el-col :span="6">
<table style="width: 100%" border="1" cellpadding="0" cellspacing="0">
<tr>
<th>序号</th>
<th>日时段</th>
<th>次数</th>
</tr>
<tr v-for="(item,index) in dates" :key="index">
<td>{{index}}</td>
<td>{{item}}</td>
<td>{{vals[index]}}</td>
</tr>
</table>
</el-col>
<el-col :span="18">
<div id="e-charts" style="height: 480px"></div>
</el-col>
</el-row>
</div>
</template>
<script>
import request from "@/utils/axiosHttp";
import url from "@/api/base";
import qs from "qs";
export default {
name: "PerspectiveAndAnalysis",
data() {
return {
formData: {},
dates:[],
vals:[],
loading:false
};
},
methods: {
initECharts() {
let myChart = this.$echarts.init(document.getElementById("e-charts"));
myChart.setOption({
xAxis: {
type: "category",
data: this.dates,
},
yAxis: {
type: "value",
},
series: [
{
data: this.vals,
type: "bar",
itemStyle: {
color: "#58a5ff",
},
},
{
data: this.vals,
type: "line",
smooth: false,
itemStyle: {
color: "#298bfe",
},
},
],
});
this.loading = false;
},
exportFile() {
this.qeruestFile(this.formData, "/ywsjTj/exportRyccfx").then((res) => {
let blob = new Blob([res]);
let fileName = "个人操作统计.xlsx";
// 组装a标签
let elink = document.createElement("a");
// 设置下载文件名
elink.download = fileName;
elink.style.display = "none";
elink.href = URL.createObjectURL(blob);
document.body.appendChild(elink);
elink.click();
document.body.removeChild(elink);
});
},
detail(sfzh) {
this.$router.pushToTab({
path: "/grczxq",
query: {
...this.formData,
sfzh,
},
});
},
fx() {},
initDate() {
let self = this;
this.loading = true;
let url = "/ywsjTj/queryRyccfx";
this.qeruestPost(this.formData, url).then((res) => {
let { code, data } = res;
if (code == 200) {
for (const key in data) {
this.dates.push(key)
this.vals.push(data[key])
this.initECharts()
}
}
});
},
qeruestFile(form, urls) {
return request({
url: url.rzURL + urls,
data: qs.stringify(form),
responseType: "blob",
method: "post",
headers: {
"content-type": "application/x-www-form-urlencoded",
},
});
},
qeruestPost(form, urls) {
return request({
url: url.rzURL + urls,
data: qs.stringify(form),
method: "post",
headers: {
"content-type": "application/x-www-form-urlencoded",
},
});
},
},
mounted() {
this.formData = this.$route.query;
this.initDate();
},
};
</script>
<style lang="scss" scoped>
.paneDiv {
width: 95%;
background: #ffffff;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.06);
opacity: 1;
border-radius: 4px;
margin: 15px auto;
padding: 20px;
}
</style>
\ No newline at end of file
<template>
<div class="Content">
<div class="paneDiv">
<el-row>
<el-col :span="24">
<span class="flTtitle">查询结果</span>
<span class="total">共有{{ dataCount }}条查询结果</span>
<el-button
plain
class="zdybtn export"
style="float: right; margin-top: 1%; margin-right: 2% !important"
size="small"
@click="exportFile"
>
<i
class="fa fa-external-link"
aria-hidden="true"
style="margin-right: 5px"
></i>
导出
</el-button>
</el-col>
</el-row>
<el-table
v-loading="tableLoading"
element-loading-text="拼命加载中"
:data="tableData"
tooltip-effect="dark"
width="100%"
size="small"
border
>
<el-table-column type="index" label="序号" width="50" />
<el-table-column align="center" label="身份证号" prop="sfzh" />
<el-table-column align="center" label="单位名称" prop="unitname" />
<el-table-column align="center" label="姓名" prop="xm" />
<el-table-column align="center" label="警号" prop="jh" />
<el-table-column align="center" label="联系电话" prop="lxdh" />
>
<el-table-column align="center" label="访问时间" prop="fwsj" />
<el-table-column align="center" label="应用名称" prop="yymc" />
<el-table-column
align="center"
label="操作参数"
prop="czcs"
width="300px"
/>
</el-table>
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="formData.page"
:small="true"
:total="dataCount"
>
</el-pagination>
</div>
</div>
</template>
<script>
import request from "@/utils/axiosHttp";
import url from "@/api/base";
import qs from "qs";
export default {
name: "ywsjTjbbGrcz",
data() {
return {
tableLoading: false,
tableData: [],
dataCount: 0,
formData: {},
};
},
mounted() {
this.formData = this.$route.query;
this.initDate();
},
methods: {
exportFile() {
this.qeruestFile(this.formData, "/ywsjTj/exportRyccxq").then((res) => {
let blob = new Blob([res]);
let fileName = "个人操作统计.xlsx";
// 组装a标签
let elink = document.createElement("a");
// 设置下载文件名
elink.download = fileName;
elink.style.display = "none";
elink.href = URL.createObjectURL(blob);
document.body.appendChild(elink);
elink.click();
document.body.removeChild(elink);
});
},
detail(sfzh) {
this.$router.pushToTab({
path: "/grczxq",
query: {
...this.formData,
sfzh,
},
});
},
fx() {},
initDate() {
let self = this;
this.tableLoading = true;
let url = "/ywsjTj/queryRyccxq";
this.qeruestPost(this.formData, url).then((res) => {
let { code, data, total } = res;
if (code == 200) {
self.tableData = data.rows;
self.dataCount = data.total;
self.tableLoading = false;
}
});
},
qeruestFile(form, urls) {
return request({
url: url.rzURL + urls,
data: qs.stringify(form),
responseType: "blob",
method: "post",
headers: {
"content-type": "application/x-www-form-urlencoded",
},
});
},
qeruestPost(form, urls) {
return request({
url: url.rzURL + urls,
data: qs.stringify(form),
method: "post",
headers: {
"content-type": "application/x-www-form-urlencoded",
},
});
},
clearData() {
this.formData.daterange = [];
this.formData.djsjJssj = "";
this.formData.djsjKssj = "";
},
query() {
let dataRange = this.formData.daterange;
if (dataRange.length > 0) {
this.formData.djsjKssj = this.$moment(dataRange[0]).format(
"YYYY-MM-DD"
);
this.formData.djsjJssj = this.$moment(dataRange[1]).format(
"YYYY-MM-DD"
);
}
this.tableLoading = true;
this.formData.daterange = [];
this.initDate();
this.tableLoading = false;
},
handleSizeChange(val) {
this.formData.limit = val;
this.initDate();
},
handleCurrentChange(val) {
this.formData.page = val;
this.initDate();
},
},
};
</script>
<style>
.el-dialog__body {
padding: 10px 15px !important;
}
.rightContent .el-input__inner,
#formCommonPage .el-input__inner {
height: 36px;
line-height: 36px;
font-family: inherit;
}
.el-table__header-wrapper th,
.el-table__header-wrapper tr {
background: #f4f6f7;
}
.rightContent .el-input__icon,
#formCommonPage .el-input__icon,
.el-input__suffix-inner {
line-height: 36px;
}
.rightContent .el-range-separator {
position: relative;
top: -4px;
}
.rightContent .el-textarea__inner,
#formCommonPage .el-textarea__inner {
width: 100%;
font-family: inherit;
}
.rightContent .el-range-input,
#formCommonPage .el-range-input {
vertical-align: top;
}
.rightContent .el-date-editor .el-range__close-icon {
margin-top: -4px;
}
.rightContent .el-form-item__error {
left: calc(66% - 27px);
top: 12px;
}
.success-row {
background-color: #fbf9f4 !important;
}
.Content .el-input,
.Content .el-date-editor--daterange.el-input__inner {
width: 100% !important;
}
</style>
<style scoped lang="scss">
@import "@/assets/styles/rightContent.scss";
.Content {
width: 1200px;
background: #ffffff;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.06);
opacity: 1;
border-radius: 4px;
margin: 15px auto;
padding: 20px;
}
.zdybtns {
width: 76px !important;
height: 32px !important;
line-height: 32px !important;
background: #ffffff;
border: 1px solid #d9d9d9;
opacity: 1;
border-radius: 4px;
}
.gxrInfo {
display: flex;
flex-wrap: wrap;
flex: 2;
.gxrItem {
display: flex;
width: 45%;
.gxrTitle {
font-size: 16px;
font-family: Source Han Sans CN;
color: #363636;
}
.gxrContent {
color: #808591;
font-size: 16px;
padding-left: 10px;
}
}
}
</style>
\ No newline at end of file
<template>
<div class="paneDiv">
<div style="text-align: right;">
<el-button
plain
style="margin-top: 1%; margin-right: 2% !important"
size="small"
@click="exportFile"
>
<i
class="fa fa-external-link"
aria-hidden="true"
style="margin-right: 5px"
></i>
导出
</el-button>
</div>
<table class="table" cellpadding="0" cellspacing="0">
<tr>
<th>序号</th>
<th v-for="(th,thIndex) in tableData" :key="thIndex">
{{ th.label }}
</th>
</tr>
<tr v-for="(item,index) in tableList" :key="index">
<td>{{ index }}</td>
<td v-for="(td,tdIndex) in tableData" :key="tdIndex" class="cursor">
<div :class="[{color: td.showJump}, td.align]" @click="onAnalysis(item,td)">{{ item[td.prop] }}</div>
</td>
</tr>
</table>
</div>
</template>
<script>
import request from "@/utils/axiosHttp";
import url from "@/api/base";
// import qs from "qs";
export default {
name: 'queryDwcztj',
data() {
return {
tableData: [
{
label: '单位',
prop: 'unitName',
align: 'center',
showJump: true
},
{
label: '案件侦办',
prop: 'ajzbCount',
align: 'center',
showJump: true
},
{
label: '证据材料检查',
prop: 'zjclCount',
align: 'center',
showJump: true
},
{
label: '工作指令',
prop: 'gzzlCount',
align: 'center',
showJump: true
},
{
label: '有组织犯罪',
prop: 'yzzfzCount',
align: 'center',
showJump: true
},
{
label: '线索核办',
prop: 'xshbCount',
align: 'center',
showJump: true
},
{
label: '线索查询比对',
prop: 'xscxbdCount',
align: 'center',
showJump: true
},
{
label: '多生物特征',
prop: 'dswtzCount',
align: 'center',
showJump: true
},
{
label: '刑嫌调控',
prop: 'xxtkCount',
align: 'center',
showJump: true
},
{
label: '阵地管控',
prop: 'zdgkCount',
align: 'center',
showJump: true
},
{
label: '业务效能',
prop: 'ywxnCount',
align: 'center',
showJump: true
},
{
label: '大屏统计',
prop: 'dptjCount',
align: 'center',
showJump: true
}
],
tableList: []
}
},
methods: {
initData() {
let self = this;
self.loading = true;
const { unitCode, yymcdm, djsjKssj, djsjJssj } = self.$route.query
console.log(unitCode)
let url = `/ywsjTj/queryDwczTj?unitCode=${unitCode}&yymcdm=${yymcdm}&djsjKssj=${djsjKssj}&djsjJssj=${djsjJssj}`;
self.requestGet(url).then((res) => {
let { code, data } = res;
if (code == 200) {
this.tableList = data.rows
}
});
},
onAnalysis(row,type) {
const { djsjKssj, djsjJssj } = this.$route.query
if (type.prop === 'unitName') {
this.$router.pushToTab({
path: '/queryDwcztj',
query: {
unitCode: row.unitCode,
yymcdm: row.yymcdm??'',
djsjKssj: djsjKssj??'',
djsjJssj: djsjJssj??''
}
})
} else {
this.$router.pushToTab({
path: '/PerspectiveAndAnalysis',
query: {
unitCode: row.unitCode,
yymcdm: row.yymcdm??'',
djsjKssj: djsjKssj??'',
djsjJssj: djsjJssj??''
}
})
}
},
exportFile() {
const { djsjJssj, djsjKssj, unitCode, yymcdm } = this.$route.query
// this.qeruestFile(`/ywsjTj/exportDwczTj?djsjJssj=${djsjJssj}&djsjKssj=${djsjKssj}&unitCode=${unitCode}&yymcdm=${yymcdm}`
this.requestFile(`/ywsjTj/exportDwczTj?djsjJssj=${djsjJssj}&djsjKssj=${djsjKssj}&unitCode=${unitCode}&yymcdm=${yymcdm}`).then((res) => {
let blob = new Blob([res]);
let fileName = "单位操作透视.xlsx";
// 组装a标签
let elink = document.createElement("a");
// 设置下载文件名
elink.download = fileName;
elink.style.display = "none";
elink.href = URL.createObjectURL(blob);
document.body.appendChild(elink);
elink.click();
document.body.removeChild(elink);
})
},
requestGet(urls) {
return request({
url: url.rzURL + urls
});
},
requestFile(urls) {
return request({
url: url.rzURL + urls,
// data: qs.stringify(form),
responseType: "blob",
// method: "post",
headers: {
"content-type": "application/x-www-form-urlencoded",
},
});
}
},
mounted() {
this.initData()
}
}
</script>
<style lang="scss" scoped>
.paneDiv{
width: 95%;
background: #ffffff;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.06);
border-radius: 4px;
margin: 15px auto;
padding: 20px;
box-sizing: border-box;
}
.table{
width: 100%;
tr{
td,th{
border: 1px solid #EBEEF5;
padding: 10px 8px;
box-sizing: border-box;
text-align: center;
}
}
}
.color{
color: #409eff
}
.left{
text-align: left;
}
.center{
text-align: center;
}
.right{
text-align: right;
}
.cursor{
cursor: pointer;
}
</style>
\ No newline at end of file
......@@ -115,15 +115,15 @@
</el-table-column
>
<el-table-column align="center" label="案件侦办"
>
<template slot-scope="{ row }"
><span class="names" @click="goDetail(row, 'ajzbCount')">{{
row.ajzbCount
}}</span></template
>
</el-table-column
>
<!-- <el-table-column align="center" label="案件侦办"-->
<!-- >-->
<!-- <template slot-scope="{ row }"-->
<!-- ><span class="names" @click="goDetail(row, 'ajzbCount')">{{-->
<!-- row.ajzbCount-->
<!-- }}</span></template-->
<!-- >-->
<!-- </el-table-column-->
<!-- >-->
<el-table-column align="center" label="证据材料检查"
>
<template slot-scope="{ row }"
......@@ -209,15 +209,15 @@
>
</el-table-column
>
<el-table-column align="center" label="大屏统计"
>
<template slot-scope="{ row }"
><span class="names" @click="goDetail(row, 'dptjCount')">{{
row.dptjCount
}}</span></template
>
</el-table-column
>
<!-- <el-table-column align="center" label="大屏统计"-->
<!-- >-->
<!-- <template slot-scope="{ row }"-->
<!-- ><span class="names" @click="goDetail(row, 'dptjCount')">{{-->
<!-- row.dptjCount-->
<!-- }}</span></template-->
<!-- >-->
<!-- </el-table-column-->
<!-- >-->
</el-table>
</div>
</div>
......@@ -247,7 +247,7 @@ export default {
daterange: [],
},
queryTypeList: [
{name: "个案侦办", value: "0101", type: "ajzbCount"},
// {name: "个案侦办", value: "0101", type: "ajzbCount"},
{name: "证据材料检查", value: "0102", type: "zjclCount"},
{name: "重点人员", value: "0202", type: "zdryCount"},
{name: "工作指令", value: "0305", type: "gzzlCount"},
......@@ -258,7 +258,7 @@ export default {
{name: "刑嫌调控工作管理", value: "0501", type: "xxtkCount"},
{name: "阵地管控工作管理", value: "0502", type: "zdgkCount"},
{name: "业务效能工作评估", value: "0503", type: "ywxnCount"},
{name: "大屏统计", value: "0800", type: "dptjCount"},
// {name: "大屏统计", value: "0800", type: "dptjCount"},
],
};
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment