|
@@ -50,7 +50,7 @@
|
|
|
</el-row> -->
|
|
|
<div class="info-content">
|
|
|
<!-- <div class="header" @click="toPersonalCenter"> -->
|
|
|
- <!-- <img :src="avatar" class="user-avatar" /> -->
|
|
|
+ <!-- <img :src="avatar" class="user-avatar" /> -->
|
|
|
<!-- </div> -->
|
|
|
<!-- <div class="name">{{ nickName }}</div>
|
|
|
<div class="tenant-name">{{ tenantName }}</div>
|
|
@@ -81,12 +81,8 @@
|
|
|
<div class="swiper-container">
|
|
|
<div class="swiper-scrollbar"></div>
|
|
|
<div class="swiper-wrapper">
|
|
|
- <div
|
|
|
- class="swiper-slide"
|
|
|
- v-for="(item, index) in swiperList"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <div>
|
|
|
+ <div class="swiper-slide" v-for="(item,index) in swiperList" :key="index">
|
|
|
+ <div >
|
|
|
<span class="name">{{ item.oper_name }}</span>
|
|
|
<span class="ip">{{ item.oper_ip }}</span>
|
|
|
</div>
|
|
@@ -108,8 +104,8 @@
|
|
|
import { formatDate } from "@/utils";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import { mapGetters, mapState } from "vuex";
|
|
|
-import "swiper/css/swiper.css";
|
|
|
-import Swiper from "swiper";
|
|
|
+import 'swiper/css/swiper.css';
|
|
|
+import Swiper from 'swiper';
|
|
|
import {
|
|
|
getProcess,
|
|
|
getOperation,
|
|
@@ -122,6 +118,7 @@ export default {
|
|
|
name: "Index",
|
|
|
data() {
|
|
|
return {
|
|
|
+ echars: true,
|
|
|
chartObj: {
|
|
|
myChart1: null,
|
|
|
myChart2: null,
|
|
@@ -186,52 +183,51 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
initData() {
|
|
|
- console.log(1111);
|
|
|
//工业流&审批流
|
|
|
getProcess().then((response) => {
|
|
|
- if (response.code == 200) {
|
|
|
+ if(response.code == 200){
|
|
|
this.processList = response.data;
|
|
|
console.log(response.data);
|
|
|
this.chartObj.myChart1.setOption({
|
|
|
series: [
|
|
|
{
|
|
|
- data: response.data,
|
|
|
- },
|
|
|
- ],
|
|
|
- });
|
|
|
+ data: response.data
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ })
|
|
|
} else {
|
|
|
console.log(response);
|
|
|
this.$message.error("获取数据失败");
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
|
|
|
//登录次数统计
|
|
|
- getLogin().then((response) => {
|
|
|
- if (response.code == 200) {
|
|
|
- let xAxisData = response.data[0].date;
|
|
|
+ getLogin().then(response => {
|
|
|
+ if(response.code == 200){
|
|
|
+ let xAxisData = response.data[0].date
|
|
|
xAxisData = xAxisData.map(function (dateStr) {
|
|
|
var date = new Date(dateStr);
|
|
|
return date.getMonth() + 1 + "月" + date.getDate() + "日";
|
|
|
});
|
|
|
- let loginList = response.data.map((item) => item.name);
|
|
|
+ let loginList = response.data.map((item) => item.name);
|
|
|
this.chartObj.myChart2.setOption({
|
|
|
xAxis: {
|
|
|
- data: xAxisData,
|
|
|
+ data: xAxisData
|
|
|
},
|
|
|
legend: {
|
|
|
- data: loginList,
|
|
|
+ data: loginList
|
|
|
},
|
|
|
- series: response.data,
|
|
|
- });
|
|
|
+ series: response.data
|
|
|
+ })
|
|
|
} else {
|
|
|
console.log(response);
|
|
|
this.$message.error("获取数据失败");
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
|
|
|
//登录统计信息
|
|
|
- getOperation().then((response) => {
|
|
|
- if (response.code == 200) {
|
|
|
+ getOperation().then(response => {
|
|
|
+ if(response.code == 200){
|
|
|
this.swiperList = response.data;
|
|
|
console.log(this.swiperList);
|
|
|
this.$nextTick(() => {
|
|
@@ -254,46 +250,46 @@ export default {
|
|
|
console.log(response);
|
|
|
this.$message.error("获取数据失败");
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
|
|
|
// 表格统计
|
|
|
- getTabular().then((response) => {
|
|
|
- if (response.code == 200) {
|
|
|
- let tabularList = response.data;
|
|
|
- // tabularList.push({ name: "多表数量", value: 30 });
|
|
|
- let labelList = response.data.map((item) => item.name);
|
|
|
+ getTabular().then(response => {
|
|
|
+ if(response.code == 200){
|
|
|
+ let tabularList = response.data
|
|
|
+ tabularList.push({ name: '多表数量', value: 30 })
|
|
|
+ let labelList = response.data.map((item) => item.name)
|
|
|
this.chartObj.myChart3.setOption({
|
|
|
yAxis: {
|
|
|
data: labelList,
|
|
|
},
|
|
|
series: [
|
|
|
{
|
|
|
- data: response.data,
|
|
|
- },
|
|
|
- ],
|
|
|
- });
|
|
|
+ data: response.data
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ })
|
|
|
} else {
|
|
|
console.log(response);
|
|
|
this.$message.error("获取数据失败");
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
|
|
|
//数据建模数量
|
|
|
- getData().then((response) => {
|
|
|
- if (response.code == 200) {
|
|
|
+ getData().then(response => {
|
|
|
+ if(response.code == 200){
|
|
|
console.log(response.data);
|
|
|
this.chartObj.myChart4.setOption({
|
|
|
series: [
|
|
|
{
|
|
|
- data: [response.data],
|
|
|
- },
|
|
|
- ],
|
|
|
- });
|
|
|
+ data: [response.data]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ })
|
|
|
} else {
|
|
|
console.log(response);
|
|
|
this.$message.error("获取数据失败");
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
initChart1() {
|
|
@@ -302,262 +298,232 @@ export default {
|
|
|
let option = {
|
|
|
color: ["#9370db", "#ffd700", "#00ccff", "#ff6600", "#ff9900"],
|
|
|
title: {
|
|
|
- text: "流程统计",
|
|
|
- left: "left",
|
|
|
+ text: '流程统计',
|
|
|
+ left: 'left',
|
|
|
textStyle: {
|
|
|
fontSize: 16,
|
|
|
- fontWeight: "normal",
|
|
|
- color: "#696969",
|
|
|
+ fontWeight: 'normal',
|
|
|
+ color: '#696969'
|
|
|
},
|
|
|
},
|
|
|
tooltip: {
|
|
|
- trigger: "item",
|
|
|
+ trigger: 'item'
|
|
|
},
|
|
|
legend: {
|
|
|
- left: "60%",
|
|
|
- top: "60%",
|
|
|
+ left: '60%',
|
|
|
+ top: '60%',
|
|
|
},
|
|
|
series: [
|
|
|
{
|
|
|
- type: "pie",
|
|
|
- radius: ["40%", "100%"],
|
|
|
+ type: 'pie',
|
|
|
+ radius: ['40%', '100%'],
|
|
|
avoidLabelOverlap: false,
|
|
|
itemStyle: {
|
|
|
// borderRadius: 10,
|
|
|
- borderColor: "#fff",
|
|
|
- borderWidth: 2,
|
|
|
+ borderColor: '#fff',
|
|
|
+ borderWidth: 2
|
|
|
},
|
|
|
- right: "40%",
|
|
|
- top: "50%",
|
|
|
+ right: '40%',
|
|
|
+ top: '50%',
|
|
|
data: [
|
|
|
- { value: 10, name: "工艺流" },
|
|
|
- { value: 20, name: "审批流" },
|
|
|
+ { value: 10, name: '工艺流' },
|
|
|
+ { value: 20, name: '审批流' },
|
|
|
],
|
|
|
label: {
|
|
|
show: false,
|
|
|
- position: "center",
|
|
|
+ position: 'center'
|
|
|
},
|
|
|
labelLine: {
|
|
|
- show: false,
|
|
|
+ show: false
|
|
|
},
|
|
|
emphasis: {
|
|
|
label: {
|
|
|
show: true,
|
|
|
fontSize: 20,
|
|
|
- fontWeight: "bold",
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
+ fontWeight: 'bold'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
};
|
|
|
this.chartObj.myChart1.setOption(option);
|
|
|
},
|
|
|
|
|
|
- initChart2() {
|
|
|
+ initChart2(){
|
|
|
this.chartObj.myChart2 = this.$echarts.init(this.$refs.lineChart);
|
|
|
let option = {
|
|
|
color: ["#FF88E0", "#9FE080"],
|
|
|
title: {
|
|
|
- text: "用户登录统计",
|
|
|
+ text: '用户登录统计',
|
|
|
textStyle: {
|
|
|
fontSize: 16,
|
|
|
- fontWeight: "normal",
|
|
|
- color: "#696969",
|
|
|
+ fontWeight: 'normal',
|
|
|
+ color: '#696969'
|
|
|
},
|
|
|
},
|
|
|
tooltip: {
|
|
|
- trigger: "axis",
|
|
|
+ trigger: 'axis'
|
|
|
},
|
|
|
legend: {
|
|
|
- data: ["客户端11", "工具端11"],
|
|
|
+ data: ['客户端11', '工具端11']
|
|
|
},
|
|
|
grid: {
|
|
|
- left: "3%",
|
|
|
- right: "4%",
|
|
|
- top: "20%",
|
|
|
- bottom: "0%",
|
|
|
- containLabel: true,
|
|
|
+ left: '3%',
|
|
|
+ right: '4%',
|
|
|
+ top: '20%',
|
|
|
+ bottom: '0%',
|
|
|
+ containLabel: true
|
|
|
},
|
|
|
xAxis: {
|
|
|
- type: "category",
|
|
|
+ type: 'category',
|
|
|
boundaryGap: false,
|
|
|
data: [
|
|
|
- "01\nMon",
|
|
|
- "02\nTue",
|
|
|
- "03\nWed",
|
|
|
- "04\nThu",
|
|
|
- "05\nFri",
|
|
|
- "06\nSat",
|
|
|
- "07\nSun",
|
|
|
- "08\nMon",
|
|
|
- "09\nTue",
|
|
|
- "10\nWed",
|
|
|
- "11\nThu",
|
|
|
- "12\nFri",
|
|
|
- "13\nSat",
|
|
|
- "14\nSun",
|
|
|
- "15\nMon",
|
|
|
- "16\nTue",
|
|
|
- "17\nWed",
|
|
|
- "18\nThu",
|
|
|
- "19\nFri",
|
|
|
- "20\nSat",
|
|
|
- "21\nSun",
|
|
|
- "22\nMon",
|
|
|
- "23\nTue",
|
|
|
- "24\nWed",
|
|
|
- "25\nThu",
|
|
|
- "26\nFri",
|
|
|
- "27\nSat",
|
|
|
- "28\nSun",
|
|
|
- "29\nMon",
|
|
|
- "30\nTue",
|
|
|
- ],
|
|
|
+ '01\nMon', '02\nTue', '03\nWed', '04\nThu', '05\nFri', '06\nSat', '07\nSun',
|
|
|
+ '08\nMon', '09\nTue', '10\nWed', '11\nThu', '12\nFri', '13\nSat', '14\nSun',
|
|
|
+ '15\nMon', '16\nTue', '17\nWed', '18\nThu', '19\nFri', '20\nSat', '21\nSun',
|
|
|
+ '22\nMon', '23\nTue', '24\nWed', '25\nThu', '26\nFri', '27\nSat', '28\nSun',
|
|
|
+ '29\nMon', '30\nTue',
|
|
|
+ ]
|
|
|
},
|
|
|
yAxis: {
|
|
|
- type: "value",
|
|
|
+ type: 'value'
|
|
|
},
|
|
|
series: [
|
|
|
{
|
|
|
- name: "客户端",
|
|
|
- type: "line",
|
|
|
+ name: '客户端',
|
|
|
+ type: 'line',
|
|
|
smooth: true,
|
|
|
- data: [
|
|
|
- 10, 23, 42, 13, 30, 25, 40, 30, 42, 55, 40, 28, 20, 30, 45, 25,
|
|
|
- 20, 30, 40, 33, 35, 40, 46, 31, 13, 34, 20, 10, 36, 43,
|
|
|
- ],
|
|
|
+ data: [10, 23, 42, 13, 30, 25, 40, 30, 42, 55, 40, 28, 20, 30, 45, 25, 20, 30, 40, 33, 35, 40, 46, 31, 13, 34, 20, 10, 36, 43]
|
|
|
},
|
|
|
{
|
|
|
- name: "工具端",
|
|
|
- type: "line",
|
|
|
+ name: '工具端',
|
|
|
+ type: 'line',
|
|
|
smooth: true,
|
|
|
- data: [
|
|
|
- 20, 30, 29, 40, 55, 33, 30, 26, 36, 45, 50, 34, 38, 25, 28, 43,
|
|
|
- 16, 30, 45, 52, 40, 46, 33, 57, 50, 33, 40, 59, 56, 56,
|
|
|
- ],
|
|
|
+ data: [20, 30, 29, 40, 55, 33, 30, 26, 36, 45, 50, 34, 38, 25, 28, 43, 16, 30, 45, 52, 40, 46, 33, 57, 50, 33, 40, 59, 56, 56]
|
|
|
},
|
|
|
- ],
|
|
|
- };
|
|
|
+ ]
|
|
|
+ }
|
|
|
this.chartObj.myChart2.setOption(option);
|
|
|
},
|
|
|
|
|
|
- initChart3() {
|
|
|
+ initChart3(){
|
|
|
this.chartObj.myChart3 = this.$echarts.init(this.$refs.gaugeChart);
|
|
|
let option = {
|
|
|
- color: ["#00ccff", "#ff6600", "#ff9900", "#9370db", "#ffd700"],
|
|
|
+ color: ["#00ccff", "#ff6600", "#ff9900","#9370db", "#ffd700"],
|
|
|
title: {
|
|
|
- text: "表格统计",
|
|
|
- left: "left",
|
|
|
+ text: '表格统计',
|
|
|
+ left: 'left',
|
|
|
textStyle: {
|
|
|
fontSize: 16,
|
|
|
- fontWeight: "normal",
|
|
|
- color: "#696969",
|
|
|
+ fontWeight: 'normal',
|
|
|
+ color: '#696969'
|
|
|
},
|
|
|
},
|
|
|
tooltip: {
|
|
|
trigger: "axis",
|
|
|
axisPointer: {
|
|
|
- type: "shadow",
|
|
|
- },
|
|
|
+ type: "shadow"
|
|
|
+ }
|
|
|
},
|
|
|
grid: {
|
|
|
- left: "0%",
|
|
|
- right: "3%",
|
|
|
- top: "20%",
|
|
|
- bottom: "0%",
|
|
|
- containLabel: true,
|
|
|
+ left: '0%',
|
|
|
+ right: '3%',
|
|
|
+ top: '20%',
|
|
|
+ bottom: '0%',
|
|
|
+ containLabel: true
|
|
|
},
|
|
|
xAxis: {
|
|
|
- type: "value",
|
|
|
- nameLocation: "middle",
|
|
|
+ type: 'value',
|
|
|
+ nameLocation: 'middle',
|
|
|
nameTextStyle: {
|
|
|
- align: "center",
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
splitLine: {
|
|
|
- show: false,
|
|
|
+ show: false
|
|
|
},
|
|
|
},
|
|
|
|
|
|
yAxis: {
|
|
|
- type: "category",
|
|
|
- data: ["表单", "表格", "三级联动", "多表数量"],
|
|
|
+ type: 'category',
|
|
|
+ data: ['表单', '表格', '三级联动', '多表数量'],
|
|
|
inverse: true, // 使类目从右向左排列
|
|
|
},
|
|
|
|
|
|
series: [
|
|
|
{
|
|
|
- type: "bar",
|
|
|
- barWidth: "18",
|
|
|
- orientation: "horizontal",
|
|
|
+ type: 'bar',
|
|
|
+ barWidth: '18',
|
|
|
+ orientation: 'horizontal',
|
|
|
data: [
|
|
|
- { value: 88, name: "表单" },
|
|
|
- { value: 66, name: "表格" },
|
|
|
- { value: 33, name: "三级联动" },
|
|
|
- { value: 55, name: "多表数量" },
|
|
|
+ { value: 88, name: '表单' },
|
|
|
+ { value: 66, name: '表格' },
|
|
|
+ { value: 33, name: '三级联动' },
|
|
|
+ { value: 55, name: '多表数量' },
|
|
|
],
|
|
|
showBackground: true,
|
|
|
backgroundStyle: {
|
|
|
- color: "#F0F8FF",
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- };
|
|
|
+ color: '#F0F8FF'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
this.chartObj.myChart3.setOption(option);
|
|
|
},
|
|
|
|
|
|
- initChart4() {
|
|
|
+ initChart4(){
|
|
|
this.chartObj.myChart4 = this.$echarts.init(this.$refs.barChart);
|
|
|
let option = {
|
|
|
color: ["#5D84FE"],
|
|
|
title: {
|
|
|
- text: "数据建模统计",
|
|
|
+ text: '数据建模统计',
|
|
|
textStyle: {
|
|
|
fontSize: 16,
|
|
|
- fontWeight: "normal",
|
|
|
- color: "#696969",
|
|
|
+ fontWeight: 'normal',
|
|
|
+ color: '#696969'
|
|
|
},
|
|
|
},
|
|
|
tooltip: {
|
|
|
trigger: "axis",
|
|
|
axisPointer: {
|
|
|
- type: "shadow",
|
|
|
- },
|
|
|
+ type: "shadow"
|
|
|
+ }
|
|
|
},
|
|
|
xAxis: {
|
|
|
- type: "category",
|
|
|
- data: ["数据建模"],
|
|
|
+ type: 'category',
|
|
|
+ data: ['数据建模'],
|
|
|
},
|
|
|
yAxis: {
|
|
|
- type: "value",
|
|
|
+ type: 'value',
|
|
|
min: 0,
|
|
|
max: 100,
|
|
|
interval: 20,
|
|
|
splitLine: {
|
|
|
- show: false, // 关闭y轴的水平分割线
|
|
|
+ show: false // 关闭y轴的水平分割线
|
|
|
},
|
|
|
},
|
|
|
grid: {
|
|
|
- left: "5%",
|
|
|
- right: "5%",
|
|
|
- top: "30%",
|
|
|
- bottom: "0%",
|
|
|
- containLabel: true,
|
|
|
+ left: '5%',
|
|
|
+ right: '5%',
|
|
|
+ top: '30%',
|
|
|
+ bottom: '0%',
|
|
|
+ containLabel: true
|
|
|
},
|
|
|
series: [
|
|
|
{
|
|
|
data: [20],
|
|
|
- type: "bar",
|
|
|
- barWidth: "30", // 设置柱体宽度
|
|
|
+ type: 'bar',
|
|
|
+ barWidth: '30', // 设置柱体宽度
|
|
|
showBackground: true,
|
|
|
backgroundStyle: {
|
|
|
- color: "#E8EFFF",
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- };
|
|
|
+ color: '#E8EFFF'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
this.chartObj.myChart4.setOption(option);
|
|
|
},
|
|
|
|
|
|
+
|
|
|
/** 导入按钮操作 */
|
|
|
handleImport() {
|
|
|
this.upload.title = "用户导入";
|
|
@@ -614,6 +580,7 @@ export default {
|
|
|
return formatDate(new Date());
|
|
|
},
|
|
|
},
|
|
|
+
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -621,7 +588,6 @@ export default {
|
|
|
.home {
|
|
|
position: relative;
|
|
|
width: 100%;
|
|
|
- background-color: #eff2f7;
|
|
|
/* height: 500px; */
|
|
|
.info-content {
|
|
|
width: 100%;
|
|
@@ -635,7 +601,7 @@ export default {
|
|
|
height: 280px;
|
|
|
margin: auto;
|
|
|
padding: 20px 15px;
|
|
|
- box-shadow: 10px 10px 5px #e0e0e0;
|
|
|
+ box-shadow: 10px 10px 5px #E0E0E0;
|
|
|
background-color: #fff;
|
|
|
border-radius: 10px;
|
|
|
.pieChart {
|
|
@@ -676,7 +642,7 @@ export default {
|
|
|
height: 280px;
|
|
|
margin: auto;
|
|
|
padding: 20px 15px;
|
|
|
- box-shadow: 10px 10px 5px #e0e0e0;
|
|
|
+ box-shadow: 10px 10px 5px #E0E0E0;
|
|
|
background-color: #fff;
|
|
|
border-radius: 10px;
|
|
|
margin-right: 30px;
|
|
@@ -690,7 +656,7 @@ export default {
|
|
|
height: 200px;
|
|
|
margin: auto;
|
|
|
padding: 20px 15px;
|
|
|
- box-shadow: 10px 10px 5px #e0e0e0;
|
|
|
+ box-shadow: 10px 10px 5px #E0E0E0;
|
|
|
background-color: #fff;
|
|
|
border-radius: 10px;
|
|
|
margin-top: 20px;
|
|
@@ -699,7 +665,7 @@ export default {
|
|
|
}
|
|
|
.title {
|
|
|
font-size: 16px;
|
|
|
- color: "#696969";
|
|
|
+ color: '#696969'
|
|
|
}
|
|
|
.text {
|
|
|
display: flex;
|
|
@@ -743,7 +709,7 @@ export default {
|
|
|
height: 200px;
|
|
|
margin: auto;
|
|
|
padding: 20px 15px;
|
|
|
- box-shadow: 10px 10px 5px #e0e0e0;
|
|
|
+ box-shadow: 10px 10px 5px #E0E0E0;
|
|
|
background-color: #fff;
|
|
|
border-radius: 10px;
|
|
|
margin-top: 20px;
|
|
@@ -757,7 +723,7 @@ export default {
|
|
|
height: 200px;
|
|
|
margin: auto;
|
|
|
padding: 20px 15px;
|
|
|
- box-shadow: 10px 10px 5px #e0e0e0;
|
|
|
+ box-shadow: 10px 10px 5px #E0E0E0;
|
|
|
background-color: #fff;
|
|
|
border-radius: 10px;
|
|
|
margin-top: 20px;
|