完成全文检索页面
This commit is contained in:
parent
8672a86036
commit
cffccc5b6f
|
@ -7,6 +7,7 @@ const logicDeleteFile = (params)=>deleteAction("/file/logicDeleteFile",params);
|
|||
const pageList = (params)=>getAction("/file/pageList",params);
|
||||
const uoloadFile = (params)=>uploadAction("/file/uoloadFile",params);
|
||||
const verifyFileExist = (params)=>getAction("/file/verifyFileExist",params);
|
||||
const fullTextSearching = (params)=>getAction("/file/fullTextSearching",params);
|
||||
|
||||
|
||||
export {
|
||||
|
@ -15,7 +16,8 @@ export {
|
|||
logicDeleteFile,
|
||||
pageList,
|
||||
uoloadFile,
|
||||
verifyFileExist
|
||||
verifyFileExist,
|
||||
fullTextSearching
|
||||
}
|
||||
|
||||
|
||||
|
|
241
src/views/fileManage/fullSearch.vue
Normal file
241
src/views/fileManage/fullSearch.vue
Normal file
|
@ -0,0 +1,241 @@
|
|||
<template>
|
||||
<div class="pageBackground">
|
||||
<div class="breadHeader">文件管理/全文检索</div>
|
||||
<div class="filecontent" >
|
||||
<a-layout>
|
||||
<a-layout-content>
|
||||
<div style="margin-top: 20px;">
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form layout="inline">
|
||||
<a-form-item>
|
||||
<a-input placeholder="请输入" v-model="searchFile.queryCriteria" style="color: #000000 !important;"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<a-checkbox-group v-model:value="checkboxValue" name="checkboxgroup" :options="plainOptions" />
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<a-button type="primary" icon="search" style="margin-left: 21px" @click="searchgetFileList">查询</a-button>
|
||||
<a-button type="primary" icon="reload" style="margin-left: 8px" @click="reloadFileList">重置</a-button>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
<div style="margin-top: 15px">
|
||||
<a-table ref="table" bordered size="middle" rowKey="id" :columns="columns" class="fileTable"
|
||||
:dataSource="dataSource" :loading="loading"
|
||||
>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="download(record,$event)">下载</a> <a @click="viewFile(record,$event)">预览</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
</a-layout-content>
|
||||
</a-layout>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import guaz from '@assets/guaz.png'
|
||||
import {createDir,logicDelDir,renameDir,dirtreeList} from '@/api/dirapi'
|
||||
import {downloadFile,filePreview,fullTextSearching} from '@/api/fileapi'
|
||||
export default {
|
||||
name: "fileManage",
|
||||
data() {
|
||||
return {
|
||||
isopen:false,
|
||||
columns: [
|
||||
{
|
||||
title: "序号",
|
||||
width: 70,
|
||||
customRender: (text, record, index) => `${index + 1}`,
|
||||
},
|
||||
{
|
||||
title: '文件名称',
|
||||
align: "center",
|
||||
dataIndex: 'fileName',
|
||||
width: 120,
|
||||
sorter: true
|
||||
},
|
||||
{
|
||||
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
|
||||
}
|
||||
|
||||
],
|
||||
plainOptions:[
|
||||
{ label: '图片', value: "1" },
|
||||
{ label: '视频', value: "2" },
|
||||
{ label: '音频', value: "3" },
|
||||
{ label: '数据库文件', value: "4" },
|
||||
{ label: '文档', value: "5" },
|
||||
{ label: '其他', value: "6" },
|
||||
],
|
||||
checkboxValue:["1","2","3","4","5","6"],
|
||||
/* 分页参数 */
|
||||
searchFileTable: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
pageSizeOptions: ['5', '10', '20','50','100'],
|
||||
showTotal: (total, range) => {
|
||||
return range[0] + "-" + range[1] + " 共" + total + "条"
|
||||
},
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
total: 0
|
||||
},
|
||||
dataSource: [],
|
||||
loading: false,
|
||||
selectedRowKeys: [],
|
||||
searchFile:{
|
||||
"queryCriteria":"",
|
||||
"fileType":"",
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
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);
|
||||
}
|
||||
});
|
||||
},
|
||||
reloadFileList(){
|
||||
this.searchFile.queryCriteria = "";
|
||||
this.checkboxValue =["1","2","3","4","5","6"];
|
||||
this.getFileList();
|
||||
},
|
||||
searchgetFileList(){
|
||||
this.getFileList();
|
||||
},
|
||||
getFileList(){
|
||||
if(this.selectId == "0"){
|
||||
this.$message.warning("必须选择查询目录");
|
||||
return;
|
||||
}
|
||||
this.searchFile.fileType = this.checkboxValue.join()
|
||||
fullTextSearching(this.searchFile).then((res) => {
|
||||
if (res.success) {
|
||||
this.dataSource = res.result
|
||||
} else {
|
||||
this.$message.warning(res.message);
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pageBackground {
|
||||
background: #dee3ee;
|
||||
height: 100vh;
|
||||
font-size: 23px;
|
||||
}
|
||||
|
||||
.breadHeader {
|
||||
height: 40px;
|
||||
background: #FFFFFF;
|
||||
line-height: 40px;
|
||||
font-size: 18px;
|
||||
color: #a3a8bb;
|
||||
padding: 0 100px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.menu{
|
||||
background: #ffffff !important;
|
||||
}
|
||||
.filecontent {
|
||||
height: calc(100vh - 48px);
|
||||
padding: 20px 30px;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.siderHeader {
|
||||
height: 50px;
|
||||
color: #212224;
|
||||
line-height: 50px;
|
||||
font-size: 20px;
|
||||
background: #ebf0ff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.flodContent {
|
||||
height: calc(100vh - 230px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.main {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
/* position: absolute; */
|
||||
}
|
||||
|
||||
.quarter-div {
|
||||
width: 15%;
|
||||
height: 100px;
|
||||
float: left;
|
||||
margin-right: 26px;
|
||||
background: #edf2ff;
|
||||
border: 1px solid #d3e5fd;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
/deep/ .ant-layout-sider {
|
||||
background: #f6f8ff !important;
|
||||
border: 1px solid #dfe4f3;
|
||||
border-radius: 10px;
|
||||
height: calc(100vh - 180px);
|
||||
min-width: 200px !important;
|
||||
margin-left: 0px;
|
||||
margin-right: 50px;
|
||||
}
|
||||
|
||||
/deep/ .ant-checkbox-checked{
|
||||
background: #40a9ff !important;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user