瀏覽代碼

Merge branch 'liuqiang' into v3

liuQiang 1 年之前
父節點
當前提交
1c0797a3a7

+ 3 - 5
src/api/fileCount/fileCount.js

@@ -25,17 +25,15 @@ function addActor(num, data) {
 // 我发起的
 function myCount(data) {
     return request({
-        url: `/biz/actor/initiation`,
-        method: "get",
-        params: data,
+        url: `/biz/actor/initiation?${data}`,
+        method: "get"
     })
 }
 // 我参与的
 function myJoin(data) {
     return request({
-        url: `/biz/actor/participation`,
+        url: `/biz/actor/participation?${data}`,
         method: "get",
-        params: data,
     })
 }
 function createFiles(data) {

+ 0 - 5
src/router/index.js

@@ -91,11 +91,6 @@ export const constantRoutes = [{
 		path: 'reindex',
 		component: () => import('@/views/liveChat/index.vue'),
 		name: 'reindex',
-		meta: {
-			title: '返回',
-			icon: 'dashboard',
-			affix: true
-		},
 	},
 	{
 	    path: '/user/profile',

+ 12 - 0
src/views/department/MyFile.vue

@@ -910,6 +910,12 @@ export default {
             downLoadfile()
             }
             if (row.name === '收藏') {
+                if(clickRow.value.isFavorite === "Y"){
+                return ElMessage({
+                            type: "error",
+                            message: "请勿重复收藏"
+                         })
+                }
                 collects.value = true
             }
             if (row.name === '在线编辑') {
@@ -1428,6 +1434,12 @@ export default {
         };
         // 文件夹收藏事件
         const collectFolder = () => {
+             if(clickRow.value.isFavorite === "Y"){
+                return ElMessage({
+                            type: "error",
+                            message: "请勿重复收藏"
+                         })
+            }
             isFolder.value = 'Y'
             // clickRow.value = thisFolder.value
             // thisFolder.value = ''

+ 1 - 1
src/views/login.vue

@@ -162,7 +162,7 @@ import { ElMessage } from "element-plus";
 import Cookies from "js-cookie";
 import { encrypt, decrypt } from "@/utils/jsencrypt";
 import useUserStore from "@/store/modules/user";
-import { sm3 } from "sm-crypto";
+import { sm3 ,sm2} from "sm-crypto";
 
 const userStore = useUserStore();
 const route = useRoute();

+ 14 - 0
src/views/myfile/MyFile.vue

@@ -971,6 +971,13 @@ export default {
                 downLoadfile()
             }
             if (row.name === '收藏') {
+            //    console.log('clickRow',clickRow.value);
+               if(clickRow.value.isFavorite === "Y"){
+                return ElMessage({
+                            type: "error",
+                            message: "请勿重复收藏"
+                         })
+                }
                 collects.value = true
             }
             if (row.name === '在线编辑') {
@@ -1551,6 +1558,13 @@ export default {
         };
         // 文件夹收藏事件
         const collectFolder = () => {
+            // console.log('clickRow',clickRow.value);
+            if(clickRow.value.isFavorite === "Y"){
+                return ElMessage({
+                            type: "error",
+                            message: "请勿重复收藏"
+                         })
+            }
             isFolder.value = 'Y'
             // clickRow.value = thisFolder.value
             // thisFolder.value = ''

+ 136 - 71
src/views/myjoin/MyJoin.vue

@@ -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:{

+ 12 - 0
src/views/publicment/MyFile.vue

@@ -917,6 +917,12 @@ export default {
             downLoadfile()
             }
             if (row.name === '收藏') {
+                if(clickRow.value.isFavorite === "Y"){
+                return ElMessage({
+                            type: "error",
+                            message: "请勿重复收藏"
+                         })
+                        }
                 collects.value = true
             }
             if (row.name === '在线编辑') {
@@ -1431,6 +1437,12 @@ export default {
         };
         // 文件夹收藏事件
         const collectFolder = () => {
+             if(clickRow.value.isFavorite === "Y"){
+                return ElMessage({
+                            type: "error",
+                            message: "请勿重复收藏"
+                       })
+            }
             isFolder.value = 'Y'
             // clickRow.value = thisFolder.value
             // thisFolder.value = ''