Browse Source

Merge branch 'v3' of ssh://94.191.59.107:10222/houwenfeng/cloudfile-ui into v3

wukai 2 years ago
parent
commit
0a80a9071c

+ 17 - 15
src/api/fileCount/fileCount.js

@@ -1,40 +1,42 @@
 import request from '../../utils/request'
-// 查询文档协作列表
+// 查询文档协作人员
+// data为docid
 function getActor(data){
     return request({
-        url:`/biz/actor/list`,
+        url:`/biz/actor/${data}`,
         method:"get",
         params:data
     })
 }
-// 修改文档协作列表
-function editActor(data){
+// 归档
+function lockActor(data){
     return request({
-        url:`/biz/actor`,
+        url:`/biz/actor${data}`,
         method:"put",
         data,
     })
 }
-// 删除文档协作列表
+// 添加协作人员
 function delActor(data){
     return request({
         url:`/biz/actor/${data}`,
-        method:"delete"
+        method:"post"
     })
 }
-// 新增文档协作列表
+// 我发起的
 function addActor(data){
     return request({
-        url:`/biz/actor`,
-        method:"post",
-        data,
+        url:`/biz/actor/initiation`,
+        method:"get",
+        params:data,
     })
 }
-// 获取详细信息
+// 我参与的
 function getActorById(data){
     return request({
-        url:`/biz/actor/${data}`,
-        method:"get"
+        url:`/biz/actor/participation`,
+        method:"get",
+        params:data,
     })
 }
 export default{
@@ -42,5 +44,5 @@ export default{
     getActorById,
     addActor,
     delActor,
-    editActor,
+    lockActor,
 }

+ 2 - 2
src/api/fileShare/fileShare.js

@@ -2,14 +2,14 @@ import request from '../../utils/request'
 // 获取已分享的人员
 function getSharePeople(data) {
     return request({
-        url: `/biz/info/share/${data}`,
+        url: `/biz/share/${data}`,
         method: 'get',
     })
 }
 // 新增分享人员
 function addSharePeople(num,data) {
     return request({
-        url: `/biz/info/share/${num}`,
+        url: `/biz/share/${num}`,
         method: "post",
         data
     })

BIN
src/assets/images/Frame427319159.png


BIN
src/assets/images/FrameYun.png


BIN
src/assets/images/light_boder.png


+ 74 - 24
src/components/IdentifyFont/IdentifyFont.vue

@@ -3,7 +3,7 @@
   <div class="container">
     <div v-if="thisStep === 'start'" class="up_box">
       <div class="left_box">
-        <div class="upimg_box">
+        <div class="upimg_box boder_box">
           <!-- TODO 拖拽设置不生效问题 ,但是测试那里可以实现拖拽,离大谱-->
           <el-upload
             v-if="!showImg"
@@ -14,7 +14,7 @@
             :on-success="handleAvatarSuccess"
             :before-upload="beforeUp"
           >
-            <img src="@/assets/images/add.png" class="avatar" />
+            <img src="@/assets/images/Frame427319159.png" class="avatar" />
             <span>将图片拖入框内/点击按钮上传图片</span>
           </el-upload>
           <div v-else class="img_show">
@@ -34,7 +34,7 @@
         </div>
       </div>
       <div class="right_box">
-        <div class="upimg_box">
+        <div class="upimg_box boder_box">
           <el-upload
             disabled
             class="avatar-uploader"
@@ -42,7 +42,7 @@
             :show-file-list="false"
             :on-success="handleAvatarSuccess"
           >
-            <img src="@/assets/images/add.png" class="avatar" />
+            <img src="@/assets/images/FrameYun.png" class="avatar" />
             <span>点击按钮上传图片</span>
           </el-upload>
         </div>
@@ -54,14 +54,22 @@
         <img :src="toRaw(showImg)" class="avatar" />
         <div class="light"></div>
       </div>
+      <div class="text_box">
+        <span>请耐心等待扫描完成</span>
+        <Loading :small="true"></Loading>
+      </div>
     </div>
     <div v-if="thisStep === 'end'" class="end_box">
       <div class="left_box">
-        <div class="upimg_box">
-          <div class="img_show">
-            <img :src="toRaw(showImg)" class="avatar" />
+        <div class="boder_box">
+          <div class="title">原始图片</div>
+          <div class="upimg_box">
+            <div class="img_show">
+              <img :src="toRaw(showImg)" class="avatar" />
+            </div>
           </div>
         </div>
+
         <div class="sunmit_btn">
           <!-- <el-upload
                   class="avatar-uploader"
@@ -75,14 +83,17 @@
         </div>
       </div>
       <div class="right_box">
-        <div class="upimg_box">
-          <el-scrollbar>
-            <div class="text_box">
-              {{ textData }}
-            </div>
-          </el-scrollbar>
+        <div class="boder_box">
+          <div class="title">识别结果</div>
+          <div class="upimg_box">
+            <el-scrollbar>
+              <div class="text_box">
+                {{ textData }}
+              </div>
+            </el-scrollbar>
+          </div>
         </div>
-        <div class="sunmit_btn copy-qb" @click="copyQbUrl()">全部复制</div>
+        <div class="sunmit_btn copy-qb" @click="copyQbUrl()">复制结果</div>
       </div>
     </div>
   </div>
@@ -99,6 +110,7 @@
 import { onMounted, ref, toRaw, watch } from "vue";
 import { ElMessage } from "element-plus";
 import Clipboard from "clipboard";
+import Loading from "@/components/Loading/Loading.vue";
 import PicTree from "@/components/PicTree/PicTree.vue"; //选择文件发送的列表
 import { picTree } from "@/api/search/search.js";
 import { ocrRemark, preview } from "@/api/common/common.js";
@@ -223,11 +235,23 @@ const reClick = () => {
     justify-content: center;
   }
   .left_box {
-    width: 30%;
+    width: 45%;
     display: flex;
     flex-direction: column;
     align-items: center;
     margin-right: 48px;
+    .boder_box {
+      border: 1px solid #c1cce3;
+    }
+    .title {
+      width: 100%;
+      height: 40px;
+      background: #ebeff6;
+      line-height: 40px;
+      font-size: 16px;
+      font-weight: 400;
+      text-align: center;
+    }
     .img_show {
       width: 100%;
       height: 100%;
@@ -243,7 +267,7 @@ const reClick = () => {
     .upimg_box {
       width: 100%;
       height: 500px;
-      border: 1px solid #c1cce3;
+
       display: flex;
       align-items: center;
       justify-content: center;
@@ -262,14 +286,26 @@ const reClick = () => {
     }
   }
   .right_box {
-    width: 30%;
+    width: 45%;
     display: flex;
     flex-direction: column;
     align-items: center;
+    .boder_box {
+      border: 1px solid #c1cce3;
+    }
+    .title {
+      width: 100%;
+      height: 40px;
+      background: #ebeff6;
+      line-height: 40px;
+      font-size: 16px;
+      font-weight: 400;
+      text-align: center;
+    }
     .upimg_box {
       width: 100%;
       height: 500px;
-      border: 1px solid #c1cce3;
+      // border: 1px solid #c1cce3;
       display: flex;
       align-items: center;
       justify-content: center;
@@ -287,6 +323,7 @@ const reClick = () => {
       text-align: center;
     }
     .text_box {
+      padding:16px ;
       font-size: 14px;
       font-weight: 500;
       color: #000000;
@@ -296,27 +333,40 @@ const reClick = () => {
   .load-box {
     display: flex;
     align-items: center;
-    justify-content: center;
+    // justify-content: center;
+    flex-direction: column;
+    .text_box{
+      width: 100%;
+      margin-top: 20px;
+      color: #06286C;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      span{
+        margin-right: 15px;
+      }
+    }
     .light_box {
       width: 500px;
       height: 500px;
-      background-image: url("@/assets/images/light.png");
+      background-image: url("@/assets/images/light_boder.png");
       background-repeat: no-repeat;
       background-size: contain;
       position: relative;
       display: flex;
       align-items: center;
       justify-content: center;
+      padding:0 15px;
       img {
         width: 100%;
         // height: 100%;
       }
       .light {
-        width: 100%;
+        width: calc(100% - 30px);
         height: 1px;
         position: absolute;
         top: 0;
-        left: 0;
+        left: 15px;
         right: 0;
         bottom: 0;
         background-color: rgba(0, 255, 255, 0.7);
@@ -356,8 +406,8 @@ const reClick = () => {
   display: flex;
   flex-direction: column;
   img {
-    width: 40px;
-    height: 40px;
+    width: 220;
+    height: 220px;
     margin-bottom: 16px;
   }
   span {

+ 134 - 0
src/components/Loading/Loading.vue

@@ -0,0 +1,134 @@
+<template>
+      <div class="loading-medium">
+        <span v-for="item in 8" :key="item"></span>
+      </div>
+</template>
+
+<script setup>
+</script>
+
+<style lang="scss" scoped>
+/* 动画 */
+@keyframes load {
+    0% {
+        transform: scale(1);
+        background-color: #efefef;
+    }
+    50% {
+        transform: scale(1.2);
+        background-color: #2E6BC8;
+    }
+    100% {
+        transform: scale(1);
+        background-color: #efefef;
+    }
+}
+/* 
+    小:.loading-small
+    中:.loading-medium
+    大:.loading-large
+*/
+.loading-medium {
+    width: 30px;
+    height: 30px;
+    position: relative;
+}
+.loading-medium.loading-small {
+    width: 25px;
+    height: 25px;
+}
+
+.loading-medium span {
+    position: absolute;
+    width: 5px;
+    height: 5px;
+    background-color: #efefef;
+    border-radius: 50%;
+    animation: load 1s linear infinite;
+}
+.loading-medium.loading-small span {
+    width: 4px;
+    height: 4px;
+}
+
+/* 每个圈圈的位置设置,和动画执行的时间 */
+.loading-medium span:first-child {
+    top: 0;
+    left: 50%;
+    margin-left: -2.5px;
+    margin-top: -2.5px;
+    animation-delay: 0s;
+}
+
+.loading-medium span:nth-child(2) {
+    top: 25%;
+    left: 25%;
+    margin-top: -6.5px;
+    margin-left: -7px;
+    animation-delay: 0.125s;
+}
+.loading-medium.loading-small span:nth-child(2) {
+    margin-top: -5px;
+    margin-left: -5px;
+}
+
+.loading-medium span:nth-child(3) {
+    top: 50%;
+    left: 0;
+    margin-top: -2.5px;
+    margin-left: -2.5px;
+    animation-delay: 0.25s;
+}
+
+.loading-medium span:nth-child(4) {
+    bottom: 25%;
+    left: 25%;
+    margin-left: -7px;
+    margin-bottom: -6.5px;
+    animation-delay: 0.375s;
+}
+.loading-medium.loading-small span:nth-child(4) {
+    margin-bottom: -5px;
+    margin-left: -5px;
+}
+
+.loading-medium span:nth-child(5) {
+    bottom: 0;
+    left: 50%;
+    margin-left: -2.5px;
+    margin-bottom: -2.5px;
+    animation-delay: 0.5s;
+}
+
+.loading-medium span:nth-child(6) {
+    bottom: 25%;
+    right: 25%;
+    margin-bottom: -6.5px;
+    margin-right: -7px;
+    animation-delay: 0.625s;
+}
+.loading-medium.loading-small span:nth-child(6) {
+    margin-bottom: -5px;
+    margin-right: -5px;
+}
+
+.loading-medium span:nth-child(7) {
+    top: 50%;
+    right: 0;
+    margin-top: -2.5px;
+    margin-right: -2.5px;
+    animation-delay: 0.75s;
+}
+
+.loading-medium span:last-child {
+    top: 25%;
+    right: 25%;
+    margin-top: -6.5px;
+    margin-right: -7px;
+    animation-delay: 0.875s;
+}
+.loading-medium.loading-small span:last-child {
+    margin-top: -5px;
+    margin-right: -5px;
+}
+</style>

+ 1 - 1
src/layout/indexCommon.vue

@@ -181,7 +181,7 @@ const toSearch = async () => {
     // console.log("res", res);
     // console.log("router", route.path);
     if (route.path != "/search") {
-      router.replace({
+      router.push({
         path: "/search",
         query: {
           searchData: JSON.stringify(res),

+ 46 - 34
src/views/myfile/MyFile.vue

@@ -217,7 +217,7 @@
                                 </template>
                             </div>
                             <div class="setCli1" v-if="anyP">
-                                <p @click="chooseSet1()" class="">
+                                <p @click="chooseSet1(0)" class="">
                                     <img src="../../assets/images/user.png" alt="">
                                     选择人员
                                 </p>
@@ -235,7 +235,8 @@
                 <div>
                     <el-button @click="editOnline = true">返回</el-button>
                 </div>
-                <FileEdit :docId="clickRowId" :copyRow="copyRow" :historyPrew="historyPrew" :historycopyRow="historycopyRow"></FileEdit>
+                <FileEdit :docId="clickRowId" :copyRow="copyRow" :historyPrew="historyPrew"
+                    :historycopyRow="historycopyRow"></FileEdit>
             </div>
             <!-- 扩容弹窗 -->
             <div>
@@ -395,22 +396,17 @@
             </div>
             <!-- 穿梭框 -->
             <div>
-                <TransferModal v-if="thanks" :thanks="thanks" :clickRowId="clickRowId" @getCback="getCback"></TransferModal>
+                <TransferModal v-if="thanks" :thanks="thanks" :clickRowId="clickRowId" :workOrEdit="workOrEdit"
+                    @getCback="getCback"></TransferModal>
             </div>
         </div>
     </div>
     <!-- 图片预览 -->
     <!-- 历史版本 -->
-    <historyList
-    :openFile="openForwardFile"
-    :docId="clickRowId"
-    :name="nameForm.name"
-    :copyRow="copyRow"
-    @close="openForwardFile = false"
-    :fileUserTreeData="fileUserTreeData.data"
-    @changeMsgClose="changeMsgClose"
-  ></historyList>
-  <!-- 历史版本 -->
+    <historyList :openFile="openForwardFile" :docId="clickRowId" :name="nameForm.name" :copyRow="copyRow"
+        @close="openForwardFile = false" :fileUserTreeData="fileUserTreeData.data" @changeMsgClose="changeMsgClose">
+    </historyList>
+    <!-- 历史版本 -->
 </template>
 
 <script>
@@ -486,7 +482,7 @@ export default {
         let copyOrMove = ref(0)//0代表复制,1代表移动
         let sortNum = ref(0)
         const openForwardFile = ref(false)   //历史版本展示
-        const historyPrew=ref(false)
+        const historyPrew = ref(false)
         const fileUserTreeData = reactive({ data: {} });
         let boserForm = ref({
             spaceId: "",//空间id
@@ -634,6 +630,7 @@ export default {
             },
 
         ])
+        let workOrEdit = ref(0)
         const showPreview = ref(false)//控制图片预览组件显示
         const previewData = ref()//需要预览的文件的数据
         const router = useRouter(); //注册路由
@@ -755,13 +752,14 @@ export default {
             this.askTo = false
         }
         //mouse弹框
-        async function chooseSet(row, num) {
+        async function chooseSet(row, index, num) {
             if (row.name == '在线编辑' || row.name == '协作') {
                 cliCC.value = true
             } else {
                 cliCC.value = false
             }
             if (row.name == '分享') {
+                workOrEdit.value = num
                 thanks.value = true
             } else {
                 thanks.value = false
@@ -811,9 +809,9 @@ export default {
             if (row.name === '文字识别') {
                 router.push({
                     path: '/identifyFont',
-                    query:{
-                        fileId:copyFileId.value,
-                        fileType:copyFileType.value
+                    query: {
+                        fileId: copyFileId.value,
+                        fileType: copyFileType.value
                     }
                 })
             }
@@ -831,7 +829,8 @@ export default {
                 openForwardFile.value = true
             }
         }
-        function chooseSet1() {
+        function chooseSet1(num) {
+            workOrEdit.value = num
             thanks.value = true
             anyP.value = false
         }
@@ -1150,15 +1149,15 @@ export default {
         }
         //历史版本
         const forwardTreeData = reactive({ data: {} });
-        const historycopyRow=ref({})
-        function changeMsgClose(val,item) { 
-            if(val){              
-                historycopyRow.value=item
+        const historycopyRow = ref({})
+        function changeMsgClose(val, item) {
+            if (val) {
+                historycopyRow.value = item
                 editOnline.value = false
                 cliCC.value = false
-                historyPrew.value=true
+                historyPrew.value = true
             }
-            openForwardFile.value=val
+            openForwardFile.value = val
         }
 
         //对mouseCli数组进行筛选,实现菜单的区分显示
@@ -1166,10 +1165,10 @@ export default {
             const typeArr = ['.png','.jpg','.jpeg','.JPG','.mp3','.mp4','.pdf']
             const imgTypeArr = ['.png','.jpg','.jpeg','.JPG']
             let arr = []
-            if(!typeArr.includes(copyFileType.value)){
-                arr = mouseCli.value.filter(item=>item.name !== "预览")
-            }else{
-                arr = mouseCli.value.filter(item=>item.name !== "在线编辑" && item.name !== "协作" && item.name !== "历史版本")
+            if (!typeArr.includes(copyFileType.value)) {
+                arr = mouseCli.value.filter(item => item.name !== "预览")
+            } else {
+                arr = mouseCli.value.filter(item => item.name !== "在线编辑" && item.name !== "协作" && item.name !== "历史版本")
             }
             if(!imgTypeArr.includes(copyFileType.value)){
                 arr = arr.filter(item=>item.name !== "文字识别")
@@ -1180,6 +1179,9 @@ export default {
             if (cliCC.value) {
                 cliCC.value = false
             }
+            if (anyP) {
+                anyP.value = false
+            }
         } 
         // 文件夹右键事件
         const folderRClick = (row,col,e) => {
@@ -1330,7 +1332,13 @@ export default {
             folderleft,
             thisFolder,
             folderRClick,
-            closeRMenu
+            closeRMenu,
+            //历史版本=========
+            fileUserTreeData,
+            thanks,
+            getCback,
+            mouseClick,
+            workOrEdit,
         }
 
     },
@@ -1390,7 +1398,7 @@ p {
     width: 88px;
     height: 112px;
     text-align: center;
-    margin-left: 12px;
+    margin-left: 5px;
     margin-top: 5px;
     position: relative;
 }
@@ -1508,7 +1516,7 @@ p {
     width: 156px;
     max-height: 380px;
     position: absolute;
-    top: 20px;
+    top: -70px;
     left: 300px;
     flex-wrap: 400;
     background-color: white;
@@ -1540,7 +1548,7 @@ p {
     // display: flex;
     // align-items: center;
     // position: relative;
-    img{
+    img {
         margin-right: 4px;
         vertical-align: middle;
     }
@@ -1560,7 +1568,7 @@ p {
 }
 
 :deep(.el-collapse-item__content) {
-    height: 235px;
+    // height: 235px;
     overflow-y: auto;
 }
 
@@ -1607,4 +1615,8 @@ p {
     height: 100%;
     border-bottom: none;
 }
+
+:deep(.el-collapse-item__wrap) {
+    height: 300px;
+}
 </style>

+ 45 - 21
src/views/myfile/modalComponebts/Transfer.vue

@@ -19,8 +19,8 @@
                             <span style="color: red;font-size: 14px;float: right;">清空</span>
                         </div>
                         <div class="needLog">
-                            <el-tag v-for="(item, index) in chooseTagData" :key="index" class="tagtag" 
-                                @close="handleClose(item)">
+                            <el-tag v-for="(item, index) in chooseTagData" :key="index" class="tagtag"
+                                :closable="lastPeople" @close="handleClose(item)">
                                 {{ item.userName }}
                             </el-tag>
                         </div>
@@ -54,12 +54,17 @@ export default {
         clickRowId: {
             type: Number,
             required: true
+        },
+        workOrEdit: {
+            type: Number,
+            required: true
         }
     },
     setup(props, { emit }) {
         let { backToFather, sureBackFather } = toRefs(props)
         let result = props.thanks
         let dees = props.clickRowId
+        let feeh = props.workOrEdit
         let transferModals = ref(false)
         let allTreeData = ref([])
         let allTreeProps = {
@@ -73,6 +78,7 @@ export default {
         let allBag = ref('')
         let needTagData = ref([])
         let backScreen = ref([])
+        let lastPeople = ref(false)
         function allTeam() {
             if (result) {
                 transferModals.value = result
@@ -91,27 +97,41 @@ export default {
                 // 选择操作,将数据添加到 needTagData 中
                 chooseTagData.value.push({ userId: id, userName: label });
             }
+            if (chooseTagData.value.length === 1) {
+                lastPeople.value = true
+            } else {
+                lastPeople.value = false
+            }
         }
         // 确认分享
         function sureShare() {
-            // console.log(clickRowId);
-            if (chooseTagData.value.length === 0) {
-                ElMessage({
-                    type: "error",
-                    message: "你还未选择人员!"
-                })
-            } else {
-                fileShare.addSharePeople(dees, chooseTagData.value).then(res => {
-                    if (res.code === 200) {
-                        ElMessage({
-                            message: "分享成功",
-                            type: "success"
-                        })
-                        transferModals.value = false
-                        emit("getCback", transferModals.value)
-                    }
-                })
+            if (feeh === 1) {
+                if (chooseTagData.value.length === 0) {
+                    ElMessage({
+                        type: "error",
+                        message: "你还未选择人员!"
+                    })
+                } else {
+                    console.log(chooseTagData.value, 'value');
+                    let arr = []
+                    arr = chooseTagData.value.map(item => {
+                        return item.userId
+                    })
+                    fileShare.addSharePeople(dees, arr).then(res => {
+                        if (res.code === 200) {
+                            ElMessage({
+                                message: "分享成功",
+                                type: "success"
+                            })
+                            transferModals.value = false
+                            emit("getCback", transferModals.value)
+                        }
+                    })
+                }
+            }else{
+               return
             }
+
         }
         // 获取用户树
         function getAllUser() {
@@ -149,11 +169,13 @@ export default {
         function handleClose(tag) {
             chooseTagData.value.splice(chooseTagData.value.indexOf(tag), 1);
             // 从标签中获取 userId
-            const userId = tag.userId;
+            // const userId = tag.userId;
             // 从 chooseTagData 中筛选出不包含当前 userId 的标签
-            chooseTagData.value = chooseTagData.value.filter(item => item.userId !== userId)
+            // chooseTagData.value = chooseTagData.value.filter(item => item.userId !== userId)
+
         }
         onMounted(() => {
+            console.log(feeh, 'eeh');
             allTeam()
             getAllUser()
         })
@@ -173,6 +195,8 @@ export default {
             needTagData,
             handleClose,
             backScreen,
+            lastPeople,
+            feeh,
             backToFather: getBack,
         }
     }

+ 7 - 2
src/views/search/index.vue

@@ -2,7 +2,7 @@
   <div class="container">
     <!-- 搜索标题 -->
     <div class="searchTitle">
-      <el-icon>
+      <el-icon @click="goBack">
         <ArrowLeftBold />
       </el-icon>
       <div class="colLine"></div>
@@ -129,7 +129,7 @@
 import { onMounted, ref, toRaw, inject } from "vue";
 import { search } from "@/api/search/search.js";
 import { flieSearch } from "@/api/search/search.js";
-import { useRoute } from "vue-router";
+import { useRoute,useRouter } from "vue-router";
 const searchFor = ref("1"); //搜索范围
 const searchType = ref("doc"); //搜索对象
 const checkState = ref(false); //勾选框状态
@@ -140,6 +140,7 @@ const total = ref(0); //数据总条数
 const searchText = ref(""); //搜索ipt的值
 const baseData = ref(); //搜索出的原始数据
 const isAsc = ref("asc");
+const router = useRouter(); //注册路由
 
 
 const reload = inject("reload");
@@ -196,6 +197,10 @@ const changeSort = async () => {
 const fliterListData = (dataList) => {
   return dataList;
 };
+// 回退
+const goBack = ()=>{
+  router.back()
+}
 // 设置图标
 const setIcon = (fileType) => {
   switch (fileType) {