songxy 1 éve
szülő
commit
35f1c2663a

+ 3 - 0
client/package.json

@@ -31,6 +31,9 @@
     "@form-create/element-ui": "^3.1.24",
     "@iconify/iconify": "^3.1.1",
     "@videojs-player/vue": "^1.0.0",
+    "@vue-office/docx": "^1.3.1",
+    "@vue-office/excel": "^1.4.7",
+    "@vue-office/pdf": "^1.5.5",
     "@vueuse/core": "^10.4.1",
     "@wangeditor/editor": "^5.1.23",
     "@wangeditor/editor-for-vue": "^5.1.10",

+ 46 - 1
client/src/views/OaSystem/projectCenter/projectDetail/components/fjcl/index.scss

@@ -1,16 +1,61 @@
 ._ProjectDetail_fjcl {
   display: flex;
-  flex-direction: column;
   flex: 1;
   height: 100%;
   >div {
     height: 100%;
     &.treeBox {
+      padding: 20px 0px;
       width: 360px;
       border-right: 1px solid #D0D8E0;
+      >h4 {
+        font-size: 17px;
+      }
+      >div {
+        margin-top: 15px;
+      }
     }
     &.previewBox {
       flex: 1;
+      display: flex;
+      flex-direction: column;
+      >div {
+        &.tools {
+          padding: 10px 20px;
+          display: flex;
+          align-items: center;
+          justify-content: space-between;
+          border-bottom: 1px solid #F2F4F8;
+          >h4 {
+            font-size: 17px;
+          }
+          >ul {
+            >li {
+              color: #57627D;
+              font-size: 15px;
+              cursor: pointer;
+              >i {
+                display: inline-block;
+                width: 18px;
+                height: 18px;
+                background: url("../../../../../../assets/imgs/office_down_icon.png") no-repeat;
+                background-size: 100% 100%;
+                margin-right: 3px;
+                margin-top: -2px;
+                vertical-align: middle;
+              }
+            }
+          }
+        }
+        &.contentBox {
+          height: 0px;
+          flex-grow: 1;
+          overflow-y: auto;
+        }
+      }
     }
   }
+  :deep(.el-tree-node__content>.el-tree-node__expand-icon) {
+    padding-left: 0px !important;
+  }
 }

+ 105 - 54
client/src/views/OaSystem/projectCenter/projectDetail/components/fjcl/index.vue

@@ -3,86 +3,137 @@
     <div class="treeBox">
       <h4>材料分类</h4>
       <div>
-        <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick" />
+        <el-tree
+          :data="treeData"
+          :render-content="renderContent"
+          :props="defaultProps"
+          @node-click="handleNodeClick"
+        />
+      </div>
+    </div>
+    <div class="previewBox">
+      <div class="tools">
+        <h4>土地交付记录表(3).pdf</h4>
+        <ul>
+          <li><i class="down_icon"></i>下载</li>
+        </ul>
+      </div>
+      <div class="contentBox">
+        <vue-office-pdf :src="pdf" @rendered="renderedHandler" @error="errorHandler" />
       </div>
     </div>
-    <div class="previewBox"></div>
   </div>
 </template>
 <script setup lang="ts">
 import { onMounted } from 'vue'
+import { useRoute } from 'vue-router'
+import request from '@/config/axios'
+import VueOfficePdf from '@vue-office/pdf'
+import VueOfficeExcel from '@vue-office/excel'
+import VueOfficeDocx from '@vue-office/docx'
+import '@vue-office/excel/lib/index.css'
+import '@vue-office/docx/lib/index.css'
+
 defineOptions({ name: 'FjclComp' })
 
-interface Tree {
-  label: string
-  children?: Tree[]
-}
 const defaultProps = {
   children: 'children',
-  label: 'label'
+  label: 'name'
 }
 const handleNodeClick = (data: Tree) => {
   console.log(data)
+  if (data['nodeType'] === 1) {
+    queryProjectMaterial(data['id'])
+  }
 }
-
-const data: Tree[] = [
+const pdf = ref<string>('http://localhost/test.pdf')
+const renderedHandler: () => void = () => {
+  console.log('加载完成')
+}
+const errorHandler: (err: any) => void = (err: any) => {
+  console.log(err)
+}
+const route = useRoute()
+const query = route.query
+const _mainProjectId = query.id
+interface Tree {
+  name: string
+  id: string
+  pid: string
+  nodeType: number
+  fileUrl?: string
+  fileSuffix?: string
+  children?: Array<Tree>
+}
+const treeData = ref<Tree[]>([
   {
-    label: 'Level one 1',
+    name: 'Level one 3',
+    id: '',
+    pid: '',
+    nodeType: 2,
     children: [
       {
-        label: 'Level two 1-1',
+        name: 'Level two 3-1',
+        id: '',
+        pid: '',
+        nodeType: 2,
         children: [
           {
-            label: 'Level three 1-1-1'
+            name: 'Level three 3-1-1',
+            id: '',
+            pid: '',
+            nodeType: 1
           }
         ]
       }
     ]
-  },
-  {
-    label: 'Level one 2',
-    children: [
-      {
-        label: 'Level two 2-1',
-        children: [
-          {
-            label: 'Level three 2-1-1'
-          }
-        ]
-      },
-      {
-        label: 'Level two 2-2',
-        children: [
-          {
-            label: 'Level three 2-2-1'
-          }
-        ]
+  }
+])
+const queryProjectMaterialByTree = (): void => {
+  const urlApi = `/project-material/tree`
+  request
+    .post({ url: urlApi, data: { projectId: _mainProjectId } }, '/business')
+    .then((resultData) => {
+      // treeData.value = resultData
+    })
+}
+const queryProjectMaterial = (fileId): void => {
+  const urlApi = `/project-material?id=${fileId}`
+  request.get({ url: urlApi }, '/business').then((resultData) => {
+    pdf.value = resultData['fileUrl']
+  })
+}
+const renderContent = (h, { node, data, store }) => {
+  console.log('data~~~~~~~~~~~~~~~~~~~~~~')
+  console.log(data)
+  return h(
+    'span',
+    {
+      style: {
+        display: 'inline-block',
+        width: '100%'
       }
-    ]
-  },
-  {
-    label: 'Level one 3',
-    children: [
-      {
-        label: 'Level two 3-1',
-        children: [
-          {
-            label: 'Level three 3-1-1'
-          }
-        ]
-      },
-      {
-        label: 'Level two 3-2',
-        children: [
-          {
-            label: 'Level three 3-2-1'
+    },
+    [
+      h('span', [
+        h(resolveComponent(data['nodeType'] === 1 ? 'Document' : 'Folder'), {
+          style: {
+            marginRight: '5px',
+            marginTop: '-4px',
+            verticalAlign: 'middle',
+            width: '18px',
+            height: '18px',
+            color: data['nodeType'] === 1 ? '#2e77e6' : '#f9a527'
           }
-        ]
-      }
+        }),
+        h('span', data.name)
+      ])
     ]
-  }
-]
-onMounted(() => {})
+  )
+}
+onMounted(() => {
+  queryProjectMaterialByTree()
+})
 </script>
 <style lang="scss" scoped>
 @import './index.scss';

+ 1 - 0
client/src/views/OaSystem/projectCenter/projectDetail/components/xmcb/index.scss

@@ -3,6 +3,7 @@
   flex-direction: column;
   flex: 1;
   height: 100%;
+  padding: 20px 0px;
   >div {
     &:first-child {
       display: flex;

+ 1 - 0
client/src/views/OaSystem/projectCenter/projectDetail/components/xmht/index.scss

@@ -3,6 +3,7 @@
   flex-direction: column;
   flex: 1;
   height: 100%;
+  padding: 20px 0px;
   >div {
     &:first-child {
       display: flex;

+ 1 - 0
client/src/views/OaSystem/projectCenter/projectDetail/components/xmxx/index.scss

@@ -3,6 +3,7 @@
   flex-direction: column;
   flex: 1;
   height: 100%;
+  padding: 20px 0px;
   >div {
     &:first-child {
       display: flex;

+ 0 - 2
client/src/views/OaSystem/projectCenter/projectDetail/projectDetail.scss

@@ -174,8 +174,6 @@
     &.detailContent {
       margin-top: 10px;
       flex: 1;
-      padding-top: 20px;
-      padding-bottom: 20px;
     }
   }
 }

+ 1 - 1
zjugis-workflow/src/main/resources/static/all.js

@@ -2399,7 +2399,7 @@ window.pinyin_dict_notone = {"a":"阿啊呵腌嗄吖锕","e":"额阿俄恶鹅遏
         var aStr = localStorage.getItem('ACCESS_TOKEN');
         if(aStr){
             var a = JSON.parse(aStr);
-            a['v'] && (headers['Authorization'] = 'Bearer '+a['v']);
+            a['v'] && (headers['Authorization'] = 'Bearer '+JSON.parse(a['v']));
         }
         var opt=$.extend(true,
             {

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
zjugis-workflow/src/main/resources/static/all.min.js


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott