scorpio 2 лет назад
Родитель
Сommit
540801f5f5

+ 127 - 68
src/views/home/component/authorize.vue

@@ -1,87 +1,135 @@
 <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'>
+  <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">
         <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 flex-justify-around border-bottom padding-bottom bold '>
-          <span class='text-center'>文件夹名称</span>
-          <span class='text-center'>权限设置</span>
+    <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 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'>
-            <div class='bold'>文件夹相关权限</div>
-            <el-radio-group v-model="check" @change='allChange($event,1)'>
+        <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"
+          >
+            <div class="bold">文件夹相关权限</div>
+            <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'>
-            <div v-for='(item,index) in folderList' :key='item.id'>
-              <item1 :check='item.check' :data='item' :index='index' @change='change($event,1)'/>
+          <div style="overflow-y: scroll; height: 450px" v-loading="loading">
+            <div v-for="(item, index) in folderList" :key="item.id">
+              <item1
+                :check="item.check"
+                :data="item"
+                :index="index"
+                @change="change($event, 1)"
+              />
             </div>
           </div>
         </div>
       </el-tab-pane>
-      <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>
+      <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>
         </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'>
-            <div class='bold'>文件相关权限</div>
-            <el-radio-group v-model="check" @change='allChange($event,2)'>
+        <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"
+          >
+            <div class="bold">文件相关权限</div>
+            <el-radio-group v-model="check" @change="allChange($event, 2)">
               <el-radio label="3" size="large">不可查看</el-radio>
               <el-radio label="1" size="large">可见</el-radio>
               <el-radio label="2" size="large">可编辑</el-radio>
             </el-radio-group>
           </div>
-          <div style='overflow-y: scroll; height: 450px'>
-            <div v-for='(item,index) in fileList' :key='item.id'>
-              <item1 :check='item.check' :data='item' :index='index' @change='change($event,2)'/>
+          <div style="overflow-y: scroll; height: 450px">
+            <div v-for="(item, index) in fileList" :key="item.id">
+              <item1
+                :check="item.check"
+                :data="item"
+                :index="index"
+                @change="change($event, 2)"
+              />
             </div>
           </div>
         </div>
       </el-tab-pane>
     </el-tabs>
     <div>
-      <div class='full-width flex flex-align-center mt-10'>
-        <span class='font-14 bold'>授权时长</span>
+      <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'
+          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)'/>
+      <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
+        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'
-                size='340'/>
+    <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"
+          size="340"
+        />
         <span>右键复制二维码,通过微信进行分享</span>
-        {{qrCodeText}}
+        {{ qrCodeText }}
       </div>
     </el-dialog>
   </div>
