Zhang Li, BBF-411-2(Neusoft) 1 vuosi sitten
vanhempi
commit
d9933b4839

+ 32 - 5
src/api/knowledge/auditProcess.js

@@ -6,19 +6,46 @@ export const returnData = {};
 returnData.baseUrl= apiCommonUrl;
 
 // 列表
-returnData.findAllApprovalNodes=function (parameter) {
-  var url= returnData.baseUrl + '/knowledgeApprovalNode/findAllApprovalNodes'
-  return rxAjax.postJson(url,parameter).then (res => {
+returnData.findAllNodes=function () {
+  var url= returnData.baseUrl + '/knowledgeApprovalNode/findAllNodes'
+  return rxAjax.get(url).then (res => {
+    return res
+  })
+}
+
+// 根据分类查询审核流程
+returnData.findAllNodesByCategoryId=function (parameter) {
+  var url= returnData.baseUrl + '/knowledgeApprovalNode/findAllNodesByCategoryId'
+  return rxAjax.get(url,parameter).then (res => {
     return res
   })
 }
+// returnData.findAllApprovalNodes=function (parameter) {
+//   var url= returnData.baseUrl + '/knowledgeApprovalNode/findAllApprovalNodes'
+//   return rxAjax.postJson(url,parameter).then (res => {
+//     return res
+//   })
+// }
 
 // 保存
-returnData.batchInsertApprovalNodes=function (parameter) {
-  var url= returnData.baseUrl + '/knowledgeApprovalNode/batchInsertApprovalNodes'
+returnData.insertApprovalNodes=function (parameter) {
+  var url= returnData.baseUrl + '/knowledgeApprovalNode/insertApprovalNodes'
   return rxAjax.postJson(url,parameter).then (res => {
     return res
   })
 }
+// returnData.batchInsertApprovalNodes=function (parameter) {
+//   var url= returnData.baseUrl + '/knowledgeApprovalNode/batchInsertApprovalNodes'
+//   return rxAjax.postJson(url,parameter).then (res => {
+//     return res
+//   })
+// }
 
+// 删除
+returnData.delApprovalNode=function (parameter) {
+  var url= returnData.baseUrl + '/knowledgeApprovalNode/delApprovalNode'
+  return rxAjax.get(url,parameter).then (res => {
+    return res
+  })
+}
 export default returnData

+ 47 - 7
src/views/modules/knowledge/warehouse/auditManageList.vue

@@ -400,7 +400,7 @@ export default {
       sequencesInfo: {},
       // 职等
       gradesInfo: {},
-      // 文档知识不能选择权限
+      // 维基知识不能选择权限
       isDocument: false,
       widthVar: 800
     }
@@ -566,6 +566,21 @@ export default {
       if(title == 'fast') {
         this.isDocument = arg.type == 1 ? true : false
         this.isShowOrg = arg.approvalStatus == 3 ? true : false
+        this.auditForm.organizationId = arg.organizationId
+        if(arg.organizationId) {
+          let organizationInfo = JSON.parse(arg.organizationId)
+          let info = []
+          for(let i of organizationInfo) {
+            if(i.organizationId) {
+              info.push(`${i.organizationTree.join('-')}`)
+            } else if(i.gradeId) {
+              info.push(`职系-${i.gradeName}`)
+            } else {
+              info.push(`职等-${i.gradeLevelName}`)
+            }
+          }
+          this.authName = info.join('/')
+        }
         this.willAuditData.push(arg)
       } else {
         this.willAuditData = this.$refs.auditRef.getSelectedRows()
@@ -574,14 +589,39 @@ export default {
             this.$message.error("审核存在状态为驳回/通过的节点,无法审批");
             return 
           }
-          if(i.approvalStatus == 3) {
+          // if(i.approvalStatus == 3) {
+          //   this.isShowOrg = true
+          //   this.isDocument = i.type == 1 ? true : false
+          //   break
+          // } else {
+          //   this.isShowOrg = false
+          // }
+        }
+        let approvalStatusData = this.willAuditData.filter(item => item.approvalStatus == 3)
+        if(approvalStatusData.length == 1) {
+            let approvalStatusInfo = approvalStatusData[0]
+            console.log(approvalStatusInfo)
             this.isShowOrg = true
-            this.isDocument = i.type == 1 ? true : false
-            break
-          } else {
-            this.isShowOrg = false
-          }
+            this.isDocument = approvalStatusInfo.type == 1 ? true : false
+            this.auditForm.organizationId = approvalStatusInfo.organizationId
+            if(approvalStatusInfo.organizationId) {
+              let organizationInfo = JSON.parse(approvalStatusInfo.organizationId)
+              let info = []
+              for(let i of organizationInfo) {
+                if(i.organizationId) {
+                  info.push(`${i.organizationTree.join('-')}`)
+                } else if(i.gradeId) {
+                  info.push(`职系-${i.gradeName}`)
+                } else {
+                  info.push(`职等-${i.gradeLevelName}`)
+                }
+              }
+              this.authName = info.join('/')
+            }
+        } else {
+           this.isShowOrg = false
         }
+
       }
       if(!this.willAuditData.length) return
       this.auditShow = true

+ 249 - 75
src/views/modules/knowledge/warehouse/auditProcessMaintain.vue

@@ -8,50 +8,91 @@
             <div class="body">
               <div class="content">
                 <a-form ref="searchForm" layout="inline">
-                  <a-row :gutter="24" style="margin: 0;" class="rowList">
-                     <a-col :span="24" >
-                      <a-form-item
-                        style="font-weight: bold;"
-                        label="知识管理审核流程:"
-                        name="title"
-                      >
-                      </a-form-item>
-                     </a-col>
-                  </a-row>
-                  <a-row :gutter="24" style="margin: 0;" v-for="(item,index) in formData" :key="index" class="rowList">
-                    <a-col :span="6" >
-                      <a-form-item
-                        label="节点名称"
-                        name="title"
-                      >
-                        <a-input :disabled="item.isFinal == 1" v-model="item.name" placeholder="请输入"/>
-                      </a-form-item>
-                    </a-col>
-                    <a-col :span="6">
-                      <a-form-item
-                        label="审批人"
-                        name="createTime"
-                      >
-                        <div @click="handleShowAuditClick(index)">
-                          <a-select v-model="item.approverName" :showArrow="false" :open="false" placeholder="请选择组织部门授予知识访问权限"></a-select>
-                        </div>
-                      </a-form-item>
-                    </a-col>
-                    <a-col :span="6">
-                      <a-row :gutter="24" type="flex" justify="end">
-                        <a-button :style="{display: item.isFinal == 1 ? 'none':''}"  @click="delRow(index)" shape="circle" icon="delete"></a-button>
-                        <a-button v-if="formData.length != (index + 1)||formData.length==1" type="primary" @click="addRow(index)" shape="circle" icon="plus"></a-button>
+                  <a-tabs v-model="tabsKeys" size="large" :animated="false">
+                    <a-button type="primary" slot="tabBarExtraContent" @click="handleAddFlowClick">
+                      添加流程
+                    </a-button>
+                    <a-tab-pane :tab="itez.flowerName" v-for="(itez,indez) in tabPaneList" :key="indez + 1">
+                      <a-row v-if="indez != 0" :gutter="24" style="margin: 0;" class="rowList">
+                        <a-col :span="12" >
+                          <a-form-item
+                            label="流程名称:"
+                            name="flowerName"
+                          >
+                              <a-input  v-model="itez.flowerName" placeholder="请输入"/>
+                          </a-form-item>
+                        </a-col>
                       </a-row>
-                    </a-col>
-                  </a-row>
-                   <a-row :gutter="24" style="margin: 40px 0;" class="rowList">
-                     <a-col :span="6" :push="12">
-                        <a-row :gutter="24" type="flex" justify="end">
-                          <a-button @click="$router.back()">取消</a-button>
-                          <a-button type="primary" @click="handleSaveClick" :loading="saveLoading">保存</a-button>
-                        </a-row>
-                     </a-col>
-                  </a-row>
+                      <a-row v-if="indez != 0" :gutter="24" style="margin: 0;" class="rowList">
+                        <a-col :span="12" >
+                          <a-form-item
+                            label="关联分类:"
+                            name="categoryId"
+                          >
+                            <!-- <a-cascader v-model="itez.categoryId" 
+                              class="set-input scroll-ckunk"  
+                              :popupStyle="{
+                                maxWidth: widthVar + 'px',
+                                'overflow-x': 'auto'
+                              }"
+                              :getPopupContainer="triggerNode => { return triggerNode.parentNode }"
+                              :options="classifyList" 
+                              :fieldNames="{ label: 'name', value: 'pkId', children: 'children' }"
+                              placeholder="请选择"
+                              changeOnSelect
+                              @change="handleClassifyChange" /> -->
+                              <a-tree-select
+                                :replaceFields="{ key: 'pkId',title: 'name', value: 'pkId', children: 'children' }"
+                                v-model="itez.categoryId"
+                                style="width: 100%"
+                                :tree-data="classifyList"
+                                tree-checkable
+                                :maxTagCount="10"
+                                :treeCheckStrictly="true"
+                                :show-checked-strategy="SHOW_All"
+                                search-placeholder="请选择关联分类"
+                                @select="selectTree"
+                              />
+                          </a-form-item>
+                        </a-col>
+                      </a-row>
+                      <a-row :gutter="24" style="margin: 0;" v-for="(item,index) in itez.knowledgeApprovalNode" :key="index" class="rowList">
+                        <a-col :span="6" >
+                          <a-form-item
+                            label="节点名称"
+                            name="name"
+                          >
+                            <a-input :disabled="item.isFinal == 1" v-model="item.name" placeholder="请输入"/>
+                          </a-form-item>
+                        </a-col>
+                        <a-col :span="6">
+                          <a-form-item
+                            label="审批人"
+                            name="approverName"
+                          >
+                            <div @click="handleShowAuditClick(index,indez)">
+                              <a-select v-model="item.approverName" :showArrow="false" :open="false" placeholder="请选择组织部门授予知识访问权限"></a-select>
+                            </div>
+                          </a-form-item>
+                        </a-col>
+                        <a-col :span="6">
+                          <a-row :gutter="24" type="flex" justify="start">
+                            <a-button :style="{display: (item.isFinal == 1 || itez.knowledgeApprovalNode.length == 1) ? 'none' : ''}"  @click="delRow(index,indez)" shape="circle" icon="delete"></a-button>
+                            <a-button v-if="itez.knowledgeApprovalNode.length != (index + 1) || itez.knowledgeApprovalNode.length==1" type="primary" @click="addRow(index,indez)" shape="circle" icon="plus"></a-button>
+                          </a-row>
+                        </a-col>
+                      </a-row>
+                      <a-row :gutter="24" style="margin: 40px 0;" class="rowList">
+                        <a-col :span="6" :push="12">
+                            <a-row :gutter="24" type="flex" justify="end">
+                              <a-button @click="$router.back()">取消</a-button>
+                              <a-button v-if="indez != 0" style="margin-right:20px;" @click="handleDelFlowClick(itez.pkId,indez)">删除</a-button>
+                              <a-button type="primary" @click="handleSaveClick" :loading="saveLoading">保存</a-button>
+                            </a-row>
+                        </a-col>
+                      </a-row>
+                    </a-tab-pane>
+                  </a-tabs>
                 </a-form>
               </div>
             </div>
@@ -71,9 +112,12 @@
 </template>
 
 <script>
+import { TreeSelect } from 'ant-design-vue';
 import breadcrumb from '../components/breadcrumb'
 import orgPeople from './components/orgPeople'
 import api from '@/api/knowledge/auditProcess'
+import classApi from '@/api/knowledge/classify'
+const SHOW_All = TreeSelect.SHOW_All;
 export default {
   name: 'auditProcessMaintain',
   components: {
@@ -82,73 +126,185 @@ export default {
   },
   data() {
     return {
+      SHOW_All,
       showAuditFlag: false,
       api,
       saveLoading: false,
+      classifyList: [],
+      classifyListArr: [],
       tempDataIndex: '',
+      tempDataIndez: '',
       formData:[],
       approverData: {
         approverId: '',
         approverName: ''
-      }
+      },
+      tabsKeys: 1,
+      tabPaneList: [
+        // {
+        //   flowerName: '系统默认流程',
+        //   categoryId: [],
+        //   knowledgeApprovalNode: [
+        //     {
+        //       name: '',
+        //       approverId: '',
+        //       approverName: undefined,
+        //       isFinal: 1
+        //     }
+        //   ]
+        // }
+      ]
     }
   },
   created() {
-    this.init()
+    this.init(true)
   },
   methods: {
-    init() {
-      let queryParam = {
-        "pageNo": 1,
-        "pageSize": 1000,
-        "sortField": "",
-        "sortOrder": "asc",
-        "params": {}
+    async init(arg = false) {
+      if(arg) {
+        let res = await classApi.getAllByCategoryId()
+        this.classifyList = this.formatData(res.data.children)
+        // this.formatDataAddPstr(this.classifyList,"","")
       }
-      api.findAllApprovalNodes(queryParam).then(res => {
-        this.formData = res.result.data.map(item => {
-          return {
-            name: item.name,
-            approverId: item.approverId,
-            approverName: item.approverName,
-            isFinal: item.isFinal
+      let raw = await api.findAllNodes()
+      this.tabPaneList = raw.data.map(item => {
+        // console.log(item.category)
+        let categoryArr = []
+        for(let i=0;i<item.category.length;i++) {
+          categoryArr.push({
+            value:item.category[i],label:item.categoryName[i]
+          })
+        }
+        return {
+          pkId: item.pkId,
+          flowerName: item.flowerName,
+          categoryId: categoryArr,
+          knowledgeApprovalNode: item.knowledgeApprovalNode
+        }
+      })
+      // newData={value:element.pkId,label:element.name}
+      this.saveLoading = false
+    },
+    //格式化数据,递归将空的children置为undefined
+    formatData(data) {
+      const that = this
+      data.forEach((element) => {
+        if (element.children && element.children.length > 0) {
+          that.formatData(element.children)
+        } else {
+          delete element.children
+        }
+      })
+      return data
+    },
+    // formatDataAddPstr(data,base,pkId) {
+    //   const that = this
+    //   base = base+","+pkId+"&"
+    //   data.forEach((element) => {
+    //     element.Pstr = base
+    //     this.classifyListArr.push(element)
+    //     if (element.children && element.children.length > 0) {
+    //       that.formatDataAddPstr(element.children,base,element.pkId)
+    //     } else {
+    //       delete element.children
+    //     }
+    //   })
+    //   return data
+    // },
+    selectTree(value, node, extra){
+      console.log(value.value)
+      console.log(this.classifyListArr)
+      let that=this
+      setTimeout(function(){
+        let childArr=that.classifyListArr.filter(item=>{
+          return item.Pstr.indexOf(','+value.value+"&")>-1
+        })
+        childArr.forEach((element) => {
+          let isHave=that.tabPaneList[that.tabsKeys-1].categoryId.filter(item0=>{return item0.value==element.pkId})
+          if(isHave.length==0){
+            let newData={value:element.pkId,label:element.name}
+            that.tabPaneList[that.tabsKeys-1].categoryId.push(newData)
           }
         })
-        this.saveLoading = false
-      })
+      },200)
     },
     async handleSaveClick() {
-      console.log(this.formData)
-      for(let i of this.formData) {
+      // 判断流程名是否重复
+      if(this.tabPaneList.filter(item => item.flowerName == this.tabPaneList[this.tabsKeys-1].flowerName).length > 1) {
+         this.$message.error("流程名称重复");
+          return
+      }
+      // 判断信息是否填全
+      for(let i of this.tabPaneList[this.tabsKeys-1].knowledgeApprovalNode) {
         if(!i.name || !i.approverId) {
-          console.log(i)
           this.$message.error("请将信息填全");
           return
         }
       }
+      if(this.tabPaneList[this.tabsKeys-1].categoryId && this.tabPaneList[this.tabsKeys-1].categoryId.length) {
+         this.tabPaneList[this.tabsKeys-1].categoryId = this.tabPaneList[this.tabsKeys-1].categoryId.map(item => item.value)
+      }
       this.saveLoading = true
-      await api.batchInsertApprovalNodes(this.formData)
+      await api.insertApprovalNodes(this.tabPaneList[this.tabsKeys-1])
       await this.init()
     },
-    delRow(num){
-      this.formData.splice(num, 1);
+    handleAddFlowClick() {
+      this.tabPaneList.push({
+        flowerName: '流程'+ this.tabPaneList.length,
+        categoryId: [],
+        knowledgeApprovalNode: [
+          {
+            name: '最终节点',
+            approverId: '',
+            approverName: undefined,
+            isFinal: 1
+          }
+        ]
+      })
+    },
+    handleDelFlowClick(pkId = null,indez) {
+      if(!pkId) {
+        this.tabPaneList.splice(indez,1)
+        this.tabsKeys-=1
+      } else {
+        let that = this
+        this.$confirm({
+          title: `确认要删除这个${this.tabPaneList[indez].flowerName}吗?`,
+          content: `您删除后的${this.tabPaneList[indez].flowerName},将无法恢复,请谨慎操作.`,
+          centered: true,
+          icon: 'info-circle',
+          okText: '确定',
+          cancelText: '取消',
+          async onOk() {
+            await that.api.delApprovalNode({pkId})
+            that.tabsKeys-=1
+            that.init()
+          }
+        })
+      }
+      
     },
-    addRow(index){
-      let tempData={
+    addRow(index,indez){
+      let tempData= {
         name:'',
         approverId: '',
         approverName: undefined,
         isFinal: 0
       }
-      if(this.formData.length == 1) {
-        this.formData.unshift(tempData)
+      let info = this.tabPaneList[indez].knowledgeApprovalNode
+      if(info.length == 1) {
+        info.unshift(tempData)
       } else {
-        this.formData.splice(index+1, 0,tempData)
+        info.splice(index+1, 0,tempData)
       }
     },
-    handleShowAuditClick(index) {
+    delRow(index,indez){
+      this.tabPaneList[indez].knowledgeApprovalNode.splice(index, 1);
+    },
+    handleShowAuditClick(index,indez) {
       this.showAuditFlag = true,
       this.tempDataIndex = index
+      this.tempDataIndez = indez
     },
     transCheckedTarget(arg) {
       console.log(arg)
@@ -156,9 +312,15 @@ export default {
       this.approverData.approverName = arg.approverName
     },
     handleOk() {
-      this.formData[this.tempDataIndex].approverId = this.approverData.approverId
-      this.formData[this.tempDataIndex].approverName = this.approverData.approverName
+      this.tabPaneList[this.tempDataIndez].knowledgeApprovalNode[this.tempDataIndex].approverId = this.approverData.approverId
+      this.tabPaneList[this.tempDataIndez].knowledgeApprovalNode[this.tempDataIndex].approverName = this.approverData.approverName
       this.showAuditFlag = false
+    },
+    // 清除分类事件
+    handleClassifyChange(arg) {
+      if(!arg.length) {
+        this.tabPaneList[this.tabsKeys-1].categoryId = []
+      }
     }
   }
 }
@@ -198,4 +360,16 @@ export default {
 /deep/ .ant-modal-body {
     padding: 0;
 }
+/* /deep/ .ant-cascader-menus {
+  left: 0!important;
+}
+/deep/ .ant-cascader-menu:last-child {
+  margin-right: 0;
+} */
+/deep/ .ant-tabs-tabpane-active {
+  min-height: 500px;
+}
+/deep/ .ant-select-dropdown-content {
+  height: 100px;
+}
 </style>

+ 44 - 29
src/views/modules/knowledge/warehouse/knowledgeAddUpdate.vue

@@ -18,7 +18,8 @@
                   :options="classifyList" 
                   :fieldNames="{ label: 'name', value: 'pkId', children: 'children' }"
                   placeholder="请选择"
-                  changeOnSelect />
+                  changeOnSelect
+                  @change="dropdownVisibleChange" />
               </a-form-model-item>
               <a-form-model-item label="*知识类型:" prop="type">
                 <a-select v-model="knowledgeForm.type" placeholder="请选择" :disabled="!!pkId">
@@ -96,14 +97,14 @@
                     <a-input v-model="auditForm.remark" type="textarea" :autosize="{minRows: 3, maxRows: 6}" :maxLength="200" placeholder="请输入审批意见" />
                   </div>
                 </a-form-model-item>
-                <!-- 最终节点审 核时 -->
-                <a-form-model-item v-if="isShowOrg && knowledgeForm.type == 1" prop="actualApproverName">
-                  <span slot="label">&emsp;&emsp;权限</span>
-                  <div @click="showAuditFlag = true">
-                    <a-select v-model="authName" :showArrow="false" :open="false" placeholder="请选择组织部门、职系、职称等授予知识访问权限"></a-select>
-                  </div>
-                </a-form-model-item>
               </template>
+              <!-- 最终节点审 核时 -->
+              <a-form-model-item v-if="(isShowOrg || (type == 'knowledgeManageList' && !this.$route.query.show)) && (knowledgeForm.type == 1 || !knowledgeForm.type)" prop="actualApproverName">
+                <span slot="label">&emsp;&emsp;权限</span>
+                <div @click="showAuditFlag = true">
+                  <a-select v-model="authName" :showArrow="false" :open="false" placeholder="请选择组织部门、职系、职称等授予知识访问权限"></a-select>
+                </div>
+              </a-form-model-item>
               <a-row :gutter="24" type="flex" justify="end" style="margin-top: 20px;padding-right:12px;">
                 <a-button style="margin-right: 20px;" @click="$router.back()">取消</a-button>
                 <a-button v-if="!!$route.query.isAudit || !pkId" type="primary" @click="handleSaveClick" :loading="saveLoading">保存</a-button>
@@ -114,8 +115,8 @@
                   </a-table>
                 </div>
               </a-form-model-item>
-              <!-- 知识管理 编辑和查看 -->
-              <a-form-model-item v-if="type == 'knowledgeManageList' && !!pkId && accessAuthority" label="访问权限:" prop="accessAuthority" style="margin: 20px 0;">
+              <!-- 知识管理 查看 -->
+              <a-form-model-item v-if="type == 'knowledgeManageList' && !!pkId && this.$route.query.show" label="访问权限:" prop="accessAuthority" style="margin: 20px 0;">
                 <a-input disabled v-model="accessAuthority" />
               </a-form-model-item>
             </a-form-model>
@@ -179,7 +180,8 @@ export default {
         summary: '',
         content: '',
         attachment: '', 
-        attachmentName: ''
+        attachmentName: '',
+        organizationId: ''
       },
       showAuditFlag: false,
       showOnlyOffice: false,
@@ -274,6 +276,7 @@ export default {
         this.knowledgeForm.content = res.data.content
         this.knowledgeForm.attachment = res.data.attachment
         this.knowledgeForm.attachmentName = res.data.attachmentName
+        this.knowledgeForm.organizationId = res.data.organizationId
         this.approverData = res.data.approvals
         this.auditForm.actualApprover = this.$store.state.appSetting.user.userId
         this.auditForm.actualApproverName = this.$store.state.appSetting.user.fullName
@@ -290,6 +293,7 @@ export default {
             }
           }
           this.accessAuthority = info.join('/')
+          this.authName = info.join('/')
         }
         // 待最终节点审批
         this.isShowOrg = res.data.approvalStatus == 3 ? true : false
@@ -299,23 +303,7 @@ export default {
       this.type = 'knowledgeManageList'
       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": {}
-      }
-      processApi.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.getFindAllNodes()
     }
     this.init()
     var token = Vue.ls.get(ACCESS_TOKEN);
@@ -349,6 +337,22 @@ export default {
     this.$refs.knowledgeRef.clearValidate()
   },
   methods: {
+    getFindAllNodes(categoryId) {
+      let arg = {}
+      if(categoryId) {
+        arg['categoryId'] = categoryId[0]
+      }
+      processApi.findAllNodesByCategoryId(arg).then(res => {
+        this.approverData = res.data.map(item => {
+          return {
+            name: item.name,
+            approverId: item.approverId,
+            approverName: item.approverName,
+            isFinal: item.isFinal
+          }
+        })
+      })
+    },
     beforeUpload(file) {
       const isLt2M = file.size / 1024 / 1024 < 100;
       if (!isLt2M) {
@@ -446,6 +450,7 @@ export default {
           })
         }
       }
+      this.saveLoading = false
     },
     transCheckedTarget(arg) {
       this.checkedTarget = arg
@@ -457,7 +462,8 @@ export default {
       this.gradesInfo = arg
     },
     handleSaveOk() {
-      if(this.isShowOrg && this.knowledgeForm.type == 1) {
+      // if(this.isShowOrg && this.knowledgeForm.type == 1) {
+      if((this.isShowOrg || this.type == 'knowledgeManageList') && (this.knowledgeForm.type == 1 || !this.knowledgeForm.type)) {
         let info = []
         let res = []
         if(this.checkedTarget.organizationId) {
@@ -477,8 +483,10 @@ export default {
         }
         if(res.length) {
           this.auditForm.organizationId = JSON.stringify([...res])
+          this.knowledgeForm.organizationId = JSON.stringify([...res])
         } else {
           this.auditForm.organizationId = ""
+          this.knowledgeForm.organizationId = ""
         }
       }
       this.showAuditFlag = false
@@ -492,6 +500,13 @@ export default {
       this.option.fileType = this.knowledgeForm.attachmentName.split('.').slice(-1)[0]
       this.option.isPrint = false
       this.showOnlyOffice = true
+    },
+    dropdownVisibleChange(arg) {
+      if(!arg.length) {
+        this.getFindAllNodes()
+      } else {
+        this.getFindAllNodes(arg.slice(-1))
+      }
     }
   }
 }