提交标签管理页面

This commit is contained in:
RenCheng 2025-03-08 10:14:57 +08:00
parent 4ca0c18842
commit 7ca9872a8e
5 changed files with 404 additions and 55 deletions

16
src/api/tag.js Normal file
View File

@ -0,0 +1,16 @@
import { getAction, deleteAction, putAction, postAction, httpAction,uploadAction } from '@/api/manage'
const idcTableTagadd = (params)=>postAction("/idcTableTag/add",params);
const idcTableTaglist = (params)=>getAction("/idcTableTag/list",params);
const idcTableTagedit = (params)=>putAction("/idcTableTag/edit",params);
const idcTableTagdelete = (params)=>deleteAction("/idcTableTag/delete",params);
export {
idcTableTagadd,
idcTableTaglist,
idcTableTagedit,
idcTableTagdelete
}

View File

@ -6,15 +6,15 @@ const taskQueryById = (params)=>getAction("/task/queryById",params);
const taskPageList = (params)=>getAction("/task/pageList",params);
const taskDistributeTask = (params)=>putAction("/task/distributeTask",params);
const taskDeleteById = (params)=>deleteAction("/task/deleteById",params);
const getDataAnalysis = (params)=>getAction("/dataAnalysis/getDataAnalysis",params);
export {
taskCreate,
taskUpdateById,
taskQueryById,
taskPageList,
taskDistributeTask,
taskDeleteById
taskDeleteById,
getDataAnalysis
}

View File

@ -0,0 +1,121 @@
<template>
<a-modal
:title="title"
:width="800"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleOk"
@cancel="handleCancel"
okText="保存"
cancelText="关闭">
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-form-item label="标签名称" >
<a-input v-decorator="['tagName']" ></a-input>
</a-form-item>
<a-form-item
label="标签说明">
<a-input v-decorator="['tagDescribe']" ></a-input>
</a-form-item>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import { idcTableTagadd,
idcTableTaglist,
idcTableTagedit,} from '@/api/tag'
import JCron from "@/components/jeecg/JCron";
import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
import pick from 'lodash.pick'
// import moment from "moment"
export default {
name: "dataTypeModal",
components: {
JCron,
JSelectMultiple
},
data () {
return {
title:"操作",
buttonStyle: 'solid',
visible: false,
status:'',
model: {},
confirmLoading: false,
form: this.$form.createForm(this),
strategys:[],
dataStrategySelected:'',
idcDataStrategyId:""
}
},
created () {
},
methods: {
add () {
this.edit({});
},
edit (record) {
this.visible =true;
let that = this;
that.form.resetFields();
this.model = Object.assign({},record);
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'enName','cnName'));
});
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
const that = this;
//
this.form.validateFields((err, values) => {
console.log('values',values)
if (!err) {
that.confirmLoading = true;
if(!this.model.id){
idcTableTagadd(values).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
that.close();
})
}else{
idcTableTagedit({id:this.model.id,tagName:values.tagName,tagDescribe:values.tagDescribe}).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
that.close();
})
}
}
})
},
handleCancel () {
this.close()
},
}
}
</script>
<style scoped>
.disabled{
pointer-events: none;
}
</style>

186
src/views/ship/tag.vue Normal file
View File

