|
@@ -1,59 +1,23 @@
|
|
|
<template>
|
|
|
- <div v-if="!showEdit">
|
|
|
- <div class="bigBox">
|
|
|
- <!-- 功能 -->
|
|
|
- <div class="tabBox">
|
|
|
- <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" tab-position="top">
|
|
|
- <el-tab-pane label="我发起的" name="first" style="min-height:300px">
|
|
|
- <div>
|
|
|
- <!-- <el-button @click="newFileAdd">新建文件</el-button> -->
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <el-table @row-contextmenu="handleRowClick" :data="myEjoy" style="width: 100%;cursor: pointer;" @row-click="rowJoinClickFN">
|
|
|
- <!-- <el-table-column type="selection" width="55" /> -->
|
|
|
- <el-table-column label="名称" width="280">
|
|
|
- <template #default="scope">
|
|
|
- <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="juzhong">
|
|
|
- <img :src="getImage(scope.row.fileType)" alt="" class="juli">
|
|
|
- <el-tooltip class="box-item" effect="dark" placement="top"
|
|
|
- :show-after="1000" :content="scope.row.fileName">
|
|
|
- <span>{{ scope.row.fileName }}</span>
|
|
|
- </el-tooltip>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="createTime" label="时间" sortable width="280" />
|
|
|
- <el-table-column prop="fileType" label="类型" />
|
|
|
- <el-table-column label="大小">
|
|
|
- <template #default="scope">
|
|
|
- <span>
|
|
|
- {{ formatFileSize(scope.row.fileSize) }}
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <div class="setCli" v-if="cliCC" :style="{ left: xz - 100+ 'px', top: yz -150 + 'px' }">
|
|
|
- <template v-for="(item, index) in rightMenuData" :key="index">
|
|
|
- <p @click="chooseSet(item, index, 1)" class="chooseSet">
|
|
|
- <img :src="item.img" alt="">
|
|
|
- {{ item.name }}
|
|
|
- </p>
|
|
|
- </template>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-tab-pane>
|
|
|
- <el-tab-pane label="我参与的" name="second">
|
|
|
- <el-table :data="myPack" style="width: 100%;cursor: pointer;" @row-click="rowJoinClickFN">
|
|
|
+ <div class="bigBox">
|
|
|
+ <!-- 功能 -->
|
|
|
+ <div class="tabBox">
|
|
|
+ <el-tabs v-model="activeName" v-el-table-infinite-scroll="setPackScroll" :infinite-scroll-distance="30" :infinite-scroll-disabled="packTotal" class="demo-tabs" @tab-click="handleClick" tab-position="top">
|
|
|
+ <el-tab-pane label="我发起的" name="first" style="min-height:300px">
|
|
|
+ <div>
|
|
|
+ <!-- <el-button @click="newFileAdd">新建文件</el-button> -->
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <el-table @row-contextmenu="handleRowClick" height="calc(88vh - 40px - 15px)" :data="myPack" style="width: 100%;cursor: pointer;" @row-click="rowJoinClickFN">
|
|
|
<!-- <el-table-column type="selection" width="55" /> -->
|
|
|
<el-table-column label="名称" width="280">
|
|
|
<template #default="scope">
|
|
|
<span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="juzhong">
|
|
|
<img :src="getImage(scope.row.fileType)" alt="" class="juli">
|
|
|
-
|
|
|
<el-tooltip class="box-item" effect="dark" placement="top"
|
|
|
- :show-after="1000" :content="scope.row.fileName">
|
|
|
- <span>{{ scope.row.fileName }}</span>
|
|
|
- </el-tooltip>
|
|
|
+ :show-after="1000" :content="scope.row.fileName">
|
|
|
+ <span>{{ scope.row.fileName }}</span>
|
|
|
+ </el-tooltip>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -66,24 +30,63 @@
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="是否归档">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>
|
|
|
+ {{ scope.row.isFiled === "Y"?'已归档':'未归档' }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- </div>
|
|
|
- <!-- 新增文件盒子 -->
|
|
|
- <div>
|
|
|
- <AddFile v-if="newAdd" :newAdd="newAdd" @threeBe="threeBe"></AddFile>
|
|
|
- </div>
|
|
|
+ <div class="setCli" v-if="cliCC" :style="{ left: xz - 100+ 'px', top: yz -150 + 'px' }">
|
|
|
+ <template v-for="(item, index) in rightMenuData" :key="index">
|
|
|
+ <p @click="chooseSet(item, index, 1)" class="chooseSet">
|
|
|
+ <img :src="item.img" alt="">
|
|
|
+ {{ item.name }}
|
|
|
+ </p>
|
|
|
+ </template>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="我参与的" name="second">
|
|
|
+ <el-table :data="myEjoy" style="width: 100%;cursor: pointer;" @row-click="rowJoinClickFN">
|
|
|
+ <!-- <el-table-column type="selection" width="55" /> -->
|
|
|
+ <el-table-column label="名称" width="280">
|
|
|
+ <template #default="scope">
|
|
|
+ <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="juzhong">
|
|
|
+ <img :src="getImage(scope.row.fileType)" alt="" class="juli">
|
|
|
+
|
|
|
+ <el-tooltip class="box-item" effect="dark" placement="top"
|
|
|
+ :show-after="1000" :content="scope.row.fileName">
|
|
|
+ <span>{{ scope.row.fileName }}</span>
|
|
|
+ </el-tooltip>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="createTime" label="时间" sortable width="280" />
|
|
|
+ <el-table-column prop="fileType" label="类型" />
|
|
|
+ <el-table-column label="大小">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>
|
|
|
+ {{ formatFileSize(scope.row.fileSize) }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="是否归档">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>
|
|
|
+ {{ scope.row.isFiled === "Y"?'已归档':'未归档' }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </div>
|
|
|
+ <!-- 新增文件盒子 -->
|
|
|
+ <div>
|
|
|
+ <AddFile v-if="newAdd" :newAdd="newAdd" @threeBe="threeBe"></AddFile>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div v-else class="preview">
|
|
|
- <FileEdit
|
|
|
- :docId="clickRowId"
|
|
|
- :copyRow="copyRow"
|
|
|
- :historyPrew="historyPrew"
|
|
|
- :historycopyRow="historycopyRow"
|
|
|
- :onlyView="onlyView"
|
|
|
- ></FileEdit>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -98,7 +101,11 @@ import { ElMessage } from 'element-plus';
|
|
|
import archiveTray from "@/assets/images/archiveTray.png";
|
|
|
import {documentation}from "@/api/biz/actor.js"
|
|
|
import {getInfo}from "@/api/biz/info.js"
|
|
|
+import elTableInfiniteScroll from 'el-table-infinite-scroll'
|
|
|
export default {
|
|
|
+ directives: {
|
|
|
+ 'el-table-infinite-scroll': elTableInfiniteScroll
|
|
|
+ },
|
|
|
setup() {
|
|
|
const activeName = ref('first')
|
|
|
let collectImg = ref(true)
|
|
@@ -113,6 +120,10 @@ export default {
|
|
|
const showEdit = ref(false)
|
|
|
const thisLClickRow = ref()//当前左键的文件
|
|
|
const addFileTab = inject("addFileTab");
|
|
|
+ const ejoyPageNum = ref(1)
|
|
|
+ const packPageNum = ref(1)
|
|
|
+ const ejoyTotal = ref(true)
|
|
|
+ const packTotal = ref(true)
|
|
|
const clickRow = ref()
|
|
|
let xz = ref(0)
|
|
|
let yz = ref(0)
|
|
@@ -147,17 +158,65 @@ export default {
|
|
|
|
|
|
}
|
|
|
function getCountPeople() {
|
|
|
- fileCount.myCount({}).then(res => {
|
|
|
- myEjoy.value = res.rows
|
|
|
+ packTotal.value = true
|
|
|
+ const query = `pageSize=20&pageNum=${packPageNum.value}`
|
|
|
+ fileCount.myCount(query).then(res => {
|
|
|
+ myPack.value = res.rows
|
|
|
+ if(res.rows.length <res.total){
|
|
|
+ packTotal.value = false
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
function getMyJoin() {
|
|
|
- fileCount.myJoin({}).then(res => {
|
|
|
- myPack.value = res.rows
|
|
|
+ ejoyTotal.value = true
|
|
|
+ const query = `pageSize=20&pageNum=${ejoyPageNum.value}`
|
|
|
+ console.log('query',query);
|
|
|
+ fileCount.myJoin(query).then(res => {
|
|
|
+ myEjoy.value = res.rows
|
|
|
+ if(res.rows.length <res.total){
|
|
|
+ ejoyTotal.value = false
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
+ const setJoinScroll = ()=>{
|
|
|
+ // console.log('btm');
|
|
|
+ ejoyPageNum.value = ejoyPageNum.value + 1
|
|
|
+ const query = `pageSize=20&pageNum=${ejoyPageNum.value}`
|
|
|
+ // -------------先禁止掉事件 定时器1秒钟后才能再次触发
|
|
|
+ ejoyTotal.value = true
|
|
|
+ fileCount.myJoin(query).then(res => {
|
|
|
+ const newarr = toRaw(myEjoy.value).concat(res.rows)
|
|
|
+ console.log('newarr', newarr);
|
|
|
+ myEjoy.value = JSON.parse(JSON.stringify(newarr))
|
|
|
+ if(newarr.length <res.total){
|
|
|
+ //获取后的数量<total就可以再次获取
|
|
|
+ setTimeout(()=>{
|
|
|
+ ejoyTotal.value = false
|
|
|
+ },1000)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ const setPackScroll = ()=>{
|
|
|
+ // console.log('btm');
|
|
|
+ packPageNum.value = packPageNum.value + 1
|
|
|
+ const query = `pageSize=20&pageNum=${packPageNum.value}`
|
|
|
+ // -------------先禁止掉事件 定时器1秒钟后才能再次触发
|
|
|
+ packTotal.value = true
|
|
|
+ fileCount.myCount(query).then(res => {
|
|
|
+ const newarr = toRaw(myPack.value).concat(res.rows)
|
|
|
+ console.log('newarr', newarr);
|
|
|
+ myPack.value = JSON.parse(JSON.stringify(newarr))
|
|
|
+ if(newarr.length <res.total){
|
|
|
+ //获取后的数量<total就可以再次获取
|
|
|
+ setTimeout(()=>{
|
|
|
+ packTotal.value = false
|
|
|
+ },1000)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
function handleClick(data, e) {
|
|
|
- console.log(data, e, 'tab');
|
|
|
+ // console.log(data, e, 'tab');
|
|
|
}
|
|
|
function getImage(file) {
|
|
|
if (file === '.txt') {
|
|
@@ -270,7 +329,13 @@ export default {
|
|
|
closeRMenu,
|
|
|
cliCC,
|
|
|
chooseSet,
|
|
|
- rowJoinClickFN
|
|
|
+ rowJoinClickFN,
|
|
|
+ ejoyPageNum,
|
|
|
+ packPageNum,
|
|
|
+ ejoyTotal,
|
|
|
+ packTotal,
|
|
|
+ setJoinScroll,
|
|
|
+ setPackScroll
|
|
|
}
|
|
|
},
|
|
|
components:{
|