Zhang Li, BBF-411-2(Neusoft) 1 年之前
父节点
当前提交
d9f25a5e9a

+ 22 - 0
src/layouts/compoment/main/RightToolBar.vue

@@ -92,6 +92,12 @@
                             <span class="text">退出切换公司</span>
                         </a>
                     </a-menu-item>
+                    <!-- <a-menu-item @click="agentSetting">
+                        <a>
+                            <a-icon type="sliders" />
+                            <span class="text">设置代理人</span>
+                        </a>
+                    </a-menu-item> -->
                     <a-menu-item @click="handleLogout">
                         <a>
                             <a-icon type="logout" />
@@ -167,6 +173,7 @@ import {
     Util
 } from 'jpaas-common-lib'
 import OsUserEdit1 from '@/views/modules/user/org/OsUserEdit1'
+import agentPage from '@/views/modules/knowledge/warehouse/agent'
 import {
     mapActions,
     mapGetters,
@@ -480,6 +487,21 @@ export default {
                 function(action) {}
             )
         },
+        agentSetting() {
+            var self = this
+            let mainHeight = window.innerHeight
+            Util.open({
+                    component: agentPage,
+                    curVm: self,
+                    widthHeight:['950px',mainHeight*0.75+'px'],
+                    title: '设置代理人',
+                    data: {
+                        userId: self.user.userId
+                    },
+                },
+                function(action) {}
+            )
+        },
         getFilePath(fileId) {
             if (fileId && fileId != '') {
                 this.imgUrl = '/api/api-system/system/core/sysFile/previewFile?fileId=' + fileId

+ 7 - 5
src/views/modules/knowledge/statistics/album.vue

@@ -39,7 +39,7 @@
           </div>
           <div class="staff-style">
             <a-form ref="searchForm" layout="inline" class="staff-form">
-              <a-form-item class="form-item-style" style="width:32%;" label="查询选项" name="staff">
+              <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)"  @mouseover="mouseOver(1)" @mouseleave="mouseLeave">
                   <div v-if="iconShowOne" style="position:absolute;z-index: 10;right:8px;cursor:pointer;" @click.stop="handleCloseClick(1)">
@@ -69,7 +69,7 @@
               </div>
             </a-form>
           </div>
-          <bar-echart-one :barXData="barXUserData" :barData="barUserDataNew"></bar-echart-one>
+          <bar-echart-one isOrg="1" :barXData="barXUserData" :barData="barUserDataNew" @downloadClick="downloadClick"></bar-echart-one>
         </div>
          <div class="bar-style">
           <div>
@@ -77,7 +77,7 @@
           </div>
           <div class="staff-style">
             <a-form ref="searchForm" layout="inline" class="staff-form">
-              <a-form-item class="form-item-style" style="width:32%" label="查询选项" name="staff">
+              <a-form-item class="form-item-style" style="width:240px" label="查询选项" name="staff">
                 <!-- <a-input class="set-input" v-model="staffForm.staff" placeholder="请选择要查询的员工" /> -->
                 <div style="position:relative;" @click="handleAuditShow(2)" @mouseover="mouseOver(2)" @mouseleave="mouseLeave">
                   <div v-if="iconShowTwo" style="position:absolute;z-index: 10;right:8px;cursor:pointer;" @click.stop="handleCloseClick(2)">
@@ -107,7 +107,7 @@
               </div>
             </a-form>
           </div>
-          <bar-echart-one isOrg :barXData="barXOrgData" :barData="barOrgDataNew"></bar-echart-one>
+          <bar-echart-one isOrg="2" :barXData="barXOrgData" :barData="barOrgDataNew" @downloadClick="downloadClick"></bar-echart-one>
         </div>
         <div class="table-style">
           <div>
@@ -141,7 +141,6 @@
           ref="orgModalRef"
           :isOnlyOrg="isOrgOrUser == 1 ? true : false"
           :key="new Date().getTime()" 
-          style="width: 800px; height: 600px"
         ></org-people>
       </a-modal>
     </div> 
@@ -312,6 +311,9 @@ export default {
         this.tabStatus = flag
         this.gettotalUserVisits()
       }
+    },
+    downloadClick(arg) {
+      console.log(arg)
     }
   }
 }

+ 8 - 5
src/views/modules/knowledge/statistics/components/BarEchartOne.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="mainBox">
-    <lineChange ref="lineChangeRef" @typeChange="typeChange"></lineChange>
+    <lineChange ref="lineChangeRef" @typeChange="typeChange" :isOrg="isOrg" @downloadClick="downloadClick"></lineChange>
     <common-echart :option="option" height="100%"></common-echart>
   </div>
 </template>
