scorpio 3 jaren geleden
bovenliggende
commit
57ee0f5e1c

+ 32 - 32
src/components/basic-step/index.vue

@@ -1,44 +1,44 @@
 <template>
-  <div class="flex flex-col" style='width: 250px'>
+  <div class="flex flex-col full-height" style='width: 250px;overflow-y: scroll;'>
     <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 ? "step-bg" : "normal" '
-               :style='index === 0 ? "height:60px" :"height:80px" '
-               class='step'/>
-          <img
-              :src='indicator >= index ? dotSelect : dotNormal '
-              style='margin-top: -34px; margin-bottom: -34px;z-index: 1'/>
-        </div>
-        <!--        tips-->
-        <div class="flex flex-center">
-          <img v-if="indicator === index" src="../../assets/svg/step/marker.svg"
-               style="margin-right: 12px;margin-top: 30px">
-          <div :style='indicator === index ? "background-color: #596A8A":"background-color: transparent" '
-               class='content pointer' style='z-index: 2;margin-left: -15px'
-               @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:#D9E6FF": "color:#AFAFAF"' class="mt-5 nowrap">
-                  {{ item.title }}
-                </div>
-                <div class="flex">
-                  <div :style='indicator === index ? "color:#E2AE64": "color:#825618" ' class='text-left'>
-                    {{ item.count }}<span class="font-12">个文件</span>
+        <div class='flex flex-align-end'>
+          <div class='flex flex-col flex-center' style="width: 40px">
+            <div :class='indicator >= index ? "step-bg" : "normal" '
+                 :style='index === 0 ? "height:60px" :"height:80px" '
+                 class='step'/>
+            <img
+                :src='indicator >= index ? dotSelect : dotNormal '
+                style='margin-top: -34px; margin-bottom: -34px;z-index: 1'/>
+          </div>
+          <!--        tips-->
+          <div class="flex flex-center">
+            <img v-if="indicator === index" src="../../assets/svg/step/marker.svg"
+                 style="margin-right: 12px;margin-top: 30px">
+            <div :style='indicator === index ? "background-color: #596A8A":"background-color: transparent" '
+                 class='content pointer' style='z-index: 2;margin-left: -15px'
+                 @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:#D9E6FF": "color:#AFAFAF"' class="mt-5 nowrap">
+                    {{ item.title }}
+                  </div>
+                  <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>
-                  <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>
           </div>
         </div>
       </div>
-    </div>
   </div>
 </template>
 

+ 1 - 0
src/layout/index.vue

