scorpioyq 3 년 전
부모
커밋
8b6a7f874d

+ 1 - 1
package.json

@@ -10,7 +10,7 @@
   },
   "dependencies": {
     "@element-plus/icons-vue": "^2.0.6",
-    "@smallwei/avue": "^3.1.0",
+    "@smallwei/avue": "^3.1.4",
     "animate.css": "^4.1.1",
     "element-plus": "^2.2.9",
     "js-base64": "^3.7.2",

+ 7 - 0
src/api/common.js

@@ -0,0 +1,7 @@
+import fetch from '../api/fetch.js'
+
+export default {
+    dicList(params) {
+        return fetch('/blade-system/dict-biz/dictionary', params)
+    },
+}

+ 18 - 0
src/api/database/index.js

@@ -0,0 +1,18 @@
+import fetch from '../fetch.js'
+
+export default {
+    /**
+     * 资料库相关借口
+     * @returns {Promise<unknown>}
+     */
+    fileList(params) { //项目列表
+        return fetch('/blade-project-manage/projectfile/v1/list', 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')
+    },
+
+}

+ 5 - 1
src/api/index.js

@@ -1,10 +1,14 @@
 import login from './login/index.js'
 import system from './system/index.js'
 import project from "./project/index.js";
+import common from "./common.js";
+import recycle from "./recycle/index.js";
 
 export default {
     uploadPath: '/api/wutong-file/minio/file/upload', // 上传
     login,
     system,
-    project
+    project,
+    common,
+    recycle
 }

+ 18 - 0
src/api/recycle/index.js

@@ -0,0 +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')
+    },
+
+}

+ 1 - 0
src/components/basic-step/index.vue

@@ -64,6 +64,7 @@ export default {
     change(index) {
       this.indicator = index
       this.$emit('change', index)
+      this.$bus.emit('change', index)
     }
   }
 }

+ 21 - 3
src/views/database/component/list.vue

@@ -11,7 +11,7 @@
         <el-icon class="ml-20" color="#ECAB56">
           <WarningFilled/>
         </el-icon>
-        <span class="ml-5">共找到相关资料23947,34份</span>
+        <span class="ml-5" @click="showInfo=true">共找到相关资料23947,34份</span>
       </div>
     </div>
     <avue-crud ref="crud"
@@ -30,14 +30,22 @@
                @refresh-change="refreshChange"
                @on-load="onLoad">
     </avue-crud>
+    <el-dialog v-model="showInfo" append-to-body width="45%">
+      <div class="flex flex-col flex-center">
+        <div class="flex flex-center">
+          <img src="../../../assets/svg/folder/doc.svg" style="width: 200px;height: 160px">
+        </div>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 export default {
   name: 'list',
-  data () {
+  data() {
     return {
+      showInfo: false,
       keyWords: '',
       loading: false,
       data: [],
@@ -89,7 +97,17 @@ export default {
     }
   },
   methods: {
-    choise (index) {
+    beforeOpen(done, type) {
+      if (['view'].includes(type)) {
+        this.showInfo = true
+      } else if (type === 'edit') {
+        this.$router.push({
+          path: '/home/details',
+          query: {id: this.form.id, type: '1'}
+        })
+      }
+    },
+    choise(index) {
       this.active = index
     }
   }

+ 42 - 30
src/views/home/component/dash.vue

@@ -9,7 +9,7 @@
       </div>
       <div class="flex ml-20">
         <div v-for="(item,index) in stage" :class="active === index ? 'total-s' : 'total'"
-             class="flex flex-col flex-align-start flex-center mt-20 bold font-16" @click="choise(index)">
+             class="flex flex-col flex-align-start flex-center mt-20 bold font-16" @click="switchTab(item,index)">
           <span class="ml-15 sp">{{ item.name }}</span>
           <span class="ml-15 sp1 mt-5">{{ item.projectNumber }}<span class="grey font-14 ml-5">个</span></span>
         </div>
@@ -29,6 +29,9 @@
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
+      <!--      <template #menu="{row}">-->
+      <!--        <el-button icon="Operation" text @click="track(row.id)">跟踪审计</el-button>-->
+      <!--      </template>-->
     </avue-crud>
     <el-dialog v-model="showAdd"
                append-to-body
@@ -115,6 +118,8 @@ export default {
         columnBtn: false,
         searchShow: true,
         editBtn: true,
+        editBtnText: '跟踪审计',
+        editBtnIcon: 'Operation',
         addBtn: false,
         delBtn: true,
         border: true,
@@ -129,35 +134,35 @@ export default {
             prop: 'name',
             addDisplay: false,
             editDisplay: false,
-            width: 500
+            width: 400
           },
           {
-            label: '更新时间',
-            prop: 'updateTime',
-            type: 'month',
-            format: 'yyyy-MM-dd',
-            valueFormat: 'yyyy-MM-dd'
+            label: '项目总投资(万元)',
+            prop: 'totalAmount',
+            width: 180
           },
           {
-            label: '项目类型',
+            label: '项目领域',
             prop: 'dictName'
           },
           {
             label: '项目进行阶段',
-            prop: 'lot'
+            prop: 'stageId'
           },
           {
-            label: '项目总投资(万元)',
-            prop: 'totalAmount'
+            label: '发债时间',
+            prop: 'issueDate',
+            type: 'month',
+            format: 'yyyy-MM',
+            valueFormat: 'yyyy-MM'
           },
           {
-            label: '创建时间',
-            prop: 'createTime',
+            label: '更新时间',
+            prop: 'updateTime',
             type: 'month',
             format: 'yyyy-MM-dd',
             valueFormat: 'yyyy-MM-dd'
-          }
-        ]
+          }]
       },
       page: {
         size: 10,
@@ -183,8 +188,15 @@ export default {
     })
   },
   methods: {
-    choise(index) {
+    switchTab(item, index) {
       this.active = index
+      this.onLoad({stageId: item.id})
+    },
+    track(id) {
+      this.$router.push({
+        path: '/home/details',
+        query: {id: id, type: '1'}
+      })
     },
     onLoad(query = {}) {
       let data = {...query, ...this.page}
@@ -200,7 +212,12 @@ export default {
       if (['view'].includes(type)) {
         this.$router.push({
           path: '/home/details',
-          query: {id: this.form.id}
+          query: {id: this.form.id, type: '0'}
+        })
+      } else if (type === 'edit') {
+        this.$router.push({
+          path: '/home/details',
+          query: {id: this.form.id, type: '1'}
         })
       }
     },
@@ -213,13 +230,6 @@ export default {
     refreshChange() {
       this.onLoad(this.page, this.query);
     },
-    getStageList() {
-      this.$api.project.userStageList().then(res => {
-        if (res.code === 200) {
-          this.stage = res.data
-        }
-      })
-    },
     rowDel(row) {
       this.$confirm("确定删除选择的项目?", {
         confirmButtonText: "确定",
@@ -237,6 +247,13 @@ export default {
             })
           })
     },
+    getStageList() {
+      this.$api.project.userStageList().then(res => {
+        if (res.code === 200) {
+          this.stage = res.data
+        }
+      })
+    },
     getTypeList() {
       this.$api.project.typeList().then(res => {
         this.typeList = res.data.records
@@ -254,12 +271,6 @@ export default {
         }
       })
     },
-    go() {
-      this.$router.push('/home/details')
-    },
-    go1() {
-      this.$router.push('/home/track')
-    },
   }
 }
 </script>
@@ -285,6 +296,7 @@ export default {
 
   .sp {
     color: #AC1F1D;
+    white-space: nowrap;
   }
 
   .sp1 {

+ 23 - 27
src/views/home/component/files_list.vue

@@ -1,29 +1,28 @@
 <template>
   <div class="full-width full-height mb-10">
     <div class="flex flex-col">
-      <div class="flex flex-align-center padding border-bottom bold">
-        <span style="flex: 0.5"></span>
-        <span style="flex: 1.5;color: #596A8A">文件/文件夹名称</span>
-        <span class="title">更新(上传)时间</span>
-        <span class="title">文件大小</span>
-        <span class="title">是否同步</span>
-        <span class="title">上传人</span>
-        <span style="flex: 2;color: #596A8A">操作</span>
+      <div class="flex flex-align-center padding border-bottom bold title-sp">
+        <span class="flex-1">111</span>
+        <span style="flex: 2">文件/文件夹名称</span>
+        <span style="flex: 1">更新(上传)时间</span>
+        <span class="flex-1">文件大小</span>
+        <span class="flex-1">是否同步</span>
+        <span class="flex-1">上传人</span>
+        <span style="flex: 3">操作</span>
       </div>
-      <!--      <el-empty v-if="data.length === 0" description="暂无数据"/>-->
-
-      <div v-for="item in files" class="flex flex-center border-bottom padding">
-        <div style="flex: 0.5">
+      <el-empty v-if="files && files.length === 0"/>
+      <div v-for="item in files" v-else class="flex flex-center border-bottom padding content-sp">
+        <div class="flex-1">
           <img v-if="item.suffix === 'docx'" class="icon" src="../../../assets/svg/folder/doc.svg">
           <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">
         </div>
-        <span style="flex: 1.5;color: #707070;">{{ item.title }}</span>
-        <span class="title-x">{{ item.updateTime }}</span>
-        <span class="title-x">{{ item.size }}</span>
-        <span class="title-x">{{ item.status }}</span>
-        <span class="title-x">{{ item.author }}</span>
-        <div class="flex flex-center" style="flex: 2">
+        <span style="flex: 2">{{ item.title }}</span>
+        <span style="flex: 1">{{ item.updateTime }}</span>
+        <span class="flex-1">{{ item.size }}</span>
+        <span class="flex-1">{{ item.status }}</span>
+        <span class="flex-1">{{ item.author }}</span>
+        <div class="flex flex-center" style="flex: 3">
           <main-button icon="View" title="详情" width="85" @click="View"/>
           <main-button icon="Download" title="下载" width="85" @click="downFile(item)"/>
           <main-button icon="UploadFilled" title="同步" width="85"/>
@@ -32,7 +31,7 @@
       </div>
     </div>
     <!-------分页----->
-    <div class="mt-20 flex flex-center flex-justify-end" style="margin-right: 50px">
+    <div v-if="files && files.length !== 0" class="mt-20 flex flex-center flex-justify-end" style="margin-right: 50px">
       <span class="mr-20">共{{ data.total }}条</span>
       <el-pagination :total="data.total" background layout="prev, pager, next"/>
     </div>
@@ -97,19 +96,16 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.title {
+.title-sp {
   color: #596A8A;
-  flex: 1;
 }
 
-.title-s {
-  color: #BC002D;
-  flex: 1;
+.content-sp {
+  color: #707070;
 }
 
-.title-x {
-  color: #707070;
-  flex: 1;
+.flex-1 {
+  flex: 0.5;
 }
 
 .icon {

+ 48 - 24
src/views/home/component/folder_info.vue

@@ -5,7 +5,6 @@
         <span class="grey-6 font-18 bold nowrap mr-10">搜索</span>
         <el-input
             v-model="keyWords"
-            clearable
             placeholder="输入关键字"
             prefix-icon="Search"
             size="large"
@@ -13,17 +12,17 @@
         />
       </div>
       <div class="flex flex-center ml-10" style="flex: 1">
-        <base-button icon="Delete" title="清空" type="0"/>
-        <base-button class="ml-10"/>
+        <base-button icon="Delete" title="清空" type="0" @click="clear"/>
+        <base-button class="ml-10" @click="getFolderList"/>
       </div>
     </div>
     <div style="background-color: #E4E4E4;height: 10px;width: 100%;margin-left: -10px"></div>
     <!------tab------>
     <div class="flex flex-center mt-15">
       <div class="flex flex-center" style="flex: 3.8">
-        <div v-for="(item,index) in tab" class="flex flex-center tab">
+        <div v-for="(item,index) in folderType" class="flex flex-center tab">
           <div :class="active === index ? 'tab-active' : ''"
-               @click="change(index)">{{ item.name }}
+               @click="change(index,item.dictKey)">{{ item.dictValue }}
           </div>
         </div>
       </div>
@@ -49,6 +48,20 @@
                 style="width: 100%"
             />
           </el-form-item>
+          <el-form-item label="文件夹类型">
+            <el-select
+                v-model="dictKey"
+                clearable
+                placeholder="输入项目领域"
+                style="width: 100%">
+              <el-option
+                  v-for="item in folderType"
+                  :key="item.dictKey"
+                  :label="item.dictValue"
+                  :value="item.dictKey"
+              />
+            </el-select>
+          </el-form-item>
         </el-form>
         <div class="full-width flex flex-center mt-10">
           <base-button icon="Lock" title="保存" type="1" @click="folderAdd"/>
@@ -78,7 +91,9 @@ export default {
   watch: {
     projectStageId: {
       handler(val) {
-        this.getFolderList()
+        if (val) {
+          this.getDict()
+        }
       },
       immediate: true
     }
@@ -90,34 +105,42 @@ export default {
         title: '',
         projectStageId: '',
         projectId: '',
-        parentId: ''
+        parentId: '',
+        dictKey: ''
       },
       keyWords: '',
       active: 0,
-      tab: [
-        {
-          name: '项目必须文件'
-        },
-        {
-          name: '相关合同'
-        },
-        {
-          name: '财务相关资料'
-        },
-        {
-          name: '其他文件'
-        }
-      ],
+      folderType: [],
       folderList: [],
-      total: ''
+      total: '',
+      dictKey: ''
     }
   },
+
   methods: {
-    change(index) {
+    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) {
       this.active = index
+      this.dictKey = key
+      this.getFolderList()
+    },
+    clear() {
+      this.keyWords = ''
+      this.getFolderList()
     },
     getFolderList() {
-      this.$api.project.folderList({projectStageId: this.projectStageId}).then(res => {
+      this.$api.project.folderList({
+        projectStageId: this.projectStageId,
+        folderName: this.keyWords,
+        dictKey: this.dictKey
+      }).then(res => {
         if (res.code === 200) {
           this.folderList = res.data.records
           this.total = res.data.total
@@ -127,6 +150,7 @@ export default {
     folderAdd() {
       this.folderInfo.projectId = this.id
       this.folderInfo.projectStageId = this.projectStageId
+      this.folderInfo.dictKey = this.dictKey
       this.$api.project.folderAdd(this.folderInfo).then(res => {
         if (res.code === 200) {
           this.addShow = false

+ 20 - 26
src/views/home/component/folder_list.vue

@@ -1,25 +1,21 @@
 <template>
   <div class="full-width full-height mb-10">
     <div class="flex flex-col">
-      <div class="flex flex-align-center padding border-bottom bold">
-        <span v-if="type === 0" class="title-s">谋划阶段</span>
-        <span v-else class="title-s"></span>
-        <span style="color: #596A8A;flex: 1.5">文件/文件夹名称</span>
-        <span class="title">更新(上传)时间</span>
-        <span class="title">文件数量</span>
-        <span class="title"></span>
-        <span class="title"></span>
-        <span style="flex: 2;color: #596A8A">操作</span>
+      <div class="flex flex-align-center padding border-bottom bold title-sp">
+        <span v-if="type === 0" class="flex-1">谋划阶段</span>
+        <span v-else class="flex-1"></span>
+        <span style="flex: 2">文件/文件夹名称</span>
+        <span style="flex: 1">更新(上传)时间</span>
+        <span style="flex: 1.5">文件数量</span>
+        <span style="flex: 3">操作</span>
       </div>
-      <!--      <el-empty v-if="folder.length === 0" description="暂无数据"/>-->
-      <div v-for="item in folder" class="flex flex-center border-bottom padding">
+      <el-empty v-if="folder && folder.length === 0" description="暂无数据"/>
+      <div v-for="item in folder" v-else class="flex flex-center border-bottom padding content-sp">
         <img class="icon" src="../../../assets/svg/folder/see.svg">
-        <span style="color: #707070;flex: 1.5">{{ item.folderName }}</span>
-        <span class="title-x">{{ item.updateTime }}</span>
-        <span class="title-x">{{ item.fileNumber }}</span>
-        <span class="title-x"></span>
-        <span class="title-x"></span>
-        <div class="flex flex-center" style="flex: 2">
+        <span style="flex:2">{{ item.folderName }}</span>
+        <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 icon="View" title="详情" width="85" @click="fileView(item)"/>
           <main-button icon="Upload" title="上传文件" width="85" @click="uploadFiles(item)"/>
           <main-button v-if="type === 0" icon="Pointer" title="授权操作" width="85"/>
@@ -28,7 +24,8 @@
       </div>
     </div>
     <!-------分页----->
-    <div class="mt-20 flex flex-center flex-justify-end" style="margin-right: 50px">
+    <div v-if="folder && folder.length !== 0" class="mt-20 flex flex-center flex-justify-end"
+         style="margin-right: 50px">
       <span class="mr-20">共{{ total }}条</span>
       <el-pagination :total="total" background layout="prev, pager, next"/>
     </div>
@@ -125,19 +122,16 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.title {
+.title-sp {
   color: #596A8A;
-  flex: 1;
 }
 
-.title-s {
-  color: #BC002D;
-  flex: 0.5;
+.content-sp {
+  color: #707070;
 }
 
-.title-x {
-  color: #707070;
-  flex: 1;
+.flex-1 {
+  flex: 0.5;
 }
 
 .icon {

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

@@ -9,7 +9,7 @@
         <base-button icon="Upload" title="上传文件"/>
       </div>
     </div>
-    <folder_list :folder="folderList" :type="1" class="mt-20"/>
+    <folder_list :folder="folderList" :total="total" :type="1" class="mt-20"/>
   </div>
 </template>
 

+ 16 - 6
src/views/home/component/left_bar.vue

@@ -7,8 +7,9 @@
       </div>
       <div class='full-height' style="margin-left: 20px;text-align: left;">
         <span class="title">项目阶段-文件管理</span>
-        <div class='mt-20 full-height' style='overflow-y: scroll;margin-bottom: 200px'>
-          <basic-step :active="-1" :steps='stage' @change="change"/>
+        <el-empty v-if="stage &&  stage.length === 0 "/>
+        <div v-else class='mt-20 full-height' style='overflow-y: scroll;margin-bottom: 200px'>
+          <basic-step :active="active" :steps='stage'/>
         </div>
       </div>
     </div>
@@ -33,16 +34,25 @@ export default {
   components: {mainButton, basicStep},
   props: {
     data: Object,
-    stage: Array
+    stage: Array,
+    active: {
+      type: Number,
+      default: -1
+    }
+  },
+  watch: {
+    active: {
+      handler(val) {
+        // this.change(0)
+      },
+      immediate: true
+    },
   },
   data() {
     return {}
   },
 
   methods: {
-    change(index) {
-      this.$emit('change', index)
-    },
     proInfo() {
       this.$emit('typeChange')
     }

+ 1 - 0
src/views/home/component/owner_serach.vue

@@ -67,6 +67,7 @@ export default {
     clear() {
       this.form.projectType = ''
       this.form.name = ''
+      this.$bus.emit('serach', this.form)
     }
   }
 }

+ 66 - 22
src/views/home/component/top_serach.vue

@@ -23,8 +23,14 @@
               v-model="form.projectType"
               clearable
               placeholder="选择项目类型"
-              style="width: 100%"
-          />
+              style="width: 100%">
+            <el-option
+                v-for="item in typeList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+            />
+          </el-select>
         </el-form-item>
       </div>
       <el-col :span="16" class="flex flex-center">
@@ -36,8 +42,9 @@
                   v-model="form.startDate"
                   placeholder="开始日期"
                   style="width: 100%"
-                  type="date"
-                  valueFormat="YYYY-MM-DD"
+                  type="month"
+                  value-format="YYYY-MM"
+
               />
             </el-form-item>
           </el-col>
@@ -50,8 +57,8 @@
                   v-model="form.endDate"
                   placeholder="结束日期"
                   style="width: 100%"
-                  type="date"
-                  valueFormat="YYYY-MM-DD"
+                  type="month"
+                  value-format="YYYY-MM"
               />
             </el-form-item>
           </el-col>
@@ -62,8 +69,14 @@
               v-model="form.dictName"
               clearable
               placeholder="输入项目领域"
-              style="width: 100%"
-          />
+              style="width: 100%">
+            <el-option
+                v-for="item in deptFields"
+                :key="item.id"
+                :label="item.dictValue"
+                :value="item.id"
+            />
+          </el-select>
         </el-form-item>
       </el-col>
       <div class="flex flex-center">
@@ -76,8 +89,8 @@
                     v-model="form.operationStartDate"
                     placeholder="开始日期"
                     style="width: 100%"
-                    type="date"
-                    valueFormat="YYYY-MM-DD"
+                    type="month"
+                    value-format="YYYY-MM"
                 />
               </el-form-item>
             </el-col>
@@ -90,26 +103,25 @@
                     v-model="form.operationEndDate"
                     placeholder="结束日期"
                     style="width: 100%"
-                    type="date"
-                    valueFormat="YYYY-MM-DD"
+                    type="month"
+                    value-format="YYYY-MM"
                 />
               </el-form-item>
             </el-col>
           </el-form-item>
-          <el-form-item class="full-width" label="发债年份">
+          <el-form-item class="full-width" label="发债时间">
             <el-date-picker
-                v-model="form.issueDate"
+                v-model="form.issueYear"
                 placeholder="选择发债年份"
                 style="width: 100%"
-                type="date"
-                valueFormat="YYYY"
+                type="year"
+                value-format="YYYY"
             />
           </el-form-item>
         </el-col>
         <el-col :span="8">
           <div class="flex flex-center flex-justify-end"
                style="margin-bottom: 18px;width: 82%;margin-left: 120px">
-            <!--            <base-button class="pointer" type="0" title="添加文件夹" icon="Plus"/>-->
             <div class="flex flex-center">
               <base-button class="pointer mr-20" icon="Delete" title="清空" type="0" @click="clear"/>
               <base-button class="pointer" @click="sure"/>
@@ -137,18 +149,50 @@ export default {
         dictName: '',//项目领域
         operationStartDate: '',//项目运营期
         operationEndDate: '',
-        issueDate: '',//发行日期
+        issueYear: '',//发行日期
         projectType: '',//项目类型
-      }
+      },
+      typeList: [],
+      deptFields: []
     }
   },
+  created() {
+    this.getTypeList()
+    this.getDict()
+  },
   methods: {
     sure() {
-
+      this.$bus.emit('serach', this.form)
+    },
+    getTypeList() {
+      this.$api.project.typeList().then(res => {
+        this.typeList = res.data.records
+      })
     },
     clear() {
-      this.form = ''
-    }
+      this.form = {
+        name: '',//项目名称
+        startDate: '',//项目建设期
+        endDate: '',
+        createDept: '',//业主部门
+        dictName: '',//项目领域
+        operationStartDate: '',//项目运营期
+        operationEndDate: '',
+        issueDate: '',//发行日期
+        projectType: '',//项目类型
+      }
+      this.$bus.emit('serach', this.form)
+    },
+    getDict() {
+      this.$api.common.dicList({'code': 'pc-debt-type'}).then(res => {
+        if (res.code === 200) {
+          this.deptFields = res.data.map(sub => {
+            sub.checked = false
+            return sub
+          })
+        }
+      })
+    },
   }
 }
 </script>

+ 36 - 7
src/views/home/details.vue

@@ -1,10 +1,10 @@
 <template>
   <div class='flex flex-justify-start full-height'>
     <div class="full-height">
-      <left-bar :data="data" :stage="stage" @change="change" @typeChange="typeChange"/>
+      <left-bar :active="type === '0' ? -1 : 0 " :data="data" :stage="stage" @typeChange="typeChange"/>
     </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"/>
+      <proinfo v-if="type === '0'" :data="data" :issue="list" @refInfo="proInfo" @refresh="issueList"/>
       <folder_info v-else :id="id" :projectStageId="projectStageId"/>
     </div>
   </div>
@@ -24,9 +24,19 @@ import folder_info from './component/folder_info.vue'
 export default {
   name: 'test',
   components: {leftBar, proinfo, folder_info},
+  watch: {
+    stage: {
+      handler(newValue) {
+        if (newValue) {
+          this.change(0)
+        }
+      },
+      immediate: true
+    },
+  },
   data() {
     return {
-      type: 0,
+      type: '0',
       id: '',
       data: {},
       list: [],
@@ -36,14 +46,22 @@ export default {
   },
   created() {
     this.id = this.$route.query.id
+    this.type = this.$route.query.type
     this.proInfo()
     this.issueList()
     this.getStage()
+    this.$bus.on('change', (index) => {
+      this.type = '1'
+      this.projectStageId = this.stage[index] === undefined ? '' : this.stage[index].id
+    })
   },
   methods: {
     typeChange() {
-      this.type = 0
+      this.type = '0'
     },
+    /**
+     * 项目信息
+     */
     proInfo() {
       this.$api.project.projectInfo(this.id).then(res => {
         if (res.code === 200) {
@@ -51,6 +69,9 @@ export default {
         }
       })
     },
+    /**
+     * 发行明细
+     */
     issueList() {
       this.$api.project.issuanceDetail({projectId: this.id}).then(res => {
         if (res.code === 200) {
@@ -58,9 +79,11 @@ export default {
         }
       })
     },
+    /**
+     * 获取项目阶段
+     */
     getStage() {
       this.$api.project.includeStage({projectId: this.id}).then(res => {
-        console.log(res)
         if (res.code === 200) {
           this.stage = res.data.map(e => {
             let newItem = {}
@@ -72,9 +95,15 @@ export default {
         }
       })
     },
+    /**
+     * 切换项目阶段
+     * @param res
+     */
     change(res) {
-      this.type = 1
-      this.projectStageId = this.stage[res].id
+      if (this.$route.query.type !== '0') {
+        this.type = '1'
+      }
+      this.projectStageId = this.stage[res] === undefined ? '' : this.stage[res].id
     },
   }
 }

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

@@ -31,7 +31,7 @@ export default {
   },
   data() {
     return {
-      type: 0
+      type: 1
     }
   },
   created() {

+ 114 - 86
src/views/recycle/index.vue

@@ -1,12 +1,32 @@
 <template>
-  <div>
-    <basic-container class='mt-10'>
-      <div>
-        <el-button @click='option.detail = !option.detail'>编辑</el-button>
+  <div class="full-height full-width flex flex-col">
+    <div class="white-bg flex flex-align-center padding">
+      <el-select
+          v-model="keyWords"
+          class="mt-10 ml-10"
+          clearable
+          placeholder="排列方式"
+      />
+      <div class="flex flex-align-center tip mt-10">
+        <el-icon class="ml-20" color="#ECAB56">
+          <WarningFilled/>
+        </el-icon>
+        <span class="ml-5">共找到相关资料23947,34份</span>
       </div>
-      <el-divider/>
-      <basic-form :data='data' :option='option' class='mt-20' @change='change'/>
-    </basic-container>
+    </div>
+    <avue-crud ref="crud"
+               v-model="form"
+               v-model:page="page"
+               :before-open="beforeOpen"
+               :data="data"
+               :option="option"
+               :table-loading="loading"
+               @row-del="rowDel"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+    </avue-crud>
   </div>
 </template>
 
@@ -18,106 +38,114 @@ name: '回收站',
 </route>
 
 <script>
-import BasicContainer from '@/components/basic-container/main.vue'
-import basicForm from '@/components/basic-form/index.vue'
 
 export default {
   name: 'index',
-  components: {BasicContainer, basicForm},
   data() {
     return {
+      keyWords: '',
+      loading: false,
+      data: [],
+      form: {},
       option: {
-        detail: true,
-        labelWidth: '200px',
+        calcHeight: 30,
+        refreshBtn: false,
+        tip: false,
+        columnBtn: false,
+        searchShow: true,
+        editBtn: true,
+        editBtnText: '还原',
+        addBtn: false,
+        delBtn: true,
+        border: true,
+        index: true,
+        align: 'center',
+        viewBtn: true,
+        menuWidth: 260,
+        dialogClickModal: false,
         column: [
           {
-            label: '项目统一名称',
-            prop: 'data1',
-            type: 'input',
-            span: 24
+            label: '文件名称',
+            prop: 'name',
+            addDisplay: false,
+            editDisplay: false
           },
           {
-            type: 'row',
-            column: [
-              {
-                label: '总投资',
-                prop: 'data2',
-                type: 'textarea',
-                span: 24
-              },
-              {
-                label: '区划',
-                prop: 'data3',
-                type: 'textarea',
-                span: 24
-              }
-            ]
+            label: '格式',
+            prop: 'issueCumulative'
           },
           {
-            type: 'row',
-            column: [
-              {
-                label: '地市',
-                prop: 'data2',
-                type: 'textarea',
-                span: 24
-              },
-              {
-                label: '区县',
-                prop: 'data3',
-                type: 'textarea',
-                span: 24
-              }
-            ]
-          },
-          {
-            type: 'row',
-            column: [
-              {
-                label: '不含专项债的资本金',
-                prop: 'data2',
-                type: 'textarea',
-                span: 24
-              },
-              {
-                label: '项目领域',
-                prop: 'data3',
-                type: 'textarea',
-                span: 24
-              }
-            ]
+            label: '大小(MB)',
+            prop: 'lot'
           },
           {
-            label: '收入来源',
-            prop: 'data5',
-            type: 'textarea',
-            span: 24,
-            rows: 4
+            label: '删除时间',
+            prop: 'createTime'
           },
           {
-            label: '建设内容',
-            prop: 'data6',
-            type: 'textarea',
-            span: 24,
-            rows: 2
-          }
-        ]
+            label: '删除人',
+            prop: 'createUser'
+          },]
       },
-      data: {
-        data1: '祥云经开区年产10GW单晶硅棒及切片标准厂房及配套基础设施建设项目',
-        data2: 'data2',
-        data3: 'data3',
-        data4: 'data4',
-        data5: '经研究,本项目位于宜良县九乡乡西北,该地具有良好的自然资源和旅游资源,旅游产业发展基础、市场氛围和周边环境良好。项目建设场址周边500米内无污染企业排污,200米内无噪声源,在地形地貌、气候气象、水文地质等方面满足项目建设选址的需要,从工程技术评价的角度来分析,建设用地条件较好。项目市政配套、交通、投资环境、社会环境等条件较好,适宜项目建设。',
-        data6: '项目位于普泪市思茅产业园区,思润公路以北, 项目用地面积: 60246叶(90.37亩),总建筑面积74483平方米, 建设医药标准生产厂房、 医药GSP仓库、 综合仓库及冷库、 医药及其他配套用房、 动力中心、 园区递路、 停车位、 水电、 污水处理等基础设施。'
+      page: {
+        pageSize: 15,
+        currentPage: 1,
+        total: 0
       }
     }
   },
   methods: {
-    change(res) {
-      this.data = res
-      console.log(res)
-    }
+    onLoad() {
+      this.$api.recycle.recycleList().then(res => {
+        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"
+        })
+            .then(() => {
+              this.$api.recycle.recycleBack({recycleBinId: this.form.id}).then(res => {
+                console.log(res)
+              })
+            })
+      }
+    },
+    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 => {
+              if (res.code === 200) {
+                this.$message.success(res.msg)
+                this.onLoad()
+              } else {
+                this.$message.error(res.msg)
+              }
+            })
+          })
+    },
   }
 }
 </script>

+ 4 - 4
yarn.lock

@@ -275,10 +275,10 @@
   resolved "https://registry.yarnpkg.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz#a7f69e3665d3da9b115f9e71671dae1b97e13671"
   integrity sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==
 
-"@smallwei/avue@^3.1.0":
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/@smallwei/avue/-/avue-3.1.0.tgz#6a19b3c6ef57408e4cc2fca89a6bd382a35c1a60"
-  integrity sha512-RV/k+agzuLH15CwN/NUp/uLtE10ahcx3pUlgQxrKrII0sFU7p8QMiZ7cDyDGT67QhYtpFSHZSmQ7mNj2JVN55A==
+"@smallwei/avue@^3.1.4":
+  version "3.1.4"
+  resolved "https://registry.yarnpkg.com/@smallwei/avue/-/avue-3.1.4.tgz#d9d5fb049706e718ceee74a49bae1af7fd1d8f25"
+  integrity sha512-+KVr9ssdh0RWK5cCy8v9403KFgkInMQuGCOoumm+kGZDj8BJPDSIQe5CjJU6H9ukL30J/wiL4OYHu7V3giNB+Q==
   dependencies:
     "@element-plus/icons-vue" "^2.0.6"
     axios "^0.21.1"