diff --git a/pc4mobx/organization/apis/job.js b/pc4mobx/organization/apis/job.js index 6fb261f..6f44f6a 100644 --- a/pc4mobx/organization/apis/job.js +++ b/pc4mobx/organization/apis/job.js @@ -4,8 +4,7 @@ import { } from 'ecCom' export const getSearchList = (params) => { - //return WeaTools.callApi('/api/bs/hrmorganization/comp/listComp', 'POST', params); - return fetch('/api/bs/hrmorganization/comp/listComp', { + return fetch('/api/bs/hrmorganization/job/listPage', { method: 'POST', mode: 'cors', headers: { @@ -15,20 +14,8 @@ export const getSearchList = (params) => { }) } -export const getDeptListByPid = (params) => { - return fetch('/api/bs/hrmorganization/dept/getDeptListByPid', { - method: 'POST', - mode: 'cors', - headers: { - 'Content-Type': 'application/json' - }, - body: JSON.stringify(params) - }) -} - - export const deleteTableData = (params) => { - return fetch('/api/bs/hrmorganization/comp/deleteByIds', { + return fetch('/api/bs/hrmorganization/job/deleteByIds', { method: 'POST', mode: 'cors', headers: { @@ -39,11 +26,30 @@ export const deleteTableData = (params) => { } export const getAdvanceSearchCondition = (params) => { - return WeaTools.callApi('/api/bs/hrmorganization/comp/getSearchCondition', 'GET', params); + return WeaTools.callApi('/api/bs/hrmorganization/job/getSearchCondition', 'GET', params); +} + +export const getHrmListByJobId = (params) => { + return WeaTools.callApi('/api/bs/hrmorganization/job/getHrmListByJobId', 'GET', params); +} + +export const getCopyForm = (params) => { + return WeaTools.callApi('/api/bs/hrmorganization/job/getCopyForm', 'GET', params); } export const add = (params) => { - return fetch('/api/bs/hrmorganization/comp/saveBaseComp', { + return fetch('/api/bs/hrmorganization/job/saveBaseForm', { + method: 'POST', + mode: 'cors', + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(params) + }) +} + +export const copy = (params) => { + return fetch('/api/bs/hrmorganization/job/copyJobItem', { method: 'POST', mode: 'cors', headers: { @@ -54,19 +60,11 @@ export const add = (params) => { } export const editResource = (params) => { - // return fetch('/api/bs/hrmorganization/comp/updateComp', { - // method: 'POST', - // mode: 'cors', - // headers: { - // 'Content-Type': 'application/json' - // }, - // body: JSON.stringify(params) - // }) - return WeaTools.callApi('/api/bs/hrmorganization/comp/updateComp', 'POST', params); + return WeaTools.callApi('/api/bs/hrmorganization/job/updateForm', 'POST', params); } export const updateForbiddenTag = (params) => { - return fetch('/api/bs/hrmorganization/comp/updateForbiddenTagById', { + return fetch('/api/bs/hrmorganization/job/updateForbiddenTagById', { method: 'POST', mode: 'cors', headers: { @@ -76,16 +74,16 @@ export const updateForbiddenTag = (params) => { }) } -export const getCompanyForm = (params) => { - return WeaTools.callApi('/api/bs/hrmorganization/comp/getCompSaveForm', 'GET', params); +export const getJobForm = (params) => { + return WeaTools.callApi('/api/bs/hrmorganization/job/getSaveForm', 'GET', params); } -export const getCompanyExtendForm = (params) => { - return WeaTools.callApi('/api/bs/hrmorganization/comp/getCompBaseForm', 'GET', params); +export const getJobExtendForm = (params) => { + return WeaTools.callApi('/api/bs/hrmorganization/job/getJobBaseForm', 'GET', params); } export const getHasRight = (params) => { - return WeaTools.callApi('/api/bs/hrmorganization/comp/getHasRight', 'GET', params); + return WeaTools.callApi('/api/bs/hrmorganization/job/getHasRight', 'GET', params); } \ No newline at end of file diff --git a/pc4mobx/organization/components/NewWeaTable.js b/pc4mobx/organization/components/NewWeaTable.js deleted file mode 100644 index f0d651c..0000000 --- a/pc4mobx/organization/components/NewWeaTable.js +++ /dev/null @@ -1,69 +0,0 @@ -import { - WeaNewScroll, - WeaSearchGroup, - WeaMoreButton, - WeaTable -} from 'ecCom' - -import { - Spin, - Button, - Pagination -} from 'antd' - -import { - WeaSwitch -} from 'comsMobx' - -import { - i18n -} from '../public/i18n'; - -import '../style/common.less'; - - -export default class NewWeaTable extends React.Component { - constructor(props) { - super(props); - } - - - - render() { - const { - dataSource, - columns, - rowSelection, - loading, - indentSize - } = this.props - - const pagination = { - total: dataSource.length, - showSizeChanger: true, - showQuickJumper: true, - onShowSizeChange(current, pageSize) { - }, - onChange(current) { - }, - showTotal(total){ - return `共 ${total} 条` - } - }; - - - return ( - loading ?
- -
: - record.id} - dataSource={dataSource} childrenColumnName="children" - columns={columns} - rowSelection={rowSelection} - pagination={pagination} - loading={loading} - indentSize={indentSize} - /> - ) - } -} \ No newline at end of file diff --git a/pc4mobx/organization/components/NewWeaTableDialog.js b/pc4mobx/organization/components/NewWeaTableDialog.js new file mode 100644 index 0000000..5cb513c --- /dev/null +++ b/pc4mobx/organization/components/NewWeaTableDialog.js @@ -0,0 +1,71 @@ +import { + WeaNewScroll, + WeaSearchGroup, + WeaMoreButton, + WeaDialog +} from 'ecCom' + +import { + Spin, + Button, + Pagination +} from 'antd' + +import { + WeaSwitch, + WeaTableNew +} from 'comsMobx' + +import { + i18n +} from '../public/i18n'; + +import '../style/common.less'; + +const WeaTable = WeaTableNew.WeaTable; + +export default class NewWeaTableDialog extends React.Component { + constructor(props) { + super(props); + this.state = { + width: 800, + } + } + + render() { + const { + title, + visible, + onCancel, + height, + tableStore + } = this.props, { + width, + } = this.state; + + const buttons = [ + //(), + () + ]; + + return ( + onCancel()} + buttons={buttons} + style={{ width: width, height: height }} + > + + + ) + } +} \ No newline at end of file diff --git a/pc4mobx/organization/components/company/company.js b/pc4mobx/organization/components/company/company.js index 6711875..9b07041 100644 --- a/pc4mobx/organization/components/company/company.js +++ b/pc4mobx/organization/components/company/company.js @@ -1,7 +1,7 @@ /** * @Author: 程亮 * @Date: 2022-05-18 16:23:32 - * @LastEditTime: 2022-05-27 15:05:49 + * @LastEditTime: 2022-06-01 11:51:20 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js */ @@ -40,7 +40,7 @@ import '../../style/common.less'; import NewTableDialog from '../NewTableDialog'; import NewAndEditDialog from '../NewAndEditDialog'; -import NewWeaTable from '../NewWeaTable'; +import NewWeaTable from '../NewWeaTableDialog'; import { renderLoading } from '../../util'; // 从util文件引入公共的方法 diff --git a/pc4mobx/organization/components/job/Job.js b/pc4mobx/organization/components/job/Job.js index 85a30c0..cebcf15 100644 --- a/pc4mobx/organization/components/job/Job.js +++ b/pc4mobx/organization/components/job/Job.js @@ -1,7 +1,7 @@ /** * @Author: 程亮 * @Date: 2022-05-26 14:05:59 - * @LastEditTime: 2022-05-30 17:08:21 + * @LastEditTime: 2022-06-01 16:18:15 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/components/job/job.js */ @@ -40,9 +40,8 @@ import { import '../../style/common.less'; -import NewTableDialog from '../NewTableDialog'; import NewAndEditDialog from '../NewAndEditDialog'; -import NewWeaTable from '../NewWeaTable'; +import NewWeaTableDialog from '../NewWeaTableDialog'; import { renderLoading } from '../../util'; // 从util文件引入公共的方法 @@ -82,6 +81,7 @@ export default class Job extends React.Component { } = this.props; job.getTableInfo(); job.getHasRight(); + job.getCopyForm(); } getTopMenuBtns() { @@ -95,10 +95,13 @@ export default class Job extends React.Component { let btns = []; topMenu.map((item, i) => { - if (item.menuFun !== 'batchDelete') { - btns.push(); - } else { + if (item.menuFun === 'batchDelete') { btns.push(); + } else if (item.menuFun === 'copy') { + btns.push(); + } else { + btns.push(); + } }); @@ -125,20 +128,70 @@ export default class Job extends React.Component { job.setNeDialogTitle(i18n.label.jobName()); job.setNewVisible(true); - job.getCompanyForm(); + job.getJobForm(); } - //联查部门 + //联查人员 select(id) { const { job } = this.props; - job.setNeDialogTitle(i18n.label.jobName()); + job.setNeDialogTitle("联查人员"); job.setVisible(true); - job.setDialogLoadingStatus(true); - job.getDeptTable(id); + job.getHrmTable(id); + } + + copy() { + const { + job + } = this.props; + const { + selectedRowKeys + } = job; + let keys = toJS(selectedRowKeys).toString(); + job.setIds(keys); + confirm({ + title: i18n.confirm.defaultTitle(), + content: this.getCopyForm(), + okText: i18n.button.ok(), + cancelText: i18n.button.cancel(), + onOk() { + job.copy() + }, + onCancel() { + return false; + }, + }); + } + + getCopyForm() { + const { + job + } = this.props; + const { + copyCondition, + form2, + } = job; + let formParams = form2.getFormParams(); + const { + isFormInit + } = form2; + let arr = []; + isFormInit && copyCondition.map(c => { + c.items.map((field, index) => { + arr.push( + + {} + + ) + }) + }) + return arr; } batchDelete() { @@ -210,6 +263,13 @@ export default class Job extends React.Component { this[key] && this[key](); } + updateForbiddenTag(checked, id) { + const { + job + } = this.props; + job.updateForbiddenTag(checked, id); + } + onSearchChange(val) { @@ -220,7 +280,7 @@ export default class Job extends React.Component { form } = job; - job.setCompanyName(val); + job.setJobName(val); !this.isEmptyObject(form.getFormParams()) && job.updateFields(val); } @@ -236,7 +296,7 @@ export default class Job extends React.Component { return _this.updateForbiddenTag(checked, record.id)} /> } }; - if (c.dataIndex == 'compName') { + if (c.dataIndex == 'jobName') { c.render = function (text, record) { return { window.open(`/spa/organization/static/index.html#/main/organization/jobExtend/${record.id}`, "_blank") @@ -253,7 +313,7 @@ export default class Job extends React.Component { { _this.doDel(record.id) }}>删除 - { _this.select(record.id) }}>联查部门 + { _this.select(record.id) }}>联查人员 ) @@ -504,13 +564,11 @@ export default class Job extends React.Component { - job.setVisible(false)} /> this.handleSave()} onCancel={() => job.setNewVisible(false)} enable={false} //是否开启字段联动 diff --git a/pc4mobx/organization/components/job/JobExtend.js b/pc4mobx/organization/components/job/JobExtend.js index 5e95600..ba34a54 100644 --- a/pc4mobx/organization/components/job/JobExtend.js +++ b/pc4mobx/organization/components/job/JobExtend.js @@ -1,7 +1,7 @@ /** * @Author: 程亮 * @Date: 2022-05-26 14:07:12 - * @LastEditTime: 2022-05-30 17:04:50 + * @LastEditTime: 2022-05-30 17:16:47 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/components/job/JobExtend.js */ @@ -21,7 +21,7 @@ @inject('jobExtend') - @inject('company') + @inject('job') @observer export default class JobExtend extends React.Component { @@ -29,8 +29,7 @@ this.init(); } init = () => { - const { jobExtend,company } = this.props; - //const {id} = company; + const { jobExtend,job } = this.props; let {hash} = window.location; hash = hash.split("?")[0]; let id = hash.match("[^/]+(?=/$|$)")[0]; diff --git a/pc4mobx/organization/public/i18n.js b/pc4mobx/organization/public/i18n.js index f90a0ab..5832fae 100644 --- a/pc4mobx/organization/public/i18n.js +++ b/pc4mobx/organization/public/i18n.js @@ -141,6 +141,7 @@ export const i18n = { editJob: () => getLabel(386247, '编辑岗位'), + authorizationGroup: () => getLabel(492, '权限组'), allAuthorization: () => getLabel(33363, '全部权限'), diff --git a/pc4mobx/organization/stores/job.js b/pc4mobx/organization/stores/job.js index 12d33a3..8a06544 100644 --- a/pc4mobx/organization/stores/job.js +++ b/pc4mobx/organization/stores/job.js @@ -1,374 +1,419 @@ import { - observable, - action - } from 'mobx'; - import * as mobx from 'mobx'; - import * as Api from '../apis/job'; // 引入API接口文件 - import { - WeaForm - } from 'comsMobx'; - import { - WeaTableNew - } from 'comsMobx'; - import { - Modal, - message, - } from 'antd' - import { - i18n - } from '../public/i18n'; - - const toJS = mobx.toJS; - const { - TableStore - } = WeaTableNew; - - - export class JobStore { - @observable topMenu = [] - @observable rightMenu = []; - @observable dataSource = []; - @observable columns = []; - @observable deptDataSource = []; - @observable deptColumns = []; - @observable tableStore = new TableStore(); - @observable loading = true; - @observable dialogLoading = true; - @observable isEdit = true; - @observable nEdialogTitle = ''; - @observable searchCondition = []; - @observable condition = []; - @observable isPanelShow = false; //高级搜索面板 - @observable form = new WeaForm(); - @observable form1 = new WeaForm(); //新增主表表单 - @observable jobName = ''; - @observable conditionNum = 8; - @observable ids = ''; //选择行id - @observable id = ''; //页面跳转参数id - @observable searchConditionLoading = true; - @observable visible = false; - @observable newVisible = false; //新增弹窗 - @observable jobId = ''; - @observable selectedRowKeys = ''; - @observable date = ''; - @observable init = true; //是否首次加载 - @observable total = ''; - @observable current = 1; - @observable pageSize = 10; + observable, + action +} from 'mobx'; +import * as mobx from 'mobx'; +import * as Api from '../apis/job'; // 引入API接口文件 +import { + WeaForm +} from 'comsMobx'; +import { + WeaTableNew +} from 'comsMobx'; +import { + Modal, + message, +} from 'antd' +import { + i18n +} from '../public/i18n'; - @observable defaultShowLeft = true; - @observable companysId = 1 - - - - - @action - getTableInfo(params) { - this.setLoading(true); +const toJS = mobx.toJS; +const { + TableStore +} = WeaTableNew; + + +export class JobStore { + @observable tableStore = new TableStore(); + @observable topMenu = [] + @observable rightMenu = []; + @observable dataSource = []; + @observable columns = []; + @observable deptDataSource = []; + @observable deptColumns = []; + @observable loading = true; + @observable dialogLoading = true; + @observable isEdit = true; + @observable nEdialogTitle = ''; + @observable searchCondition = []; + @observable condition = []; + @observable copyCondition = []; + @observable isPanelShow = false; //高级搜索面板 + @observable form = new WeaForm(); + @observable form1 = new WeaForm(); //新增主表表单 + @observable form2 = new WeaForm(); //复制表单 + @observable jobName = ''; + @observable conditionNum = 12; + @observable ids = ''; //选择行id + @observable id = ''; //页面跳转参数id + @observable searchConditionLoading = true; + @observable visible = false; + @observable newVisible = false; //新增弹窗 + @observable jobId = ''; + @observable selectedRowKeys = ''; + @observable date = ''; + @observable init = true; //是否首次加载 + @observable total = ''; + @observable current = 1; + @observable pageSize = 10; + + @observable defaultShowLeft = true; + @observable companysId = 1 + + + + + @action + getTableInfo(params) { + this.setLoading(true); + params = { + ...params, + current: this.current, + pageSize: this.pageSize + } + if (this.isEmptyObject(this.form.getFormParams())) { params = { - ...params, - current:this.current, - pageSize:this.pageSize - } - if (this.isEmptyObject(this.form.getFormParams())) { - params = { - ...params, - ...this.form.getFormParams(), - compName: this.jobName - }; - } else { - params = { - ...params, - ...this.form.getFormParams(), - }; - } - 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 { - message.warning(res.msg); - } - }).catch(error => { - message.warning(error.msg); - }) - } - - @action("nodetree事件") - doSearch (params){ - this.setInit(true); - this.getTableInfo(params); - } - - @action("联查部门") - getDeptTable(id) { - let params = { - parentComp:id - } - Api.getDeptListByPid(params).then(response => { - return response.json() - }).then(res => { - if (res.code === 200) { - res.data.list && this.setDeptDataSource(res.data.list); - res.data.columns && this.setDeptColumns(res.data.columns); - this.setDialogLoadingStatus(false); - } else { - message.warning(res.msg); - } - }).catch(error => { - message.warning(error.msg); - }) - } - - //删除 - delete() { - let params = { - ids: this.ids + ...params, + ...this.form.getFormParams(), + compName: this.jobName + }; + } else { + params = { + ...params, + ...this.form.getFormParams(), }; - Api.deleteTableData(params).then(response => { - return response.json() - }).then(data => { - if (data.code === 200) { - message.success(i18n.message.deleteSuccess()); - this.getTableInfo(); - } else { - message.warning(data.msg); - } - }).catch(error => { - message.warning(error.msg); - }) } - - updateForbiddenTag(checked, id) { - let params = { - forbiddenTag: checked, - id: id + 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 { + message.warning(res.msg); } - Api.updateForbiddenTag(params).then(response => { - return response.json() - }).then(data => { - if (data.code === 200) { - message.success(data.msg); - } 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); - }) - } - - - getCompanyForm() { - let params = {}; - this.setDialogLoadingStatus(true); - Api.getCompanyForm(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); - }) - + }).catch(error => { + message.warning(error.msg); + }) } - + + @action("nodetree事件") + doSearch(params) { + this.setInit(true); + this.getTableInfo(params); + } + + @action("联查人员") + getHrmTable(id) { + let params = { + jobId: id + } + this.tableStore = new TableStore(); + Api.getHrmListByJobId(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.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); + }) + } + + + getJobForm() { + let params = {}; + this.setDialogLoadingStatus(true); + Api.getJobForm(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("复制表单") + 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.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()); - } + 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()); + } }); } - - - @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); + + copy() { + debugger + let params = { + ids: this.ids, + ...this.form2.getFormParams() + }; + this.form2.validateForm().then(f => { + if (f.isValid) { + Api.copy(params).then(response => { + return response.json() + }).then(data => { + if (data.code === 200) { + message.success(data.msg); + this.getTableInfo(); } else { - message.warning(res.msg); + message.error(data.msg); } - }, error => { + }).catch(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(); + }) + } else { + f.showErrors(); + this.setDate(new Date()); } - } - - setJobName(val) { - this.jobName = 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; + + + @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(); } - - setJobId(jobId) { - this.jobId = jobId; + } + + setJobName(val) { + this.jobName = val; + } + + isEmptyObject(obj) { + for (let key in obj) { + return false; } - - setDate(date) { - this.date = date; - } - - setTopMenu(topMenu) { - this.topMenu = topMenu; - } - - setRightMenu(rightMenu) { - this.rightMenu = rightMenu; - } - - setDataSource(dataSource) { - this.dataSource = dataSource; - } - - setDeptDataSource(deptDataSource) { - this.deptDataSource = deptDataSource; - } - - setColumns(columns) { - this.columns = columns - } - - setDeptColumns(deptColumns) { - this.deptColumns = deptColumns - } - - setSelectedRowKeys(selectedRowKeys) { - this.selectedRowKeys = selectedRowKeys; - } - - setLoading(bool) { - this.loading = bool; - } - - setNeDialogTitle(title) { - this.nEdialogTitle = title - } - - setCondition(condition) { - this.condition = condition; - } - - 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; - } - - } \ No newline at end of file + 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; + } + + setJobId(jobId) { + this.jobId = jobId; + } + + setDate(date) { + this.date = date; + } + + setTopMenu(topMenu) { + this.topMenu = topMenu; + } + + setRightMenu(rightMenu) { + this.rightMenu = rightMenu; + } + + setDataSource(dataSource) { + this.dataSource = dataSource; + } + + setDeptDataSource(deptDataSource) { + this.deptDataSource = deptDataSource; + } + + setColumns(columns) { + this.columns = columns + } + + setDeptColumns(deptColumns) { + this.deptColumns = deptColumns + } + + 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; + } + +} \ No newline at end of file diff --git a/pc4mobx/organization/stores/jobextend.js b/pc4mobx/organization/stores/jobextend.js index de073bc..f16c8d7 100644 --- a/pc4mobx/organization/stores/jobextend.js +++ b/pc4mobx/organization/stores/jobextend.js @@ -126,7 +126,7 @@ export class JobExtendStore { id: this.id, viewCondition:this.selectedKey } - Api.getCompanyExtendForm(params).then((res) => { + Api.getJobExtendForm(params).then((res) => { if (res.code === 200) { res.data.result.conditions && this.form.initFormFields(res.data.result.conditions); res.data.result.conditions && this.setConditions(res.data.result.conditions);