Zhang Li, BBF-411-2(Neusoft) 1 an în urmă
părinte
comite
d5cf59ed8b

+ 8 - 0
src/api/knowledge/manage.js

@@ -17,6 +17,14 @@ returnData.getAuditKnowledgeSum=function () {
   })
 }
 
+// 转移作者
+returnData.transferAuthor=function (parameter) {
+  var url= returnData.baseUrl + '/transferAuthor'
+  return rxAjax.postJson(url,parameter).then (res => {
+    return res
+  })
+}
+
 // 新增
 returnData.create=function (parameter) {
   var url= returnData.baseUrl + '/create'

+ 18 - 0
src/api/knowledge/statistics.js

@@ -128,6 +128,15 @@ returnData.mapPageHistogram=function (parameter) {
     return res
   })
 }
+
+// 人员/组织 创建地图数量(地图)
+returnData.personMap=function (parameter) {
+  var url= returnData.baseUrl + '/personMap'
+  return rxAjax.postJson(url,parameter).then (res => {
+    return res
+  })
+}
+
 //搜索统计
 //各业务系统分布
 returnData.searchSystemDetailVisits=function (parameter) {
@@ -151,6 +160,15 @@ returnData.searchGroups=function (parameter) {
   })
 }
 
+// 人员/组织 搜索统计(搜索)
+returnData.personSearch=function (parameter) {
+  var url= returnData.baseUrl + '/personSearch'
+  return rxAjax.postJson(url,parameter).then (res => {
+    return res
+  })
+}
+
+
 //获取当前时间
 returnData.getNowDate=function(){
   const nowDate = new Date();

+ 7 - 0
src/api/user/org/osUser.js

@@ -33,6 +33,13 @@ OsUserApi.getOsUserList= function(parameter) {
   })
 }
 