@@ -33,6 +33,7 @@ export default {
     return { keepAlive }
   },
   created () {
+    console.log(this.keepAlive.list)
     this.keepAlive.$subscribe((res) => {
       console.log(this.keepAlive.list)
     })

+ 3 - 3
src/page/login.vue

@@ -85,7 +85,7 @@
                 <div class='flex flex-col mt-10'>
                   <span class='grey-6'>由梧桐研究院提供技术支持</span>
                   <div>
-                    <el-button class='mt-10' plain size='small' type='primary' @click='loginAdmin'>admin</el-button>
+                    <el-button class='mt-10' plain size='small' type='primary' @click='loginAdmin'>业主</el-button>
                   </div>
                 </div>
               </div>
@@ -207,8 +207,8 @@ export default {
       })
     },
     loginAdmin () {
-      this.form.name = 'admin'
-      this.form.pass = 'admin'
+      this.form.name = '15587166921'
+      this.form.pass = 'wtkj@123'
     },
     getInfo () {
       this.getPermission()

+ 2 - 2
src/router/index.js

@@ -7,6 +7,7 @@ import { setupLayouts } from 'layouts-generated'
 
 // 导出路由
 const routes = setupLayouts(generatedRoutes)
+console.log(routes)
 const router = createRouter({
   history: vueRouter.createWebHistory(),
   routes
@@ -14,16 +15,15 @@ const router = createRouter({
 
 router.beforeEach((to, from, next) => {
   if (to.path !== '/login') {
-    console.log(to)
     const nav = navStore()
     nav.updateMenu(to)
   }
   if (to.meta.keepAlive) {
+    console.log(to.name)
     const keepAlive = keepAliveStore()
     keepAlive.add(to.name) // 将路由名称添加到 keepAlive 集合中
   }
   if (to.matched.length) {
-    console.log(to.fullPath)
     next()
   } else {
     next('/404')

+ 13 - 9
src/views/home/component/left_bar.vue

@@ -5,14 +5,11 @@
         <main-button :width="200" type="0" @click="proInfo"/>
         <el-divider></el-divider>
       </div>
-      <div class='full-height' style="margin-left: 20px;text-align: left;">
-        <span class="title">项目阶段-文件管理</span>
-        <el-empty v-if="stage &&  stage.length === 0 "/>
-        <div v-else class='mt-20 full-height hide-scrollbar'
-             style='overflow-y: scroll;margin-bottom: 200px;height: 800px'>
-          <basic-step :active="active" :steps='stage'/>
-        </div>
-      </div>
+    </div>
+    <div class='middle ' style="margin-left: 20px;text-align: left;">
+      <span class="title">项目阶段-文件管理</span>
+      <el-empty v-if="stage &&  stage.length === 0 "/>
+      <basic-step class='mt-5' :active="active" :steps='stage'/>
     </div>
     <div class="down">
       <div class="padding flex flex-col flex-center">
@@ -73,10 +70,10 @@ export default {
 }
 
 .down {
-  height: 300px;
   width: 300px;
   position: fixed;
   bottom: 0;
+  padding-bottom: 20px;
   background-color: #FAF9FA
 }
 
@@ -87,6 +84,13 @@ export default {
   width: 240px
 }
 
+.middle{
+  width: 270px;
+  position: fixed;
+  bottom: 175px;
+  top: 160px;
+}
+
 .title {
   color: #ECAB56;
   font-size: 16px;

+ 10 - 9
src/views/home/details.vue

@@ -5,25 +5,26 @@
     </div>
     <div class="full-height full-width white-bg padding-left padding-top" style="margin-left: 300px">
       <proinfo v-if="type === '0'" :data="data" :issue="list" @refInfo="proInfo" @refresh="issueList"/>
-      <folder_info v-else :id="id" :data='data' :projectStageId="projectStageId" />
+      <folder-info v-else :id="id" :data='data' :projectStageId="projectStageId" />
     </div>
   </div>
 </template>
 
 <route>
-{
-name:'项目详情',
-}
+  {
+    name: '项目详情',
+    meta: { keepAlive: true }
+  }
 </route>
 
 <script>
 import leftBar from './component/left_bar.vue'
 import proinfo from './component/proinfo.vue'
-import folder_info from './component/folder_info.vue'
+import folderInfo from './component/folder_info.vue'
 
 export default {
-  name: 'test',
-  components: { leftBar, proinfo, folder_info },
+  name: '项目详情',
+  components: { leftBar, proinfo, folderInfo },
   watch: {
     stage: {
       handler (newValue) {
@@ -42,7 +43,7 @@ export default {
       list: [],
       stage: [],
       projectStageId: '',
-      active: 0
+      active: -1
     }
   },
   created () {
@@ -55,8 +56,8 @@ export default {
       this.type = '1'
       this.active = index
       this.projectStageId = this.stage[index] === undefined ? '' : this.stage[index].id
-      console.log(index)
     })
+    console.log('created')
   },
   methods: {
     typeChange () {

+ 3 - 3
src/views/home/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="flex flex-col full-height">
     <top-serach v-if="type === 0"/>
-    <owner_serach v-else-if="type === 1"/>
+    <owner-serach v-else-if="type === 1"/>
     <div class="full-width full-height mt-10">
       <dash/>
     </div>
@@ -17,14 +17,14 @@ name: '项目库',
 
 <script>
 import topSerach from './component/top_serach.vue'
-import owner_serach from './component/owner_serach.vue'
+import ownerSerach from './component/owner_serach.vue'
 import dash from './component/dash.vue'
 import { useStore } from '@/store/user.js'
 
 import tokenStore from '../../store/token.js'
 
 export default {
-  components: { topSerach, dash, owner_serach },
+  components: { topSerach, dash, ownerSerach },
   setup () {
     const store = useStore()
     const token = tokenStore()

+ 3 - 3
vite.config.js

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