scorpio 2 years ago
parent
commit
5ed24c62ab

+ 27 - 0
src/api/company/index.js

@@ -0,0 +1,27 @@
+import fetch from '../fetch.js'
+
+export default {
+  /**
+   * @param params
+   * @returns {Promise | Promise<unknown>}
+   */
+  list (params) {
+    return fetch('/blade-project-manage-v2/companyfilefolder/v1/page', params)
+  },
+  /**
+     * 创建公司文件夹
+     * @returns {Promise<unknown>}
+     */
+  submint (params) {
+    return fetch('/blade-project-manage-v2/companyfilefolder/v1/save', params, 'post', 'json')
+  },
+  /**
+   *
+   * @param params
+   * @returns {Promise | Promise<unknown>}
+   */
+  removeList (params) {
+    return fetch('/blade-project-manage-v2/companyfilefolder/v1/remove', params, 'post')
+  }
+
+}

+ 3 - 1
src/api/index.js

@@ -5,6 +5,7 @@ import common from './common.js'
 import recycle from './recycle/index.js'
 import database from './database/index.js'
 import task from './task/index.js'
+import company from './company/index.js'
 
 export default {
   uploadPath: '/api/wutong-file/minio/file/upload', // 上传
@@ -14,5 +15,6 @@ export default {
   common,
   recycle,
   database,
-  task
+  task,
+  company
 }

+ 1 - 1
src/api/login/index.js

@@ -26,7 +26,7 @@ export default {
     return fetch('/blade-auth/oauth/logout')
   },
   getUserInfo () {
-    return fetch('/blade-project-manage/other/v1/getUserInfo')
+    return fetch('/blade-project-manage-v2/other/v1/getUserInfo')
   },
   /**
    * 获取按钮权限

+ 10 - 10
src/api/project/index.js

@@ -6,20 +6,20 @@ export default {
      * @returns {Promise<unknown>}
      */
   projectList (current, size, params) { // 项目列表
-    return fetch('/blade-project-manage/project/v1/page', {
+    return fetch('/blade-project-manage-v2/project/v2/page', {
       ...params,
       current,
       size
     })
   },
   projectAdd (params) { // 新增项目
-    return fetch('/blade-project-manage/project/v1/save', params, 'post', 'json')
+    return fetch('/blade-project-manage-v2/project/v2/save', params, 'post', 'json')
   },
   projectRemove (params) { // 删除项目
     return fetch('/blade-project-manage/project/v1/remove', params, 'post')
   },
-  typeList () { // 项目分类列表
-    return fetch('/blade-project-manage/projecttype/v1/list')
+  typeList (params) { // 项目分类列表
+    return fetch('//blade-project-manage-v2/typeAndStage/v2/page', params)
   },
   projectInfo (id) { // 项目详细信息
     return fetch('/blade-project-manage/project/v1/detail/' + id)
@@ -37,10 +37,10 @@ export default {
     return fetch('/blade-project-manage/stage/v1/countProjectStagelist')
   },
   includeStage (params) { // 单个项目包含阶段
-    return fetch('/blade-project-manage/projectstage/v1/getProjectStageList', params)
+    return fetch('/blade-project-manage-v2/stage/v2/projectStages', params)
   },
   folderList (params) { // 阶段包含文件夹列表
-    return fetch('/blade-project-manage/projectstagefilefolder/v1/getProjectStageFileList', params)
+    return fetch('/blade-project-manage-v2/folder/v2/listByStageId', params)
   },
   sqRecord (params) { // 文件夹授权记录
     return fetch('/blade-project-manage/qrcode/v1/grantLog', params)
@@ -61,7 +61,7 @@ export default {
     return fetch('/blade-project-manage/filefolder/v1/update', params, 'post', 'json')
   },
   fileList (params) { // 文件夹里包含文件列表
-    return fetch('/blade-project-manage/bladefile/v1/getListByFolderId', params)
+    return fetch('/blade-project-manage-v2/folder/v2/getListByFolderId', params)
   },
   fileDetail (id) {
     return fetch('/wutong-library/library/detail/' + id)
@@ -70,7 +70,7 @@ export default {
     return fetch('/wutong-library/library/detail/file/' + id)
   },
   fileAdd (params) { // 上传(新增)文件
-    return fetch('/blade-project-manage/bladefile/v1/save', params, 'post', 'json')
+    return fetch('/blade-project-manage-v2/folder/v2/saveFile', params, 'post', 'json')
   },
   fileRemove (params) { // 删除文件
     return fetch('/blade-project-manage/bladefile/v1/remove', params, 'post')
@@ -81,7 +81,7 @@ export default {
      * @returns {Promise | Promise<unknown>}
      */
   initCode (params) {
-    return fetch('/blade-project-manage/qrcode/v1/getGrantQrcode', params, 'post', 'json')
+    return fetch('/blade-project-manage-v2/qrcode/v2/getGrantQrcode', params, 'post', 'json')
   },
   /**
      * 服务商触发消息发送
@@ -100,6 +100,6 @@ export default {
     return fetch('/blade-project-manage/grant/v1/applyGrant', params, 'post', 'json')
   },
   folderType (params) {
-    return fetch('/blade-project-manage/filefolder/v1/getFileTypeList', params)
+    return fetch('/blade-project-manage-v2/dict/v2/getDictList', params)
   }
 }

+ 92 - 0
src/components/basic-curd/index.vue

@@ -0,0 +1,92 @@
+<template>
+  <div class='mt-10'>
+    <!--    header-->
+    <div class='flex flex-center full-width border-bottom padding-bottom padding-top'>
+      <div class='flex-child-average' v-for='item in option.column' :key='item.label'>{{ item.label }}</div>
+    </div>
+    <!--    tabel-->
+    <el-empty v-if='data && data.length === 0'/>
+    <div v-else class='flex flex-center flex-col full-width'>
+      <div class='flex-child-average border-bottom flex full-width flex-center' v-for='(item,index) in data'
+           :key='item.title'>
+        <div class='full-width  ' v-for='(sub,subIndex) in option.column' :key='sub.label'>
+          <div v-if='sub.prop!== "action" ' class='flex flex-center'>
+            <div v-if='subIndex === 0' style='width: 100px'>
+              <div v-if='[1].includes(item.type)'>
+                <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 === 'xls'" class="icon" src="../../assets/svg/folder/xls.svg">
+                <img v-else class="icon" src="../../assets/svg/folder/other.svg">
+              </div>
+              <div v-else>
+                <img v-if="item.isAccess === 1" src="../../assets/svg/folder/see.svg" class="icon-1">
+                <img v-if="item.isAccess === 2" src="../../assets/svg/folder/edit.svg" class="icon-1">
+                <img v-else src="../../assets/svg/folder/invisible.svg" class="icon-1">
+              </div>
+            </div>
+            <div class='full-width'>{{ item[sub.prop] }}</div>
+          </div>
+          <div v-else>
+            <div class='flex flex-center'>
+              <main-button icon="View" title="详情" width="85" @click="rowView(item,index)"/>
+              <main-button icon="Download" v-if='item.type!== 3' title="下载" width="85" @click="View(item)"/>
+              <main-button icon="Delete" title="删除" width="85" @click="rowDel(item,index)"/>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import mainButton from '@/components/main-button.vue'
+
+export default {
+  name: 'index.vue',
+  components: { mainButton },
+  props: {
+    option: {
+      type: Object,
+      default: null
+    },
+    data: {
+      type: Object,
+      default: null
+    }
+  },
+  watch: {
+    option: {
+      handler (val) {
+        const tmp = val.column.filter(sub => sub.label === '操作')
+        if (tmp.length === 0) {
+          val.column.push({ label: '操作', prop: 'action' })
+        }
+      },
+      immediate: true
+    }
+  },
+  methods: {
+    rowDel (row, index) {
+      this.$emit('rowDel', row, index)
+    },
+    rowView (row, index) {
+      this.$emit('rowView', row, index)
+    }
+  }
+}
+</script>
+
+<style scoped>
+.icon {
+  width: 80px;
+  height: 66px;
+}
+
+.icon-1 {
+  margin-left: 15px;
+  width: 50px;
+  height: 66px
+}
+</style>

+ 31 - 32
src/components/upload-file.vue

@@ -49,8 +49,8 @@
 </template>
 
 <script>
-import {Base64} from 'js-base64'
-import {getToken} from '../utils/auth.js'
+import { Base64 } from 'js-base64'
+import { getToken } from '../utils/auth.js'
 import website from '@/config/website'
 import api from '@/api'
 
@@ -91,7 +91,7 @@ export default {
       default: api.uploadPath
     }
   },
-  data() {
+  data () {
     return {
       fileList: [],
       tmpFileList: [],
@@ -99,16 +99,16 @@ export default {
       oldLoadsize: 0,
       speed: '',
       headers: {
-        'Authorization': `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`,
+        Authorization: `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`,
         'Blade-Auth': 'bearer ' + getToken()
       }
     }
   },
   methods: {
-    format(percentage) {
-      return percentage.toFixed(2) + "%"
+    format (percentage) {
+      return percentage.toFixed(2) + '%'
     },
-    progress(event, file, fileList) {
+    progress (event, file, fileList) {
       this.speed = this.uploadSpeed(event)
       this.tmpFileList.map(item => {
         if (item.uid === file.uid) {
@@ -116,39 +116,38 @@ export default {
         }
         return item
       })
-
     },
-    uploadSpeed(evt) {
-      let timestamp = new Date().valueOf();
-      let duration = timestamp - this.oldTimestamp; // 间隔时间(毫秒)
+    uploadSpeed (evt) {
+      const timestamp = new Date().valueOf()
+      const duration = timestamp - this.oldTimestamp // 间隔时间(毫秒)
       if (duration > 0) {
-        let size = evt.loaded - this.oldLoadsize;
-        let bitrate = ((size * 8) / duration / 1024) * 1000; // kbps
+        const size = evt.loaded - this.oldLoadsize
+        let bitrate = ((size * 8) / duration / 1024) * 1000 // kbps
         if (bitrate > 1000) {
-          bitrate = (Math.round(bitrate / 1000) * 0.125).toFixed(2) + "M/s";
+          bitrate = (Math.round(bitrate / 1000) * 0.125).toFixed(2) + 'M/s'
         } else {
-          bitrate = (Math.round(bitrate) * 0.125).toFixed(2) + "K/s";
+          bitrate = (Math.round(bitrate) * 0.125).toFixed(2) + 'K/s'
         }
-        this.oldLoadsize = evt.loaded;
+        this.oldLoadsize = evt.loaded
         this.oldTimestamp = new Date().valueOf()
-        return bitrate;
+        return bitrate
       }
     },
-    bytesToSize(bytes) {
-      const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
-      if (bytes === 0) return 'n/a';
-      const i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
-      if (i === 0) return bytes + ' ' + sizes[i];
-      return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i];
+    bytesToSize (bytes) {
+      const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']
+      if (bytes === 0) return 'n/a'
+      const i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)))
+      if (i === 0) return bytes + ' ' + sizes[i]
+      return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i]
     },
-    handleChange(file, fileList) {
+    handleChange (file, fileList) {
       this.tmpFileList = fileList
     },
-    maxChange() {
+    maxChange () {
       this.$message.warning(`最多只能上传${this.max}个文件`)
     },
-    success() {
-      let finishList = this.tmpFileList.filter(sub => sub.status === "success")
+    success () {
+      const finishList = this.tmpFileList.filter(sub => sub.status === 'success')
       if (finishList.length === this.tmpFileList.length) {
         this.$emit('success', {
           fileList: this.tmpFileList
@@ -160,23 +159,23 @@ export default {
         }, 2000)
       }
     },
-    close() {
+    close () {
       this.$refs.upload.abort()
       this.$refs.upload.clearFiles()
       this.tmpFileList = []
       this.$emit('close')
     },
-    submint() {
+    submint () {
       if (this.tmpFileList && this.tmpFileList.length === 0) {
         this.$message.error('请先选择要上传的文件')
         return
       }
       this.$refs.upload.submit()
     },
-    remove(file, fileList) {
+    remove (file, fileList) {
       this.$emit('remove', {
-        file: file,
-        fileList: fileList
+        file,
+        fileList
       })
     }
   }

+ 56 - 18
src/layout/left.vue

@@ -1,16 +1,23 @@
 <template>
   <div class='box-shadow-blue full-height' style="background-color: #F4F3EE">
     <div class='padding mt-20'>
-      <div class='flex flex-center mt-10' style="margin-bottom: 80px">
+      <div class='flex flex-center mt-10' style="margin-bottom: 60px">
         <img src='@/assets/svg/logo.svg'/>
       </div>
     </div>
     <div>
-      <div class="flex flex-center flex-col bold font-18 item-bg">
-        <div v-for="(item,index) in data" :key="item.name" class="flex flex-center pointer"
-             :class="active === index ? 'item-s' : 'item'" @click="navClick(item,index)">
-          <img :src=item.img>
-          <span class="ml-10">{{ item.name }}</span>
+      <div class="flex flex-center flex-col bold font-18 item-bg  padding-bottom full-width ">
+        <div v-for="(item,index) in data" :key="item.name" class="full-width  flex flex-col flex-center pointer ">
+          <div class='full-width flex flex-center padding' style='z-index: 2' :class="active === index ? 'item-s' : 'item'" @click="navClick(item,index)">
+            <img :src=item.img>
+            <span class="flex-child-average">{{ item.name }}</span>
+          </div>
+          <div v-if='item.children && item.children.length > 0 && active === index' class=' flex flex-col flex-center item-sub padding'>
+            <div v-for='(sub,subIndex) in item.children' :key='item' class='padding full-width flex flex-center' :class='subIndex === subActive ?  "item-sub-active":"" ' @click='subClick(sub,subIndex)'>
+              <div class='mr-10 main-color'>·</div>
+              <span>{{ sub.name }}</span>
+            </div>
+          </div>
         </div>
       </div>
     </div>
@@ -22,9 +29,10 @@ export default {
   data () {
     return {
       active: 0,
+      subActive: 0,
       data: [
         {
-          name: '项目库',
+          name: '项  库',
           img: new URL('../assets/svg/icon1.svg', import.meta.url).href,
           path: '/'
         },
@@ -34,12 +42,23 @@ export default {
           path: '/task'
         },
         {
-          name: '资料库',
+          name: '资  库',
           img: new URL('../assets/svg/icon2.svg', import.meta.url).href,
-          path: '/database'
+          children: [
+            {
+              name: '项目资料',
+              img: new URL('../assets/svg/icon1.svg', import.meta.url).href,
+              path: '/database'
+            },
+            {
+              name: '公司资料',
+              img: new URL('../assets/svg/icon1.svg', import.meta.url).href,
+              path: '/company'
+            }
+          ]
         },
         {
-          name: '回收站',
+          name: '回  站',
           img: new URL('../assets/svg/icon3.svg', import.meta.url).href,
           path: '/recycle'
         }
@@ -61,6 +80,15 @@ export default {
     },
     navClick (item, index) {
       this.active = index
+      if (item.children && item.children.length > 0) {
+        this.subActive = 0
+        this.$router.push(item.children[0].path)
+      } else {
+        this.$router.push(item.path)
+      }
+    },
+    subClick (item, index) {
+      this.subActive = index
       this.$router.push(item.path)
     }
   }
@@ -78,28 +106,38 @@ export default {
 }
 
 .item-bg {
-  margin: 0 20px;
   border-top: 1px solid #D1D1D1;
   border-bottom: 1px solid #D1D1D1;
-  padding-bottom: 40px
 }
 
 .item-s {
-  height: 58px;
-  width: 180px;
+  width: 150px;
   border-radius: 14px;
-  margin-top: 40px;
+  margin-top: 30px;
   color: white;
   background-color: #AB7630;
   box-shadow: 2px 2px 10px 2px rgba(242, 162, 58, 0.49);
 }
 
 .item {
-  height: 58px;
-  width: 180px;
+  width: 150px;
   border-radius: 14px;
-  margin-top: 40px;
+  margin-top: 30px;
   color: #707070;
 }
 
+.item-sub {
+  width: 150px;
+  border-bottom-left-radius: 14px;
+  border-bottom-right-radius: 14px;
+  margin-top: -10px;
+  padding-top: 20px;
+  color: #939393;
+  background-color: #E4E4E4;
+}
+
+.item-sub-active {
+  background-color: #D3D3D3;
+}
+
 </style>

+ 363 - 0
src/views/company/index.vue

@@ -0,0 +1,363 @@
+<template>
+  <el-row :gutter="8" class='mt-10'>
+    <el-col :span="4">
+      <basic-container style='min-height: 720px;padding-left: 0'>
+        <div class='full-width  flex flex-center flex-justify-between'>
+          <span class='bold'>文件柜分类</span>
+          <el-button type='primary' @click='addFolder'>新 增</el-button>
+        </div>
+        <el-divider/>
+        <div class='flex flex-col flex-justify-start flex-align-start padding' style='min-height: 900px'>
+          <span class=' full-width' v-for='(item,index) in folders' :key='item.id'>
+            <div class='item full-width flex flex-col pointer' :class='active === index ? "item-selected":"" '
+                 @click='changeFolder(index)'>
+              {{ item.title }}
+            </div>
+          </span>
+        </div>
+      </basic-container>
+    </el-col>
+    <el-col :span="20">
+      <basic-container class="grid-content bg-purple">
+        <div class='flex flex-center flex-justify-between'>
+          <div class='flex flex-center'>
+            <base-button class="ml-20 " icon="Plus" title="上传文件"
+                         @click="show = true"/>
+            <base-button class="ml-20 " icon="Back" title="返回上一层"
+                         v-if='currentFolder && currentFolder.parentId !== 0'
+                         @click="backFolder"/>
+          </div>
+
+          <div class='flex flex-center'>
+            <base-button class="ml-20 " icon="Plus" title="授权"
+                         @click="authorShow = true"/>
+            <base-button class="ml-20 " icon="Plus" title="新建文件夹"
+                         @click="addSubFolder"/>
+          </div>
+        </div>
+        <basic-curd
+            :option="option"
+            :data="data"
+            @row-view='rowDetail'
+            @row-del="rowDel"
+        ></basic-curd>
+      </basic-container>
+    </el-col>
+    <!--    dialog-->
+    <el-dialog v-model='show' title='上传文件'>
+      <div>
+        <el-upload
+            drag
+            :action="action"
+            multiple
+            accept='.doc,.docx,.pdf,.xls,.xlsx,.png,.jpg,.jpeg,.ppt,pptx'
+            show-file-list
+            :on-success='uploadSuccess'
+        >
+          <el-icon class="el-icon--upload">
+            <upload-filled/>
+          </el-icon>
+          <div class="el-upload__text">
+            拖拽或者 <em>点击上传文件</em>
+          </div>
+        </el-upload>
+        <el-divider/>
+        <div class='flex flex-justify-end'>
+          <el-button @click='show = false'>取 消</el-button>
+          <el-button type='primary' @click='saveFile'>确 定</el-button>
+        </div>
+      </div>
+    </el-dialog>
+
+    <el-image-viewer
+        v-if='showImage'
+        :url-list="imgList"
+        @close='showImage = false'
+    />
+    <el-dialog v-model='authorShow' title='批量授权'>
+      <authorize :list='data' :folder-id='currentFolder.id' :extra='{type:2}' @close='authorShow = false'/>
+    </el-dialog>
+  </el-row>
+</template>
+
+<script>
+import BasicContainer from '@/components/basic-container/main.vue'
+import baseButton from '@/components/base-button.vue'
+import basicCurd from '@/components/basic-curd/index.vue'
+import api from '@/api'
+import authorize from '@/views/home/component/authorize.vue'
+
+export default {
+  name: 'index',
+  components: { BasicContainer, baseButton, basicCurd, authorize },
+  data () {
+    return {
+      authorShow: false,
+      showImage: false,
+      imgList: [],
+      folders: [],
+      show: false,
+      active: 0,
+      form: {},
+      data: [],
+      action: api.uploadPath,
+      option: {
+        align: 'center',
+        menuAlign: 'center',
+        menuWidth: 380,
+        size: 'mini',
+        addBtn: false,
+        viewBtn: true,
+        editBtn: false,
+        refreshBtn: false,
+        columnBtn: false,
+        labelWidth: 140,
+        border: true,
+        column: [
+          {
+            label: '文件/文件夹名称',
+            prop: 'title'
+          },
+          {
+            label: '更新/上传时间',
+            prop: 'updateTime'
+          },
+          {
+            label: '文件',
+            prop: 'updateTime'
+          }
+        ]
+      },
+      currentFolder: null,
+      lastParentFolder: [],
+      page: {
+        size: 10,
+        current: 1,
+        total: 0
+      },
+      fileList: []
+    }
+  },
+  created () {
+    this.list()
+  },
+  methods: {
+    list () {
+      this.$api.company.list({ current: 1, size: 100, parentId: '' }).then(res => {
+        if (res.code === 200) {
+          this.folders = res.data.records
+          if (this.folders.length > 0 && this.currentFolder !== null) {
+            this.currentFolder = this.folders[0]
+          }
+          this.onLoad()
+        } else {
+          this.$message.error(res.msg)
+        }
+      })
+    },
+    addFolder () {
+      this.$prompt('请输入分类名称', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消'
+      }).then(({ value }) => {
+        this.$api.company.submint({ title: value }).then(res => {
+          if (res.code === 200) {
+            this.$message.success(res.msg)
+            this.list()
+          } else {
+            this.$message.error(res.msg)
+          }
+        })
+      })
+    },
+    changeFolder (index) {
+      this.active = index
+      this.currentFolder = this.folders[index]
+      this.page.current = 1
+      this.onLoad()
+    },
+    onLoad () {
+      const data = { parentId: this.currentFolder.id }
+      this.$api.company.list(Object.assign(data, this.page)).then(res => {
+        if (res.code === 200) {
+          this.data = res.data.records
+          this.page.total = res.data.total
+        } else {
+          this.$message.error(res.msg)
+        }
+      }).finally(() => {
+        this.loading = false
+      })
+    },
+    rowSave (row, done, loading) {
+      const data = {
+        projectInfoId: this.info.id
+      }
+      this.$api.projects.meeting.save(Object.assign(row, data)).then((res) => {
+        if (res.code === 200) {
+          this.$message.success(res.msg)
+        } else {
+          this.$message.error(res.msg)
+        }
+        done(row)
+        this.onLoad()
+      }, error => {
+        window.console.log(error)
+        loading()
+      })
+    },
+    rowUpdate (row, index, done, loading) {
+      const data = {
+        projectInfoId: this.info.id
+      }
+      this.$api.projects.meeting.update(Object.assign(row, data)).then((res) => {
+        if (res.code === 200) {
+          this.$message.success(res.msg)
+        } else {
+          this.$message.error(res.msg)
+        }
+        done(row)
+        this.onLoad()
+      }, error => {
+        window.console.log(error)
+        loading()
+      })
+    },
+    rowDetail (row, index) {
+      if (row.type === 1) {
+        this.imgList = [row.url]
+        this.showImage = true
+      } else if (row.type === 2) {
+        const routeData = this.$router.resolve({ path: '/home/file_detail', query: { id: row.fileId } })
+        window.open(routeData.href, '_blank')
+      } else {
+        this.lastParentFolder = this.lastParentFolder.filter(sub => sub.id !== this.currentFolder.id)
+        this.lastParentFolder.push(this.currentFolder)
+        this.currentFolder = row
+        this.onLoad()
+      }
+    },
+    rowDel (row, index, done) {
+      console.log(row, index, done)
+      this.$confirm('确定将选择数据删除?', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        return this.$api.company.removeList({ ids: row.id })
+      }).then(() => {
+        this.$message({
+          type: 'success',
+          message: '操作成功!'
+        })
+        // 数据回调进行刷新
+        this.onLoad()
+      }).catch(() => {
+      })
+    },
+    uploadSuccess (res, file, files) {
+      this.fileList = files.map(sub => sub.response.data)
+    },
+    saveFile () {
+      if (this.fileList.length === 0) {
+        return
+      }
+      this.fileList.forEach(sub => {
+        if (['pdf', 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx'].includes(sub.suffix)) {
+          // save Library
+          const data = {
+            title: sub.originalFileName,
+            fileId: sub.id,
+            suffix: sub.suffix,
+            volume: sub.volume,
+            url: sub.filePath,
+            category: 4,
+            content: '',
+            parentId: this.currentFolder.id
+          }
+          this.$api.common.submit(data).then(res => {
+            if (res.code === 200) {
+              this.addFile(this.currentFolder.id, sub, 1)
+            } else {
+              this.$message.error(res.msg)
+            }
+          })
+        } else {
+          this.addFile(this.currentFolder.id, sub, 1)
+        }
+      })
+    },
+    /**
+     * 保存文件
+     * @param parentId
+     * @param item
+     * @param type 1 图片 2 文件夹
+     */
+    addFile (parentId, item, type) {
+      const data = {
+        title: item.originalFileName,
+        parentId,
+        fileId: item.id,
+        suffix: item.suffix,
+        volume: item.volume,
+        url: item.filePath,
+        type
+      }
+      this.$api.company.submint(data).then(res => {
+        if (res.code === 200) {
+          this.show = false
+          this.onLoad()
+        } else {
+          this.$message.error(res.msg)
+        }
+      })
+    },
+    addSubFolder () {
+      this.$prompt('请输入文件夹名称', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消'
+      }).then(({ value }) => {
+        const data = { parentId: this.currentFolder.id, title: value, type: 2 }
+        this.$api.company.submint(data).then(res => {
+          if (res.code === 200) {
+            this.$message.success(res.msg)
+            this.onLoad()
+          } else {
+            this.$message.error(res.msg)
+          }
+        })
+      })
+    },
+    backFolder () {
+      this.currentFolder = this.lastParentFolder[this.lastParentFolder.length - 1]
+      this.lastParentFolder = this.lastParentFolder.filter(sub => sub.id !== this.currentFolder.id)
+      this.onLoad()
+    }
+  }
+}
+</script>
+
+<style scoped>
+.item {
+  padding: 10px 5px;
+  margin-bottom: 10px;
+  border-radius: 8px;
+  text-align: left;
+  background-color: #E4E4E4;
+}
+
+.item:hover {
+  background-color: #AB7630;
+  color: white;
+}
+
+.item-selected {
+  background-color: #AB7630;
+  color: white;
+}
+
+.icon {
+  width: 80px;
+  height: 66px;
+}
+</style>

+ 71 - 67
src/views/home/component/authorize.vue

@@ -1,11 +1,17 @@
 <template>
   <div class='flex flex-justify-between flex-col  full-width '>
-    <el-tabs type='border-card'>
+    <div class='flex flex-justify-start flex-align-center full-width'>
+      <span class='bold'>授权模式:</span>
+      <el-radio-group v-model='grantType'>
+        <el-radio :label="1">项目全托管</el-radio>
+        <el-radio :label="0">按项目授权</el-radio>
+      </el-radio-group>
+    </div>
+    <el-tabs v-if='grantType === 0' class='mt-20' type='border-card' v-model='initType'>
       <el-tab-pane label='授权文件夹'>
-        <div class='flex full-width full-height border-bottom padding-bottom bold '>
-          <span class='flex-child-average text-center'>文件夹名称</span>
-          <span class='flex-child-average text-center'>更新(上传)时间</span>
-          <span class='flex-child-average text-center'>权限设置</span>
+        <div class='flex full-width full-height flex-justify-around border-bottom padding-bottom bold '>
+          <span class='text-center'>文件夹名称</span>
+          <span class='text-center'>权限设置</span>
         </div>
         <div class='border-bottom padding-right padding-left mt-10' style='height: 500px'>
           <div class='flex flex-align-center mb-10 flex-justify-between border-bottom'>
@@ -13,6 +19,7 @@
             <el-radio-group v-model="check" @change='allChange($event,1)'>
               <el-radio label="1" size="large">可见</el-radio>
               <el-radio label="2" size="large">可编辑</el-radio>
+              <el-radio label="3" size="large">不可操作</el-radio>
             </el-radio-group>
           </div>
           <div style='overflow-y: scroll; height: 450px' v-loading='loading'>
@@ -21,32 +28,10 @@
             </div>
           </div>
         </div>
-        <div class='full-width flex flex-align-center mt-10'>
-          <span class='font-14 bold'>授权时长</span>
-          <el-date-picker
-              v-model="authorizeDate"
-              class='ml-20'
-              end-placeholder="截止日期"
-              range-separator="至"
-              start-placeholder="开始日期"
-              type="daterange"
-              value-format='YYYY-MM-DD'
-          />
-        </div>
-        <div class='full-width flex flex-align-center mt-10'>
-          <span class='font-14 bold'>生成授权连接</span>
-          <el-button circle class='ml-20' icon="Picture" type="danger" @click='initCode(1)'/>
-          <!--      <el-button circle icon="Paperclip" type="danger"/>-->
-        </div>
-        <div class='full-width mt-20 border-top padding-top flex flex-justify-end'>
-          <el-button @click='close'>取消</el-button>
-          <el-button type='primary' @click='close'>关闭</el-button>
-        </div>
       </el-tab-pane>
       <el-tab-pane label='授权文件'>
-        <div class='flex full-width full-height border-bottom padding-bottom bold '>
+        <div class='flex full-width full-height flex-justify-around border-bottom padding-bottom bold '>
           <span class='flex-child-average text-center'>文件名称</span>
-          <span class='flex-child-average text-center'>更新(上传)时间</span>
           <span class='flex-child-average text-center'>权限设置</span>
         </div>
         <div class='border-bottom padding-right padding-left mt-10' style='height: 500px'>
@@ -64,30 +49,32 @@
             </div>
           </div>
         </div>
-        <div class='full-width flex flex-align-center mt-10'>
-          <span class='font-14 bold'>授权时长</span>
-          <el-date-picker
-              v-model="authorizeDate"
-              class='ml-20'
-              end-placeholder="截止日期"
-              range-separator="至"
-              start-placeholder="开始日期"
-              type="daterange"
-              value-format='YYYY-MM-DD'
-              format='YYYY-MM-DD'
-          />
-        </div>
-        <div class='full-width flex flex-align-center mt-10'>
-          <span class='font-14 bold'>生成授权连接</span>
-          <el-button circle class='ml-20' icon="Picture" type="danger" @click='initCode(2)'/>
-          <!--      <el-button circle icon="Paperclip" type="danger"/>-->
-        </div>
-        <div class='full-width mt-20 border-top padding-top flex flex-justify-end'>
-          <el-button @click='close'>取消</el-button>
-          <el-button type='primary' @click='close'>关闭</el-button>
-        </div>
       </el-tab-pane>
     </el-tabs>
+    <div>
+      <div class='full-width flex flex-align-center mt-10'>
+        <span class='font-14 bold'>授权时长</span>
+        <el-date-picker
+            v-model="authorizeDate"
+            class='ml-20'
+            end-placeholder="截止日期"
+            range-separator="至"
+            start-placeholder="开始日期"
+            type="daterange"
+            value-format='YYYY-MM-DD'
+            format='YYYY-MM-DD'
+        />
+      </div>
+      <div class='full-width flex flex-align-center mt-10'>
+        <span class='font-14 bold'>生成授权连接</span>
+        <el-button circle class='ml-20' icon="Picture" type="danger" @click='initCode(2)'/>
+        <!--      <el-button circle icon="Paperclip" type="danger"/>-->
+      </div>
+      <div class='full-width mt-20 border-top padding-top flex flex-justify-end'>
+        <el-button @click='close'>取消</el-button>
+        <el-button type='primary' @click='close'>关闭</el-button>
+      </div>
+    </div>
     <el-dialog v-model='qrCodeShow' top='20%' width='400px'>
       <div class='flex flex-col flex-center' style='height: 400rpx;width: 400rpx'>
         <vue-qr :currentLevel='3' :logoCornerRadius='4' :logoScale='0.25' :text='qrCodeText'
@@ -117,6 +104,10 @@ export default {
     projectId: {
       type: String,
       default: ''
+    },
+    extra: {
+      type: Object,
+      default: null
     }
   },
   watch: {
@@ -126,8 +117,8 @@ export default {
           sub.check = this.check
           return sub
         })
-        this.folderList = val.filter(sub => sub.type !== '1')
-        this.fileList = val.filter(sub => sub.type === '1')
+        this.folderList = val.filter(sub => sub.type !== 1)
+        this.fileList = val.filter(sub => sub.type === 1)
       },
       immediate: true
     }
@@ -142,23 +133,23 @@ export default {
       fileList: [],
       folderList: [],
       qrCodeText: '',
-      defaultDate: []
+      defaultDate: [],
+      // 0 部分授权,1 全托管授权
+      grantType: 0,
+      initType: '0'
     }
   },
   methods: {
     close () {
       this.$emit('close')
     },
-    initCode (type) {
+    initCode () {
       this.loading = true
       let list = this.folderList
-      if (this.folderId.length === 0) {
-        this.$message.error('当前目录下没有可以授权的文件')
-        return
-      }
-      if (type === 2) {
+      if (this.initType === '1') {
         list = this.fileList
       }
+      console.log(list)
       if (this.authorizeDate.length === 0) {
         this.$message.error('请设置授权时间')
         return
@@ -177,18 +168,31 @@ export default {
       }]
 
       const folderTmp = list.map(sub => {
-        const item = { folderId: sub.hasOwnProperty('fileFolderId') ? sub.fileFolderId : sub.id, startTime: this.startTime, endTime: this.endTime, status: sub.check }
+        const item = {
+          folderId: sub.hasOwnProperty('fileFolderId') ? sub.fileFolderId : sub.id,
+          startTime: this.startTime,
+          endTime: this.endTime,
+          status: sub.check,
+          folderName: sub.title
+        }
         return item
       })
-      this.$api.project.initCode({
-        files: type === 1 ? [] : fileTmps,
-        folders: type === 2 ? folder : folder.concat(folderTmp),
-        type: 1,
-        projectId: this.projectId
-      }).then(res => {
+      const query = []
+      for (const k in this.extra) {
+        query.push(k + '=' + this.extra[k])
+      }
+      const data = {
+        files: this.initType === '0' ? [] : fileTmps,
+        folders: this.folderId.length === 0 ? folderTmp : folder.concat(folderTmp),
+        projectId: this.projectId,
+        grantType: this.grantType,
+        startTime: this.startTime,
+        endTime: this.endTime
+      }
+      this.$api.project.initCode(Object.assign(data, this.extra)).then(res => {
         this.loading = false
         if (res.code === 200) {
-          this.qrCodeText = 'https://dev.wutongresearch.club/apply?id=' + res.data.qrcode.qrcodeId + '&roleName=服务商'
+          this.qrCodeText = 'https://dev.wutongresearch.club/apply?id=' + res.data + (query.length > 0 ? '&' + query.join('&') : '')
           this.qrCodeShow = true
         } else {
           this.$message.error(res.msg)

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

@@ -45,7 +45,7 @@
           </el-button>
         </div>
       </template>
-      <authorize :list='data.records' :folder-id='id' :project-id='projectId' @close='authorizeShow = false'/>
+      <authorize :list='data.records' :folder-id='id' :extra='{type:1}' :project-id='projectId' @close='authorizeShow = false'/>
     </el-dialog>
     <el-dialog v-model='addShow' append-to-body width='40%'>
       <div class="flex flex-col">
@@ -136,13 +136,15 @@ export default {
         item.volume = res.response.data.volume
         item.fileId = res.response.data.id
         item.url = res.response.data.filePath
-        item.fileFolderId = this.id
+        item.parentId = this.id
         item.projectId = this.$route.query.projectId
+        item.type = 1
+        item.stageId = this.$route.query.projectStageId
         return item
       })
       this.fileList.forEach(sub => {
         this.saveCount++
-        if (['pdf', 'doc'].includes(sub.suffix)) {
+        if (['pdf', 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx'].includes(sub.suffix)) {
           this.saveLibrary(sub)
         }
         if (this.saveCount === this.fileList.length) {

+ 3 - 4
src/views/home/component/dash.vue

@@ -284,13 +284,12 @@ export default {
     onLoad (query = {}) {
       this.loading = true
       const data = { ...query }
-      console.log(data)
       this.$api.project.projectList(this.page.currentPage, this.page.pageSize, data).then(res => {
         this.loading = false
         if (res.code === 200) {
-          this.data = res.data.content
+          this.data = res.data.records
           this.num = res.msg
-          this.page.total = res.data.totalElements
+          this.page.total = res.data.total
           this.loading = false
         }
         this.getStageList()
@@ -346,7 +345,7 @@ export default {
       })
     },
     getTypeList () {
-      this.$api.project.typeList().then(res => {
+      this.$api.project.typeList({ type: 1, size: 999, current: 1 }).then(res => {
         this.typeList = res.data.records
       })
       this.$api.common.dicList({ code: 'project-tags' }).then(res => {

+ 27 - 27
src/views/home/component/files_list.vue

@@ -13,36 +13,34 @@
       </div>
       <el-empty v-if="files && files.length === 0"/>
       <div v-for="item in files" v-else :key='item.id' class="flex flex-center border-bottom padding content-sp">
-        <div v-if="item.type === '1'" class="flex-05">
+        <div v-if="item.type === 1" class="flex-05">
           <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 === 'xls'" class="icon" src="../../../assets/svg/folder/xls.svg">
           <img v-else class="icon" src="../../../assets/svg/folder/other.svg">
         </div>
         <div v-else class="flex-05 pointer" @click="View(item)">
-          <img v-if="item.isAccess === '1'" src="../../../assets/svg/folder/see.svg" class="icon-1">
-          <img v-if="item.isAccess === '2'" src="../../../assets/svg/folder/edit.svg" class="icon-1">
-          <img v-if="item.isAccess === '3'" src="../../../assets/svg/folder/invisible.svg" class="icon-1">
+          <img v-if="item.isAccess === 1" src="../../../assets/svg/folder/see.svg" class="icon-1">
+          <img v-if="item.isAccess === 2" src="../../../assets/svg/folder/edit.svg" class="icon-1">
+          <img v-if="item.isAccess === 3" src="../../../assets/svg/folder/invisible.svg" class="icon-1">
         </div>
         <span style="flex: 1.5;text-align: left">{{ item.title }}</span>
         <span class="flex-1">{{ item.createTime }}</span>
-        <span v-if="item.type === '1'" class="flex-05">{{ item.size }}</span>
-        <span v-if="item.type === '2'" class="flex-05">{{ item.fileChildrenNumber }}个</span>
-        <!--        <span v-if="item.type === '1'" class="flex-05">{{ item.status }}</span>-->
-        <!--        <span v-if="item.type === '2'" class="flex-05">-</span>-->
-        <span v-if="item.type === '1'" class="flex-05">{{ item.createUserName }}</span>
-        <span v-if="item.type === '2'" class="flex-05">-</span>
-        <span v-if="item.type === '1'" class="flex-1">{{ item.deptName }}</span>
-        <span v-if="item.type === '2'" class="flex-1">-</span>
+        <span v-if="item.type === 1" class="flex-05">{{ item.size }}</span>
+        <span v-if="item.type === 2" class="flex-05">{{ item.fileAmount }}个</span>
+        <span v-if="item.type === 1" class="flex-05">{{ item.createUserName }}</span>
+        <span v-if="item.type === 2" class="flex-05">-</span>
+        <span v-if="item.type === 1" class="flex-1">{{ item.createDeptName }}</span>
+        <span v-if="item.type === 2" class="flex-1">-</span>
         <div class="flex flex-center" style="flex: 1.5">
           <main-button icon="View" title="详情" width="85" @click="View(item)"/>
-          <main-button v-if="item.type === '1' && item.isAccess === '2' " icon="Download" title="下载" width="85"
+          <main-button v-if="item.type === 1 && item.isAccess ===2 " icon="Download" title="下载" width="85"
                        @click="downFile(item)"/>
-          <main-button v-else-if="item.type === '2' && item.isAccess === '2'" icon="Upload" title="上传文件" width="85"
+          <main-button v-else-if="item.type === 2 && item.isAccess === 2" icon="Upload" title="上传文件" width="85"
                        @click="upload(item)"/>
-          <main-button v-else-if="item.type === '2' && item.isAccess === '3'" icon="Position"
+          <main-button v-else-if="item.type === 2 && item.isAccess === 3" icon="Position"
                        title="授权申请" width="85" @click="folderApply(item)"/>
-          <main-button v-if='permission && permission.permissions.home_folder_del && item.isAccess === "2" '
+          <main-button v-if='permission && permission.permissions.home_folder_del && item.isAccess === 2 '
                        icon="Delete" title="删除" width="85"
                        @click="removeFile(item)"/>
         </div>
@@ -172,7 +170,8 @@ export default {
   },
   methods: {
     View (item) {
-      if (item.type === '1') {
+      console.log(item)
+      if (item.type === 1) {
         if (['png', 'jpg'].includes(item.suffix)) {
           this.showImage = true
           this.imgList.push(item.url)
@@ -180,21 +179,20 @@ export default {
         }
         const routeData = this.$router.resolve({ path: '/home/file_detail', query: { id: item.fileId } })
         window.open(routeData.href, '_blank')
-      } else if (item.type === '2') {
+      } else {
         this.query.id = item.id
-        console.log(item)
         this.$router.push({
           path: '/home/files',
           query: {
             id: item.id,
-            projectId: this.query.projectId,
-            projectStageId: this.query.projectStageId,
-            dictKey: this.query.dictKey,
+            projectId: item.projectId,
+            projectStageId: item.stageId,
+            dictKey: item.dictKey,
             parentId: item.id,
             isAccess: item.isAccess,
             ownerId: this.query.ownerId,
             folderName: item.title,
-            folderNumber: item.fileChildrenNumber
+            folderNumber: item.fileAmount
           }
         })
       }
@@ -203,9 +201,9 @@ export default {
       this.show = true
       this.fileFolderId = item.id
       this.folderName = item.title
+      this.currentFolder = item
     },
     success (res) {
-      console.log(this.fileFolderId)
       this.fileList = res.fileList.map(res => {
         const item = {}
         item.title = res.response.data.originalFileName
@@ -213,13 +211,15 @@ export default {
         item.volume = res.response.data.volume
         item.fileId = res.response.data.id
         item.url = res.response.data.filePath
-        item.fileFolderId = this.fileFolderId
-        item.projectId = this.$route.query.projectId
+        item.projectId = this.currentFolder.projectId
+        item.stageId = this.currentFolder.stageId
+        item.parentId = this.currentFolder.id
+        item.type = 1
         return item
       })
       this.fileList.forEach(sub => {
         this.saveCount++
-        if (['pdf', 'doc'].includes(sub.suffix)) {
+        if (['pdf', 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx'].includes(sub.suffix)) {
           this.saveLibrary(sub)
         }
         if (this.saveCount === this.fileList.length) {

+ 5 - 5
src/views/home/component/folder_info.vue

@@ -29,7 +29,7 @@
     <div class="flex flex-center mt-15">
       <div class="flex flex-center" style="flex: 3.8">
         <div v-for="(item,index) in folderType" :key='item.id' class="flex flex-center tab">
-          <el-badge :value='item.fileChildrenNumber' :hidden='item.fileChildrenNumber === 0'>
+          <el-badge :value='item.fileAmount' :hidden='item.fileAmount === 0'>
             <div :class="active === index ? 'tab-active' : ''"
                  @click="change(index,item.dictKey)">{{ item.dictValue }}
             </div>
@@ -89,7 +89,7 @@
     />
     <!--    授权-->
     <el-dialog v-model='authorizeShow' append-to-body width='40%'>
-      <authorize :list='folderList' @close='authorizeShow = false' :project-id='projectId'/>
+      <authorize :list='folderList' @close='authorizeShow = false' :project-id='projectId' :extra='{type:1}'/>
     </el-dialog>
   </div>
 </template>
@@ -165,7 +165,7 @@ export default {
   },
   methods: {
     getDict () {
-      this.$api.project.folderType({ projectStageId: this.projectStageId }).then(res => {
+      this.$api.project.folderType({ stageId: this.projectStageId }).then(res => {
         if (res.code === 200) {
           this.folderType = res.data
           this.change(0, this.folderType[0].dictKey)
@@ -183,7 +183,7 @@ export default {
     },
     getFolderList () {
       const data = {
-        projectStageId: this.projectStageId,
+        stageId: this.projectStageId,
         folderName: this.keyWords,
         dictKey: this.dictKey
       }
@@ -191,7 +191,7 @@ export default {
         if (res.code === 200) {
           this.folderList = res.data.records.map(sub => {
             const item = sub
-            item.title = sub.folderName
+            item.title = sub.title
             return item
           })
           this.total = res.data.total

+ 16 - 18
src/views/home/component/folder_list.vue

@@ -19,13 +19,13 @@
           <img v-else class="icon" src="../../../assets/svg/folder/invisible.svg">
         </div>
         <div class="flex" style="flex:2;text-align: left">
-          <span>{{ item.folderName }}</span>
+          <span>{{ item.title }}</span>
           <el-icon style="margin-top: 3px;margin-left: 2px" @click="showUpdate(item)">
             <Edit/>
           </el-icon>
         </div>
         <span style="flex: 1">{{ item.updateTime }}</span>
-        <span style="flex: 1.5">{{ item.fileNumber }}</span>
+        <span style="flex: 1.5">{{ item.fileAmount }}</span>
         <div class="flex flex-center" style="flex: 3">
           <main-button icon="View" title="详情" width="85"
                        @click="fileView(item)"/>
@@ -77,7 +77,7 @@
           </el-button>
         </div>
       </template>
-      <authorize :list='fileData.records' :folder-id='currentRow.fileFolderId' :project-id='projectId'
+      <authorize :list='fileData.records' :folder-id='currentRow.fileFolderId' :project-id='projectId' :extra='{type:1}'
                  @close='authorizeShow = false'/>
     </el-dialog>
     <el-dialog v-model='sendMsg' top='20%' width='400px'>
@@ -139,9 +139,9 @@
         </div>
       </div>
     </el-dialog>
-<!--    任务下发-->
+    <!--    任务下发-->
     <el-dialog v-model='taskShow' append-to-body title='任务下发'>
-      <task :project-id='projectId' :folders='currentFolders' @close='closeTask'></task>
+      <task :project-id='projectId' :folders='currentFolders'  @close='closeTask'></task>
     </el-dialog>
   </div>
 </template>
@@ -226,14 +226,14 @@ export default {
         this.$router.push({
           path: '/home/files',
           query: {
-            id: item.fileFolderId,
-            projectId: this.projectId,
+            id: item.id,
+            projectId: item.projectId,
             ownerId: this.ownerId,
-            dictKey: this.dictKey,
-            projectStageId: item.projectStageId,
+            dictKey: item.dictKey,
+            projectStageId: item.stageId,
             isAccess: item.isAccess,
-            folderName: item.folderName,
-            folderNumber: item.fileNumber
+            folderName: item.title,
+            folderNumber: item.fileAmount
           }
         })
       } else {
@@ -277,17 +277,15 @@ export default {
         item.volume = res.response.data.volume
         item.fileId = res.response.data.id
         item.url = res.response.data.filePath
-        item.projectId = this.$route.query.id
-        if (this.type === 0) {
-          item.fileFolderId = this.currentRow.fileFolderId
-        } else {
-          item.fileFolderId = this.currentRow.id
-        }
+        item.parentId = this.currentRow.id
+        item.projectId = this.currentRow.projectId
+        item.stageId = this.currentRow.stageId
+        item.type = 1
         return item
       })
       this.fileList.forEach(sub => {
         this.saveCount++
-        if (['pdf', 'doc'].includes(sub.suffix)) {
+        if (['pdf', 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx'].includes(sub.suffix)) {
           this.saveLibrary(sub)
         }
         if (this.saveCount === this.fileList.length) {

+ 2 - 1
src/views/home/component/item1.vue

@@ -4,11 +4,12 @@
       <div class=' text-left'>{{item.title}}{{item.check}}</div>
     </div>
     <div class='flex-child-average'>{{item.createTime}}</div>
-    <div class='flex-child-average'>
+    <div >
       <el-radio-group v-model="check" @change='change'>
         <el-radio label="3" size="large" v-if='item.type === "1" '>不可查看</el-radio>
         <el-radio label="1" size="large">可见</el-radio>
         <el-radio label="2" size="large">可编辑</el-radio>
+        <el-radio label="3" size="large">不可操作</el-radio>
       </el-radio-group>
     </div>
   </div>

+ 2 - 2
src/views/home/details.vue

@@ -96,8 +96,8 @@ export default {
         if (res.code === 200) {
           this.stage = res.data.map(e => {
             const newItem = {}
-            newItem.title = e.stageName
-            newItem.count = e.fileNumber
+            newItem.title = e.name
+            newItem.count = e.fileAmount
             newItem.isAccess = e.isAccess
             newItem.id = e.id
             return newItem

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

@@ -47,7 +47,7 @@ export default {
   },
   methods: {
     getFileList () {
-      const data = { folderId: this.id }
+      const data = { id: this.id }
       this.$api.project.fileList(Object.assign(data, this.page)).then(res => {
         if (res.code === 200) {
           this.fileData = res.data