浏览代码

修改bug

zhangli 1 年之前
父节点
当前提交
787e7d84d0

+ 17 - 3
src/views/modules/knowledge/album/detail.vue

@@ -620,6 +620,14 @@ export default {
       //const hide = this.$message.loading('验证码发送中..', 0)
       //setTimeout(hide, 5000);
       //return false;
+      if(this.knowledgeForm.categoryId.length==0){
+        this.$message.error('请选择分类');
+        return false
+      }
+      if(this.knowledgeForm.name==''){
+        this.$message.error('请输入专题标题');
+        return false
+      }
       if(this.knowledgeForm.cover==''&&this.isAdd){
         this.$message.error('请上传缩略图');
         return false
@@ -782,14 +790,18 @@ export default {
       // let innerWidth = window.innerWidth
 
       // this.widthVar = innerWidth/30
-
-      setInterval(() => {
+      document.onclick=function(element){
+        if(element.target.className.indexOf('ant-cascader-menu-item')>-1){
+          document.querySelector('.ant-cascader-menus').scrollLeft = 20480
+        }
+      }
+      /*setInterval(() => {
         document.querySelectorAll('.ant-cascader-menu-item').forEach(el => {
           el.onclick = function() {
             document.querySelector('.ant-cascader-menus').scrollLeft = 2048
           }
         })
-      }, 1000)
+      }, 1000)*/
     },
     //增加知识
     handleOkAdd(){
@@ -854,6 +866,8 @@ export default {
         this.getApprovals()
       }
       if(this.tapAction==2){
+        this.yelpDataList=[]
+        this.yelpPageNum=1
         this.getYelp()
       }
     }

+ 4 - 0
src/views/modules/knowledge/components/albumList.vue

@@ -164,6 +164,10 @@ export default {
           secretType:data.secretType
         }
         home.viewApi(getData).then((res) => {
+          if(res.data==null||res.data==''){
+            this.$message.error('业务系统未提供详情地址信息')
+            return false
+          }
           let datares = res.data
           if(this.item.documentPath.indexOf('dcc系统')==0){
             var encrypts = encrypt(this.user.userId);

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

@@ -194,6 +194,10 @@ export default {
           secretType:data.secretType
         }
         home.viewApi(getData).then((res) => {
+          if(res.data==null||res.data==''){
+            this.$message.error('业务系统未提供详情地址信息')
+            return false
+          }
           let datares = res.data
           if(this.item.documentPath.indexOf('dcc系统')==0){
             var encrypts = encrypt(this.user.userId);

+ 8 - 2
src/views/modules/knowledge/map/index.vue

@@ -261,8 +261,14 @@ export default {
       map.routes(getData).then((res) => {
         if(res.code == 200) {
           this.menuDataArr = res.data
-          this.menuIndex = 0
-          this.getContentTops(this.menuDataArr[this.menuIndex].pkId)
+          if(this.menuDataArr.length==0){
+            this.dataArr=[]
+            this.showData()
+            this.showLoading = false
+          }else{
+            this.menuIndex = 0
+            this.getContentTops(this.menuDataArr[this.menuIndex].pkId)
+          }
         }
       })
     },

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

@@ -188,14 +188,18 @@ export default {
       let offsetWidth = document.querySelector('.scroll-ckunk').getBoundingClientRect().left
       this.widthVar = innerWidth - offsetWidth - 40
     }, 1000);
-    
-    setInterval(() => {
+    document.onclick=function(element){
+        if(element.target.className.indexOf('ant-cascader-menu-item')>-1){
+          document.querySelector('.ant-cascader-menus').scrollLeft = 20480
+        }
+      }
+    /*setInterval(() => {
       document.querySelectorAll('.ant-cascader-menu-item').forEach(el => {
         el.onclick = function() {
           document.querySelector('.ant-cascader-menus').scrollLeft = 2048
         }
       })
-    }, 1000)
+    }, 1000)*/
    
   },
   methods: {

+ 7 - 3
src/views/modules/knowledge/warehouse/knowledgeAddUpdate.vue

@@ -303,14 +303,18 @@ export default {
       let offsetWidth = document.querySelector('.scroll-ckunk').getBoundingClientRect().left
       this.widthVar = innerWidth - offsetWidth - 40
     }, 1000);
-    
-    setInterval(() => {
+    document.onclick=function(element){
+        if(element.target.className.indexOf('ant-cascader-menu-item')>-1){
+          document.querySelector('.ant-cascader-menus').scrollLeft = 20480
+        }
+      }
+    /*setInterval(() => {
       document.querySelectorAll('.ant-cascader-menu-item').forEach(el => {
         el.onclick = function() {
           document.querySelector('.ant-cascader-menus').scrollLeft = 2048
         }
       })
-    }, 1000)
+    }, 1000)*/
    
   },
   methods: {