固定页数

This commit is contained in:
wangxk 2025-05-24 14:04:18 +08:00
parent ba9f7c893b
commit e05170255f
3 changed files with 83 additions and 76 deletions

View File

@ -2,14 +2,14 @@
<div style="display: flex;display: -webkit-flex; align-items: center;-webkit-align-items: center;">
<div :style="{ fontSize: appStore.size === 'default' ? '14px' : '16px' }" style="display: flex;display: -webkit-flex;align-items: center;-webkit-align-items: center;">
{{ total }}</div>
<el-select @change="changesize" v-model="pcode" filterable class="product-input"
<!-- <el-select @change="changesize" v-model="pcode" filterable class="product-input"
@keyup.enter="changeSize" allow-create style="margin-left: 10px;width: 80px;">
<el-option v-for="(item, index) in arr_product" :key="index" :label="item.lable" :value="item.value" />
</el-select>
<div
</el-select> -->
<!-- <div
:style="{ fontSize: appStore.size === 'default' ? '14px' : '16px' }" style="margin-left:10px;display: flex;display: -webkit-flex;align-items: center; -webkit-align-items: center;">
<div>/</div>
</div>
</div> -->
<el-pagination style="margin-left: 10px;" background layout="prev, pager, next" :total="total"
v-model:current-page="currentPage" v-model:page-size="pageSize" @current-change="pagechange" />
<div

View File

@ -70,8 +70,8 @@ function getProject() {
projectArr.value = res.data
projectId.value = projectArr.value[0].id
projectName.value = projectArr.value[0].projectName
// gettreedata()
tonstatus()
gettreedata()
})
}
//
@ -114,6 +114,7 @@ function gettreedata() {
} else {
tableData.value.length = 0
}
tonstatus()
})
}
@ -744,7 +745,7 @@ function tonstatus(){
buttonmsg1.value = '处理中...'
}
})
gettreedata()
// gettreedata()
}
</script>

View File

@ -13,7 +13,7 @@ import { ElMessageBox, ElMessage, ElMain } from "element-plus";
import Page from '@/components/Pagination/page.vue';
import AudioPlayer from '@/components/file/preview/AudioPlayer.vue';
import { batchDeleteReq } from "@/api/file-operator";
import { tstaskList, obtaintestData,getTsNodesTree, addTsNodes, updateTsNodes, deleteTsNodesById, tsFilesPage, addTsFiles,testDataScanById, updateTsFiles, deleteTsFilesById, listTsFiles, deleteTsFilesByIds, compress, Decompression, compare, downloadToLocal, uploadToBackup, addTsFile, list, moveFileFolder, copyFileFolder, startSimpleNavi, stopSimpleNavi } from "@/api/datamanagement";
import { tstaskList, obtaintestData, getTsNodesTree, addTsNodes, updateTsNodes, deleteTsNodesById, tsFilesPage, addTsFiles, testDataScanById, updateTsFiles, deleteTsFilesById, listTsFiles, deleteTsFilesByIds, compress, Decompression, compare, downloadToLocal, uploadToBackup, addTsFile, list, moveFileFolder, copyFileFolder, startSimpleNavi, stopSimpleNavi } from "@/api/datamanagement";
import ZUpload from '@/components/file/ZUpload.vue'
import useFileUpload from "@/components/file/file/useFileUpload";
import useHeaderStorageList from "@/components/header/useHeaderStorageList";
@ -88,23 +88,23 @@ function getProject() {
}
//
function scan() {
testDataScanById({id:projectId.value}).then((res:any)=>{
testDataScanById({ id: projectId.value }).then((res: any) => {
tonstatus()
})
}
const tonloading = ref(false)
const buttonmsg = ref('扫描试验数据')
function tonstatus(){
function tonstatus() {
//sao
obtaintestData({id:projectId.value}).then((res:any)=>{
if(res.msg == '1'){
obtaintestData({ id: projectId.value }).then((res: any) => {
if (res.msg == '1') {
tonloading.value = false
buttonmsg.value = '扫描试验数据'
}else{
} else {
tonloading.value = true
buttonmsg.value = '处理中...'
}
})
}
//
@ -129,7 +129,7 @@ function gettreedata() {
treeloading.value = false
if (treedata.value[0]) {
pathid.value = treedata.value[0].nodeId
filepath.value = res.data[0].path + res.data[0].nodeName +'/'
filepath.value = res.data[0].path + res.data[0].nodeName + '/'
nextTick(() => {
treeRef.value?.setCurrentKey(pathid.value);
});
@ -143,7 +143,7 @@ function gettreedata() {
const pathid = ref()
function handleNodeClick(data: any, node: any) {
pathid.value = data.nodeId
filepath.value = data.path + data.nodeName +'/'
filepath.value = data.path + data.nodeName + '/'
creatform.value.parentId = ''
patharr.value.length = 0
getdata()
@ -175,12 +175,12 @@ function addSubItem(row: any) {
}
projectForme.value.taskId = projectId.value
projectForme.value.parentId = row.nodeId
if(row.nodeId == '00'){
projectForme.value.path = '/'+taskName.value+'/'
}else{
if (row.nodeId == '00') {
projectForme.value.path = '/' + taskName.value + '/'
} else {
projectForme.value.path = filepath.value
}
title.value = "添加子节点"
}
//
@ -243,7 +243,7 @@ function delSubItem(row: any) {
)
.then(() => {
loading.value = true
deleteTsNodesById({ id: row.nodeId,path:row.path }).then((res: any) => {
deleteTsNodesById({ id: row.nodeId, path: row.path }).then((res: any) => {
if (res.code == 0) {
gettreedata()
ElMessage({
@ -518,10 +518,10 @@ function xiafilemony() {
}
)
.then(() => {
if( tableIdarr.value.some(item => item.type === 'FOLDER')){
ElMessage.warning('请勿选择文件夹')
return
}
if (tableIdarr.value.some(item => item.type === 'FOLDER')) {
ElMessage.warning('请勿选择文件夹')
return
}
tableIdarr.value.forEach((item: any) => {
if (item.url) {
downloadFileUseIframeMode(item.url);
@ -553,7 +553,7 @@ function decompression(row: any) {
zipObj.value.compressedName = removeSuffix(row.fileName)
zipParentid.value = row.parentId
filetsobj.value.path = row.workPath
zipObj.value.compressedPath ='/'+repstring(row.workPath)
zipObj.value.compressedPath = '/' + repstring(row.workPath)
zipType()
gettsfiles()
// ElMessageBox.confirm(
@ -701,7 +701,7 @@ function getFileSuffix(name: any) {
function openNode(row: any) {
loading.value = true
creatform.value.parentId = row.id
creatform.value.workPath = row.workPath + row.fileName + '/'
creatform.value.workPath = row.workPath + row.fileName + '/'
patharr.value.push({ fileName: row.fileName, id: row.id })
getdata()
}
@ -1012,7 +1012,7 @@ function copysomefile() {
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
repeatObj.type = '0'
copyhandArr.value.forEach((items: any) => {
repeatObj.oldpaths = items.workPath
repeatObj.oldpaths = items.workPath
repeatObj.newFileName.push(items.fileName)
})
repeatObj.newFileName = repeatObj.newFileName.join(',')
@ -1075,7 +1075,7 @@ async function submitrename(formEl: any) {
repeatObj.newPath = creatform.value.workPath ? creatform.value.workPath : filepath.value
repeatObj.parentId = creatform.value.parentId ? creatform.value.parentId : '00'
repeatObj.type = '1'
repeatObj.oldpaths = rowarr.value.workPath
repeatObj.oldpaths = rowarr.value.workPath
repeatObj.rename = (renameobj.value.fileName)
repeatObj.newFileName.push(rowarr.value.fileName)
repeatObj.newFileName = repeatObj.newFileName.join(',')
@ -1166,7 +1166,7 @@ function pathclick(row: any, index: any) {
patharr.value.splice(index + 1)
creatform.value.parentId = row.id
creatform.value.workPath = convertArrayToPath1(patharr.value)
creatform.value.workPath = convertArrayToPath1(patharr.value)
getdata()
}
//
@ -1206,7 +1206,7 @@ function zipFile(row: any) {
}
zipParentid.value = tableIdarr.value[0].parentId
filetsobj.value.path = tableIdarr.value[0].workPath
zipObj.value.compressedPath ='/' + repstring(tableIdarr.value[0].workPath)
zipObj.value.compressedPath = '/' + repstring(tableIdarr.value[0].workPath)
zipType()
gettsfiles()
}
@ -1233,8 +1233,8 @@ async function submitzip(formEl: any) {
zipObj.value.parentId = zipParentid.value
getdata()
zipfiles.value = false
if(zipObj.value.compressedPath.indexOf(filepath.value) == -1){
zipObj.value.compressedPath = zipObj.value.compressedPath
if (zipObj.value.compressedPath.indexOf(filepath.value) == -1) {
zipObj.value.compressedPath = zipObj.value.compressedPath
}
zipObj.value.path = filepath.value
compress(zipObj.value).then((res: any) => {
@ -1249,7 +1249,7 @@ async function submitzip(formEl: any) {
})
} else {
Decompression({ id: jiezip.value.id, parentId: zipParentid.value, decompressionPath: zipObj.value.compressedPath,path:filepath.value }).then((res: any) => {
Decompression({ id: jiezip.value.id, parentId: zipParentid.value, decompressionPath: zipObj.value.compressedPath, path: filepath.value }).then((res: any) => {
if (res.code == 0) {
ElMessage.success('解压成功')
getdata()
@ -1265,7 +1265,7 @@ async function submitzip(formEl: any) {
}
})
}
const filetableRef= ref()
const filetableRef = ref()
function zipClose() {
zipfiles.value = false
tableIdarr.value.length = 0
@ -1283,15 +1283,15 @@ const jiepatharr: any = ref([])
function gettsfiles() {
filetsobj.value.nodeId = pathid.value
filetsobj.value.taskId = projectId.value
filetsobj.value.path = filetsobj.value.path
filetsobj.value.path = filetsobj.value.path
listTsFiles(filetsobj.value).then((res: any) => {
listFilesarr.value = res.data
if (res.data[0]) {
jieFilearr.value = res.data[0]
let workpaht = repstring(jieFilearr.value.workPath)
jiepatharr.value = convertPathToArray(JSON.parse(JSON.stringify(workpaht)))
let workpaht = repstring(jieFilearr.value.workPath)
jiepatharr.value = convertPathToArray(JSON.parse(JSON.stringify(workpaht)))
creatform.value.parentId = res.data[0].parentId
creatform.value.workPath = jieFilearr.value.workPath
creatform.value.workPath = jieFilearr.value.workPath
}
})
@ -1299,9 +1299,9 @@ function gettsfiles() {
function openfiles(row: any) {
filetsobj.value.path = row.workPath + row.fileName + '/'
jieFilearr.value.workPath = filetsobj.value.path
let workpaht = repstring(jieFilearr.value.workPath)
let workpaht = repstring(jieFilearr.value.workPath)
jiepatharr.value = convertPathToArray(JSON.parse(JSON.stringify(workpaht)))
creatform.value.workPath = jieFilearr.value.workPath
creatform.value.workPath = jieFilearr.value.workPath
zipParentid.value = row.id
creatform.value.parentId = row.id
filetsobj.value.id = ''
@ -1325,11 +1325,11 @@ function fileSelection(row: any) {
}
function pathFile(index: any) {
jiepatharr.value.splice(index + 1)
filetsobj.value.path =convertArrayToPath(jiepatharr.value).indexOf(filepath.value) == -1 ? filepath.value + convertArrayToPath(jiepatharr.value):convertArrayToPath(jiepatharr.value)
filetsobj.value.path = convertArrayToPath(jiepatharr.value).indexOf(filepath.value) == -1 ? filepath.value + convertArrayToPath(jiepatharr.value) : convertArrayToPath(jiepatharr.value)
gettsfiles()
}
function pathqveding() {
zipObj.value.compressedPath = '/' + repstring(jieFilearr.value.workPath)
zipObj.value.compressedPath = '/' + repstring(jieFilearr.value.workPath)
creatform.value.parentId = ''
creatform.value.workPath = ''
visible.value = !visible.value
@ -1381,7 +1381,7 @@ function convertArrayToPath(segments: string[]): string {
//
if (segments.length === 0) return filepath.value
//
return segments.filter(Boolean).join('/') + '/'
return segments.filter(Boolean).join('/') + '/'
}
function convertArrayToPath1(segments: string[]): string {
@ -1574,8 +1574,8 @@ function testexcelClick(row: any) {
function texexceltClose() {
textedit1.value = false
}
function repstring(row:any){
return JSON.parse(JSON.stringify(row)).replace(filepath.value, "");
function repstring(row: any) {
return JSON.parse(JSON.stringify(row)).replace(filepath.value, "");
}
</script>
@ -1612,7 +1612,8 @@ function repstring(row:any){
</span>
</template>
</el-tree>
<el-button type="primary" @click="scan()" style="width: 100%;" :loading="tonloading" >{{ buttonmsg }}</el-button>
<el-button type="primary" @click="scan()" style="width: 100%;" :loading="tonloading">{{ buttonmsg
}}</el-button>
</div>
<div class="moveBtn" v-move>
<div class="moveBtn-line"></div>
@ -1652,7 +1653,7 @@ function repstring(row:any){
<el-button type="primary" :disabled="tableIdarr.length == 0" @click="zipFile(true)">压缩</el-button>
</div>
<el-table ref="filetableRef" v-loading="loading" :data="tableData" @selection-change="handleSelectionChange"
<el-table ref="filetableRef" v-loading="loading" :data="tableData" @selection-change="handleSelectionChange"
:header-cell-style="{ background: 'rgb(250 250 250)', height: '50px' }"
style="width: 100%; height: calc(66vh);margin-bottom: 20px;" border>
<el-table-column type="selection" width="40" />
@ -1696,8 +1697,8 @@ function repstring(row:any){
title="修改" style="cursor: pointer;">
<img v-if="scope.row.type == 'ZIP'" src="@/assets/images/jieyasuo.png" alt=""
@click="decompression(scope.row)" title="解压" style="cursor: pointer;">
<img src="@/assets/MenuIcon/xia1.png" alt="" @click="xiafile(scope.row)" v-if="scope.row.type != 'FOLDER'" title="下载"
style="cursor: pointer;">
<img src="@/assets/MenuIcon/xia1.png" alt="" @click="xiafile(scope.row)"
v-if="scope.row.type != 'FOLDER'" title="下载" style="cursor: pointer;">
<img src="@/assets/MenuIcon/lbcz_sc.png" alt="" @click="delfile(scope.row)" title="删除"
style="cursor: pointer;">
</span>
@ -1709,8 +1710,8 @@ function repstring(row:any){
</Page>
</section>
<el-dialog :title="title" v-model="frame" width="30%" :before-close="handleClose" top="30px" draggable :close-on-click-modal="false"
destroy-on-close>
<el-dialog :title="title" v-model="frame" width="30%" :before-close="handleClose" top="30px" draggable
:close-on-click-modal="false" destroy-on-close>
<el-form ref="ruleFormRef" style="max-width: 600px" :model="projectForme" :rules="moderules"
label-width="auto" class="demo-ruleForm" status-icon>
<el-form-item label="节点名称" prop="nodeName">
@ -1724,8 +1725,8 @@ function repstring(row:any){
</el-form-item>
</el-form>
</el-dialog>
<el-dialog :title="title" :close-on-click-modal="false" v-model="upfile" width="50%" :before-close="fileClose" top="30px" draggable
destroy-on-close>
<el-dialog :title="title" :close-on-click-modal="false" v-model="upfile" width="50%" :before-close="fileClose"
top="30px" draggable destroy-on-close>
<el-scrollbar :height="!fileObj.id ? '400px' : ''">
<el-form ref="ruleFormRef" style="max-width: 100%" :model="fileObj" :rules="modelarules"
label-width="auto" class="demo-ruleForm" status-icon>
@ -1752,8 +1753,8 @@ function repstring(row:any){
<el-button @click="fileClose">取消</el-button>
</div>
</el-dialog>
<el-dialog :close-on-click-modal="false" title="创建文件/文件夹" v-model="creat" width="30%" :before-close="creatClose" top="30px" draggable
destroy-on-close>
<el-dialog :close-on-click-modal="false" title="创建文件/文件夹" v-model="creat" width="30%" :before-close="creatClose"
top="30px" draggable destroy-on-close>
<el-form ref="creatFormRef" style="max-width: 100%" :model="creatObj" :rules="creatrules" label-width="auto"
class="demo-ruleForm" status-icon>
<el-form-item label="文件/文件夹名称:" prop="fileName">
@ -1775,8 +1776,8 @@ function repstring(row:any){
</el-dialog>
<!-- 复制粘贴弹框 -->
<el-dialog :close-on-click-modal="false" title="重命名或覆盖" v-model="copyjudge" width="60%" :before-close="copyClose" top="30px" draggable
destroy-on-close>
<el-dialog :close-on-click-modal="false" title="重命名或覆盖" v-model="copyjudge" width="60%"
:before-close="copyClose" top="30px" draggable destroy-on-close>
<div style="display: flex;justify-content: end;"><el-button :disabled="copyhandArr.length == 0"
type="primary" style="margin-bottom: 20px;" @click="copysomefile">覆盖({{ copyhandArr.length
}})</el-button>
@ -1801,8 +1802,8 @@ function repstring(row:any){
</el-table-column>
</el-table>
</el-dialog>
<el-dialog :close-on-click-modal="false" title="重命名" v-model="rename" width="30%" :before-close="RenameClose" top="30px" draggable
destroy-on-close>
<el-dialog :close-on-click-modal="false" title="重命名" v-model="rename" width="30%" :before-close="RenameClose"
top="30px" draggable destroy-on-close>
<el-form ref="renameFormRef" style="max-width: 100%" :model="renameobj" :rules="renameRules"
label-width="auto" class="demo-ruleForm" status-icon>
<el-form-item label="文件名称:" prop="fileName">
@ -1816,8 +1817,8 @@ function repstring(row:any){
</el-form-item>
</el-form>
</el-dialog>
<el-dialog :close-on-click-modal="false" :title="title" v-model="zipfiles" width="30%" :before-close="zipClose" top="30px" draggable
destroy-on-close>
<el-dialog :close-on-click-modal="false" :title="title" v-model="zipfiles" width="30%" :before-close="zipClose"
top="30px" draggable destroy-on-close>
<el-form ref="zipFormRef" style="max-width: 100%" :model="zipObj" :rules="ziprules" label-width="auto"
class="demo-ruleForm" status-icon>
<el-form-item v-if="zipzheng" label="压缩格式:" prop="compressedFormat">
@ -1867,7 +1868,8 @@ function repstring(row:any){
</el-table-column>
</el-table>
</div>
<div v-if="jieFilearr && jieFilearr.workPath">当前选中{{'/'+repstring(jieFilearr.workPath)}}</div>
<div v-if="jieFilearr && jieFilearr.workPath">
当前选中{{ '/' + repstring(jieFilearr.workPath) }}</div>
<div style="width: 100%;display: flex;justify-content: end;">
<el-button type="primary" @click="pathqveding">确定</el-button>
<el-button @click="pathqvxiao">取消</el-button>
@ -1890,8 +1892,8 @@ function repstring(row:any){
</el-form>
</el-dialog>
<!-- 差异性对比 -->
<el-dialog :close-on-click-modal="false" title="差异性对比" v-model="difference" width="60%" :before-close="differenceClose" top="30px" draggable
destroy-on-close>
<el-dialog :close-on-click-modal="false" title="差异性对比" v-model="difference" width="60%"
:before-close="differenceClose" top="30px" draggable destroy-on-close>
<div class="chabox" v-loading="diffloding">
<div class="chabox_border">
<div class="chabox_border_top">差异性检查结果</div>
@ -1982,12 +1984,13 @@ function repstring(row:any){
</el-dialog>
<!-- 组件预览 -->
<!-- 视频播放器 -->
<el-dialog :close-on-click-modal="false" draggable class="zfile-video-dialog" :destroy-on-close="true" v-model="dialogVideoVisible">
<el-dialog :close-on-click-modal="false" draggable class="zfile-video-dialog" :destroy-on-close="true"
v-model="dialogVideoVisible">
<video-player v-if="dialogVideoVisible" ref="videoPlayer" />
</el-dialog>
<!-- 文本编辑器 -->
<el-dialog :close-on-click-modal="false" draggable class="zfile-text-dialog zfile-dialog-mini-close" :destroy-on-close="true"
:title="filePreview.fileName" v-model="dialogTextVisible">
<el-dialog :close-on-click-modal="false" draggable class="zfile-text-dialog zfile-dialog-mini-close"
:destroy-on-close="true" :title="filePreview.fileName" v-model="dialogTextVisible">
<TextViewer :file-name="filePreview.fileName" :file-url="filePreview.url"
v-if="dialogTextVisible && filePreview.fileName.indexOf('.md') === -1" />
<MarkdownViewer :file-name="filePreview.fileName" :file-url="filePreview.url"
@ -1995,32 +1998,35 @@ function repstring(row:any){
</el-dialog>
<!-- pdf 在线预览 -->
<el-dialog :close-on-click-modal="false" draggable class="zfile-pdf-dialog" :title="filePreview.fileName" v-model="dialogPdfVisible">
<el-dialog :close-on-click-modal="false" draggable class="zfile-pdf-dialog" :title="filePreview.fileName"
v-model="dialogPdfVisible">
<PdfViewer :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialogPdfVisible" />
</el-dialog>
<!-- office 在线预览 -->
<el-dialog :close-on-click-modal="false" draggable class="zfile-office-dialog zfile-dialog-mini-close zfile-dialog-hidden-title"
:title="filePreview.fileName" v-model="dialogOfficeVisible">
<el-dialog :close-on-click-modal="false" draggable
class="zfile-office-dialog zfile-dialog-mini-close zfile-dialog-hidden-title" :title="filePreview.fileName"
v-model="dialogOfficeVisible">
<OfficeViewer :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialogOfficeVisible" />
</el-dialog>
<!-- 3d 在线预览 -->
<el-dialog :close-on-click-modal="false" draggable class="zfile-3d-dialog" :title="filePreview.fileName" v-model="dialog3dVisible">
<el-dialog :close-on-click-modal="false" draggable class="zfile-3d-dialog" :title="filePreview.fileName"
v-model="dialog3dVisible">
<Three3dPreview :file-name="filePreview.fileName" :file-url="filePreview.url" v-if="dialog3dVisible" />
</el-dialog>
<!-- 音频播放器 -->
<AudioPlayer></AudioPlayer>
<Viewfile v-if="isViewfile" :showTime="true" :title="title1" :url="ViewfileUrl" :type="fileType"
@update="CloseView" />
<el-dialog :close-on-click-modal="false" :title="title" v-model="textedit" :before-close="textClose" top="30px" draggable width="60%"
destroy-on-close>
<el-dialog :close-on-click-modal="false" :title="title" v-model="textedit" :before-close="textClose" top="30px"
draggable width="60%" destroy-on-close>
<textEdit :rowId="rowId" :fileUrl="fileUrl1" />
<!-- <txtexl :file-url="fileUrl" /> -->
</el-dialog>
<el-dialog :close-on-click-modal="false" :title="title" v-model="textedit1" :before-close="texexceltClose" top="30px" draggable width="60%"
destroy-on-close>
<el-dialog :close-on-click-modal="false" :title="title" v-model="textedit1" :before-close="texexceltClose"
top="30px" draggable width="60%" destroy-on-close>
<txtexl :file-url="fileUrl" :rowId="rowId" />
</el-dialog>