+OsUserApi.getAllUserByGroupId= function(parameter) {
+  var url= OsUserApi.baseUrl + '/getAllUserByGroupId';
+  return rxAjax.postJson(url,parameter).then(res => {
+    return res
+  });
+}
+
 OsUserApi.getAllOsUserList= function(parameter) {
   var url= OsUserApi.baseUrl + '/getAll';
   return rxAjax.get(url,parameter).then(res => {

+ 103 - 16
src/views/modules/knowledge/aMixin/initMixin.js

@@ -1,21 +1,108 @@
-import classApi from '@/api/knowledge/classify'
-export default {
-  methods: {
-    async init() {
-      let res = await classApi.getAllByCategoryId()
-      this.classifyList = this.formatData(res.data.children)
+import statistics from '@/api/knowledge/statistics'
+export default (deleteTitle) => {
+  return {
+    data() {
+      return {
+        showAuditFlag: false,
+        barXUserData: [],
+        barUserDataNew: [],
+        barXOrgData: [],
+        barOrgDataNew: []
+      }
     },
-    //格式化数据,递归将空的children置为undefined
-    formatData(data) {
-      const that = this
-      data.forEach((element) => {
-        if (element.children && element.children.length > 0) {
-          that.formatData(element.children)
+    mounted() {
+      this.getUserStatistics()
+    },
+    methods: {
+      handleAuditShow(arg) {
+        this.isOrgOrUser = arg
+        this.showAuditFlag = true
+      },
+          // 员工创建量统计
+    getUserStatistics(info = '',num = '') {
+      if(!info) {
+        if(!num) {
+          this.barXUserData = []
+          this.barXUserDataNew = []
+          this.barXOrgData = []
+          this.barOrgDataNew = []
+        } else if(num == 1) {
+          this.barXUserData = []
+          this.barXUserDataNew = []
+        } else {
+          this.barXOrgData = []
+          this.barOrgDataNew = []
+        }
+      } else {
+        statistics.personMap(info).then(res => {
+          let data = res.data.filter(item => item.organization != null)
+          console.log(data)
+          if(num == 1) {
+            if(!data.length) {
+              this.barXUserData = []
+              this.barXUserDataNew = []
+            } else {
+              this.barXUserData = data.map(item => item.organization)
+              this.barXUserDataNew = data.map(item => item.map)
+            }
+          } else {
+            if(!data.length) {
+              this.barXOrgData = []
+              this.barOrgDataNew = []
+            } else {
+              this.barXOrgData = data.map(item => item.organization)
+              this.barOrgDataNew = data.map(item => item.map)
+            }
+          }
+        })
+      }
+    },
+      handleSaveOk() {
+        if(this.isOrgOrUser == 1) {
+          let info = this.$refs.orgModalRef.personId
+          this.staffName = info.map(item => item.split('/')[0]).join('/')
+          this.staffForm.personId = info.map(item => item.split('/')[1])
+        } else {
+          let info = this.$refs.orgModalRef.$refs.orgTable.getSelectedRows()
+          this.orgName = info.map(item => item.name).join('/')
+          this.orgForm.organizationId = info.map(item => item.key).join(',')
+        }
+        this.showAuditFlag = false
+      },
+      handleSearchClick(arg) {
+        let info
+        if(arg == 1) {
+          this.staffForm.createTime = this.staffTime[0]
+          this.staffForm.endTime = this.staffTime[1]
+          info = {
+            type: this.type,
+            ...this.staffForm,
+            personId: this.staffForm.personId ? this.staffForm.personId : []
+          }
+          this.getUserStatistics(info,1)
+        } else {
+          this.orgForm.createTime = this.orgTime[0]
+          this.orgForm.endTime = this.orgTime[1]
+          info = {
+            type: this.type,
+            ...this.orgForm,
+          }
+           this.getUserStatistics(info,2)
+        }
+      },
+      handleResetClick(arg) {
+        if(arg == 1) {
+          this.staffName = undefined
+          this.staffTime = []
+          this.staffForm = Object.assign({},this.$options.data().staffForm)
+          this.getUserStatistics('',1)
         } else {
-          delete element.children
+          this.orgName = undefined
+          this.orgTime = []
+          this.orgForm = Object.assign({},this.$options.data().orgForm)
+          this.getUserStatistics('',2)
         }
-      })
-      return data
+      }
     }
   }
-}
+} 

+ 10 - 4
src/views/modules/knowledge/statistics/components/BarEchartOne.vue

@@ -22,6 +22,10 @@ export default {
     barData: {
       type: Array,
       default: () => []
+    },
+    isOrg: {
+      type: Boolean,
+      default: false
     }
   },
   computed: {
@@ -62,7 +66,9 @@ export default {
         },
         yAxis: {
           type: "value",
-           offset: 15,
+          offset: 15,
+          min: 0,
+          max: this.barData.length ? null : 10
         },
         tooltip: {
           show: true,
@@ -99,12 +105,12 @@ export default {
               barBorderRadius: [10, 10, 0, 0], //柱体圆角   
               color: new echarts.graphic.LinearGradient(
                 0, 0, 0, 1, [{//代表渐变色从正上方开始
-                    offset: 0, //offset范围是0~1,用于表示位置,0是指0%处的颜色
-                    color: '#1890ff'
+                    offset: 0, //offset范围是0~1,用于表示位置,0是指0%处的颜色 #ffc20d 黄色  #1890ff 蓝色
+                    color: this.isOrg ? '#ffc20d': '#1890ff'
                   }, //柱图渐变色
                   {
                     offset: 1, //指100%处的颜色
-                    color: '#afedfd'
+                    color: this.isOrg ? '#ffecb6' : '#afedfd'
                   }
                 ]
               )

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

@@ -0,0 +1,379 @@
+<template>
+    <div style="height: 600px;">
+        <a-form ref="searchForm" layout="inline" style="display: flex; flex-wrap: wrap;padding: 20px 20px 0 20px;">
+            <a-form-item class="form-item-style" style="width:600px;" label="组织名称" name="staff">
+                <a-input class="set-input" v-model="serachValue" placeholder="请输入" />
+            </a-form-item>
+            <div style="display: flex;align-items:center;justify-content: center;margin-bottom: 1px;">
+                <a-button style="margin-right: 8px;" @click="handleResetClick">重置</a-button>
+                <a-button type="primary" @click="handleSearchOrgClick">查询</a-button>
+            </div>
+        </a-form>
+        <div style="display:flex;width:100%;padding: 16px;">
+            <rx-grid
+                style="width:70%;height: 500px;overflow-y:auto;"
+                :style="{width: isOnlyOrg ? '70%' : '100%'}"
+                ref="orgTable"
+                class="rx-tree-title"
+                :allowRowSelect="isOnlyOrg ? false : true"
+                :multiSelect="isOnlyOrg ? false : true"
+                :showPage="false"
+                :columns="columnsNew"
+                :defaultPageSize="10"
+                :dataSource="tableData"
+                @rowExpand="rowExpand"
+                :expandIconColumnIndex="0"
+                :idField="'groupId'"
+                >
+                <div  slot="name" class="rx-table-row-icon" slot-scope="{text,record}">
+                    <div v-if="checkId==record.pkId" style="color:#1890ff;" class="telist rx-tree-title" :title="text">{{text}}-{{ record.pkId }}</div>
+                    <div v-else @click="checklist(record)" class="telist rx-tree-title" :title="text">{{text}}-{{ record.pkId }}</div>
+                </div>
+            </rx-grid>
+            <div v-if="isOnlyOrg" style="width:30%;height:500px;border: 1px solid #e8e8e8;border-left:none;">
+                <div class="rightDetailtop">访问量明细</div>
+                <!-- <a-checkbox-group name="checkboxgroup" :options="options1" v-model="value" @change="onChange" /> -->
+                <a-checkbox-group v-model="personId" style="width:100%;height: 460px;overflow-y: auto;">
+                    <a-checkbox v-for="(item) in userData" :style="radioStyle" :value="item.fullName + '/' + item.userId" :key="item.userId">
+                        {{ item.fullName + '(' + item.userNo + ')'}}
+                    </a-checkbox>
+                </a-checkbox-group>
+            </div>
+            <!-- <div style="width:50%;height:500px;" v-if="isOnlyOrg">
+                <rx-grid
+                    ref="userTable"
+                    bordered
+                    :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">
+                    <template slot="fullName" slot-scope="{ text,record }">
+                        <span>{{ text +'(' + record.userNo + ')' }}</span>
+                    </template>
+                </rx-grid>
+            </div> -->
+        </div>
+    </div>
+</template>
+
+<script>
+  import OsUserApi from '@/api/user/org/osUser'
+  import statistics from '@/api/knowledge/statistics'
+  import OsGroupApi from '@/api/user/org/osGroup'
+  import {BaseList,Util, RxLayout, RxFit, RxGrid, RxTree} from 'jpaas-common-lib'
+  export default {
+    name: 'OsUserList',
+    mixins: [BaseList],
+    components: {
+      RxLayout,
+      RxFit,
+      RxGrid,
+      RxTree
+    },
+    props: {
+        isOnlyOrg: {
+            type: Boolean,
+            default: true
+        }
+    },
+    data() {
+      return {
+            params: {
+                name: '',
+                userNo: ''
+            },
+            queryParam: {
+                pageNo: 1,
+                pageSize: 100,
+                params: {
+                    groupId: "",
+                    dim: "1", 
+                    rankLevel: "", 
+                    status: "1",
+                    name: "",
+                    userNo: ""
+                },
+                sortOrder: "asc"
+            },
+            orgData: [],
+            userId: '',
+            visible: false,
+            quitUserIds: [],
+            // 表头
+            columns: [
+                {
+                    title: '员工姓名',
+                    align: 'center',
+                    dataIndex: 'fullName',
+                    scopedSlots: { customRender: 'fullName' }
+                }
+            ],
+            checkId: null,
+            serachValue: '',
+            tableData:[],
+            columnsNew: [
+                {
+                    title: '组织名称',
+                    width:250,
+                    dataIndex: 'name',
+                    ellipsis: true,
+                    scopedSlots: { customRender: 'name' }
+                }
+            ],
+            userData: [],
+            personId: [],
+            radioStyle: {
+                display: 'block',
+                height: '40px',
+                lineHeight: '40px',
+                marginLeft: '30px'
+            },
+            // 组织
+            checkedTarget: {},
+            // 组织架构(多选)
+        }
+    },
+    created() {
+    //    this.init()
+       this.getTreeData()
+       if(this.isOnlyOrg) {
+            this.getOrgListByGroupId()
+       }
+    },
+    methods: {
+        // 组织名称搜索
+        handleSearchOrgClick() {
+            if(this.serachValue==''){
+                this.handleResetClick()
+            }else{
+                let getData={
+                    "sortOrder": "asc",
+                    "params": {
+                        "Q_DIM_ID__S_EQ": "1",
+                        "Q_RANK_LEVEL__S_EQ": null,
+                        "Q_NAME__S_LK": this.serachValue,
+                        "Q_GROUP_ID__S_NEQ": ""
+                        }
+                }
+                statistics.searchGroups(getData).then(result => {
+                    let tempData=[]
+                    result.forEach(itemData => {
+                        let tempDataFlag=result.filter(item=>{
+                            return item.pkId==itemData.parentId;
+                        });
+                        if(tempDataFlag.length==0){
+                        tempData.push(itemData)
+                        }
+                    });
+                    tempData=this.treeData(tempData);
+                    this.tableData = tempData;
+                    this.queryParam.params.groupId = ''
+                    this.userData = []
+                })
+            }
+            //清除下拉的数据
+            this.$refs.orgTable.expandedRowKeys=[];
+        },
+        handleResetClick() {
+            this.serachValue==''
+            this.getTreeData()
+            this.userData = []
+            this.getOrgListByGroupId()
+        },
+        //组织结构
+        getTreeData(){
+            OsGroupApi.queryGroups(1,"0","yes").then(result => {
+                result.data=this.treeData(result.data);
+                this.tableData = result.data;
+            })
+            //清除下拉的数据
+            // this.$refs.orgTable.expandedRowKeys=[];
+        },
+        //异步加载组织
+        rowExpand(expanded,record){
+            var self=this;
+            if(expanded&&record.children&&record.children.length==0){
+            OsGroupApi.queryGroups(1,record.groupId,"yes").then(result => {
+                    result.data=this.treeData(result.data);
+                    self.updateData(self.tableData,result.data,record.groupId);
+                    this.$refs.orgTable.loadData();
+                })
+            }
+        },
+        checklist(data){
+            if(this.isOnlyOrg) {
+                this.queryParam.params.groupId = data.pkId
+                this.getOrgListByGroupId()
+            }
+        },
+        //判断下级是否有子级
+        treeData(data){
+            for (var i = 0; i <data.length ; i++) {
+                if(data[i].childAmount>0){
+                    data[i].children=[];
+                }
+            }
+            return data;
+        },
+        //更新数据到tableData中
+        updateData(tableData,data,groupId){
+            for (var i = 0; i <tableData.length ; i++) {
+                if(tableData[i].groupId==groupId){
+                    tableData[i].children=data;
+                        break;
+                }else {
+                    if(tableData[i].childAmount>0){
+                        this.updateData(tableData[i].children,data,groupId);
+                    }
+                }
+            }
+        },
+        getOrgListByGroupId() {
+            OsUserApi.getAllUserByGroupId(this.queryParam).then(res=> {
+                if(res.code == 200) {
+                    this.userData = res.result.data
+                }
+            })
+        },
+        init() {
+            this.loadAdminDeps();
+        },
+        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];
+                // this.getAllUserTypeList();
+            })
+        },
+        //加载左树下的子节点
+        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)
+                //查询左树用户
+                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
+            this.$emit('transCheckedTarget',this.checkedTarget)
+        },
+    },
+    beforeDestroy() {
+        this.checkedTarget = Object.assign({},this.$options.data().checkedTarget)
+    }
+}
+</script>
+<style scoped>
+.rightDetailtop{
+  background: #fafafa;
+  width: 100%;
+  text-align: center;
+  height:37.8px;
+  line-height:37.8px;
+}
+/* .rightDetailtop{
+  background: #fafafa;
+  border-bottom: 1px solid #e8e8e8;
+  width: 100%;
+  text-align: center;
+  height:54px;
+  line-height:54px;
+} */
+/deep/ .ant-card-head-title {
+    padding: 0;
+}
+ /deep/.ant-table-thead > tr > th {
+  text-align: center; 
+  height: 37.8px!important;
+}
+/deep/ .ant-table-tbody > tr > td {
+  height: 37.8px!important;
+}
+/deep/ .gridContent{
+  border: 1px solid #ddd!important;
+}
+/deep/ .ant-table-row-expand-icon{
+   margin-top: 3px;
+}
+</style>
+

+ 106 - 3
src/views/modules/knowledge/statistics/map.vue

@@ -33,6 +33,76 @@
           </div>
           <bar-echart-one :barXData="barXData" :barData="barDataNew"></bar-echart-one>
         </div>
+        <div class="bar-style">
+          <div>
+            员工创建量统计
+          </div>
+          <div class="staff-style">
+            <a-form ref="searchForm" layout="inline" style="display: flex; flex-wrap: wrap">
+              <a-form-item class="form-item-style" style="width:240px;" label="查询选项" name="staff">
+                <!-- <a-input class="set-input" v-model="staffForm.staff" placeholder="请选择要查询的员工" /> -->
+                <div @click="handleAuditShow(1)">
+                  <a-select
+                    v-model="staffName"
+                    :showArrow="false"
+                    :open="false"
+                    placeholder="请选择要查询的员工"
+                  ></a-select>
+                  </div>
+              </a-form-item>
+              <a-form-item class="form-item-style" style="width:300px;" label="时间范围" name="staffTime">
+                <a-range-picker
+                  v-model="staffTime"
+                  class="set-range-picker"
+                  separator="→"
+                  format="YYYY/MM/DD"
+                  valueFormat="YYYY-MM-DD"
+                >
+                </a-range-picker>
+              </a-form-item>
+              <div style="display: flex;align-items:center;justify-content: center;margin-bottom: 1px;">
+                <a-button style="margin-right: 8px;" @click="handleResetClick(1)">重置</a-button>
+                <a-button type="primary" @click="handleSearchClick(1)">查询</a-button>
+              </div>
+            </a-form>
+          </div>
+          <bar-echart-one :barXData="barXUserData" :barData="barUserDataNew"></bar-echart-one>
+        </div>
+         <div class="bar-style">
+          <div>
+            组织创建量统计
+          </div>
+          <div class="staff-style">
+            <a-form ref="searchForm" layout="inline" style="display: flex; flex-wrap: wrap">
+              <a-form-item class="form-item-style" style="width:240px;" label="查询选项" name="staff">
+                <!-- <a-input class="set-input" v-model="staffForm.staff" placeholder="请选择要查询的员工" /> -->
+                <div @click="handleAuditShow(2)">
+                  <a-select
+                    v-model="orgName"
+                    :showArrow="false"
+                    :open="false"
+                    placeholder="请选择要查询的组织"
+                  ></a-select>
+                  </div>
+              </a-form-item>
+              <a-form-item class="form-item-style" style="width:300px;" label="时间范围" name="staffTime">
+                <a-range-picker
+                  v-model="orgTime"
+                  class="set-range-picker"
+                  separator="→"
+                  format="YYYY/MM/DD"
+                  valueFormat="YYYY-MM-DD"
+                >
+                </a-range-picker>
+              </a-form-item>
+              <div style="display: flex;align-items:center;justify-content: center;margin-bottom: 1px;">
+                <a-button style="margin-right: 8px;" @click="handleResetClick(2)">重置</a-button>
+                <a-button type="primary" @click="handleSearchClick(2)">查询</a-button>
+              </div>
+            </a-form>
+          </div>
+          <bar-echart-one isOrg :barXData="barXOrgData" :barData="barOrgDataNew"></bar-echart-one>
+        </div>
         <div class="table-style">
           <div>
             组织创建和访问地图数量
@@ -52,6 +122,22 @@
           </rx-grid>-->
         </div>
       </rx-fit>
+      <a-modal
+        v-model="showAuditFlag"
+        class="chooseAuthor"
+        width="800"
+        :title="isOrgOrUser == 1 ? '员工选择' : '组织选择'"
+        centered
+        okText="保存"
+        @ok="handleSaveOk"
+      >
+        <org-people
+          ref="orgModalRef"
+          :isOnlyOrg="isOrgOrUser == 1 ? true : false"
+          :key="new Date().getTime()" 
+          style="width: 800px; height: 600px"
+        ></org-people>
+      </a-modal>
     </div> 
   </rx-layout>
 </template>
@@ -65,6 +151,9 @@ import pieEchart from './components/PieEchart';
 import barEchartOne from './components/BarEchartOne';
 import statistics from '@/api/knowledge/statistics'
 import DataShow from './components/DataShow';
+import orgPeople from './components/orgPeople'
+import mixin from "./sMixin/statisticsMixin"
+const mapMixin = new mixin('personMap')
 export default {
   name: 'synthesize',
   components: {
@@ -74,8 +163,10 @@ export default {
     barEchartOne,
     pieChange,
     pieEchart,
-    DataShow
+    DataShow,
+    orgPeople
   },
+  mixins:[ mapMixin ],
   data() {
     return {
       peitype:0,
@@ -113,10 +204,12 @@ export default {
           sorter: true,
           sortField: 'pv'
         }
-      ]
+      ],
     }
   },
   mounted() {
+    document.getElementsByClassName('ant-form-item-control-wrapper')[0].style.width = '70%'
+    document.getElementsByClassName('ant-form-item-control-wrapper')[2].style.width = '70%'
     this.$refs.pieChange.changeType(1)
     this.gettotalUserVisits()
     this.gettypeMapPie();
@@ -196,7 +289,7 @@ export default {
         this.tabStatus = flag
         this.gettotalUserVisits()
       }
-    }
+    },
   }
 }
 </script>
@@ -294,6 +387,13 @@ export default {
         margin-left: 8px;
       }
     }
