liuQiang il y a 1 an
Parent
commit
5713ce4454
3 fichiers modifiés avec 9 ajouts et 5 suppressions
  1. 5 2
      src/components/historyList/index.vue
  2. 1 1
      src/utils/index.js
  3. 3 2
      src/views/myfile/MyFile.vue

+ 5 - 2
src/components/historyList/index.vue

@@ -13,7 +13,7 @@
           v-if="treeData.length>0"
         >
           <div
-            v-for="(item, index) in treeData.value"
+            v-for="(item, index) in treeData"
             :key="index"
             class="list-item list-item-dot"
             :class="{
@@ -105,11 +105,14 @@ watch(
   (newValue) => {
     isOpen.value = newValue;
   }
-);const treeData = reactive([]);
+);
+// const treeData = reactive([]);
+const treeData = ref([]);
 watchEffect(() => {
   if(props.fileUserTreeData.length>0){
     treeData.value = props.fileUserTreeData.reverse();
   toRaw(treeData.value);
+  console.log('treeData',treeData.value);
   }
 
 });

+ 1 - 1
src/utils/index.js

@@ -21,7 +21,7 @@ export function formatDate(cellValue) {
  * @param {string} fileType
  */
 export const canPreviewFile = (fileType)=>{
-    const array = ['.doc', '.docm', '.docx', '.dot', '.dotm', '.dotx', '.epub', '.fodt', '.htm', '.html', '.mht', '.odt', '.ott', '.pdf', '.rtf', '.txt', '.djvu', '.xps','.csv', '.fods', '.ods', '.ots', '.xls', '.xlsm', '.xlsx', '.xlt', '.xltm', '.xltx','.fodp', '.odp', '.otp', '.pot', '.potm', '.potx', '.pps', '.ppsm', '.ppsx', '.ppt', '.pptm', '.pptx']
+    const array = ['.doc', ".wps",'.docm', '.docx', '.dot', '.dotm', '.dotx', '.epub', '.fodt', '.htm', '.html', '.mht', '.odt', '.ott', '.pdf', '.rtf', '.txt', '.djvu', '.xps','.csv', '.fods', '.ods', '.ots', '.xls', '.xlsm', '.xlsx', '.xlt', '.xltm', '.xltx','.fodp', '.odp', '.otp', '.pot', '.potm', '.potx', '.pps', '.ppsm', '.ppsx', '.ppt', '.pptm', '.pptx']
     if(array.includes(fileType)){
       return true
     }

+ 3 - 2
src/views/myfile/MyFile.vue

@@ -824,6 +824,7 @@ export default {
                 previewData.value = URL.createObjectURL(res)
             } else if (row.name === "历史版本") {
                 const resHistory = await listVersion({ docId: clickRowId.value })
+                console.log('resHistory',resHistory);
                 historyTotal.value = resHistory.total
                 fileUserTreeData.data = resHistory.rows;
                 openForwardFile.value = true
@@ -1135,10 +1136,10 @@ export default {
         }
         //对mouseCli数组进行筛选,实现菜单的区分显示
         const filterMouseCli = () => {
-            const canPreviewArray = ['.doc', '.docm', '.docx', '.dot', '.dotm', '.dotx', '.epub', '.fodt', '.htm', '.html', '.mht', '.odt', '.ott', '.pdf', '.rtf', '.txt', '.djvu', '.xps', '.csv', '.fods', '.ods', '.ots', '.xls', '.xlsm', '.xlsx', '.xlt', '.xltm', '.xltx', '.fodp', '.odp', '.otp', '.pot', '.potm', '.potx', '.pps', '.ppsm', '.ppsx', '.ppt', '.pptm', '.pptx']
+            const canPreviewArray = ['.doc','.wps', '.docm', '.docx', '.dot', '.dotm', '.dotx', '.epub', '.fodt', '.htm', '.html', '.mht', '.odt', '.ott', '.pdf', '.rtf', '.txt', '.djvu', '.xps', '.csv', '.fods', '.ods', '.ots', '.xls', '.xlsm', '.xlsx', '.xlt', '.xltm', '.xltx', '.fodp', '.odp', '.otp', '.pot', '.potm', '.potx', '.pps', '.ppsm', '.ppsx', '.ppt', '.pptm', '.pptx']
             const typeArr = ['.png', '.jpg', '.jpeg', '.JPG', '.mp3', '.mp4']
             const imgTypeArr = ['.png', '.jpg', '.jpeg', '.JPG']
-            const canEditArr = ['.doc', '.docm', '.docx', '.dot', '.dotm', '.dotx', '.txt', '.djvu', '.xps', '.csv', '.fods', '.ods', '.ots', '.xls', '.xlsm', '.xlsx', '.xlt', '.xltm', '.xltx', '.fodp', '.odp', '.otp']
+            const canEditArr = ['.doc', '.docm', '.docx', '.dot', '.dotm', '.dotx', '.txt', '.djvu', '.xps', '.csv', '.fods', '.ods', '.ots', '.xls', '.xlsm', '.xlsx', '.xlt', '.xltm', '.xltx', '.fodp', '.odp', '.otp','.doc', '.docm', '.docx', '.dot', '.dotm', '.dotx', '.epub', '.fodt', '.htm', '.html', '.mht', '.odt', '.ott', '.rtf', '.txt', '.djvu', '.xps', '.wps','.pptx']
             let arr = []
             if (!(typeArr.includes(copyFileType.value) || canPreviewArray.includes(copyFileType.value))) {
                 arr = mouseCli.value.filter(item => item.name !== "预览")