Browse Source

提交修改代码

zhangli 1 year ago
parent
commit
ac06230859

+ 22 - 0
src/api/knowledge/common.js

@@ -0,0 +1,22 @@
+import rxAjax from '@/assets/js/ajax.js';
+// 栏目定义 api接口
+export const returnData = {};
+
+returnData.baseUrl= '/api-knowledge'
+
+// 职级
+returnData.getSequences=function () {
+  var url= returnData.baseUrl + '/common/position/sequences'
+  return rxAjax.get(url).then (res => {
+    return res
+  })
+}
+
+// 职等
+returnData.getGrades=function () {
+  var url= returnData.baseUrl + '/common/position/grades'
+  return rxAjax.get(url).then (res => {
+    return res
+  })
+}
+export default returnData

+ 7 - 0
src/api/knowledge/warehouseIndex.js

@@ -100,4 +100,11 @@ returnData.findAllApprovalNodes=function (parameter) {
     return res
   })
 }
+// 根据分类查询审核流程
+returnData.findAllNodesByCategoryId=function (parameter) {
+  var url= returnData.baseUrl + 'knowledgeApprovalNode/findAllNodesByCategoryId'
+  return rxAjax.get(url,parameter).then (res => {
+    return res
+  })
+}
 export default returnData;

BIN
src/image/rightIcon.png


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

@@ -74,7 +74,7 @@
             <a-dropdown>
                 <!--首页右上角工具栏-->
                 <a class="ant-dropdown-link itmeBox rightAclass" @click="(e) => e.preventDefault()">
-                    <span class="tubiao">
+                    <span class="tubiao" @click="goMyPage">
                         <img class="userImg" :src="imgUrl" alt />
                     </span>
                     <span class="names" :class="{names_white:background=='#ffffff'}">{{ user.fullName }}</span>
@@ -481,6 +481,9 @@ export default {
                 function(action) {}
             )
         },
