lsc 6 ヶ月 前
コミット
8afa1c6456

+ 3 - 0
src/components/pages/knowledge/components/checkDialog.vue

@@ -218,6 +218,7 @@ export default {
         });
     },
     getChunks() {
+      this.chunksArray = [];
       this.chunksLoading = true;
       let params = {
         documentId: this.did,
@@ -242,6 +243,7 @@ export default {
       this.getChunks();
     },
     getEntities() {
+      this.entitiesArray = [];
       this.entitiesLoading = true;
       let params = {
         documentId: this.did,
@@ -266,6 +268,7 @@ export default {
       this.getEntities();
     },
     getRelationships() {
+      this.relationshipsArray = [];
       this.relationshipsLoading = true;
       let params = {
         documentId: this.did,

+ 18 - 10
src/components/pages/knowledge/fileBox.vue

@@ -55,7 +55,9 @@
         <div class="f_box_top_right">
           <el-button type="primary" size="small" @click="serchFile"
           style="background-color: rgb(51, 112, 255);"
-            >刷新</el-button
+            >
+          <img style="vertical-align: middle;transform: scale(1.1);padding-bottom: 2px;box-sizing: border-box;" src="../../../assets/shuax.svg" alt="">
+            刷新</el-button
           >
           <el-button v-if="pid.split('/')[0] == '0'" type="primary" size="small" @click="addImg($event)"
           icon="el-icon-plus"
@@ -86,10 +88,11 @@
         <el-table
           :data="fileArray"
           border
-          style="width: 100%"
+          style="width: 100%; cursor: pointer;"
           @selection-change="handleSelectionChange"
           :row-key="row => row.id"
           ref="myTable"
+          @row-click="checkFile"
         >
           <el-table-column
             type="selection"
@@ -206,7 +209,7 @@
                       </div>
                     </div>
               </div>
-                <el-button slot="reference" class="BtnH" style="border: none;padding: 5px;">
+                <el-button slot="reference" class="BtnH" style="border: none;padding: 5px;" @click.stop="">
                     <i class="el-icon-more"></i>
                   </el-button>
 
@@ -228,8 +231,9 @@
     <div v-if="proVisible" class="mask">
       <div class="progressBox">
         <div class="lbox">
-          <img src="../../../assets/loading.gif" />上传中,请稍后
+          小可正在上传中,请稍后<img src="../../../assets/KekeLoading.gif" />
         </div>
+        <div class="lbox_count">{{ pcount }} / {{ ptotal }}</div>
       </div>
     </div>
     <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
@@ -342,6 +346,8 @@ export default {
       checkFolderid: [],
       user: "",
       userArray: [],
+      pcount: 0,
+      ptotal: 0
     };
   },
   computed: {
@@ -475,6 +481,8 @@ export default {
       ];
 
       const uploadFiles = async files => {
+        this.pcount = 0
+        this.ptotal = files.length
         for (let cfindex = 0; cfindex < files.length; cfindex++) {
           file = files[cfindex];
           const fileExtension = file.name
@@ -502,7 +510,7 @@ export default {
 
           // 使用同步方式上传文件
           await this.uploadFile(formData, file.name, uuid);
-
+          this.pcount = cfindex + 1
           // 每5秒上传一次
           if (cfindex < files.length - 1) {
             await new Promise(resolve => setTimeout(resolve, 5000));
@@ -865,9 +873,9 @@ export default {
 
 .progressBox {
   width: 300px;
-  height: 150px;
+  height: 100px;
   background: #fff;
-  border-radius: 10px;
+  border-radius: 5px;
   box-shadow: 0 0 6px 1px #bfbfbf;
   display: flex;
   align-items: center;
@@ -883,15 +891,15 @@ export default {
 
 .progressBox .lbox {
   height: 50px;
-  font-size: 19px;
+  font-size: 16px;
   display: flex;
   align-items: center;
   color: #747474;
 }
 
 .progressBox .lbox img {
-  width: 40px;
-  margin-right: 20px;
+  width: 50px;
+  margin-right: 0px;
 }
 
 .closeCss {

+ 2 - 2
src/components/pages/knowledge/folder.vue

@@ -95,7 +95,7 @@
           />
         </div>
         <div class="f_box_top_right">
-          <el-button type="primary"
+          <el-button v-if="pid.split('/')[0] == '0'" type="primary"
           style="background-color: #3370FF;height: 38px;" size="small" @click="openAdd"
           icon="el-icon-plus"
             >新建文件夹</el-button>
@@ -560,7 +560,7 @@ export default {
       check3: [],
       stype2: 1,
       userArray: [],
-      user: [],
+      user: "",
     };
   },
   computed: {

+ 2 - 2
src/components/pages/knowledge/folderDetail.vue

@@ -28,8 +28,8 @@
           </div>
         </div>
         
-        <div class="t_btn">
-           <div v-if="data.isMo == '2'" @click="copyFolder">
+        <div class="t_btn" v-if="userid == data.userid && data.isMo == '2'">
+           <div v-if="userid == data.userid && data.isMo == '2'" @click="copyFolder">
             <img style="height: 14px; margin-right: 8px;" src="../../../assets/copyFlieG2.svg" alt="">
             复制
            </div>

+ 16 - 9
src/components/pages/knowledge/folderFileBox.vue

@@ -90,10 +90,11 @@
         <el-table
           :data="fileArray"
           border
-          style="width: 100%"
+          style="width: 100%; cursor: pointer;"
           @selection-change="handleSelectionChange"
           ref="myTable"
           :row-key="row => row.id"
+          @row-click="checkFile"
         >
         <template #empty>
           <div class="customC">
@@ -242,7 +243,7 @@
                       </div>
                     </div>
                   </div>
-                  <el-button slot="reference" class="BtnH" style="border: none;padding: 5px;">
+                  <el-button slot="reference" class="BtnH" style="border: none;padding: 5px;" @click.stop="">
                     <i class="el-icon-more"></i>
                   </el-button>
               </el-popover>
@@ -263,8 +264,9 @@
     <div v-if="proVisible" class="mask">
       <div class="progressBox">
         <div class="lbox">
-          <img src="../../../assets/loading.gif" />上传中,请稍后
+          小可正在上传中,请稍后<img src="../../../assets/KekeLoading.gif" />
         </div>
+        <div class="lbox_count">{{ pcount }} / {{ ptotal }}</div>
       </div>
     </div>
     <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
@@ -379,7 +381,9 @@ export default {
       limit: 10,
       total: 0,
       page: 1,
-      debounceTimeout: null
+      debounceTimeout: null,
+      pcount: 0,
+      ptotal: 0
     };
   },
   computed: {
@@ -502,6 +506,8 @@ export default {
 
       // return
       const uploadFiles = async files => {
+        this.pcount = 0
+        this.ptotal = files.length
         for (let cfindex = 0; cfindex < files.length; cfindex++) {
           file = files[cfindex];
           const fileExtension = file.name
@@ -534,6 +540,7 @@ export default {
 
           // 使用同步方式上传文件
           await this.uploadFile(formData, file.name, uuid);
+          this.pcount = cfindex + 1
 
           // 每5秒上传一次
           if (cfindex < files.length - 1) {
@@ -952,9 +959,9 @@ export default {
 
 .progressBox {
   width: 300px;
-  height: 150px;
+  height: 100px;
   background: #fff;
-  border-radius: 10px;
+  border-radius: 5px;
   box-shadow: 0 0 6px 1px #bfbfbf;
   display: flex;
   align-items: center;
@@ -970,15 +977,15 @@ export default {
 
 .progressBox .lbox {
   height: 50px;
-  font-size: 19px;
+  font-size: 16px;
   display: flex;
   align-items: center;
   color: #747474;
 }
 
 .progressBox .lbox img {
-  width: 40px;
-  margin-right: 20px;
+  width: 50px;
+  margin-right: 0px;
 }
 
 .closeCss {

+ 17 - 3
src/components/pages/knowledge/index.vue

@@ -45,10 +45,13 @@
         <div class="BarBlock1" :class="barNam == 1 ? 'BarSpan':'' ">
           <div class="BarBlock" @click="cutPage(1)" >所有文件</div>
         </div>
+        <div class="BarBlock1" :class="barNam == 2 ? 'BarSpan':'' ">
+          <div class="BarBlock" @click="cutPage(2)" >共享空间</div>
+        </div>
       </div>
 
 
-      <folder :userid="userid" :typeArray="typeArray" :pid="pid" @checkType="checkType" v-show="pid.split('/').length == 1 && barNam ==0" ref="folder"></folder>
+      <folder :userid="userid" :typeArray="typeArray" :pid="pid" @checkType="checkType" v-show="pid.split('/').length == 1 && (barNam ==0 || barNam == 2)" ref="folder"></folder>
       
       
       <fileBox :userid="userid" :typeArray="typeArray" :pid="pid" :type='type' ref="fileBox" v-show="pid.split('/').length == 1 && moFolderid && barNam ==1" :moFolderid="moFolderid" :myFolderArray="myFolderArray">
@@ -93,7 +96,7 @@ export default {
       isLoading: false,
       typeArray: [
         { name: '我的文件夹',child: [], id: '0', open:true },
-        { name: '共享文件夹',child: [], id: '1' }
+        // { name: '共享文件夹',child: [], id: '1' }
       ],
       actionType: '',
       renameType: '',
@@ -144,7 +147,15 @@ export default {
   },
   methods: {
     cutPage(val){
-      this.barNam = val
+      if (this.barNam === val) {
+        return;
+      }
+      this.barNam = val;
+      if (val === 2) {
+        this.checkType('1');
+      }else {
+        this.checkType('0');
+      }
     },
     getData() {
       this.isLoading = true;
@@ -184,6 +195,9 @@ export default {
         return
       }
       const [id] = pid.split('/');
+      if(id[0] == '0' && this.barNam == 2){
+        this.barNam = '0'
+      }
       const index = this.typeArray.findIndex(item => item.id === id);
       if (index !== -1) {
         this.typeArray[index].open = true;

+ 1 - 0
src/config/config.js

@@ -14,6 +14,7 @@ const store = new Vuex.Store({
         // fileApi: 'http://localhost:7004/file/',
         // fileApi: 'http://10.3.16.166:7004/file/',
         // fileApi: 'http://10.1.82.60:7004/file/',
+        // fileApi: 'http://10.1.82.64:7004/file/',
         fileApi: 'https://r2rapi.cocorobo.cn/file/',
         socket: "https://poll.cocorobo.cn",
         // socket: "http://localhost:1473",