修改部门管理
This commit is contained in:
@@ -463,4 +463,7 @@
|
|||||||
.ant-table-placeholder {
|
.ant-table-placeholder {
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
}
|
}
|
||||||
|
.ant-input-number{
|
||||||
|
background: transparent !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -18,12 +18,13 @@ export const JeroListMixin = {
|
|||||||
/* 数据源 */
|
/* 数据源 */
|
||||||
dataSource:[],
|
dataSource:[],
|
||||||
/* 分页参数 */
|
/* 分页参数 */
|
||||||
|
//range[0] + "-" + range[1] +
|
||||||
ipagination:{
|
ipagination:{
|
||||||
current: 1,
|
current: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageSizeOptions: ['10', '20', '30'],
|
pageSizeOptions: ['10', '20', '30'],
|
||||||
showTotal: (total, range) => {
|
showTotal: (total, range) => {
|
||||||
return range[0] + "-" + range[1] + " 共" + total + "条"
|
return this.$t('total') +' '+ total + ' '+this.$t('strip')
|
||||||
},
|
},
|
||||||
showQuickJumper: true,
|
showQuickJumper: true,
|
||||||
showSizeChanger: true,
|
showSizeChanger: true,
|
||||||
|
|||||||
@@ -1,84 +1,84 @@
|
|||||||
<template xmlns:background-color="http://www.w3.org/1999/xhtml">
|
<template xmlns:background-color="http://www.w3.org/1999/xhtml">
|
||||||
<a-row :gutter="10">
|
<a-row :gutter="10" class="box-ant">
|
||||||
<a-col :md="10" :sm="24" >
|
<a-col :md="10" :sm="24">
|
||||||
<a-card :bordered="false" style="padding: 12px 0;">
|
<a-card :bordered="false" style="padding: 12px 0;">
|
||||||
<!-- 按钮操作区域 -->
|
<!-- 按钮操作区域 -->
|
||||||
<a-row style="margin-left: 14px">
|
<a-row style="margin-left: 14px">
|
||||||
<a-button @click="handleAdd(1)" type="primary">{{$t('AddDepartment')}}</a-button>
|
<!-- <a-button @click="handleAdd(1)" type="primary">{{$t('AddDepartment')}}</a-button>-->
|
||||||
<a-button @click="handleAdd(2)" type="primary">{{$t('AddSubordinate')}}</a-button>
|
<!-- <a-button @click="handleAdd(2)" type="primary">{{$t('AddSubordinate')}}</a-button>-->
|
||||||
<a-button type="primary" icon="download" @click="handleExportXls($t('DepartmentInformation'))">{{$t('export')}}</a-button>
|
<!-- <a-button type="primary" icon="download" @click="handleExportXls($t('DepartmentInformation'))">{{$t('export')}}</a-button>-->
|
||||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
|
||||||
<a-button type="primary" icon="import">{{$t('import')}}</a-button>
|
<!-- <a-button type="primary" icon="import">{{$t('import')}}</a-button>-->
|
||||||
</a-upload>
|
<!-- </a-upload>-->
|
||||||
<a-button :title="$t('DeleteMultiplePiecesData')" @click="batchDel" type="default">{{$t('BatchDelete')}}</a-button>
|
<!-- <a-button :title="$t('DeleteMultiplePiecesData')" @click="batchDel" type="default">{{$t('BatchDelete')}}</a-button>-->
|
||||||
<!--<a-button @click="refresh" type="default" icon="reload" :loading="loading">刷新</a-button>-->
|
<!--<a-button @click="refresh" type="default" icon="reload" :loading="loading">刷新</a-button>-->
|
||||||
</a-row>
|
</a-row>
|
||||||
<div style="background: #fff;padding-left:16px;height: 100%; margin-top: 5px">
|
<div style="padding-left:16px;height: 100%;">
|
||||||
<a-alert type="info" :showIcon="true">
|
<!-- <a-alert type="info" :showIcon="true">-->
|
||||||
<div slot="message">
|
<!-- <div slot="message">-->
|
||||||
{{$t('CurrentSelection')}}:<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span>
|
<!-- {{$t('CurrentSelection')}}:<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span>-->
|
||||||
<a v-if="this.currSelected.title" style="margin-left: 10px" @click="onClearSelected">{{$t('Deselect')}}</a>
|
<!-- <a v-if="this.currSelected.title" style="margin-left: 10px" @click="onClearSelected">{{$t('Deselect')}}</a>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</a-alert>
|
<!-- </a-alert>-->
|
||||||
<a-input-search @search="onSearch" style="width:100%;margin-top: 10px" :placeholder="$t('enterDepartmentName')"/>
|
<a-input-search @search="onSearch" style="width:100%;margin-top: 6px"
|
||||||
|
:placeholder="$t('enterDepartmentName')"/>
|
||||||
<!-- 树-->
|
<!-- 树-->
|
||||||
<a-col :md="10" :sm="24">
|
|
||||||
<template>
|
<template>
|
||||||
<a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus">
|
<!-- <a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus">-->
|
||||||
<span style="user-select: none">
|
<!-- checkable-->
|
||||||
<a-tree
|
<a-tree
|
||||||
checkable
|
multiple
|
||||||
multiple
|
style="height:600px;overflow: auto;width: 100%"
|
||||||
@select="onSelect"
|
@select="onSelect"
|
||||||
@check="onCheck"
|
@check="onCheck"
|
||||||
@rightClick="rightHandle"
|
@rightClick="rightHandle"
|
||||||
:selectedKeys="selectedKeys"
|
:selectedKeys="selectedKeys"
|
||||||
:checkedKeys="checkedKeys"
|
:checkedKeys="checkedKeys"
|
||||||
:treeData="departTree"
|
:treeData="departTree"
|
||||||
:checkStrictly="checkStrictly"
|
:checkStrictly="checkStrictly"
|
||||||
:expandedKeys="iExpandedKeys"
|
:autoExpandParent="false"
|
||||||
:autoExpandParent="autoExpandParent"
|
:expandedKeys="iExpandedKeys"
|
||||||
@expand="onExpand"/>
|
@expand="onExpand"/>
|
||||||
</span>
|
<!--新增右键点击事件,和增加添加和删除功能-->
|
||||||
<!--新增右键点击事件,和增加添加和删除功能-->
|
<!-- <a-menu slot="overlay">-->
|
||||||
<a-menu slot="overlay">
|
<!-- <a-menu-item @click="handleAdd(3)" key="1">{{$t('addTo')}}</a-menu-item>-->
|
||||||
<a-menu-item @click="handleAdd(3)" key="1">{{$t('addTo')}}</a-menu-item>
|
<!-- <a-menu-item @click="handleDelete" key="2">{{$t('delete')}}</a-menu-item>-->
|
||||||
<a-menu-item @click="handleDelete" key="2">{{$t('delete')}}</a-menu-item>
|
<!-- <a-menu-item @click="closeDrop" key="3">{{$t('cancel')}}</a-menu-item>-->
|
||||||
<a-menu-item @click="closeDrop" key="3">{{$t('cancel')}}</a-menu-item>
|
<!-- </a-menu>-->
|
||||||
</a-menu>
|
<!-- </a-dropdown>-->
|
||||||
</a-dropdown>
|
|
||||||
</template>
|
</template>
|
||||||
</a-col>
|
|
||||||
</div>
|
</div>
|
||||||
</a-card>
|
</a-card>
|
||||||
<!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
|
<!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
|
||||||
<div class="drawer-bootom-button">
|
<!-- <div class="drawer-bootom-button">-->
|
||||||
<a-dropdown :trigger="['click']" placement="topCenter">
|
<!-- <a-dropdown :trigger="['click']" placement="topCenter">-->
|
||||||
<a-menu slot="overlay">
|
<!-- <a-menu slot="overlay">-->
|
||||||
<!--<a-menu-item key="1" @click="switchCheckStrictly(1)">父子关联</a-menu-item>-->
|
<!-- <!–<a-menu-item key="1" @click="switchCheckStrictly(1)">父子关联</a-menu-item>–>-->
|
||||||
<!--<a-menu-item key="2" @click="switchCheckStrictly(2)">取消关联</a-menu-item>-->
|
<!-- <!–<a-menu-item key="2" @click="switchCheckStrictly(2)">取消关联</a-menu-item>–>-->
|
||||||
<a-menu-item key="3" @click="checkALL">{{$t('checkAll')}}</a-menu-item>
|
<!-- <a-menu-item key="3" @click="checkALL">{{$t('checkAll')}}</a-menu-item>-->
|
||||||
<a-menu-item key="4" @click="cancelCheckALL">{{$t('DeselectAll')}}</a-menu-item>
|
<!-- <a-menu-item key="4" @click="cancelCheckALL">{{$t('DeselectAll')}}</a-menu-item>-->
|
||||||
<a-menu-item key="5" @click="expandAll">{{$t('ExpandAll')}}</a-menu-item>
|
<!-- <a-menu-item key="5" @click="expandAll">{{$t('ExpandAll')}}</a-menu-item>-->
|
||||||
<a-menu-item key="6" @click="closeAll">{{$t('MergeAll')}}</a-menu-item>
|
<!-- <a-menu-item key="6" @click="closeAll">{{$t('MergeAll')}}</a-menu-item>-->
|
||||||
</a-menu>
|
<!-- </a-menu>-->
|
||||||
<a-button>
|
<!-- <a-button>-->
|
||||||
{{$t('TreeOperation')}} <a-icon type="up" />
|
<!-- {{$t('TreeOperation')}} <a-icon type="up" />-->
|
||||||
</a-button>
|
<!-- </a-button>-->
|
||||||
</a-dropdown>
|
<!-- </a-dropdown>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
|
<!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="14" :sm="24" style="background: #fff;padding: 24px;">
|
<a-col :md="14" :sm="24" style="padding: 24px;">
|
||||||
<a-tabs defaultActiveKey="1">
|
<a-tabs defaultActiveKey="1">
|
||||||
<a-tab-pane :tab="$t('essentialInformation')" key="1" >
|
<a-tab-pane :tab="$t('essentialInformation')" key="1">
|
||||||
<a-card :bordered="false" v-if="selectedKeys.length>0">
|
<a-card :bordered="false" v-if="selectedKeys.length>0">
|
||||||
<a-form :form="form">
|
<a-form :form="form">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
:label="$t('OrganizationName')">
|
:label="$t('OrganizationName')">
|
||||||
<a-input :placeholder="$t('EnterOrganizationDepartment')" v-decorator="['departName', validatorRules.departName ]"/>
|
<a-input :placeholder="$t('EnterOrganizationDepartment')"
|
||||||
|
:disabled="disable"
|
||||||
|
v-decorator="['departName', validatorRules.departName ]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('SuperiorDepartment')">
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('SuperiorDepartment')">
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
@@ -94,21 +94,27 @@
|
|||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
:label="$t('OrganizationCode')">
|
:label="$t('OrganizationCode')">
|
||||||
<a-input disabled :placeholder="$t('enterOrganizationCode')" v-decorator="['orgCode', validatorRules.orgCode ]"/>
|
<a-input :disabled="disable"
|
||||||
|
:placeholder="$t('enterOrganizationCode')"
|
||||||
|
v-decorator="['orgCode', validatorRules.orgCode ]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
:label="$t('OrganizationType')">
|
:label="$t('OrganizationType')">
|
||||||
<template v-if="orgCategoryDisabled">
|
<template v-if="orgCategoryDisabled">
|
||||||
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" :placeholder="$t('PleaseSelectOrganizationType')">
|
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]"
|
||||||
|
:disabled="disable"
|
||||||
|
:placeholder="$t('PleaseSelectOrganizationType')">
|
||||||
<a-radio value="1">
|
<a-radio value="1">
|
||||||
{{$t('company')}}
|
{{$t('company')}}
|
||||||
</a-radio>
|
</a-radio>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" :placeholder="$t('PleaseSelectOrganizationType')">
|
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]"
|
||||||
|
:disabled="disable"
|
||||||
|
:placeholder="$t('PleaseSelectOrganizationType')">
|
||||||
<a-radio value="2">
|
<a-radio value="2">
|
||||||
{{$t('department')}}
|
{{$t('department')}}
|
||||||
</a-radio>
|
</a-radio>
|
||||||
@@ -122,31 +128,32 @@
|
|||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
:label="$t('sort')">
|
:label="$t('sort')">
|
||||||
<a-input-number v-decorator="[ 'departOrder',{'initialValue':0}]"/>
|
<a-input-number :disabled="disable" v-decorator="[ 'departOrder',{'initialValue':0}]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
:label="$t('phoneNumber')">
|
:label="$t('phoneNumber')">
|
||||||
<a-input :placeholder="$t('enterMobileNumber')" v-decorator="['mobile', {'initialValue':''}]"/>
|
<a-input :disabled="disable" :placeholder="$t('enterMobileNumber')" v-decorator="['mobile', {'initialValue':''}]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
:label="$t('address')">
|
:label="$t('address')">
|
||||||
<a-input :placeholder="$t('enterAddress')" v-decorator="['address', {'initialValue':''}]"/>
|
<a-input :disabled="disable" :placeholder="$t('enterAddress')" v-decorator="['address', {'initialValue':''}]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:labelCol="labelCol"
|
:labelCol="labelCol"
|
||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
:label="$t('remarks')">
|
:label="$t('remarks')">
|
||||||
<a-textarea :placeholder="$t('enterComments')" v-decorator="['memo', {'initialValue':''}]"/>
|
<a-textarea :disabled="disable" :placeholder="$t('enterComments')" v-decorator="['memo', {'initialValue':''}]"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
<div class="anty-form-btn">
|
<!-- <div class="anty-form-btn">-->
|
||||||
<a-button @click="emptyCurrForm" type="default" htmlType="button" icon="sync">{{$t('reset')}}</a-button>
|
<!-- <a-button @click="emptyCurrForm" type="default" htmlType="button" icon="sync">{{$t('reset')}}</a-button>-->
|
||||||
<a-button @click="submitCurrForm" type="primary" htmlType="button" icon="form">{{$t('preservation')}}</a-button>
|
<!-- <a-button @click="submitCurrForm" type="primary" htmlType="button" icon="form">{{$t('preservation')}}-->
|
||||||
</div>
|
<!-- </a-button>-->
|
||||||
|
<!-- </div>-->
|
||||||
</a-card>
|
</a-card>
|
||||||
<a-card v-else :bordered="false" style="height:248px !important;">
|
<a-card v-else :bordered="false" style="height:248px !important;">
|
||||||
<a-empty>
|
<a-empty>
|
||||||
@@ -154,9 +161,9 @@
|
|||||||
</a-empty>
|
</a-empty>
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<!-- <a-tab-pane tab="部门权限" key="2" forceRender>-->
|
<!-- <a-tab-pane tab="部门权限" key="2" forceRender>-->
|
||||||
<!-- <depart-auth-modal ref="departAuth"/>-->
|
<!-- <depart-auth-modal ref="departAuth"/>-->
|
||||||
<!-- </a-tab-pane>-->
|
<!-- </a-tab-pane>-->
|
||||||
<a-tab-pane :tab="$t('userInformation')" key="3">
|
<a-tab-pane :tab="$t('userInformation')" key="3">
|
||||||
<Dept-User-Info ref="DeptUserInfo"></Dept-User-Info>
|
<Dept-User-Info ref="DeptUserInfo"></Dept-User-Info>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
@@ -169,9 +176,9 @@
|
|||||||
import DepartModal from './modules/DepartModal'
|
import DepartModal from './modules/DepartModal'
|
||||||
import DeptUserInfo from './modules/DeptUserInfo'
|
import DeptUserInfo from './modules/DeptUserInfo'
|
||||||
import pick from 'lodash.pick'
|
import pick from 'lodash.pick'
|
||||||
import {queryDepartTreeList, searchByKeywords, deleteByDepartId} from '@/api/api'
|
import { queryDepartTreeList, searchByKeywords, deleteByDepartId } from '@/api/api'
|
||||||
import {httpAction, deleteAction} from '@/api/manage'
|
import { httpAction, deleteAction } from '@/api/manage'
|
||||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||||
import DepartAuthModal from './modules/DepartAuthModal'
|
import DepartAuthModal from './modules/DepartAuthModal'
|
||||||
// 表头
|
// 表头
|
||||||
|
|
||||||
@@ -187,7 +194,6 @@
|
|||||||
return {
|
return {
|
||||||
iExpandedKeys: [],
|
iExpandedKeys: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
autoExpandParent: true,
|
|
||||||
currFlowId: '',
|
currFlowId: '',
|
||||||
currFlowName: '',
|
currFlowName: '',
|
||||||
disable: true,
|
disable: true,
|
||||||
@@ -200,7 +206,7 @@
|
|||||||
model: {},
|
model: {},
|
||||||
dropTrigger: '',
|
dropTrigger: '',
|
||||||
depart: {},
|
depart: {},
|
||||||
columns:[
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('OrganizationName'),
|
title: this.$t('OrganizationName'),
|
||||||
dataIndex: 'departName'
|
dataIndex: 'departName'
|
||||||
@@ -212,7 +218,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('OrganizationCode'),
|
title: this.$t('OrganizationCode'),
|
||||||
dataIndex: 'orgCode',
|
dataIndex: 'orgCode'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('phoneNumber'),
|
title: this.$t('phoneNumber'),
|
||||||
@@ -235,7 +241,7 @@
|
|||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
scopedSlots: {customRender: 'action'}
|
scopedSlots: { customRender: 'action' }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
disableSubmit: false,
|
disableSubmit: false,
|
||||||
@@ -244,46 +250,46 @@
|
|||||||
autoIncr: 1,
|
autoIncr: 1,
|
||||||
currSelected: {},
|
currSelected: {},
|
||||||
|
|
||||||
allTreeKeys:[],
|
allTreeKeys: [],
|
||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
|
|
||||||
form: this.$form.createForm(this),
|
form: this.$form.createForm(this),
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: {span: 24},
|
xs: { span: 24 },
|
||||||
sm: {span: 5}
|
sm: { span: 5 }
|
||||||
},
|
},
|
||||||
wrapperCol: {
|
wrapperCol: {
|
||||||
xs: {span: 24},
|
xs: { span: 24 },
|
||||||
sm: {span: 16}
|
sm: { span: 16 }
|
||||||
},
|
},
|
||||||
graphDatasource: {
|
graphDatasource: {
|
||||||
nodes: [],
|
nodes: [],
|
||||||
edges: []
|
edges: []
|
||||||
},
|
},
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
departName: {rules: [{required: true, message: this.$t('EnterOrganizationDepartment')}]},
|
// departName: { rules: [{ required: true, message: this.$t('EnterOrganizationDepartment') }] },
|
||||||
orgCode: {rules: [{required: true, message: this.$t('enterOrganizationCode')}]},
|
// orgCode: { rules: [{ required: true, message: this.$t('enterOrganizationCode') }] },
|
||||||
orgCategory: {rules: [{required: true, message: this.$t('enterOrganizationType')}]},
|
// orgCategory: { rules: [{ required: true, message: this.$t('enterOrganizationType') }] },
|
||||||
mobile: {rules: [{validator: this.validateMobile}]}
|
// mobile: { rules: [{ validator: this.validateMobile }] }
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
delete: '/sys/sysDepart/delete',
|
delete: '/sys/sysDepart/delete',
|
||||||
edit: '/sys/sysDepart/edit',
|
edit: '/sys/sysDepart/edit',
|
||||||
deleteBatch: '/sys/sysDepart/deleteBatch',
|
deleteBatch: '/sys/sysDepart/deleteBatch',
|
||||||
exportXlsUrl: "sys/sysDepart/exportXls",
|
exportXlsUrl: 'sys/sysDepart/exportXls',
|
||||||
importExcelUrl: "sys/sysDepart/importExcel",
|
importExcelUrl: 'sys/sysDepart/importExcel'
|
||||||
},
|
},
|
||||||
orgCategoryDisabled:false,
|
orgCategoryDisabled: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
importExcelUrl: function () {
|
importExcelUrl: function() {
|
||||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadData() {
|
loadData() {
|
||||||
this.refresh();
|
this.refresh()
|
||||||
},
|
},
|
||||||
loadTree() {
|
loadTree() {
|
||||||
var that = this
|
var that = this
|
||||||
@@ -292,13 +298,13 @@
|
|||||||
queryDepartTreeList().then((res) => {
|
queryDepartTreeList().then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
//部门全选后,再添加部门,选中数量增多
|
//部门全选后,再添加部门,选中数量增多
|
||||||
this.allTreeKeys = [];
|
this.allTreeKeys = []
|
||||||
for (let i = 0; i < res.result.length; i++) {
|
for (let i = 0; i < res.result.length; i++) {
|
||||||
let temp = res.result[i]
|
let temp = res.result[i]
|
||||||
that.treeData.push(temp)
|
that.treeData.push(temp)
|
||||||
that.departTree.push(temp)
|
that.departTree.push(temp)
|
||||||
that.setThisExpandedKeys(temp)
|
that.setThisExpandedKeys(temp)
|
||||||
that.getAllKeys(temp);
|
that.getAllKeys(temp)
|
||||||
// console.log(temp.id)
|
// console.log(temp.id)
|
||||||
}
|
}
|
||||||
this.loading = false
|
this.loading = false
|
||||||
@@ -326,10 +332,7 @@
|
|||||||
},
|
},
|
||||||
onExpand(expandedKeys) {
|
onExpand(expandedKeys) {
|
||||||
console.log('onExpand', expandedKeys)
|
console.log('onExpand', expandedKeys)
|
||||||
// if not set autoExpandParent to false, if children expanded, parent can not collapse.
|
|
||||||
// or, you can remove all expanded children keys.
|
|
||||||
this.iExpandedKeys = expandedKeys
|
this.iExpandedKeys = expandedKeys
|
||||||
this.autoExpandParent = false
|
|
||||||
},
|
},
|
||||||
backFlowList() {
|
backFlowList() {
|
||||||
this.$router.back(-1)
|
this.$router.back(-1)
|
||||||
@@ -347,8 +350,7 @@
|
|||||||
addRootNode() {
|
addRootNode() {
|
||||||
this.$refs.nodeModal.add(this.currFlowId, '')
|
this.$refs.nodeModal.add(this.currFlowId, '')
|
||||||
},
|
},
|
||||||
batchDel: function () {
|
batchDel: function() {
|
||||||
console.log(this.checkedKeys)
|
|
||||||
if (this.checkedKeys.length <= 0) {
|
if (this.checkedKeys.length <= 0) {
|
||||||
this.$message.warning(this.$t('selectARecored'))
|
this.$message.warning(this.$t('selectARecored'))
|
||||||
} else {
|
} else {
|
||||||
@@ -360,8 +362,8 @@
|
|||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: this.$t('confirmDeletion'),
|
title: this.$t('confirmDeletion'),
|
||||||
content: this.$t('sureDeleteSelected') + this.checkedKeys.length + this.$t('pieceData'),
|
content: this.$t('sureDeleteSelected') + this.checkedKeys.length + this.$t('pieceData'),
|
||||||
onOk: function () {
|
onOk: function() {
|
||||||
deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => {
|
deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success(res.message)
|
that.$message.success(res.message)
|
||||||
that.loadTree()
|
that.loadTree()
|
||||||
@@ -377,7 +379,7 @@
|
|||||||
onSearch(value) {
|
onSearch(value) {
|
||||||
let that = this
|
let that = this
|
||||||
if (value) {
|
if (value) {
|
||||||
searchByKeywords({keyWord: value}).then((res) => {
|
searchByKeywords({ keyWord: value }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.departTree = []
|
that.departTree = []
|
||||||
for (let i = 0; i < res.result.length; i++) {
|
for (let i = 0; i < res.result.length; i++) {
|
||||||
@@ -403,16 +405,12 @@
|
|||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
onCheck(checkedKeys, info) {
|
onCheck(checkedKeys, info) {
|
||||||
console.log('onCheck', checkedKeys, info)
|
|
||||||
this.hiding = false
|
this.hiding = false
|
||||||
//this.checkedKeys = checkedKeys.checked
|
if (this.checkStrictly) {
|
||||||
// <!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
|
this.checkedKeys = checkedKeys.checked
|
||||||
if(this.checkStrictly){
|
} else {
|
||||||
this.checkedKeys = checkedKeys.checked;
|
|
||||||
}else{
|
|
||||||
this.checkedKeys = checkedKeys
|
this.checkedKeys = checkedKeys
|
||||||
}
|
}
|
||||||
// <!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
|
|
||||||
},
|
},
|
||||||
onSelect(selectedKeys, e) {
|
onSelect(selectedKeys, e) {
|
||||||
console.log('selected', selectedKeys, e)
|
console.log('selected', selectedKeys, e)
|
||||||
@@ -424,21 +422,21 @@
|
|||||||
this.selectedKeys = [record.key]
|
this.selectedKeys = [record.key]
|
||||||
this.model.parentId = record.parentId
|
this.model.parentId = record.parentId
|
||||||
this.setValuesToForm(record)
|
this.setValuesToForm(record)
|
||||||
this.$refs.departAuth.show(record.id);
|
this.$refs.departAuth.show(record.id)
|
||||||
// 传用户信息参数
|
// 传用户信息参数
|
||||||
this.$refs.DeptUserInfo.open(record)
|
this.$refs.DeptUserInfo.open(record)
|
||||||
|
|
||||||
},
|
},
|
||||||
// 触发onSelect事件时,为部门树右侧的form表单赋值
|
// 触发onSelect事件时,为部门树右侧的form表单赋值
|
||||||
setValuesToForm(record) {
|
setValuesToForm(record) {
|
||||||
if(record.orgCategory == '1'){
|
if (record.orgCategory == '1') {
|
||||||
this.orgCategoryDisabled = true;
|
this.orgCategoryDisabled = true
|
||||||
}else{
|
} else {
|
||||||
this.orgCategoryDisabled = false;
|
this.orgCategoryDisabled = false
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.getFieldDecorator('fax', {initialValue: ''})
|
this.form.getFieldDecorator('fax', { initialValue: '' })
|
||||||
this.form.setFieldsValue(pick(record, 'departName','orgCategory', 'orgCode', 'departOrder', 'mobile', 'fax', 'address', 'memo'))
|
this.form.setFieldsValue(pick(record, 'departName', 'orgCategory', 'orgCode', 'departOrder', 'mobile', 'fax', 'address', 'memo'))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getCurrSelectedTitle() {
|
getCurrSelectedTitle() {
|
||||||
@@ -517,16 +515,16 @@
|
|||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: this.$t('confirmDeletion'),
|
title: this.$t('confirmDeletion'),
|
||||||
content: this.$t('deleteDepartmentData'),
|
content: this.$t('deleteDepartmentData'),
|
||||||
onOk: function () {
|
onOk: function() {
|
||||||
deleteByDepartId({id: that.rightClickSelectedKey}).then((resp) => {
|
deleteByDepartId({ id: that.rightClickSelectedKey }).then((resp) => {
|
||||||
if (resp.success) {
|
if (resp.success) {
|
||||||
//删除成功后,去除已选中中的数据
|
//删除成功后,去除已选中中的数据
|
||||||
that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1);
|
that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1)
|
||||||
that.$message.success(this.$t('DeleteSucceeded'))
|
that.$message.success(this.$t('DeleteSucceeded'))
|
||||||
that.loadTree()
|
that.loadTree()
|
||||||
//删除后同步清空右侧基本信息内容
|
//删除后同步清空右侧基本信息内容
|
||||||
let orgCode=that.form.getFieldValue("orgCode");
|
let orgCode = that.form.getFieldValue('orgCode')
|
||||||
if(orgCode && orgCode === that.rightClickSelectedOrgCode){
|
if (orgCode && orgCode === that.rightClickSelectedOrgCode) {
|
||||||
that.onClearSelected()
|
that.onClearSelected()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -538,7 +536,7 @@
|
|||||||
},
|
},
|
||||||
selectDirectiveOk(record) {
|
selectDirectiveOk(record) {
|
||||||
// console.log('选中指令数据', record)
|
// console.log('选中指令数据', record)
|
||||||
this.nodeSettingForm.setFieldsValue({directiveCode: record.directiveCode})
|
this.nodeSettingForm.setFieldsValue({ directiveCode: record.directiveCode })
|
||||||
this.currSelected.sysCode = record.sysCode
|
this.currSelected.sysCode = record.sysCode
|
||||||
},
|
},
|
||||||
getFlowGraphData(node) {
|
getFlowGraphData(node) {
|
||||||
@@ -557,28 +555,21 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// <!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
|
// <!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
|
||||||
expandAll () {
|
expandAll() {
|
||||||
this.iExpandedKeys = this.allTreeKeys
|
this.iExpandedKeys = this.allTreeKeys
|
||||||
},
|
},
|
||||||
closeAll () {
|
closeAll() {
|
||||||
this.iExpandedKeys = []
|
this.iExpandedKeys = []
|
||||||
},
|
},
|
||||||
checkALL () {
|
checkALL() {
|
||||||
this.checkStriccheckStrictlytly = false
|
this.checkStriccheckStrictlytly = false
|
||||||
this.checkedKeys = this.allTreeKeys
|
this.checkedKeys = this.allTreeKeys
|
||||||
},
|
},
|
||||||
cancelCheckALL () {
|
cancelCheckALL() {
|
||||||
//this.checkedKeys = this.defaultCheckedKeys
|
//this.checkedKeys = this.defaultCheckedKeys
|
||||||
this.checkedKeys = []
|
this.checkedKeys = []
|
||||||
},
|
},
|
||||||
// switchCheckStrictly (v) {
|
|
||||||
// if(v==1){
|
|
||||||
// this.checkStrictly = false
|
|
||||||
// }else if(v==2){
|
|
||||||
// this.checkStrictly = true
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
getAllKeys(node) {
|
getAllKeys(node) {
|
||||||
// console.log('node',node);
|
// console.log('node',node);
|
||||||
this.allTreeKeys.push(node.key)
|
this.allTreeKeys.push(node.key)
|
||||||
@@ -595,7 +586,7 @@
|
|||||||
this.currFlowId = this.$route.params.id
|
this.currFlowId = this.$route.params.id
|
||||||
this.currFlowName = this.$route.params.name
|
this.currFlowName = this.$route.params.name
|
||||||
// this.loadTree()
|
// this.loadTree()
|
||||||
},
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -659,4 +650,7 @@
|
|||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 0 0 2px 2px;
|
border-radius: 0 0 2px 2px;
|
||||||
}
|
}
|
||||||
|
.box-ant{
|
||||||
|
margin-right: 0!important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -10,15 +10,10 @@
|
|||||||
<a-input :placeholder="$t('enterAccountNumber')" v-model="queryParam.username"></a-input>
|
<a-input :placeholder="$t('enterAccountNumber')" v-model="queryParam.username"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<!--<a-col :md="8" :sm="8">-->
|
<span style="float: left;overflow: hidden;margin-top: 1px" class="table-page-search-submitButtons">
|
||||||
<!--<a-form-item label="用户名称" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">-->
|
|
||||||
<!--<a-input placeholder="请输入名称查询" v-model="queryParam.realname"></a-input>-->
|
|
||||||
<!--</a-form-item>-->
|
|
||||||
<!--</a-col>-->
|
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
|
||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 18px">{{$t('query')}}</a-button>
|
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
|
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</span>
|
</span>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -27,72 +22,66 @@
|
|||||||
<!-- 操作按钮区域 -->
|
<!-- 操作按钮区域 -->
|
||||||
<div class="table-operator" :md="24" :sm="24" style="margin-top: -15px">
|
<div class="table-operator" :md="24" :sm="24" style="margin-top: -15px">
|
||||||
<!--<a-button @click="handleEdit" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
|
<!--<a-button @click="handleEdit" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
|
||||||
<a-button @click="handleAddUserDepart" type="primary" icon="plus">{{$t('AddExistingUsers')}}</a-button>
|
<!-- <a-button @click="handleAddUserDepart" type="primary" icon="plus">{{$t('AddExistingUsers')}}</a-button>-->
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus" style="margin-top: 16px">{{$t('newUser')}}</a-button>
|
<!-- <a-button @click="handleAdd" type="primary" icon="plus" style="margin-top: 16px">{{$t('newUser')}}</a-button>-->
|
||||||
|
|
||||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
|
||||||
<a-menu slot="overlay">
|
<!-- <a-menu slot="overlay">-->
|
||||||
<a-menu-item key="1" @click="batchDel">
|
<!-- <a-menu-item key="1" @click="batchDel">-->
|
||||||
<a-icon type="delete"/>
|
<!-- <a-icon type="delete"/>-->
|
||||||
{{$t('disassociate')}}
|
<!-- {{$t('disassociate')}}-->
|
||||||
</a-menu-item>
|
<!-- </a-menu-item>-->
|
||||||
</a-menu>
|
<!-- </a-menu>-->
|
||||||
<a-button style="margin-left: 8px"> {{$t('batchOperation')}}
|
<!-- <a-button style="margin-left: 8px"> {{$t('batchOperation')}}-->
|
||||||
<a-icon type="down"/>
|
<!-- <a-icon type="down"/>-->
|
||||||
</a-button>
|
<!-- </a-button>-->
|
||||||
</a-dropdown>
|
<!-- </a-dropdown>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- table区域-begin -->
|
<!-- table区域-begin -->
|
||||||
<div>
|
<div>
|
||||||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
|
||||||
<i class="anticon anticon-info-circle ant-alert-icon"></i> {{$t('selected')}} <a style="font-weight: 600">{{
|
<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> {{$t('selected')}} <a style="font-weight: 600">{{-->
|
||||||
selectedRowKeys.length }}</a> {{$t('term')}}
|
<!-- selectedRowKeys.length }}</a> {{$t('term')}}-->
|
||||||
<a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>
|
<!-- <a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"-->
|
||||||
|
<!-- rowKey="id" bordered-->
|
||||||
<a-table
|
<a-table
|
||||||
ref="table"
|
ref="table"
|
||||||
size="middle"
|
size="middle"
|
||||||
bordered
|
|
||||||
rowKey="id"
|
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="ipagination"
|
:pagination="ipagination"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
|
||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
|
|
||||||
|
<!-- <span slot="action" slot-scope="text, record">-->
|
||||||
|
<!-- <a @click="handleEdit(record)">{{$t('edit')}}</a>-->
|
||||||
|
|
||||||
|
<!-- <a-divider type="vertical"/>-->
|
||||||
|
|
||||||
<span slot="action" slot-scope="text, record">
|
<!-- <a-dropdown>-->
|
||||||
<a @click="handleEdit(record)">{{$t('edit')}}</a>
|
<!-- <a class="ant-dropdown-link">-->
|
||||||
|
<!-- {{$t('more')}} <a-icon type="down"/>-->
|
||||||
<a-divider type="vertical"/>
|
<!-- </a>-->
|
||||||
|
<!-- <a-menu slot="overlay">-->
|
||||||
<a-dropdown>
|
<!-- <a-menu-item>-->
|
||||||
<a class="ant-dropdown-link">
|
<!-- <a href="javascript:;" @click="handleDeptRole(record)">{{$t('AssignDepartmentRoles')}}</a>-->
|
||||||
{{$t('more')}} <a-icon type="down"/>
|
<!-- </a-menu-item>-->
|
||||||
</a>
|
|
||||||
<a-menu slot="overlay">
|
|
||||||
<a-menu-item>
|
|
||||||
<a href="javascript:;" @click="handleDeptRole(record)">{{$t('AssignDepartmentRoles')}}</a>
|
|
||||||
</a-menu-item>
|
|
||||||
|
|
||||||
<a-menu-item>
|
|
||||||
<a href="javascript:;" @click="handleDetail(record)">{{$t('userDetail')}}</a>
|
|
||||||
</a-menu-item>
|
|
||||||
|
|
||||||
<a-menu-item>
|
|
||||||
<a-popconfirm :title="$t('AreYouCancelAssociation')" @confirm="() => handleDelete(record.id)">
|
|
||||||
<a>{{$t('disassociate')}}</a>
|
|
||||||
</a-popconfirm>
|
|
||||||
</a-menu-item>
|
|
||||||
</a-menu>
|
|
||||||
</a-dropdown>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
|
<!-- <a-menu-item>-->
|
||||||
|
<!-- <a href="javascript:;" @click="handleDetail(record)">{{$t('userDetail')}}</a>-->
|
||||||
|
<!-- </a-menu-item>-->
|
||||||
|
|
||||||
|
<!-- <a-menu-item>-->
|
||||||
|
<!-- <a-popconfirm :title="$t('AreYouCancelAssociation')" @confirm="() => handleDelete(record.id)">-->
|
||||||
|
<!-- <a>{{$t('disassociate')}}</a>-->
|
||||||
|
<!-- </a-popconfirm>-->
|
||||||
|
<!-- </a-menu-item>-->
|
||||||
|
<!-- </a-menu>-->
|
||||||
|
<!-- </a-dropdown>-->
|
||||||
|
<!-- </span>-->
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
<!-- table区域-end -->
|
<!-- table区域-end -->
|
||||||
|
|||||||
Reference in New Issue
Block a user