@@ -24,8 +24,8 @@ export default {
       default: () => []
     },
     isOrg: {
-      type: Boolean,
-      default: false
+      type: String,
+      default: ''
     }
   },
   computed: {
@@ -106,11 +106,11 @@ export default {
               color: new echarts.graphic.LinearGradient(
                 0, 0, 0, 1, [{//代表渐变色从正上方开始
                     offset: 0, //offset范围是0~1,用于表示位置,0是指0%处的颜色 #ffc20d 黄色  #1890ff 蓝色
-                    color: this.isOrg ? '#ffc20d': '#1890ff'
+                    color: this.isOrg == 2 ? '#ffc20d': '#1890ff'
                   }, //柱图渐变色
                   {
                     offset: 1, //指100%处的颜色
-                    color: this.isOrg ? '#ffecb6' : '#afedfd'
+                    color: this.isOrg == 2 ? '#ffecb6' : '#afedfd'
                   }
                 ]
               )
@@ -138,6 +138,9 @@ export default {
       }else{
         this.lineType = 'bar'
       }
+    },
+    downloadClick(arg) {
+      this.$emit('downloadClick',arg)
     }
   }
 };

+ 17 - 1
src/views/modules/knowledge/statistics/components/lineChange.vue

@@ -10,13 +10,26 @@
       <template slot="title">
         <span style="color:#6d6d6d">切换为柱状图</span>
       </template>
-      <a-icon class="iconType" @click="changePeitype(2)" type="bar-chart" :style="{color:peitype==2?'#4285f4':'#6d6d6d','borderBottom': peitype==2?'1px solid #4285f4':'1px solid #6d6d6d'}"/>    </a-tooltip>
+      <a-icon class="iconType" @click="changePeitype(2)" type="bar-chart" :style="{color:peitype==2?'#4285f4':'#6d6d6d','borderBottom': peitype==2?'1px solid #4285f4':'1px solid #6d6d6d'}"/>    
+    </a-tooltip>
+    <!-- <a-tooltip placement="bottom" overlayClassName="tooltipBoxpieChange" v-if="isOrg">
+      <template slot="title">
+        <span style="color:#6d6d6d">下载</span>
+      </template>
+      <a-icon class="iconType" type="download" @click="handleDownloadClick" style="color:#6d6d6d;border-bottom:1px solid #6d6d6d;margin-left:10px;"/>
+    </a-tooltip> -->
   </div>
 </template>
 
 <script>
 export default {
   name: 'pieChange',
+  props: {
+    isOrg: {
+      type: String,
+      default: ''
+    }
+  },
   data() {
     return {
       peitype: 0
@@ -29,6 +42,9 @@ export default {
     },
     changeType(type){
       this.peitype=type
+    },
+    handleDownloadClick() {
+        this.$emit('downloadClick',this.isOrg)
     }
   }
 }

+ 171 - 57
src/views/modules/knowledge/statistics/components/orgPeople.vue

@@ -1,7 +1,8 @@
 <template>
-    <div style="height: 600px;">
+    <div style="width: 800px; height: 70vh;display:flex;flex-direction:column;">
         <a-form ref="searchForm" layout="inline" style="display: flex;justify-content: center;margin: 20px 20px 0 20px;height:50px;">
-            <a-form-item class="form-item-style" style="width:600px;" label="组织名称" name="staff">
+            <a-form-item class="orgName-style" style="width:800px;" name="staff">
+                <span slot="label">组织名称</span>
                 <a-input class="set-input" v-model="serachValue" placeholder="请输入" />
             </a-form-item>
             <div style="display: flex;height:40px;align-items:flex-start;justify-content: center;margin-top: 4px;">
@@ -9,30 +10,49 @@
                 <a-button type="primary" @click="handleSearchOrgClick">查询</a-button>
             </div>
         </a-form>
+        <!-- <a-form v-if="!isOnlyOrg" ref="searchForm" layout="inline" style="display: flex;justify-content: center;margin: 0 20px;height:50px;">
+            <a-form-item class="form-item-style" style="width:100%;" label="已选组织" name="staff">
+                <a-tag v-for="(item,index) in chooseTags" :key="index">{{ item.name }}</a-tag>
+            </a-form-item>
+        </a-form> -->
+        <div v-if="!isOnlyOrg" style="display: flex;align-items:center;justify-content: center;margin: 0 20px;"> 
+            <div class="chooseOrg-style" style="width:80px;color:rgba(0, 0, 0, 0.85);">已选组织</div>
+            <div style="flex:1;display: flex;align-items:center;flex-wrap:wrap;max-height:58px;overflow-y:scroll;">
+                <template v-if="chooseTags.length">
+                    <div style="border:1px solid #e8e8e8;padding: 2px 3px;margin: 1px 2px;border-radius:2px;" v-for="(item,index) in chooseTags" :key="index">{{ item.name }}</div>
+                </template>
+                <template v-else>
+                    <div>未选择组织</div>
+                </template>
+                <!-- <a-tag v-for="(item,index) in chooseTags" :key="index">{{ item.name }}</a-tag> -->
+            </div> 
+        </div>
+       <!-- 70 87 32 37.8 -->
         <div style="display:flex;width:100%;padding: 16px;">
             <template v-if="!isOnlyOrg">
-                <div style="width:100%;border:1px solid #e8e8e8;">
-                    <div class="rightDetailtop">组织名称</div>
-                     <div  style="height: 480px;overflow-y:auto;padding: 20px 0 0 20px;">
-                        <rx-tree
-                            :treeData="orgData"
-                            :async="true"
-                            v-model="checkedKeys"
-                            :loadByParent="onLoadGroupTree"
-                            multiSelect
-                            :showTreeIcon="true"
-                            :expandOnLoad="0"
-                            autoExpandParent="true"
-                            id-field="key"
-                            text-field="title"
-                            @check="check"
-                            parent-field="groupId"></rx-tree>
-                     </div>
+                <div style="width:100%;border:1px solid #e8e8e8;height:calc( 70vh - 150px );">
+                    <div class="rightDetailtop" style="text-align: center;">组织名称</div>
+                     <div  style="height:calc( 100% - 38.8px );overflow-y:auto;padding: 20px 0 0 20px;">
+                        <div v-for="(item,index) in orgDataTree" :key="index">
+                            <rx-tree
+                                :treeData="item.orgData"
+                                :async="true"
+                                v-model="item.checkedKeys"
+                                :loadByParent="treeNode => onLoadGroupTree(treeNode,index)"
+                                multiSelect
+                                :showTreeIcon="true"
+                                :expandOnLoad="0"
+                                id-field="key"
+                                text-field="title"
+                                @check="(selKeys, e) => check(selKeys, e,index)"
+                                parent-field="groupId"></rx-tree>
+                        </div>
+                    </div>
                 </div>
             </template>
             <rx-grid
                 v-if="isOnlyOrg"
-                style="height: 500px;overflow-y:auto;"
+                style="height: calc( 70vh - 108px );overflow-y:auto;"
                 :style="{width: isOnlyOrg ? '70%' : '100%'}"
                 ref="orgTable"
                 class="rx-tree-title"
@@ -51,16 +71,19 @@
                     <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:45%;height:500px;border: 1px solid #e8e8e8;border-left:none;">
-                <div class="rightDetailtop">员工姓名</div>
+            <div v-if="isOnlyOrg" style="width:45%;height:calc( 70vh - 108px );border: 1px solid #e8e8e8;border-left:none;">
+                <div class="rightDetailtop">
+                    <a-checkbox style="position:absolute;left:30px;" :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange"></a-checkbox>
+                    <div style="width:100%;text-align:center;">员工姓名</div> 
+                </div>
                 <!-- <a-checkbox-group name="checkboxgroup" :options="options1" v-model="value" @change="onChange" /> -->
-                <a-checkbox-group v-model="personId" style="width:100%;height: 400px;overflow-y: auto;">
-                    <a-checkbox v-for="(item) in userData" :style="radioStyle" :value="item.fullName + '/' + item.userId" :key="item.userId">
+                <a-checkbox-group v-model="personId" style="width:100%;height:calc( 70vh - 214px );overflow-y: auto;">
+                    <a-checkbox  v-for="(item) in userData" :style="radioStyle" :value="item.fullName + '/' + item.userId" :key="item.userId" @change="handleOnChange">
                         {{ item.fullName + '(' + item.userId + ')'}}
                     </a-checkbox>
                 </a-checkbox-group>
                 <!-- <div style="height:200px;border-top: 1px solid #e8e8e8;"> -->
-                <div v-if="userData.length" style="height:50px;display:flex;align-items:center;justify-content:center;">
+                <div v-if="userData.length" style="height:56px;display:flex;align-items:center;justify-content:center;border-top:1px solid #e8e8e8;">
                     <a-button icon="left" :disabled="queryParam.pageNo == 1" @click="handlePageNumChange('-')"></a-button>
                     <a-button icon="right" :disabled="(queryParam.pageNo*queryParam.pageSize) >= total" style="margin-left: 20px;" @click="handlePageNumChange('+')"></a-button>
                 </div>
@@ -115,8 +138,9 @@
             //     relTypeId: 1,
             //     groupId: ''
             // },
+            indeterminate: false,
+            checkAll: false,
             total: 0,
-            orgData: [],
             userId: '',
             visible: false,
             quitUserIds: [],
@@ -150,6 +174,12 @@
                 lineHeight: '40px',
                 marginLeft: '30px'
             },
+            chooseTags: [],
+            orgData: [],
+            orgDataTree: [{
+                checkedKeys: {checked:[]},
+                orgData: []
+            }],
             // 组织
             checkedTarget: {},
             // 组织架构(多选)
@@ -169,6 +199,51 @@
        }
     },
     methods: {
+        // 多选节点
+        check(selKeys, e, index) {
+            // console.log(this.orgDataTree[index].checkedKeys.checked)
+            if(e.checked) {
+                if(this.chooseTags.some(item => item.id == e.node.value)) {
+                    // console.log(selKeys)
+                    // console.log( this.orgDataTree[index].checkedKeys.checked)
+                    // this.orgDataTree[index].checkedKeys.checked.map((item,index) => {
+                    //     if(item.name == e.node.title) {
+                    //         this.orgDataTree[index].checkedKeys.checked.splice(index, 1);
+                    //     }
+                    // })
+                    // this.orgDataTree[index].checkedKeys.checked.remove(e.node.value)
+                    this.$message.error(`${e.node.title}已被选择`)
+                    return false
+                } else {
+                    this.orgDataTree[index].checkedKeys.checked = selKeys
+                    this.chooseTags.push({
+                        id: e.node.value,
+                        name: e.node.title
+                    })
+                }
+            } else {
+                let id = e.node.value
+                this.orgDataTree[index].checkedKeys.checked = selKeys
+                this.chooseTags.map((item,index) => {
+                    if (item.id.indexOf(id) > -1) {
+                        this.chooseTags.splice(index, 1);
+                    }
+                })
+            }
+
+            // this.chooseTags.push(e.checkedNodes.map(item => {
+            //     return {
+            //         id: item.key,
+            //         name: item.componentOptions.propsData.title
+            //     }
+            // }))
+            // this.checkedTargets = Object.assign({},this.$options.data().checkedTargets)
+            // this.checkedTargets.organizationId = selKeys
+            // for(let i of e.checkedNodes) {
+            //      this.checkedTargets.organizationName.push(i.data.props.title)
+            // }
+            // this.$emit('transCheckedTargets',this.checkedTargets)
+        },
         // 组织名称搜索
         handleSearchOrgClick() {
             if(this.serachValue==''){
@@ -203,7 +278,13 @@
                             var _isLeaf = rs.childAmount == 0 ? true : false;
                             temp.push({title: rs.name, groupId: rs.groupId, key: rs.key, isLeaf: _isLeaf})
                         }
-                        this.orgData = [...temp];
+
+                        console.log(this.orgDataTree)
+                        // this.orgData = [...temp];
+                        this.orgDataTree.push({
+                            checkedKeys: {checked:[]},
+                            orgData: [...temp]
+                        })
                     }
                     this.queryParam.params.groupId = ''
                     this.userData = []
@@ -215,13 +296,20 @@
         handleResetClick() {
             this.serachValue = ''
             this.getTreeData()
-            this.orgData = []
-            this.userData = []
-            this.queryParam.pageNo = 1
-            this.queryParam.pageSize = 10
-            this.personId = []
-            this.personIdArr = []
-            this.getOrgListByGroupId()
+            if(!this.isOnlyOrg) {
+                this.chooseTags = []
+                this.orgDataTree = [{
+                    checkedKeys: {checked:[]},
+                    orgData: []
+                }]
+            } else {
+                this.userData = []
+                this.queryParam.pageNo = 1
+                this.queryParam.pageSize = 10
+                this.personId = []
+                this.personIdArr = []
+                this.getOrgListByGroupId()
+            }
         },
         //组织结构
         getTreeData(){
@@ -237,7 +325,13 @@
                         var _isLeaf = rs.childAmount == 0 ? true : false;
                         temp.push({title: rs.name, groupId: rs.groupId, key: rs.key, isLeaf: _isLeaf})
                     }
-                    this.orgData = [...temp];
+                    // this.orgData = [...temp]
+                    this.orgDataTree[0].orgData =  [...temp]
+                    // this.orgDataTree.push({
+                    //     checkedKeys: {checked:[]},
+                    //     orgData: [...temp]
+                    // })
+                    console.log( this.orgDataTree)
                 }
             })
             //清除下拉的数据
@@ -288,29 +382,28 @@
             }
         },
         getOrgListByGroupId(arg = false) {
+            this.personId = []
             OsUserApi.getAllUserByGroupId(this.queryParam).then(res=> {
                 if(res.code == 200) {
                     this.userData = res.result.data.map(item => {
                         return {
                             fullName: item.fullName,
-                            userId: item.userNo != 'admin' ? item.userNo  : 1
+                            userId: item.userId
                         }
                     })
                     if(arg) {
                         this.personId = this.personIdArr[this.queryParam.pageNo-1]
+                        if(this.personId) {
+                            this.indeterminate = !!this.userData.length && this.userData.length < this.personId.length
+                            this.checkAll = this.userData.length === this.personId.length
+                        } else {
+                            this.indeterminate = false
+                            this.checkAll = false
+                        }
                     }
                     this.total = res.totalCount
                 }
             })
-            // OsRelInstApi.getUserListByGroupIdAndRelTypeId(this.queryParam).then(res => {
-            //     this.userData = res.data.map(item => {
-            //         return {
-            //             fullName: item.fullname,
-            //             userId: item.userNo != 'admin' ? item.userNo  : 1
-            //         }
-            //     })
-            //     this.total = res.count
-            // })
         },
         handlePageNumChange(arg) {
             this.personIdArr[this.queryParam.pageNo-1] = this.personId
@@ -321,14 +414,18 @@
             }
             this.getOrgListByGroupId(true)
         },
-         // 多选节点
-        check(selKeys, e) {
-            this.checkedTargets = Object.assign({},this.$options.data().checkedTargets)
-            this.checkedTargets.organizationId = selKeys
-            for(let i of e.checkedNodes) {
-                 this.checkedTargets.organizationName.push(i.data.props.title)
-            }
-            // this.$emit('transCheckedTargets',this.checkedTargets)
+        // 员工全选
+        onCheckAllChange(e) {
+            this.personId = e.target.checked ? this.userData.map(item => `${item.fullName}/${item.userId}`) : []
+            this.indeterminate = false
+            this.checkAll = e.target.checked
+        },
+        // 单选
+        handleOnChange() {
+            this.$nextTick(() => {
+                this.indeterminate = !!this.userData.length && this.userData.length < this.personId.length
+                this.checkAll = this.userData.length === this.personId.length
+            })
         },
         init() {
             this.loadAdminDeps();
@@ -371,7 +468,8 @@
             })
         },
         //加载左树下的子节点
-        onLoadGroupTree(treeNode) {
+        onLoadGroupTree(treeNode,index) {
+            console.log(treeNode,index)
             if (treeNode.dataRef.children) {
                 return;
             }
@@ -383,9 +481,11 @@
                     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);
+                // var orgData = this.getGroupTree(this.orgData, treeNode.dataRef.groupId, treeData);
 
-                this.orgData = [...orgData];
+                // this.orgData = [...orgData];
+                var orgData = this.getGroupTree(this.orgDataTree[index].orgData, treeNode.dataRef.groupId, treeData);
+                this.orgDataTree[index].orgData =  [...orgData];
                 // console.info("onLoadGroupTree")
                 // console.info(this.orgData)
             })
@@ -435,10 +535,10 @@
 .rightDetailtop{
   background: #fafafa;
   width: 100%;
-  text-align: center;
   height:37.8px;
   line-height:37.8px;
   border-bottom: 1px solid #e8e8e8;
+  position:relative;
 }
 .rx-tree-title{
   white-space: normal;
@@ -447,6 +547,10 @@
 .telist{
   cursor: pointer;
 }
+.orgName-style /deep/ .ant-form-item-label {
+    width: 80px;
+    text-align: left;
+}
 /* .rightDetailtop{
   background: #fafafa;
   border-bottom: 1px solid #e8e8e8;
@@ -471,5 +575,15 @@
 /deep/ .ant-table-row-expand-icon{
    margin-top: 3px;
 }
+/* /deep/ .ant-checkbox-wrapper {
+    height: 36px!important;
+    line-height: 36px!important;
+} */
+.chooseOrg-style::after {
+    content: ':';
+    position: relative;
+    top: -0.5px;
+    margin: 0 8px 0 2px;
+}
 </style>
 

+ 7 - 6
src/views/modules/knowledge/statistics/map.vue

@@ -69,9 +69,9 @@
               </div>
             </a-form>
           </div>
-          <bar-echart-one :barXData="barXUserData" :barData="barUserDataNew"></bar-echart-one>
+          <bar-echart-one isOrg="1" :barXData="barXUserData" :barData="barUserDataNew" @downloadClick="downloadClick"></bar-echart-one>
         </div>
-         <div class="bar-style">
+        <div class="bar-style">
           <div>
             组织创建量统计
           </div>
@@ -107,7 +107,7 @@
               </div>
             </a-form>
           </div>
-          <bar-echart-one isOrg :barXData="barXOrgData" :barData="barOrgDataNew"></bar-echart-one>
+          <bar-echart-one isOrg="2" :barXData="barXOrgData" :barData="barOrgDataNew" @downloadClick="downloadClick"></bar-echart-one>
         </div>
         <div class="table-style">
           <div>
@@ -131,7 +131,7 @@
       <a-modal
         v-model="showAuditFlag"
         class="chooseAuthor"
-        :width="isOrgOrUser == 1 ? 800 : 600"
+        width="800"
         :title="isOrgOrUser == 1 ? '员工选择' : '组织选择'"
         centered
         okText="保存"
@@ -141,8 +141,6 @@
           ref="orgModalRef"
           :isOnlyOrg="isOrgOrUser == 1 ? true : false"
           :key="new Date().getTime()" 
-          style="width: 800px; height: 600px"
-          :style="{width: isOrgOrUser == 1 ? '800px' : '600px'}"
         ></org-people>
       </a-modal>
     </div> 
@@ -299,6 +297,9 @@ export default {
         this.gettotalUserVisits()
       }
     },
+    downloadClick(arg) {
+      console.log(arg)
+    }
   }
 }
 </script>

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

