Commit 1b926c92 by zhao_shaonan

优化日志模块、添加功能访问统计模块

parent 4dd7d957
@import './main.scss';
.leftMenu{
width: 200px;
width: 220px;
height: 100%;
background: #fff;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.08);
opacity: 1;
overflow-y:auto;
font-size: $ns-font-size-lg;
.iconfont{margin-right:18px;margin-left:20px;}
font-size: $ns-font-size-base;
.iconfont{margin-right:18px;margin-left:7px;}
.el-menu{
margin-top:10px;
height:calc(100% - 10px);
......@@ -17,7 +17,7 @@
font-weight:bold;
/*border-right:$-left-active-background-border;*/
}
.el-menu-item{font-size: $ns-font-size-lg;}
.el-menu-item{font-size: $ns-font-size-base;}
}
}
......@@ -70,6 +70,9 @@ body {
margin-right: 8px !important;
line-height: 36px !important;
}
/*.el-table td.is-hidden>*{
visibility: inherit;
}*/
.leftMenu /deep/.el-menu-item:hover{background: rgba(64, 158, 255, 0.08) !important;}
/*分页显示多少条自定义位置 formWrap必须是父级容器 end*/
.content{width:100%;height:calc(100vh - 60px);overflow: hidden;display: flex;}
......
......@@ -4,6 +4,11 @@
.green{display: inline-block;width:20px;height:20px;border-radius:50%;background: green;vertical-align: middle;}
.red{display: inline-block;width:20px;height:20px;border-radius:50%;background: red;vertical-align: middle;}
.yellow{display: inline-block;width:20px;height:20px;border-radius:50%;background: yellow;vertical-align: middle;}
.inlineBtn{
display: inline-block;width:66% !important;
.zdycol3{width:50% !important;}
}
.inlineCxBtn{display: inline-block;width:calc(32% - 23px);}
.paneDiv {
background: #FFFFFF;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.18);
......
......@@ -4,11 +4,11 @@
.flex{display: flex;}
.ykbg_tabs{margin:15px;padding:0 10px;font-size:14px;}
.wrap{
height: calc((100vh - 160px)/2);
height: calc(100vh - 446px);
background: #FFFFFF;
opacity: 1;
border-radius: 8px;
margin:15px;
margin:24px;
margin-right: 0px;
margin-top:0px;
position: relative;
......@@ -25,7 +25,7 @@
p{line-height: 30px;min-height:30px;}
.xtTitle{margin-top:20px;color:#333333;}
.xtCount{
font-size: 32px;
font-size: 24px;
font-family: DIN;
font-weight: 600;
line-height: 39px;
......@@ -34,14 +34,17 @@
}
.list_item:last-child{border-right:none;}
}
.wrapBig{height:calc(50% - 15px);min-height:360px;}
.wrapBig{height:calc(50% - 15px);min-height:340px;margin:0 40px;}
.wrap271{
height:271px;
}
.gsdduqk{margin-top:0px;}
.fwyxzcl{width:33%;}
.gxtdqqk{width:66%;flex: 1}
.ykbg_content{
height: calc(100% - 66px);
.left_con{display: inline-block;width:calc(100% - 357px);}
.right_con{display: inline-block;width:324px;margin:15px; margin-top: 0px;
.left_con{display: inline-block;width:calc(100% - 340px);margin-right:40px;}
.right_con{display: inline-block;width:260px;margin:40px; margin-top: 0px;margin-left:0px;
vertical-align: top;}
}
/deep/ .el-radio-button{margin-right:12px;}
......
......@@ -2,7 +2,7 @@
<!--左侧导航-->
<div
class="leftMenu"
:style="{ width: isCollapse == true ? '0px' : '260px' }"
:style="{ width: isCollapse == true ? '0px' : '220px' }"
>
<!--<div @click="isCollapse=!isCollapse" style="width:51px;text-align:center;color:#409EFF;cursor: pointer;line-height:36px;" :title="isCollapse == true?'展开':'收缩'"><i class="fa fa-bars"></i></div>-->
<el-menu
......@@ -50,7 +50,9 @@ export default {
},
watch: {
sidebarItemName(val) {
console.log(val);
if(val=='ykpgbg'||val=='fwrz'){
this.sidebarItemName="dwfwyktj";
}
}
},
methods: {
......
......@@ -11,6 +11,7 @@
label-width="140px"
ref="queryForm"
:model="formData"
:class="propQueryField.length<3?'inlineBtn':''"
>
<div class="zdyLine">
<el-form-item
......@@ -151,7 +152,7 @@
</el-form>
<!--按钮-->
<div class="ar cx-btn">
<div :class="propQueryField.length<3?'inlineCxBtn ar cx-btn':'ar cx-btn'">
<!--
<span @click="switchingConditions" class="color1 mg10"><i :class="toggleZd ? 'fa fa-angle-up fa-zdy20':'fa fa-angle-down fa-zdy20'"></i>{{toggleZd ? '收起条件':'更多条件'}}</span>
-->
......@@ -212,7 +213,7 @@
<el-table-column
align="center"
:min-width="
columnTitle.prop == 'czxxJyqk' || columnTitle.prop == 'asjbh'||columnTitle.prop == 'service_info'||columnTitle.prop == 'bz'
columnTitle.prop == 'czxxJyqk' || columnTitle.prop == 'asjbh'||columnTitle.prop == 'service_info'||columnTitle.prop == 'bz'||columnTitle.prop == 'function_info'
? '360'
: '160'
"
......@@ -222,7 +223,7 @@
:label="columnTitle.label"
>
<template slot-scope="scope">
<div v-if="columnTitle.prop == 'czxxJyqk'||columnTitle.prop == 'service_info'||columnTitle.prop == 'bz'||columnTitle.prop == 'error'">
<div v-if="columnTitle.prop == 'czxxJyqk'||columnTitle.prop == 'service_info'||columnTitle.prop == 'bz'||columnTitle.prop == 'function_info'||columnTitle.prop == 'error'">
<div class="ajxq_s">
<span class="none" v-html="scope.row[columnTitle.prop]"></span
><a
......@@ -504,7 +505,10 @@ export default {
mounted() {
let self = this;
if(self.$route.path=='/rzcxIndex/fwrz'){//服务日志界面service_num需要传入
self.formData['service_num']=self.$route.params['service_num'];
if(self.$route.params['service_num']!=''&&self.$route.params['service_num']!=null){
sessionStorage.setItem("service_num", self.$route.params['service_num']);
}
self.formData['service_num']=sessionStorage.getItem("service_num");
}
self.propQueryField.forEach(val => {
if (val.type == "code") {
......
......@@ -97,6 +97,14 @@ export default[
title: "日志管理"
}
},
{
path: "gnfwtj",
name: "gnfwtj",
component: () => import("@/views/rzcx/gnfwtj.vue"),
meta: {
title: "日志管理"
}
},
]
},
{
......
......@@ -4049,6 +4049,12 @@ let rzcxPropLeftMenu = [
label: "对外服务运控统计",
index: "5",
className: "iconfont icontongji"
},
{
id: "gnfwtj",
label: "功能访问统计",
index: "6",
className: "iconfont icontongji"
}
];
/*登录日志*/
......@@ -5302,6 +5308,51 @@ let ykpgbgFormData={
cxSj:'',
service_num:''
}
/*功能访问统计*/
let gnfwtjHeader = "功能访问统计";
let gnfwtjFormData = {
function_name: "",
limit: 10,
page: 1
};
let gnfwtjQueryField = [
{
name: "功能名称",
id: "function_name",
type: "text",
value: "",
placeholder: "",
col: "3"
}
];
let gnfwtjDefaultFormThead = [
{
label: "功能编号",
prop: "function_num"
},
{
/*table默认得表头*/
label: "功能名称",
prop: "function_name"
},
{
label: "访问频度",
prop: '当月:current_month,上月:last_month'
},
{
label: "功能响应效率(毫秒)",
prop: "time"
},
{
label: "高峰时段访问量",
prop: '当月(6-18):current_month_sd,上月(6-18):last_month_sd'
},
{
label: "功能信息",
prop: "function_info"
}
];
let gnfwtjURL = "/getFunctionService/message";
/*————————————————————————脑图详情列表透视--数据————————————————————————————————————————*/
/*验证*/
let naotuCxSjRules={
......@@ -6639,6 +6690,12 @@ export {
ykpgbgUrlFwyxsjtj,
ykpgbgUrlGsddqqk,
ykpgbgFormData,
/*功能访问统计*/
gnfwtjHeader,
gnfwtjFormData,
gnfwtjQueryField,
gnfwtjDefaultFormThead,
gnfwtjURL,
/*脑图详情列表透视--数据*/
/*验证*/
naotuCxSjRules,
......
<template>
<div id="gnfwtj">
<right-content :header="header" :cxFormData="cxFormData" :cxQueryField="cxQueryField" :cxDefaultFormThead="cxDefaultFormThead" :cxUrl="cxUrl"></right-content>
</div>
</template>
<!--功能访问统计-->
<script>
import rightContent from "@c/ptCxForm_components.vue";
import {
gnfwtjHeader,
gnfwtjFormData,
gnfwtjQueryField,
gnfwtjDefaultFormThead,
gnfwtjURL
} from "@/utils/params";
export default {
name: "gnfwtj",
components:{
rightContent
},
data() {
return {
cxFormData:gnfwtjFormData,
cxQueryField: gnfwtjQueryField,
cxDefaultFormThead:gnfwtjDefaultFormThead,
cxUrl:gnfwtjURL,
header:gnfwtjHeader
};
}
}
</script>
<style scoped>
</style>
......@@ -25,7 +25,7 @@
type="primary"
size="small"
@click="back"
class="zdybtn" style="margin-right:16px !important;float: right;"
class="zdybtn" style="margin-right:16px !important;float: right;width: 120px;font-size:14px;height: 36px;"
>返回</el-button
>
</div>
......@@ -33,16 +33,16 @@
<!--左-->
<div class="left_con">
<div class="flex">
<div class="fwyxzcl wrap" ref="fwyxzclWrap">
<div class="fwyxzcl wrap wrap271" ref="fwyxzclWrap">
<p class="wrap_title" ref="fwyxzclTitle">服务运行正确率</p>
<div id="fwyxzcl" style="width:100%;height:calc(100% - 75px)"></div>
<p class="unit">运行总次数:<span v-show="yxzcsTotal!=null" style="color:#333333">{{yxzcsTotal}}</span><span class="el-icon-loading" v-show="yxzcsTotal===null"></span></p>
</div>
<div class="gxtdqqk wrap">
<div class="gxtdqqk wrap wrap271">
<p class="wrap_title">各系统调取情况</p>
<div id="gxtdqqk" style="width:100%;height:calc(100% - 42px)">
<ul>
<li v-for="(item,index) in gxtdqqk" :key="index" class="list_item">
<li v-for="(item,index) in gxtdqqk" :key="index" class="list_item" :style="{width:`${listWidth}`}">
<p class="xtTitle">{{item.name}}</p>
<p class="xtCount">{{item.value}}<i class="el-icon-loading" v-if="item.value===''"></i></p>
</li>
......@@ -98,6 +98,7 @@
{name:'电诈系统',value:''},
{name:'一体化采集系统',value:''},
],
listWidth:'calc(20% - 1px)',
pickerOptions: {
shortcuts: [
{
......@@ -205,7 +206,6 @@
self.doquery1();
self.doquery2();
self.doquery3();
self.doquery4();
}
},
back(){
......@@ -293,7 +293,7 @@
{
name: '',
type: 'pie',
radius: ['30%', '50%'],
radius: ['50%', '70%'],
center: ['25%', '50%'],
avoidLabelOverlap: false,
label: {
......@@ -329,7 +329,7 @@
{
name: '',
type: 'pie',
radius: ['30%', '50%'],
radius: ['40%', '60%'],
center: ['38%', '40%'],
avoidLabelOverlap: false,
label: {
......@@ -352,7 +352,7 @@
myChart.setOption({
xAxis: {
type: 'category',
data: x
data: x,
},
yAxis: {
type: 'value',
......@@ -372,7 +372,8 @@
},
series: [{
data: y,
type: 'bar'
type: 'bar',
barWidth : 20
}],
color:'#FFAC3B'
});
......@@ -382,7 +383,6 @@
let self=this;
self.doQueryRequest(JSON.stringify(self.formData),self.FwyxzqlUrl).then(response => {
if (response.success === true) {
console.log(response.data)
let xData=['正常次数'+':'+response.data['success_count'], '异常次数'+':'+response.data['error_count']];
let yData=[];
for(let i in response.data){
......@@ -406,13 +406,15 @@
let self=this;
self.doQueryRequest(JSON.stringify(self.formData),self.GxtdqqkUrl).then(response => {
if (response.success === true) {
console.log(response.data)
if(response.data.list.length!=0){
response.data.list.forEach((item,index)=>{
self.gxtdqqk[index].name=item['system_name'];
self.gxtdqqk[index].value=item['system_count'];
let json={};
json.name=item['system_name'];
json.value=item['system_count'];
self.$set(self.gxtdqqk,index,json);
})
let num=100/response.data.list.length+'%';
self.listWidth='calc('+num+' - 1px)';
}else{
self.gxtdqqk.forEach(item=>{
item.value=0;
......@@ -430,7 +432,6 @@
let self=this;
self.doQueryRequest(JSON.stringify(self.formData),self.GsddqqkUrl).then(response => {
if (response.success === true) {
console.log(response.data)
self.gsdduqk(response.data.x,response.data.y);
} else {
self.$message({
......@@ -444,7 +445,6 @@
let self=this;
self.doQueryRequest(JSON.stringify(self.formData),self.FwyxsjtjUrl).then(response => {
if (response.success === true) {
console.log(response.data)
let xData=['正常'+":"+response.data['succesTime'], '异常'+":"+response.data['errorTime']];
let yData=[];
for(let i in response.data){
......@@ -474,7 +474,6 @@
self.doquery1();
self.doquery2();
self.doquery3();
self.doquery4();
}else{
self.isZdyDate=true;
}
......@@ -486,9 +485,12 @@
let myCharts1=self.$echarts.init(document.getElementById('fwyxzcl'));
let myCharts2=self.$echarts.init(document.getElementById('fwyxsjtj'));
let myCharts3=self.$echarts.init(document.getElementById('gsdduqk'));
if(JSON.stringify(self.$route.params) != "{}"){//传参过来的对象集存入sessionStorage,防止刷新没有参数service_num报错
sessionStorage.setItem("rzxxObj", JSON.stringify(self.$route.params));
}
for(let i in self.formData){
if(i!='cxSj'){
self.formData[i]=self.$route.params[i]
self.formData[i]=JSON.parse(sessionStorage.getItem("rzxxObj"))[i];
}
}
self.getDate();
......
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