liuQiang 1 tahun lalu
induk
melakukan
75493ebefb

+ 1 - 1
src/views/myfile/MyFile.vue

@@ -311,7 +311,7 @@
                                         </el-table-column>
                                     </el-table>
                                     <PalaceGridFile v-else :getAllTop="getAllTop" @navBack="navBack"
-                                        @lastBB="lastBB" @onlineCase="onlineCase" @shareBack="shareBack" :thisFolder="thisFolder" :fileList="fileList"></PalaceGridFile>
+                                        @lastBB="lastBB" @handleRowClick="handleRowClick" @onlineCase="onlineCase" @shareBack="shareBack" :thisFolder="thisFolder" :fileList="fileList"></PalaceGridFile>
                                 </el-collapse-item>
                             </el-collapse>
                             <div class="setCli" v-if="cliCC" :style="{ left: xz + 'px', top: yz - 260 + 'px' }">

+ 4 - 3
src/views/myfile/components/FileEdit.vue

@@ -68,8 +68,8 @@ export default {
     let show = ref(true);
     let newObj = ref({});
     function oo(docId, isEdit,isCopy,history,fileId) {
-      console.log('uid',uid);
-      if (docId && !history) {     
+      // console.log('isEdit',isEdit);
+      if (docId && history == '0') {     
         getInfo(docId).then((response) => {
           const obj = response.data;
           obj.isEdit = isEdit == 1?true:false;
@@ -94,7 +94,8 @@ export default {
             name: useUserStore().uname, //用户姓名
           };
         });
-      } else if (fileId && history) {
+      } else if (fileId && history == '1') {
+        // console.log('history',history);
             getInfo(docId).then((response) => {
           const obj = response.data;
           obj.isEdit = false;

+ 5 - 1
src/views/myfile/components/PalaceGridFile.vue

@@ -4,7 +4,7 @@
         <div class="bigBox" style="height: 250px; overflow: auto;" v-if="fileList?.length">
             <template v-for="(item, index) in fileList" :key="index">
                 <!-- 循环盒子 -->
-                <div class="flexBox" @contextmenu="rightClick(item, $event)">
+                <div class="flexBox" @contextmenu="props.handleRowClick(item)">
                     <!-- 图片 -->
                     <div class="imgBox">
                         <img :src="getImage(item.fileType)" alt="" style="vertical-align: middle;cursor: pointer;">
@@ -84,6 +84,10 @@ export default {
             type: Function,
             required: true
         },
+        handleRowClick: {
+            type: Function,
+            required: true
+        },
         thisFolder: {
             type: Object,
             required: true