scorpioyq преди 3 години
родител
ревизия
2d7dba3142

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

@@ -47,7 +47,7 @@ export default {
   folderAdd (params) { // 添加文件夹
     return fetch('/blade-project-manage/filefolder/v1/save', params, 'post', 'json')
   },
-  folderUpdate (params) {
+  folderUpdate (params) { // 文件夹更新
     return fetch('/blade-project-manage/filefolder/v1/update', params, 'post', 'json')
   },
   fileList (params) { // 文件夹里包含文件列表

+ 1 - 1
src/assets/style/color.scss

@@ -1,5 +1,5 @@
 //$primary: #7C9CFF;
-$primary: #BC002D;
+$primary: #ECAB56;
 $red: #ef0b0b;
 $blue: #409eff;
 $green: #5dc800;

+ 1 - 1
src/assets/style/theme/index.scss

@@ -1,7 +1,7 @@
 @forward 'element-plus/theme-chalk/src/common/var.scss' with (
   $colors: (
     "primary": (
-    "base": #BC002D,
+    "base": #AB7630,
     ),
     "success": (
       "base": #21ba45,

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

@@ -1 +1 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 25 25"><defs><style>.a{fill:#ffe5d2;}.b{fill:#ac1f1d;}.c{fill:#ef716f;}</style></defs><g transform="translate(73 -473)"><circle class="a" cx="12.5" cy="12.5" r="12.5" transform="translate(-73 473)"/><g transform="translate(-68.997 476.997)"><g transform="translate(-0.003 0.002)"><path class="b" d="M16.073,3.869,8.6.087a.769.769,0,0,0-.7,0L.428,3.869a.773.773,0,0,0,0,1.386L7.9,9.038a.769.769,0,0,0,.7,0l7.473-3.783A.773.773,0,0,0,16.073,3.869ZM8.213,7.388,2.788,4.638a.085.085,0,0,1,0-.151L8.213,1.736a.087.087,0,0,1,.077,0l5.424,2.751a.085.085,0,0,1,0,.151L8.289,7.388A.087.087,0,0,1,8.213,7.388Z" transform="translate(0.003 -0.002)"/></g><g transform="translate(-0.003 10.563)"><path class="c" d="M16.073,16.687,14.72,16l-1.8.9.786.4a.078.078,0,0,1,0,.145L8.29,20.205a.084.084,0,0,1-.079,0l-5.42-2.753a.078.078,0,0,1,0-.145l.786-.4-1.8-.9-1.353.687a.773.773,0,0,0,0,1.386L7.9,21.855a.769.769,0,0,0,.7,0l7.473-3.783A.773.773,0,0,0,16.073,16.687Z" transform="translate(0.003 -16)"/></g><g transform="translate(-0.003 6.738)"><path class="c" d="M16.073,10.893l-1.353-.687-1.8.9.786.4a.078.078,0,0,1,0,.145L8.29,14.411a.084.084,0,0,1-.079,0l-5.42-2.753a.078.078,0,0,1,0-.145l.786-.4-1.8-.9-1.353.687a.773.773,0,0,0,0,1.386L7.9,16.061a.769.769,0,0,0,.7,0l7.473-3.783A.773.773,0,0,0,16.073,10.893Z" transform="translate(0.003 -10.206)"/></g></g></g></svg>
+<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 25 25"><defs><style>.a{fill:#f1e1ce;}.b{fill:#825618;}.c{fill:#db9c4b;}</style></defs><g transform="translate(73 -473)"><circle class="a" cx="12.5" cy="12.5" r="12.5" transform="translate(-73 473)"/><g transform="translate(-68.997 476.997)"><g transform="translate(-0.003 0.002)"><path class="b" d="M16.073,3.869,8.6.087a.769.769,0,0,0-.7,0L.428,3.869a.773.773,0,0,0,0,1.386L7.9,9.038a.769.769,0,0,0,.7,0l7.473-3.783A.773.773,0,0,0,16.073,3.869ZM8.213,7.388,2.788,4.638a.085.085,0,0,1,0-.151L8.213,1.736a.087.087,0,0,1,.077,0l5.424,2.751a.085.085,0,0,1,0,.151L8.289,7.388A.087.087,0,0,1,8.213,7.388Z" transform="translate(0.003 -0.002)"/></g><g transform="translate(-0.003 10.563)"><path class="c" d="M16.073,16.687,14.72,16l-1.8.9.786.4a.078.078,0,0,1,0,.145L8.29,20.205a.084.084,0,0,1-.079,0l-5.42-2.753a.078.078,0,0,1,0-.145l.786-.4-1.8-.9-1.353.687a.773.773,0,0,0,0,1.386L7.9,21.855a.769.769,0,0,0,.7,0l7.473-3.783A.773.773,0,0,0,16.073,16.687Z" transform="translate(0.003 -16)"/></g><g transform="translate(-0.003 6.738)"><path class="c" d="M16.073,10.893l-1.353-.687-1.8.9.786.4a.078.078,0,0,1,0,.145L8.29,14.411a.084.084,0,0,1-.079,0l-5.42-2.753a.078.078,0,0,1,0-.145l.786-.4-1.8-.9-1.353.687a.773.773,0,0,0,0,1.386L7.9,16.061a.769.769,0,0,0,.7,0l7.473-3.783A.773.773,0,0,0,16.073,10.893Z" transform="translate(0.003 -10.206)"/></g></g></g></svg>

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

@@ -1 +1 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 25 25"><defs><style>.a{fill:#ffe5d2;}.b{fill:#ac1f1d;}.c{fill:#ef716f;}</style></defs><g transform="translate(-43 -473)"><circle class="a" cx="12.5" cy="12.5" r="12.5" transform="translate(43 473)"/><g transform="translate(-11 477)"><path class="b" d="M61.353,0A1.353,1.353,0,0,0,60,1.353V15.147A1.353,1.353,0,0,0,61.353,16.5H71.847A1.353,1.353,0,0,0,73.2,15.147v-9.4a1.35,1.35,0,0,0-.316-.869L69.156.424A1.185,1.185,0,0,0,68.247,0ZM71.1,5.25H68.8v-2.9Zm.445,9.6h-9.9V1.65h5.5V5.891A1.01,1.01,0,0,0,68.16,6.9h3.39Z" transform="translate(0)"/><rect class="c" width="6.6" height="1.65" rx="0.825" transform="translate(63.3 8.745)"/><rect class="c" width="6.6" height="1.65" rx="0.825" transform="translate(63.3 11.385)"/></g></g></svg>
+<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 25 25"><defs><style>.a{fill:#f1e1ce;}.b{fill:#825618;}.c{fill:#db9c4b;}</style></defs><g transform="translate(-43 -473)"><circle class="a" cx="12.5" cy="12.5" r="12.5" transform="translate(43 473)"/><g transform="translate(-11 477)"><path class="b" d="M61.353,0A1.353,1.353,0,0,0,60,1.353V15.147A1.353,1.353,0,0,0,61.353,16.5H71.847A1.353,1.353,0,0,0,73.2,15.147v-9.4a1.35,1.35,0,0,0-.316-.869L69.156.424A1.185,1.185,0,0,0,68.247,0ZM71.1,5.25H68.8v-2.9Zm.445,9.6h-9.9V1.65h5.5V5.891A1.01,1.01,0,0,0,68.16,6.9h3.39Z" transform="translate(0)"/><rect class="c" width="6.6" height="1.65" rx="0.825" transform="translate(63.3 8.745)"/><rect class="c" width="6.6" height="1.65" rx="0.825" transform="translate(63.3 11.385)"/></g></g></svg>

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

@@ -1 +1 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 25 25"><defs><style>.a{fill:#ffe5d2;}.b{fill:#ac1f1d;}.c{fill:#ef716f;}</style></defs><g transform="translate(60 -550)"><circle class="a" cx="12.5" cy="12.5" r="12.5" transform="translate(-60 550)"/><g transform="translate(-12)"><g transform="translate(-8 554.18)"><path class="b" d="M-20.437,3.051h-4.231V1.562A1.866,1.866,0,0,0-26.633-.18h-2.352A1.866,1.866,0,0,0-30.95,1.562V3.051h-4.231A.819.819,0,0,0-36,3.87a.819.819,0,0,0,.819.819h1.16c0,.023-.013.043-.013.066v8.169a3.453,3.453,0,0,0,3.5,3.4h5.506a3.452,3.452,0,0,0,3.5-3.4V4.755c0-.024-.011-.043-.013-.066h1.105a.819.819,0,0,0,.819-.819A.819.819,0,0,0-20.437,3.051Zm-8.548-1.592h2.352a.509.509,0,0,1,.327.1V3.051h-3.008l0-1.467A.405.405,0,0,1-28.985,1.458Zm5.825,3.3v8.169a1.811,1.811,0,0,1-1.868,1.744h-5.506A1.811,1.811,0,0,1-32.4,12.924V4.755c0-.024-.011-.043-.013-.066h9.27C-23.149,4.712-23.16,4.731-23.16,4.755Z"/><rect class="c" width="1.638" height="6.761" rx="0.819" transform="translate(-30.707 5.999)"/><rect class="c" width="1.638" height="6.761" rx="0.819" transform="translate(-26.549 5.999)"/></g></g></g></svg>
+<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 25 25"><defs><style>.a{fill:#f1e1ce;}.b{fill:#825618;}.c{fill:#db9c4b;}</style></defs><g transform="translate(60 -550)"><circle class="a" cx="12.5" cy="12.5" r="12.5" transform="translate(-60 550)"/><g transform="translate(-12)"><g transform="translate(-8 554.18)"><path class="b" d="M-20.437,3.051h-4.231V1.562A1.866,1.866,0,0,0-26.633-.18h-2.352A1.866,1.866,0,0,0-30.95,1.562V3.051h-4.231A.819.819,0,0,0-36,3.87a.819.819,0,0,0,.819.819h1.16c0,.023-.013.043-.013.066v8.169a3.453,3.453,0,0,0,3.5,3.4h5.506a3.452,3.452,0,0,0,3.5-3.4V4.755c0-.024-.011-.043-.013-.066h1.105a.819.819,0,0,0,.819-.819A.819.819,0,0,0-20.437,3.051Zm-8.548-1.592h2.352a.509.509,0,0,1,.327.1V3.051h-3.008l0-1.467A.405.405,0,0,1-28.985,1.458Zm5.825,3.3v8.169a1.811,1.811,0,0,1-1.868,1.744h-5.506A1.811,1.811,0,0,1-32.4,12.924V4.755c0-.024-.011-.043-.013-.066h9.27C-23.149,4.712-23.16,4.731-23.16,4.755Z"/><rect class="c" width="1.638" height="6.761" rx="0.819" transform="translate(-30.707 5.999)"/><rect class="c" width="1.638" height="6.761" rx="0.819" transform="translate(-26.549 5.999)"/></g></g></g></svg>

+ 1 - 1
src/assets/svg/step/dot_normal.svg

@@ -1 +1 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="77" height="77" viewBox="0 0 73 73"><defs><style>.a{fill:#c7cacf;}.b{fill:#fbfbf9;stroke:#ac1f1d;stroke-width:2px;}.c{stroke:none;}.d{fill:none;}.e{filter:url(#a);}</style><filter id="a" x="0" y="0" width="73" height="73" filterUnits="userSpaceOnUse"><feOffset input="SourceAlpha"/><feGaussianBlur stdDeviation="10" result="b"/><feFlood flood-color="#f2843a" flood-opacity="0.6"/><feComposite operator="in" in2="b"/><feComposite in="SourceGraphic"/></filter></defs><g transform="translate(-225 -236)"><g class="e" transform="matrix(1, 0, 0, 1, 225, 236)"><circle class="a" cx="6.5" cy="6.5" r="6.5" transform="translate(30 30)"/></g><g class="b" transform="translate(258 269)"><circle class="c" cx="3.5" cy="3.5" r="3.5"/><circle class="d" cx="3.5" cy="3.5" r="2.5"/></g></g></svg>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="73" height="73" viewBox="0 0 73 73"><defs><style>.a{fill:#c7cacf;}.b{fill:#fbfbf9;stroke:#825618;stroke-width:2px;}.c{stroke:none;}.d{fill:none;}.e{filter:url(#a);}</style><filter id="a" x="0" y="0" width="73" height="73" filterUnits="userSpaceOnUse"><feOffset input="SourceAlpha"/><feGaussianBlur stdDeviation="10" result="b"/><feFlood flood-color="#714926" flood-opacity="0.6"/><feComposite operator="in" in2="b"/><feComposite in="SourceGraphic"/></filter></defs><g transform="translate(-227 -95)"><g class="e" transform="matrix(1, 0, 0, 1, 227, 95)"><circle class="a" cx="6.5" cy="6.5" r="6.5" transform="translate(30 30)"/></g><g class="b" transform="translate(260 128)"><circle class="c" cx="3.5" cy="3.5" r="3.5"/><circle class="d" cx="3.5" cy="3.5" r="2.5"/></g></g></svg>

+ 1 - 1
src/assets/svg/step/dot_select.svg

@@ -1 +1 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="77" height="77" viewBox="0 0 77 77"><defs><style>.a,.b{fill:#ac1f1d;}.b{stroke:#fff;stroke-width:3px;}.c{stroke:none;}.d{fill:none;}.e{filter:url(#a);}</style><filter id="a" x="0" y="0" width="77" height="77" filterUnits="userSpaceOnUse"><feOffset input="SourceAlpha"/><feGaussianBlur stdDeviation="10" result="b"/><feFlood flood-color="#f2843a" flood-opacity="0.6"/><feComposite operator="in" in2="b"/><feComposite in="SourceGraphic"/></filter></defs><g transform="translate(-225 -93)"><g class="e" transform="matrix(1, 0, 0, 1, 225, 93)"><circle class="a" cx="8.5" cy="8.5" r="8.5" transform="translate(30 30)"/></g><g class="b" transform="translate(258 126)"><circle class="c" cx="5.5" cy="5.5" r="5.5"/><circle class="d" cx="5.5" cy="5.5" r="4"/></g></g></svg>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="77" height="77" viewBox="0 0 77 77"><defs><style>.a,.b{fill:#825618;}.b{stroke:#fff;stroke-width:3px;}.c{stroke:none;}.d{fill:none;}.e{filter:url(#a);}</style><filter id="a" x="0" y="0" width="77" height="77" filterUnits="userSpaceOnUse"><feOffset input="SourceAlpha"/><feGaussianBlur stdDeviation="10" result="b"/><feFlood flood-color="#714926" flood-opacity="0.6"/><feComposite operator="in" in2="b"/><feComposite in="SourceGraphic"/></filter></defs><g transform="translate(-225 -93)"><g class="e" transform="matrix(1, 0, 0, 1, 225, 93)"><circle class="a" cx="8.5" cy="8.5" r="8.5" transform="translate(30 30)"/></g><g class="b" transform="translate(258 126)"><circle class="c" cx="5.5" cy="5.5" r="5.5"/><circle class="d" cx="5.5" cy="5.5" r="4"/></g></g></svg>

+ 3 - 3
src/components/base-button.vue

@@ -29,7 +29,7 @@ export default {
     }
   },
   methods: {
-    click() {
+    click () {
       console.log(new Date().getTime())
       // this.$nextTick(this.$emit('click'))
     }
@@ -43,7 +43,7 @@ export default {
   padding: 8px 16px;
   height: 20px;
   font-size: 14px;
-  background-color: #BC002D;
+  background-color: #AB7630;
   color: white;
 }
 
@@ -53,7 +53,7 @@ export default {
   height: 20px;
   font-size: 14px;
   background-color: white;
-  color: #BC002D;
+  color: #AB7630;
   border: 1px solid #E9A856;
 }
 </style>

+ 17 - 5
src/components/basic-step/index.vue

@@ -3,7 +3,7 @@
     <div v-for='(item,index) in steps' :key='item'>
       <div class='flex flex-align-end'>
         <div class='flex flex-col flex-center' style="width: 40px">
-          <div :class='indicator >= index ? "main-bgcolor" : "normal" '
+          <div :class='indicator >= index ? "step-bg" : "normal" '
                :style='index === 0 ? "height:60px" :"height:80px" '
                class='step'/>
           <img
@@ -19,11 +19,19 @@
                @click='change(index)'>
             <div class='flex flex-col flex-align-start  full-width'>
               <div class='padding flex flex-col ml-5 font-15 bold'>
-                <div :style='indicator === index ? "color:white": "color:#AFAFAF"' class="mt-5 nowrap">
+                <div :style='indicator === index ? "color:#D9E6FF": "color:#AFAFAF"' class="mt-5 nowrap">
                   {{ item.title }}
                 </div>
-                <div :style='indicator === index ? "color:#E2AE64": "color:#9E2E26" ' class='text-left'>
-                  {{ item.count }} 个文件
+                <div class="flex">
+                  <div :style='indicator === index ? "color:#E2AE64": "color:#825618" ' class='text-left'>
+                    {{ item.count }}<span class="font-12">个文件</span>
+                  </div>
+                  <el-icon v-if="item.isAccess === 1" style="margin-top: 4px;margin-left: 5px" color="#E2AE64">
+                    <View/>
+                  </el-icon>
+                  <el-icon v-if="item.isAccess === 2" style="margin-top: 3px;margin-left: 5px" color="#E2AE64">
+                    <EditPen/>
+                  </el-icon>
                 </div>
               </div>
             </div>
@@ -76,7 +84,7 @@ export default {
   height: 100px;
   overflow: hidden;
   border-radius: 20px;
-  box-shadow: 0 0 16px 12px rgba(249, 222, 209, 0.5);
+  box-shadow: 0 0 16px 12px rgba(226, 223, 221, 0.3);
 }
 
 .content {
@@ -89,4 +97,8 @@ export default {
 .normal {
   background: #C8CACF;
 }
+
+.step-bg {
+  background: #AB7630;
+}
 </style>

+ 1 - 1
src/components/main-button.vue

@@ -39,7 +39,7 @@ export default {
 <style lang="scss" scoped>
 .main {
   border-radius: 20px;
-  border: 1px solid #BC002D;
+  border: 1px solid #AB7630;
   color: #ECAB56;
   height: 32px;
   line-height: 34px

+ 1 - 1
src/layout/left.vue

@@ -91,7 +91,7 @@ export default {
   border-radius: 14px;
   margin-top: 40px;
   color: white;
-  background-color: #BC002D;
+  background-color: #AB7630;
   box-shadow: 2px 2px 10px 2px rgba(242, 162, 58, 0.49);
 }
 

+ 27 - 22
src/views/home/component/current.vue

@@ -7,8 +7,10 @@
       <div class="flex flex-center flex-child-average flex-justify-end" style="margin-right: 50px">
         <base-button v-if='permissions.permissions.home_folder_authorize' class="mr-5" icon="User" title="授权"
                      type="0" @click='showClick'/>
-        <base-button icon="Plus" title="添加文件夹" class="mr-5" @click="addShow = true"/>
-        <base-button icon="Upload" title="上传文件" @click="show = true"/>
+        <base-button v-if="permissions.permissions.floder_detail_add && isAccess === '2'" icon="Plus" title="添加文件夹"
+                     class="mr-5"
+                     type="0" @click="addShow = true"/>
+        <base-button v-if="isAccess === '2'" icon="Upload" title="上传文件" @click="show = true"/>
       </div>
     </div>
     <files-list :data="data" class="mt-20"/>
@@ -63,16 +65,16 @@ import baseButton from '../../../components/base-button.vue'
 import uploadFile from '../../../components/upload-file.vue'
 import authorize from '@/views/home/component/authorize.vue'
 import permissionStore from '@/store/permission.js'
-import { useStore } from '@/store/user.js'
+import {useStore} from '@/store/user.js'
 
 export default {
   name: 'current',
-  components: { filesList, baseButton, uploadFile, authorize },
+  components: {filesList, baseButton, uploadFile, authorize},
   props: {
     id: String,
     data: Object
   },
-  data () {
+  data() {
     return {
       authorizeShow: false,
       addShow: false,
@@ -92,25 +94,26 @@ export default {
         ids: '',
         ownerId: '',
         projectId: ''
-      }
+      },
+      isAccess: ''
     }
   },
-  setup () {
+  setup() {
     const permissions = permissionStore()
     const user = useStore()
-    return { permissions, user }
+    return {permissions, user}
   },
-  created () {
-    this.projectId = this.$route.query.projectId
-    this.sendParams.ownerId = this.$route.query.ownerId
+  created() {
+    this.isAccess = this.$route.query.isAccess
+    console.log(this.sendParams)
     this.folderInfo.dictKey = this.$route.query.dictKey
     this.folderInfo.projectStageId = this.$route.query.projectStageId
   },
   methods: {
-    showClick () {
+    showClick() {
       this.authorizeShow = true
     },
-    success (res) {
+    success(res) {
       this.fileList = res.fileList.map(res => {
         const item = {}
         item.title = res.response.data.originalFileName
@@ -132,8 +135,8 @@ export default {
         }
       })
     },
-    saveLibrary (sub) {
-      const data = { category: 4, content: '' }
+    saveLibrary(sub) {
+      const data = {category: 4, content: ''}
       this.$api.common.submit(Object.assign(sub, data)).then(res => {
         if (res.code === 200) {
           this.saveCount++
@@ -143,7 +146,7 @@ export default {
         }
       })
     },
-    addFile () {
+    addFile() {
       this.$api.project.fileAdd(this.fileList).then(res => {
         if (res.code === 200) {
           this.show = false
@@ -155,9 +158,9 @@ export default {
               cancelButtonText: '取消',
               type: 'warning'
             })
-              .then(() => {
-                this.SendMsg()
-              })
+                .then(() => {
+                  this.SendMsg()
+                })
           }
         } else {
           this.show = false
@@ -165,9 +168,11 @@ export default {
         }
       })
     },
-    SendMsg () {
+    SendMsg() {
       this.sendParams.ids = this.fileList.map(e => e.fileId).join(',')
-      this.sendParams.projectId = this.projectId
+      this.sendParams.projectId = this.$route.query.projectId
+      this.sendParams.ownerId = this.$route.query.ownerId
+      console.log(this.sendParams)
       this.$api.project.send(this.sendParams).then(res => {
         if (res.code === 200) {
           this.$message.success('消息已经发送成功!')
@@ -178,7 +183,7 @@ export default {
         }
       })
     },
-    folderAdd () {
+    folderAdd() {
       this.folderInfo.projectId = this.projectId
       this.folderInfo.parentId = this.id
       this.$api.project.folderAdd(this.folderInfo).then(res => {

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

@@ -363,13 +363,13 @@ export default {
 .total-s {
   width: 220px;
   height: 70px;
-  border: 1px solid #AC1F1D;
+  border: 1px solid #825618;
   border-radius: 10px;
   margin-right: 20px;
-  box-shadow: 2px 2px 10px 2px rgba(242, 162, 58, 0.49);
+  box-shadow: 2px 2px 10px 2px rgba(113, 73, 39, 0.3);
 
   .sp {
-    color: #AC1F1D;
+    color: #ECAB56;
     white-space: nowrap;
   }
 
@@ -392,7 +392,7 @@ export default {
   }
 
   .sp1 {
-    color: #AC1F1D;
+    color: #825618;
   }
 }
 

+ 104 - 49
src/views/home/component/files_list.vue

@@ -3,7 +3,7 @@
     <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: 2;text-align: left">文件/文件夹名称</span>
         <span style="flex: 1">更新(上传)时间</span>
         <span class="flex-1">文件大小</span>
         <span class="flex-1">是否同步</span>
@@ -19,12 +19,12 @@
           <img v-else class="icon" src="../../../assets/svg/folder/other.svg">
         </div>
         <div v-else class="flex-1">
-          <img src="../../../assets/svg/folder/see.svg" style="width: 50px;height: 46px">
-          <!--          <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">-->
-          <!--          <img v-else class="icon" src="../../../assets/svg/folder/other.svg">-->
+          <img v-if="item.IsAccess === '1'" src="../../../assets/svg/folder/see.svg" style="width: 50px;height: 46px">
+          <img v-if="item.IsAccess === '2'" src="../../../assets/svg/folder/edit.svg" style="width: 50px;height: 46px">
+          <img v-if="item.IsAccess === '3'" src="../../../assets/svg/folder/invisible.svg"
+               style="width: 50px;height: 46px">
         </div>
-        <span style="flex: 2">{{ item.title }}</span>
+        <span style="flex: 2;text-align: left">{{ item.title }}</span>
         <span style="flex: 1">{{ item.createTime.substring(0, 10) }}</span>
         <span v-if="item.type === '1'" class="flex-1">{{ item.size }}</span>
         <span v-if="item.type === '2'" class="flex-1">-</span>
@@ -35,8 +35,11 @@
         <div class="flex flex-center" style="flex: 3">
           <main-button icon="View" title="详情" width="85" @click="View(item)"/>
           <main-button v-if="item.type === '1'" icon="Download" title="下载" width="85" @click="downFile(item)"/>
-          <main-button v-if="item.type === '2'" icon="Upload" title="上传文件" width="85" @click="upload(item)"/>
-          <main-button v-if='item.del' icon="Delete" title="删除" width="85" @click="removeFile(item)"/>
+          <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"
+                       title="授权申请" width="85" @click="folderApply(item)"/>
+          <main-button v-else='item.del' icon="Delete" title="删除" width="85" @click="removeFile(item)"/>
         </div>
       </div>
     </div>
@@ -59,25 +62,49 @@
                   @close='show = false'
                   @success='success'/>
     </el-dialog>
+    <!--    申请授权-->
+    <el-dialog title='申请授权' v-model='applyShow' width='35%'>
+      <div class='full-width flex flex-center flex-col'>
+        <text class='full-width black text-left font-14 bold'>确认向业主申请{{ currentFolder.folderName }}的管理权限?
+        </text>
+        <div class='full-width flex flex-align-center mt-20'>
+          <span class='font-14 bold'>授权时长</span>
+          <el-date-picker
+              v-model="applyTime"
+              class='ml-20'
+              end-placeholder="截止日期"
+              range-separator="至"
+              start-placeholder="开始日期"
+              type="daterange"
+              value-format='YYYY-MM-DD'
+          />
+        </div>
+        <el-divider/>
+        <div class='full-width flex flex-center'>
+          <el-button type='danger' plain @click="applyShow = false">取 消</el-button>
+          <el-button type='primary' @click='submit'>确 定</el-button>
+        </div>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 import mainButton from '../../../components/main-button.vue'
-import { bytesToSize } from '@/utils/tools.js'
-import { useStore } from '@/store/user.js'
+import {bytesToSize} from '@/utils/tools.js'
+import {useStore} from '@/store/user.js'
 import permissionStore from '@/store/permission.js'
 import uploadFile from '../../../components/upload-file.vue'
 
 export default {
   name: 'files_list',
-  components: { mainButton, uploadFile },
+  components: {mainButton, uploadFile},
   props: {
     data: Object
   },
   watch: {
     data: {
-      handler (val) {
+      handler(val) {
         if (val === '' || val === null) {
           return
         }
@@ -104,14 +131,15 @@ export default {
       immediate: true
     }
   },
-  setup () {
+  setup() {
     const user = useStore()
     const permission = permissionStore()
-    return { user, permission }
+    return {user, permission}
   },
-  data () {
+  data() {
     return {
       show: false,
+      applyShow: false,
       files: [],
       showImage: false,
       imgList: [],
@@ -124,14 +152,16 @@ export default {
         ids: '',
         ownerId: '',
         projectId: ''
-      }
+      },
+      currentFolder: null,
+      applyTime: [],
     }
   },
-  created () {
+  created() {
     this.query = this.$route.query
   },
   methods: {
-    View (item) {
+    View(item) {
       if (item.type === '1') {
         if (['png', 'jpg'].includes(item.suffix)) {
           this.showImage = true
@@ -153,13 +183,13 @@ export default {
         })
       }
     },
-    upload (item) {
+    upload(item) {
       this.show = true
       console.log(item)
       this.fileFolderId = item.id
       console.log(this.fileFolderId)
     },
-    success (res) {
+    success(res) {
       console.log(this.fileFolderId)
       this.fileList = res.fileList.map(res => {
         const item = {}
@@ -182,8 +212,8 @@ export default {
         }
       })
     },
-    saveLibrary (sub) {
-      const data = { category: 4, content: '' }
+    saveLibrary(sub) {
+      const data = {category: 4, content: ''}
       this.$api.common.submit(Object.assign(sub, data)).then(res => {
         if (res.code === 200) {
           this.saveCount++
@@ -193,7 +223,7 @@ export default {
         }
       })
     },
-    addFile () {
+    addFile() {
       this.$api.project.fileAdd(this.fileList).then(res => {
         if (res.code === 200) {
           this.show = false
@@ -205,9 +235,9 @@ export default {
               cancelButtonText: '取消',
               type: 'warning'
             })
-              .then(() => {
-                this.SendMsg()
-              })
+                .then(() => {
+                  this.SendMsg()
+                })
           }
         } else {
           this.show = false
@@ -215,7 +245,7 @@ export default {
         }
       })
     },
-    SendMsg () {
+    SendMsg() {
       this.sendParams.ids = this.fileList.map(e => e.fileId).join(',')
       this.sendParams.projectId = this.projectId
       this.$api.project.send(this.sendParams).then(res => {
@@ -228,48 +258,73 @@ export default {
         }
       })
     },
-    downFile (item) {
+    downFile(item) {
       window.open(item.url, '')
     },
-    viewerClose () {
+    viewerClose() {
       this.showImage = false
       this.imgList = []
     },
-    removeFile (item) {
+    removeFile(item) {
       if (item.type === '1') {
         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)
-              }
+            .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)
+                }
+              })
             })
-          })
       } else if (item.type === '2') {
         this.$confirm('确认是否删除所选文件/文件夹?', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
         })
-          .then(() => {
-            this.$api.project.folderRemove({ ids: item.id }).then(res => {
-              if (res.code === 200) {
-                this.$message.success(res.msg)
-                this.$bus.emit('delete')
-              } else {
-                this.$message.error(res.msg)
-              }
+            .then(() => {
+              this.$api.project.folderRemove({ids: item.id}).then(res => {
+                if (res.code === 200) {
+                  this.$message.success(res.msg)
+                  this.$bus.emit('delete')
+                } else {
+                  this.$message.error(res.msg)
+                }
+              })
             })
-          })
       }
-    }
+    },
+    folderApply(item) {
+      this.currentFolder = item
+      this.applyShow = true
+    },
+    submit() {
+      if (this.applyTime.length !== 2) {
+        this.$message.error('请选择授权时间')
+        return
+      }
+      const tmp = {projectId: this.projectId, ownerId: this.ownerId}
+      const item = {startTime: this.applyTime[0], endTime: this.applyTime[1], folderId: this.currentFolder.fileFolderId}
+      const list = [item]
+      this.$api.project.apply(Object.assign(tmp, {folders: list})).then(res => {
+        if (res.code === 200) {
+          this.applyShow = false
+          this.$confirm(res.data, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+        } else {
+          this.$message.error(res.msg)
+        }
+      })
+    },
 
   }
 }

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

@@ -192,7 +192,7 @@ export default {
   flex-wrap: nowrap;
   color: white;
   font-size: 15px;
-  background-color: #BC002D;
+  background-color: #AB7630;
   font-weight: 500;
   padding: 4px 10px;
   border-radius: 20px;

+ 42 - 7
src/views/home/component/folder_list.vue

@@ -18,11 +18,16 @@
           <img v-else-if="item.isAccess === 2" class="icon" src="../../../assets/svg/folder/edit.svg">
           <img v-else class="icon" src="../../../assets/svg/folder/invisible.svg">
         </div>
-        <span style="flex:2;text-align: left">{{ item.folderName }}</span>
+        <div class="flex" style="flex:2;text-align: left">
+          <span>{{ item.folderName }}</span>
+          <el-icon style="margin-top: 3px;margin-left: 2px" @click="updateShow = true">
+            <EditPen/>
+          </el-icon>
+        </div>
         <span style="flex: 1">{{ item.updateTime }}</span>
         <span style="flex: 1.5">{{ item.fileNumber }}</span>
         <div class="flex flex-center" style="flex: 3">
-          <main-button v-if='[1,2].includes(item.isAccess)' icon="View" title="详情" width="85"
+          <main-button icon="View" title="详情" width="85"
                        @click="fileView(item)"/>
           <main-button v-if='permissions.permissions.home_folder_add  && item.isAccess === 2 ' icon="Upload"
                        title="上传文件" width="85" @click="uploadFiles(item)"/>
@@ -74,7 +79,7 @@
       </div>
     </el-dialog>
     <!--    申请授权-->
-    <el-dialog title='申请授权' v-model='applyShow' width='30%'>
+    <el-dialog title='申请授权' v-model='applyShow' width='35%'>
       <div class='full-width flex flex-center flex-col'>
         <text class='full-width black text-left font-14 bold'>确认向业主申请{{ currentFolder.folderName }}的管理权限?
         </text>
@@ -92,11 +97,31 @@
         </div>
         <el-divider/>
         <div class='full-width flex flex-center'>
-          <el-button type='danger' plain>取 消</el-button>
+          <el-button type='danger' plain @click="applyShow = false">取 消</el-button>
           <el-button type='primary' @click='submit'>确 定</el-button>
         </div>
       </div>
     </el-dialog>
+    <el-dialog v-model='updateShow' append-to-body width='40%'>
+      <div class="flex flex-col">
+        <el-form ref="ruleFormRef"
+                 :model="folderInfo"
+                 class="demo-ruleForm"
+                 label-width="120px"
+                 status-icon>
+          <el-form-item label="新文件夹名称">
+            <el-input
+                v-model="folderInfo.title"
+                placeholder="填写修改的文件夹名称"
+                style="width: 100%"
+            />
+          </el-form-item>
+        </el-form>
+        <div class="full-width flex flex-center mt-10">
+          <base-button icon="Lock" title="保存" type="1" @click="folderUpdate"/>
+        </div>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -129,6 +154,7 @@ export default {
   data () {
     return {
       show: false,
+      updateShow: false,
       sendMsg: false,
       authorizeShow: false,
       currentRow: null,
@@ -148,10 +174,13 @@ export default {
         ownerId: '',
         projectId: ''
       },
-      userInfo: null,
       applyShow: false,
       currentFolder: null,
-      applyTime: []
+      applyTime: [],
+      folderInfo: {
+        folderId: '',
+        title: ''
+      }
     }
   },
   created () {
@@ -167,7 +196,8 @@ export default {
             projectId: this.projectId,
             ownerId: this.ownerId,
             dictKey: this.dictKey,
-            projectStageId: item.projectStageId
+            projectStageId: item.projectStageId,
+            isAccess: item.isAccess
           }
         })
       } else {
@@ -314,6 +344,11 @@ export default {
           this.$message.error(res.msg)
         }
       })
+    },
+    folderUpdate () {
+      this.$api.project.folderUpdate().then(res => {
+        console.log(res)
+      })
     }
   }
 }

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

@@ -3,7 +3,7 @@
     <div class="flex flex-center flex-justify-between margin">
       <span class="grey font-18 bold">项目详情</span>
       <div class="flex flex-center">
-        <base-button v-if="option.detail === false" :width="60" icon="Close" title="取消编辑" @click="cancel"/>
+        <base-button v-if="option.detail === false" :width="60" type="0" icon="Close" title="取消编辑" @click="cancel"/>
         <base-button :title="btnTips" :width="60" icon="EditPen" @click="edit"/>
       </div>
     </div>
@@ -80,6 +80,7 @@ export default {
   watch: {
     data: {
       handler (val) {
+        // eslint-disable-next-line no-prototype-builtins
         if (val && val.hasOwnProperty('property')) {
           const config = JSON.parse(val.property)
           // this.option.column = config

+ 1 - 0
src/views/home/details.vue

@@ -92,6 +92,7 @@ export default {
             const newItem = {}
             newItem.title = e.stageName
             newItem.count = e.fileNumber
+            newItem.isAccess = e.isAccess
             newItem.id = e.id
             return newItem
           })