scorpioyq 3 anos atrás
pai
commit
55549ac6b3

+ 5 - 5
src/api/database/index.js

@@ -6,13 +6,13 @@ export default {
      * @returns {Promise<unknown>}
      */
     fileList(params) { //项目列表
-        return fetch('/blade-project-manage/projectfile/v1/list', params)
+        return fetch('/blade-project-manage/bladefile/v1/getAllList', params)
     },
-    projectAdd(params) { //新增项目
-        return fetch('/blade-project-manage/project/v1/save', params, 'post', 'json')
+    fileInfo(params) {
+        return fetch('/blade-project-manage/bladefile/v1/detail', params)
     },
-    projectRemove(params) { //删除项目
-        return fetch('/blade-project-manage/project/v1/remove', params, 'post')
+    fileRemove(params) { //删除项目
+        return fetch('/blade-project-manage/bladefile/v1/remove', params, 'post')
     },
 
 }

+ 3 - 1
src/api/index.js

@@ -3,6 +3,7 @@ import system from './system/index.js'
 import project from "./project/index.js";
 import common from "./common.js";
 import recycle from "./recycle/index.js";
+import database from "./database/index.js";
 
 export default {
     uploadPath: '/api/wutong-file/minio/file/upload', // 上传
@@ -10,5 +11,6 @@ export default {
     system,
     project,
     common,
-    recycle
+    recycle,
+    database
 }

+ 6 - 0
src/api/project/index.js

@@ -50,6 +50,12 @@ export default {
     fileList(params) { //文件夹里包含文件列表
         return fetch('/blade-project-manage/bladefile/v1/getListByFolderId', params)
     },
+    fileDetail(id) {
+        return fetch('/wutong-library/library/detail/' + id)
+    },
+    articleDetailByFile(id) {
+        return fetch('/wutong-library/library/detail/file/' + id)
+    },
     fileAdd(params) { //上传(新增)文件
         return fetch('/blade-project-manage/bladefile/v1/save', params, 'post', 'json')
     },

+ 6 - 2
src/assets/style/main.scss

@@ -332,7 +332,7 @@ img {
 }
 
 .radius {
-  border-radius: 5px;
+  border-radius: 10px;
 }
 
 .font-34 {
@@ -576,6 +576,10 @@ img {
   cursor: pointer;
 }
 
+.hide-scrollbar::-webkit-scrollbar {
+  display: none;
+}
+
 .box-shadow-blue {
   box-shadow: 0 0 16px 2px #deedff;
 }
@@ -654,7 +658,7 @@ img {
 }
 
 .grey-6-bg {
-  background-color: #6b6b6b;
+  background-color: #F6F6F6;
 }
 
 .grey-9, a.grey-9 {

+ 1 - 0
src/assets/svg/1.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45" viewBox="0 0 45 45"><defs><style>.a{fill:#ffe5d2;}.b{fill:#bc002d;}.c{fill:#ef716f;}</style></defs><g transform="translate(-45 -473)"><circle class="a" cx="22.5" cy="22.5" r="22.5" transform="translate(45 473)"/><g transform="translate(1478 -7.148)"><g transform="translate(-1419.347 488)"><path class="b" d="M-1414.005,495.99h5.326a4,4,0,0,0,3.995-3.995,4,4,0,0,0-3.995-3.995h-5.326a4,4,0,0,0-3.995,3.995A4,4,0,0,0-1414.005,495.99Z" transform="translate(1418 -488)"/><path class="b" d="M-1408.679,500h-5.326a4,4,0,0,0-3.995,3.995,4,4,0,0,0,3.995,3.995h5.326a4,4,0,0,0,3.995-3.995A4,4,0,0,0-1408.679,500Z" transform="translate(1418 -489.347)"/><path class="b" d="M-1408.679,512h-5.326a4,4,0,0,0-3.995,3.995,4,4,0,0,0,3.995,3.995h5.326a4,4,0,0,0,3.995-3.995A4,4,0,0,0-1408.679,512Z" transform="translate(1418 -490.694)"/></g><g transform="translate(-1430 490.663)"><path class="c" d="M-1425.292,500.129a.888.888,0,0,0-.018,1.255l1.052,1.083a4.852,4.852,0,0,1-3.966-4.809,4.829,4.829,0,0,1,4.762-4.883h1.831V491h-1.831a6.605,6.605,0,0,0-6.537,6.658,6.623,6.623,0,0,0,5.752,6.606l-1.006.868a.887.887,0,0,0-.092,1.252.882.882,0,0,0,.672.308.884.884,0,0,0,.58-.216l3.377-2.913-3.32-3.417A.886.886,0,0,0-1425.292,500.129Z" transform="translate(1430 -491)"/><path class="c" d="M-1391.748,509.658a6.605,6.605,0,0,0-6.537-6.658h-1.831v1.775h1.831a4.829,4.829,0,0,1,4.762,4.883,4.852,4.852,0,0,1-3.966,4.809l1.052-1.083a.888.888,0,0,0-.018-1.255.888.888,0,0,0-1.256.018l-3.319,3.417,3.376,2.913a.886.886,0,0,0,.58.216.884.884,0,0,0,.673-.308.887.887,0,0,0-.092-1.252l-1.007-.868A6.623,6.623,0,0,0-1391.748,509.658Z" transform="translate(1426.748 -492.347)"/></g></g></g></svg>

+ 1 - 0
src/assets/svg/2.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45" viewBox="0 0 45 45"><defs><style>.a{fill:#ffe5d2;}.b{fill:#bc002d;}.c{fill:#d9e6ff;}.d{fill:#ef716f;}</style></defs><g transform="translate(-43 -473)"><circle class="a" cx="22.5" cy="22.5" r="22.5" transform="translate(43 473)"/><g transform="translate(1496 -47.686)"><path class="b" d="M-1435.976,535.052l-1.663-1.663a1.33,1.33,0,0,0-.941-.39h-6.091a1.329,1.329,0,0,0-1.329,1.329v19.042h29.229V537.433a1.776,1.776,0,0,0-1.776-1.776h-15.969A2.067,2.067,0,0,1-1435.976,535.052Z"/><rect class="c" width="23" height="13" rx="2.077" transform="translate(-1442 536.686)"/><path class="d" d="M-1416.548,554.057H-1446l1.579-13.584a1.76,1.76,0,0,1,1.806-1.474h25.8a1.716,1.716,0,0,1,1.806,1.818Z" transform="translate(0 -0.686)"/></g></g></svg>

+ 148 - 0
src/views/database/component/dialog_info.vue

@@ -0,0 +1,148 @@
+<template>
+  <div class="flex flex-col flex-center" style="padding: 30px">
+    <div class="flex flex-center icon-1" style="margin-top: -50px">
+      <img v-if="info.suffix === 'docx'" class="icon-1" src="../../../assets/svg/folder/doc.svg">
+      <img v-else-if="info.suffix === 'pdf'" class="icon-1" src="../../../assets/svg/folder/pdf.svg">
+      <img v-else-if="info.suffix === 'xlsx'" class="icon-1" src="../../../assets/svg/folder/xls.svg">
+    </div>
+    <!------1----->
+    <div class="flex flex-center full-width flex-justify-between mt-10">
+      <div class="flex flex-col flex-align-start bg-1">
+        <img class="icon-2" src="../../../assets/svg/1.svg">
+        <span class="grey-6 bold mt-10">当前文件所在项目进度</span>
+        <span class="mt-10 main-color font-15 bold">{{ info.projectStageName ? info.projectStageName : '-' }}</span>
+      </div>
+      <div class="flex flex-col bg-1">
+        <img class="icon-2" src="../../../assets/svg/2.svg">
+        <span class="grey-6 bold mt-10">当前文件所在位置</span>
+        <span class="mt-10 main-color font-15 bold">{{ info.folderName ? info.folderName : '-' }}</span>
+      </div>
+      <div class="flex flex-col bg-1">
+        <img class="icon-2" src="../../../assets/svg/2.svg">
+        <span class="grey-6 bold mt-10">当前文件所属类型</span>
+        <span class="mt-10 main-color font-15 bold">{{ info.folderTypeName ? info.folderTypeName : '-' }}</span>
+      </div>
+    </div>
+    <!------2----->
+    <div class="flex flex-center flex-justify-between mt-20 full-width grey-bg radius grey-6-bg">
+      <div class="flex flex-col flex-center margin" style="margin-left: 50px">
+        <span class="grey-6 bold mt-10">上传人</span>
+        <span class="mt-5 main-color font-15 bold">{{ info.createUserName ? info.createUserName : '-' }}</span>
+      </div>
+      <div class="flex flex-col flex-center">
+        <span class="grey-6 bold mt-10">上传时间</span>
+        <span class="mt-5 main-color font-15 bold">{{ info.createTime ? info.createTime : '-' }}</span>
+      </div>
+      <div class="flex flex-col flex-center">
+        <span class="grey-6 bold mt-10">编制单位</span>
+        <span class="mt-5 main-color font-15 bold">{{ info.createDeptName ? info.createDeptName : '-' }}</span>
+      </div>
+      <div class="flex flex-col flex-center" style="margin-right: 50px">
+        <span class="grey-6 bold mt-10">文件大小</span>
+        <span class="mt-5 main-color font-15 bold">{{ size ? size : '-' }}</span>
+      </div>
+    </div>
+    <!------3----->
+    <div class="flex flex-center full-width mt-20">
+      <div class="flex flex-col flex-center bg-2">
+        <span class="white margin">文件所属项目</span>
+        <div class="border-1 ml-20"></div>
+        <span class="white margin">所属主管部门</span>
+        <div class="border-1 ml-20"></div>
+        <span class="white margin">所属项目总投</span>
+      </div>
+      <div class="flex flex-col grey-6-bg bg-3">
+        <span class="grey-6 margin ml-20">{{ info.projectName ? info.projectName : '项目名称' }}</span>
+        <div class="border-1"></div>
+        <span class="grey-6 margin ml-20">{{ info.projectDeptName ? info.projectDeptName : '主管部门' }}</span>
+        <div class="border-1"></div>
+        <span class="grey-6 margin ml-20">{{ info.totalAmount ? info.totalAmount : '-' }}万元</span>
+      </div>
+    </div>
+    <!------4----->
+    <div class="flex flex-center flex-justify-between" style="width: 70%;margin-top: 40px">
+      <base-button icon="Download" title="下载" type="0"/>
+      <base-button icon="UploadFilled" title="同步到" type="0"/>
+      <base-button icon="Link" title="分享到" type="0"/>
+    </div>
+  </div>
+</template>
+
+<script>
+import baseButton from '../../../components/base-button.vue'
+import {bytesToSize} from "../../../utils/tools.js";
+
+export default {
+  name: "dialog_info",
+  components: {baseButton},
+  props: {
+    id: String
+  },
+  watch: {
+    id: {
+      handler() {
+        this.getFileInfo()
+      },
+      immediate: true
+    },
+  },
+  data() {
+    return {
+      size: '',
+      info: {}
+    }
+  },
+  created() {
+    this.getFileInfo()
+  },
+  methods: {
+    getFileInfo() {
+      this.$api.database.fileInfo({id: this.id}).then(res => {
+        if (res.code === 200) {
+          this.info = res.data
+          this.toSize()
+        }
+      })
+    },
+    toSize() {
+      this.size = bytesToSize(this.info.volume)
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.bg-1 {
+  background-color: #F6F6F6;
+  padding: 15px;
+  border-radius: 20px;
+  width: 180px;
+}
+
+.bg-2 {
+  flex: 1;
+  background-color: #BC002D;
+  border-radius: 15px 0 0 15px
+}
+
+.bg-3 {
+  flex: 4;
+  border-radius: 0 15px 15px 0
+}
+
+.icon-2 {
+  width: 45px;
+  height: 45px
+}
+
+.icon-1 {
+  width: 180px;
+  height: 150px;
+}
+
+.border-1 {
+  height: 1px;
+  background-color: #DEDEDE;
+  width: 96%;
+}
+</style>

+ 62 - 23
src/views/database/component/list.vue

@@ -11,7 +11,7 @@
         <el-icon class="ml-20" color="#ECAB56">
           <WarningFilled/>
         </el-icon>
-        <span class="ml-5" @click="showInfo=true">共找到相关资料23947,34份</span>
+        <span class="ml-5">共找到相关资料{{ page.total }}份</span>
       </div>
     </div>
     <avue-crud ref="crud"
@@ -20,10 +20,7 @@
                :before-open="beforeOpen"
                :data="data"
                :option="option"
-               :permission="permissionList"
                :table-loading="loading"
-               @row-update="rowUpdate"
-               @row-save="rowSave"
                @row-del="rowDel"
                @current-change="currentChange"
                @size-change="sizeChange"
@@ -31,18 +28,17 @@
                @on-load="onLoad">
     </avue-crud>
     <el-dialog v-model="showInfo" append-to-body width="45%">
-      <div class="flex flex-col flex-center">
-        <div class="flex flex-center">
-          <img src="../../../assets/svg/folder/doc.svg" style="width: 200px;height: 160px">
-        </div>
-      </div>
+      <dialog_info :id="id"/>
     </el-dialog>
   </div>
 </template>
 
 <script>
+import dialog_info from './dialog_info.vue'
+
 export default {
   name: 'list',
+  components: {dialog_info},
   data() {
     return {
       showInfo: false,
@@ -56,9 +52,9 @@ export default {
         tip: false,
         columnBtn: false,
         searchShow: true,
-        editBtn: true,
+        editBtn: false,
         addBtn: false,
-        delBtn: false,
+        delBtn: true,
         border: true,
         index: true,
         align: 'center',
@@ -68,38 +64,64 @@ export default {
         column: [
           {
             label: '文件名称',
-            prop: 'name',
-            addDisplay: false,
-            editDisplay: false
+            prop: 'title',
+            width: 380,
           },
           {
-            label: '更新时间',
-            prop: 'totalAmount'
+            label: '所属项目',
+            prop: 'projectName'
           },
           {
-            label: '格式',
-            prop: 'issueCumulative'
+            label: '文件格式',
+            prop: 'suffix'
           },
           {
-            label: '大小(MB)',
-            prop: 'lot'
+            label: '上传人',
+            prop: 'createUserName',
           },
           {
             label: '上传时间',
-            prop: 'issueTerm'
+            prop: 'createTime'
           }]
       },
       page: {
-        pageSize: 15,
+        pageSize: 20,
         currentPage: 1,
         total: 0
-      }
+      },
+      id: ''
     }
   },
+  created() {
+    this.$bus.on('serachFile', (res) => {
+      this.onLoad(res)
+    })
+  },
   methods: {
+    onLoad(query = {}) {
+      let data = {...query, ...this.page}
+      this.$api.database.fileList(data).then(res => {
+        if (res.code === 200) {
+          this.data = res.data.records
+          this.page.total = res.data.total
+          this.loading = false;
+        }
+      })
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
     beforeOpen(done, type) {
       if (['view'].includes(type)) {
         this.showInfo = true
+        console.log(this.showInfo)
+        this.id = this.form.id
       } else if (type === 'edit') {
         this.$router.push({
           path: '/home/details',
@@ -107,6 +129,23 @@ export default {
         })
       }
     },
+    rowDel(row) {
+      this.$confirm("确定删除选择的项目?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+          .then(() => {
+            this.$api.database.fileRemove({ids: row.id}).then(res => {
+              if (res.code === 200) {
+                this.$message.success(res.msg)
+                this.onLoad()
+              } else {
+                this.$message.error(res.msg)
+              }
+            })
+          })
+    },
     choise(index) {
       this.active = index
     }

+ 45 - 29
src/views/database/component/serach.vue

@@ -2,36 +2,37 @@
   <div class="flex flex-col flex-justify-between padding white-bg">
     <el-form v-model="form" class="lab mt-20" label-width="120px">
       <el-col :span="24" class="flex flex-center">
-        <el-col :span="6">
+        <el-col :span="8">
           <el-form-item class="full-width" label="搜索文件">
             <el-input
-                v-model="form.keyWords"
+                v-model="form.fileKeyWords"
                 clearable
                 placeholder="输入文件关键字"
                 prefix-icon="Search"
             />
           </el-form-item>
         </el-col>
-        <el-col :span="6">
+        <el-col :span="8">
           <el-form-item class="full-width" label="搜索项目">
             <el-input
-                v-model="form.keyWords"
+                v-model="form.projectKeyWords"
                 clearable
-                placeholder="不限"
+                placeholder="输入项目关键字"
                 prefix-icon="Search"
             />
           </el-form-item>
         </el-col>
-        <el-col :span="6" class="flex flex-center">
+        <el-col :span="8" class="flex flex-center">
           <!----时间区间间选择---->
           <el-form-item class="full-width" label="上传时间">
             <el-col :span="11">
-              <el-form-item prop="date1">
+              <el-form-item>
                 <el-date-picker
-                    v-model="form.date1"
+                    v-model="form.startTime"
                     placeholder="开始日期"
                     style="width: 100%"
                     type="date"
+                    value-format="YYYY-MM-DD"
                 />
               </el-form-item>
             </el-col>
@@ -39,35 +40,36 @@
               <span class="grey-6">至</span>
             </el-col>
             <el-col :span="11">
-              <el-form-item prop="date1">
+              <el-form-item>
                 <el-date-picker
-                    v-model="form.date1"
+                    v-model="form.endTime"
                     placeholder="结束日期"
                     style="width: 100%"
                     type="date"
+                    value-format="YYYY-MM-DD"
                 />
               </el-form-item>
             </el-col>
           </el-form-item>
         </el-col>
         <!------领域------>
-        <el-col :span="6">
-          <el-form-item class="full-width" label="项目类型" style="color: #707070">
-            <el-select
-                v-model="form.keyWords"
-                clearable
-                placeholder="输入项目关键字"
-                style="width: 100%"
-            />
-          </el-form-item>
-        </el-col>
+        <!--        <el-col :span="6">-->
+        <!--          <el-form-item class="full-width" label="项目类型" style="color: #707070">-->
+        <!--            <el-select-->
+        <!--                v-model="form.keyWords"-->
+        <!--                clearable-->
+        <!--                placeholder="输入项目关键字"-->
+        <!--                style="width: 100%"-->
+        <!--            />-->
+        <!--          </el-form-item>-->
+        <!--        </el-col>-->
       </el-col>
     </el-form>
     <div class="flex full-width flex-center flex-justify-between">
       <div></div>
-      <div class="flex flex-center mb-10">
-        <base-button class="pointer" icon="Delete" title="清空" type="0"/>
-        <base-button class="ml-20 pointer"/>
+      <div class="flex flex-center mb-10 mt-10">
+        <base-button class="pointer" icon="Delete" title="清空" type="0" @click="clear"/>
+        <base-button class="ml-20 pointer" @click="fileSure"/>
       </div>
     </div>
   </div>
@@ -78,15 +80,29 @@ import baseButton from '../../../components/base-button.vue'
 
 export default {
   name: 'serach',
-  components: { baseButton },
-  data () {
+  components: {baseButton},
+  data() {
     return {
       form: {
-        keyWords: '',
-        name: '',
-        date1: '',
-        date2: ''
+        projectKeyWords: '',
+        fileKeyWords: '',
+        startTime: '',
+        endTime: ''
+      }
+    }
+  },
+  methods: {
+    fileSure() {
+      this.$bus.emit('serachFile', this.form)
+    },
+    clear() {
+      this.form = {
+        projectKeyWords: '',
+        fileKeyWords: '',
+        startTime: '',
+        endTime: ''
       }
+      this.$bus.emit('serachFile', this.form)
     }
   }
 }

+ 3 - 2
src/views/home/component/current.vue

@@ -14,7 +14,8 @@
                append-to-body
                center
                title="附件上传(可批量)">
-      <uploadFile :max='20' accept=".pdf,.doc,.docx,.xls,.xlsx,.ppt,.ppt,.wps" @close='show = false'
+      <uploadFile :data='{type:1,toStatus:0}' :max='20' accept=".pdf,.doc,.docx,.xls,.xlsx,.ppt,.ppt,.wps"
+                  @close='show = false'
                   @success='success'/>
     </el-dialog>
   </div>
@@ -59,7 +60,7 @@ export default {
       this.$api.project.fileAdd(this.fileList).then(res => {
         if (res.code === 200) {
           this.show = false
-          this.$emit('reFolder')
+          this.$emit('reFiles')
           this.$message.success(res.msg)
         } else {
           this.show = false

+ 6 - 6
src/views/home/component/dash.vue

@@ -192,12 +192,12 @@ export default {
       this.active = index
       this.onLoad({stageId: item.id})
     },
-    track(id) {
-      this.$router.push({
-        path: '/home/details',
-        query: {id: id, type: '1'}
-      })
-    },
+    // track(id) {
+    //   this.$router.push({
+    //     path: '/home/details',
+    //     query: {id: id, type: '1'}
+    //   })
+    // },
     onLoad(query = {}) {
       let data = {...query, ...this.page}
       this.$api.project.projectList(data).then(res => {

+ 17 - 11
src/views/home/component/files_list.vue

@@ -23,7 +23,7 @@
         <span class="flex-1">{{ item.status }}</span>
         <span class="flex-1">{{ item.author }}</span>
         <div class="flex flex-center" style="flex: 3">
-          <main-button icon="View" title="详情" width="85" @click="View"/>
+          <main-button icon="View" title="详情" width="85" @click="View(item)"/>
           <main-button icon="Download" title="下载" width="85" @click="downFile(item)"/>
           <main-button icon="UploadFilled" title="同步" width="85"/>
           <main-button icon="Delete" title="删除" width="85" @click="removeFile(item)"/>
@@ -54,7 +54,6 @@ export default {
         if (val === '' || val === null) {
           return
         }
-        console.log(val)
         this.files = val.records
         this.files.map(e => {
           if (e.volume === '') {
@@ -74,21 +73,28 @@ export default {
     }
   },
   methods: {
-    View() {
-      // this.$router.push('/home/files')
+    View(item) {
+      this.$router.push('/home/file_detail?id=' + item.fileId)
     },
     downFile(item) {
       window.open('/api/wutong-file/minio/file/downFile/' + item.dowloadFileId, '')
     },
     removeFile(item) {
-      this.$api.project.fileRemove({ids: item.id}).then(res => {
-        if (res.code === 200) {
-          this.$bus.emit('delete')
-          this.$message.success(res.msg)
-        } else {
-          this.$message.error(res.msg)
-        }
+      this.$confirm("确认是否删除该文件?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
       })
+          .then(() => {
+            this.$api.project.fileRemove({ids: item.id}).then(res => {
+              if (res.code === 200) {
+                this.$bus.emit('delete')
+                this.$message.success(res.msg)
+              } else {
+                this.$message.error(res.msg)
+              }
+            })
+          })
     }
 
   }

+ 20 - 8
src/views/home/component/folder_list.vue

@@ -33,7 +33,8 @@
                append-to-body
                center
                title="附件上传(可批量)">
-      <uploadFile :max='20' accept=".pdf,.doc,.docx,.xls,.xlsx,.ppt,.ppt,.wps" @close='show = false'
+      <uploadFile :data='{type:1,toStatus:0}' :max='20' accept=".pdf,.doc,.docx,.xls,.xlsx,.ppt,.ppt,.wps"
+                  @close='show = false'
                   @success='success'/>
     </el-dialog>
   </div>
@@ -62,14 +63,20 @@ export default {
   },
   methods: {
     fileView(item) {
-      this.$router.push({
-        path: '/home/files',
-        query: {id: item.fileFolderId}
-      })
+      if (this.type === 0) {
+        this.$router.push({
+          path: '/home/files',
+          query: {id: item.fileFolderId}
+        })
+      } else {
+        this.$router.push({
+          path: '/home/his_files',
+          query: {id: item.id}
+        })
+      }
     },
     uploadFiles(item) {
       this.currentRow = item
-      console.log(this.currentRow.fileFolderId)
       this.show = true
     },
     folderRemove(item) {
@@ -91,12 +98,17 @@ export default {
     },
     success(res) {
       this.fileList = res.fileList.map(res => {
+        console.log('dddd' + res)
         const item = {}
         item.title = res.response.data.originalFileName
         item.suffix = res.response.data.suffix
         item.volume = res.response.data.volume
         item.fileId = res.response.data.id
-        item.fileFolderId = this.currentRow.fileFolderId
+        if (this.type === 0) {
+          item.fileFolderId = this.currentRow.fileFolderId
+        } else {
+          item.fileFolderId = this.currentRow.id
+        }
         return item
       })
       this.addFile()
@@ -109,7 +121,7 @@ export default {
       this.$api.project.fileAdd(this.fileList).then(res => {
         if (res.code === 200) {
           this.show = false
-          this.$emit('reFolder')
+          this.$bus.emit('reFolder')
           this.$message.success(res.msg)
         } else {
           this.show = false

+ 67 - 0
src/views/home/file_detail.vue

@@ -0,0 +1,67 @@
+<template>
+  <div>
+    <div class="full-width flex flex-center grey-f-bg">
+      <el-card class="flex flex-col flex-center mt-20 white-bg ">
+        <div class="font-24">{{ data.title }}</div>
+        <div class="flex flex-center mt-20 grey-6">
+          <span v-if='data.classification' class="mr-20">来源:{{ data.classification }}</span>
+          <span v-if='data.author' class="mr-20 ml-20 ">作者:{{ data.author }}</span>
+        </div>
+        <div class="flex flex-col mt-10 padding hide-scrollbar" style="width: 1080px;height: 84vh;overflow-x: auto">
+          <div v-if='imgList.length > 0' class='flex flex-center flex-col'>
+            <el-image v-for='item in imgList' :key='item' :src='item' style='width: 90%;height: 70%'/>
+          </div>
+          <div v-else class="flex flex-col hide-scrollbar" style="height: 78vh;overflow-x: auto;line-height: 32px;"
+               v-html="data.content"></div>
+        </div>
+      </el-card>
+    </div>
+
+  </div>
+</template>
+
+<route>
+{
+name: '文件详情',
+}
+</route>
+
+<script>
+export default {
+  name: "fileDetail",
+  data() {
+    return {
+      id: '',
+      data: {},
+      imgList: [],
+    }
+  },
+  created() {
+    this.id = this.$route.query.id
+    this.getFileDetail()
+  },
+  methods: {
+    getFileDetail() {
+      this.$api.project.articleDetailByFile(this.id).then(res => {
+        if (res.code === 200) {
+          this.data = res.data
+          if (this.data.category === 4) {
+            // this.imgList = this.data.imgs.map(sub => sub.filePath);
+            let content = "";
+            this.data.imgs.forEach(sub => {
+              let img = "<img src='" + sub.filePath + "'/>"
+              content = content + img
+            })
+            this.data.content = content
+          }
+          this.data.content = this.data.content.replace('overflow:hidden', 'overflow:scroll')
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 4 - 1
src/views/home/files.vue

@@ -1,7 +1,7 @@
 <template>
   <div class='flex flex-col full-height'>
     <div class="full-height white-bg">
-      <current :id="id" :data="fileData" :total="total" @reFolder="getFileList"/>
+      <current :id="id" :data="fileData" :total="total" @reFiles="getFileList"/>
     </div>
     <div class="full-height full-width white-bg mt-10">
       <historical :folderList="historyFolder" :total="total"/>
@@ -38,6 +38,9 @@ export default {
     this.$bus.on('delete', () => {
       this.getFileList()
     })
+    this.$bus.on('reFolder', () => {
+      this.getFolderAll()
+    })
   },
   methods: {
     getFileList() {

+ 126 - 0
src/views/home/his_files.vue

@@ -0,0 +1,126 @@
+<template>
+  <div class="full-width full-height white-bg mb-10">
+    <div class="flex flex-col">
+      <div class="flex flex-align-center padding border-bottom bold title-sp">
+        <span class="flex-1"></span>
+        <span style="flex: 2">文件/文件夹名称</span>
+        <span style="flex: 1">更新(上传)时间</span>
+        <span class="flex-1">文件大小</span>
+        <span class="flex-1">是否同步</span>
+        <span class="flex-1">上传人</span>
+        <span style="flex: 3">操作</span>
+      </div>
+      <el-empty v-if="fileData && fileData.length === 0"/>
+      <div v-for="item in fileData" class="flex flex-center border-bottom padding content-sp">
+        <div class="flex-1">
+          <img v-if="item.suffix === 'docx'" class="icon" src="../../assets/svg/folder/doc.svg">
+          <img v-else-if="item.suffix === 'pdf'" class="icon" src="../../assets/svg/folder/pdf.svg">
+          <img v-else-if="item.suffix === 'xlsx'" class="icon" src="../../assets/svg/folder/xls.svg">
+        </div>
+        <span style="flex: 2">{{ item.title }}</span>
+        <span style="flex: 1">{{ item.updateTime }}</span>
+        <span class="flex-1">{{ item.size }}</span>
+        <span class="flex-1">{{ item.status }}</span>
+        <span class="flex-1">{{ item.author }}</span>
+        <div class="flex flex-center" style="flex: 3">
+          <main-button icon="View" title="详情" width="85" @click="fileView(item)"/>
+          <main-button icon="Download" title="下载" width="85" @click="downFile(item)"/>
+          <main-button icon="UploadFilled" title="同步" width="85"/>
+          <main-button icon="Delete" title="删除" width="85" @click="removeFile(item)"/>
+        </div>
+      </div>
+    </div>
+    <!-------分页----->
+    <div v-if="fileData && fileData.length !== 0" class="mt-20 flex flex-center flex-justify-end"
+         style="margin-right: 50px;padding-bottom: 20px">
+      <span class="mr-20">共{{ fileData.total }}条</span>
+      <el-pagination :total="fileData.total" background layout="prev, pager, next"/>
+    </div>
+  </div>
+</template>
+
+<route>
+{
+name: '历史文件',
+}
+</route>
+
+<script>
+import mainButton from "../../components/main-button.vue";
+import {bytesToSize} from "../../utils/tools.js";
+
+export default {
+  name: "his_files",
+  components: {mainButton},
+  data() {
+    return {
+      id: '',
+      fileData: [],
+    }
+  },
+  created() {
+    this.id = this.$route.query.id
+    this.getFileList()
+  },
+  methods: {
+    getFileList() {
+      this.$api.project.fileList({folderId: this.id}).then(res => {
+        if (res.code === 200) {
+          this.fileData = res.data.records.map(e => {
+            e.size = bytesToSize(e.volume)
+            return e
+          })
+
+        } else {
+          this.$message.error(res.msg)
+        }
+      })
+    },
+    fileView(item) {
+      this.$router.push('/home/file_detail?id=' + item.fileId)
+    },
+    downFile(item) {
+      window.open('/api/wutong-file/minio/file/downFile/' + item.dowloadFileId, '')
+    },
+    removeFile(item) {
+      this.$confirm("确认是否删除该文件?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+          .then(() => {
+                this.$api.project.fileRemove({ids: item.id}).then(res => {
+                  if (res.code === 200) {
+                    this.$message.success(res.msg)
+                    this.getFileList()
+                  } else {
+                    this.$message.error(res.msg)
+                  }
+                })
+              }
+          )
+
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.title-sp {
+  color: #596A8A;
+  height: 55px;
+}
+
+.content-sp {
+  color: #707070;
+}
+
+.flex-1 {
+  flex: 0.5;
+}
+
+.icon {
+  width: 80px;
+  height: 66px;
+}
+</style>

+ 33 - 23
src/views/recycle/index.vue

@@ -1,19 +1,5 @@
 <template>
   <div class="full-height full-width flex flex-col">
-    <div class="white-bg flex flex-align-center padding">
-      <el-select
-          v-model="keyWords"
-          class="mt-10 ml-10"
-          clearable
-          placeholder="排列方式"
-      />
-      <div class="flex flex-align-center tip mt-10">
-        <el-icon class="ml-20" color="#ECAB56">
-          <WarningFilled/>
-        </el-icon>
-        <span class="ml-5">共找到相关资料23947,34份</span>
-      </div>
-    </div>
     <avue-crud ref="crud"
                v-model="form"
                v-model:page="page"
@@ -60,23 +46,42 @@ export default {
         border: true,
         index: true,
         align: 'center',
-        viewBtn: true,
+        viewBtn: false,
         menuWidth: 260,
         dialogClickModal: false,
         column: [
           {
-            label: '文件名称',
+            label: '名称',
             prop: 'name',
             addDisplay: false,
             editDisplay: false
           },
           {
-            label: '格式',
-            prop: 'issueCumulative'
-          },
-          {
-            label: '大小(MB)',
-            prop: 'lot'
+            label: '类型',
+            prop: 'type',
+            type: 'select',
+            dicData: [
+              {
+                label: "文件夹",
+                value: 1
+              },
+              {
+                label: "文件",
+                value: 2
+              },
+              {
+                label: "项目",
+                value: 3
+              },
+              {
+                label: "阶段",
+                value: 4
+              },
+              {
+                label: "专债明细",
+                value: 5
+              }
+            ]
           },
           {
             label: '删除时间',
@@ -115,7 +120,12 @@ export default {
         })
             .then(() => {
               this.$api.recycle.recycleBack({recycleBinId: this.form.id}).then(res => {
-                console.log(res)
+                if (res.code === 200) {
+                  this.$message.success(res.msg)
+                  this.onLoad()
+                } else {
+                  this.$message.error(res.msg)
+                }
               })
             })
       }