commit
3b49f1e92e
|
|
@ -29,12 +29,20 @@ export const getAdvanceSearchCondition = (params) => {
|
||||||
return WeaTools.callApi('/api/bs/hrmorganization/dept/getSearchCondition', 'GET', params);
|
return WeaTools.callApi('/api/bs/hrmorganization/dept/getSearchCondition', 'GET', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getHrmListByJobId = (params) => {
|
export const getPostionTable = (params) => {
|
||||||
return WeaTools.callApi('/api/bs/hrmorganization/job/getHrmListByJobId', 'GET', params);
|
return WeaTools.callApi('/api/bs/hrmorganization/dept/getJobListByPid', 'GET', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getCopyForm = (params) => {
|
export const getCopyForm = (params) => {
|
||||||
return WeaTools.callApi('/api/bs/hrmorganization/job/getCopyForm', 'GET', params);
|
return WeaTools.callApi('/api/bs/hrmorganization/dept/getCopyForm', 'GET', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getMergeForm = (params) => {
|
||||||
|
return WeaTools.callApi('/api/bs/hrmorganization/dept/getMergeForm', 'GET', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getTransferForm = (params) => {
|
||||||
|
return WeaTools.callApi('/api/bs/hrmorganization/dept/getMoveForm', 'GET', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const add = (params) => {
|
export const add = (params) => {
|
||||||
|
|
@ -49,7 +57,29 @@ export const add = (params) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const copy = (params) => {
|
export const copy = (params) => {
|
||||||
return fetch('/api/bs/hrmorganization/job/copyJobItem', {
|
return fetch('/api/bs/hrmorganization/dept/copyDepartment', {
|
||||||
|
method: 'POST',
|
||||||
|
mode: 'cors',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify(params)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const merge = (params) => {
|
||||||
|
return fetch('/api/bs/hrmorganization/dept/mergeDepartment', {
|
||||||
|
method: 'POST',
|
||||||
|
mode: 'cors',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify(params)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const transfer = (params) => {
|
||||||
|
return fetch('/api/bs/hrmorganization/dept/moveDepartment', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
mode: 'cors',
|
mode: 'cors',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* @Author: 程亮
|
* @Author: 程亮
|
||||||
* @Date: 2022-05-18 16:23:32
|
* @Date: 2022-05-18 16:23:32
|
||||||
* @LastEditTime: 2022-06-01 17:15:50
|
* @LastEditTime: 2022-06-06 14:21:43
|
||||||
* @Description:
|
* @Description:
|
||||||
* @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js
|
* @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js
|
||||||
*/
|
*/
|
||||||
|
|
@ -271,12 +271,10 @@ export default class Company extends React.Component {
|
||||||
c.render = function (text, record) {
|
c.render = function (text, record) {
|
||||||
const menu = (
|
const menu = (
|
||||||
<Menu>
|
<Menu>
|
||||||
{
|
<Menu.Item key="1" disabled={record.isUsed === 0 ? false : true} style={record.isUsed === 0 ?{display:'block'} :{display:'none'}}>
|
||||||
record.isUsed === 0 ? <Menu.Item>
|
<a href='javascript:void(0);' onClick={() => { _this.doDel(record.id) }}>删除</a>
|
||||||
<a href='javascript:void(0);' onClick={() => { _this.doDel(record.id) }}>删除</a>
|
</Menu.Item>
|
||||||
</Menu.Item> : ''
|
<Menu.Item key="2">
|
||||||
}
|
|
||||||
<Menu.Item>
|
|
||||||
<a href='javascript:void(0);' onClick={() => { _this.select(record.id) }}>联查部门</a>
|
<a href='javascript:void(0);' onClick={() => { _this.select(record.id) }}>联查部门</a>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
|
@ -402,6 +400,7 @@ export default class Company extends React.Component {
|
||||||
} = company;
|
} = company;
|
||||||
|
|
||||||
const rowSelection = {
|
const rowSelection = {
|
||||||
|
type: "checkbox",
|
||||||
onChange(selectedRowKeys, selectedRows) {
|
onChange(selectedRowKeys, selectedRows) {
|
||||||
company.setSelectedRowKeys(selectedRowKeys);
|
company.setSelectedRowKeys(selectedRowKeys);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ export default class NewPopconfirm extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
width: 700,
|
padding: "20px"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -38,19 +38,25 @@ export default class NewPopconfirm extends React.Component {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
isFormInit && condition.map(c => {
|
isFormInit && condition.map(c => {
|
||||||
c.items.map((field, index) => {
|
c.items.map((field, index) => {
|
||||||
arr.push(<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@jacv6v@${index}`}
|
arr.push(<WeaFormItem style={{ margin: "10px" }} ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@jacv6v@${index}`}
|
||||||
label={`${field.label}`}
|
label={`${field.label}`}
|
||||||
labelCol={{ span: `${field.labelcol}` }}
|
labelCol={{ span: `${field.labelcol}` }}
|
||||||
error={form.getError(field)}
|
error={form.getError(field)}
|
||||||
tipPosition="bottom"
|
tipPosition="bottom"
|
||||||
wrapperCol={{ span: `${field.fieldcol}` }}>
|
wrapperCol={{ span: `${field.fieldcol}` }}>
|
||||||
{<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@7vxyfr@${index}`} fieldConfig={field} form={form} formParams={form.getFormParams()} />}
|
{<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@7vxyfr@${index}`} fieldConfig={field} form={form} formParams={form.getFormParams()}
|
||||||
|
onChange={this.onChange} />}
|
||||||
</WeaFormItem>)
|
</WeaFormItem>)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
return <div className="wea-form-item-group">{arr}</div>
|
return <div className="wea-form-item-group">{arr}</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onChange = data => {
|
||||||
|
debugger
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
title,
|
title,
|
||||||
|
|
@ -59,8 +65,9 @@ export default class NewPopconfirm extends React.Component {
|
||||||
onCancel,
|
onCancel,
|
||||||
loading,
|
loading,
|
||||||
height,
|
height,
|
||||||
|
width
|
||||||
} = this.props, {
|
} = this.props, {
|
||||||
width,
|
padding
|
||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
const buttons = [
|
const buttons = [
|
||||||
|
|
@ -84,7 +91,7 @@ export default class NewPopconfirm extends React.Component {
|
||||||
loading ? <div className='hrm-loading-center-small'>
|
loading ? <div className='hrm-loading-center-small'>
|
||||||
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@4ygl4a`} spinning={loading}></Spin>
|
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@4ygl4a`} spinning={loading}></Spin>
|
||||||
</div>
|
</div>
|
||||||
: this.getForm()
|
: this.getForm()
|
||||||
}
|
}
|
||||||
</WeaDialog>
|
</WeaDialog>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* @Author: 程亮
|
* @Author: 程亮
|
||||||
* @Date: 2022-06-02 09:19:37
|
* @Date: 2022-06-02 09:19:37
|
||||||
* @LastEditTime: 2022-06-02 16:41:55
|
* @LastEditTime: 2022-06-06 16:40:18
|
||||||
* @Description:
|
* @Description:
|
||||||
* @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js
|
* @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js
|
||||||
*/
|
*/
|
||||||
|
|
@ -42,8 +42,8 @@
|
||||||
import '../../style/common.less';
|
import '../../style/common.less';
|
||||||
|
|
||||||
import NewAndEditDialog from '../NewAndEditDialog';
|
import NewAndEditDialog from '../NewAndEditDialog';
|
||||||
import NewWeaTableDialog from '../NewWeaTableDialog';
|
import NewTableDialog from '../NewTableDialog';
|
||||||
import NewPopconfirm from './NewPopconfirm'
|
import NewPopconfirm from './NewPopconfirm'
|
||||||
|
|
||||||
const toJS = mobx.toJS;
|
const toJS = mobx.toJS;
|
||||||
const confirm = Modal.confirm;
|
const confirm = Modal.confirm;
|
||||||
|
|
@ -132,13 +132,14 @@ import NewPopconfirm from './NewPopconfirm'
|
||||||
|
|
||||||
//联查岗位
|
//联查岗位
|
||||||
select(id) {
|
select(id) {
|
||||||
// const {
|
const {
|
||||||
// department
|
department
|
||||||
// } = this.props;
|
} = this.props;
|
||||||
|
|
||||||
// department.setNeDialogTitle("联查人员");
|
department.setNeDialogTitle("联查岗位");
|
||||||
// department.setVisible(true);
|
department.setVisible(true);
|
||||||
// department.getHrmTable(id);
|
department.setDialogLoadingStatus(true);
|
||||||
|
department.getPostionTable(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -149,8 +150,10 @@ import NewPopconfirm from './NewPopconfirm'
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
department.setNeDialogTitle(i18n.label.mergeDept());
|
department.setNeDialogTitle(i18n.label.mergeDept());
|
||||||
department.confirmVisible(true);
|
department.setConfirmVisible(true);
|
||||||
department.getMergeForm();
|
department.setIds(id);
|
||||||
|
department.setIsMerge(true);
|
||||||
|
department.getMergeForm(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
//转移
|
//转移
|
||||||
|
|
@ -159,9 +162,11 @@ import NewPopconfirm from './NewPopconfirm'
|
||||||
department
|
department
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
department.setNeDialogTitle(i18n.label.mergeDept());
|
department.setNeDialogTitle(i18n.label.transferDept());
|
||||||
department.confirmVisible(true);
|
department.setConfirmVisible(true);
|
||||||
department.getTransferForm();
|
department.setIds(id);
|
||||||
|
department.setIsMerge(false);
|
||||||
|
department.getTransferForm(id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -331,18 +336,16 @@ import NewPopconfirm from './NewPopconfirm'
|
||||||
c.render = function (text, record) {
|
c.render = function (text, record) {
|
||||||
const menu = (
|
const menu = (
|
||||||
<Menu>
|
<Menu>
|
||||||
{
|
<Menu.Item key="1" disabled={record.isUsed === 0 ? false : true} style={record.isUsed === 0 ? {display:'block'} : {display:'none'}}>
|
||||||
record.isUsed === 0 ? <Menu.Item>
|
<a href='javascript:void(0);' onClick={() => { _this.doDel(record.id) }}>删除</a>
|
||||||
<a href='javascript:void(0);' onClick={() => { _this.doDel(record.id) }}>删除</a>
|
</Menu.Item>
|
||||||
</Menu.Item> : ''
|
<Menu.Item key="2">
|
||||||
}
|
|
||||||
<Menu.Item>
|
|
||||||
<a href='javascript:void(0);' onClick={() => { _this.merge(record.id) }}>合并</a>
|
<a href='javascript:void(0);' onClick={() => { _this.merge(record.id) }}>合并</a>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
<Menu.Item>
|
<Menu.Item key="3">
|
||||||
<a href='javascript:void(0);' onClick={() => { _this.transfer(record.id) }}>转移</a>
|
<a href='javascript:void(0);' onClick={() => { _this.transfer(record.id) }}>转移</a>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
<Menu.Item>
|
<Menu.Item key="4">
|
||||||
<a href='javascript:void(0);' onClick={() => { _this.select(record.id) }}>联查岗位</a>
|
<a href='javascript:void(0);' onClick={() => { _this.select(record.id) }}>联查岗位</a>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
|
@ -372,6 +375,15 @@ import NewPopconfirm from './NewPopconfirm'
|
||||||
} = this.props;
|
} = this.props;
|
||||||
department.save();
|
department.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PopconfirmSave() {
|
||||||
|
const {
|
||||||
|
department
|
||||||
|
} = this.props;
|
||||||
|
const {isMerge} = department;
|
||||||
|
isMerge && department.merge();
|
||||||
|
!isMerge && department.transfer();
|
||||||
|
}
|
||||||
|
|
||||||
getTabBtn() {
|
getTabBtn() {
|
||||||
const {
|
const {
|
||||||
|
|
@ -514,10 +526,11 @@ import NewPopconfirm from './NewPopconfirm'
|
||||||
isPanelShow, departmentName, conditionNum, visible, condition, form,
|
isPanelShow, departmentName, conditionNum, visible, condition, form,
|
||||||
tableStore, dataSource, columns, loading, date, nEdialogTitle, dialogLoading,
|
tableStore, dataSource, columns, loading, date, nEdialogTitle, dialogLoading,
|
||||||
form1, isEdit, newVisible, jobDataSource, jobColumns, selectedRowKeys, total, current, pageSize, init,
|
form1, isEdit, newVisible, jobDataSource, jobColumns, selectedRowKeys, total, current, pageSize, init,
|
||||||
defaultShowLeft,confirmVisible,confirmLoading
|
defaultShowLeft,confirmVisible,confirmLoading,postionDataSource,postionColumns,isMerge
|
||||||
} = department;
|
} = department;
|
||||||
|
|
||||||
const rowSelection = {
|
const rowSelection = {
|
||||||
|
type:"checkbox",
|
||||||
onChange(selectedRowKeys, selectedRows) {
|
onChange(selectedRowKeys, selectedRows) {
|
||||||
department.setSelectedRowKeys(selectedRowKeys);
|
department.setSelectedRowKeys(selectedRowKeys);
|
||||||
},
|
},
|
||||||
|
|
@ -597,13 +610,15 @@ import NewPopconfirm from './NewPopconfirm'
|
||||||
</WeaLeftRightLayout>
|
</WeaLeftRightLayout>
|
||||||
</WeaTop>
|
</WeaTop>
|
||||||
</WeaRightMenu>
|
</WeaRightMenu>
|
||||||
<NewWeaTableDialog ecId={`${this && this.props && this.props.ecId || ''}_NewTableDialog@q4rrwm`}
|
<NewTableDialog ecId={`${this && this.props && this.props.ecId || ''}_NewTableDialog@q4rrwm`}
|
||||||
title={nEdialogTitle}
|
title={nEdialogTitle}
|
||||||
visible={visible}
|
visible={visible}
|
||||||
height={400}
|
loading={dialogLoading}
|
||||||
tableStore={tableStore}
|
height={400}
|
||||||
onCancel={() => department.setVisible(false)}
|
dataSource={postionDataSource} //联查岗位数据
|
||||||
/>
|
columns={postionColumns}
|
||||||
|
onCancel={() => department.setVisible(false)}
|
||||||
|
/>
|
||||||
<NewAndEditDialog ecId={`${this && this.props && this.props.ecId || ''}_NewAndEditDialog@q4rrwm`}
|
<NewAndEditDialog ecId={`${this && this.props && this.props.ecId || ''}_NewAndEditDialog@q4rrwm`}
|
||||||
title={nEdialogTitle}
|
title={nEdialogTitle}
|
||||||
visible={newVisible}
|
visible={newVisible}
|
||||||
|
|
@ -625,9 +640,11 @@ import NewPopconfirm from './NewPopconfirm'
|
||||||
form={form1}
|
form={form1}
|
||||||
isFormInit={form1.isFormInit}
|
isFormInit={form1.isFormInit}
|
||||||
loading={confirmLoading}
|
loading={confirmLoading}
|
||||||
height={300}
|
height={isMerge ? 100 : 140}
|
||||||
save={() => this.handleSave()}
|
width={400}
|
||||||
onCancel={() => department.setNewVisible(false)}
|
isMerge={isMerge}
|
||||||
|
save={() => this.PopconfirmSave()}
|
||||||
|
onCancel={() => department.setConfirmVisible(false)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ import OfficeManage from "./components/office/officeManage";
|
||||||
import CompanyExtend from "./components/company/CompanyExtend";
|
import CompanyExtend from "./components/company/CompanyExtend";
|
||||||
import BranchNumSetting from "./components/branchNumSetting";
|
import BranchNumSetting from "./components/branchNumSetting";
|
||||||
import Company from "./components/company/company";
|
import Company from "./components/company/company";
|
||||||
import DepartmentManage from "./components/deptment";
|
|
||||||
import StaffScheme from "./components/staff/StaffScheme";
|
import StaffScheme from "./components/staff/StaffScheme";
|
||||||
import Staff from "./components/staff/Staff";
|
import Staff from "./components/staff/Staff";
|
||||||
import Job from "./components/job/Job";
|
import Job from "./components/job/Job";
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,7 @@ export const i18n = {
|
||||||
deptManage: () => getLabel(385936, '部门管理'),
|
deptManage: () => getLabel(385936, '部门管理'),
|
||||||
newDept: () => getLabel(386246, '新建部门'),
|
newDept: () => getLabel(386246, '新建部门'),
|
||||||
mergeDept:()=> getLabel(386246, '合并部门'),
|
mergeDept:()=> getLabel(386246, '合并部门'),
|
||||||
|
transferDept:()=> getLabel(386246, '转移部门'),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,457 +1,523 @@
|
||||||
import {
|
import {
|
||||||
observable,
|
observable,
|
||||||
action
|
action
|
||||||
} from 'mobx';
|
} from 'mobx';
|
||||||
import * as mobx from 'mobx';
|
import * as mobx from 'mobx';
|
||||||
import * as Api from '../apis/department'; // 引入API接口文件
|
import * as Api from '../apis/department'; // 引入API接口文件
|
||||||
import {
|
import {
|
||||||
WeaForm
|
WeaForm
|
||||||
} from 'comsMobx';
|
} from 'comsMobx';
|
||||||
import {
|
import {
|
||||||
WeaTableNew
|
WeaTableNew
|
||||||
} from 'comsMobx';
|
} from 'comsMobx';
|
||||||
import {
|
import {
|
||||||
Modal,
|
Modal,
|
||||||
message,
|
message,
|
||||||
} from 'antd'
|
} from 'antd'
|
||||||
import {
|
import {
|
||||||
i18n
|
i18n
|
||||||
} from '../public/i18n';
|
} from '../public/i18n';
|
||||||
|
|
||||||
const toJS = mobx.toJS;
|
const toJS = mobx.toJS;
|
||||||
const {
|
const {
|
||||||
TableStore
|
TableStore
|
||||||
} = WeaTableNew;
|
} = WeaTableNew;
|
||||||
|
|
||||||
|
|
||||||
export class DepartmentStore {
|
export class DepartmentStore {
|
||||||
@observable tableStore = new TableStore();
|
@observable tableStore = new TableStore();
|
||||||
@observable topMenu = []
|
@observable topMenu = []
|
||||||
@observable rightMenu = [];
|
@observable rightMenu = [];
|
||||||
@observable dataSource = [];
|
@observable dataSource = [];
|
||||||
@observable columns = [];
|
@observable columns = [];
|
||||||
@observable jobDataSource = [];
|
@observable loading = true;
|
||||||
@observable jobColumns = [];
|
@observable dialogLoading = true;
|
||||||
@observable loading = true;
|
@observable isEdit = true;
|
||||||
@observable dialogLoading = true;
|
@observable nEdialogTitle = '';
|
||||||
@observable isEdit = true;
|
@observable searchCondition = [];
|
||||||
@observable nEdialogTitle = '';
|
@observable condition = [];
|
||||||
@observable searchCondition = [];
|
@observable copyCondition = [];
|
||||||
@observable condition = [];
|
@observable isPanelShow = false; //高级搜索面板
|
||||||
@observable copyCondition = [];
|
@observable form = new WeaForm();
|
||||||
@observable isPanelShow = false; //高级搜索面板
|
@observable form1 = new WeaForm(); //新增主表表单
|
||||||
@observable form = new WeaForm();
|
@observable form2 = new WeaForm(); //复制表单
|
||||||
@observable form1 = new WeaForm(); //新增主表表单
|
@observable departmentName = '';
|
||||||
@observable form2 = new WeaForm(); //复制表单
|
@observable conditionNum = 8;
|
||||||
@observable departmentName = '';
|
@observable ids = ''; //选择行id
|
||||||
@observable conditionNum = 8;
|
@observable id = ''; //页面跳转参数id
|
||||||
@observable ids = ''; //选择行id
|
@observable searchConditionLoading = true;
|
||||||
@observable id = ''; //页面跳转参数id
|
@observable visible = false;
|
||||||
@observable searchConditionLoading = true;
|
@observable newVisible = false; //新增弹窗
|
||||||
@observable visible = false;
|
@observable departmentId = '';
|
||||||
@observable newVisible = false; //新增弹窗
|
@observable selectedRowKeys = '';
|
||||||
@observable departmentId = '';
|
@observable date = '';
|
||||||
@observable selectedRowKeys = '';
|
@observable init = true; //是否首次加载
|
||||||
@observable date = '';
|
@observable total = '';
|
||||||
@observable init = true; //是否首次加载
|
@observable current = 1;
|
||||||
@observable total = '';
|
@observable pageSize = 10;
|
||||||
@observable current = 1;
|
@observable defaultShowLeft = true;
|
||||||
@observable pageSize = 10;
|
@observable companysId = 1 //集团id
|
||||||
|
@observable postionDataSource = [];
|
||||||
@observable defaultShowLeft = true;
|
@observable postionColumns = [];
|
||||||
@observable companysId = 1 //集团id
|
|
||||||
|
@observable confirmVisible = false;
|
||||||
@observable confirmVisible = false;
|
@observable confirmLoading = true;
|
||||||
@observable confirmLoading = true;
|
@observable isMerge = true;
|
||||||
|
|
||||||
|
|
||||||
@action
|
@action
|
||||||
getTableInfo(params) {
|
getTableInfo(params) {
|
||||||
this.setLoading(true);
|
this.setLoading(true);
|
||||||
|
params = {
|
||||||
|
...params,
|
||||||
|
current: this.current,
|
||||||
|
pageSize: this.pageSize
|
||||||
|
}
|
||||||
|
if (this.isEmptyObject(this.form.getFormParams())) {
|
||||||
params = {
|
params = {
|
||||||
...params,
|
...params,
|
||||||
current: this.current,
|
...this.form.getFormParams(),
|
||||||
pageSize: this.pageSize
|
departmentName: this.departmentName
|
||||||
}
|
};
|
||||||
if (this.isEmptyObject(this.form.getFormParams())) {
|
} else {
|
||||||
params = {
|
params = {
|
||||||
...params,
|
...params,
|
||||||
...this.form.getFormParams(),
|
...this.form.getFormParams(),
|
||||||
departmentName: this.departmentName
|
};
|
||||||
};
|
}
|
||||||
|
Api.getSearchList(params).then(response => {
|
||||||
|
return response.json()
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
res.data.pageInfo.columns && this.setColumns(res.data.pageInfo.columns);
|
||||||
|
this.setTotal(res.data.pageInfo.total);
|
||||||
|
res.data.pageInfo.list && this.setDataSource(res.data.pageInfo.list);
|
||||||
|
this.setLoading(false);
|
||||||
|
this.setInit(false);
|
||||||
} else {
|
} else {
|
||||||
params = {
|
message.warning(res.msg);
|
||||||
...params,
|
|
||||||
...this.form.getFormParams(),
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
Api.getSearchList(params).then(response => {
|
}).catch(error => {
|
||||||
return response.json()
|
message.warning(error.msg);
|
||||||
}).then(res => {
|
})
|
||||||
if (res.code === 200) {
|
}
|
||||||
res.data.pageInfo.columns && this.setColumns(res.data.pageInfo.columns);
|
|
||||||
this.setTotal(res.data.pageInfo.total);
|
|
||||||
res.data.pageInfo.list && this.setDataSource(res.data.pageInfo.list);
|
|
||||||
this.setLoading(false);
|
|
||||||
this.setInit(false);
|
|
||||||
} else {
|
|
||||||
message.warning(res.msg);
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
message.warning(error.msg);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
@action("nodetree事件")
|
|
||||||
doSearch(params) {
|
|
||||||
this.setInit(true);
|
|
||||||
this.getTableInfo(params);
|
|
||||||
}
|
|
||||||
|
|
||||||
@action("联查人员")
|
|
||||||
getHrmTable(id) {
|
|
||||||
// let params = {
|
|
||||||
// departmentId: id
|
|
||||||
// }
|
|
||||||
// this.tableStore = new TableStore();
|
|
||||||
// Api.getHrmListBydepartmentId(params).then(res => {
|
|
||||||
// if (res.code === 200) {
|
|
||||||
// res.data.datas && this.tableStore.getDatas(res.data.datas, 1);
|
|
||||||
// } else {
|
|
||||||
// message.warning(res.msg);
|
|
||||||
// }
|
|
||||||
// }, error => {
|
|
||||||
// message.warning(error.msg);
|
|
||||||
// })
|
|
||||||
}
|
|
||||||
|
|
||||||
//删除
|
|
||||||
delete() {
|
|
||||||
let params = {
|
|
||||||
ids: this.ids
|
|
||||||
};
|
|
||||||
Api.deleteTableData(params).then(response => {
|
|
||||||
return response.json()
|
|
||||||
}).then(data => {
|
|
||||||
if (data.code === 200) {
|
|
||||||
message.success(i18n.message.deleteSuccess());
|
|
||||||
this.setSelectedRowKeys('');
|
|
||||||
this.getTableInfo();
|
|
||||||
} else {
|
|
||||||
message.warning(data.msg);
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
message.warning(error.msg);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
updateForbiddenTag(checked, id) {
|
|
||||||
let params = {
|
|
||||||
forbiddenTag: checked,
|
|
||||||
id: id
|
|
||||||
}
|
|
||||||
Api.updateForbiddenTag(params).then(response => {
|
|
||||||
return response.json()
|
|
||||||
}).then(data => {
|
|
||||||
if (data.code === 200) {
|
|
||||||
message.success(data.msg, 1);
|
|
||||||
} else {
|
|
||||||
message.warning(data.msg);
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
message.warning(error.msg);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
getSearchCondition() {
|
|
||||||
this.setScLoadingStatus(true);
|
|
||||||
Api.getAdvanceSearchCondition().then(res => {
|
|
||||||
if (res.code === 200) {
|
|
||||||
this.setScLoadingStatus(false);
|
|
||||||
res.data.conditions && this.setSearchCondition(res.data.conditions);
|
|
||||||
res.data.conditions && this.form.initFormFields(res.data.conditions);
|
|
||||||
} else {
|
|
||||||
message.warning(res.msg);
|
|
||||||
}
|
|
||||||
}, error => {
|
|
||||||
message.warning(error.msg);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
getDeptForm() {
|
|
||||||
let params = {};
|
|
||||||
this.setDialogLoadingStatus(true);
|
|
||||||
Api.getDeptForm(params).then(res => {
|
|
||||||
if (res.code === 200) {
|
|
||||||
this.setDialogLoadingStatus(false);
|
|
||||||
res.data.condition && this.setCondition(res.data.condition);
|
|
||||||
res.data.condition && this.form1.initFormFields(res.data.condition);
|
|
||||||
} else {
|
|
||||||
message.warning(res.msg);
|
|
||||||
}
|
|
||||||
}, error => {
|
|
||||||
message.warning(error.msg);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
@action("合并部门")
|
@action("nodetree事件")
|
||||||
getMergeForm() {
|
doSearch(params) {
|
||||||
// let params = {};
|
this.setInit(true);
|
||||||
// this.setConfirmLoading(true);
|
this.getTableInfo(params);
|
||||||
// Api.getDeptForm(params).then(res => {
|
}
|
||||||
// if (res.code === 200) {
|
|
||||||
// this.setConfirmLoading(false);
|
|
||||||
// res.data.condition && this.setCondition(res.data.condition);
|
|
||||||
// res.data.condition && this.form1.initFormFields(res.data.condition);
|
|
||||||
// } else {
|
|
||||||
// message.warning(res.msg);
|
|
||||||
// }
|
|
||||||
// }, error => {
|
|
||||||
// message.warning(error.msg);
|
|
||||||
// })
|
|
||||||
}
|
|
||||||
|
|
||||||
@action("转移部门")
|
@action("联查岗位")
|
||||||
getTransferForm() {
|
getPostionTable(id) {
|
||||||
// let params = {};
|
let params = {
|
||||||
// this.setConfirmLoading(true);
|
parentDept: id
|
||||||
// Api.getDeptForm(params).then(res => {
|
|
||||||
// if (res.code === 200) {
|
|
||||||
// this.setConfirmLoading(false);
|
|
||||||
// res.data.condition && this.setCondition(res.data.condition);
|
|
||||||
// res.data.condition && this.form1.initFormFields(res.data.condition);
|
|
||||||
// } else {
|
|
||||||
// message.warning(res.msg);
|
|
||||||
// }
|
|
||||||
// }, error => {
|
|
||||||
// message.warning(error.msg);
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
|
Api.getPostionTable(params).then(response => {
|
||||||
@action("复制表单")
|
return response.json()
|
||||||
getCopyForm() {
|
}).then(res => {
|
||||||
let params = {};
|
if (res.code === 200) {
|
||||||
Api.getCopyForm(params).then(res => {
|
res.data.list && this.setPostionDataSource(res.data.list);
|
||||||
if (res.code === 200) {
|
res.data.columns && this.setPostionColumns(res.data.columns);
|
||||||
res.data && this.setCopyCondition(res.data);
|
this.setDialogLoadingStatus(false);
|
||||||
res.data && this.form2.initFormFields(res.data);
|
} else {
|
||||||
} else {
|
message.warning(res.msg);
|
||||||
message.warning(res.msg);
|
|
||||||
}
|
|
||||||
}, error => {
|
|
||||||
message.warning(error.msg);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
save() {
|
|
||||||
let params = {
|
|
||||||
...this.form1.getFormParams()
|
|
||||||
};
|
|
||||||
this.form1.validateForm().then(f => {
|
|
||||||
if (f.isValid) {
|
|
||||||
Api.add(params).then(response => {
|
|
||||||
return response.json()
|
|
||||||
}).then(data => {
|
|
||||||
if (data.code === 200) {
|
|
||||||
message.success(data.msg);
|
|
||||||
this.getTableInfo();
|
|
||||||
this.setNewVisible(false);
|
|
||||||
} else {
|
|
||||||
message.warning(data.msg);
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
message.warning(error.msg);
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
f.showErrors();
|
|
||||||
this.setDate(new Date());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
copy() {
|
|
||||||
let params = {
|
|
||||||
ids: this.ids,
|
|
||||||
...this.form2.getFormParams()
|
|
||||||
};
|
|
||||||
Api.copy(params).then(response => {
|
|
||||||
return response.json()
|
|
||||||
}).then(data => {
|
|
||||||
if (data.code === 200) {
|
|
||||||
message.success(data.msg);
|
|
||||||
this.getTableInfo();
|
|
||||||
this.form2 = new WeaForm();
|
|
||||||
this.setSelectedRowKeys('');
|
|
||||||
} else {
|
|
||||||
message.error(data.msg);
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
message.warning(error.msg);
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@action
|
|
||||||
getHasRight() {
|
|
||||||
Api.getHasRight().then(res => {
|
|
||||||
if (res.code === 200) {
|
|
||||||
res.data.rightMenu && this.setRightMenu(res.data.rightMenu);
|
|
||||||
res.data.topMenu && this.setTopMenu(res.data.topMenu);
|
|
||||||
} else {
|
|
||||||
message.warning(res.msg);
|
|
||||||
}
|
|
||||||
}, error => {
|
|
||||||
message.warning(error.msg);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
updateFields(val) {
|
|
||||||
this.form.updateFields({
|
|
||||||
compName: {
|
|
||||||
value: val
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
setSearchCondition(condition) {
|
|
||||||
this.searchCondition = condition;
|
|
||||||
}
|
|
||||||
|
|
||||||
setScLoadingStatus(bool) {
|
|
||||||
this.searchConditionLoading = bool;
|
|
||||||
}
|
|
||||||
|
|
||||||
setPanelStatus(bool) {
|
|
||||||
this.isPanelShow = bool;
|
|
||||||
bool && this.getSearchCondition();
|
|
||||||
if (!bool) {
|
|
||||||
this.scLoadingReset();
|
|
||||||
}
|
}
|
||||||
}
|
}).catch(error => {
|
||||||
|
message.warning(error.msg);
|
||||||
setDepartmentName(val) {
|
})
|
||||||
this.departmentName = val;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
isEmptyObject(obj) {
|
|
||||||
for (let key in obj) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
setIds(ids) {
|
|
||||||
this.ids = ids;
|
|
||||||
}
|
|
||||||
|
|
||||||
setId(id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
scLoadingReset() {
|
|
||||||
this.searchConditionLoading = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
formReset() {
|
|
||||||
this.form1 = new WeaForm();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
setVisible(bool) {
|
|
||||||
this.visible = bool;
|
|
||||||
}
|
|
||||||
|
|
||||||
setDialogLoadingStatus(bool) {
|
|
||||||
this.dialogLoading = bool;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
setSearchCondition(searchCondition) {
|
|
||||||
this.searchCondition = searchCondition;
|
|
||||||
}
|
|
||||||
|
|
||||||
setDepartmentId(departmentId) {
|
|
||||||
this.departmentId = departmentId;
|
|
||||||
}
|
|
||||||
|
|
||||||
setDate(date) {
|
|
||||||
this.date = date;
|
|
||||||
}
|
|
||||||
|
|
||||||
setTopMenu(topMenu) {
|
|
||||||
this.topMenu = topMenu;
|
|
||||||
}
|
|
||||||
|
|
||||||
setRightMenu(rightMenu) {
|
|
||||||
this.rightMenu = rightMenu;
|
|
||||||
}
|
|
||||||
|
|
||||||
setDataSource(dataSource) {
|
|
||||||
this.dataSource = dataSource;
|
|
||||||
}
|
|
||||||
|
|
||||||
setJobDataSource(jobDataSource) {
|
|
||||||
this.jobDataSource = jobDataSource;
|
|
||||||
}
|
|
||||||
|
|
||||||
setColumns(columns) {
|
|
||||||
this.columns = columns
|
|
||||||
}
|
|
||||||
|
|
||||||
setJobColumns(jobColumns) {
|
|
||||||
this.jobColumns = jobColumns
|
|
||||||
}
|
|
||||||
|
|
||||||
setSelectedRowKeys(selectedRowKeys) {
|
|
||||||
this.selectedRowKeys = selectedRowKeys;
|
|
||||||
}
|
|
||||||
|
|
||||||
setLoading(bool) {
|
|
||||||
this.loading = bool;
|
|
||||||
}
|
|
||||||
|
|
||||||
setNeDialogTitle(title) {
|
|
||||||
this.nEdialogTitle = title
|
|
||||||
}
|
|
||||||
|
|
||||||
setCondition(condition) {
|
|
||||||
this.condition = condition;
|
|
||||||
}
|
|
||||||
|
|
||||||
setCopyCondition(copyCondition) {
|
|
||||||
this.copyCondition = copyCondition;
|
|
||||||
}
|
|
||||||
|
|
||||||
setNewVisible(bool) {
|
|
||||||
this.formReset();
|
|
||||||
this.newVisible = bool;
|
|
||||||
}
|
|
||||||
|
|
||||||
setTotal(total) {
|
|
||||||
this.total = total;
|
|
||||||
}
|
|
||||||
|
|
||||||
setCurrent(current) {
|
|
||||||
this.current = current;
|
|
||||||
}
|
|
||||||
|
|
||||||
setPageSize(pageSize) {
|
|
||||||
this.pageSize = pageSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
setInit(bool) {
|
|
||||||
this.init = bool;
|
|
||||||
}
|
|
||||||
|
|
||||||
setConfirmVisible(confirmVisible) {
|
|
||||||
this.confirmVisible = confirmVisible;
|
|
||||||
}
|
|
||||||
|
|
||||||
setConfirmLoading(confirmLoading) {
|
//删除
|
||||||
this.confirmLoading = confirmLoading;
|
delete() {
|
||||||
|
let params = {
|
||||||
|
ids: this.ids
|
||||||
|
};
|
||||||
|
Api.deleteTableData(params).then(response => {
|
||||||
|
return response.json()
|
||||||
|
}).then(data => {
|
||||||
|
if (data.code === 200) {
|
||||||
|
message.success(i18n.message.deleteSuccess());
|
||||||
|
this.setSelectedRowKeys('');
|
||||||
|
this.getTableInfo();
|
||||||
|
} else {
|
||||||
|
message.warning(data.msg);
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
updateForbiddenTag(checked, id) {
|
||||||
|
let params = {
|
||||||
|
forbiddenTag: checked,
|
||||||
|
id: id
|
||||||
}
|
}
|
||||||
}
|
Api.updateForbiddenTag(params).then(response => {
|
||||||
|
return response.json()
|
||||||
|
}).then(data => {
|
||||||
|
if (data.code === 200) {
|
||||||
|
message.success(data.msg, 1);
|
||||||
|
} else {
|
||||||
|
message.warning(data.msg);
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
getSearchCondition() {
|
||||||
|
this.setScLoadingStatus(true);
|
||||||
|
Api.getAdvanceSearchCondition().then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.setScLoadingStatus(false);
|
||||||
|
res.data.conditions && this.setSearchCondition(res.data.conditions);
|
||||||
|
res.data.conditions && this.form.initFormFields(res.data.conditions);
|
||||||
|
} else {
|
||||||
|
message.warning(res.msg);
|
||||||
|
}
|
||||||
|
}, error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
getDeptForm() {
|
||||||
|
let params = {};
|
||||||
|
this.setDialogLoadingStatus(true);
|
||||||
|
Api.getDeptForm(params).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.setDialogLoadingStatus(false);
|
||||||
|
res.data.condition && this.setCondition(res.data.condition);
|
||||||
|
res.data.condition && this.form1.initFormFields(res.data.condition);
|
||||||
|
} else {
|
||||||
|
message.warning(res.msg);
|
||||||
|
}
|
||||||
|
}, error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
@action("合并部门")
|
||||||
|
getMergeForm(id) {
|
||||||
|
let params = {
|
||||||
|
id:id
|
||||||
|
};
|
||||||
|
this.setConfirmLoading(true);
|
||||||
|
Api.getMergeForm(params).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.setConfirmLoading(false);
|
||||||
|
res.data && this.setCondition(res.data);
|
||||||
|
res.data && this.form1.initFormFields(res.data);
|
||||||
|
} else {
|
||||||
|
message.warning(res.msg);
|
||||||
|
}
|
||||||
|
}, error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
@action("转移部门")
|
||||||
|
getTransferForm(id) {
|
||||||
|
let params = {
|
||||||
|
id:id
|
||||||
|
};
|
||||||
|
this.setConfirmLoading(true);
|
||||||
|
Api.getTransferForm(params).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.setConfirmLoading(false);
|
||||||
|
res.data && this.setCondition(res.data);
|
||||||
|
res.data && this.form1.initFormFields(res.data);
|
||||||
|
} else {
|
||||||
|
message.warning(res.msg);
|
||||||
|
}
|
||||||
|
}, error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
@action("复制表单")
|
||||||
|
getCopyForm() {
|
||||||
|
let params = {};
|
||||||
|
Api.getCopyForm(params).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
res.data && this.setCopyCondition(res.data);
|
||||||
|
res.data && this.form2.initFormFields(res.data);
|
||||||
|
} else {
|
||||||
|
message.warning(res.msg);
|
||||||
|
}
|
||||||
|
}, error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
save() {
|
||||||
|
let params = {
|
||||||
|
...this.form1.getFormParams()
|
||||||
|
};
|
||||||
|
this.form1.validateForm().then(f => {
|
||||||
|
if (f.isValid) {
|
||||||
|
Api.add(params).then(response => {
|
||||||
|
return response.json()
|
||||||
|
}).then(data => {
|
||||||
|
if (data.code === 200) {
|
||||||
|
message.success(data.msg);
|
||||||
|
this.getTableInfo();
|
||||||
|
this.setNewVisible(false);
|
||||||
|
} else {
|
||||||
|
message.warning(data.msg);
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
|
this.setDate(new Date());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
merge() {
|
||||||
|
let params = {
|
||||||
|
id:this.ids,
|
||||||
|
...this.form1.getFormParams()
|
||||||
|
};
|
||||||
|
this.form1.validateForm().then(f => {
|
||||||
|
if (f.isValid) {
|
||||||
|
Api.merge(params).then(response => {
|
||||||
|
return response.json()
|
||||||
|
}).then(data => {
|
||||||
|
if (data.code === 200) {
|
||||||
|
message.success(data.msg);
|
||||||
|
this.getTableInfo();
|
||||||
|
this.setConfirmVisible(false);
|
||||||
|
} else {
|
||||||
|
message.warning(data.msg);
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
|
this.setDate(new Date());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
transfer() {
|
||||||
|
let params = {
|
||||||
|
id:this.ids,
|
||||||
|
...this.form1.getFormParams()
|
||||||
|
};
|
||||||
|
this.form1.validateForm().then(f => {
|
||||||
|
if (f.isValid) {
|
||||||
|
Api.transfer(params).then(response => {
|
||||||
|
return response.json()
|
||||||
|
}).then(data => {
|
||||||
|
if (data.code === 200) {
|
||||||
|
message.success(data.msg);
|
||||||
|
this.getTableInfo();
|
||||||
|
this.setConfirmVisible(false);
|
||||||
|
} else {
|
||||||
|
message.warning(data.msg);
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
f.showErrors();
|
||||||
|
this.setDate(new Date());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
copy() {
|
||||||
|
let params = {
|
||||||
|
ids: this.ids,
|
||||||
|
...this.form2.getFormParams()
|
||||||
|
};
|
||||||
|
Api.copy(params).then(response => {
|
||||||
|
return response.json()
|
||||||
|
}).then(data => {
|
||||||
|
if (data.code === 200) {
|
||||||
|
message.success(data.msg);
|
||||||
|
this.getTableInfo();
|
||||||
|
this.form2 = new WeaForm();
|
||||||
|
this.setSelectedRowKeys('');
|
||||||
|
} else {
|
||||||
|
message.error(data.msg);
|
||||||
|
}
|
||||||
|
}).catch(error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@action
|
||||||
|
getHasRight() {
|
||||||
|
Api.getHasRight().then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
res.data.rightMenu && this.setRightMenu(res.data.rightMenu);
|
||||||
|
res.data.topMenu && this.setTopMenu(res.data.topMenu);
|
||||||
|
} else {
|
||||||
|
message.warning(res.msg);
|
||||||
|
}
|
||||||
|
}, error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
updateFields(val) {
|
||||||
|
this.form.updateFields({
|
||||||
|
compName: {
|
||||||
|
value: val
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
setSearchCondition(condition) {
|
||||||
|
this.searchCondition = condition;
|
||||||
|
}
|
||||||
|
|
||||||
|
setScLoadingStatus(bool) {
|
||||||
|
this.searchConditionLoading = bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
setPanelStatus(bool) {
|
||||||
|
this.isPanelShow = bool;
|
||||||
|
bool && this.getSearchCondition();
|
||||||
|
if (!bool) {
|
||||||
|
this.scLoadingReset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setDepartmentName(val) {
|
||||||
|
this.departmentName = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
isEmptyObject(obj) {
|
||||||
|
for (let key in obj) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
setIds(ids) {
|
||||||
|
this.ids = ids;
|
||||||
|
}
|
||||||
|
|
||||||
|
setId(id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
scLoadingReset() {
|
||||||
|
this.searchConditionLoading = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
formReset() {
|
||||||
|
this.form1 = new WeaForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setVisible(bool) {
|
||||||
|
this.visible = bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
setDialogLoadingStatus(bool) {
|
||||||
|
this.dialogLoading = bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setSearchCondition(searchCondition) {
|
||||||
|
this.searchCondition = searchCondition;
|
||||||
|
}
|
||||||
|
|
||||||
|
setDepartmentId(departmentId) {
|
||||||
|
this.departmentId = departmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
setDate(date) {
|
||||||
|
this.date = date;
|
||||||
|
}
|
||||||
|
|
||||||
|
setTopMenu(topMenu) {
|
||||||
|
this.topMenu = topMenu;
|
||||||
|
}
|
||||||
|
|
||||||
|
setRightMenu(rightMenu) {
|
||||||
|
this.rightMenu = rightMenu;
|
||||||
|
}
|
||||||
|
|
||||||
|
setDataSource(dataSource) {
|
||||||
|
this.dataSource = dataSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
setColumns(columns) {
|
||||||
|
this.columns = columns
|
||||||
|
}
|
||||||
|
|
||||||
|
setSelectedRowKeys(selectedRowKeys) {
|
||||||
|
this.selectedRowKeys = selectedRowKeys;
|
||||||
|
}
|
||||||
|
|
||||||
|
setLoading(bool) {
|
||||||
|
this.loading = bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
setNeDialogTitle(title) {
|
||||||
|
this.nEdialogTitle = title
|
||||||
|
}
|
||||||
|
|
||||||
|
setCondition(condition) {
|
||||||
|
this.condition = condition;
|
||||||
|
}
|
||||||
|
|
||||||
|
setCopyCondition(copyCondition) {
|
||||||
|
this.copyCondition = copyCondition;
|
||||||
|
}
|
||||||
|
|
||||||
|
setNewVisible(bool) {
|
||||||
|
this.formReset();
|
||||||
|
this.newVisible = bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
setTotal(total) {
|
||||||
|
this.total = total;
|
||||||
|
}
|
||||||
|
|
||||||
|
setCurrent(current) {
|
||||||
|
this.current = current;
|
||||||
|
}
|
||||||
|
|
||||||
|
setPageSize(pageSize) {
|
||||||
|
this.pageSize = pageSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
setInit(bool) {
|
||||||
|
this.init = bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
setConfirmVisible(confirmVisible) {
|
||||||
|
this.formReset();
|
||||||
|
this.confirmVisible = confirmVisible;
|
||||||
|
}
|
||||||
|
|
||||||
|
setConfirmLoading(confirmLoading) {
|
||||||
|
this.confirmLoading = confirmLoading;
|
||||||
|
}
|
||||||
|
|
||||||
|
setPostionDataSource(postionDataSource) {
|
||||||
|
this.postionDataSource = postionDataSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
setPostionColumns(postionColumns) {
|
||||||
|
this.postionColumns = postionColumns;
|
||||||
|
}
|
||||||
|
|
||||||
|
setIsMerge(bool) {
|
||||||
|
this.isMerge = bool;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue