scorpio 2 anni fa
parent
commit
bd89d14adc

+ 5 - 1
src/App.vue

@@ -6,7 +6,11 @@
     <el-main class="single">
       <div
         class="wrapper mt-20"
-        v-if="$route.meta.layout === 'empty' && $route.name !== 'login'"
+        v-if="
+          $route.meta.layout === 'empty' &&
+          $route.name !== 'login' &&
+          $route.meta.show === true
+        "
       >
         <tips />
       </div>

+ 3 - 0
src/components/file-way/index.vue

@@ -44,6 +44,9 @@ export default {
     next: {
       handler(val) {
         console.log(val)
+        if (val === null) {
+          return
+        }
         if (Object.hasOwn(val, 'projectId')) {
           const item = {
             id: val.id,

+ 4 - 1
src/components/tips-custom/index.vue

@@ -1,6 +1,9 @@
 \
 <template>
-  <div class="full-width flex flex-center flex-justify-between mb-20">
+  <div
+    class="full-width flex flex-center flex-justify-between mb-20 mt-20"
+    style="min-width: 1300px"
+  >
     <div class="flex flex-center">
       <el-button
         type="primary"

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

@@ -64,7 +64,7 @@
 <route>
 {
 name: '合同管理',
-meta: { layout: 'empty','path':'/home/details','title':'资料管理','showMsg' : "请先通过资料管理,在对应的相关合同类别下上传合同文件,系统将自动识别所有相关文件并展示在以下列表中。"}
+meta: { layout: 'empty','path':'/resource','title':'资料管理','showMsg' : "请先通过资料管理,在对应的相关合同类别下上传合同文件,系统将自动识别所有相关文件并展示在以下列表中。"}
 }
 </route>
 <script>

+ 1 - 0
src/views/resource/component/archives.vue

@@ -352,6 +352,7 @@ export default {
               this.$message.error(res.msg)
               return
             }
+            this.$emit('refresh')
             this.download(res)
           })
         }

+ 0 - 3
src/views/resource/component/preview.vue

@@ -79,9 +79,6 @@ export default {
       this.$api.resource.fileDetail(this.info.fileId).then(res => {
         if (res.code === 200) {
           this.data = res.data
-          console.log(this.data)
-        } else {
-          console.log(res)
         }
       })
     },

+ 14 - 3
src/views/resource/component/xtable.vue

@@ -47,20 +47,25 @@
               class="nowrap menu flex flex-center"
               style="width: 280px"
             >
-              <preview :info="row" v-if="row.type === 1" />
+              <preview :info="row" v-if="row.type === 1" ref="preview" />
               <archives
                 v-if="row.type === 2 && row.parentId === '0'"
                 :folder-id="row.id"
                 :row="row"
+                @refresh="refresh"
               />
               <move
-                v-if="row.type === 1"
+                v-if="row.type === 1 && row.fileStatus !== 1"
                 :project-id="row.projectId"
                 :file-id="row.id"
                 @on-success="refresh"
               />
               <slot name="menu" :row="row"></slot>
-              <defile :row="row" @row-del="refresh" v-if="row.type === 2" />
+              <defile
+                :row="row"
+                @row-del="refresh"
+                v-if="row.isAccess === 2 && row.fileStatus !== 1"
+              />
             </div>
             <div
               v-else
@@ -203,10 +208,16 @@ export default {
       this.$emit('refresh')
     },
     rowClick(row) {
+      // filePicker 文件选择
       if (this.selectedList.length === this.max) {
         this.$message.error('可选择文件数量最大为' + this.max)
         return
       }
+      // 点击的内容为文件
+      console.log(this.showCheckBox)
+      if (row.type === 1 && this.showCheckBox === false) {
+        return
+      }
       this.$emit('row-click', row)
       if (row.checked) {
         const tmps = this.data.filter(ele => ele.checked)

+ 5 - 3
src/views/resource/index.vue

@@ -31,12 +31,12 @@
         <div class="full-width flex flex-center flex-justify-between">
           <div class="full-width flex flex-justify-start flex-center">
             <upload-file
-              v-if="!top"
+              v-if="!top && currentFolder.fileStatus !== 1"
               @on-success="uploadSuccess"
               :data="{ type: 1 }"
               :project-id="folderInfo.projectId"
               :stage-id="folderInfo.stageId"
-              :parent-id="currentFolder !== null ? currentFolder.id : ''"
+              :parent-id="currentFolder.id"
             />
             <el-button
               class="ml-10"
@@ -44,6 +44,7 @@
               icon="Folder"
               :plain="!top"
               @click="showDialog(1)"
+              v-if="currentFolder ? currentFolder.fileStatus !== 1 : true"
               >新建文件夹
             </el-button>
             <authorize class="ml-10" :list="selectedList" />
@@ -107,7 +108,7 @@
 <route>
 {
 name: '资料管理',
-meta: { 'show': false, 'back':true}
+meta: { 'show': false, layout: 'empty'}
 }
 </route>
 
@@ -224,6 +225,7 @@ export default {
         current: this.page.current,
         size: this.page.size
       }
+      this.currentFolder = null
       this.loading = true
       this.top = true
       this.$api.resource.folderList(data).then(res => {