@@ -141,9 +141,9 @@ export default (titlePromise) => {
           this.staffName = info1.map(item => item.split('/')[0]).join('/')
           this.staffForm.personId = info1.map(item => item.split('/')[1])
         } else {
-          let info = this.$refs.orgModalRef.checkedTargets
-          this.orgName = info.organizationName.join('/')
-          this.orgForm.organizationId = info.organizationId.join(',')
+          let info = this.$refs.orgModalRef.chooseTags
+          this.orgName = info.map(item => item.name).join('/')
+          this.orgForm.organizationId = info.map(item => item.id).join(',')
         }
         this.showAuditFlag = false
       },

+ 7 - 5
src/views/modules/knowledge/statistics/search.vue

@@ -28,7 +28,7 @@
           </div>
           <div class="staff-style">
             <a-form ref="searchForm" layout="inline" class="staff-form">
-              <a-form-item class="form-item-style" style="width:32%;" label="查询选项" name="staff">
+              <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)"  @mouseover="mouseOver(1)" @mouseleave="mouseLeave">
                   <div v-if="iconShowOne" style="position:absolute;z-index: 10;right:8px;cursor:pointer;" @click.stop="handleCloseClick(1)">
@@ -58,7 +58,7 @@
               </div>
             </a-form>
           </div>
-          <bar-echart-one :barXData="barXUserData" :barData="barUserDataNew"></bar-echart-one>
+          <bar-echart-one isOrg="1" :barXData="barXUserData" :barData="barUserDataNew" @downloadClick="downloadClick"></bar-echart-one>
         </div>
         <div class="bar-style">
           <div>
@@ -66,7 +66,7 @@
           </div>
           <div class="staff-style">
             <a-form ref="searchForm" layout="inline" class="staff-form">
-              <a-form-item class="form-item-style" style="width:32%;" label="查询选项" name="staff">
+              <a-form-item class="form-item-style" style="width:240px;" label="查询选项" name="staff">
                 <!-- <a-input class="set-input" v-model="staffForm.staff" placeholder="请选择要查询的员工" /> -->
                 <div style="position:relative;" @click="handleAuditShow(2)" @mouseover="mouseOver(2)" @mouseleave="mouseLeave">
                   <div v-if="iconShowTwo" style="position:absolute;z-index: 10;right:8px;cursor:pointer;" @click.stop="handleCloseClick(2)">
@@ -96,7 +96,7 @@
               </div>
             </a-form>
           </div>
-          <bar-echart-one isOrg :barXData="barXOrgData" :barData="barOrgDataNew"></bar-echart-one>
+          <bar-echart-one isOrg="2" :barXData="barXOrgData" :barData="barOrgDataNew" @downloadClick="downloadClick"></bar-echart-one>
         </div>
         <div class="table-style">
           <div>
@@ -131,7 +131,6 @@
           ref="orgModalRef"
           :isOnlyOrg="isOrgOrUser == 1 ? true : false"
           :key="new Date().getTime()" 
-          style="width: 800px; height: 600px"
         ></org-people>
       </a-modal>
     </div> 
@@ -255,6 +254,9 @@ export default {
     setbarDataNum(data){
       this.barDataNum=data
     },
+    downloadClick(arg) {
+      console.log(arg)
+    }
   }
 }
 </script>

+ 7 - 5
src/views/modules/knowledge/statistics/synthesize.vue

@@ -34,7 +34,7 @@
           </div>
           <div class="staff-style">
             <a-form ref="searchForm" layout="inline" class="staff-form">
-              <a-form-item class="form-item-style" style="width:32%;" label="查询选项" name="staff">
+              <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)"  @mouseover="mouseOver(1)" @mouseleave="mouseLeave">
                   <div v-if="iconShowOne" style="position:absolute;z-index: 10;right:8px;cursor:pointer;" @click.stop="handleCloseClick(1)">
@@ -64,7 +64,7 @@
               </div>
             </a-form>
           </div>
-          <bar-echart-one :barXData="barXUserData" :barData="barUserDataNew"></bar-echart-one>
+          <bar-echart-one isOrg="1" :barXData="barXUserData" :barData="barUserDataNew" @downloadClick="downloadClick"></bar-echart-one>
         </div>
         <div class="bar-style">
           <div>
@@ -72,7 +72,7 @@
           </div>
           <div class="staff-style">
             <a-form ref="searchForm" layout="inline" class="staff-form">
-              <a-form-item class="form-item-style" style="width:32%;" label="查询选项" name="staff">
+              <a-form-item class="form-item-style" style="width:240px;" label="查询选项" name="staff">
                 <!-- <a-input class="set-input" v-model="staffForm.staff" placeholder="请选择要查询的员工" /> -->
                 <div style="position:relative;" @click="handleAuditShow(2)" @mouseover="mouseOver(2)" @mouseleave="mouseLeave">
                   <div v-if="iconShowTwo" style="position:absolute;z-index: 10;right:8px;cursor:pointer;" @click.stop="handleCloseClick(2)">
@@ -102,7 +102,7 @@
               </div>
             </a-form>
           </div>