@ -0,0 +1,186 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<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.tagName"></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="loadData" type="primary" v-has="'cont:btn'" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px;left: 10px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- table区域-begin -->
<div style="height:900px;overflow-y:auto;">
<a-button @click="handleAdd" type="primary" v-has="'cont:btn'" icon="plus" style="margin-left: 8px;left: 10px;margin-bottom: 10px;">新增</a-button>
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys,onChange: onSelectChange}"
@change="handleTableChange">
<!-- :locale="myLocale"-->
<!-- 字符串超长截取省略号显示-->
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)" v-has="'cont:btn'">修改</a>
<a-divider type="vertical" v-has="'cont:btn'" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<!-- table区域-end -->
<!-- 表单区域 -->
<tagModal ref="modalForm" @ok="modalFormOk"></tagModal>
</a-card>
</template>
<script>
import tagModal from './modules/tagModal'
import { idcTableTaglist,
idcTableTagdelete } from '@/api/tag'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JEllipsis from "@/components/jeecg/JEllipsis";
export default {
name: "tag",
mixins:[JeecgListMixin],
components: {
tagModal,
JEllipsis,
VNodes: {
functional: true,
render: (h, ctx) => ctx.props.vnodes,
},
},
data () {
return {
description: '标签管理',
dataSource: [],
queryParam: {
pageNum :1,
pageSize:20,
tagName:""
},
columns: [
{
title: '#',
dataIndex: '',
key:'id',
width:60,
align:"id",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title: '标签名称',
align:"left",
dataIndex: 'tagName',
},
{
title: '标签描述',
align:"left",
dataIndex: 'tagDescribe'
},
{
title: '创建时间',
align:"center",
width: 250,
dataIndex: 'createTime',
},
{
title: '创建人',
align:"left",
dataIndex: 'createBy',
},
{
title: '操作',
dataIndex: 'action',
align:"center",
width:180,
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.loadData();
},
searchReset(){
this.queryParam= {
pageNum :1,
pageSize:20,
tagName:""
}
},
loadData() {
idcTableTaglist(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);
}
});
},
handleDelete: function (id) {
var that = this;
idcTableTagdelete({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 = "编辑";
},
handleAdd() {
this.$refs.modalForm.add();
this.$refs.modalForm.title = "新增";
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

View File

@ -12,7 +12,7 @@
</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>
<a-button @click="loadData" type="primary" v-has="'cont:btn'" icon="search">查询</a-button>
</span>
</a-col>
</a-row>
@ -24,7 +24,8 @@
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource">
:dataSource="dataSource"
@change="handleTableChange">
<!-- :locale="myLocale"-->
<!-- 字符串超长截取省略号显示-->
@ -35,15 +36,15 @@
</a-col>
<a-col :md="16" :sm="2">
<a-row>
<div style="margin-left: 10px;">
<div class="quarter">
<div class="quarter-div">
<a-row>
<a-col :span="12" style="text-align: center;">
<img style="margin-top: 10px;" :src="guaz" />
</a-col>
<a-col :span="12">
<div style="margin-top: 14px">1</div>
<div>文件总</div>
<div style="margin-top: 14px">{{fileNum.totalNumRow}}</div>
<div>结构化数据条</div>
</a-col>
</a-row>
</div>
@ -53,8 +54,8 @@
<img style="margin-top: 10px;" :src="guaz" />
</a-col>
<a-col :span="12">
<div style="margin-top: 14px">2</div>
<div>图片</div>
<div style="margin-top: 14px">{{fileNum.totalFileSize}}GB</div>
<div>非结构化文件(大小)</div>
</a-col>
</a-row>
</div>
@ -64,8 +65,8 @@
<img style="margin-top: 10px;" :src="guaz" />
</a-col>
<a-col :span="12">
<div style="margin-top: 14px">3</div>
<div>音频</div>
<div style="margin-top: 14px">{{fileNum.tableCount}}</div>
<div>表数量</div>
</a-col>
</a-row>
</div>
@ -75,8 +76,8 @@
<img style="margin-top: 10px;" :src="guaz" />
</a-col>
<a-col :span="12">
<div style="margin-top: 14px">4</div>
<div>数据库文件</div>
<div style="margin-top: 14px">{{ fileNum.fileLinkCount }}</div>
<div>文件接引数量</div>
</a-col>
</a-row>
</div>
@ -86,8 +87,8 @@
<img style="margin-top: 10px;" :src="guaz" />
</a-col>
<a-col :span="12">
<div style="margin-top: 14px">5</div>
<div>视频</div>
<div style="margin-top: 14px">{{ fileNum.docFileCount }}</div>
<div>文档数量</div>
</a-col>
</a-row>
</div>
@ -95,10 +96,10 @@
</a-row>
<a-row>
<a-col :md="12" :sm="2">
<div id="cleaningVariance" class="cleaningVariance" ref="cleaningVariance" style="width: 620px; height: 450px; float: left"></div>
<div id="cleaningVariance" class="cleaningVariance" ref="cleaningVariance"></div>
</a-col>
<a-col :md="12" :sm="2">
<div id="totalNumberCatalogues" class="totalNumberCatalogues" ref="totalNumberCatalogues" style="width: 620px; height: 450px; float: right"></div>
<div id="totalNumberCatalogues" class="totalNumberCatalogues" ref="totalNumberCatalogues"></div>
</a-col>
</a-row>
</a-col>
@ -109,12 +110,8 @@
<script>
import { shipModelPageList,
shipModeldeleteById } from '@/api/ship'
import { taskCreate,
taskUpdateById,
taskQueryById,
taskPageList,
taskDistributeTask,
taskDeleteById } from '@/api/task'
import { getDataAnalysis,
taskPageList, } from '@/api/task'
import { getAction } from '@/api/manage'
import JEllipsis from "@/components/jeecg/JEllipsis";
import guaz from '@assets/guaz.png'
@ -126,11 +123,12 @@
data () {
return {
description: '任务统计',
dataSources: [],
dataSource: [],
guaz,
queryParam: {
pageNum :1,
pageSize:20
pageSize:20,
name:""
},
columns: [
{
@ -160,7 +158,15 @@
width:180,
scopedSlots: { customRender: 'action' },
}
]
],
fileNum:{
totalNumRow:0,
tableCount:0,
docFileCount:0,
totalFileSize:0,
fileLinkCount:0
},
cleaningVariancesource:[]
}
},
mounted() {
@ -176,26 +182,46 @@
},
methods: {
dataAdd(){
//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.loadData();
},
getselect(){
handleEdit(value){
this.cleaningVariancesource =[];
getDataAnalysis({taskId:value.id,startDate:value.startTime,endDate:value.endTime}).then((res) => {
if (res.success) {
res.result.schemaNames.forEach(row => {
this.cleaningVariancesource.push([row, parseInt(res.result.numRowMap[row]) ])
})
this.fileNum.totalNumRow = res.result.totalNumRow
this.fileNum.tableCount = res.result.tableCount
this.fileNum.docFileCount = res.result.docFileCount
this.fileNum.totalFileSize = res.result.totalFileSize
this.fileNum.fileLinkCount = res.result.fileLinkCount
this.getcleaningVariance();
} else {
this.$message.warning(res.message);
}
});
},
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(){
@ -207,18 +233,12 @@
legend: {},
tooltip: {},
dataset: {
source: [
['product', '', ],
['平台', 43.3],
['编队', 83.1],
['航空兵', 86.4],
['陆战队', 72.4],
['作战', 72.4],
['反潜', 72.4],
['舰炮', 72.4]
]
source: this.cleaningVariancesource
},
xAxis: { type: 'category' },
xAxis: { type: 'category',
nameTextStyle: {
align: "center"
} },
yAxis: {},
// Declare several bar series, each will be mapped
// to a column of dataset.source by default.
@ -247,13 +267,10 @@
type: 'pie',
radius: '50%',
data: [
{ value: 1048, name: '平台' },
{ value: 735, name: '编队' },
{ value: 580, name: '航空兵' },
{ value: 484, name: '陆战队' },
{ value: 300, name: '作战' },
{ value: 735, name: '反潜' },
{ value: 580, name: '舰炮' }
{ value: 1048, name: '文档' },
{ value: 735, name: '视频' },
{ value: 580, name: '音频' },
{ value: 484, name: '结构化数据' },
],
emphasis: {
itemStyle: {
@ -275,10 +292,10 @@
@import '~@assets/less/common.less';
.quarter-div {
width: 15%;
width: 18%;
height: 100px;
float: left;
margin-right: 26px;
margin-right: 6px;
background: #edf2ff;
border: 1px solid #d3e5fd;
border-radius: 10px;
@ -292,4 +309,13 @@
margin-left: 0px;
margin-right: 50px;
}
.cleaningVariance {
width: 620px; height: 450px; float: left; padding: 30px 10px 10px 20px;
}
.totalNumberCatalogues {
width: 620px; height: 450px; float: right; padding: 30px 10px 10px 20px;
}
.quarter {
margin-left: 10px; margin-bottom: 20px;padding: 30px 10px 10px 20px;
}
</style>