Jelajahi Sumber

提交修改代码

zhangli 1 tahun lalu
induk
melakukan
0fd5e67bb2

+ 2 - 1
src/layouts/MainHead.vue

@@ -187,7 +187,8 @@ export default {
     },
     handClick(value, head) {
       if(value.key==5){
-        location.href=value.component
+        window.open(value.component)
+        //location.href=value.component
         return false;
       }
       this.$emit('handClick', value)

+ 2 - 1
src/layouts/compoment/main/RightToolBar.vue

@@ -469,10 +469,11 @@ export default {
         },
         accountSetting() {
             var self = this
+            let mainHeight = window.innerHeight
             Util.open({
                     component: OsUserEdit1,
                     curVm: self,
-                    widthHeight: ['950px', '660px'],
+                    widthHeight: ['950px', mainHeight*0.75+'px'],
                     title: '账号设置',
                     data: {
                         userId: self.user.userId

+ 5 - 1
src/views/modules/knowledge/album/index.vue

@@ -49,7 +49,7 @@
       </div>
       <div class="reightbox">
         <div class="reightboxTop">
-          <search typeStr="content" :hideSelect="true" searchWidth="100%" @searchResult="searchResult"></search>
+          <search placeholderText="请输入专辑名称" typeStr="content" :hideSelect="true" searchWidth="100%" @searchResult="searchResult"></search>
         </div>
         <div class="reightboxBottom">
           <div class="noDataBox" v-if="dataList.length==0">
@@ -152,6 +152,10 @@ export default {
     searchResult(data){
       this.pageNum = 1
       this.searchName = decodeURI(data.keyword)
+      if(this.searchName==''){
+        this.$message.error("请输入专辑名称!");
+        return false
+      }
       this.getData()
     },
     //删除start

+ 5 - 12
src/views/modules/knowledge/components/onlyOffice.vue

@@ -71,19 +71,12 @@ import home from '@/api/knowledge/home'
               //download: false,
               // "fillForms": true,//是否可以填写表格,如果将mode参数设置为edit,则填写表单仅对文档编辑器可用。 默认值与edit或review参数的值一致。
               // "review": true //跟踪变化
-              "chat": false,
               "comment": false,
-              "copy": true,
-              "deleteCommentAuthorOnly": false,
-              "download": false,
-              "edit": false,
-              "editCommentAuthorOnly": false,
-              "fillForms": 'review',
-              "modifyContentControl": false,
-              "modifyFilter": false,
-              "print": true,
-              "protect": false,
-              "review": false
+            "download": false,
+            "edit": false,
+            "fillForms": false,
+            "print": false,
+            "review": false
             },
             url: option.url,
             mode:'view'

+ 7 - 3
src/views/modules/knowledge/components/pageList.vue

@@ -20,13 +20,13 @@
           <span v-if="item.approvalStatus==5" style="color: #FF900D;" class="baseSpan">(审核进度:通过)</span>
         </div>
       </div>
-      <template v-if="!showJurisdiction||item.isOrganizationId==0">
+      <template v-if="(!showJurisdiction||item.isOrganizationId==0)&&!hideLook">
         <div class="lookBox btnSmall" @click="lookDetail(item)" v-if="type!='list1'||(type=='list1'&&item.approvalStatus!=4&&item.approvalStatus!=2)">
           <img src="../../../../image/look.png"/>
           <span>查看</span>
         </div>
       </template>
-      <template v-if="!showJurisdiction||item.isOrganizationId==0">
+      <template v-if="(!showJurisdiction||item.isOrganizationId==0)&&!hideLook">
         <div class="lookBox btnSmall" @click="download(item)" v-if="item.attachment&&(type=='list0'||(type=='list1'&&item.approvalStatus!=4&&item.approvalStatus!=2))">
           <img src="../../../../image/download.png"/>
           <span>下载</span>
@@ -36,7 +36,7 @@
         <img src="../../../../image/del.png"/>
         <span>删除</span>
       </div>
-      <div class="lookBox btnSmall" v-if="type=='list1'&&showEdit" @click="jump(item)">
+      <div class="lookBox btnSmall" v-if="type=='list1'&&(showEdit||(item.approvalStatus==4||item.approvalStatus==2))" @click="jump(item)">
         <img src="../../../../image/edit.png"/>
         <span>编辑</span>
       </div>
@@ -155,6 +155,10 @@ export default {
       type:Boolean,
       default: false
     },
+    hideLook:{
+      type:Boolean,
+      default: false
+    },
     showEdit: {
       type:Boolean,
       default: false

+ 5 - 1
src/views/modules/knowledge/components/search.vue

@@ -12,7 +12,7 @@
           </a-menu-item>
         </a-menu>
       </a-dropdown>
-      <a-input :class="hideSelect?'hideSelect':''" v-model="content" @pressEnter="handleSearchClick" placeholder="请输入您要搜索的文字" />
+      <a-input :class="hideSelect?'hideSelect':''" v-model="content" @pressEnter="handleSearchClick" :placeholder="placeholderText" />
     </div>
     <div @click="handleSearchClick" :style="{'width':typeStr=='content'?'7.1875vw':'13.28%'}">搜索</div>
   </div>
@@ -32,6 +32,10 @@ export default {
     hideSelect: {
       type:Boolean,
       default: false
+    },
+    placeholderText: {
+      type:String,
+      default: '请输入您要搜索的文字'
     }
   },
   data() {

+ 4 - 1
src/views/modules/knowledge/warehouse/contentData.vue

@@ -99,7 +99,7 @@
         <div v-else class="DataBoxContent">
           <div class="listBox">
             <div class="listBoxItemContent listItemClass" v-for="(item, index) in dataList3" :key="index">
-              <pageList :item="item" type="list1" :showEdit="true"></pageList>
+              <pageList :item="item" type="list1" :showEdit="true" :hideLook="true"></pageList>
               <a-divider class="bottomBorder" v-if="(index!=dataList3.length-1)"/>
             </div>
           </div>
@@ -648,6 +648,9 @@ export default {
    },
    // 处理分类
    getCategory(arr,data){
+    if(data==null){
+      return false
+    }
     arr.unshift(data.name)
     if(data.parents!=null){
       this.getCategory(arr,data.parents)

+ 40 - 47
src/views/modules/knowledge/warehouse/knowledgeAddUpdate.vue

@@ -322,23 +322,7 @@ export default {
       this.pkId = ''
       this.knowledgeForm.createBy = this.$store.state.appSetting.user.userId
       this.knowledgeForm.author = this.$store.state.appSetting.user.fullName
-          let queryParam = {
-        "pageNo": 1,
-        "pageSize": 1000,
-        "sortField": "",
-        "sortOrder": "asc",
-        "params": {}
-      }
-      api.findAllApprovalNodes(queryParam).then(res => {
-        this.approverData = res.result.data.map(item => {
-          return {
-            name: item.name,
-            approverId: item.approverId,
-            approverName: item.approverName,
-            isFinal: item.isFinal
-          }
-        })
-      })
+      this.getApprover()
     }
     this.init()
     var token = Vue.ls.get(ACCESS_TOKEN);
@@ -429,40 +413,49 @@ export default {
     },
     //  提交数据
     handleSaveClick(type) {
-      let that = this
-      this.$refs.knowledgeRef.validate(valid => {
-        if (valid) {
+      if(type==0){
+        this.knowledgeForm.isDraft = type
+        this.saveData()
+      }else{
+        this.$refs.knowledgeRef.validate(valid => {
           this.knowledgeForm.isDraft = type
-           // 新增
-          if(!this.pkId) {
-              if(this.isSubmit){
-                return false
-              }
-              this.isSubmit = true
-              api.create({...this.knowledgeForm, categoryId: this.knowledgeForm.categoryId.slice(-1)[0]}).then(res => {
-                if(res.code == 200) {
-                  if(res.message.indexOf('知识失败')>-1){
-                    this.$message.error(res.message);
-                    this.isSubmit = false
-                  }else{
-                    setTimeout(function(){
-                      that.$router.back();
-                      that.isSubmit = false;
-                    },2000)
-                  }
-                }
-              })
-          } else {
-            api.save({...this.knowledgeForm, categoryId: this.knowledgeForm.categoryId.slice(-1)[0], pkId: this.pkId}).then(res => {
-              if(res.code == 200) {
-                setTimeout(() => 
-                  this.$router.back()
-                  ,2000)
-                }
-            })
+          if (valid) {
+            this.saveData()
           }
+        })
+      }
+      
+    },
+    saveData(){
+      let that = this
+      // 新增
+      if(!this.pkId) {
+        if(this.isSubmit){
+          return false
         }
+        this.isSubmit = true
+        api.create({...this.knowledgeForm, categoryId: this.knowledgeForm.categoryId.slice(-1)[0]}).then(res => {
+          if(res.code == 200) {
+            if(res.message.indexOf('知识失败')>-1){
+              this.$message.error(res.message);
+              this.isSubmit = false
+            }else{
+              setTimeout(function(){
+                that.$router.back();
+                that.isSubmit = false;
+              },2000)
+            }
+          }
+        })
+    } else {
+      api.save({...this.knowledgeForm, categoryId: this.knowledgeForm.categoryId.slice(-1)[0], pkId: this.pkId}).then(res => {
+        if(res.code == 200) {
+          setTimeout(() => 
+            this.$router.back()
+            ,2000)
+          }
       })
+    }
     },
      // 处理分类数据展示
     categoryData(data){

+ 1 - 1
src/views/user/Login.vue

@@ -415,7 +415,7 @@ export default {
             if (res.code === 200) {
           /*      let url = '/portal'
                 window.open(url, "_self");*/
-                 this.$router.push({ name: 'home-index' }, () => {
+                 this.$router.push({ name: 'home' }, () => {
                     this.$notification.success({
                       message: '欢迎',
                       description: `${timeFix()},欢迎回来`