-          <bar-echart-one isOrg :barXData="barXOrgData" :barData="barOrgDataNew"></bar-echart-one>
+          <bar-echart-one isOrg="2" :barXData="barXOrgData" :barData="barOrgDataNew" @downloadClick="downloadClick"></bar-echart-one>
         </div>
         <div class="table-style">
           <div>
@@ -137,7 +137,6 @@
           ref="orgModalRef"
           :isOnlyOrg="isOrgOrUser == 1 ? true : false"
           :key="new Date().getTime()" 
-          style="width: 800px; height: 600px"
         ></org-people>
       </a-modal>
     </div> 
@@ -301,6 +300,9 @@ export default {
       statistics.moduleUserUniqueVisits({module: 'total',type:this.type}).then(res => {
         this.dataNum = res.data
       })
+    },
+    downloadClick(arg) {
+      console.log(arg)
     }
   }
 }

+ 5 - 3
src/views/modules/knowledge/statistics/warehouse.vue

@@ -63,7 +63,7 @@
               </div>
             </a-form>
           </div>
-          <bar-echart-one :barXData="barXUserData" :barData="barUserDataNew"></bar-echart-one>
+          <bar-echart-one isOrg="1" :barXData="barXUserData" :barData="barUserDataNew" @downloadClick="downloadClick"></bar-echart-one>
         </div>
         <div class="bar-style">
           <div>
@@ -101,7 +101,7 @@
               </div>
             </a-form>
           </div>
-          <bar-echart-one isOrg :barXData="barXOrgData" :barData="barOrgDataNew"></bar-echart-one>
+          <bar-echart-one isOrg="2" :barXData="barXOrgData" :barData="barOrgDataNew" @downloadClick="downloadClick"></bar-echart-one>
         </div>
         <div class="table-style">
           <div>
@@ -135,7 +135,6 @@
           ref="orgModalRef"
           :isOnlyOrg="isOrgOrUser == 1 ? true : false"
           :key="new Date().getTime()" 
-          style="width: 800px; height: 600px"
         ></org-people>
       </a-modal>
     </div> 
@@ -299,6 +298,9 @@ export default {
         this.barXData=barXData,
         this.barData=barData
       })
+    },
+    downloadClick(arg) {
+      console.log(arg)
     }
   }
 }

+ 210 - 0
src/views/modules/knowledge/warehouse/agent.vue

