scorpio 2 жил өмнө
parent
commit
fc6ce73cbd

+ 18 - 3
src/views/home/component/authorize.vue

@@ -1,5 +1,6 @@
 <template>
   <div class='flex flex-justify-between flex-col  full-width '>
+    <div v-if='folderName' class='bold'>当前授权文件夹{{folderName}}</div>
     <div class='flex flex-justify-start flex-align-center full-width' v-if='authorType'>
       <span class='bold'>授权模式:</span>
       <el-radio-group v-model='grantType'>
@@ -8,7 +9,7 @@
       </el-radio-group>
     </div>
     <el-tabs v-if='grantType === 0' class='mt-20' type='border-card' v-model='initType'>
-      <el-tab-pane label='授权文件夹'>
+      <el-tab-pane label='授权文件夹'>
         <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>
@@ -29,7 +30,7 @@
           </div>
         </div>
       </el-tab-pane>
-      <el-tab-pane label='授权文件'>
+      <el-tab-pane label='授权文件'>
         <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>
@@ -65,6 +66,14 @@
             format='YYYY-MM-DD'
         />
       </div>
+      <div class='full-width flex flex-align-center mt-10'>
+        <span class='font-14 bold'>授权方式</span>
+        <el-radio-group v-model="access" class='ml-20'>
+          <el-radio :label="1">应用到所以文件夹及文件</el-radio>
+          <el-radio :label="2">应用到子文件夹</el-radio>
+          <el-radio :label="3">应用到子文件夹的文件</el-radio>
+        </el-radio-group>
+      </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)'/>
@@ -80,7 +89,6 @@
         <vue-qr :currentLevel='3' :logoCornerRadius='4' :logoScale='0.25' :text='qrCodeText'
                 size='340'/>
         <span>右键复制二维码,通过微信进行分享</span>
-        {{qrCodeText}}
       </div>
     </el-dialog>
   </div>
@@ -110,9 +118,15 @@ export default {
       type: Object,
       default: null
     },
+    // 是否显示授权模式
     authorType: {
       type: Boolean,
       default: true
+    },
+    // 当前授权文件夹
+    folderName: {
+      type: String,
+      default: ''
     }
   },
   watch: {
@@ -133,6 +147,7 @@ export default {
       loading: false,
       check: '2',
       authorizeDate: [],
+      access: 1,
       fileData: null,
       qrCodeShow: false,
       fileList: [],

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

@@ -10,7 +10,7 @@
       </div>
       <div class="flex flex-center flex-child-average flex-justify-end" style="margin-right: 50px">
         <base-button v-if='permissions && permissions.permissions.home_folder_authorize' class="mr-5" icon="User"
-                     title="授权"
+                     title="批量授权"
                      type="0" @click='showClick'/>
         <base-button v-if="permissions && permissions.permissions.floder_detail_add && isAccess === '2'" icon="Plus"
                      title="添加文件夹"
@@ -45,7 +45,7 @@
           </el-button>
         </div>
       </template>
-      <authorize :list='data.records' :folder-id='id' :extra='{type:1}' :project-id='projectId' @close='authorizeShow = false'/>
+      <authorize :list='data.records' :folder-id='id' :extra='{type:1}' :project-id='projectId' :folder-name='folderName' :author-type='false' @close='authorizeShow = false'/>
     </el-dialog>
     <el-dialog v-model='addShow' append-to-body width='40%'>
       <div class="flex flex-col">

+ 10 - 10
vite.config.js

@@ -12,13 +12,13 @@ export default defineConfig({
     vue(),
     Pages({
       dirs: [{
-          dir: 'src/page',
-          baseRoute: ''
-        },
-        {
-          dir: 'src/views',
-          baseRoute: ''
-        }
+        dir: 'src/page',
+        baseRoute: ''
+      },
+      {
+        dir: 'src/views',
+        baseRoute: ''
+      }
       ],
       exclude: ['**/component/*.vue'] // 排除组件
     }),
@@ -39,12 +39,12 @@ export default defineConfig({
     proxy: {
       '/api': {
         // 正式环境地址
-        // target: 'https://dev.wutongresearch.club/api',
+        target: 'https://dev.wutongresearch.club/api',
         // target: 'https://prod.wutongshucloud.com/api',
-        target: 'http://192.168.31.181:8110',
+        // target: 'http://192.168.31.181:8110',
         changeOrigin: true,
         rewrite: (path) => path.replace(/^\/api/, '')
       }
     }
   }
-})
+})