提交新功能
This commit is contained in:
parent
fe141cb6ce
commit
df96a442bf
15
src/api/materialSupport.js
Normal file
15
src/api/materialSupport.js
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
import { getAction, deleteAction, putAction, postAction, httpAction,uploadAction } from '@/api/manage'
|
||||||
|
|
||||||
|
const add = (params)=>postAction("/idcMaterialSupport071/add",params);
|
||||||
|
const edit = (params)=>putAction("/idcMaterialSupport071/edit",params);
|
||||||
|
const idcMaterialSupport071delete = (params)=>deleteAction("/idcMaterialSupport071/delete",params);
|
||||||
|
const taskPageList = (params)=>getAction("/task/pageList",params);
|
||||||
|
export {
|
||||||
|
add,
|
||||||
|
edit,
|
||||||
|
idcMaterialSupport071delete,
|
||||||
|
taskPageList
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
261
src/views/task/materialSupport.vue
Normal file
261
src/views/task/materialSupport.vue
Normal file
|
@ -0,0 +1,261 @@
|
||||||
|
<template>
|
||||||
|
<a-card :bordered="false">
|
||||||
|
|
||||||
|
<!-- 查询区域 -->
|
||||||
|
<div class="table-page-search-wrapper">
|
||||||
|
<a-form layout="inline">
|
||||||
|
<a-row :gutter="30">
|
||||||
|
<a-col :md="20" >
|
||||||
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
|
</span>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="4" style="margin-top:-65px; z-index: 12;">
|
||||||
|
<span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||||
|
</span>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :md="6" :sm="8">
|
||||||
|
<a-form-item label="选择任务">
|
||||||
|
<a-select show-search placeholder="选择任务" option-filter-prop="children" v-model="queryParam.taskId" @change="gettable">
|
||||||
|
<a-select-option v-for="item in dataTypeList" :value="item.id">
|
||||||
|
{{ item.name }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- table区域-begin -->
|
||||||
|
<div style="height:calc(100vh - 300px);overflow:hidden; background: #e6e9f1 !important;">
|
||||||
|
<div class="linese"></div>
|
||||||
|
<a-table
|
||||||
|
ref="table"
|
||||||
|
size="middle"
|
||||||
|
style="height:calc(100vh - 344px);"
|
||||||
|
bordered
|
||||||
|
rowKey="id"
|
||||||
|
:columns="columns"
|
||||||
|
:dataSource="dataSource"
|
||||||
|
:pagination="ipagination"
|
||||||
|
:loading="loading"
|
||||||
|
:rowSelection="{selectedRowKeys: selectedRowKeys,onChange: onSelectChange}"
|
||||||
|
@change="handleTableChange">
|
||||||
|
<!-- :locale="myLocale"-->
|
||||||
|
|
||||||
|
<!-- 字符串超长截取省略号显示-->
|
||||||
|
<template slot="status" slot-scope="text">
|
||||||
|
<span style="color:black;" v-if="text === 0" >未确认</span>
|
||||||
|
<span style="color:darkorange;" v-if="text === 1">未上报</span>
|
||||||
|
<span style="color:#87d068;" v-if="text === 2">已上报</span>
|
||||||
|
</template>
|
||||||
|
<span slot="action" slot-scope="text, record">
|
||||||
|
<a @click="handleEdit(record)">编辑</a>
|
||||||
|
<a-divider type="vertical"/>
|
||||||
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||||
|
<a>删除</a>
|
||||||
|
</a-popconfirm>
|
||||||
|
</span>
|
||||||
|
</a-table>
|
||||||
|
<div class="linese"></div>
|
||||||
|
</div>
|
||||||
|
<!-- table区域-end -->
|
||||||
|
|
||||||
|
<!-- 表单区域 -->
|
||||||
|
<materialSupportModal ref="modalForm" @ok="gettable"></materialSupportModal>
|
||||||
|
</a-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import materialSupportModal from './modules/materialSupportModal'
|
||||||
|
import { taskPageList,idcMaterialSupport071delete } from '@/api/materialSupport'
|
||||||
|
import {getAction} from '@/api/manage'
|
||||||
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||||
|
import JEllipsis from "@/components/jeecg/JEllipsis";
|
||||||
|
import guaz from '@assets/guaz.png'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "materialSupport",
|
||||||
|
mixins:[JeecgListMixin],
|
||||||
|
components: {
|
||||||
|
materialSupportModal,
|
||||||
|
JEllipsis,
|
||||||
|
VNodes: {
|
||||||
|
functional: true,
|
||||||
|
render: (h, ctx) => ctx.props.vnodes,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
description: '物资保障',
|
||||||
|
dataSources: [],
|
||||||
|
guaz,
|
||||||
|
queryParam: {
|
||||||
|
taskId:'',
|
||||||
|
pageNum :1,
|
||||||
|
pageSize:20
|
||||||
|
},
|
||||||
|
taskqueryParam: {
|
||||||
|
pageNum :1,
|
||||||
|
pageSize:9999999
|
||||||
|
},
|
||||||
|
dataTypeList:[],
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '#',
|
||||||
|
dataIndex: '',
|
||||||
|
key:'rowIndex',
|
||||||
|
width:60,
|
||||||
|
align:"center",
|
||||||
|
customRender:function (t,r,index) {
|
||||||
|
return parseInt(index)+1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'燃油重量(吨)',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'fuel'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'淡水重量(吨)',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'water'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'HQ-10 导弹数量',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'hq10'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'右中857余弹量',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'rm857'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'右后857余弹量',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'rr857'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'左中857余弹量',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'lm857'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'左后857余弹量',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'lr857'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'单76炮余弹量',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'a76'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'厘米箔条弹',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'chaffCm'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'毫米箔条弹',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'chaffMm'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'红外弹',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'ir'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'烟幕弹',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'smoke'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title:'状态(0-未确认,1-未上报,2-已上报)',
|
||||||
|
align:"center",
|
||||||
|
dataIndex: 'status',
|
||||||
|
scopedSlots: { customRender: 'status' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'action',
|
||||||
|
align:"center",
|
||||||
|
fixed:"right",
|
||||||
|
width:147,
|
||||||
|
scopedSlots: { customRender: 'action' }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.loadData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//筛选需要重写handleTableChange
|
||||||
|
handleTableChange(pagination, filters, sorter) {
|
||||||
|
//分页、排序、筛选变化时触发
|
||||||
|
//TODO 筛选
|
||||||
|
if (Object.keys(sorter).length > 0) {
|
||||||
|
this.isorter.column = sorter.field;
|
||||||
|
this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
|
||||||
|
}
|
||||||
|
this.ipagination = pagination;
|
||||||
|
this.gettable();
|
||||||
|
},
|
||||||
|
gettable(){
|
||||||
|
getAction("/idcMaterialSupport071/list", this.queryParam).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dataSource = res.result.records;
|
||||||
|
if(res.result.total)
|
||||||
|
{
|
||||||
|
this.ipagination.total = res.result.total;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
loadData() {
|
||||||
|
taskPageList(this.taskqueryParam).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dataTypeList = res.result.rows||res.result;
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDelete: function (id) {
|
||||||
|
var that = this;
|
||||||
|
idcMaterialSupport071delete({id: id}).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
that.$message.success(res.message);
|
||||||
|
that.loadData();
|
||||||
|
} else {
|
||||||
|
that.$message.warning(res.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleEdit: function (record) {
|
||||||
|
this.$refs.modalForm.edit(record);
|
||||||
|
this.$refs.modalForm.title = "编辑";
|
||||||
|
this.$refs.modalForm.taskId = this.queryParam.taskId
|
||||||
|
},
|
||||||
|
handleAdd() {
|
||||||
|
if( this.queryParam.taskId == ''){
|
||||||
|
this.$message.warning("请选择任务");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$refs.modalForm.add();
|
||||||
|
this.$refs.modalForm.title = "新增";
|
||||||
|
this.$refs.modalForm.taskId = this.queryParam.taskId
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
185
src/views/task/modules/materialSupportModal.vue
Normal file
185
src/views/task/modules/materialSupportModal.vue
Normal file
|
@ -0,0 +1,185 @@
|
||||||
|
<template>
|
||||||
|
<a-modal
|
||||||
|
:title="title"
|
||||||
|
:width="800"
|
||||||
|
:visible="visible"
|
||||||
|
:confirmLoading="confirmLoading"
|
||||||
|
@ok="handleOk"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
okText="保存"
|
||||||
|
cancelText="关闭">
|
||||||
|
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<a-form ref="form" :model="model" :rules="validatorRules">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-model-item label="燃油重量(吨)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fuel">
|
||||||
|
<a-input-number v-model="model.fuel" placeholder="请输入燃油重量(吨)" style="width: 100%" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-model-item label="淡水重量(吨)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="water">
|
||||||
|
<a-input-number v-model="model.water" placeholder="请输入淡水重量(吨)" style="width: 100%" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-model-item label="HQ-10 导弹数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hq10">
|
||||||
|
<a-input-number v-model="model.hq10" placeholder="请输入HQ-10 导弹数量" style="width: 100%" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-model-item label="右中857余弹量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="rm857">
|
||||||
|
<a-input-number v-model="model.rm857" placeholder="请输入右中857余弹量" style="width: 100%" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-model-item label="右后857余弹量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="rr857">
|
||||||
|
<a-input-number v-model="model.rr857" placeholder="请输入右后857余弹量" style="width: 100%" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-model-item label="左中857余弹量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lm857">
|
||||||
|
<a-input-number v-model="model.lm857" placeholder="请输入左中857余弹量" style="width: 100%" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-model-item label="左后857余弹量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lr857">
|
||||||
|
<a-input-number v-model="model.lr857" placeholder="请输入左后857余弹量" style="width: 100%" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-model-item label="单76炮余弹量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="a76">
|
||||||
|
<a-input-number v-model="model.a76" placeholder="请输入单76炮余弹量" style="width: 100%" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-model-item label="厘米箔条弹" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="chaffCm">
|
||||||
|
<a-input-number v-model="model.chaffCm" placeholder="请输入厘米箔条弹" style="width: 100%" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-model-item label="毫米箔条弹" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="chaffMm">
|
||||||
|
<a-input-number v-model="model.chaffMm" placeholder="请输入毫米箔条弹" style="width: 100%" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-model-item label="红外弹" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ir">
|
||||||
|
<a-input-number v-model="model.ir" placeholder="请输入红外弹" style="width: 100%" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-model-item label="烟幕弹" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="smoke">
|
||||||
|
<a-input-number v-model="model.smoke" placeholder="请输入烟幕弹" style="width: 100%" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</a-spin>
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import moment from "moment"
|
||||||
|
import { add,edit } from '@/api/materialSupport'
|
||||||
|
import JCron from "@/components/jeecg/JCron";
|
||||||
|
import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
|
||||||
|
import pick from 'lodash.pick'
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "materialSupportModal",
|
||||||
|
components: {
|
||||||
|
JCron,
|
||||||
|
JSelectMultiple
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:"操作",
|
||||||
|
model:{
|
||||||
|
},
|
||||||
|
form: this.$form.createForm(this),
|
||||||
|
confirmLoading: false,
|
||||||
|
validatorRules: {
|
||||||
|
},
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 5 },
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 16 },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.modelDefault = JSON.parse(JSON.stringify(this.model));
|
||||||
|
this.modelDefault.status=0;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.edit(this.modelDefault);
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.model = Object.assign({}, record);
|
||||||
|
this.visible = true;
|
||||||
|
},
|
||||||
|
onChange(value, dateString) {
|
||||||
|
this.model.startTime = dateString[0];
|
||||||
|
this.model.endTime = dateString[1];
|
||||||
|
console.log(this.model);
|
||||||
|
},
|
||||||
|
onOk(value) {
|
||||||
|
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
const that = this;
|
||||||
|
// 触发表单验证
|
||||||
|
this.form.validateFields((err, values) => {
|
||||||
|
console.log('values',values)
|
||||||
|
if (!err) {
|
||||||
|
this.model.taskId = this.taskId
|
||||||
|
that.confirmLoading = true;
|
||||||
|
if(!this.model.id){
|
||||||
|
add(this.model).then((res)=>{
|
||||||
|
if(res.success){
|
||||||
|
that.$message.success(res.message);
|
||||||
|
that.$emit('ok');
|
||||||
|
this.close()
|
||||||
|
}else{
|
||||||
|
that.$message.warning(res.message);
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
that.confirmLoading = false;
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
edit(this.model).then((res)=>{
|
||||||
|
if(res.success){
|
||||||
|
that.$message.success(res.message);
|
||||||
|
that.$emit('ok');
|
||||||
|
this.close()
|
||||||
|
}else{
|
||||||
|
that.$message.warning(res.message);
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
that.confirmLoading = false;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.disabled{
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
</style>
|
270
src/views/task/onlineLinkCountData.vue
Normal file
270
src/views/task/onlineLinkCountData.vue
Normal file
|
@ -0,0 +1,270 @@
|
||||||
|
<template>
|
||||||
|
<a-row :gutter="30" style="padding: 0 10px;">
|
||||||
|
<a-col :md="10">
|
||||||
|
<div class="linese"></div>
|
||||||
|
<a-card :bordered="false" style="background: #e6e9f1 !important;">
|
||||||
|
<!-- table区域-begin -->
|
||||||
|
<div class="datacleanResult">
|
||||||
|
<a-list :data-source="contentList" style="padding:10px 20px;">
|
||||||
|
<a-list-item slot="renderItem" slot-scope="item">
|
||||||
|
{{ item }}
|
||||||
|
</a-list-item>
|
||||||
|
</a-list>
|
||||||
|
</div>
|
||||||
|
</a-card>
|
||||||
|
<div class="linese"></div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="14" style="height:calc(80vh - 125px);">
|
||||||
|
<div class="linese"></div>
|
||||||
|
<div class="echartsTitle"><div class="ecicon"></div>数据编目总量统计</div>
|
||||||
|
<div id="totalNumberCatalogues" class="totalNumberCatalogues" ref="totalNumberCatalogues" style="width: 100%;background:#e6e9f1; height: calc(100% - 70px); "></div>
|
||||||
|
<div class="linese"></div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import store from '@/store/'
|
||||||
|
import { getAction } from '@/api/manage'
|
||||||
|
import {
|
||||||
|
dataTypePageList,
|
||||||
|
dataTypeDeleteById
|
||||||
|
} from '@/api/dataType'
|
||||||
|
export default {
|
||||||
|
name: "dataCleansing",
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
description: '原始库',
|
||||||
|
contentList: [],
|
||||||
|
percent: 0,
|
||||||
|
websock: {},
|
||||||
|
datatypequeryParam: {
|
||||||
|
schemaMass: "",
|
||||||
|
sourceType: 1
|
||||||
|
},
|
||||||
|
queryParam: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 9999999,
|
||||||
|
},
|
||||||
|
dataTypedataSources: [],
|
||||||
|
dataSource: [
|
||||||
|
],
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '#',
|
||||||
|
dataIndex: '',
|
||||||
|
key: 'id',
|
||||||
|
width: 60,
|
||||||
|
align: "id",
|
||||||
|
customRender: function (t, r, index) {
|
||||||
|
return parseInt(index) + 1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '表名',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'tableName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '报文名',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'tableMessName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '数据量',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'dataNum'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '标签类型',
|
||||||
|
align: "center",
|
||||||
|
dataIndex: 'tagNames'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
tableScrollY: 0,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
//初始化websocket
|
||||||
|
this.initWebSocket()
|
||||||
|
this.getTables()
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
|
||||||
|
},
|
||||||
|
destroyed: function () { // 离开页面生命周期函数
|
||||||
|
var userId = store.getters.userInfo.id;
|
||||||
|
this.websock.send("close_" + userId);
|
||||||
|
this.websocketclose();
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
openlink(url) {
|
||||||
|
window.location.href = url;
|
||||||
|
},
|
||||||
|
initWebSocket: function () {
|
||||||
|
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
||||||
|
var userId = store.getters.userInfo.id;
|
||||||
|
var url = window._CONFIG['domianURL'].replace("https://", "ws://").replace("http://", "ws://") + "/websocket/onlineLink/websocket_msg_count";
|
||||||
|
this.websock = new WebSocket(url);
|
||||||
|
this.websock.onopen = this.websocketonopen;
|
||||||
|
this.websock.onerror = this.websocketonerror;
|
||||||
|
this.websock.onmessage = this.websocketonmessage;
|
||||||
|
this.websock.onclose = this.websocketclose;
|
||||||
|
},
|
||||||
|
websocketonopen: function () {
|
||||||
|
this.contentList.unshift("消息服务连接成功");
|
||||||
|
},
|
||||||
|
websocketonerror: function (e) {
|
||||||
|
this.contentList.unshift("消息服务连接失败" + JSON.stringify(e));
|
||||||
|
},
|
||||||
|
websocketonmessage: function (e) {
|
||||||
|
console.log(e)
|
||||||
|
if (e.length > 0) {
|
||||||
|
this.contentList.unshift(e);
|
||||||
|
}
|
||||||
|
this.getTables()
|
||||||
|
},
|
||||||
|
websocketclose: function (e) {
|
||||||
|
this.contentList.unshift("消息服务链接关闭" + JSON.stringify(e));
|
||||||
|
},
|
||||||
|
dataAdd() {
|
||||||
|
getAction("/dataCleaning/cleaning?taskId=3806ce79-dc28-48a3-9250-c7729e6b3ad4").then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getTables() {
|
||||||
|
this.totalNumberCataloguesData =[];
|
||||||
|
getAction("/online/getOnlineLinkCountData",{}).then((res)=>{
|
||||||
|
if(res.success){
|
||||||
|
this.totalNumberCataloguesData = res.result
|
||||||
|
this.gettotalNumberCatalogues();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
gettotalNumberCatalogues(){
|
||||||
|
var myChart = this.$echarts.init(this.$refs.totalNumberCatalogues);
|
||||||
|
var option = {
|
||||||
|
tooltip: {},
|
||||||
|
dataset: {
|
||||||
|
source: this.totalNumberCataloguesData
|
||||||
|
},
|
||||||
|
grid:{
|
||||||
|
left:'40px',
|
||||||
|
right:'20px',
|
||||||
|
top:'20px',
|
||||||
|
bottom:'30px'
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'category' ,
|
||||||
|
|
||||||
|
axisLabel:{
|
||||||
|
color: '#6C758B'
|
||||||
|
},
|
||||||
|
splitLine:{
|
||||||
|
lineStyle:{
|
||||||
|
color: '#6C758B'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisLine:{
|
||||||
|
lineStyle:{
|
||||||
|
color: '#6C758B'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
// 竖排关键:每个字符用\n换行
|
||||||
|
formatter: function(value) {
|
||||||
|
return value.split('').join('\n');
|
||||||
|
},
|
||||||
|
// 可选:调整文字样式
|
||||||
|
rich: {
|
||||||
|
a: { // 为所有文字定义统一样式
|
||||||
|
fontSize: 12,
|
||||||
|
lineHeight: 16 // 控制行高,避免重叠
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
axisLabel:{
|
||||||
|
color: '#6C758B'
|
||||||
|
},
|
||||||
|
splitLine:{
|
||||||
|
lineStyle:{
|
||||||
|
color: '#6C758B'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
axisLine:{
|
||||||
|
lineStyle:{
|
||||||
|
color: '#6C758B'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// Declare several bar series, each will be mapped
|
||||||
|
// to a column of dataset.source by default.
|
||||||
|
series: [{ type: 'bar',barMaxWidth: 30, }],
|
||||||
|
color:['#5470c6']
|
||||||
|
};
|
||||||
|
myChart.setOption(option);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
/deep/ .ant-table-bordered .ant-table-header>table {
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.datacleanResult {
|
||||||
|
height: calc(100vh - 374px);
|
||||||
|
overflow-y: auto;
|
||||||
|
margin: 10px;
|
||||||
|
background: #F1F4FA;
|
||||||
|
}
|
||||||
|
|
||||||
|
.datacleanResult .progressbg {
|
||||||
|
margin: 10px;
|
||||||
|
height: 60px;
|
||||||
|
padding: 20px 10px;
|
||||||
|
background: #D6DAE2;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.datacleanResult .title {
|
||||||
|
width: 14%;
|
||||||
|
font-size: 16px;
|
||||||
|
float: left;
|
||||||
|
text-align: right;
|
||||||
|
line-height: 20px;
|
||||||
|
color: #363F56;
|
||||||
|
}
|
||||||
|
|
||||||
|
.datacleanResult .progress {
|
||||||
|
width: 86%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.datacleanResult .ant-progress-bg,
|
||||||
|
.datacleanResult .ant-progress-inner {
|
||||||
|
height: 16px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.datacleanResult .ant-progress-bg {
|
||||||
|
background: linear-gradient(180deg, rgb(43, 97, 48), rgb(75, 160, 75), rgb(43, 97, 48));
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .datacleanResult .ant-progress-text {
|
||||||
|
color: #fff !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.datacleanResult .ant-list-items {
|
||||||
|
border-bottom: 1px dashed rgb(35, 72, 100);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue
Block a user