修改列表状态显示

This commit is contained in:
RenCheng 2025-02-24 21:40:07 +08:00
parent 3ccc209479
commit 1650b67ece
4 changed files with 55 additions and 35 deletions

View File

@ -109,11 +109,6 @@
align:"fileName",
dataIndex: 'fileName',
},
{
title: '创建时间',
align:"createTime",
dataIndex: 'createTime'
},
{
title: '模式名称',
align:"schemaName",
@ -124,10 +119,16 @@
align:"tableName",
dataIndex: 'tableName',
},
{
title: '创建时间',
align:"createTime",
dataIndex: 'createTime'
},
{
title: '状态',
align:"parseStatus",
align:"center",
dataIndex: 'parseStatus',
scopedSlots: { customRender: 'parseStatus' },
},
{
title: '解析进度',
@ -197,6 +198,8 @@
},
processFile: function (record) {
var that = this;
isDataLinkFileParsed({fileId:record.fileId}).then((res) => {
if (res) {
postAction("/fileDataLink/processFile?dataLinkId="+record.id,{}).then((res) => {
if (res.success) {
this.$message.success(res.message);
@ -205,6 +208,10 @@
this.$message.warning(res.message);
}
});
} else {
this.$message.warning("解析中请勿重复点击");
}
});
},
handleAdd() {
this.$refs.modalForm.add();

View File

@ -70,7 +70,7 @@
<script>
import uploadModal from './modules/uploadModal'
import { getFileLinkInfo,processFile,fileDataLinkDelete } from '@/api/fileDataLink'
import { getFileLinkInfo,processFile,fileDataLinkDelete,isDataLinkFileParsed } from '@/api/fileDataLink'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JEllipsis from "@/components/jeecg/JEllipsis";
import {deleteAction, postAction} from '@/api/manage'
@ -112,11 +112,6 @@
align:"fileName",
dataIndex: 'fileName',
},
{
title: '创建时间',
align:"createTime",
dataIndex: 'createTime'
},
{
title: '模式名称',
align:"schemaName",
@ -127,10 +122,16 @@
align:"tableName",
dataIndex: 'tableName',
},
{
title: '创建时间',
align:"createTime",
dataIndex: 'createTime'
},
{
title: '状态',
align:"parseStatus",
align:"center",
dataIndex: 'parseStatus',
scopedSlots: { customRender: 'parseStatus' },
},
{
title: '解析进度',
@ -203,6 +204,8 @@
},
processFile: function (record) {
var that = this;
isDataLinkFileParsed({fileId:record.fileId}).then((res) => {
if (res) {
postAction("/fileDataLink/processFile?dataLinkId="+record.id,{}).then((res) => {
if (res.success) {
this.$message.success(res.message);
@ -211,6 +214,10 @@
this.$message.warning(res.message);
}
});
} else {
this.$message.warning("解析中请勿重复点击");
}
});
},
handleAdd() {
this.$refs.modalForm.add();

View File

@ -42,7 +42,7 @@
<!-- :locale="myLocale"-->
<!-- 字符串超长截取省略号显示-->
<template slot="parseStatus" slot-scope="text,record">
<template slot="parseStatus" 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>
@ -109,11 +109,6 @@
align:"fileName",
dataIndex: 'fileName',
},
{
title: '创建时间',
align:"createTime",
dataIndex: 'createTime'
},
{
title: '模式名称',
align:"schemaName",
@ -124,10 +119,16 @@
align:"tableName",
dataIndex: 'tableName',
},
{
title: '创建时间',
align:"createTime",
dataIndex: 'createTime'
},
{
title: '状态',
align:"center",
dataIndex: 'parseStatus',
scopedSlots: { customRender: 'parseStatus' },
},
{
title: '解析进度',
@ -197,6 +198,8 @@
},
processFile: function (record) {
var that = this;
isDataLinkFileParsed({fileId:record.fileId}).then((res) => {
if (res) {
postAction("/fileDataLink/processFile?dataLinkId="+record.id,{}).then((res) => {
if (res.success) {
this.$message.success(res.message);
@ -205,6 +208,10 @@
this.$message.warning(res.message);
}
});
} else {
this.$message.warning("解析中请勿重复点击");
}
});
},
handleAdd() {
this.$refs.modalForm.add();

View File

@ -19,7 +19,6 @@
<a-col :md="6" :sm="24" >
<a-button type="primary" style="left: 10px" @click="loadData" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px;left: 10px">重置</a-button>
<a-button type="primary" @click="handleAdd" icon="upload" style="margin-left: 8px;left: 10px">上传</a-button>
</a-col>
</span>