+
+    .staff-style {
+      position: absolute;
+      top: 3.3%;
+      left: 15%;
+      z-index: 100;
+    }
   }
 
   .table-style {
@@ -325,4 +425,7 @@ export default {
 /deep/ .ant-table-tbody > tr > td {
   height: 54px;
 }
+.chooseAuthor /deep/.ant-modal-body {
+  padding: 0px;
+}
 </style>

+ 133 - 0
src/views/modules/knowledge/statistics/sMixin/statisticsMixin.js

@@ -0,0 +1,133 @@
+import statistics from '@/api/knowledge/statistics'
+export default (titlePromise) => {
+  return {
+    data() {
+      return {
+        showAuditFlag: false,
+        isOrgOrUser: 1,
+        staffForm: {
+          personId: '',
+          createTime: '',
+          endTime: ''
+        },
+        staffName: undefined,
+        staffTime: [],
+        barXUserData: [],
+        barUserDataNew: [],
+        orgName: undefined,
+        orgTime: [],
+        barXOrgData: [],
+        barOrgDataNew: [],
+        orgForm: {
+          organizationId: '',
+          createTime: '',
+          endTime: ''
+        }
+      }
+    },
+    mounted() {
+      this.getUserStatistics()
+    },
+    methods: {
+      handleAuditShow(arg) {
+        this.isOrgOrUser = arg
+        this.showAuditFlag = true
+      },
+      // 员工创建量统计
+      getUserStatistics(info = '',num = '') {
+        if(!info) {
+          if(!num) {
+            this.barXUserData = []
+            this.barXUserDataNew = []
+            this.barXOrgData = []
+            this.barOrgDataNew = []
+          } else if(num == 1) {
+            this.barXUserData = []
+            this.barXUserDataNew = []
+          } else {
+            this.barXOrgData = []
+            this.barOrgDataNew = []
+          }
+        } else {
+          statistics[titlePromise](info).then(res => {
+            let data = res.data.filter(item => item.organization != null)
+            if(num == 1) {
+              if(!data.length) {
+                this.barXUserData = []
+                this.barUserDataNew = []
+              } else {
+                if(titlePromise == 'personMap') {
+                  this.barXUserData = data.map(item => item.organization)
+                  this.barUserDataNew = data.map(item => item.map)
+                } else if(titlePromise == 'personSearch') {
+                  console.log(data)
+                  this.barXUserData = data.map(item => item.organization)
+                  this.barUserDataNew = data.map(item => item.item[0].value)
+                }
+              }
+            } else {
+              if(!data.length) {
+                this.barXOrgData = []
+                this.barOrgDataNew = []
+              } else {
+                if(titlePromise == 'personMap') {
+                  this.barXOrgData = data.map(item => item.organization)
+                  this.barOrgDataNew = data.map(item => item.map)
+                } else if(titlePromise == 'personSearch') {
+                  this.barXOrgData = data.map(item => item.organization)
+                  this.barOrgDataNew = data.map(item => item.item[0].value)
+                }
+              }
+            }
+          })
+        }
+      },
+      handleSaveOk() {
+        if(this.isOrgOrUser == 1) {
+          let info = this.$refs.orgModalRef.personId
+          this.staffName = info.map(item => item.split('/')[0]).join('/')
+          this.staffForm.personId = info.map(item => item.split('/')[1])
+        } else {
+          let info = this.$refs.orgModalRef.$refs.orgTable.getSelectedRows()
+          this.orgName = info.map(item => item.name).join('/')
+          this.orgForm.organizationId = info.map(item => item.key).join(',')
+        }
+        this.showAuditFlag = false
+      },
+      handleSearchClick(arg) {
+        let info
+        if(arg == 1) {
+          this.staffForm.createTime = this.staffTime[0]
+          this.staffForm.endTime = this.staffTime[1]
+          info = {
+            type: this.type,
+            ...this.staffForm,
+            personId: this.staffForm.personId ? this.staffForm.personId : []
+          }
+          this.getUserStatistics(info,1)
+        } else {
+          this.orgForm.createTime = this.orgTime[0]
+          this.orgForm.endTime = this.orgTime[1]
+          info = {
+            type: this.type,
+            ...this.orgForm,
+          }
+           this.getUserStatistics(info,2)
+        }
+      },
+      handleResetClick(arg) {
+        if(arg == 1) {
+          this.staffName = undefined
+          this.staffTime = []
+          this.staffForm = Object.assign({},this.$options.data().staffForm)
+          this.getUserStatistics('',1)
+        } else {
+          this.orgName = undefined
+          this.orgTime = []
+          this.orgForm = Object.assign({},this.$options.data().orgForm)
+          this.getUserStatistics('',2)
+        }
+      }
+    }
+  }
+} 

+ 126 - 1
src/views/modules/knowledge/statistics/search.vue

@@ -21,6 +21,76 @@
             <rose-echart v-if="peitype!=2" :roseData="roseData"></rose-echart>
             <pie-echart v-else :pieData="pieData" :pieDataTitleLeft="pieDataTitleLeft" :pieDataTitleRight="pieDataTitleRight"></pie-echart>
           </div>
+        </div>
+                <div class="bar-style">
+          <div>
+            员工创建量统计
+          </div>
+          <div class="staff-style">
+            <a-form ref="searchForm" layout="inline" style="display: flex; flex-wrap: wrap">
+              <a-form-item class="form-item-style" style="width:240px;" label="查询选项" name="staff">
+                <!-- <a-input class="set-input" v-model="staffForm.staff" placeholder="请选择要查询的员工" /> -->
+                <div @click="handleAuditShow(1)">
+                  <a-select
+                    v-model="staffName"
+                    :showArrow="false"
+                    :open="false"
+                    placeholder="请选择要查询的员工"
+                  ></a-select>
+                  </div>
+              </a-form-item>
+              <a-form-item class="form-item-style" style="width:300px;" label="时间范围" name="staffTime">
+                <a-range-picker
+                  v-model="staffTime"
+                  class="set-range-picker"
+                  separator="→"
+                  format="YYYY/MM/DD"
+                  valueFormat="YYYY-MM-DD"
+                >
+                </a-range-picker>
+              </a-form-item>
+              <div style="display: flex;align-items:center;justify-content: center;margin-bottom: 1px;">
+                <a-button style="margin-right: 8px;" @click="handleResetClick(1)">重置</a-button>
+                <a-button type="primary" @click="handleSearchClick(1)">查询</a-button>
+              </div>
+            </a-form>
+          </div>
+          <bar-echart-one :barXData="barXUserData" :barData="barUserDataNew"></bar-echart-one>
+        </div>
+         <div class="bar-style">
+          <div>
+            组织创建量统计
+          </div>
+          <div class="staff-style">
+            <a-form ref="searchForm" layout="inline" style="display: flex; flex-wrap: wrap">
+              <a-form-item class="form-item-style" style="width:240px;" label="查询选项" name="staff">
+                <!-- <a-input class="set-input" v-model="staffForm.staff" placeholder="请选择要查询的员工" /> -->
+                <div @click="handleAuditShow(2)">
+                  <a-select
+                    v-model="orgName"
+                    :showArrow="false"
+                    :open="false"
+                    placeholder="请选择要查询的组织"
+                  ></a-select>
+                  </div>
+              </a-form-item>
+              <a-form-item class="form-item-style" style="width:300px;" label="时间范围" name="staffTime">
+                <a-range-picker
+                  v-model="orgTime"
+                  class="set-range-picker"
+                  separator="→"
+                  format="YYYY/MM/DD"
+                  valueFormat="YYYY-MM-DD"
+                >
+                </a-range-picker>
+              </a-form-item>
+              <div style="display: flex;align-items:center;justify-content: center;margin-bottom: 1px;">
+                <a-button style="margin-right: 8px;" @click="handleResetClick(2)">重置</a-button>
+                <a-button type="primary" @click="handleSearchClick(2)">查询</a-button>
+              </div>
+            </a-form>
+          </div>
+          <bar-echart-one isOrg :barXData="barXOrgData" :barData="barOrgDataNew"></bar-echart-one>
         </div>
         <div class="table-style">
           <div>
@@ -42,6 +112,22 @@
           </rx-grid>-->
         </div>
       </rx-fit>
+      <a-modal
+        v-model="showAuditFlag"
+        class="chooseAuthor"
+        width="800"
+        :title="isOrgOrUser == 1 ? '员工选择' : '组织选择'"
+        centered
+        okText="保存"
+        @ok="handleSaveOk"
+      >
+        <org-people
+          ref="orgModalRef"
+          :isOnlyOrg="isOrgOrUser == 1 ? true : false"
+          :key="new Date().getTime()" 
+          style="width: 800px; height: 600px"
+        ></org-people>
+      </a-modal>
     </div> 
   </rx-layout>
 </template>
@@ -52,18 +138,25 @@ import pieChange from './components/pieChange'
 import lineEchart from './components/LineEchart';
 import roseEchart from './components/RoseEchart';
 import pieEchart from './components/PieEchart';
+import barEchartOne from './components/BarEchartOne';
 import statistics from '@/api/knowledge/statistics'
 import DataShow from './components/DataShow';
+import orgPeople from './components/orgPeople'
+import mixin from "./sMixin/statisticsMixin"
+const searchMixin = new mixin('personSearch')
 export default {
   name: 'synthesize',
   components: {
     topNav,
     lineEchart,
     roseEchart,
+    barEchartOne,
     pieEchart,
     pieChange,
-    DataShow
+    DataShow,
+    orgPeople
   },
+  mixins:[ searchMixin ],
   data() {
     return {
       peitype:0,
@@ -83,6 +176,8 @@ export default {
     }
   },
   mounted() {
+    document.getElementsByClassName('ant-form-item-control-wrapper')[0].style.width = '70%'
+    document.getElementsByClassName('ant-form-item-control-wrapper')[2].style.width = '70%'
     this.$refs.pieChange.changeType(1)
     statistics.organizationSearchsColumns({params:{type: "month"}}).then(res => {
       res.result.columns.forEach(element => {
@@ -194,6 +289,36 @@ export default {
       }
     }
   }
+ .bar-style {
+    height: 400px;
+    background:#fff;
+    position: relative;
+    display: flex;
+    align-items: flex-end;
+    margin: 10px 0 20px;
+
+    >div:first-child {
+      position: absolute;
+      top: 8%;
+      left: 2.3%;
+      font-weight: bold;
+
+        span {
+        position: absolute;
+        top: 25%;
+        font-size: 12px;
+        font-weight: 400;
+        margin-left: 8px;
+      }
+    }
+
+    .staff-style {
+      position: absolute;
+      top: 3.3%;
+      left: 15%;
+      z-index: 100;
+    }
+  }
 
   .table-style {
     width: 100%;

+ 33 - 6
src/views/modules/knowledge/warehouse/components/orgPeople.vue

@@ -62,11 +62,11 @@
             <rx-grid
                 ref="table"
                 style="height:90%!important"
-                :bordered="isBorder"
+                bordered
                 :allowRowSelect="true"
                 :columns="columns"
                 :defaultPageSize="10"
-                url="/api-user/user/org/osUser/getAllUserByGroupId"
+                :url="urls"
                 :queryParam="queryParam"
                 data-field="result.data"
                 :pageSizeOptions="[10,30,40]"
@@ -103,10 +103,15 @@
         organizationIdsInfo: {
             type: Object,
             default: () => {}
+        },
+        isKnowledgeManage: {
+            type: Boolean,
+            default: false
         }
     },
     data() {
       return {
+            urls: '',
             params: {
                 name: '',
                 userNo: ''
@@ -199,6 +204,12 @@
         }
     },
     created() {
+       if(this.isKnowledgeManage) {
+            this.urls = '/api-knowledge/knowledge/getAllUserByGroupId'
+            this.queryParam.status = ''
+       } else {
+            this.urls = '/api-user/user/org/osUser/getAllUserByGroupId'
+       }
        this.init()
     },
     methods: {
@@ -306,9 +317,11 @@
         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)
+                if(!this.isKnowledgeManage) {
+                    this.checkedTarget['approverId'] = node.groupId
+                    this.checkedTarget['approverName'] = node.title
+                    this.$emit('transCheckedTarget',this.checkedTarget)
+                }
             } 
             // else {
             //     let organizationTree = getParentNode(e.node)
@@ -342,7 +355,11 @@
             this.$emit('transCheckedTargets',this.checkedTargets)
         },
         onSelectChange(keys,rows) {
-            this.checkedTarget['approverId'] = rows[0].userNo
+            if(this.isKnowledgeManage) {
+                this.checkedTarget['approverId'] = rows[0].userId
+            } else {    
+                this.checkedTarget['approverId'] = rows[0].userNo
+            }
             this.checkedTarget['approverName'] = rows[0].fullName
             this.$emit('transCheckedTarget',this.checkedTarget)
         },
@@ -400,6 +417,16 @@
 <style scoped>
 /deep/ .ant-card-head-title {
     padding: 0;
+}
+ /deep/.ant-table-thead > tr > th {
+  text-align: center; 
+  height: 37.8px!important;
+}
+/deep/ .ant-table-tbody > tr > td {
+  height: 37.8px!important;
+}
+/deep/ .gridContent{
+  border: 1px solid #ddd!important;
 }
 </style>
 

+ 65 - 15
src/views/modules/knowledge/warehouse/knowledgeAddUpdate.vue

@@ -8,6 +8,7 @@
             <a-form-model ref="knowledgeRef" :model="knowledgeForm" :rules="knowledgeRules" layout="inline" hideRequiredMark>
               <a-form-model-item v-if="knowledgeForm.categoryId" label="*所选分类:" prop="categoryId">
                 <a-cascader v-model="knowledgeForm.categoryId" 
+                  v-if="!$route.query.isEdit"
                   class="scroll-ckunk"
                   :popupStyle="{
                     maxWidth: widthVar + 'px',
@@ -20,6 +21,18 @@
                   placeholder="请选择"
                   changeOnSelect
                   @change="dropdownVisibleChange" />
+                <a-cascader v-model="knowledgeForm.categoryId" 
+                  v-else
+                  class="scroll-ckunk"
+                  :popupStyle="{
+                    maxWidth: widthVar + 'px',
+                    'overflow-x': 'auto'
+                  }"
+                  :options="classifyList" 
+                  :fieldNames="{ label: 'name', value: 'pkId', children: 'children' }"
+                  placeholder="请选择"
+                  changeOnSelect
+                  @change="dropdownVisibleChange" />
               </a-form-model-item>
               <a-form-model-item label="*知识类型:" prop="type">
                 <a-select v-model="knowledgeForm.type" placeholder="请选择" :disabled="!!pkId">
@@ -40,10 +53,18 @@
                 <a-input v-model="knowledgeForm.summary" :disabled="!!$route.query.show" type="textarea" :autosize="{minRows: 3, maxRows: 6}" placeholder="请输入(建议100个汉字以内)" />
               </a-form-model-item>
               <!-- 知识管理与审核管理查看时 为true-->
-              <a-form-model-item label="编辑正文:" prop="content">
-                <editor class="editorBox" :disabled="!!$route.query.show" :value.sync="knowledgeForm.content"></editor>
+              <a-form-model-item prop="content" v-if="!pkId || !!$route.query.isEdit">
+                <span slot="label">&ensp;编辑正文</span>
+                <editor  class="editorBox" :value.sync="knowledgeForm.content"></editor>
               </a-form-model-item>
-              <a-form-model-item label="上传附件:" prop="attachment" v-if="!knowledgeForm.attachment">
+              <template v-else>
+                <a-form-model-item prop="content" v-if="knowledgeForm.content">
+                  <span slot="label">&ensp;编辑正文</span>
+                  <div  class="centent-style"  v-html="knowledgeForm.content"></div>
+                </a-form-model-item>
+              </template>
+              <a-form-model-item prop="attachment" v-if="!knowledgeForm.attachment">
+                <span slot="label">&ensp;上传附件</span>
                 <span v-if="!!$route.query.show">未上传附件</span>
                 <a-upload-dragger
                   v-else
@@ -72,13 +93,14 @@
               <!-- <a-form-model-item label="上传附件:" prop="accessory"> -->
                 <!-- <vab-only-office :option='option' officeHeight="800"></vab-only-office> -->
               <!-- </a-form-model-item> -->
-              <a-form-model-item label="附件下载" prop="pass" v-else>
+              <a-form-model-item prop="pass" v-else>
+                <span slot="label">&ensp;附件下载</span>
                 <div class="accessory-show">
                   <img :src="wordIcon" alt="">
                   <span style="">{{ knowledgeForm.attachmentName }}</span>
-                  <rx-button class="clearBtn" :butn-icon="'none'" @click="handleShowClick">查看</rx-button>
-                  <rx-button class="clearBtn" :butn-icon="'none'" v-if="(type == 'knowledgeManageList') && !$route.query.show" @click="handleFileDelClick">删除</rx-button>
-                  <rx-button class="clearBtn" :butn-icon="'none'" @click="handleFileDownloadClick">下载</rx-button>
+                  <a class="clearBtn" @click="handleShowClick">查看</a>
+                  <a class="clearBtn" v-if="(type == 'knowledgeManageList') && !$route.query.show" @click="handleFileDelClick">删除</a>
+                  <a class="clearBtn" @click="handleFileDownloadClick">下载</a>
                 </div>
               </a-form-model-item>
               <template v-if="showOnlyOffice">
@@ -86,7 +108,8 @@
               </template>  
               <!-- 审核管理 审核时-->
               <template v-if="!!$route.query.isAudit && (type == 'auditManageList')">
-                <a-form-model-item label="知识审批:" style="font-size:16px;">
+                <a-form-model-item style="font-size:16px;">
+                  <span slot="label">&ensp;知识审批</span>
                   <div style="width:100%;box-sizing:border-box;margin-bottom: 16px;">
                     <a-radio-group v-model="auditForm.result">
                       <a-radio value="1">通过</a-radio>
@@ -101,17 +124,24 @@
               <!-- 最终节点审 核时 -->
               <!-- <a-form-model-item v-if="(isShowOrg || (type == 'knowledgeManageList' && !this.$route.query.show)) && (knowledgeForm.type == 1 || !knowledgeForm.type)" prop="actualApproverName"> -->
               <!-- <a-form-model-item v-if="!$route.query.isLook && (knowledgeForm.type == 1 || !knowledgeForm.type)" prop="actualApproverName"> -->
-              <a-form-model-item v-if="(knowledgeForm.type == 1 || !knowledgeForm.type)" prop="actualApproverName">
-                <span slot="label">&emsp;&emsp;权限</span>
-                <div @click="handleAuthClickshow">
-                  <a-select :disabled="!isAuth" v-model="authName" :showArrow="false" :open="false" placeholder="请选择组织部门、职系、职称等授予知识访问权限"></a-select>
-                </div>
-              </a-form-model-item>
+              <!-- 新增编辑和最终审核authName 为空时也要展示-->
+              <template v-if="((knowledgeForm.type == 1 || !knowledgeForm.type) && !$route.query.isEdit && !!pkId && !isShowOrg && !authName) || (isShowOrg && !authName && $route.query.isLook)">
+
+              </template>
+              <template v-else>
+                <a-form-model-item v-if="(knowledgeForm.type == 1 || !knowledgeForm.type)" prop="actualApproverName">
+                  <span slot="label">&emsp;&emsp;&ensp;权限</span>
+                  <div @click="handleAuthClickshow">
+                    <a-select :disabled="!isAuth" v-model="authName" :showArrow="false" :open="false" placeholder="请选择组织部门、职系、职称等授予知识访问权限"></a-select>
+                  </div>
+                </a-form-model-item>
+              </template>
               <a-row :gutter="24" type="flex" justify="end" style="margin-top: 20px;padding-right:12px;">
                 <a-button style="margin-right: 20px;" @click="goBack">取消</a-button>
                 <a-button v-if="!!$route.query.isAudit || !pkId" type="primary" @click="handleSaveClick" :loading="saveLoading">保存</a-button>
               </a-row>
-              <a-form-model-item label="审批流程:" style="font-size:16px;">
+              <a-form-model-item style="font-size:16px;">
+                <span slot="label">&ensp;审批流程</span>
                 <div style="width:100%;box-sizing:border-box;margin-top:4px;">
                   <a-table :columns="approverColumns" :data-source="approverData" :pagination="false">
                   </a-table>
@@ -270,6 +300,7 @@ export default {
     }
   },
   created() {
+    console.log(!this.$route.query.isEdit)
     this.knowledgeForm = Object.assign({},this.$options.data().knowledgeForm)
     this.auditForm = Object.assign({},this.$options.data().auditForm)
     let pkId = this.$route.query.pkId
@@ -334,9 +365,14 @@ export default {
         // 待最终节点审批
         this.isShowOrg = res.data.approvalStatus == 3 ? true : false
         this.isAuth = this.isShowOrg
+        // 编辑
         if(this.$route.query.isEdit) {
           this.isAuth = true
         }
+        // 查看
+        if(this.$route.query.isLook) {
+          this.isAuth = false
+        }
       })
     } else {
       this.pkId = ''
@@ -646,7 +682,16 @@ export default {
   border: none;
   box-shadow: none;
 }
+.centent-style {
+  border:1px solid #c9d8db;
+  border-radius:5px;
+  padding:0 20px 0 12px;
+  background:#f5f5f5;
+  cursor:not-allowed;
+  color:rgba(0, 0, 0, 0.25);
 
+  
+}
 </style>
 <style scoped>
 /deep/ .ant-upload.ant-upload-drag {
@@ -662,4 +707,9 @@ export default {
 /deep/ .ant-cascader-menu:last-child {
   margin-right: 0;
 }
+</style>
+<style>
+.centent-style img {
+  max-width:100%;
+}
 </style>

+ 264 - 130
src/views/modules/knowledge/warehouse/knowledgeManageList.vue

@@ -1,65 +1,68 @@
 <template>
   <rx-layout>
     <div slot="center" style>
-      <rx-fit>   
+      <rx-fit>
         <div slot="toolheader" border="false" foldbtn="false">
           <breadcrumb firstLevel="知识仓库管理" lastLevel="知识管理" />
           <div class="mainContent">
-            <div class="body" :style="{'padding-right': $store.state.appSetting.collapsed ? '0px' : '20px' }">
+            <div class="body" :style="{ 'padding-right': $store.state.appSetting.collapsed ? '0px' : '20px' }">
               <div class="content">
-                <a-form ref="searchForm" layout="inline" style="display:flex;flex-wrap:wrap;">
-                  <a-form-item
-                    class="form-item-style"
-                    label="知识标题"
-                    name="titles">
-                    <a-input class="set-input" v-model="queryParam.titles" placeholder="请输入"/>
+                <a-form ref="searchForm" layout="inline" style="display: flex; flex-wrap: wrap">
+                  <a-form-item class="form-item-style" label="知识标题" name="titles">
+                    <a-input class="set-input" v-model="queryParam.titles" placeholder="请输入" />
                   </a-form-item>
-                  <a-form-item
-                    class="form-item-style"
-                    label="知识类型"
-                    name="type">
-                    <a-select class="set-input" v-model="queryParam.type" placeholder="请选择" allowClear :getPopupContainer="triggerNode => { return triggerNode.parentNode }">
-                      <a-select-option v-for="(item,index) in knowledgeList" :key="index" :value="item.value">
-                        {{item.label}}
+                  <a-form-item class="form-item-style" label="知识类型" name="type">
+                    <a-select
+                      class="set-input"
+                      v-model="queryParam.type"
+                      placeholder="请选择"
+                      allowClear
+                      :getPopupContainer="
+                        (triggerNode) => {
+                          return triggerNode.parentNode
+                        }
+                      "
+                    >
+                      <a-select-option v-for="(item, index) in knowledgeList" :key="index" :value="item.value">
+                        {{ item.label }}
                       </a-select-option>
                     </a-select>
                   </a-form-item>
-                  <a-form-item
-                    class="form-item-style"
-                    label="作者"
-                    name="author" >
+                  <a-form-item class="form-item-style" label="作者" name="author">
                     <a-input class="set-input" v-model="queryParam.author" placeholder="请输入" />
                   </a-form-item>
-                  <a-form-item
-                    class="form-item-style"
-                    label="所属分类"
-                    name="categoryIds">
-                    <a-cascader v-model="categoryIds" 
-                              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-form-item class="form-item-style" label="所属分类" name="categoryIds">
+                    <a-cascader
+                      v-model="categoryIds"
+                      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-form-item>
-                  <a-form-item
-                    class="form-item-style"
-                    label="创建时间"
-                    name="createTime" >
-                    <a-range-picker v-model="createTime" 
-                                    class="set-range-picker" 
-                                    separator="→"
-                                    format="YYYY/MM/DD"
-                                    valueFormat="YYYY-MM-DD"
-                                    @change="handleClearTimeChange">
+                  <a-form-item class="form-item-style" label="创建时间" name="createTime">
+                    <a-range-picker
+                      v-model="createTime"
+                      class="set-range-picker"
+                      separator="→"
+                      format="YYYY/MM/DD"
+                      valueFormat="YYYY-MM-DD"
+                      @change="handleClearTimeChange"
+                    >
                     </a-range-picker>
                   </a-form-item>
-                  <div style="display:flex;justify-content:center;margin-top: 8px;">
+                  <div style="display: flex; justify-content: center; margin-top: 8px">
                     <a-button @click="handleResetClick(true)">重置</a-button>
                     <a-button type="primary" @click="handleSearchClick">查询</a-button>
                   </div>
@@ -138,11 +141,19 @@
                   </div> -->
                 </a-form>
                 <rx-button alias="knowAdd" :butn-icon="'false'" @click="handleAddKnowledgeClick">新增知识</rx-button>
-                <rx-button :class="{'knowledge-manage':num != 0}" :data-attr="num" alias="knowProcess" :butn-icon="'false'" @click="handleJumpPathClick">知识审核</rx-button>
+                <rx-button
+                  :class="{ 'knowledge-manage': num != 0 }"
+                  :data-attr="num"
+                  alias="knowProcess"
+                  :butn-icon="'false'"
+                  @click="handleJumpPathClick"
+                  >知识审核</rx-button
+                >
+                <rx-button alias="reauthor" :butn-icon="'false'" @click="handleReauthorShowClick">批量改派作者</rx-button>
               </div>
             </div>
           </div>
-        </div>    
+        </div>
 
         <rx-grid
           ref="manageRef"
@@ -154,49 +165,107 @@
           data-field="result.data"
           :defaultPageSize="10"
           :heightAuto="true"
-          :pageSizeOptions="['10','20','30','40']"
+          :pageSizeOptions="['10', '20', '30', '40']"
           idField="pkId"
-        > 
-          <template slot="titles" slot-scope="{text}">
+        >
+          <template slot="titles" slot-scope="{ text }">
             <div style="white-space: pre-line">{{ text }}</div>
           </template>
-          <template slot="type" slot-scope="{text}">
+          <template slot="type" slot-scope="{ text }">
             <div>{{ text == 1 ? '文档知识' : '维基知识' }}</div>
           </template>
-          <template slot="knowledgeCategoryAdminVo" slot-scope="{text}">
+          <template slot="knowledgeCategoryAdminVo" slot-scope="{ text }">
             <div style="white-space: pre-line">{{ getCategory(text) }}</div>
           </template>
-          <template slot="action" slot-scope="{text,record}">
-            <template v-if="record.approvalStatus == 2 || record.approvalStatus == 4 || record.approvalStatus == 5" >
-              <rx-button class="clearBtn" alias="knowEdit" :butn-icon="'none'"  @click="handleJumpUpdateClick(record)">编辑</rx-button>
+          <template slot="action" slot-scope="{ text, record }">
+            <template v-if="record.approvalStatus == 2 || record.approvalStatus == 4 || record.approvalStatus == 5">
+              <rx-button class="clearBtn" alias="knowEdit" :butn-icon="'none'" @click="handleJumpUpdateClick(record)"
+                >编辑</rx-button
+              >
               <!-- <rx-button class="clearBtn" alias="bannerUpdate" :butn-icon="'none'" @click="handleJumpUpdateClick(record)">编辑</rx-button> -->
-              <rx-button class="clearBtn" alias="knowDel" :butn-icon="'none'" @click="handleDeleteClick(record)">删除</rx-button>
+              <rx-button class="clearBtn" alias="knowDel" :butn-icon="'none'" @click="handleDeleteClick(record)"
+                >删除</rx-button
+              >
             </template>
             <template v-else>
-              <rx-button class="clearBtn" alias="knowShow" :butn-icon="'none'" @click="handleJumpUpdateClick(record,true)">查看</rx-button>
+              <rx-button
+                class="clearBtn"
+                alias="knowShow"
+                :butn-icon="'none'"
+                @click="handleJumpUpdateClick(record, true)"
+                >查看</rx-button
+              >
             </template>
           </template>
-
         </rx-grid>
       </rx-fit>
-    </div> 
+      <a-modal
+        v-model="reauthorShow"
+        title="批量改派作者"
+        centered
+        okText="保存"
+        @ok="handleOk"
+        :confirmLoading="saveLoading"
+      >
+        <a-form ref="labelRef" :model="authorForm" layout="inline">
+          <a-form-item label="原作者:" prop="authors">
+            <div @click="handleReauthorShow(1)">
+              <a-select
+                v-model="authorForm.authorsName"
+                :showArrow="false"
+                :open="false"
+                placeholder="请选择"
+              ></a-select>
+            </div>
+          </a-form-item>
+          <a-form-item label="改派作者:" prop="arriveAuthor" style="margin-top: 10px">
+            <div @click="handleReauthorShow(2)">
+              <a-select
+                v-model="authorForm.arriveAuthorName"
+                :showArrow="false"
+                :open="false"
+                placeholder="请选择"
+              ></a-select>
+            </div>
+          </a-form-item>
+        </a-form>
+      </a-modal>
+      <a-modal
+        v-model="showAuditFlag"
+        class="chooseAuthor"
+        width="1100"
+        title="选择作者"
+        centered
+        okText="保存"
+        @ok="handleSaveOk"
+      >
+        <org-people
+          isKnowledgeManage
+          :key="new Date().getTime()" 
+          style="width: 1100px; height: 540px"
+          @transCheckedTarget="transCheckedTarget"
+        ></org-people>
+      </a-modal>
+    </div>
   </rx-layout>
 </template>
 
 <script>
 import breadcrumb from '../components/breadcrumb'
+import orgPeople from './components/orgPeople'
 import api from '@/api/knowledge/manage'
 import classApi from '@/api/knowledge/classify'
-import { getCategory,getCategoryId } from '../aJs/getClassifyTree'
-import mixin from "../aMixin/mixin"
-import initMixin from "../aMixin/initMixin"
+import { getCategory, getCategoryId } from '../aJs/getClassifyTree'
+import mixin from '../aMixin/mixin'
+import initMixin from '../aMixin/initMixin'
 const manageMixin = new mixin('manage')
 export default {
   name: 'knowledgeManageList',
   components: {
-    breadcrumb
+    breadcrumb,
+    orgPeople,
   },
-  mixins: [ initMixin, manageMixin ],
+  mixins: [initMixin, manageMixin],
   data() {
     return {
       api,
@@ -209,7 +278,7 @@ export default {
         categoryId: '',
         beginTime: '',
         endTime: '',
-        approvalStatus: 5
+        approvalStatus: 5,
       },
       createTime: [],
       categoryIds: [],
@@ -218,39 +287,39 @@ export default {
           title: 'ID',
           dataIndex: 'pkId',
           align: 'center',
-          width: 200
+          width: 200,
         },
         {
           title: '知识标题',
           dataIndex: 'titles',
           align: 'center',
-          scopedSlots: {customRender: 'titles'},
+          scopedSlots: { customRender: 'titles' },
         },
         {
           title: '知识类型',
           dataIndex: 'type',
           align: 'center',
           width: 100,
-          scopedSlots: {customRender: 'type'}
+          scopedSlots: { customRender: 'type' },
         },
         {
           title: '所属分类',
           dataIndex: 'knowledgeCategoryAdminVo',
           align: 'center',
           width: 150,
-          scopedSlots: {customRender: 'knowledgeCategoryAdminVo'}
+          scopedSlots: { customRender: 'knowledgeCategoryAdminVo' },
         },
         {
           title: '访问量',
           dataIndex: 'views',
           align: 'center',
-          width: 100
+          width: 100,
         },
         {
           title: '作者',
           dataIndex: 'author',
           align: 'center',
-          width: 100
+          width: 100,
         },
         {
           title: '创建时间',
@@ -261,46 +330,60 @@ export default {
           title: '操作人',
           dataIndex: 'operatorName',
           align: 'center',
-          width: 100
+          width: 100,
         },
         {
           title: '操作时间',
           dataIndex: 'updateTime',
           align: 'center',
         },
-        { 
+        {
           title: '操作',
-          dataIndex: 'action', 
+          dataIndex: 'action',
           // align: 'center',
-          scopedSlots: {customRender: 'action'},
-          width: 120
-        }
+          scopedSlots: { customRender: 'action' },
+          width: 120,
+        },
       ],
       knowledgeList: [
-        {value: null, label: '全部'},
-        {value: '1', label: '文档知识'},
-        {value: '2', label: '维基知识'}
+        { value: null, label: '全部' },
+        { value: '1', label: '文档知识' },
+        { value: '2', label: '维基知识' },
       ],
       num: 0,
       classifyList: [],
-      widthVar: 800
+      reauthorShow: false,
+      reauthorFlag: 1,
+      saveLoading: false,
+      showAuditFlag: false,
+      approverData: {
+        approverId: '',
+        approverName: ''
+      },
+      authorForm: {
+        authors: undefined,
+        authorsName: undefined,
+        arriveAuthor: undefined,
+        arriveAuthorName: undefined,
+      },
+      widthVar: 800,
     }
   },
   activated() {
-    if(localStorage.getItem('cancle')=='true'){
-      localStorage.setItem('cancle',false)
-    }else{
+    if (localStorage.getItem('cancle') == 'true') {
+      localStorage.setItem('cancle', false)
+    } else {
       this.reloadTable()
     }
   },
   async created() {
     this.init()
     this.getAuditNum()
-    if(this.$route.query.pkId) {
+    if (this.$route.query.pkId) {
       this.queryParam.categoryId = this.$route.query.pkId
       let res = await this.classApi.findAllParentByCategoryId(this.$route.query.pkId)
-      let gategoryId 
-      if(!res.data.parents) {
+      let gategoryId
+      if (!res.data.parents) {
         gategoryId = [this.queryParam.categoryId]
       } else {
         gategoryId = getCategoryId(res.data.parents)
@@ -316,9 +399,9 @@ export default {
     setTimeout(() => {
       let offsetWidth = document.querySelector('.scroll-ckunk').getBoundingClientRect().left
       this.widthVar = innerWidth - offsetWidth - 40
-    }, 1000);
-    document.onclick=function(element){
-      if(element.target.className.indexOf('ant-cascader-menu-item')>-1){
+    }, 1000)
+    document.onclick = function (element) {
+      if (element.target.className.indexOf('ant-cascader-menu-item') > -1) {
         document.querySelector('.ant-cascader-menus').scrollLeft = 20480
       }
     }
@@ -329,7 +412,6 @@ export default {
         }
       })
     }, 1000)*/
-   
   },
   methods: {
     getCategory,
@@ -338,69 +420,112 @@ export default {
       this.num = num.data < 99 ? num.data : 99
     },
     handleSearchClick() {
-      if(this.createTime && this.createTime.length) {
+      if (this.createTime && this.createTime.length) {
         this.queryParam.beginTime = this.createTime[0]
         this.queryParam.endTime = this.createTime[1]
       }
-      if(this.categoryIds && this.categoryIds.length) {
+      if (this.categoryIds && this.categoryIds.length) {
         this.queryParam.categoryId = this.categoryIds.slice('-1')[0]
       }
       this.reloadTable()
     },
+    handleReauthorShowClick() {
+      this.authorForm = Object.assign({},this.$options.data().authorForm)
+      this.reauthorShow = true
+    },
+    handleReauthorShow(arg) {
+      this.reauthorFlag = arg
+      this.showAuditFlag = true
+    },
+    transCheckedTarget(arg) {
+        this.approverData.approverId = arg.approverId
+        this.approverData.approverName = arg.approverName
+    },
+    handleOk() {
+      if(!this.authorForm.authorsName) {
+        this.$message.error("请选择原作者");
+        return
+      }
+      if(!this.authorForm.arriveAuthorName) {
+        this.$message.error("请选择改派作者");
+        return
+      }
+      let info = {
+        authors: this.authorForm.authors,
+        arriveAuthor: this.authorForm.arriveAuthor
+      }
+      api.transferAuthor(info).then(res => {
+        if(res.code == 200) {
+          this.reauthorShow = false
+          this.reloadTable()
+        }
+      })
+    },
+    handleSaveOk() {
+      if(this.reauthorFlag == 1) {
+        this.authorForm.authors = [this.approverData.approverId]
+        this.authorForm.authorsName = this.approverData.approverName
+      } else {
+        this.authorForm.arriveAuthor = this.approverData.approverId
+        this.authorForm.arriveAuthorName = this.approverData.approverName
+      }
+      this.showAuditFlag = false
+      this.approverData = Object.assign({},this.$options.data().approverData)
+    },
     // 跳转审核管理
     handleJumpPathClick() {
       this.$router.push({
         path: '/knowledge/auditManageList',
-        query: { showUnchecked: true }
+        query: { showUnchecked: true },
       })
     },
     handleAddKnowledgeClick() {
-        this.$router.push({
+      this.$router.push({
         path: '/knowledge/knowledgeAddUpdate',
-        query: { isAuth: true }
+        query: { isAuth: true },
       })
     },
     // 编辑
-    handleJumpUpdateClick(record,arg) {
+    handleJumpUpdateClick(record, arg) {
       let query = {}
       // 查看
-      if(arg) {
+      if (arg) {
         query = {
-          pkId: record.pkId, 
-          type: 'knowledgeManageList', 
-          show: arg
+          pkId: record.pkId,
+          type: 'knowledgeManageList',
+          show: arg,
         }
       } else {
         // 编辑
         query = {
-          pkId: record.pkId, 
-          type: 'knowledgeManageList', 
+          pkId: record.pkId,
+          type: 'knowledgeManageList',
           show: false,
           isAudit: true,
-          isEdit: true
+          isEdit: true,
         }
       }
       this.$router.push({
         path: '/knowledge/knowledgeAddUpdate',
-        query: query
+        query: query,
       })
     },
     // 重新加载表格
     reloadTable() {
       this.$refs.manageRef.loadData()
     },
-  }
+  },
 }
 </script>
 
 <style lang="less" scoped>
-@gary:  #f8f8f8;
+@gary: #f8f8f8;
 @white: #fff;
 .rx-fit {
-  padding: 40px!important;
+  padding: 40px !important;
   background: @gary;
-  overflow-y: auto!important;
-  display: block!important;
+  overflow-y: auto !important;
+  display: block !important;
   .fit-header {
     .mainContent {
       width: 100%;
@@ -414,7 +539,7 @@ export default {
             margin-right: 20px;
           }
 
-          >button {
+          > button {
             margin: 10px;
             margin-left: 0;
           }
@@ -428,7 +553,7 @@ export default {
 
     .clearBtn {
       background: none;
-      color: #3294F7;
+      color: #3294f7;
       text-shadow: none;
       padding: 0px 6px;
       border: none;
@@ -450,51 +575,60 @@ export default {
   border-radius: 50%;
 }
 
-.show-other{
-	width: 100%;
-	animation:show-other-search 0.8s;
+.show-other {
+  width: 100%;
+  animation: show-other-search 0.8s;
 }
 .form-item-style {
   margin: 5px 20px 5px 0;
 }
 .set-input {
-  width:180px;
+  width: 180px;
 }
 .set-select {
-  width:120px;
+  width: 120px;
 }
 .set-range-picker {
-  width:230px!important;
+  width: 230px !important;
 }
-@keyframes show-other-search{
-	0%{opacity:0;}
-  50%{opacity:0.8;}
-	100%{opacity: 1;}
+@keyframes show-other-search {
+  0% {
+    opacity: 0;
+  }
+  50% {
+    opacity: 0.8;
+  }
+  100% {
+    opacity: 1;
+  }
 }
 </style>
 
 <style scoped>
-/deep/   .divdefault {
-  position: inherit!important;
+/deep/ .divdefault {
+  position: inherit !important;
 }
 /deep/ .ant-btn > .anticon + span {
   margin-left: 0;
 }
- /deep/.ant-table-thead > tr > th {
-  text-align: center; 
+/deep/.ant-table-thead > tr > th {
+  text-align: center;
   height: 54px;
 }
 /deep/ .ant-table-tbody > tr > td {
   height: 54px;
 }
-/deep/ .ant-form{
+/deep/ .ant-form {
   padding: 0;
 }
-/deep/ .gridContent{
+/deep/ .gridContent {
   border: none;
 }
+.chooseAuthor /deep/.ant-modal-body {
+  padding: 0px;
+}
 /deep/ .ant-cascader-menus {
-  left: 0!important;
+  left: 0 !important;
 }
 /deep/ .ant-cascader-menu:last-child {
   margin-right: 0;