+        goMyPage(){
+            router.push({ path: 'contentData?type=0&showMy=1' });
+        },
         getFilePath(fileId) {
             if (fileId && fileId != '') {
                 this.imgUrl = '/api/api-system/system/core/sysFile/previewFile?fileId=' + fileId

+ 25 - 0
src/views/modules/knowledge/aJs/cache.js

@@ -0,0 +1,25 @@
+class SessionCache {
+  setCache(key, value) {
+    window.sessionStorage.setItem(key, JSON.stringify(value))
+  }
+
+  getCache(key) {
+    // obj => string => obj
+    const value = window.sessionStorage.getItem(key)
+    if (value) {
+      return JSON.parse(value)
+    } else {
+      return false
+    }
+  }
+
+  deleteCache(key) {
+    window.sessionStorage.removeItem(key)
+  }
+
+  clearCache() {
+    window.sessionStorage.clear()
+  }
+}
+
+export default new SessionCache()

+ 79 - 0
src/views/modules/knowledge/aJs/getClassifyTree.js

@@ -0,0 +1,79 @@
+
+// 获取分类名称  例:  一级分类|二级分类|三级分类
+export function getCategory(data) {
+  const result = []
+  const _getParentCategoryName = (info) => {
+    result.push(info.name)
+    if(info.parents) {
+      _getParentCategoryName(info.parents)
+    }
+  }
+  _getParentCategoryName(data)
+  return result.reverse().join('|')
+}
+ 
+// 获取分类id  例:  ['30', '300', '3000']
+export function getCategoryId(data) {
+  const result = []
+  const _getParentCategoryName = (info) => {
+    result.push(info.pkId)
+    if(info.parents) {
+      _getParentCategoryName(info.parents)
+    }
+  }
+  _getParentCategoryName(data)
+  return result.reverse()
+}
+
+// 组织部门: 子节点获取父节点
+export function getParentNode(data) {
+  const result = []
+  result.push(data.title)
+  const parentData = data.$parent
+  const _getParentCategoryName = (parentData) => {
+    if(parentData.title) {
+      result.push(parentData.title)
+      let info = parentData.$parent
+      _getParentCategoryName(info)
+    }
+  }
+  _getParentCategoryName(parentData)
+  return result.reverse()
+}
+
+// 获取指定id数据的children长度
+export function getChildrenLength(data,record) {
+  let info = ''
+  const _computedChildrenLength = (data,id) => {
+    for(let i of data) {
+      if(i.pkId == id) {
+        info = i.children.length
+        return
+      } else {
+        if(i.children) {
+          _computedChildrenLength(i.children,id)
+        }
+      }
+    }
+  }
+  _computedChildrenLength(data,record.parent)
+  return info
+}
+
+// 隐藏当前选中等级
+export function hideChooseLevel(data,level) {
+  let nowLevel = level
+  const _computedChildrenLength = (data) => {
+    data.forEach((element) => {
+      if(nowLevel == element.level) {
+        delete element.children
+      } else {
+        if(element.children) {
+          _computedChildrenLength(element.children)
+        }
+      }
+    })
+  }
+  _computedChildrenLength(data)
+  return data
+}

+ 23 - 0
src/views/modules/knowledge/aJs/getTimeNow.js

@@ -0,0 +1,23 @@
+export default function getNowTime () {
+  let now = new Date();
+  let year = now.getFullYear(); //获取完整的年份(4位,1970-????)
+  let month = now.getMonth() + 1; //获取当前月份(0-11,0代表1月)
+  let today = now.getDate(); //获取当前日(1-31)
+  let hour = now.getHours(); //获取当前小时数(0-23)
+  let minute = now.getMinutes(); //获取当前分钟数(0-59)
+  let second = now.getSeconds(); //获取当前秒数(0-59)
+  let nowTime = ''
+  nowTime = year + '-' + fillZero(month) + '-' + fillZero(today) + ' ' + fillZero(hour) + ':' +
+    fillZero(minute) + ':' + fillZero(second)
+  return nowTime
+};
+
+function fillZero (str) {
+  var realNum;
+  if (str < 10) {
+    realNum = '0' + str;
+  } else {
+    realNum = str;
+  }
+  return realNum;
+}

+ 194 - 0
src/views/modules/knowledge/components/classMenu.vue

@@ -0,0 +1,194 @@
+<template>
+  <div class="treeBox">
+    <tree-comp :treeData="options" @handleClick="handleClick"></tree-comp>
+  </div>
+</template>
+<script>
+export default {
+  props: {
+    options: {
+      type: Object,
+      default: []
+    },
+    categoryValue: {
+      type: Object,
+      default: []
+    },
+  },
+  name: 'classMenu',
+  data () {
+    return {
+      checkArr:[],
+      checkId:null
+    }
+  },
+  components:{
+    
+  },
+  mounted(){
+    this.checkArr=this.categoryValue
+    if(this.categoryValue.length!=0){
+      this.checkId=this.categoryValue[(this.categoryValue.length-1)]
+    }
+    this.checkArr.push('000')
+    this.init()
+  },
+  methods:{
+    init(){
+      let that=this
+      Vue.component('treeComp', {
+        functional: true,
+        props: {treeData: Object},
+        render(h, {props: {treeData = {}}}) {
+          const creatNode = (node,num,pId)=>{
+            node.pId=pId
+            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',
+                on:{click:function (event){
+                  event.stopPropagation();
+                  event.preventDefault();
+                  that.handleClick(node,this);
+                  } }},[
+                  h('div',{class:{'classifyRightAction':that.checkArr.indexOf(node.pkId)>-1,'classifyRight':true},
+                    on:{click:function (event){
+                    event.stopPropagation();
+                    event.preventDefault();
+                    that.handleOpenClick(node);
+                    } }},['']),
+                  node.name]), hArr])
+              }else{
+                return h('div', {class:{'demo':!(that.checkArr.indexOf(node.parent)>-1),'demoShow':(that.checkArr.indexOf(node.parent)>-1)}}, [h('div',{class:{'demoText':true,'demoTextSelect':that.checkId==node.pkId},style:'padding-Left:'+(2+num*0.5)+'vw',
+                on:{click:function (event){
+                event.stopPropagation();
+                event.preventDefault();
+                that.handleClick(node,this);
+                } }},[
+                  h('div',{class:{'classifyRightAction':that.checkArr.indexOf(node.pkId)>-1,'classifyRight':true},
+                    on:{click:function (event){
+                    event.stopPropagation();
+                    event.preventDefault();
+                    that.handleOpenClick(node);
+                    } }},['']),
+                  node.name]), hArr])
+              }
+            }else{
+              return h('div', {class:{'demo':!(that.checkArr.indexOf(node.parent)>-1),'demoShow':(that.checkArr.indexOf(node.parent)>-1)}}, [h('div',{class:{'demoText':true,'demoTextSelect':that.checkId==node.pkId},style:'padding-Left:'+(3.2+num*0.5)+'vw',
+              on:{click: function(event){
+                event.stopPropagation();
+                event.preventDefault();
+                that.handleClick(node,this);
+              }}},[
+                node.name])])
+            }          
+          }
+          return creatNode(treeData,0,'')
+        }
+      })
+    },
+    handleOpenClick(node){
+      //console.log(node)
+      //node.openData=!node.openData
+      let indexNum=this.checkArr.indexOf(node.pkId)
+      if(indexNum>-1){
+        this.checkArr.splice(indexNum, 1)
+      }else{
+        this.checkArr.push(node.pkId)
+      }
+      console.log(this.checkArr)
+    },
+    handleClick(node,ele){
+      console.log(node)
+      this.checkId = node.pkId;
+      let dataArr=node.pId.split(",")
+      dataArr.shift()
+      
+      let data={
+        categoryId:node.pkId,
+        categoryName:node.name,
+        categoryValue:dataArr
+      }
+      this.$emit('changeClass',data);
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .demoShow{
+    min-width: 11.71875vw;
+    width: max-content;
+    text-align: left;
+    font-size:0.9375vw;
+    display: flex;
+    flex-direction: column;
+    color: #202124;
+    &:before{
+      content:'  ';
+      display: inline-block;
+    }
+  }
+  .demo{
+    min-width: 11.71875vw;
+    width: max-content;
+    display: none;
+    text-align: left;
+    font-size:0.9375vw;
+    flex-direction: column;
+    color: #202124;
+    &:before{
+      content:'  ';
+      display: inline-block;
+    }
+  }
+  .demoText{
+    padding-right:2vw;
+    font-weight: 500;
+    min-width: 11.71875vw;
+    height: 2.91vw;
+    display: inline-block;
+    line-height: 2.91vw;
+    cursor: pointer;
+    color: #202124;
+  }
+  .demoTextSelect{
+    background: #ECF3FF;
+  }
+  .classifyRight{
+    background: url('../../../../image/rightIcon.png');
+    background-size: 100% 100%;
+    width:0.6vw;
+    height: 0.6vw;
+    color: #CBCCCC;
+    display: inline-block;
+    margin-left: auto;
+    transform-origin: 150% 60%;
+    margin-right: 0.6vw;
+    -moz-user-select:none;/*火狐*/
+    -webkit-user-select:none;/*webkit浏览器*/
+    -ms-user-select:none;/*IE10*/
+    -khtml-user-select:none;/*早期浏览器*/
+    user-select:none;
+  }
+  .classifyRightAction{
+    transform: rotate(90deg);
+    transform-origin: 75% 50%;
+  }
+  .treeBox{
+    overflow-x: scroll;
+    height: calc(100% - 3.5vw);
+  }
+  .treeBox::-webkit-scrollbar{
+    width:16px;
+    height:16px;
+    background-color:#fff;
+    display:block;
+  }
+</style>

+ 2 - 1
src/views/modules/knowledge/components/onlyOffice.vue

@@ -1,6 +1,6 @@
 <template>
   <div style="height: 100%;overflow: hidden;">
-    <div class="loadingPage" v-show="showLoading">
+    <div class="loadingPage" v-if="showLoading">
       <div class="loadingPageShow">
         <a-icon type="loading" style="margin-right:10px"/>
         加载中
@@ -107,6 +107,7 @@ import home from '@/api/knowledge/home'
             }
           }
         }
