Ver código fonte

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/api/project/index.js
#	src/views/home/component/folder_info.vue
scorpioyq 3 anos atrás
pai
commit
e9824b36ab

+ 1 - 1
README.md

@@ -11,7 +11,7 @@
 <script>
 
 export default {
-  name: '设置', // 需要设置页面name 和 rotue 中的name 一致
+  name: '设置', // 需要设置页面name 和 rotue 中的name 一致,keepAlive 才有效
   data () {
     return {
       data: { }

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

@@ -1,95 +1,95 @@
 import fetch from '../fetch.js'
 
 export default {
-    /**
+  /**
      * 项目相关借口
      * @returns {Promise<unknown>}
      */
-    projectList(params) { // 项目列表
-        return fetch('/blade-project-manage/project/v1/page', params)
-    },
-    projectAdd(params) { // 新增项目
-        return fetch('/blade-project-manage/project/v1/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')
-    },
-    projectInfo(id) { // 项目详细信息
-        return fetch('/blade-project-manage/project/v1/detail/' + id)
-    },
-    proUpdate(params) { // 项目信息更新
-        return fetch('/blade-project-manage/project/v1/update', params, 'post', 'json')
-    },
-    issuanceDetail(params) { // 项目发行明细
-        return fetch('/blade-project-manage/projectdetail/v1/list', params)
-    },
-    issueAdd(params) { // 新增发行明细
-        return fetch('/blade-project-manage/projectdetail/v1/save', params, 'post', 'json')
-    },
-    userStageList() { // 统计用户阶段项目数
-        return fetch('/blade-project-manage/stage/v1/countProjectStagelist')
-    },
-    includeStage(params) { // 单个项目包含阶段
-        return fetch('/blade-project-manage/projectstage/v1/getProjectStageList', params)
-    },
-    folderList(params) { // 阶段包含文件夹列表
-        return fetch('/blade-project-manage/projectstagefilefolder/v1/getProjectStageFileList', params)
-    },
-    findFiles(params) { // 文件搜索
-        return fetch('/blade-project-manage/bladefile/v1/findFileList', params)
-    },
-    folderListAll(params) { // 历史数据文件夹列表
-        return fetch('/blade-project-manage/filefolder/v1/list', params)
-    },
-    folderRemove(params) { // 删除文件夹
-        return fetch('/blade-project-manage/filefolder/v1/remove', params, 'post')
-    },
-    folderAdd(params) { // 添加文件夹
-        return fetch('/blade-project-manage/filefolder/v1/save', params, 'post', 'json')
-    },
-    folderUpdate(params) { // 文件夹更新
-        return fetch('/blade-project-manage/filefolder/v1/update', params, 'post', 'json')
-    },
-    fileList(params) { // 文件夹里包含文件列表
-        return fetch('/blade-project-manage/bladefile/v1/getListByFolderId', params)
-    },
-    fileDetail(id) {
-        return fetch('/wutong-library/library/detail/' + id)
-    },
-    articleDetailByFile(id) {
-        return fetch('/wutong-library/library/detail/file/' + id)
-    },
-    fileAdd(params) { // 上传(新增)文件
-        return fetch('/blade-project-manage/bladefile/v1/save', params, 'post', 'json')
-    },
-    fileRemove(params) { // 删除文件
-        return fetch('/blade-project-manage/bladefile/v1/remove', params, 'post')
-    },
-    /**
+  projectList (params) { // 项目列表
+    return fetch('/blade-project-manage/project/v1/page', params)
+  },
+  projectAdd (params) { // 新增项目
+    return fetch('/blade-project-manage/project/v1/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')
+  },
+  projectInfo (id) { // 项目详细信息
+    return fetch('/blade-project-manage/project/v1/detail/' + id)
+  },
+  proUpdate (params) { // 项目信息更新
+    return fetch('/blade-project-manage/project/v1/update', params, 'post', 'json')
+  },
+  issuanceDetail (params) { // 项目发行明细
+    return fetch('/blade-project-manage/projectdetail/v1/list', params)
+  },
+  issueAdd (params) { // 新增发行明细
+    return fetch('/blade-project-manage/projectdetail/v1/save', params, 'post', 'json')
+  },
+  userStageList () { // 统计用户阶段项目数
+    return fetch('/blade-project-manage/stage/v1/countProjectStagelist')
+  },
+  includeStage (params) { // 单个项目包含阶段
+    return fetch('/blade-project-manage/projectstage/v1/getProjectStageList', params)
+  },
+  folderList (params) { // 阶段包含文件夹列表
+    return fetch('/blade-project-manage/projectstagefilefolder/v1/getProjectStageFileList', params)
+  },
+  findFiles(params) { // 文件搜索
+    return fetch('/blade-project-manage/bladefile/v1/findFileList', params)
+  },
+  folderListAll (params) { // 历史数据文件夹列表
+    return fetch('/blade-project-manage/filefolder/v1/list', params)
+  },
+  folderRemove (params) { // 删除文件夹
+    return fetch('/blade-project-manage/filefolder/v1/remove', params, 'post')
+  },
+  folderAdd (params) { // 添加文件夹
+    return fetch('/blade-project-manage/filefolder/v1/save', params, 'post', 'json')
+  },
+  folderUpdate (params) { // 文件夹更新
+    return fetch('/blade-project-manage/filefolder/v1/update', params, 'post', 'json')
+  },
+  fileList (params) { // 文件夹里包含文件列表
+    return fetch('/blade-project-manage/bladefile/v1/getListByFolderId', params)
+  },
+  fileDetail (id) {
+    return fetch('/wutong-library/library/detail/' + id)
+  },
+  articleDetailByFile (id) {
+    return fetch('/wutong-library/library/detail/file/' + id)
+  },
+  fileAdd (params) { // 上传(新增)文件
+    return fetch('/blade-project-manage/bladefile/v1/save', params, 'post', 'json')
+  },
+  fileRemove (params) { // 删除文件
+    return fetch('/blade-project-manage/bladefile/v1/remove', params, 'post')
+  },
+  /**
      * 业主主动授权
      * @param params
      * @returns {Promise | Promise<unknown>}
      */
-    initCode(params) {
-        return fetch('/blade-project-manage/qrcode/v1/getGrantQrcode', params, 'post', 'json')
-    },
-    /**
+  initCode (params) {
+    return fetch('/blade-project-manage/qrcode/v1/getGrantQrcode', params, 'post', 'json')
+  },
+  /**
      * 服务商触发消息发送
      * @param params
      * @returns {Promise | Promise<unknown>}
      */
-    send(params) {
-        return fetch('/blade-project-manage/frontMessage/v1/sendMessage', params)
-    },
-    /**
+  send (params) {
+    return fetch('/blade-project-manage/frontMessage/v1/sendMessage', params)
+  },
+  /**
      * 服务商主动申请文件授权
      * @param params
      * @returns {Promise<unknown>}
      */
-    apply(params) {
-        return fetch('/blade-project-manage/grant/v1/applyGrant', params, 'post', 'json')
-    }
+  apply (params) {
+    return fetch('/blade-project-manage/grant/v1/applyGrant', params, 'post', 'json')
+  }
 }

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

@@ -1,18 +1,18 @@
 import fetch from '../fetch.js'
 
 export default {
-    /**
+  /**
      * 回收站相关借口
      * @returns {Promise<unknown>}
      */
-    recycleList() { //回收站列表
-        return fetch('/blade-project-manage/recyclebin/v1/list')
-    },
-    recycleBack(params) { //恢复文件
-        return fetch('/blade-project-manage/recyclebin/v1/back', params)
-    },
-    recycleRemove(params) { //删除
-        return fetch('/blade-project-manage/recyclebin/v1/remove', params, 'post')
-    },
+  recycleList (params) { // 回收站列表
+    return fetch('/blade-project-manage/recyclebin/v1/list', params)
+  },
+  recycleBack (params) { // 恢复文件
+    return fetch('/blade-project-manage/recyclebin/v1/back', params)
+  },
+  recycleRemove (params) { // 删除
+    return fetch('/blade-project-manage/recyclebin/v1/remove', params, 'post')
+  }
 
 }

+ 0 - 1
src/layout/index.vue

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

+ 9 - 15
src/layout/left.vue

@@ -38,27 +38,21 @@ export default {
           img: new URL('../assets/svg/icon3.svg', import.meta.url).href,
           path: '/recycle'
         }
-      ]
+      ],
+      currentPage: ''
     }
   },
   created () {
+    this.currentPage = window.location.href
+    this.init()
   },
   methods: {
     init () {
-      this.$api.system.getMenus().then(res => {
-        if (res.code === 200) {
-          if (res.msg === '暂无承载数据') {
-            this.$router.push('/login')
-          } else {
-            this.data = res.data.map(sub => {
-              sub.checked = false
-              return sub
-            })
-            this.$router.push(this.data[0].path)
-            this.data[0].checked = true
-          }
-        }
-      })
+      if (this.currentPage.indexOf('/database') > -1) {
+        this.active = 1
+      } else if (this.currentPage.indexOf('/recycle') > -1) {
+        this.active = 2
+      }
     },
     navClick (item, index) {
       this.active = index

+ 3 - 3
src/layout/top.vue

@@ -5,7 +5,7 @@
            <img class="ml-10" src="../assets/svg/top.svg"/>
             <el-breadcrumb class='ml-10' separator="/">
               <el-breadcrumb-item v-for='item in nav.menus' :key='item.id'>
-                <a :href="item.path">{{ item.name }}</a>
+                <a :href="item.fullPath">{{ item.name }}</a>
               </el-breadcrumb-item>
             </el-breadcrumb>
           </div>
@@ -16,7 +16,7 @@
               <el-avatar class='mr-10' :size="30" :src="user.info.avatarUrl && user.info.avatarUrl.length > 0 ?  user.info.avatarUrl : 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'" />
               <el-dropdown @command='dropDown'>
                 <span class="flex flex-center">
-                  {{user.info.nikeName}} / {{user.info.deptName}}
+                  {{user.info.name}} / {{user.info.deptName}}
                   <el-icon class="el-icon--right">
                     <arrow-down />
                   </el-icon>
@@ -60,7 +60,7 @@ export default {
     },
     dropDown (res) {
       if (res === 'info') {
-        this.$message.success('个人中心')
+        this.$router.push('/user')
       } else if (res === 'logout') {
         this.$api.login.logout().then(res => {
           if (res.success === 'true') {

+ 12 - 2
src/page/404.vue

@@ -1,6 +1,11 @@
 <template>
   <div class='full-screen flex flex-center'>
-    <el-empty description='404 页面丢失'/>
+    <img src='https://wutong-1302848345.cos.ap-chengdu.myqcloud.com/wtzx/4e993b2d27a544a893ddbc8f60cc2a65.svg'/>
+    <div class='ml-20'>
+      <h1 style='font-size: 82px' class='bold'>404</h1>
+      <div class='mt-10 bold'>抱歉,你访问的页面不存在</div>
+      <el-button type='primary' class='mt-20' @click='goHome'>返回首页</el-button>
+    </div>
   </div>
 </template>
 
@@ -14,7 +19,12 @@
 
 <script>
 export default {
-  name: '404'
+  name: '404',
+  methods: {
+    goHome () {
+      this.$router.push('/')
+    }
+  }
 }
 </script>
 

+ 1 - 1
src/page/login.vue

@@ -165,7 +165,7 @@ export default {
   },
   created () {
     this.permission.cleanPermission()
-    this.dev = window.location.href.toString().indexOf('localhost') > -1
+    this.dev = window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('https://dev.wutongshucloud.com/') > -1
     removeToken()
     this.init()
   },

+ 0 - 1
src/router/index.js

@@ -19,7 +19,6 @@ router.beforeEach((to, from, next) => {
     nav.updateMenu(to)
   }
   if (to.meta.keepAlive) {
-    console.log(to.name)
     const keepAlive = keepAliveStore()
     keepAlive.add(to.name) // 将路由名称添加到 keepAlive 集合中
   }

+ 39 - 36
src/views/database/component/list.vue

@@ -16,7 +16,7 @@
     </div>
     <avue-crud ref="crud"
                v-model="form"
-               v-model:page="page"
+               :page="page"
                :before-open="beforeOpen"
                :data="data"
                :option="option"
@@ -28,18 +28,18 @@
                @on-load="onLoad">
     </avue-crud>
     <el-dialog v-model="showInfo" append-to-body width="45%">
-      <dialog_info :id="id"/>
+      <dialog-info :id="id"/>
     </el-dialog>
   </div>
 </template>
 
 <script>
-import dialog_info from './dialog_info.vue'
+import dialogInfo from './dialog_info.vue'
 
 export default {
   name: 'list',
-  components: {dialog_info},
-  data() {
+  components: { dialogInfo },
+  data () {
     return {
       showInfo: false,
       keyWords: '',
@@ -65,7 +65,7 @@ export default {
           {
             label: '文件名称',
             prop: 'title',
-            width: 380,
+            width: 380
           },
           {
             label: '所属项目',
@@ -77,7 +77,7 @@ export default {
           },
           {
             label: '上传人',
-            prop: 'createUserName',
+            prop: 'createUserName'
           },
           {
             label: '上传时间',
@@ -85,39 +85,42 @@ export default {
           }]
       },
       page: {
-        pageSize: 20,
-        currentPage: 1,
+        size: 10,
+        current: 1,
         total: 0
       },
       id: ''
     }
   },
-  created() {
+  created () {
     this.$bus.on('serachFile', (res) => {
       this.onLoad(res)
     })
   },
   methods: {
-    onLoad(query = {}) {
-      let data = {...query, ...this.page}
+    onLoad (query = {}) {
+      const data = { ...query, ...this.page }
+      this.loading = true
       this.$api.database.fileList(data).then(res => {
+        this.loading = false
         if (res.code === 200) {
           this.data = res.data.records
           this.page.total = res.data.total
-          this.loading = false;
         }
       })
     },
-    currentChange(currentPage) {
-      this.page.currentPage = currentPage;
+    currentChange (currentPage) {
+      this.page.current = currentPage
+      this.refreshChange()
     },
-    sizeChange(pageSize) {
-      this.page.pageSize = pageSize;
+    sizeChange (pageSize) {
+      this.page.size = pageSize
+      this.refreshChange()
     },
-    refreshChange() {
-      this.onLoad(this.page, this.query);
+    refreshChange () {
+      this.onLoad(this.page, this.query)
     },
-    beforeOpen(done, type) {
+    beforeOpen (done, type) {
       if (['view'].includes(type)) {
         this.showInfo = true
         console.log(this.showInfo)
@@ -125,28 +128,28 @@ export default {
       } else if (type === 'edit') {
         this.$router.push({
           path: '/home/details',
-          query: {id: this.form.id, type: '1'}
+          query: { id: this.form.id, type: '1' }
         })
       }
     },
-    rowDel(row) {
-      this.$confirm("确定删除选择的项目?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
+    rowDel (row) {
+      this.$confirm('确定删除选择的项目?', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
       })
-          .then(() => {
-            this.$api.database.fileRemove({ids: row.id}).then(res => {
-              if (res.code === 200) {
-                this.$message.success(res.msg)
-                this.onLoad()
-              } else {
-                this.$message.error(res.msg)
-              }
-            })
+        .then(() => {
+          this.$api.database.fileRemove({ ids: row.id }).then(res => {
+            if (res.code === 200) {
+              this.$message.success(res.msg)
+              this.onLoad()
+            } else {
+              this.$message.error(res.msg)
+            }
           })
+        })
     },
-    choise(index) {
+    choise (index) {
       this.active = index
     }
   }

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

@@ -2,7 +2,7 @@
   <div class="flex flex-col padding">
     <div class="flex flex-center mt-20">
       <div class="bold font-16 grey flex-child-average text-left" style="margin-left: 50px">
-        <span>当前数据({{ data.total }})</span>
+        <span>{{folderName}}({{ folderNumber }})</span>
       </div>
       <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="授权"
@@ -95,7 +95,9 @@ export default {
         ownerId: '',
         projectId: ''
       },
-      isAccess: ''
+      isAccess: '',
+      folderName: '',
+      folderNumber: 0
     }
   },
   setup () {
@@ -104,6 +106,8 @@ export default {
     return { permissions, user }
   },
   created () {
+    this.folderName = this.$route.query.folderName
+    this.folderNumber = this.$route.query.folderNumber
     this.isAccess = this.$route.query.isAccess
     this.projectId = this.$route.query.projectId
     this.folderInfo.dictKey = this.$route.query.dictKey

+ 5 - 1
src/views/home/component/dash.vue

@@ -261,8 +261,10 @@ export default {
     //   })
     // },
     onLoad (query = {}) {
+      this.loading = true
       const data = { ...query, ...this.page }
       this.$api.project.projectList(data).then(res => {
+        this.loading = false
         if (res.code === 200) {
           this.data = res.data.content
           this.num = res.msg
@@ -289,12 +291,14 @@ export default {
     },
     currentChange (currentPage) {
       this.page.currentPage = currentPage
+      this.refreshChange()
     },
     sizeChange (pageSize) {
       this.page.pageSize = pageSize
+      this.refreshChange()
     },
     refreshChange () {
-      this.onLoad(this.page, this.query)
+      this.onLoad(this.query)
     },
     rowDel (row) {
       this.$confirm('确定删除选择的项目?', {

+ 7 - 4
src/views/home/component/files_list.vue

@@ -5,7 +5,7 @@
         <span class="flex-1"></span>
         <span style="flex: 2;text-align: left">文件/文件夹名称</span>
         <span style="flex: 1">更新(上传)时间</span>
-        <span class="flex-1">文件大小</span>
+        <span class="flex-1">文件大小(数量)</span>
         <span class="flex-1">是否同步</span>
         <span class="flex-1">上传人</span>
         <span style="flex: 3">操作</span>
@@ -27,7 +27,7 @@
         <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>
+        <span v-if="item.type === '2'" class="flex-1">{{item.fileChildrenNumber}}个</span>
         <span v-if="item.type === '1'" class="flex-1">{{ item.status }}</span>
         <span v-if="item.type === '2'" class="flex-1">-</span>
         <span v-if="item.type === '1'" class="flex-1">{{ item.createUserName }}</span>
@@ -168,7 +168,8 @@ export default {
           this.imgList.push(item.url)
           return
         }
-        this.$router.push('/home/file_detail?id=' + item.fileId)
+        const routeData = this.$router.resolve({ path: '/home/file_detail', query: { id: item.fileId } })
+        window.open(routeData.href, '_blank')
       } else if (item.type === '2') {
         this.query.id = item.id
         console.log(item)
@@ -181,7 +182,9 @@ export default {
             dictKey: this.query.dictKey,
             parentId: item.id,
             isAccess: item.isAccess,
-            ownerId: this.query.ownerId
+            ownerId: this.query.ownerId,
+            folderName: item.title,
+            folderNumber: item.fileChildrenNumber
           }
         })
       }

+ 17 - 14
src/views/home/component/folder_info.vue

@@ -29,9 +29,11 @@
     <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">
-          <div :class="active === index ? 'tab-active' : ''"
-               @click="change(index,item.dictKey)">{{ item.dictValue }}
-          </div>
+          <el-badge :value='item.fileChildrenNumber' :hidden='item.fileChildrenNumber === 0'>
+            <div :class="active === index ? 'tab-active' : ''"
+                 @click="change(index,item.dictKey)">{{ item.dictValue }}
+            </div>
+          </el-badge>
         </div>
       </div>
       <div class="flex flex-center mr-5 " style="flex: 1.2">
@@ -104,7 +106,7 @@ export default {
   },
   watch: {
     projectStageId: {
-      handler(val) {
+      handler (val) {
         if (val) {
           this.getDict()
         }
@@ -112,11 +114,11 @@ export default {
       immediate: true
     }
   },
-  setup() {
+  setup () {
     const permissions = permissionStore()
-    return {permissions}
+    return { permissions }
   },
-  data() {
+  data () {
     return {
       loading: false,
       showImage: false,
@@ -146,26 +148,27 @@ export default {
     this.getFolderList()
   },
   methods: {
-    getDict() {
-      this.$api.common.dicList({code: 'pc-folder-type'}).then(res => {
+    getDict () {
+      this.$api.common.dicList({ code: 'pc-folder-type' }).then(res => {
         if (res.code === 200) {
           this.folderType = res.data
           this.change(0, this.folderType[0].dictKey)
         }
       })
     },
-    change(index, key) {
+    change (index, key) {
       this.active = index
       this.dictKey = key
       this.getFolderList()
     },
-    clear() {
+    clear () {
       this.keyWords = ''
       this.getFolderList()
     },
-    getFolderList() {
+    getFolderList () {
       const data = {
         projectStageId: this.projectStageId,
+        folderName: this.keyWords,
         dictKey: this.dictKey
       }
       this.$api.project.folderList(Object.assign(data, this.page)).then(res => {
@@ -229,7 +232,7 @@ export default {
         }
       })
     },
-    changePage(page) {
+    changePage (page) {
       console.log(page)
       this.page.current = page
       this.getFolderList()
@@ -240,7 +243,7 @@ export default {
 
 <style lang="scss" scoped>
 .tab {
-  width: 130px;
+  width: 150px;
   height: 38px;
   background-color: #EDF0F3;
   padding: 2px 10px;

+ 4 - 1
src/views/home/component/folder_list.vue

@@ -189,6 +189,7 @@ export default {
   methods: {
     fileView (item) {
       if (this.type === 0) {
+        console.log(item)
         this.$router.push({
           path: '/home/files',
           query: {
@@ -197,7 +198,9 @@ export default {
             ownerId: this.ownerId,
             dictKey: this.dictKey,
             projectStageId: item.projectStageId,
-            isAccess: item.isAccess
+            isAccess: item.isAccess,
+            folderName: item.folderName,
+            folderNumber: item.fileNumber
           }
         })
       } else {

+ 5 - 4
src/views/home/component/left_bar.vue

@@ -1,14 +1,15 @@
 <template>
   <div>
     <div class="top">
-      <div class="flex flex-col padding mt-20 ml-10">
+      <div class="flex flex-col flex-center padding mt-20  ">
+        <span class='font-16 bold  mb-10'>{{data.name}}</span>
         <main-button :width="200" type="0" @click="proInfo"/>
         <el-divider></el-divider>
       </div>
     </div>
-    <div class='middle ' style="margin-left: 20px;text-align: left;">
+    <div class='middle full-height' style="margin-left: 20px;text-align: left;">
       <span class="title">项目阶段-文件管理</span>
-      <el-empty v-if="stage &&  stage.length === 0 "/>
+      <el-empty style='margin-top: 200px' v-if="stage &&  stage.length === 0 "/>
       <basic-step class='mt-5' :active="active" :steps='stage'/>
     </div>
     <div class="down">
@@ -88,7 +89,7 @@ export default {
   width: 270px;
   position: fixed;
   bottom: 175px;
-  top: 160px;
+  top: 220px;
 }
 
 .title {

+ 31 - 8
src/views/home/component/proinfo.vue

@@ -33,14 +33,15 @@
         </div>
       </div>
     </div>
-    <el-dialog v-model='showAdd' append-to-body width='40%'>
+    <el-dialog v-model='showAdd' append-to-body width='40%' title='新增发行明细'>
       <div class="flex flex-col">
         <el-form ref="ruleFormRef"
                  :model="issueInfo"
                  class="demo-ruleForm"
                  label-width="120px"
+                 :rules='rules'
                  status-icon>
-          <el-form-item label="发行时间">
+          <el-form-item label="发行时间" prop='issueDate'>
             <el-date-picker
                 v-model="issueInfo.issueDate"
                 format="YYYY-MM-DD"
@@ -49,14 +50,22 @@
                 value-format="YYYY-MM-DD"
             />
           </el-form-item>
-          <el-form-item label="发行金额">
-            <el-input v-model="issueInfo.issueAmount"/>
+          <el-form-item label="发行金额" prop='issueAmount' class='full-width '>
+            <div class='full-width light-purple-bg'>
+              <el-input  v-model="issueInfo.issueAmount" placeholder="选择发行金额">
+                <template #append>万元</template>
+              </el-input>
+            </div>
           </el-form-item>
-          <el-form-item label="发行期限">
-            <el-input v-model="issueInfo.issueRate"/>
+          <el-form-item label="发行期限" prop='issueRate'>
+            <el-input v-model="issueInfo.issueRate" placeholder="选择发行期限">
+              <template #append>年</template>
+            </el-input>
           </el-form-item>
-          <el-form-item label="发行利率">
-            <el-input v-model="issueInfo.issueTerm"/>
+          <el-form-item label="发行利率" prop='issueTerm'>
+            <el-input v-model="issueInfo.issueTerm" placeholder="选择发行利率">
+              <template #append>%</template>
+            </el-input>
           </el-form-item>
         </el-form>
         <div class="full-width flex flex-center mt-10">
@@ -114,6 +123,20 @@ export default {
         issueRate: '',
         issueTerm: '',
         projectId: ''
+      },
+      rules: {
+        issueDate: [
+          { required: true, message: '请选择发行时间', trigger: 'blur' }
+        ],
+        issueAmount: [
+          { required: true, message: '请输入发行金额', trigger: 'blur' }
+        ],
+        issueRate: [
+          { required: true, message: '请输入发行期限', trigger: 'blur' }
+        ],
+        issueTerm: [
+          { required: true, message: '请输入发行利率', trigger: 'blur' }
+        ]
       }
     }
   },

+ 11 - 11
src/views/home/file_detail.vue

@@ -1,6 +1,5 @@
 <template>
-  <div>
-    <div class="full-width flex flex-center grey-f-bg">
+    <div class="full-width flex flex-center grey-f-bg" style='width: 100vw;height: 100vh'>
       <el-card class="flex flex-col flex-center mt-20 white-bg ">
         <div class="font-24">{{ data.title }}</div>
         <div class="flex flex-center mt-20 grey-6">
@@ -16,40 +15,41 @@
         </div>
       </el-card>
     </div>
-
-  </div>
 </template>
 
 <route>
 {
 name: '文件详情',
+meta: {
+layout: 'empty',
+}
 }
 </route>
 
 <script>
 export default {
-  name: "fileDetail",
-  data() {
+  name: 'fileDetail',
+  data () {
     return {
       id: '',
       data: {},
-      imgList: [],
+      imgList: []
     }
   },
-  created() {
+  created () {
     this.id = this.$route.query.id
     this.getFileDetail()
   },
   methods: {
-    getFileDetail() {
+    getFileDetail () {
       this.$api.project.articleDetailByFile(this.id).then(res => {
         if (res.code === 200) {
           this.data = res.data
           if (this.data.category === 4) {
             // this.imgList = this.data.imgs.map(sub => sub.filePath);
-            let content = "";
+            let content = ''
             this.data.imgs.forEach(sub => {
-              let img = "<img src='" + sub.filePath + "'/>"
+              const img = "<img src='" + sub.filePath + "'/>"
               content = content + img
             })
             this.data.content = content

+ 53 - 53
src/views/recycle/index.vue

@@ -2,7 +2,7 @@
   <div class="full-height full-width flex flex-col">
     <avue-crud ref="crud"
                v-model="form"
-               v-model:page="page"
+               :page="page"
                :before-open="beforeOpen"
                :data="data"
                :option="option"
@@ -27,12 +27,17 @@ name: '回收站',
 
 export default {
   name: 'index',
-  data() {
+  data () {
     return {
       keyWords: '',
       loading: false,
       data: [],
       form: {},
+      page: {
+        size: 10,
+        current: 1,
+        total: 10
+      },
       option: {
         calcHeight: 30,
         refreshBtn: false,
@@ -62,23 +67,23 @@ export default {
             type: 'select',
             dicData: [
               {
-                label: "文件夹",
+                label: '文件夹',
                 value: 1
               },
               {
-                label: "文件",
+                label: '文件',
                 value: 2
               },
               {
-                label: "项目",
+                label: '项目',
                 value: 3
               },
               {
-                label: "阶段",
+                label: '阶段',
                 value: 4
               },
               {
-                label: "专债明细",
+                label: '专债明细',
                 value: 5
               }
             ]
@@ -89,64 +94,31 @@ export default {
           },
           {
             label: '删除人',
-            prop: 'createUser'
-          },]
-      },
-      page: {
-        pageSize: 15,
-        currentPage: 1,
-        total: 0
+            prop: 'createUserName'
+          }]
       }
     }
   },
   methods: {
-    onLoad() {
-      this.$api.recycle.recycleList().then(res => {
+    onLoad () {
+      this.loading = true
+      this.$api.recycle.recycleList(this.page).then(res => {
+        this.loading = false
         if (res.code === 200) {
           this.data = res.data.records
           this.page.total = res.data.total
-          this.loading = false;
         }
       })
     },
-    beforeOpen(done, type) {
-      if (['view'].includes(type)) {
-
-      } else if (type === 'edit') {
-        this.$confirm("确定恢复所选择的文件?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
+    beforeOpen (done, type) {
+      if (type === 'edit') {
+        this.$confirm('确定恢复所选择的文件?', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
         })
-            .then(() => {
-              this.$api.recycle.recycleBack({recycleBinId: this.form.id}).then(res => {
-                if (res.code === 200) {
-                  this.$message.success(res.msg)
-                  this.onLoad()
-                } else {
-                  this.$message.error(res.msg)
-                }
-              })
-            })
-      }
-    },
-    currentChange(currentPage) {
-      this.page.currentPage = currentPage;
-    },
-    sizeChange(pageSize) {
-      this.page.pageSize = pageSize;
-    },
-    refreshChange() {
-      this.onLoad(this.page, this.query);
-    },
-    rowDel(row) {
-      this.$confirm("确定彻底删除所选择的文件?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      })
           .then(() => {
-            this.$api.recycle.recycleRemove({ids: row.id}).then(res => {
+            this.$api.recycle.recycleBack({ recycleBinId: this.form.id }).then(res => {
               if (res.code === 200) {
                 this.$message.success(res.msg)
                 this.onLoad()
@@ -155,7 +127,35 @@ export default {
               }
             })
           })
+      }
+    },
+    currentChange (currentPage) {
+      this.page.current = currentPage
+      this.refreshChange()
+    },
+    sizeChange (pageSize) {
+      this.page.size = pageSize
     },
+    refreshChange () {
+      this.onLoad()
+    },
+    rowDel (row) {
+      this.$confirm('确定彻底删除所选择的文件?', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          this.$api.recycle.recycleRemove({ ids: row.id }).then(res => {
+            if (res.code === 200) {
+              this.$message.success(res.msg)
+              this.onLoad()
+            } else {
+              this.$message.error(res.msg)
+            }
+          })
+        })
+    }
   }
 }
 </script>

+ 37 - 19
src/views/user/index.vue

@@ -1,32 +1,47 @@
 <template>
-  <div class='full-width full-height flex flex-col flex-justify-start'>
-    <div>
-      <el-button @click='push'>设置</el-button>
+  <basic-container class='mt-10'>
+    <el-avatar class='mt-20' :size='150' :src='user.info.avatarUrl'></el-avatar>
+    <div class='bold font-30'>{{ user.info.name }}</div>
+    <div class='bold font-24 mt-10'>{{ user.info.deptName }}</div>
+    <div class='mt-20 font-18 lines-height-15'>
+      <div>绑定电话:{{ user.info.phone }}</div>
+      <div>注册时间:{{ user.info.createTime }}</div>
     </div>
-    <avue-crud
-      :option="option"
-      :data="list"
-      ref="crud"
-      v-model="form"
-      :before-open="beforeOpen"
-      @row-del="rowDel"
-      @row-save="rowSave"
-      @row-update="rowUpdate"
-      @on-load="onLoad">
-    </avue-crud>
-  </div>
+    <div class='mt-20 flex flex-center '>
+      <div class='mr-20'>
+        <img class='icon'
+             src='https://wutong-1302848345.cos.ap-chengdu.myqcloud.com/wtzx/db94c8a6a7ec46f7a3b32b20a5da3844.jpg'/>
+        <div class='font-18 bold'>梧桐研究院</div>
+      </div>
+      <div class='ml-20'>
+        <img class='icon'
+             src='https://wutong-1302848345.cos.ap-chengdu.myqcloud.com/wtzx/23fcdf89312f4c969eeb636d1adf9adc.jpg'/>
+        <div class='font-18 bold'>梧桐树云平台</div>
+      </div>
+    </div>
+    <div class='mt-20 grey-6'>微信扫一扫 随时掌握项目动态</div>
+  </basic-container>
 </template>
 
 <route>
-  {
-    meta: { keepAlive: true }
-  }
+{
+  name: '个人中心',
+  meta: { keepAlive: true }
+}
 </route>
 
 <script>
 
+import BasicContainer from '@/components/basic-container/main.vue'
+import { useStore } from '@/store/user.js'
+
 export default {
   name: 'index',
+  components: { BasicContainer },
+  setup () {
+    const user = useStore()
+    return { user }
+  },
   data () {
     return {
       list: [],
@@ -140,5 +155,8 @@ export default {
 </script>
 
 <style scoped>
-
+.icon {
+  width: 180px;
+  height: 180px
+}
 </style>