diff --git a/pc4mobx/organization/components/company/company.js b/pc4mobx/organization/components/company/company.js index e32d334..f026a49 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-06-06 14:21:43 + * @LastEditTime: 2022-06-07 16:39:25 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js */ @@ -41,7 +41,7 @@ import '../../style/common.less'; import NewTableDialog from '../NewTableDialog'; import NewAndEditDialog from '../NewAndEditDialog'; import NewWeaTable from '../NewWeaTableDialog'; -import { renderLoading } from '../../util'; // 从util文件引入公共的方法 +import { renderNoright } from '../../util'; @@ -396,9 +396,13 @@ export default class Company extends React.Component { const { isPanelShow, companyName, conditionNum, visible, condition, form, tableStore, dataSource, columns, loading, date, nEdialogTitle, dialogLoading, - form1, isEdit, newVisible, deptDataSource, deptColumns, selectedRowKeys, total, current, pageSize, init + form1, isEdit, newVisible, deptDataSource, deptColumns, selectedRowKeys, total, current, pageSize, init,hasRight } = company; + if (hasRight === false) { + return renderNoright(); + } + const rowSelection = { type: "checkbox", onChange(selectedRowKeys, selectedRows) { @@ -426,7 +430,7 @@ export default class Company extends React.Component { return ( -
+ hasRight &&
this.handleMenuClick(key)} diff --git a/pc4mobx/organization/components/department/department.js b/pc4mobx/organization/components/department/department.js index aebd925..ec8277f 100644 --- a/pc4mobx/organization/components/department/department.js +++ b/pc4mobx/organization/components/department/department.js @@ -1,7 +1,7 @@ /** * @Author: 程亮 * @Date: 2022-06-02 09:19:37 - * @LastEditTime: 2022-06-06 19:32:11 + * @LastEditTime: 2022-06-07 16:15:54 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js */ @@ -40,6 +40,7 @@ } from '../../public/i18n'; import '../../style/common.less'; + import { renderNoright } from '../../util'; import NewAndEditDialog from '../NewAndEditDialog'; import NewTableDialog from '../NewTableDialog'; @@ -526,8 +527,12 @@ isPanelShow, departmentName, conditionNum, visible, condition, form, tableStore, dataSource, columns, loading, date, nEdialogTitle, dialogLoading, form1, isEdit, newVisible, jobDataSource, jobColumns, selectedRowKeys, total, current, pageSize, init, - defaultShowLeft,confirmVisible,confirmLoading,postionDataSource,postionColumns,isMerge + defaultShowLeft,confirmVisible,confirmLoading,postionDataSource,postionColumns,isMerge,hasRight } = department; + + if (hasRight === false) { + return renderNoright(); + } const rowSelection = { type:"checkbox", @@ -556,7 +561,7 @@ return ( -
+ hasRight &&
this.handleMenuClick(key)} diff --git a/pc4mobx/organization/components/job/Job.js b/pc4mobx/organization/components/job/Job.js index f02b16a..c4eaf64 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-06-02 15:51:37 + * @LastEditTime: 2022-06-07 16:44:49 * @Description: * @FilePath: /trunk/src4js/pc4mobx/organization/components/job/Job.js */ @@ -42,7 +42,7 @@ import '../../style/common.less'; import NewAndEditDialog from '../NewAndEditDialog'; import NewWeaTableDialog from '../NewWeaTableDialog'; -import { renderLoading } from '../../util'; // 从util文件引入公共的方法 +import { renderNoright } from '../../util'; @@ -487,9 +487,14 @@ export default class Job extends React.Component { isPanelShow, jobName, conditionNum, visible, condition, form, tableStore, dataSource, columns, loading, date, nEdialogTitle, dialogLoading, form1, isEdit, newVisible,selectedRowKeys, total, current, pageSize, init, - defaultShowLeft,form2 + defaultShowLeft,form2,hasRight } = job; + if (hasRight === false) { + return renderNoright(); + } + + const rowSelection = { onChange(selectedRowKeys, selectedRows) { job.setSelectedRowKeys(selectedRowKeys); @@ -516,7 +521,7 @@ export default class Job extends React.Component { return ( -
+ hasRight &&
this.handleMenuClick(key)} diff --git a/pc4mobx/organization/components/office/officeManage.js b/pc4mobx/organization/components/office/officeManage.js index 97995bf..0242424 100644 --- a/pc4mobx/organization/components/office/officeManage.js +++ b/pc4mobx/organization/components/office/officeManage.js @@ -14,6 +14,8 @@ import { import { Row, Col, Spin, Modal, Button, message, Switch } from "antd"; import { WeaSwitch, WeaTableNew } from "comsMobx"; import "./index.less"; +import { renderNoright } from '../../util'; + const confirm = Modal.confirm; const WeaTable = WeaTableNew.WeaTable; @@ -58,7 +60,7 @@ export default class OfficeManage extends Component { handleMenuClick = (key) => { const { officeManageStore } = this.props; - const { isPanelShow,tableStore} = officeManageStore; + const { isPanelShow, tableStore } = officeManageStore; isPanelShow && officeManageStore.setPanelStatus(false); switch (key) { case "new": @@ -248,11 +250,11 @@ export default class OfficeManage extends Component { const { officeManageStore } = this.props, { - tableStore, + tableStore, } = officeManageStore; - -} + + } getPanelComponents = () => { const { officeManageStore } = this.props; @@ -266,24 +268,21 @@ export default class OfficeManage extends Component { c.items.map((field, index) => { arr.push(
{
); @@ -370,24 +368,28 @@ export default class OfficeManage extends Component { condition, form, dialogLoading, + hasRight } = officeManageStore; + + if (hasRight === false) { + return renderNoright(); + } + return ( -
+ hasRight &&
} onCollapse={(showLeft) => console.log("showLeft:", showLeft)}> this.handleMenuClick(key)}> } iconBgcolor="#217346" @@ -397,9 +399,8 @@ export default class OfficeManage extends Component { dropMenuDatas={this.getDropMenuDatas()} onDropMenuClick={(e) => this.handleMenuClick(e)}> this.onSearchChange(val)} /> + hasRight &&
this.handleMenuClick(key)} diff --git a/pc4mobx/organization/components/postionrank/JobLevel.js b/pc4mobx/organization/components/postionrank/JobLevel.js index 7c3cfdd..426ff7b 100644 --- a/pc4mobx/organization/components/postionrank/JobLevel.js +++ b/pc4mobx/organization/components/postionrank/JobLevel.js @@ -30,7 +30,7 @@ import { import '../../style/common.less'; import NewAndEditDialog from '../NewAndEditDialog'; - +import { renderNoright } from '../../util'; const toJS = mobx.toJS; @@ -225,18 +225,18 @@ export default class JobLevel extends React.Component { let _this = this; columns.forEach((c, index) => { if (c.dataIndex == 'forbidden_tag') { - c.render = function(text, record) { - return _this.updateForbiddenTag(checked,record.id)} /> + c.render = function (text, record) { + return _this.updateForbiddenTag(checked, record.id)} /> } }; }) } - updateForbiddenTag(checked,id) { + updateForbiddenTag(checked, id) { const { jobLevel } = this.props; - jobLevel.updateForbiddenTag(checked,id); + jobLevel.updateForbiddenTag(checked, id); } onOperatesClick(record, rowIndex, operate) { @@ -262,7 +262,7 @@ export default class JobLevel extends React.Component { const { jobLevel } = this.props; - + jobLevel.setNeDialogTitle(i18n.label.editJobLevel()); jobLevel.setLevelId(id); jobLevel.setIsNew(false); @@ -309,29 +309,29 @@ export default class JobLevel extends React.Component { isFormInit && searchCondition.map(c => { c.items.map((field, index) => { - arr.push( -
- - {} - -
- ) + arr.push( +
+ + {} + +
+ ) }) }) if (searchConditionLoading) { return ( -
+
) } else { return { - if ( e.keyCode == 13 && e.target.tagName === "INPUT") { - jobLevel.getTableInfo(); + if (e.keyCode == 13 && e.target.tagName === "INPUT") { + jobLevel.getTableInfo(); jobLevel.setPanelStatus(false) } }}>{arr} @@ -356,13 +356,16 @@ export default class JobLevel extends React.Component { jobLevel } = this.props; const { - isPanelShow, form2, levelName, conditionNum, tableStore,nEdialogTitle,visible,condition, - form,dialogLoading,isEdit,selectedKey,topTab,topTabCount,date + isPanelShow, form2, levelName, conditionNum, tableStore, nEdialogTitle, visible, condition, + form, dialogLoading, isEdit, selectedKey, topTab, topTabCount, date, hasRight } = jobLevel; + if (hasRight === false) { + return renderNoright(); + } return ( -
+ hasRight &&
this.handleMenuClick(key)} @@ -389,7 +392,7 @@ export default class JobLevel extends React.Component { searchsBaseValue={this.isEmptyObject(form2.getFormParams()) ? levelName : form2.getFormParams().levelName} setShowSearchAd={bool => jobLevel.setPanelStatus(bool)} hideSearchAd={() => jobLevel.setPanelStatus(false)} - searchsAd= {isPanelShow ? this.getPanelComponents() :
} + searchsAd={isPanelShow ? this.getPanelComponents() :
} advanceHeight={Math.ceil(conditionNum / 2) * 52 + 20} hasMask={false} buttonsAd={this.getTabBtn()} @@ -405,7 +408,7 @@ export default class JobLevel extends React.Component { />
- { if (c.dataIndex == 'forbidden_tag') { - c.render = function(text, record) { - return _this.updateForbiddenTag(checked,record.id)} /> + c.render = function (text, record) { + return _this.updateForbiddenTag(checked, record.id)} /> } }; }) } - updateForbiddenTag(checked,id) { + updateForbiddenTag(checked, id) { const { rankScheme } = this.props; - rankScheme.updateForbiddenTag(checked,id); + rankScheme.updateForbiddenTag(checked, id); } onOperatesClick(record, rowIndex, operate) { @@ -256,7 +258,7 @@ export default class RankScheme extends React.Component { const { rankScheme } = this.props; - + rankScheme.setNeDialogTitle(i18n.label.editRankScheme()); rankScheme.setSchemeId(id); rankScheme.setIsNew(false); @@ -303,29 +305,29 @@ export default class RankScheme extends React.Component { isFormInit && searchCondition.map(c => { c.items.map((field, index) => { - arr.push( -
- - {} - -
- ) + arr.push( +
+ + {} + +
+ ) }) }) if (searchConditionLoading) { return ( -
+
) } else { return { - if ( e.keyCode == 13 && e.target.tagName === "INPUT") { - rankScheme.getTableInfo(); + if (e.keyCode == 13 && e.target.tagName === "INPUT") { + rankScheme.getTableInfo(); rankScheme.setPanelStatus(false) } }}>{arr} @@ -350,12 +352,16 @@ export default class RankScheme extends React.Component { rankScheme } = this.props; const { - isPanelShow, form2, schemeName, conditionNum, tableStore,nEdialogTitle,visible,condition, - form,dialogLoading,isEdit,date + isPanelShow, form2, schemeName, conditionNum, tableStore, nEdialogTitle, visible, condition, + form, dialogLoading, isEdit, date, hasRight } = rankScheme; + if (hasRight === false) { + return renderNoright(); + } + return ( -
+ hasRight &&
this.handleMenuClick(key)} @@ -376,7 +382,7 @@ export default class RankScheme extends React.Component { searchsBaseValue={this.isEmptyObject(form2.getFormParams()) ? schemeName : form2.getFormParams().schemeName} setShowSearchAd={bool => rankScheme.setPanelStatus(bool)} hideSearchAd={() => rankScheme.setPanelStatus(false)} - searchsAd= {isPanelShow ? this.getPanelComponents() :
} + searchsAd={isPanelShow ? this.getPanelComponents() :
} advanceHeight={Math.ceil(conditionNum / 2) * 52 + 20} hasMask={false} buttonsAd={this.getTabBtn()} @@ -392,7 +398,7 @@ export default class RankScheme extends React.Component { />
-
- ) + ) } } \ No newline at end of file diff --git a/pc4mobx/organization/components/sequence/Sequence.js b/pc4mobx/organization/components/sequence/Sequence.js index 1cb9bde..deb6b49 100644 --- a/pc4mobx/organization/components/sequence/Sequence.js +++ b/pc4mobx/organization/components/sequence/Sequence.js @@ -30,6 +30,7 @@ import { import '../../style/common.less'; import NewAndEditDialog from '../NewAndEditDialog'; +import { renderNoright } from '../../util'; @@ -358,12 +359,15 @@ export default class Sequence extends React.Component { } = this.props; const { isPanelShow, form2, levelName, conditionNum, tableStore,nEdialogTitle,visible,condition, - form,dialogLoading,isEdit,selectedKey,topTab,topTabCount,date + form,dialogLoading,isEdit,selectedKey,topTab,topTabCount,date,hasRight } = sequence; + if (hasRight === false) { + return renderNoright(); + } return ( -
+ hasRight &&
this.handleMenuClick(key)} diff --git a/pc4mobx/organization/components/staff/Staff.js b/pc4mobx/organization/components/staff/Staff.js index 38f7e08..a4d1dd0 100644 --- a/pc4mobx/organization/components/staff/Staff.js +++ b/pc4mobx/organization/components/staff/Staff.js @@ -30,6 +30,7 @@ import { import '../../style/common.less'; import NewAndEditDialog from '../NewAndEditDialog'; +import { renderNoright } from '../../util'; @@ -210,7 +211,7 @@ export default class Staff extends React.Component { form2 } = staff; - staff.setSchemeName(val); + staff.setStaffName(val); !this.isEmptyObject(form2.getFormParams()) && staff.updateFields(val); } @@ -353,11 +354,15 @@ export default class Staff extends React.Component { } = this.props; const { isPanelShow, form2, staffName, conditionNum, tableStore,nEdialogTitle,visible,condition, - form,dialogLoading,isEdit,date + form,dialogLoading,isEdit,date,hasRight } = staff; + if (hasRight === false) { + return renderNoright(); + } + return ( -
+ hasRight &&
this.handleMenuClick(key)} diff --git a/pc4mobx/organization/components/staff/StaffScheme.js b/pc4mobx/organization/components/staff/StaffScheme.js index 28ee2b8..2ee79bf 100644 --- a/pc4mobx/organization/components/staff/StaffScheme.js +++ b/pc4mobx/organization/components/staff/StaffScheme.js @@ -30,6 +30,7 @@ import { import '../../style/common.less'; import NewAndEditDialog from '../NewAndEditDialog'; +import { renderNoright } from '../../util'; @@ -210,7 +211,7 @@ export default class StaffScheme extends React.Component { form2 } = staffScheme; - staffScheme.setSchemeName(val); + staffScheme.setPlanName(val); !this.isEmptyObject(form2.getFormParams()) && staffScheme.updateFields(val); } @@ -238,7 +239,7 @@ export default class StaffScheme extends React.Component { } = operate; (index == '0') && this.doEdit(record.randomFieldId); (index == '1') && this.doDel(record.randomFieldId); - + (index == '2') && this.doWorkflow(record.randomFieldId); } doEdit(id) { @@ -282,6 +283,10 @@ export default class StaffScheme extends React.Component { this.showConfirm('del'); } + doWorkflow(id) { + alert("逻辑太自由,暂缓") + } + handleSave() { const { @@ -360,12 +365,17 @@ export default class StaffScheme extends React.Component { staffScheme } = this.props; const { - isPanelShow, form2, schemeName, conditionNum, tableStore,nEdialogTitle,visible,condition, - form,dialogLoading,isEdit,date + isPanelShow, form2, planName, conditionNum, tableStore,nEdialogTitle,visible,condition, + form,dialogLoading,isEdit,date,hasRight } = staffScheme; + if (hasRight === false) { + return renderNoright(); + } + + return ( -
+ hasRight &&
this.handleMenuClick(key)} @@ -383,7 +393,7 @@ export default class StaffScheme extends React.Component { staffScheme.setPanelStatus(bool)} hideSearchAd={() => staffScheme.setPanelStatus(false)} searchsAd= {isPanelShow ? this.getPanelComponents() :
} diff --git a/pc4mobx/organization/stores/company.js b/pc4mobx/organization/stores/company.js index a4e7768..4a799a3 100644 --- a/pc4mobx/organization/stores/company.js +++ b/pc4mobx/organization/stores/company.js @@ -55,7 +55,7 @@ export class CompanyStore { @observable total = ''; @observable current = 1; @observable pageSize = 10; - + @observable hasRight = ''; @@ -63,8 +63,8 @@ export class CompanyStore { getTableInfo() { this.setLoading(true); let params = { - current:this.current, - pageSize:this.pageSize + current: this.current, + pageSize: this.pageSize } if (this.isEmptyObject(this.form.getFormParams())) { params = { @@ -82,11 +82,12 @@ export class CompanyStore { 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); + this.setHasRight(res.data.hasRight); + 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); } @@ -103,7 +104,7 @@ export class CompanyStore { @action("联查部门") getDeptTable(id) { let params = { - parentComp:id + parentComp: id } Api.getDeptListByPid(params).then(response => { return response.json() @@ -126,17 +127,17 @@ export class CompanyStore { ids: this.ids }; Api.deleteTableData(params).then(response => { - return response.json() + return response.json() }).then(data => { - if (data.code === 200) { - message.success(i18n.message.deleteSuccess()); - this.setSelectedRowKeys(''); - this.getTableInfo(); - } else { - message.warning(data.msg); - } + if (data.code === 200) { + message.success(i18n.message.deleteSuccess()); + this.setSelectedRowKeys(''); + this.getTableInfo(); + } else { + message.warning(data.msg); + } }).catch(error => { - message.warning(error.msg); + message.warning(error.msg); }) } @@ -146,31 +147,31 @@ export class CompanyStore { id: id } Api.updateForbiddenTag(params).then(response => { - return response.json() + return response.json() }).then(data => { - if (data.code === 200) { - message.success(data.msg); - this.getTableInfo(); - } else { - message.warning(data.msg); - } + if (data.code === 200) { + message.success(data.msg); + this.getTableInfo(); + } else { + message.warning(data.msg); + } }).catch(error => { - message.warning(error.msg); + 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); - } + 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); + message.warning(error.msg); }) } @@ -179,57 +180,57 @@ export class CompanyStore { 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); - } + 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); + message.warning(error.msg); }) -} + } -save() { - let params = { + save() { + let params = { ...this.form1.getFormParams() - }; - this.form1.validateForm().then(f => { + }; + 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); - }) + 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()); + 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); - } else { - message.warning(res.msg); - } + 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); + message.warning(error.msg); }) } @@ -273,7 +274,7 @@ save() { } setId(id) { - this.id =id; + this.id = id; } scLoadingReset() { @@ -292,7 +293,7 @@ save() { setDialogLoadingStatus(bool) { this.dialogLoading = bool; -} + } setSearchCondition(searchCondition) { @@ -359,7 +360,7 @@ save() { setCurrent(current) { this.current = current; } - + setPageSize(pageSize) { this.pageSize = pageSize; } @@ -367,5 +368,9 @@ save() { setInit(bool) { this.init = bool; } + + setHasRight(bool) { + this.hasRight = bool; + } } \ No newline at end of file diff --git a/pc4mobx/organization/stores/department.js b/pc4mobx/organization/stores/department.js index 057f255..224bd5f 100644 --- a/pc4mobx/organization/stores/department.js +++ b/pc4mobx/organization/stores/department.js @@ -63,6 +63,7 @@ export class DepartmentStore { @observable confirmVisible = false; @observable confirmLoading = true; @observable isMerge = true; + @observable hasRight = ''; @action @@ -89,6 +90,7 @@ export class DepartmentStore { return response.json() }).then(res => { if (res.code === 200) { + this.setHasRight(res.data.hasRight); 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); @@ -517,4 +519,8 @@ export class DepartmentStore { setIsMerge(bool) { this.isMerge = bool; } + + setHasRight(bool) { + this.hasRight = bool; +} } \ No newline at end of file diff --git a/pc4mobx/organization/stores/job.js b/pc4mobx/organization/stores/job.js index 063d4d1..72764ec 100644 --- a/pc4mobx/organization/stores/job.js +++ b/pc4mobx/organization/stores/job.js @@ -58,7 +58,7 @@ export class JobStore { @observable defaultShowLeft = true; @observable companysId = 1 - + @observable hasRight = ''; @action @@ -85,6 +85,7 @@ export class JobStore { return response.json() }).then(res => { if (res.code === 200) { + this.setHasRight(res.data.hasRight); 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); @@ -402,4 +403,8 @@ export class JobStore { this.init = bool; } + setHasRight(bool) { + this.hasRight = bool; + } + } \ No newline at end of file diff --git a/pc4mobx/organization/stores/jobgrade.js b/pc4mobx/organization/stores/jobgrade.js index 9edb713..e6adaf2 100644 --- a/pc4mobx/organization/stores/jobgrade.js +++ b/pc4mobx/organization/stores/jobgrade.js @@ -48,7 +48,7 @@ export class JobGradeStore { @observable topTab = []; @observable topTabCount = {}; @observable key = '';// - + @observable hasRight = ''; @action @@ -69,6 +69,7 @@ export class JobGradeStore { } Api.getSearchList(params).then(res => { if (res.code === 200) { + this.setHasRight(res.data.hasRight); res.data.datas && this.tableStore.getDatas(res.data.datas, 1); } else { message.warning(res.msg); @@ -378,4 +379,8 @@ export class JobGradeStore { this.key = key; } + setHasRight(bool) { + this.hasRight = bool; + } + } \ No newline at end of file diff --git a/pc4mobx/organization/stores/joblevel.js b/pc4mobx/organization/stores/joblevel.js index 65ad030..607bc43 100644 --- a/pc4mobx/organization/stores/joblevel.js +++ b/pc4mobx/organization/stores/joblevel.js @@ -47,6 +47,7 @@ export class JobLevelStore { @observable selectedKey = -1; @observable topTab = []; @observable topTabCount = {}; + @observable hasRight = ''; @@ -70,6 +71,7 @@ export class JobLevelStore { } Api.getSearchList(params).then(res => { if (res.code === 200) { + this.setHasRight(res.data.hasRight); res.data.datas && this.tableStore.getDatas(res.data.datas, 1); } else { message.warning(res.msg); @@ -337,4 +339,8 @@ export class JobLevelStore { this.rightMenu = rightMenu; } + setHasRight(bool) { + this.hasRight = bool; + } + } \ No newline at end of file diff --git a/pc4mobx/organization/stores/officeManage.js b/pc4mobx/organization/stores/officeManage.js index 54b502a..b593dd6 100644 --- a/pc4mobx/organization/stores/officeManage.js +++ b/pc4mobx/organization/stores/officeManage.js @@ -31,6 +31,7 @@ export class OfficeManageStore { @observable dialogLoading = false; @observable schemeId = ""; @observable date = ""; + @observable hasRight = ''; @action getHasRight() { @@ -94,6 +95,7 @@ export class OfficeManageStore { } API.getPostInfoTable(params).then((res) => { if (res.code === 200) { + this.setHasRight(res.data.hasRight); res.data.datas && this.tableStore.getDatas(res.data.datas, 1); } else { message.error(res.msg); @@ -227,4 +229,8 @@ export class OfficeManageStore { officeFormReset() { this.form1 = new WeaForm(); } + + setHasRight(bool) { + this.hasRight = bool; + } } diff --git a/pc4mobx/organization/stores/rankscheme.js b/pc4mobx/organization/stores/rankscheme.js index 4705bd9..11f799a 100644 --- a/pc4mobx/organization/stores/rankscheme.js +++ b/pc4mobx/organization/stores/rankscheme.js @@ -44,7 +44,7 @@ export class RankSchemeStore { @observable dialogLoading = true; @observable schemeId = ''; @observable date = ''; - + @observable hasRight = ''; @@ -65,6 +65,7 @@ export class RankSchemeStore { } Api.getSearchList(params).then(res => { if (res.code === 200) { + this.setHasRight(res.data.hasRight); res.data.datas && this.tableStore.getDatas(res.data.datas, 1); } else { message.warning(res.msg); @@ -305,4 +306,8 @@ export class RankSchemeStore { this.rightMenu = rightMenu; } + setHasRight(bool) { + this.hasRight = bool; + } + } \ No newline at end of file diff --git a/pc4mobx/organization/stores/sequence.js b/pc4mobx/organization/stores/sequence.js index 547cfbd..d7556c7 100644 --- a/pc4mobx/organization/stores/sequence.js +++ b/pc4mobx/organization/stores/sequence.js @@ -47,7 +47,7 @@ export class SequenceStore { @observable selectedKey = -1; @observable topTab = []; @observable topTabCount = {}; - + @observable hasRight = ''; @action @@ -68,6 +68,7 @@ export class SequenceStore { } Api.getSearchList(params).then(res => { if (res.code === 200) { + this.setHasRight(res.data.hasRight); res.data.datas && this.tableStore.getDatas(res.data.datas, 1); } else { message.warning(res.msg); @@ -337,4 +338,8 @@ export class SequenceStore { this.rightMenu = rightMenu; } + setHasRight(bool) { + this.hasRight = bool; + } + } \ No newline at end of file diff --git a/pc4mobx/organization/stores/staff.js b/pc4mobx/organization/stores/staff.js index 9a1b4f7..aafcbc0 100644 --- a/pc4mobx/organization/stores/staff.js +++ b/pc4mobx/organization/stores/staff.js @@ -44,7 +44,7 @@ export class StaffStore { @observable dialogLoading = true; @observable staffId = ''; @observable date = ''; - + @observable hasRight = ''; @@ -65,6 +65,7 @@ export class StaffStore { } Api.getSearchList(params).then(res => { if (res.code === 200) { + this.setHasRight(res.data.hasRight); res.data.datas && this.tableStore.getDatas(res.data.datas, 1); } else { message.warning(res.msg); @@ -287,4 +288,8 @@ export class StaffStore { this.rightMenu = rightMenu; } + setHasRight(bool) { + this.hasRight = bool; + } + } \ No newline at end of file diff --git a/pc4mobx/organization/stores/staffscheme.js b/pc4mobx/organization/stores/staffscheme.js index 00b4a61..11fe89e 100644 --- a/pc4mobx/organization/stores/staffscheme.js +++ b/pc4mobx/organization/stores/staffscheme.js @@ -35,7 +35,7 @@ export class StaffSchemeStore { @observable form2 = new WeaForm(); @observable form = new WeaForm(); @observable form1 = new WeaForm(); - @observable schemeName = ''; + @observable planName = ''; @observable conditionNum = 8; @observable ids = ''; //选择行id @observable searchConditionLoading = true; @@ -44,7 +44,7 @@ export class StaffSchemeStore { @observable dialogLoading = true; @observable schemeId = ''; @observable date = ''; - + @observable hasRight = ''; @@ -56,7 +56,7 @@ export class StaffSchemeStore { if (this.isEmptyObject(this.form2.getFormParams())) { params = { ...this.form2.getFormParams(), - schemeName: this.schemeName + planName: this.planName }; } else { params = { @@ -65,6 +65,7 @@ export class StaffSchemeStore { } Api.getSearchList(params).then(res => { if (res.code === 200) { + this.setHasRight(res.data.hasRight) res.data.datas && this.tableStore.getDatas(res.data.datas, 1); } else { message.warning(res.msg); @@ -216,7 +217,7 @@ export class StaffSchemeStore { updateFields(val) { this.form2.updateFields({ - schemeName: { + planName: { value: val } }); @@ -238,8 +239,8 @@ export class StaffSchemeStore { } } - setSchemeName(val) { - this.schemeName = val; + setPlanName(val) { + this.planName = val; } isEmptyObject(obj) { @@ -305,4 +306,8 @@ export class StaffSchemeStore { this.rightMenu = rightMenu; } + setHasRight(bool) { + this.hasRight = bool; + } + } \ No newline at end of file