+        //setTimeout(function(){that.showLoading = false},1000)
         this.docEditor = new DocsAPI.DocEditor('vabOnlyOffice', config)
        /* builder.CreateFile("docx");
         var oDocument = Api.GetDocument();

+ 345 - 0
src/views/modules/knowledge/components/orgPeople.vue

@@ -0,0 +1,345 @@
+<template>
+    <div style="display:flex;width:100%;">
+        <a-card  title="组织架构" style="padding:20px;border:none;border-right: 1px solid #e8e8e8;overflow-y:auto;margin-right: 20px;" :style="{width: isOnlyOrg ? '35%' : '100%'}">
+          <rx-tree
+            :treeData="orgData"
+            :async="true"
+            :loadByParent="onLoadGroupTree"
+            :multiSelect="false"
+            :showTreeIcon="true"
+            @select="selectGroupNode"
+            :expandOnLoad="0"
+            autoExpandParent="true"
+            id-field="key"
+            text-field="title"
+            parent-field="groupId"></rx-tree>
+        </a-card>
+        <!-- <a-card  v-if="!isOnlyOrg" title="职系" style="padding:2px;border:none;;overflow-y:auto;" :style="{width: isOnlyOrg ? '35%' : '100%'}">
+            <a-select v-model="sequencesInfo.gradeId" placeholder="请选择职系" allowClear style="width:100%;" @change="handleSequencesChange">
+                <a-select-option v-for="(item,index) in sequencesList" :key="index" :value="item.value" >
+                    {{ item.label }}
+                </a-select-option>
+            </a-select>
+        </a-card> -->
+        <a-card  v-if="!isOnlyOrg" title="职系" style="padding:20px;border:none;border-right: 1px solid #e8e8e8;overflow-y:auto;" :style="{width: isOnlyOrg ? '35%' : '100%'}">
+            <a-select v-model="sequencesInfo.gradeId" placeholder="请选择职系" allowClear style="width:100%;" @change="handleSequencesChange">
+                <a-select-option v-for="(item,index) in sequencesList" :key="index" :value="item.value" >
+                    {{ item.label }}
+                </a-select-option>
+            </a-select>
+        </a-card>
+        <a-card  v-if="!isOnlyOrg" title="职等" style="padding:20px;border:none;" :style="{width: isOnlyOrg ? '35%' : '100%'}">
+            <a-select v-model="gradesInfo.gradeLevelId" placeholder="请选择职等" allowClear style="width:100%;" @change="handleGradeChange">
+                <a-select-option v-for="(item,index) in gradesList" :key="index" :value="item">
+                    {{ item }}
+                </a-select-option>
+            </a-select>
+        </a-card>
+        
+        <div style="width:65%;padding: 16px;" v-if="isOnlyOrg">
+            <a-form layout="inline" style="margin-bottom: 10px;">
+                <a-row type="flex">
+                    <a-form-item
+                        label="姓名"
+                        name="name"
+                        >
+                        <a-input v-model="queryParam.name" placeholder="请输入"/>
+                    </a-form-item>
+                    <a-form-item
+                        label="工号"
+                        name="userNo"
+                        >
+                        <a-input v-model="queryParam.userNo" placeholder="请输入"/>
+                    </a-form-item>
+                    <div style="flex:1;display:flex;justify-content: flex-end;">
+                        <a-button type="primary" style="margin-right: 20px;" @click="search">查询</a-button>
+                        <a-button @click="reset">重置</a-button>
+                    </div>
+                </a-row>
+            </a-form>
+            <rx-grid
+                ref="table"
+                style="height:90%!important"
+                :bordered="isBorder"
+                :allowRowSelect="true"
+                :columns="columns"
+                :defaultPageSize="10"
+                url="/api-user/user/org/osUser/getAllUserByGroupId"
+                :queryParam="queryParam"
+                data-field="result.data"
+                :pageSizeOptions="[10,30,40]"
+                id-field="userId"
+                :showPageJump="false"
+                :rowSelection="{selectedRowKeys: selectedRowKeys}"
+                @selectChange="onSelectChange">
+            </rx-grid>
+        </div>
+    </div>
+</template>
+
+<script>
+  import OsUserApi from '@/api/user/org/osUser'
+  import OsGroupApi from '@/api/user/org/osGroup'
+  import OsusertypeApi from '@/api/user/org/osUserType'
+  import commonApi from '@/api/knowledge/common'
+  import {BaseList,Util, RxLayout, RxFit, RxGrid, RxTree} from 'jpaas-common-lib'
+  import { getParentNode } from '@/views/modules/knowledge/aJs/getClassifyTree'
+  export default {
+    name: 'OsUserList',
+    mixins: [BaseList],
+    components: {
+      RxLayout,
+      RxFit,
+      RxGrid,
+      RxTree
+    },
+    props: {
+        isOnlyOrg: {
+            type: Boolean,
+            default: true
+        }
+    },
+    data() {
+      return {
+            params: {
+                name: '',
+                userNo: ''
+            },
+            queryParam: {
+                groupId: "",
+                dim: "1", 
+                rankLevel: "", 
+                status: "1",
+                name: "",
+                userNo: ""
+            },
+            sequencesList: [],
+            gradesList: [],
+            table: 'table',
+            orgData: [],
+            userId: '',
+            visible: false,
+            quitUserIds: [],
+            confirmLoading: false,
+            quitTime: "",
+            osUserTypes:[],
+            // 表头
+            columns: [
+            {
+                title: '序号',
+                type: 'indexColumn',
+                align: 'center',
+                width: 80,
+            },
+            {
+
+                title: '姓名',
+                align: 'center',
+                dataIndex: 'fullName'
+            },
+            {
+
+                title: '工号',
+                align: 'center',
+                dataIndex: 'userNo'
+            },
+            // {
+
+            //   title: '用户类型',
+            //   width: 100,
+            //   dataIndex: 'userTypeName'
+            // },
+            // {
+
+            //   title: '邮件',
+            //   width: 140,
+            //   dataIndex: 'email'
+            // },
+            // {
+
+            //   title: '状态',
+            //   width: 80,
+            //   dataIndex: 'status',
+            //   scopedSlots: {customRender: 'status'}
+            // },
+            // {
+            //   width: 130,
+            //   title: '操作',
+            //   dataIndex: 'action',
+            //   scopedSlots: {customRender: 'action'}
+            // }
+            ],
+            // 组织架构
+            checkedTarget: {},
+            // 职系
+            sequencesInfo: {
+                gradeId: undefined,
+                gradeName: ''
+            },
+            // 职等
+            gradesInfo: {
+                gradeLevelId: undefined,
+                gradeLevelName: ''
+            }
+        }
+    },
+    created() {
+        this.loadAdminDeps();
+        if(!this.isOnlyOrg) {
+            commonApi.getSequences().then(res => {
+                this.sequencesList = res.data.map(item => {
+                    return {
+                        value: item.code,
+                        label: item.name
+                    }
+                })
+            })
+            commonApi.getGrades().then(res => {
+                this.gradesList = res.data
+            })
+        }
+        // this.getAllUserTypeList();
+    },
+    methods: {
+        reset() {
+            this.queryParam.name = ""
+            this.queryParam.userNo = ""
+            this.search()
+        },
+        search(){
+            this.$refs.table.loadData()
+        },
+        close(){
+            //关闭按钮
+            this.fitSearch = false ;
+        },
+        delById(ids) {
+            return OsUserApi.delOsUser({ids: ids.join(',')});
+        },
+        dimissionByIds(ids) {
+            this.visible = true;
+            this.quitUserIds = ids;
+        },
+        getListByParams(parameter) {
+            return OsUserApi.getOsUserList(parameter)
+        },
+        //加载部门树
+        loadAdminDeps() {
+            OsGroupApi.getAdminOrg().then(resp => {
+                let data = resp.data;
+                let temp = [];
+                for (let i = 0; i < data.length; i++) {
+                    var rs = data[i];
+                    var _isLeaf = rs.childAmount == 0 ? true : false;
+                    temp.push({title: rs.name, groupId: rs.groupId, key: rs.key, isLeaf: _isLeaf})
+                }
+
+                this.orgData = [...temp];
+            })
+        },
+        //加载左树下的子节点
+        onLoadGroupTree(treeNode) {
+            if (treeNode.dataRef.children) {
+                return;
+            }
+            console.log(treeNode)
+            return OsGroupApi.getParentGroup(treeNode.dataRef.groupId).then(data => {
+                let treeData = []
+                for (let i = 0; i < data.length; i++) {
+                    var rs = data[i]
+                    var _isLeaf = rs.childAmount == 0 ? true : false;
+                    treeData.push({title: rs.name, groupId: rs.groupId, key: rs.key,isLeaf: _isLeaf})
+                }
+                var orgData = this.getGroupTree(this.orgData, treeNode.dataRef.groupId, treeData);
+
+                this.orgData = [...orgData];
+                console.info("onLoadGroupTree")
+                console.info(this.orgData)
+            })
+        },
+        getGroupTree(orgData, groupId, treeData) {
+            if (treeData.length > 0) {
+                for (var i = 0; i < orgData.length; i++) {
+                    if (orgData[i].groupId == groupId) {
+                        orgData[i].children = treeData;
+                        break;
+                    }
+                    if (orgData[i].children) {
+                        this.getGroupTree(orgData[i].children, groupId, treeData);
+                    }
+                }
+            }
+            return orgData;
+        },
+        //选中树节点
+        selectGroupNode(selKeys, e) {
+            let node = e.node.dataRef
+            if(this.isOnlyOrg) {
+                this.checkedTarget['approverId'] = node.groupId
+                this.checkedTarget['approverName'] = node.title
+                this.$emit('transCheckedTarget',this.checkedTarget)
+            } else {
+                let organizationTree = getParentNode(e.node)
+                this.checkedTarget['organizationId'] = node.groupId
+                this.checkedTarget['organizationName'] = node.title
+                this.checkedTarget['organizationTree'] = organizationTree
+                this.$emit('transCheckedTarget',this.checkedTarget)
+            }   
+            if(this.isOnlyOrg) {
+                //this.selectGroupId=node.groupId;
+                //查询左树用户
+                if(selKeys.length==0){
+                    delete this.queryParam.groupId;
+                }else {
+                    this.queryParam.groupId = node.groupId;
+                }
+                this.$refs.table.loadData()
+            }
+        },
+        onSelectChange(keys,rows) {
+            this.checkedTarget['approverId'] = rows[0].userNo
+            this.checkedTarget['approverName'] = rows[0].fullName
+            console.log(this.checkedTarget)
+            this.$emit('transCheckedTarget',this.checkedTarget)
+        },
+        // 选择职系
+        handleSequencesChange(arg) {
+            if(arg) {
+                this.sequencesInfo.gradeName = this.sequencesList.find(item => item.value == arg).label
+            } else {
+                this.sequencesInfo = {}
+            }
+            this.$emit('returnSequencesInfo',this.sequencesInfo)
+        },
+        // 选择职级
+        handleGradeChange(arg) {
+            if(arg) {
+                this.gradesInfo.gradeLevelName = arg
+            } else {
+                this.gradesInfo = {}
+            }
+            this.$emit('returnGradeInfo',this.gradesInfo)
+        }
+    },
+    beforeDestroy() {
+        this.checkedTarget = Object.assign({},this.$options.data().checkedTarget)
+        this.sequencesInfo = Object.assign({},this.$options.data().sequencesInfo)
+        this.gradesInfo = Object.assign({},this.$options.data().gradesInfo)
+    }
+    // watch: {
+    //     checkedTarget: {
+    //         handler(news,olds) {
+    //             console.log(news,olds)
+    //             this.$emit('transCheckedTarget',this.checkedTarget)
+    //         },
+    //         deep: true
+    //     }
+    // }
+}
+</script>
+<style scoped>
+/deep/ .ant-card-head-title {
+    padding: 0;
+}
+</style>
+

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

@@ -36,7 +36,7 @@
         <img src="../../../../image/del.png"/>
         <span>删除</span>
       </div>
-      <div class="lookBox btnSmall" v-if="type=='list1'&&(item.approvalStatus==4||item.approvalStatus==2)" @click="jump(item)">
+      <div class="lookBox btnSmall" v-if="type=='list1'&&showEdit" @click="jump(item)">
         <img src="../../../../image/edit.png"/>
         <span>编辑</span>
       </div>
@@ -154,7 +154,12 @@ export default {
     showJurisdiction: {
       type:Boolean,
       default: false
-    }
+    },
+    showEdit: {
+      type:Boolean,
+      default: false
+    },
+    
   },
   computed: {
     ...mapState({

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

@@ -3,7 +3,7 @@
     <div>
       <a-dropdown :trigger="['click']" v-show="!hideSelect">
         <a class="ant-dropdown-link" @click="e => e.preventDefault()">
-          <span>{{selectVal==0?'全部类型':menuData.filter(item=>{return item.key==selectVal})[0]['name']}}</span> 
+          <span>{{selectVal==0?'类型':menuData.filter(item=>{return item.key==selectVal})[0]['name']}}</span> 
           <a-icon type="caret-down" style="font-size: 0.7vw;color:#000;transform:translateX(0.80vw);" />
         </a>
         <a-menu slot="overlay">
@@ -14,7 +14,7 @@
       </a-dropdown>
       <a-input :class="hideSelect?'hideSelect':''" v-model="content" @pressEnter="handleSearchClick" placeholder="请输入您要搜索的文字" />
     </div>
-    <div @click="handleSearchClick">搜索</div>
+    <div @click="handleSearchClick" :style="{'width':typeStr=='content'?'7.1875vw':'13.28%'}">搜索</div>
   </div>
 </template>
 
@@ -58,10 +58,10 @@ export default {
           key:0
         },
         {
-          name:'文档知识',
+          name:'文档',
           key:1
         },{
-          name:'维基知识',
+          name:'维基',
           key:2
         }
       ]
@@ -118,7 +118,7 @@ export default {
     height:100%;
 
     a {
-      width: 8.2vw;
+      width: 6.25vw;
       text-align: center;
       background:@white;
       border-radius: 0.52vw 0 0 0.52vw;

+ 221 - 79
src/views/modules/knowledge/warehouse/contentData.vue

@@ -1,86 +1,110 @@
 <template>
   <div class="contentDataMain">
-    <div class="userTop">
-      <div class="userHead">
-        <img :src="imgUrl"/>
+    <div class="leftBox">
+      <div class="classTop">
+        知识分类
       </div>
-      <div class="userMidle">
-        <p class="userMidleName">Hi.</p>
-        <p class="userMidleName">{{user.fullName}},祝你开心每一天!</p>
-        <p class="userMidleNum">上传文件数量<span>{{myuploadNum}}</span></p>
-      </div>
-      <div class="userEnd">
-        <a-cascader
-          :popupStyle="{
-            maxWidth: widthVar + 'px',
-            'overflow-x': 'auto'
-          }"
-          :getPopupContainer="triggerNode => { return triggerNode.parentNode }"
-          :options="options"
-          :show-search="{ filter }"
-          change-on-select
-          :default-value="defaultCascader"
-          placeholder="请选择分类"
-          @change="onChange"
-          @popupVisibleChange="popupVisibleChange"
-          class="cascaderBox scroll-ckunk"
-        />
-      </div>
-    </div>
-    <div class="searchBoxTop">
-      <search typeStr="content" searchWidth="auto" @searchResult="searchResult"></search>
+      <classMenu :categoryValue="categoryValue" :options="options" @changeClass="changeClass"></classMenu>
     </div>
-    <div class="tabBoxContent">
-      <div v-if="index==0||(index==1&&number1Bas!=0)||(index==2&&number2Bas!=0)" v-for="(item, index) in tapArr" :key="index" @click="changeAction(index)">
-        <span>{{index==0?categoryName:item}}({{index==0?number0:index==1?number1:number2}})</span>
-        <img v-if="tapAction==index" src="../../../../image/tabAction.png"/>
+    <div class="rightBox">
+      <div class="userTop">
+        <div class="userHead">
+          <img :src="imgUrl"/>
+        </div>
+        <div class="userMidle">
+          <p class="userMidleName">Hi.</p>
+          <p class="userMidleName">{{user.fullName}},祝你开心每一天!</p>
+          <p class="userMidleNum">上传文件数量<span>{{myuploadNum}}</span></p>
+        </div>
+        <div class="userEnd">
+          <search typeStr="content" searchWidth="100%" @searchResult="searchResult"></search>
+          <!--<a-cascader
+            :popupStyle="{
+              maxWidth: widthVar + 'px',
+              'overflow-x': 'auto'
+            }"
+            :getPopupContainer="triggerNode => { return triggerNode.parentNode }"
+            :options="options"
+            :show-search="{ filter }"
+            change-on-select
+            :default-value="defaultCascader"
+            placeholder="请选择分类"
+            @change="onChange"
+            @popupVisibleChange="popupVisibleChange"
+            class="cascaderBox scroll-ckunk"
+          />-->
+        </div>
       </div>
-      <div class="btnAddData" @click="addData">新增知识</div>
-    </div>
-    <div class="searchBoxContent" v-show="(tapAction==0)">
-      <div class="noDataBox" v-if="dataList.length==0">
-        <img src="../../../../image/noDataNew.png" class="noData"/>
-        <p class="noDataText">暂无搜索结果</p>
+      <div class="searchBoxTop">
+        <search typeStr="content" searchWidth="auto" @searchResult="searchResult"></search>
       </div>
-      <div v-else class="DataBoxContent">
-        <div class="listBox">
-          <div class="listBoxItemContent listItemClass" v-for="(item, index) in dataList" :key="index">
-            <pageList :showJurisdiction="true" :item="item" type="list0" v-if="type==3||type==4"></pageList>
-            <pageList :showJurisdiction="true" v-else :item="item" :type="type!=null||categoryName=='全部分类'?'list1':'list0'"></pageList>
-            <a-divider class="bottomBorder" v-if="(index!=dataList.length-1)"/>
-          </div>
+      <div class="tabBoxContent">
+        <div v-if="index==0||(index==1&&number1Bas!=0)||(index==2&&number2Bas!=0)||(index==3&&number3Bas!=0)" v-for="(item, index) in tapArr" :key="index" @click="changeAction(index)">
+          <span>{{index==0?categoryName:item}}({{index==0?number0:index==1?number1:index==2?number2:number3}})</span>
+          <img v-if="tapAction==index" src="../../../../image/tabAction.png"/>
         </div>
-        <pageBar ref="pageBarref0" @pageChange="pageChange0" :total="total" :pageSize="pageSize" class="pageBar"></pageBar>
+        <div class="btnAddData" @click="addData">新增知识</div>
       </div>
-    </div>
-    <div class="searchBoxContent" v-show="(tapAction==1)">
-      <div class="noDataBox" v-if="dataList1.length==0">
-        <img src="../../../../image/noDataNew.png" class="noData"/>
-        <p class="noDataText">暂无搜索结果</p>
+      <div class="searchBoxContent" v-show="(tapAction==0)">
+        <div class="noDataBox" v-if="dataList.length==0">
+          <img src="../../../../image/noDataNew.png" class="noData"/>
+          <p class="noDataText">暂无搜索结果</p>
+        </div>
+        <div v-else class="DataBoxContent">
+          <div class="listBox">
+            <div class="listBoxItemContent listItemClass" v-for="(item, index) in dataList" :key="index">
+              <pageList :showJurisdiction="true" :item="item" type="list0" v-if="type==3||type==4"></pageList>
+              <pageList :showJurisdiction="true" v-else :item="item" :type="type!=null||categoryName=='全部分类'?'list1':'list0'"></pageList>
+              <a-divider class="bottomBorder" v-if="(index!=dataList.length-1)"/>
+            </div>
+          </div>
+          <pageBar ref="pageBarref0" @pageChange="pageChange0" :total="total" :pageSize="pageSize" class="pageBar"></pageBar>
+        </div>
       </div>
-      <div v-else class="DataBoxContent">
-        <div class="listBox">
-          <div class="listBoxItemContent listItemClass" v-for="(item, index) in dataList1" :key="index">
-            <pageList :item="item" type="list1" :approval="true" @delRefresh="delRefresh"></pageList>
-            <a-divider class="bottomBorder" v-if="(index!=dataList1.length-1)"/>
+      <div class="searchBoxContent" v-show="(tapAction==1)">
+        <div class="noDataBox" v-if="dataList1.length==0">
+          <img src="../../../../image/noDataNew.png" class="noData"/>
+          <p class="noDataText">暂无搜索结果</p>
+        </div>
+        <div v-else class="DataBoxContent">
+          <div class="listBox">
+            <div class="listBoxItemContent listItemClass" v-for="(item, index) in dataList1" :key="index">
+              <pageList :item="item" type="list1" :approval="true" @delRefresh="delRefresh"></pageList>
+              <a-divider class="bottomBorder" v-if="(index!=dataList1.length-1)"/>
+            </div>
           </div>
+          <pageBar ref="pageBarref1" @pageChange="pageChange1" :total="total" :pageSize="pageSize" class="pageBar"></pageBar>
         </div>
-        <pageBar ref="pageBarref1" @pageChange="pageChange1" :total="total" :pageSize="pageSize" class="pageBar"></pageBar>
       </div>
-    </div>
-    <div class="searchBoxContent" v-show="(tapAction==2)">
-      <div class="noDataBox" v-if="dataList2.length==0">
-        <img src="../../../../image/noDataNew.png" class="noData"/>
-        <p class="noDataText">暂无搜索结果</p>
+      <div class="searchBoxContent" v-show="(tapAction==2)">
+        <div class="noDataBox" v-if="dataList2.length==0">
+          <img src="../../../../image/noDataNew.png" class="noData"/>
+          <p class="noDataText">暂无搜索结果</p>
+        </div>
+        <div v-else class="DataBoxContent">
+          <div class="listBox">
+            <div class="listBoxItemContent listItemClass" v-for="(item, index) in dataList2" :key="index">
+              <pageList :item="item" type="list1" :showEdit="true"></pageList>
+              <a-divider class="bottomBorder" v-if="(index!=dataList2.length-1)"/>
+            </div>
+          </div>
+          <pageBar ref="pageBarref2" @pageChange="pageChange2" :total="total" :pageSize="pageSize" class="pageBar"></pageBar>
+        </div>
       </div>
-      <div v-else class="DataBoxContent">
-        <div class="listBox">
-          <div class="listBoxItemContent listItemClass" v-for="(item, index) in dataList2" :key="index">
-            <pageList :item="item" type="list1"></pageList>
-            <a-divider class="bottomBorder" v-if="(index!=dataList2.length-1)"/>
+      <div class="searchBoxContent" v-show="(tapAction==3)">
+        <div class="noDataBox" v-if="dataList3.length==0">
+          <img src="../../../../image/noDataNew.png" class="noData"/>
+          <p class="noDataText">暂无搜索结果</p>
+        </div>
+        <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>
+              <a-divider class="bottomBorder" v-if="(index!=dataList3.length-1)"/>
+            </div>
           </div>
+          <pageBar ref="pageBarref3" @pageChange="pageChange3" :total="total" :pageSize="pageSize" class="pageBar"></pageBar>
         </div>
-        <pageBar ref="pageBarref2" @pageChange="pageChange2" :total="total" :pageSize="pageSize" class="pageBar"></pageBar>
       </div>
     </div>
   </div>
@@ -92,13 +116,15 @@ import api from '@/api/knowledge/warehouseIndex'
 import search from '../components/search'
 import pageBar from '../components/pageBar'
 import pageList from '../components/pageList'
+import classMenu from '../components/classMenu'
 import {mapState} from "vuex";
 export default {
   name: 'contentData',
   components: {
     search,
     pageBar,
-    pageList
+    pageList,
+    classMenu
   },
   computed: {
     ...mapState({
@@ -123,14 +149,17 @@ export default {
       pageNum0:1,
       pageNum1:1,
       pageNum2:1,
+      pageNum3:1,
       total:2,
       pageSize:10,
-      tapArr:['','我的审批','我的上传'],
+      tapArr:['','我的审批','我的上传','我的草稿'],
       number0:0,
       number1:0,
       number2:0,
+      number3:0,
       number1Bas:0,
       number2Bas:0,
+      number3Bas:0,
       myuploadNum:0,
       tapAction:0,
       dataList:[
@@ -139,6 +168,8 @@ export default {
       ],
       dataList2:[
       ],
+      dataList3:[
+      ],
       options: [],
       type:null,
       typeName:["最新知识","最热知识","文档排行","工作成果","经典案例","维基排行"],
@@ -146,6 +177,9 @@ export default {
     }
   },
   created() {
+    if(this.$route.query.showMy!=undefined){
+      this.changeAction(2)
+    }
     if(this.$route.query.type!=undefined){
       this.type=this.$route.query.type
       this.categoryName=this.typeName[this.type]
@@ -225,6 +259,18 @@ export default {
       this.getData(true);
     }
    },
+   //修改分类
+   changeClass(data){
+    if(data.categoryId=='000'){
+      this.categoryId = ''
+    }else{
+      this.categoryId = data.categoryId
+    }
+    this.categoryValue = data.categoryValue
+    this.categoryName = data.categoryName
+    this.type = null
+    this.getData(true);
+   },
    filter(inputValue, path) {
     return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1);
    },
@@ -420,6 +466,40 @@ export default {
         })
       })
     }
+    if(this.tapAction==3||type){
+      let param0 = {
+        "pageNo": this.pageNum,
+        "pageSize": 10,
+        "sortField": "CREATE_TIME_",
+        "sortOrder": "desc",
+        params: {
+          "isDraft":0,
+          "createBy":this.user.userId,
+          "keyword":this.searchData.keyword
+        }
+      }
+      if(this.searchData.range!=0){
+        param0.params.type=this.searchData.range
+      }
+      contentData.findAllKnowledge(param0).then((res) => {
+        res.result.data.forEach(element => {
+          element.documentName = element.attachmentName
+          element.documentRemark = element.summary
+          element.viewNum = element.views
+          element.uploadTime = element.createTime
+          element.categoryArr = []
+          this.getType(element)
+          this.getCategory(element.categoryArr,element.knowledgeCategoryAdminVo)
+        });
+        this.number3 = res.result.totalCount
+        this.dataList3 = res.result.data
+        this.$nextTick(()=>{
+          if(Number(res.result.totalCount)!=0){
+            this.$refs.pageBarref3.setTotal(Number(res.result.totalCount))
+          }
+        })
+      })
+    }
    },
    // 删除刷新页面
    delRefresh(){
@@ -468,9 +548,8 @@ export default {
    getBaseData(){
     contentData.getAllKnowledgeCategory().then((res) =>{
       this.categoryData(res.data)
-      console.log(res.data)
       let allposition={
-        children: [],
+        children: res.data,
         isSys: 0,
         label: "全部分类",
         level: 1,
@@ -478,14 +557,14 @@ export default {
         operatorName: null,
         parent: "0",
         parents: null,
-        pkId: "",
+        pkId: "000",
         sort: 2,
         updateBy: "1",
         updateTime: "2022-12-27 17:00:30",
         value: ""
       }
-      res.data.unshift(allposition)
-      this.options=res.data
+     // res.data.unshift(allposition)
+      this.options=allposition
     })
     this.delRefresh()
     let param1 = {
@@ -518,6 +597,36 @@ export default {
         }
       })
     })
+    let param0 = {
+      "pageNo": this.pageNum,
+      "pageSize": 10,
+      "sortField": "CREATE_TIME_",
+      "sortOrder": "desc",
+      params: {
+        "isDraft":0,
+        "createBy":this.user.userId,
+        "keyword":this.searchData.keyword
+      }
+    }
+    contentData.findAllKnowledge(param0).then((res) => {
+      res.result.data.forEach(element => {
+        element.documentName = element.attachmentName
+        element.documentRemark = element.summary
+        element.viewNum = element.views
+        element.uploadTime = element.createTime
+        element.categoryArr = []
+        this.getType(element)
+        this.getCategory(element.categoryArr,element.knowledgeCategoryAdminVo)
+      });
+      this.number3 = res.result.totalCount
+      this.number3Bas = res.result.totalCount
+      this.dataList3 = res.result.data
+      this.$nextTick(()=>{
+        if(Number(res.result.totalCount)!=0){
+          this.$refs.pageBarref3.setTotal(Number(res.result.totalCount))
+        }
+      })
+    })
    },
    // 获取文件分类名
    getType(item){
@@ -556,6 +665,9 @@ export default {
     if(this.tapAction==2){
       this.pageNum = this.pageNum2
     }
+    if(this.tapAction==3){
+      this.pageNum = this.pageNum3
+    }
    },
    // 页码处理
    pageChange0(num){
@@ -575,6 +687,13 @@ export default {
     this.pageNum2 = num
     this.getData(false)
    }
+   ,
+   // 页码处理
+   pageChange3(num){
+    this.pageNum = num
+    this.pageNum3 = num
+    this.getData(false)
+   }
   }
 }
 </script>
@@ -583,7 +702,9 @@ export default {
   position: absolute;
   background: #FAFAFA;
   height: 100%;
+  width: 100%;
   overflow: scroll;
+  display: flex;
 }
 .searchHead{
   background: #fff;
@@ -591,7 +712,7 @@ export default {
   width: 100%;
 }
 .searchBoxContent{
-  margin: 0px 10.94vw;
+  width: 78.125vw;
   border-bottom-left-radius: 10px;
   border-bottom-right-radius: 10px;
 }
@@ -601,6 +722,7 @@ export default {
   padding: 1.5625vw;
   margin-top: 1.25vw;
   border-radius: 10px;
+  display: none;
 }
 .noDataBox{
   width: 100%;
@@ -620,8 +742,7 @@ export default {
 }
 .tabBoxContent{
   display: flow-root;
-  width: 78.12vw;
-  margin: 0px 10.94vw;
+  width: 78.125vw;
   background: #fff;
   margin-top: 1.25vw;
   border-bottom: 1px solid #EEEEEE;
@@ -688,7 +809,7 @@ export default {
   margin-bottom: 0px;
 }
 .userTop{
-  margin: 0px 10.94vw;
+  width: 78.125vw;
   background: #fff;
   padding: 1.5625vw;
   margin-top: 1.5104vw;
@@ -723,6 +844,9 @@ export default {
 }
 .userEnd{
   margin-left: auto;
+  width: 47.34375vw;
+  display: flex;
+  align-items: center;
 }
 .cascaderBox{
   width: 20.625vw;
@@ -744,4 +868,22 @@ export default {
 /deep/ .ant-cascader-menu:last-child {
   margin-right: 0!important;
 }
+.leftBox{
+  margin-top: 1.5104vw;
+  width:11.71875vw;
+  margin-right:1.25vw;
+  background: #fff;
+  border-radius: 10px;
+  overflow-x: scroll;
+}
+.rightBox{
+  height: 100%;
+  overflow: scroll;
+}
+.classTop{
+  font-size: 1.04vw;
+  padding: 1.25vw 1.25vw 0.625vw;
+  color: #202124 ;
+  font-weight: 500;
+}
 </style>

+ 110 - 8
src/views/modules/knowledge/warehouse/knowledgeAddUpdate.vue

@@ -9,6 +9,7 @@
               maxWidth: widthVar + 'px',
               'overflow-x': 'auto'
             }"
+            @popupVisibleChange="popupVisibleChange"
             class="addItemBox scroll-ckunk"
             :getPopupContainer="triggerNode => { return triggerNode.parentNode }"
             :options="classifyList" 
@@ -29,14 +30,14 @@
           </a-select>
         </a-form-model-item>
         <a-form-model-item class="knowledgeAddUpdateLabel oneline" label="知识标题:" prop="titles" style="width:46.04vw;margin-top: -5px;">
-          <a-input @change='titlesChange' class="addItemBox" maxLength="20" v-model="knowledgeForm.titles" placeholder="请输入" >
+          <a-input @change='titlesChange' class="addItemBox" :maxLength="20" v-model="knowledgeForm.titles" placeholder="请输入" >
             <div slot="suffix" style="color: #C0C0C0;">
               {{titlesNum}}
             </div>
           </a-input>
         </a-form-model-item>
         <a-form-model-item class="knowledgeAddUpdateLabel oneline" label="编辑简介:" prop="summary" style="width:calc( 46.04vw );">
-          <a-input @change='summaryChange' class="textareaBox" suffix="100" maxLength="100" v-model="knowledgeForm.summary" type="textarea" :autosize="{minRows: 3, maxRows: 6}" placeholder="请输入" >
+          <a-input @change='summaryChange' class="textareaBox" suffix="100" :maxLength="100" v-model="knowledgeForm.summary" type="textarea" :autosize="{minRows: 3, maxRows: 6}" placeholder="请输入" >
           </a-input>
           <div class="rightText">
             {{summaryNum}}
@@ -84,6 +85,12 @@
             <rx-button style="font-size: 1vw;color: #406CC4;" class="clearBtn" :butn-icon="'none'" @click="handleFileDownloadClick">下载</rx-button>
           </div>
         </a-form-model-item>
+        <a-form-model-item class="knowledgeAddUpdateLabel oneline" v-if="knowledgeForm.type==1" prop="actualApproverName">
+          <span slot="label">&emsp;&emsp;权限</span>
+          <div @click="showAuditFlag = true">
+            <a-select class="addItemBox" v-model="authName" :showArrow="false" :open="false" placeholder="请选择您建议的权限范围"></a-select>
+          </div>
+        </a-form-model-item>
         <template v-if="showOnlyOffice">
           <div class='qualityManual-container-office'>
             <vab-only-office :option='option' />
@@ -91,7 +98,8 @@
         </template>  
         <a-divider style="margin: 2.08vw 0 1.56vw;" />
         <div class="button-group" style="width:100%;display:flex;justify-content:flex-end;">
-          <a-button style="background:#406CC4;color:#fff;margin-right: 1.25vw;" @click="handleSaveClick">提交</a-button>
+          <a-button style="background:#406CC4;color:#fff;margin-right: 1.25vw;" @click="handleSaveClick(1)">提交</a-button>
+          <a-button style="margin-right: 1.25vw;" @click="handleSaveClick(0)">暂存</a-button>
           <a-button @click="$router.back()">取消</a-button>
         </div>
       </a-form-model>
@@ -103,6 +111,18 @@
         </a-table>
       </div>
     </div>
+    <a-modal v-model="showAuditFlag" 
+          width="800"
+          title="选择" 
+          centered
+          okText="保存"
+          @ok="handleSaveOk">
+      <org-people :isOnlyOrg="false" 
+                  style="width:800px;height:65vh;" 
+                  @transCheckedTarget="transCheckedTarget"
+                  @returnSequencesInfo="handleSequencesChange"
+                  @returnGradeInfo="handleGradeChange" />
+    </a-modal>  
   </div>
 </template>
 
@@ -111,6 +131,7 @@ import add from '@/assets/img/warehouse/add.png'
 import wordIcon from '@/assets/img/warehouse/wordIcon.png'
 import { ACCESS_TOKEN } from '@/store/mutation-types';
 import editor from '../components/editor'
+import orgPeople from '../components/orgPeople'
 import vabOnlyOffice from '../components/onlyOffice'
 import { getCategoryId } from './aJs/getClassifyTree'
 import api from '@/api/knowledge/warehouseIndex'
@@ -119,10 +140,14 @@ export default {
   name: 'knowledgeAddUpdate',
   components: {
     editor,
-    vabOnlyOffice
+    vabOnlyOffice,
+    orgPeople
   },
   data() {
     return {
+      widthVar:'',
+      isShowOrg:true,
+      showAuditFlag:false,
       loading:false,
       api,
       add,
@@ -140,7 +165,8 @@ export default {
         attachment: '', 
         attachmentName: '',
         createBy: '',
-        author: ''
+        author: '',
+        organizationId:''
       },
       options: [
         {
@@ -238,7 +264,14 @@ export default {
       },
       headers: {},
       isSubmit:false,
-      innerWidth: 800
+      innerWidth: 800,
+      authName: undefined,
+      // 组织架构
+      checkedTarget: {},
+      // 职系
+      sequencesInfo: {},
+      // 职等
+      gradesInfo: {},
     }
   },
   created() {
@@ -247,7 +280,7 @@ export default {
       this.knowledgeForm.type = this.$route.query.type
       this.knowledgeForm.bastype = this.$route.query.type
     }
-    if(this.$route.query.categoryId) {
+    if(this.$route.query.categoryId&&this.$route.query.categoryId!='000') {
       this.knowledgeForm.categoryId = this.$route.query.categoryId.split(',')
     }
     let pkId = this.$route.query.pkId
@@ -264,6 +297,24 @@ export default {
         this.approverData = res.data.approvals
         this.knowledgeForm.createBy = res.data.createBy
         this.knowledgeForm.author = res.data.author
+        //res.data.organizationId='[{\"organizationId\":\"C0000\",\"organizationName\":\"惠科集团\",\"organizationTree\":[\"惠科集团\"]},{\"gradeId\":\"O/F\",\"gradeName\":\"制造职系\"},{\"gradeLevelId\":\"1\",\"gradeLevelName\":\"1\"}]'
+        console.log(res.data.organizationId)
+        let organizationIdArr = JSON.parse(res.data.organizationId)
+        if(organizationIdArr!=null){
+          let info = []
+          organizationIdArr.forEach(element => {
+            if(element.organizationTree){
+              info.push(`${element.organizationTree.join('-')}`)
+            }
+            if(element.gradeName){
+              info.push(`职系-${element.gradeName}`)
+            }
+            if(element.gradeLevelName){
+              info.push(`职等-${element.gradeLevelName}`)
+            }
+          })
+          this.authName = info.join('/')
+        }
         this.titlesChange()
         this.summaryChange()
       })
@@ -318,6 +369,56 @@ export default {
    
   },
   methods: {
+    //分类修改数据
+    popupVisibleChange(value) {
+      if(value==false){
+        this.getApprover()
+      }
+    },
+    getApprover(){
+      let data={categoryId:this.knowledgeForm.categoryId[this.knowledgeForm.categoryId.length-1]}
+      api.findAllNodesByCategoryId(data).then((res) =>{
+        this.approverData = res.data
+      })
+    },
+    transCheckedTarget(arg) {
+      this.checkedTarget = arg
+    },
+    handleSequencesChange(arg) {
+      this.sequencesInfo = arg
+    },
+    handleGradeChange(arg) {
+      this.gradesInfo = arg
+    },
+    handleSaveOk() {
+      if(this.isShowOrg) {
+        let info = []
+        let res = []
+        if(this.checkedTarget.organizationId) {
+          info.push(`${this.checkedTarget.organizationTree.join('-')}`)
+          res.push(this.checkedTarget)
+        }
+        if(this.sequencesInfo.gradeId) {
+          info.push(`职系-${this.sequencesInfo.gradeName}`)
+          res.push(this.sequencesInfo)
+        }
+        if(this.gradesInfo.gradeLevelId) {
+          info.push(`职等-${this.gradesInfo.gradeLevelName}`)
+          res.push(this.gradesInfo)
+        }
+        console.log(info)
+        if(info.length) {
+          this.authName = info.join('/')
+        }
+        if(res.length) {
+          this.knowledgeForm.organizationId = JSON.stringify([...res])
+        } else {
+          this.knowledgeForm.organizationId = ""
+        }
+      }
+      console.log(this.knowledgeForm.organizationId)
+      this.showAuditFlag = false
+    },
     //  title修改限制数量
     titlesChange(){
       this.titlesNum=20-this.knowledgeForm.titles.length
@@ -327,10 +428,11 @@ export default {
       this.summaryNum=100-this.knowledgeForm.summary.length
     },
     //  提交数据
-    handleSaveClick() {
+    handleSaveClick(type) {
       let that = this
       this.$refs.knowledgeRef.validate(valid => {
         if (valid) {
+          this.knowledgeForm.isDraft = type
            // 新增
           if(!this.pkId) {
               if(this.isSubmit){