@@ -124,7 +172,7 @@ export default {
   },
   watch: {
     list: {
-      handler (val) {
+      handler(val) {
         val = val.map(sub => {
           sub.check = this.check
           return sub
@@ -135,7 +183,7 @@ export default {
       immediate: true
     }
   },
-  data () {
+  data() {
     return {
       loading: false,
       check: '2',
@@ -153,10 +201,10 @@ export default {
     }
   },
   methods: {
-    close () {
+    close() {
       this.$emit('close')
     },
-    initCode () {
+    initCode() {
       this.loading = true
       let list = this.folderList
       if (this.initType === '1') {
@@ -170,19 +218,28 @@ export default {
       this.startTime = this.authorizeDate[0]
       this.endTime = this.authorizeDate[1]
       const fileTmps = list.map(sub => {
-        const item = { fileId: sub.id, startTime: this.startTime, endTime: this.endTime, status: sub.check }
+        const item = {
+          fileId: sub.id,
+          startTime: this.startTime,
+          endTime: this.endTime,
+          status: sub.check
+        }
         return item
       })
-      const folder = [{
-        folderId: this.folderId,
-        startTime: this.startTime,
-        endTime: this.endTime,
-        status: this.check
-      }]
+      const folder = [
+        {
+          folderId: this.folderId,
+          startTime: this.startTime,
+          endTime: this.endTime,
+          status: this.check
+        }
+      ]
 
       const folderTmp = list.map(sub => {
         const item = {
-          folderId: sub.hasOwnProperty('fileFolderId') ? sub.fileFolderId : sub.id,
+          folderId: sub.hasOwnProperty('fileFolderId')
+            ? sub.fileFolderId
+            : sub.id,
           startTime: this.startTime,
           endTime: this.endTime,
           status: sub.check,
@@ -196,7 +253,8 @@ export default {
       }
       const data = {
         files: this.initType === '0' ? [] : fileTmps,
-        folders: this.folderId.length === 0 ? folderTmp : folder.concat(folderTmp),
+        folders:
+          this.folderId.length === 0 ? folderTmp : folder.concat(folderTmp),
         projectId: this.projectId,
         grantType: this.grantType,
         startTime: this.startTime,
@@ -205,14 +263,17 @@ export default {
       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 + (query.length > 0 ? '&' + query.join('&') : '')
+          this.qrCodeText =
+            'https://prod.wutongshucloud.com/apply?id=' +
+            res.data +
+            (query.length > 0 ? '&' + query.join('&') : '')
           this.qrCodeShow = true
         } else {
           this.$message.error(res.msg)
         }
       })
     },
-    allChange (res, type) {
+    allChange(res, type) {
       console.log(res)
       if (type === 1) {
         this.folderList.forEach(sub => {
@@ -227,7 +288,7 @@ export default {
         })
       }
     },
-    change (res, type) {
+    change(res, type) {
       if (type === 1) {
         this.folderList[res.index] = res
         let seeCount = 0
@@ -276,6 +337,4 @@ export default {
 }
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

+ 57 - 39
src/views/home/component/task.vue

@@ -1,43 +1,63 @@
 <template>
   <div>
-    <el-form :rules='rules' :model='form'>
-      <el-form-item label='任务名称' prop='title'>
-        <el-input v-model='form.title' placeholder='请填写任务名称'></el-input>
+    <el-form :rules="rules" :model="form">
+      <el-form-item label="任务名称" prop="title">
+        <el-input v-model="form.title" placeholder="请填写任务名称"></el-input>
       </el-form-item>
-      <el-form-item label='任务说明' prop='remark'>
-        <el-input v-model='form.remark' type='textarea' :rows='6' placeholder='请填写任务说明'></el-input>
+      <el-form-item label="任务说明" prop="remark">
+        <el-input
+          v-model="form.remark"
+          type="textarea"
+          :rows="6"
+          placeholder="请填写任务说明"
+        ></el-input>
       </el-form-item>
-      <el-form-item label='任务期限'>
+      <el-form-item label="任务期限">
         <el-date-picker
-            v-model="form.date"
-            type="daterange"
-            unlink-panels
-            range-separator="至"
-            start-placeholder="开始日期"
-            end-placeholder="截止日期"
-            format='YYYY-MM-DD'
-            value-format="YYYY-MM-DD"
+          v-model="form.date"
+          type="daterange"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="截止日期"
+          format="YYYY-MM-DD"
+          value-format="YYYY-MM-DD"
         />
       </el-form-item>
-      <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()'/>
+      <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()"
+        />
       </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
+        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-form>
-    <el-dialog v-model='qrCodeShow' 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'
-                size='340'/>
+    <el-dialog v-model="qrCodeShow" 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"
+          size="340"
+        />
         <span>右键复制二维码,通过微信进行分享</span>
-        <span>{{qrCodeText}}</span>
+        <span>{{ qrCodeText }}</span>
       </div>
     </el-dialog>
   </div>
-
 </template>
 
 <script>
@@ -56,17 +76,13 @@ export default {
       default: []
     }
   },
-  data () {
+  data() {
     return {
       qrCodeText: '',
       qrCodeShow: false,
       rules: {
-        title: [
-          { required: true, message: '请输入任务名称', trigger: 'blur' }
-        ],
-        remark: [
-          { required: true, message: '请输入任务说明', trigger: 'blur' }
-        ]
+        title: [{ required: true, message: '请输入任务名称', trigger: 'blur' }],
+        remark: [{ required: true, message: '请输入任务说明', trigger: 'blur' }]
       },
       form: {
         title: '',
@@ -78,7 +94,7 @@ export default {
     }
   },
   methods: {
-    initCode () {
+    initCode() {
       // this.qrCodeShow = true
       if (this.form.date.length !== 2) {
         this.$message.error('请按要求选择时间段')
@@ -93,19 +109,21 @@ export default {
           this.$message.success(res.msg)
           this.qrCodeShow = true
           const data = res.data
-          this.qrCodeText = 'https://dev.wutongresearch.club/apply?id=' + data.qrcodeId + '&' + objectToParams(res.data)
+          this.qrCodeText =
+            'https://prod.wutongshucloud.com/apply?id=' +
+            data.qrcodeId +
+            '&' +
+            objectToParams(res.data)
         } else {
           this.$message.error(res.msg)
         }
       })
     },
-    close () {
+    close() {
       this.$emit('close')
     }
   }
 }
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

+ 1 - 1
src/views/resource/component/authorize.vue

@@ -120,7 +120,7 @@ export default {
       this.$api.resource.fileAuthorize(this.query).then(res => {
         if (res.code === 200) {
           this.qrCodeText =
-            'https://dev.wutongresearch.club/apply?id=' + res.data
+            'https://prod.wutongshucloud.com/apply?id=' + res.data
         }
       })
     },

+ 10 - 8
src/views/user/manage.vue

@@ -126,7 +126,7 @@
           </div>
           <div class="flex flex-col" style="margin-top: -10px">
             <div class="flex flex-align-center">
-              <span class="bold ml-20">管理股室</span>
+              <span class="bold ml-20">管理机构</span>
               <el-checkbox
                 size="large"
                 style="margin-left: 33px"
@@ -440,11 +440,13 @@ export default {
       this.onLoad()
     },
     getJobList() {
-      this.$api.role.jobList({ roleAlias: 'post' }).then(res => {
-        if (res.code === 200) {
-          this.jobs = res.data
-        }
-      })
+      this.$api.role
+        .jobList({ roleAlias: this.user.info.type === 3 ? 'post' : 'staff' })
+        .then(res => {
+          if (res.code === 200) {
+            this.jobs = res.data
+          }
+        })
     },
     getOrg() {
       this.$api.role.deptList().then(res => {
@@ -549,8 +551,8 @@ export default {
       this.$api.role.invitation({ deptId, type: 4 }).then(res => {
         if (res.code === 200) {
           this.qrCodeText =
-            'https://dev.wutongresearch.club/apply?id=' +
-            res.data.qrcodeId +
+            'https://prod.wutongshucloud.com/apply?id=' +
+            res.data.id +
             '&deptId=' +
             deptId +
             '&roleName=股室'

+ 1 - 1
vite.config.js

@@ -1,4 +1,4 @@
-import {defineConfig} from 'vite'
+import { defineConfig } from 'vite'
 import vue from '@vitejs/plugin-vue'
 import Pages from 'vite-plugin-pages'
 import Layouts from 'vite-plugin-vue-layouts'