|
@@ -0,0 +1,581 @@
|
|
|
+<template>
|
|
|
+ <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="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;">
|
|
|
+ <a-button style="margin-right: 8px;" @click="handleResetClick(false)">重置</a-button>
|
|
|
+ <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:53px;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> -->
|
|
|
+ <a-tag style="margin-bottom: 2px;margin-top: 2px"
|
|
|
+ v-for="(item,index) in chooseTags"
|
|
|
+ :key="index"
|
|
|
+ closable
|
|
|
+ @close="(e) => handleTagClose(e,index,item.id)">{{ item.name }}
|
|
|
+ </a-tag>
|
|
|
+ <!-- <a-tag style="margin-bottom: 2px;margin-top: 2px"
|
|
|
+ v-for="(item,index) in chooseTags"
|
|
|
+ :key="index">{{ item.name }}
|
|
|
+ </a-tag> -->
|
|
|
+ </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;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> -->
|
|
|
+ <rx-tree
|
|
|
+ :treeData="orgData"
|
|
|
+ :async="true"
|
|
|
+ v-model="checkedKeys"
|
|
|
+ :loadByParent="onLoadGroupTree"
|
|
|
+ multiSelect
|
|
|
+ id-field="key"
|
|
|
+ text-field="title"
|
|
|
+ @check="check"
|
|
|
+ parent-field="groupId"></rx-tree>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <rx-grid
|
|
|
+ v-if="isOnlyOrg"
|
|
|
+ style="height: calc( 70vh - 108px );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: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:calc( 70vh - 214px );overflow-y: auto;">
|
|
|
+ <a-checkbox v-for="(item) in userData" :style="radioStyle" :value="item.fullName + '/' + item.userNo" :key="item.userNo" @change="handleOnChange">
|
|
|
+ {{ item.fullName + '(' + item.userNo + ')'}}
|
|
|
+ </a-checkbox>
|
|
|
+ </a-checkbox-group>
|
|
|
+ <!-- <div style="height:200px;border-top: 1px solid #e8e8e8;"> -->
|
|
|
+ <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>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import OsUserApi from '@/api/user/org/osUser'
|
|
|
+ import statistics from '@/api/knowledge/analysis'
|
|
|
+ import OsGroupApi from '@/api/user/org/osGroup'
|
|
|
+ import OsRelInstApi from '@/api/user/org/osRelInst'
|
|
|
+ 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: 10,
|
|
|
+ params: {
|
|
|
+ groupId: "",
|
|
|
+ dim: "1",
|
|
|
+ rankLevel: "",
|
|
|
+ status: "1",
|
|
|
+ name: "",
|
|
|
+ userNo: ""
|
|
|
+ },
|
|
|
+ sortOrder: "asc"
|
|
|
+ },
|
|
|
+ // queryParam: {
|
|
|
+ // pageNum: 1,
|
|
|
+ // pageSize: 10,
|
|
|
+ // relTypeId: 1,
|
|
|
+ // groupId: ''
|
|
|
+ // },
|
|
|
+ indeterminate: false,
|
|
|
+ checkAll: false,
|
|
|
+ total: 0,
|
|
|
+ userNo: '',
|
|
|
+ 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: [],
|
|
|
+ personIdArr: [],
|
|
|
+ radioStyle: {
|
|
|
+ display: 'block',
|
|
|
+ height: '40px',
|
|
|
+ lineHeight: '40px',
|
|
|
+ marginLeft: '30px'
|
|
|
+ },
|
|
|
+ chooseTags: [],
|
|
|
+ orgData: [],
|
|
|
+ // orgDataTree: [{
|
|
|
+ // checkedKeys: {checked:[]},
|
|
|
+ // orgData: []
|
|
|
+ // }],
|
|
|
+ // 组织
|
|
|
+ checkedTarget: {},
|
|
|
+ // 组织架构(多选)
|
|
|
+ checkedKeys:{checked:[]},
|
|
|
+ // 组织架构(多选)
|
|
|
+ checkedTargets: {
|
|
|
+ organizationId: [],
|
|
|
+ organizationName: [],
|
|
|
+ },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ // this.init()
|
|
|
+ this.getTreeData()
|
|
|
+ if(this.isOnlyOrg) {
|
|
|
+ this.getOrgListByGroupId()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleTagClose(e,index,id) {
|
|
|
+ e.preventDefault()
|
|
|
+ this.chooseTags.splice(index,1)
|
|
|
+ if(this.checkedKeys.checked.some(item => item == id)) {
|
|
|
+ this.checkedKeys.checked.map((item,index) => {
|
|
|
+ if (item.indexOf(id) > -1) {
|
|
|
+ this.checkedKeys.checked.splice(index, 1);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 多选节点
|
|
|
+ check(selKeys, e) {
|
|
|
+ if(e.checked) {
|
|
|
+ this.checkedKeys.checked = selKeys
|
|
|
+ this.chooseTags.push({
|
|
|
+ id: e.node.value,
|
|
|
+ name: e.node.title
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ let id = e.node.value
|
|
|
+ this.checkedKeys.checked = selKeys
|
|
|
+ this.chooseTags.map((item,index) => {
|
|
|
+ if (item.id.indexOf(id) > -1) {
|
|
|
+ this.chooseTags.splice(index, 1);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 组织名称搜索
|
|
|
+ handleSearchOrgClick() {
|
|
|
+ if(this.serachValue==''){
|
|
|
+ this.handleResetClick(true)
|
|
|
+ }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;
|
|
|
+ if(!this.isOnlyOrg) {
|
|
|
+ let data = result;
|
|
|
+ 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}-${rs.key}`, groupId: rs.groupId, key: rs.key, isLeaf: _isLeaf})
|
|
|
+ }
|
|
|
+ this.orgData = [...temp]
|
|
|
+ // this.orgDataTree.push({
|
|
|
+ // checkedKeys: {checked:[]},
|
|
|
+ // orgData: [...temp]
|
|
|
+ // })
|
|
|
+ }
|
|
|
+ this.queryParam.params.groupId = ''
|
|
|
+ this.userData = []
|
|
|
+ })
|
|
|
+ }
|
|
|
+ //清除下拉的数据
|
|
|
+ // this.$refs.orgTable.expandedRowKeys=[];
|
|
|
+ },
|
|
|
+ handleResetClick(arg = false) {
|
|
|
+ this.serachValue = ''
|
|
|
+ this.getTreeData()
|
|
|
+ if(!this.isOnlyOrg) {
|
|
|
+ this.orgData = []
|
|
|
+ if(!arg) {
|
|
|
+ this.chooseTags = []
|
|
|
+ this.checkedKeys.checked = []
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.userData = []
|
|
|
+ this.queryParam.pageNo = 1
|
|
|
+ this.queryParam.pageSize = 10
|
|
|
+ this.personId = []
|
|
|
+ this.personIdArr = []
|
|
|
+ this.getOrgListByGroupId()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //组织结构
|
|
|
+ getTreeData(){
|
|
|
+ OsGroupApi.queryGroups(1,"0","yes").then(result => {
|
|
|
+ if(this.isOnlyOrg) {
|
|
|
+ result.data=this.treeData(result.data);
|
|
|
+ this.tableData = result.data
|
|
|
+ } else {
|
|
|
+ let data = result.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}-${rs.key}`, groupId: rs.groupId, key: rs.key, isLeaf: _isLeaf})
|
|
|
+ }
|
|
|
+ this.orgData = [...temp]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ //清除下拉的数据
|
|
|
+ // 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.pageNo = 1
|
|
|
+ this.queryParam.pageSize = 10
|
|
|
+ this.queryParam.params.groupId = data.pkId
|
|
|
+ this.personId = []
|
|
|
+ this.personIdArr = []
|
|
|
+ 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(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,
|
|
|
+ userNo: item.userNo
|
|
|
+ }
|
|
|
+ })
|
|
|
+ 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
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handlePageNumChange(arg) {
|
|
|
+ this.personIdArr[this.queryParam.pageNo-1] = this.personId
|
|
|
+ if(arg == '-') {
|
|
|
+ this.queryParam.pageNo--
|
|
|
+ } else {
|
|
|
+ this.queryParam.pageNo++
|
|
|
+ }
|
|
|
+ this.getOrgListByGroupId(true)
|
|
|
+ },
|
|
|
+ // 员工全选
|
|
|
+ onCheckAllChange(e) {
|
|
|
+ this.personId = e.target.checked ? this.userData.map(item => `${item.fullName}/${item.userNo}`) : []
|
|
|
+ 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();
|
|
|
+ },
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+ 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})
|
|
|
+ treeData.push({title:`${rs.name}-${rs.key}`, groupId: rs.groupId, key: rs.key,isLeaf: _isLeaf})
|
|
|
+ }
|
|
|
+ var orgData = this.getGroupTree(this.orgData, treeNode.dataRef.groupId, treeData);
|
|
|
+ this.orgData = [...orgData];
|
|
|
+ // var orgData = this.getGroupTree(this.orgDataTree[index].orgData, treeNode.dataRef.groupId, treeData);
|
|
|
+ // this.orgDataTree[index].orgData = [...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%;
|
|
|
+ height:37.8px;
|
|
|
+ line-height:37.8px;
|
|
|
+ border-bottom: 1px solid #e8e8e8;
|
|
|
+ position:relative;
|
|
|
+}
|
|
|
+.rx-tree-title{
|
|
|
+ white-space: normal;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+.telist{
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+.orgName-style /deep/ .ant-form-item-label {
|
|
|
+ width: 80px;
|
|
|
+ text-align: left;
|
|
|
+}
|
|
|
+/* .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;
|
|
|
+}
|
|
|
+/* /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>
|
|
|
+
|