@@ -0,0 +1,210 @@
+<template>
+    <rx-dialog @handOk="handleSubmit" @cancel="cancel">
+      <rx-layout>
+        <div slot="center">
+          <div class="agent-title">代理人设置基本信息</div>
+          <a-form-model style="border:1px solid #e8e8e8;margin: 0 20px;" ref="knowledgeRef" :model="agentForm" layout="inline">
+            <a-row>
+              <a-col :span="12">
+                <a-form-model-item label="代理描述:" prop="agentDesc">
+                  <a-input style="width:80%;" v-model="agentForm.agentDesc" placeholder="请输入代理描述" />
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="12">
+                 <a-form-model-item label="代理类型:" prop="agentType">
+                    <a-radio-group v-model="agentForm.agentType">
+                      <a-radio :value="1">
+                        全部
+                      </a-radio>
+                    </a-radio-group>
+                </a-form-model-item>
+              </a-col>
+            </a-row>
+            <a-row>
+              <a-col :span="12">
+                <a-form-model-item label="代理给:" prop="forUser">
+                  <a-input style="width:80%;" v-model="agentForm.forUser" placeholder="请输入代理人" />
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="12">
+                <a-form-model-item label="状态:" prop="status">
+                  <a-radio-group v-model="agentForm.status">
+                    <a-radio :value="1">
+                      启用
+                    </a-radio>
+                    <a-radio :value="2">
+                      禁用
+                    </a-radio>
+                  </a-radio-group>
+                </a-form-model-item>
+              </a-col>
+            </a-row>
+            <a-row>
+              <a-col :span="12">
+                <a-form-model-item label="开始时间:" prop="startTime">
+                  <a-date-picker v-model="agentForm.startTime" />
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="12">
+                 <a-form-model-item label="结束时间:" prop="endTime">
+                   <a-date-picker v-model="agentForm.endTime" />
+                </a-form-model-item>
+              </a-col>
+            </a-row>
+            <a-row>
+              <a-form-model-item label="描述:" prop="desc">
+                 <a-input v-model="agentForm.desc" type="textarea" :autosize="{minRows: 3, maxRows: 6}" placeholder="请输入描" />
+              </a-form-model-item>
+            </a-row>
+          </a-form-model>
+        </div>
+      </rx-layout>
+
+  </rx-dialog>
+</template>
+<script>
+  import OsUserApi from '@/api/user/org/osUser'
+  import OsusertypeApi from '@/api/user/org/osUserType'
+  import { BaseForm,RxDialog,Dialog,RxLayout,Util ,RxTextBoxList} from "jpaas-common-lib"
+  import {ACCESS_TOKEN} from "@/store/mutation-types";
+  import moment from 'moment';
+  import osPropertiesGroupApi from '@/api/user/org/osPropertiesGroup'
+
+  export default {
+    name: 'agentPage',
+    components: {
+      RxDialog,
+      RxTextBoxList,
+      RxLayout,
+    },
+    mixins:[BaseForm],
+    data () {
+      return {
+        agentForm: {
+          agentDesc: '',
+          agentType: 1,
+          forUser: '',
+          status: 1,
+          startTime: '',
+          endTime: '',
+          desc: ''
+        },
+        osUserTypes:[],
+        userTypeName:'无',
+        mainDepId:'',
+        dateFormat:'YYYY-MM-DD HH:mm:ss',
+        jsonArray:[],
+        cpsArray:[],
+        imageUrl:"",
+        loading:false,
+        headers:{},
+        disabled:true,
+        mdl: {},
+        propertiesGroups:[]
+      }
+    },
+    created () {
+      var token =Vue.ls.get(ACCESS_TOKEN) ;
+      if (token) {
+        this.headers['Authorization'] = 'Bearer ' + token // 让每个请求携带token--['Authorization']为自定义key 请根据实际情况自行修改
+      }
+      // OsusertypeApi.getAllUserTypeList().then(data=>{
+      //   this.osUserTypes=data;
+      // });
+      // var self=this;
+      // this.pkId=this.userId;
+      // OsUserApi.edit(this.userId).then(data=>{
+      //   this.jsonArray=data.dimArray;
+      //   var userData=data.user;
+      //   userData.mainDepId=data.mainDepId;
+      //   userData.mainDepName=data.mainDepName;
+      //   this.mdl = Object.assign(userData);
+      //   //设置用户数据
+      //   this.form.setFieldsValue(this.mdl);
+      //   //获取用户类型名称
+      //   for (var i=0;i<this.osUserTypes.length;i++){
+      //     if(this.osUserTypes[i].code==self.mdl.userType){
+      //       this.userTypeName=this.osUserTypes[i].name;
+      //     }
+      //   }
+      //   //初始化数据
+      //   this.onload_(this.mdl);
+      // });
+      // this.getPropertiesGroups();
+      // //获取用户的分公司/职位/职等
+      // OsUserApi.getUserCPS().then((res)=>{
+      //     this.cpsArray = res.data;
+      // });
+    },
+    methods: {
+      validForm(values){
+        if(values.pwd!=values.repwd){
+          this.$message.error("两次输入的密码不一致!")
+          return false;
+        }
+        return true;
+      },
+      save(values){
+        console.log(values)
+      },
+      onload_(values){
+        if(values){
+          if(values.birthday){
+            values.birthday=moment(values.birthday, this.dateFormat);
+          }
+          if(values.photo) {
+            this.imageUrl = this.getFilePath(values.photo);
+          }
+        }
+      },
+      getFilePath(fileId){
+        return "/api/api-system/system/core/sysFile/previewFile?fileId=" + fileId;
+      },
+      handleChange(info) {
+        if (info.file.status === 'uploading') {
+          this.loading = true;
+          return;
+        }
+        if (info.file.status === 'done') {
+          var res=info.fileList[info.fileList.length-1].response;
+          if(res.success){
+            this.photo=res.data[0].fileId;
+            this.imageUrl=this.getFilePath(res.data[0].fileId);
+            this.loading=false;
+          }
+        }
+      },
+      beforeUpload(file) {
+        const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
+        if (!isJpgOrPng) {
+          this.$message.error('只能上传图片!');
+        }
+        const isLt2M = file.size / 1024 / 1024 < 2;
+        if (!isLt2M) {
+          this.$message.error('图片必须小于2MB!');
+        }
+        return isJpgOrPng && isLt2M;
+      },
+      //获取用户扩展属性组
+      getPropertiesGroups(){
+        var ownerId="";
+        if(this.userId){
+          ownerId=this.userId;
+        }
+        osPropertiesGroupApi.getAllProperties({dimId:"-1",ownerId:ownerId}).then(res=>{
+          this.propertiesGroups=res;
+        });
+      }
+    }
+  }
+</script>
+<style scoped>
+  .agent-title {
+    width:100%;
+    padding:20px;
+    text-align:center;
+  }
+  .selectitem >>> .ant-form-item-control{
+    margin-top: 7px;
+  }
+</style>

+ 1 - 1
src/views/modules/knowledge/warehouse/knowledgeManageList.vue

@@ -149,7 +149,7 @@
                   @click="handleJumpPathClick"
                   >知识审核</rx-button
                 >
-                <rx-button alias="reauthor" :butn-icon="'false'" @click="handleReauthorShowClick">批量改派作者</rx-button>
+                <!-- <rx-button alias="reauthor" :butn-icon="'false'" @click="handleReauthorShowClick">批量改派作者</rx-button> -->
               </div>
             </div>
           </div>