zhangli 1 рік тому
батько
коміт
1ff3f6db9b

+ 2 - 1
src/api/knowledge/warehouseIndex.js

@@ -4,7 +4,8 @@ import rxAjax from '@/assets/js/ajax.js';
 export const returnData = {};
 
 returnData.baseUrl= '/api-knowledge/knowledge/';
-
+returnData.url0= 'http://www.hkcqjy.com.cn:8088';
+returnData.url1= 'http://10.5.100.101';
 //  知识分类
 returnData.findAllKnowledgeCategory=function (parameter) {
   var url= returnData.baseUrl + 'knowledgeCategory/findAllKnowledgeCategory';

+ 3 - 3
src/views/modules/knowledge/components/classMenu.vue

@@ -41,14 +41,14 @@ export default {
         render(h, {props: {treeData = {}}}) {
           const creatNode = (node,num,pId)=>{
             node.pId=pId
+            if(num==1){
+              node.parent='000'
+            }
             if(node.children && node.children.length > 0){
               let hArr = node.children.map(item=>{
                 let nowPid = pId+','+item.pkId
                 return creatNode(item,num+1,nowPid)
               })
-              if(num==1){
-                node.parent='000'
-              }
               if(num==0){
                 return h('div', {class:{'demoShow':true}}, 
                 [h('div',{class:{'demoText':true,'demoTextSelect':that.checkId==node.pkId},style:'padding-Left:'+(2+num*0.5)+'vw',

+ 4 - 4
src/views/modules/knowledge/components/onlyOffice.vue

@@ -1,12 +1,12 @@
 <template>
-  <div style="height: 100%;overflow: hidden;">
-    <div class="loadingPage" v-if="showLoading">
+  <div style="height: 100%;overflow: hidden;position:relative">
+    <!--<div class="loadingPage" v-if="showLoading">
       <div class="loadingPageShow">
         <a-icon type="loading" style="margin-right:10px"/>
         加载中
       </div>
-    </div>
-    <div class="hideLogo" v-show="!showLoading"></div>
+    </div>-->
+    <div class="hideLogo"></div>
     <div id='vabOnlyOffice' v-show="!showLoading"></div>
   </div>
 </template>

+ 2 - 4
src/views/modules/knowledge/components/pageList.vue

@@ -13,7 +13,7 @@
       </div>
       <span class="listName" v-if="type!='list1'">{{item.uploaderName?item.uploaderName:item.author}}</span>
       <div class="listTitle1" v-if="type=='list1'">
-        {{item.titles}}
+        {{item.titles?item.titles:"未设置知识标题"}}
         <div v-if="approval" style="display: inline-block;">
           <span v-if="item.approvalStatus==4||item.approvalStatus==2" style="color: #F84E4C;" class="baseSpan">(审核进度:驳回)</span>
           <span v-if="item.approvalStatus==1||item.approvalStatus==3" style="color: #FF900D;" class="baseSpan">(审核进度:审核中)</span>
@@ -47,7 +47,7 @@
       {{item.titles}}
     </div>
     <div class="listItem listContent" v-if="type=='list0'||type=='list1'">
-      {{item.documentRemark}}
+      {{item.documentRemark?item.documentRemark:"未设置知识简介"}}
     </div>
     <div class="listItem listContent" style="display:flex" v-if="type=='home'&&item.documentRemark!=''&&item.documentRemark!=null">
       <div style="white-space: nowrap;">摘要:</div>
@@ -235,8 +235,6 @@ export default {
     },
     // 点击下载
     download(data){
-      console.log(data.isOrganizationId)
-      return
       window.open('/api/api-system/system/core/sysFile/previewFile?fileId='+data.attachment)
     },
     // 删除关闭

+ 3 - 0
src/views/modules/knowledge/warehouse/contentData.vue

@@ -276,6 +276,9 @@ export default {
    },
    // 跳转添加
    addData(){
+    if(this.categoryValue.join(',')=='000'){
+      this.categoryValue=[]
+    }
     this.$router.push({
       name: "knowledgeAddUpdate",
       query: {

+ 6 - 1
src/views/modules/knowledge/warehouse/knowledgeAddUpdate.vue

@@ -552,7 +552,12 @@ export default {
       this.option.lang = 'zh-CN'
       // this.option.url = 'http://10.5.100.64:9900/api-system/system/core/sysFile/previewFile?fileId=1597050108435845121'
       //this.option.url = 'http://10.5.100.101/api/api-system/system/core/sysFile/previewFile?fileId='+ this.knowledgeForm.attachment,
-      this.option.url = 'http://www.hkcqjy.com.cn:8088/api/api-system/system/core/sysFile/previewFile?fileId='+ this.knowledgeForm.attachment,
+      let baseUrl = api.url0
+      if(location.href.indexOf('10.5.100.101')>-1){
+        baseUrl = api.url1
+      }
+      this.option.url = baseUrl+'/api/api-system/system/core/sysFile/previewFile?fileId='+this.knowledgeForm.attachment
+      //this.option.url = 'http://www.hkcqjy.com.cn:8088/api/api-system/system/core/sysFile/previewFile?fileId='+ this.knowledgeForm.attachment,
       this.option.title = this.knowledgeForm.attachmentName
       this.option.fileType = this.knowledgeForm.attachmentName.split('.').slice(-1)[0]
       this.option.isPrint = false

+ 6 - 1
src/views/modules/knowledge/warehouse/knowledgeAuditInfo.vue

@@ -144,7 +144,12 @@ export default {
       this.option.canDownload = true
       this.option.canPrint = true
       this.option.lang = 'zh-CN'
-      this.option.url = 'http://www.hkcqjy.com.cn:8088/api/api-system/system/core/sysFile/previewFile?fileId='+this.knowledgeForm.attachment
+      let baseUrl = api.url0
+      if(location.href.indexOf('10.5.100.101')>-1){
+        baseUrl = api.url1
+      }
+      this.option.url = baseUrl+'/api/api-system/system/core/sysFile/previewFile?fileId='+this.knowledgeForm.attachment
+      //this.option.url = 'http://www.hkcqjy.com.cn:8088/api/api-system/system/core/sysFile/previewFile?fileId='+this.knowledgeForm.attachment
       this.option.title = this.knowledgeForm.attachmentName.split(".")[0]
       this.option.fileType = this.knowledgeForm.attachmentName.split(".").pop()
       this.option.isPrint = false

+ 6 - 1
src/views/modules/knowledge/warehouse/knowledgeContentInfo.vue

@@ -34,6 +34,7 @@ import wordIcon from '@/assets/img/warehouse/wordIcon.png'
 import analysis from '@/api/knowledge/analysis'
 import vabOnlyOffice  from '../components/onlyOffice.vue'
 import knowledgeContentInfo from '@/api/knowledge/knowledgeContentInfo'
+import api from '@/api/knowledge/warehouseIndex'
 import {mapState} from "vuex";
 export default {
   name: 'knowledgeContentInfo',
@@ -112,7 +113,11 @@ export default {
       this.option.canDownload = true
       this.option.canPrint = true
       this.option.lang = 'zh-CN'
-      this.option.url = 'http://www.hkcqjy.com.cn:8088/api/api-system/system/core/sysFile/previewFile?fileId='+this.detailData.attachment
+      let baseUrl = api.url0
+      if(location.href.indexOf('10.5.100.101')>-1){
+        baseUrl = api.url1
+      }
+      this.option.url = baseUrl+'/api/api-system/system/core/sysFile/previewFile?fileId='+this.detailData.attachment
       this.option.title = this.detailData.attachmentName.split(".")[0]
       this.option.fileType = this.detailData.attachmentName.split(".").pop()
       this.option.isPrint = false