IDCDatasync-vue/src/views/task/statistics.vue

312 lines
11 KiB
Vue

<template>
<div style="margin-left: 10px;">
<a-row :gutter=20>
<a-col :md="7">
<div class="linese"></div>
<div class="table-page-search-wrapper">
<a-form layout="inline">
<a-row :gutter="30">
<a-col :md="18" :sm="10" >
<a-form-item label="关键词">
<a-input placeholder="请输入搜索关键词" v-model="queryParam.name"></a-input>
</a-form-item>
</a-col>
<a-col :md="6" :sm="10" >
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button @click="handleAdd" type="primary" v-has="'cont:btn'" icon="search">查询</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<a-table
ref="table"
size="middle"
style="height:calc(100vh - 359px);"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource">
</a-table>
<div class="linese"></div>
</a-col>
<a-col :md="17" style="padding-right:20px;">
<div class="linese"></div>
<a-row>
<div style="margin-left: 10px;">
<a-col :span="5" class="quarter-div">
<a-col :span="8">
<img src="~@/assets/img/icon-结构化数据条数.png" />
</a-col>
<a-col :span="16">
<div class="datanum">9694</div>
<div>结构化数据条数</div>
</a-col>
</a-col>
<a-col :span="5" class="quarter-div">
<a-col :span="8">
<img src="~@/assets/img/icon非结构化文件大小.png" />
</a-col>
<a-col :span="16">
<div class="datanum">10.92GB</div>
<div>非结构化文件(大小)</div>
</a-col>
</a-col>
<a-col :span="4" class="quarter-div">
<a-col :span="10">
<img src="~@/assets/img/icon-表数量.png" />
</a-col>
<a-col :span="14">
<div class="datanum">22</div>
<div>表数量</div>
</a-col>
</a-col>
<a-col :span="4" class="quarter-div">
<a-col :span="10">
<img src="~@/assets/img/icon-文件接引数量.png" />
</a-col>
<a-col :span="14">
<div class="datanum">7</div>
<div>文件接引数量</div>
</a-col>
</a-col>
<a-col :span="4" class="quarter-div">
<a-col :span="10">
<img src="~@/assets/img/icon-文档数量.png" />
</a-col>
<a-col :span="14">
<div class="datanum">5</div>
<div>文档数量</div>
</a-col>
</a-col>
</div>
</a-row>
<div class="linese"></div>
<div class="linese"></div>
<a-row :gutter="20">
<a-col :md="12" :sm="2" style="height:calc(100vh - 420px);">
<div class="echartsTitle"><div class="ecicon"></div>数据清洗差异统计</div>
<div id="cleaningVariance" ref="cleaningVariance" style="width: 100%; height: calc(100% - 36px);background:rgb(8,34,52);"></div>
</a-col>
<a-col :md="12" :sm="2" style="height:calc(100vh - 420px);padding-right:20px;">
<div class="echartsTitle"><div class="ecicon"></div>数据类型存储占比统计</div>
<div id="totalNumberCatalogues" ref="totalNumberCatalogues" style="width: 100%; height: calc(100% - 36px);background:rgb(8,34,52);"></div>
</a-col>
</a-row>
<div class="linese"></div>
</a-col>
</a-row>
</div>
</template>
<script>
import { shipModelPageList,
shipModeldeleteById } from '@/api/ship'
import { taskCreate,
taskUpdateById,
taskQueryById,
taskPageList,
taskDistributeTask,
taskDeleteById } from '@/api/task'
import { getAction } from '@/api/manage'
import JEllipsis from "@/components/jeecg/JEllipsis";
export default {
name: "statistics",
components: {
JEllipsis
},
data () {
return {
description: '任务统计',
dataSources: [],
queryParam: {
pageNum :1,
pageSize:20
},
columns: [
{
title: '#',
dataIndex: '',
key:'id',
width:60,
align:"id",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title: '任务名称',
align:"name",
dataIndex: 'name',
},
{
title: '结束时间',
align:"endTime",
dataIndex: 'endTime',
},
{
title: '操作',
dataIndex: 'action',
align:"center",
width:180,
scopedSlots: { customRender: 'action' },
}
]
}
},
mounted() {
this.getTables()
this.loadData();
},
computed: {
},
destroyed: function () {
},
created () {
},
methods: {
dataAdd(){
},
getselect(){
},
loadData() {
taskPageList(this.queryParam).then((res) => {
if (res.success) {
this.dataSource = res.result.rows||res.result;
if(res.result.total)
{
this.ipagination.total = res.result.total;
}
} else {
this.$message.warning(res.message);
}
});
},
getTables(){
this.getcleaningVariance();
this.gettotalNumberCatalogues();
},
getcleaningVariance(){
var myChart = this.$echarts.init(this.$refs.cleaningVariance);
var option = {
legend: {},
tooltip: {},
grid:{
left:'40px',
right:'20px',
top:'20px',
bottom:'20px'
},
dataset: {
source: [
['product', '', ],
['平台', 43.3],
['编队', 83.1],
['航空兵', 86.4],
['陆战队', 72.4],
['作战', 72.4],
['反潜', 72.4],
['舰炮', 72.4]
]
},
xAxis: {
type: 'category',
axisLabel:{
color: '#fff'
},
axisLine:{
lineStyle:{
color: 'rgb(10,45,67)'
}
},
axisLine:{
lineStyle:{
color: 'rgb(10,45,67)'
}
},
},
yAxis: {
axisLabel:{
color: '#fff'
},
splitLine:{
lineStyle:{
color: 'rgb(10,45,67)'
}
},
axisLine:{
lineStyle:{
color: 'rgb(10,45,67)'
}
},
},
// Declare several bar series, each will be mapped
// to a column of dataset.source by default.
series: [{ type: 'bar',barMaxWidth: 20, }],
color:['#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc']
};
myChart.setOption(option);
},
gettotalNumberCatalogues(){
var myChart = this.$echarts.init(this.$refs.totalNumberCatalogues);
var option = {
tooltip: {
trigger: 'item'
},
series: [
{
name: '占比',
type: 'pie',
radius: '80%',
data: [
{ value: 1048, name: '平台' },
{ value: 735, name: '编队' },
{ value: 580, name: '航空兵' },
{ value: 484, name: '陆战队' },
{ value: 300, name: '作战' },
{ value: 735, name: '反潜' },
{ value: 580, name: '舰炮' }
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
],
color:['#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc']
};
myChart.setOption(option);
},
}
}
</script>
<style scoped>
.quarter-div {
height: 100px;
float: left;
margin-right: 16px;
border: 2px solid rgb(11,72,98);
color: #fff;
font-size: 16px;
text-align: center;
padding: 20px 0;
}
.quarter-div div{
text-align: left;
line-height: 30px;
}
.quarter-div .datanum{
font-size: 26px;
}
</style>