修改文档管理样式问题,提交数据检索页面

This commit is contained in:
RenCheng 2025-04-19 14:01:55 +08:00
parent db3baa97ee
commit b354f155ca
4 changed files with 454 additions and 2 deletions

View File

@ -1,4 +1,4 @@
NODE_ENV=development
VUE_APP_API_BASE_URL=http://rcproject.natapp1.cc/jeecg-boot
VUE_APP_API_BASE_URL=http://pbl.natapp1.cc/jeecg-boot
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview

28
src/api/dataManage.js Normal file
View File

@ -0,0 +1,28 @@
import { getAction, deleteAction, putAction, postAction, httpAction,uploadAction } from '@/api/manage'
const getDataManagerInfo = (params)=>getAction("/dataManager/getDataManagerInfo",params);
const getAllSchemaName = (params)=>getAction("/dataManager/getAllSchemaName",params);
const getAllTable = (params)=>getAction("/dataManager/getAllTable",params);
const getTableData = (params)=>getAction("/dataManager/getTableData",params);
const getTableColumns = (params)=>getAction("/dataManager/getTableColumns",params);
const getTableIndexes = (params)=>getAction("/tableIndex/getTableIndexes",params);
const updateIndexSafe = (params)=>postAction("/tableIndex/updateIndexSafe",params);
const dropIndex = (params)=>postAction("/tableIndex/dropIndex",params);
const DmExportTool = (params)=>postAction("/dataManager/DmExportTool",params);
const getExportLog = (params)=>getAction("/dataManager/getExportLog",params);
export {
getDataManagerInfo,
getAllSchemaName,
getAllTable,
getTableData,
getTableColumns,
getTableIndexes,
updateIndexSafe,
dropIndex,
DmExportTool,
getExportLog
}

View File

@ -0,0 +1,424 @@
<template>
<div>
<div class="table-page-search-wrapper" style="background: #e6e9f1;padding:10px;">
<a-select placeholder="选择数据类型" v-model="datatypequeryParam.schemaName">
<a-select-option key="1">
{{ d.cnName }}
</a-select-option>
<a-select-option key="2">
{{ d.cnName }}
</a-select-option>
<a-select-option key="3">
{{ d.cnName }}
</a-select-option>
</a-select>
<!-- <a-select placeholder="选择数据类型" option-filter-prop="children" v-model="datatypequeryParam.schemaName" @change="getTables" style="width: 40%;">
<a-select-option v-for="d in dataTypedataSources" :key="d.enName">
{{ d.cnName }}
</a-select-option>
</a-select> -->
</div>
<a-row>
<a-col :span="6">
<div class="flodContent">
<div class="linese"></div>
<div class="siderHeader echartsTitle">
<div class="ecicon"></div>
数据检索
<!-- <a-button type="primary" style="margin-left: 21px;float: right;" @click="searchgetFileList">添加</a-button> -->
</div>
<a-dropdown>
<a-directory-tree
:tree-data="treeData"
v-model:expandedKeys="expandedKeys"
class="teeediv"
v-model:selectedKeys="selectedKeys"
@select="changeSelect"
>
<a-tree-node v-for="itemNode in treeData" :key="itemNode.id" :title="itemNode.title" :value="itemNode">
</a-tree-node>
</a-directory-tree>
</a-dropdown>
<div class="linese"></div>
</div>
</a-col>
<a-col :span="18">
<div class="righttop">
<div class="linese"></div>
<div class="rtable" ref="tableContainer">
<a-table
ref="table"
bordered
size="middle"
rowKey="id"
:columns="columns"
class="fileTable"
:pagination="false"
:scroll="{ x:false,y:tableScrollY }"
:dataSource="dataSource"
:loading="loading"
@change="handleTableChange"
>
<span slot="action" slot-scope="text, record">
<a @click="download(record, $event)">下载</a>&nbsp; <a @click="viewFile(record, $event)">预览</a>&nbsp;
<a @click="DeleteFile(record, $event)">删除</a>
</span>
</a-table>
</div>
<div class="linese"></div>
</div>
</a-col>
</a-row>
<a-modal v-model="isopen" :title="modalTitle" ok-text="确认" cancel-text="取消" @ok="hideModal">
<a-input placeholder="请输入" v-model="dirName" style="color: #000000 !important"></a-input>
</a-modal>
</div>
</template>
<script>
import guaz from '@assets/guaz.png'
import { getDataManagerInfo,
getAllSchemaName,
getAllTable,
getTableData,
getTableColumns,
getTableIndexes,
updateIndexSafe,
dropIndex,
DmExportTool,
getExportLog } from '@/api/dataManage'
export default {
name: 'dataSearch',
components: {
uploadModal,
},
data() {
return {
dirName: '',
guaz,
expandedKeys: [],
selectedKeys: [],
treeData: [],
isopen: false,
tableScrollY: 0,
columns: [
{
title: '序号',
width: 70,
customRender: (text, record, index) => `${index + 1}`,
},
{
title: '文件名称',
align: 'center',
dataIndex: 'fileName',
width: 120,
},
{
title: '文件后缀',
align: 'center',
width: 100,
dataIndex: 'fileSuffix',
},
{
title: '文件大小',
align: 'center',
width: 120,
dataIndex: 'fileSize',
},
{
title: '文件类型',
align: 'center',
width: 80,
dataIndex: 'fileTypeName',
},
{
title: '创建人',
align: 'center',
width: 100,
dataIndex: 'createByName',
},
{
title: '操作',
dataIndex: 'action',
scopedSlots: { customRender: 'action' },
align: 'center',
width: 170,
},
],
dataSource: [],
loading: false,
selectedRowKeys: [],
selectId: '',
modalTitle: '',
modelType: '',
searchFile: {
dirId: '',
queryCondition: '',
pageNum: 1,
pageSize: 9999999,
},
fileNum: {
document: 0,
pictures: 0,
video: 0,
dbfile: 0,
audio: 0,
total: 0,
},
}
},
created() {},
mounted() {
this.getDirList()
this.getcountFileNum()
this.calculateScrollY();
},
computed: {},
methods: {
calculateScrollY() {
//
const container = this.$refs.tableContainer;
const paginationHeight = 64; //
this.tableScrollY = container.clientHeight - paginationHeight;
},
clickfile() {
if (this.selectId.length <= 0) {
this.$message.warning('必须选择文件上传目录')
return
}
console.log('dirid=' + this.searchFile.dirId)
this.$refs.modalForm.title = '文件上传'
this.$refs.modalForm.dirId = this.searchFile.dirId
this.$refs.modalForm.add()
},
getcountFileNum() {
var that = this
countFileNum({}).then((res) => {
if (res.success) {
res.result.forEach((item, index) => {
that.setcountFileNum(item)
})
} else {
this.$message.warning(res.message)
}
})
},
setcountFileNum(item) {
switch (item.FILETYPE) {
case 'document':
this.fileNum.document = item.NUMS
break
case 'pictures':
this.fileNum.pictures = item.NUMS
break
case 'video':
this.fileNum.video = item.NUMS
break
case 'dbfile':
this.fileNum.dbfile = item.NUMS
break
case 'audio':
this.fileNum.audio = item.NUMS
break
case 'total':
this.fileNum.total = item.NUMS
break
}
},
download(item) {
let apiBaseUrl = window._CONFIG['domianURL'] || '/jeecg-boot'
window.open(apiBaseUrl + '/file/downloadFile?fileId=' + item.id)
},
viewFile(item) {
filePreview({ fileId: item.id }).then((res) => {
if (res.success) {
window.open('http://' + res.result, '_blank')
} else {
this.$message.warning(res.message)
}
})
},
DeleteFile(item) {
var that = this
that.$confirm({
title: '确认删除',
content: '是否删除选中文件?',
onOk: function () {
logicDeleteFile({ id: item.id }).then((res) => {
that.$message.warning(res.message)
that.searchgetFileList()
})
},
})
},
onSelectChange(selectedRowKeys, selectedRows) {
console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
},
handleTableChange() {},
reloadFileList() {
this.searchFile.queryCondition = ''
this.searchFile.pageNum = 1
this.searchFile.pageSize = 10
this.getFileList()
},
searchgetFileList() {
this.searchFile.dirId = this.selectId
this.getFileList()
},
getFileList() {
if (this.selectId.length <= 0) {
this.$message.warning('必须选择查询目录')
return
}
pageList(this.searchFile).then((res) => {
if (res.success) {
this.dataSource = res.result.rows
} else {
this.$message.warning(res.message)
}
})
},
hideModal() {
this.isopen = false
switch (this.modelType) {
case 'create':
createDir({ pid: this.selectId, dirName: this.dirName }).then((res) => {
if (res.success) {
this.treeData = res.result
this.getDirList()
} else {
this.$message.warning(res.message)
}
})
break
case 'rename':
renameDir({ id: this.selectId, dirName: this.dirName }).then((res) => {
if (res.success) {
this.treeData = res.result
this.getDirList()
} else {
this.$message.warning(res.message)
}
})
break
}
},
getDirList() {
dirtreeList({ dirName: '' }).then((res) => {
if (res.success) {
this.treeData = res.result
} else {
this.$message.warning(res.message)
}
})
},
menuClick(value) {
switch (value.key) {
case '1':
this.createDir()
break
case '2':
this.renameDir()
break
case '3':
this.logicDelDir()
break
}
},
createDir() {
this.modalTitle = '添加节点'
this.isopen = true
this.modelType = 'create'
this.dirName = ''
},
logicDelDir() {
var that = this
this.$confirm({
title: '确认删除',
content: '是否删除选中目录?',
onOk: function () {
logicDelDir({ id: that.selectId }).then((res) => {
that.$message.warning(res.message)
that.getDirList()
})
},
})
},
renameDir() {
this.modalTitle = '重命名节点'
this.isopen = true
this.modelType = 'rename'
this.dirName = ''
},
changeSelect(selectedKeys, e) {
this.selectId = e.node.dataRef.id
this.searchFile.dirId = this.selectId
this.searchgetFileList()
},
},
}
</script>
<style scoped>
/deep/ .ant-table-bordered .ant-table-header > table {
border: none !important;
}
.menu {
background: #ffffff !important;
}
.filecontent {
height: calc(100vh - 48px);
padding: 10px 20px;
}
.flodContent {
height: calc(100vh - 240px);
overflow-y: auto;
margin-right: 20px;
}
.siderHeader {
font-size: 18px;
}
.teeediv {
height: calc(100vh - 320px);
background: #e6e9f1;
}
.righttop {
height: calc(100vh - 240px);
float: left;
}
.righttop .search{
height: 58px;
}
.quarter-div {
height: 130px;
float: left;
margin-right: 20px;
color: #fff;
font-size: 16px;
text-align: center;
padding: 20px 0;
background:#092776;
}
.quarter-div .ant-col-11 {
text-align: right;
}
.quarter-div div {
text-align: left;
padding-left: 14px;
}
.quarter-div .datanum {
padding-top: 12px;
font-size: 26px;
}
.quarter-div .dataText {
font-size: 16px;
}
.rtable {
height: calc(100vh - 516px);
}
</style>

View File

@ -461,7 +461,7 @@ export default {
}
.quarter-div {
min-width: 200px;
min-width: 196px;
height: 130px;
float: left;
margin-right: 12px;