diff --git a/pc4mobx/organization/apis/hrmInfoExtend.js b/pc4mobx/organization/apis/hrmInfoExtend.js
new file mode 100644
index 0000000..c2dea13
--- /dev/null
+++ b/pc4mobx/organization/apis/hrmInfoExtend.js
@@ -0,0 +1,11 @@
+import {
+ WeaTools
+} from 'ecCom';
+
+export const editResource = (params) => {
+ return WeaTools.callApi('/api/bs/hrmorganization/hrmresource/updateForm', 'POST', params);
+}
+
+export const getResourceExtendForm = (params) => {
+ return WeaTools.callApi('/api/bs/hrmorganization/hrmresource/getTabForm', 'GET', params);
+}
\ No newline at end of file
diff --git a/pc4mobx/organization/apis/job.js b/pc4mobx/organization/apis/job.js
index d3fc1ec..694f9f4 100644
--- a/pc4mobx/organization/apis/job.js
+++ b/pc4mobx/organization/apis/job.js
@@ -87,6 +87,10 @@ export const getHasRight = (params) => {
return WeaTools.callApi('/api/bs/hrmorganization/job/getHasRight', 'GET', params);
}
+export const getLevelId = (params) => {
+ return WeaTools.callApi('/api/bs/hrmorganization/grade/getLevelId', 'GET', params);
+}
+
export const getMergeForm = (params = {}) => {
return WeaTools.callApi('/api/bs/hrmorganization/job/getMergeForm', 'GET', params);
}
diff --git a/pc4mobx/organization/apis/jobgrade.js b/pc4mobx/organization/apis/jobgrade.js
index 2029137..8109602 100644
--- a/pc4mobx/organization/apis/jobgrade.js
+++ b/pc4mobx/organization/apis/jobgrade.js
@@ -62,6 +62,7 @@ export const getTabInfo = (params) => {
return WeaTools.callApi('/api/bs/hrmorganization/grade/getTabInfo', 'GET', params);
}
+
export const getHasRight = (params) => {
return WeaTools.callApi('/api/bs/hrmorganization/grade/getHasRight', 'GET', params);
}
diff --git a/pc4mobx/organization/components/NewAndEditDialog.js b/pc4mobx/organization/components/NewAndEditDialog.js
index 6e65d79..c041255 100644
--- a/pc4mobx/organization/components/NewAndEditDialog.js
+++ b/pc4mobx/organization/components/NewAndEditDialog.js
@@ -66,7 +66,7 @@ export default class NewAndEditDialog extends React.Component {
if (moduleName == 'department' && data.parent_comp) {
bindChangeEnvent(data.parent_comp.value);
}
- if (moduleName == 'job' && (data.sequence_id || data.level_id)) {
+ if (moduleName == 'job' && (data.sequence_id || data.grade_id)) {
bindChangeEnvent(data);
}
};
diff --git a/pc4mobx/organization/components/job/JobExtend.js b/pc4mobx/organization/components/job/JobExtend.js
index 5f900cd..3338e57 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-06-22 17:01:11
+ * @LastEditTime: 2022-07-12 16:25:58
* @Description:
* @FilePath: /trunk/src4js/pc4mobx/organization/components/job/JobExtend.js
*/
@@ -105,12 +105,12 @@ export default class JobExtend extends React.Component {
getSearchs = () => {
const { jobExtend } = this.props;
- let { form, conditions, isEditor } = jobExtend;
+ let { form, condition, isEditor } = jobExtend;
const { isFormInit } = form;
let group = [];
let tipPosition = 'bottom';
window.e9HideFormFieldKeys = [];
- isFormInit && conditions.forEach((c, i) => {
+ isFormInit && condition.forEach((c, i) => {
let items = [];
c.items.forEach((field, j) => {
if (c.hide || (!isEmpty(field.otherParams) && field.otherParams.hide)) {
@@ -124,7 +124,7 @@ export default class JobExtend extends React.Component {
tipPosition={tipPosition}
labelCol={{ span: `${field.labelcol}` }}
wrapperCol={{ span: `${field.fieldcol}` }}>
-
+
),
colSpan: 1
});
@@ -136,6 +136,14 @@ export default class JobExtend extends React.Component {
return group;
}
+ onChange = (data) => {
+ const { jobExtend } = this.props;
+ if (data.sequence_id || data.grade_id) {
+ jobExtend.updateConditions(data);
+ }
+ }
+
+
tableEditChange = (data) => {
const { jobExtend } = this.props;
let { detailSelectedKey = '0', tableInfo } = jobExtend;
@@ -228,7 +236,7 @@ export default class JobExtend extends React.Component {
render() {
const { jobExtend } = this.props;
- const { loading, tabkey, tabInfo, topTab, selectedKey, date, detailSelectedKey,isEditor } = jobExtend;
+ const { loading, tabkey, tabInfo, topTab, selectedKey, date, detailSelectedKey, isEditor } = jobExtend;
try {
@@ -239,7 +247,7 @@ export default class JobExtend extends React.Component {
>
}
iconBgcolor='#217346'
buttons={this.getTopButtons()}
diff --git a/pc4mobx/organization/components/resource/HrmInfoExtend.js b/pc4mobx/organization/components/resource/HrmInfoExtend.js
new file mode 100644
index 0000000..5c16bea
--- /dev/null
+++ b/pc4mobx/organization/components/resource/HrmInfoExtend.js
@@ -0,0 +1,187 @@
+
+import { Button, Modal, message, Row, Col, Spin } from 'antd';
+import isEmpty from 'lodash/isEmpty'
+import cloneDeep from 'lodash/cloneDeep'
+import forEach from 'lodash/forEach'
+import { WeaAlertPage, WeaTools, WeaTableEdit, WeaSearchGroup, WeaRightMenu, WeaFormItem, WeaTab, WeaTop } from 'ecCom'
+import { WeaSwitch, WeaForm } from 'comsMobx';
+import { inject, observer } from 'mobx-react';
+import * as mobx from 'mobx';
+import { i18n } from '../../public/i18n';
+import * as Api from '../../apis/hrmInfoExtend'; // 引入API接口文件
+
+
+const toJS = mobx.toJS;
+import '../../style/common.less';
+
+
+
+export default class HrmInfoExtend extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ id: props.location.query.hrmResourceID,
+ isEditor: false,
+ loading: false,
+ form: new WeaForm(),
+ conditions: [],
+ buttons: {},
+ date: ''
+ }
+ }
+
+ componentDidMount() {
+ this.init();
+ }
+
+ init = () => {
+ this.setState({
+ isEditor: false
+ });
+ this.getData();
+ }
+
+ getData = () => {
+ this.state.loading = true;
+ let params = {
+ viewAttr: this.isEditor ? 2 : 1,
+ id: this.state.id,
+ }
+ Api.getResourceExtendForm(params).then((res) => {
+ if (res.code === 200) {
+ this.state.form.initFormFields(res.data.conditions);
+ this.setState({
+ conditions: res.data.conditions,
+ buttons: res.data.buttons,
+ loading: false
+ })
+ } else {
+ message.warning(res.msg);
+ }
+ }, error => {
+ message.warning(error.msg);
+ })
+ }
+
+ getTopButtons = () => {
+ const { isEditor, buttons } = this.state;
+ const save = ;
+ const back = ;
+ const edit = ;
+ const btns = [];
+ try {
+ if (isEditor) {
+ if (buttons.hasSave) {
+ btns.push(save);
+ btns.push(back);
+ }
+ } else {
+ if (buttons.hasEdit) {
+ btns.push(edit);
+ }
+ }
+ } catch (e) { }
+ return btns;
+ }
+
+ getSearchs = () => {
+ let { form, conditions, isEditor } = this.state;
+ const { isFormInit } = form;
+ let group = [];
+ let tipPosition = 'bottom';
+ window.e9HideFormFieldKeys = [];
+ isFormInit && conditions.forEach((c, i) => {
+ let items = [];
+ c.items.forEach((field, j) => {
+ if (c.hide || (!isEmpty(field.otherParams) && field.otherParams.hide)) {
+ window.e9HideFormFieldKeys.push(field.domkey[0]);
+ } else {
+ items.push({
+ com: (
+
+ ),
+ colSpan: 1
+ });
+ }
+ });
+ group.push()
+ });
+ return group;
+ }
+
+ editCard = () => {
+ this.setState({
+ isEditor: true
+ })
+ this.getData();
+ }
+
+ //todo 更新操作暂不处理
+ saveEditCard = () => {
+ const {loading,form} = this.state;
+ this.state.form.validateForm().then(f => {
+ if (f.isValid) {
+ this.state.loading = true;
+ let pDatas = this.form.getFormParams();
+ Api.editResource({
+ ...{
+ id: this.id
+ },
+ ...pDatas,
+ ...this.getTableEditParams()
+ }).then(data => {
+ if (data.code == 200) {
+ message.success(i18n.message.saveSuccess());
+ this.init();
+ this.getData();
+ this.selectedRowKeys = [];
+ } else {
+ message.warning(data.message);
+ }
+ this.loading = false;
+ }, error => {
+ message.warning(error.message);
+ this.loading = false;
+ })
+ } else {
+ f.showErrors();
+ this.setDate(new Date());
+ this.loading = false;
+ }
+ })
+ }
+
+ backCard = () => {
+ this.init();
+ }
+
+
+ render() {
+
+ const { loading } = this.state;
+
+ return (
+
+
+ {
+ loading ?
+
+
+ : this.getSearchs()
+ }
+
+
+
+ )
+ }
+}
+
diff --git a/pc4mobx/organization/index.js b/pc4mobx/organization/index.js
index 739d5bc..5b5d7f0 100644
--- a/pc4mobx/organization/index.js
+++ b/pc4mobx/organization/index.js
@@ -26,6 +26,7 @@ import FieldDefined from "./components/fieldDefinedSet/FieldDefined";
import Resource from "./components/resource/resource";
import ResourceExtend from "./components/resource/ResourceExtend";
import BasicInfoImport from "./components/import";
+import HrmInfoExtend from "./components/resource/HrmInfoExtend";
import stores from "./stores";
import "./style/index";
@@ -84,6 +85,7 @@ const Routes = (
+
diff --git a/pc4mobx/organization/public/i18n.js b/pc4mobx/organization/public/i18n.js
index 53a0ac5..ab5efc7 100644
--- a/pc4mobx/organization/public/i18n.js
+++ b/pc4mobx/organization/public/i18n.js
@@ -147,7 +147,7 @@ export const i18n = {
jobName: () => getLabel(385936, '岗位'),
newJob: () => getLabel(386246, '新增岗位'),
editJobInfo: () => getLabel(386247, '修改岗位信息'),
- jobInfo: () => getLabel(386247, '岗位信息'),
+ jobsInfo: () => getLabel(386247, '岗位信息'),
deptManage: () => getLabel(385936, '部门管理'),
newDept: () => getLabel(386246, '新增部门'),
mergeDept:()=> getLabel(386246, '合并部门'),
diff --git a/pc4mobx/organization/stores/job.js b/pc4mobx/organization/stores/job.js
index 361250f..d968ff4 100644
--- a/pc4mobx/organization/stores/job.js
+++ b/pc4mobx/organization/stores/job.js
@@ -306,95 +306,100 @@ export class JobStore {
updateConditions(data) {
if (data.sequence_id) {
- let label = "等级方案"
- const index = findIndex(this.condition[1].items, { label });
- const schemeId = data.sequence_id.valueObj[0].scheme_values;
- this.condition[1].items[index].browserConditionParam.replaceDatas = [{ name: data.sequence_id.valueObj[0].scheme_ids, id: schemeId }];
- //清空职级并限制范围
- label = "职级"
- const index1 = findIndex(this.condition[1].items, { label });
- let currenttime = Date.now();
- let key = `scheme_id_${currenttime}`;
- const lastKey = this.key;
- this.setKey(key);
-
- Reflect.deleteProperty(this.condition[1].items[index1].browserConditionParam.completeParams, lastKey);
- Reflect.deleteProperty(this.condition[1].items[index1].browserConditionParam.conditionDataParams, lastKey);
- Reflect.deleteProperty(this.condition[1].items[index1].browserConditionParam.dataParams, lastKey);
- Reflect.deleteProperty(this.condition[1].items[index1].browserConditionParam.destDataParams, lastKey);
-
- this.condition[1].items[index1].browserConditionParam.completeParams = {
- [key]: schemeId,
- ...this.condition[1].items[index1].browserConditionParam.completeParams,
- currenttime: currenttime
+ if (data.sequence_id.valueObj.length > 0) {
+ let label = "等级方案"
+ const index = findIndex(this.condition[1].items, { label });
+ const schemeId = data.sequence_id.valueObj[0].scheme_values;
+ this.condition[1].items[index].browserConditionParam.replaceDatas = [{ name: data.sequence_id.valueObj[0].scheme_ids, id: schemeId }];
+ //清空职级并限制范围
+ label = "职级"
+ const index1 = findIndex(this.condition[1].items, { label });
+ let currenttime = 1657247378274
+ let key = `scheme_id_${currenttime}`;
+ this.condition[1].items[index1].browserConditionParam.completeParams = {
+ ...this.condition[1].items[index1].browserConditionParam.completeParams,
+ [key]: schemeId,
+ currenttime: currenttime
+ }
+ this.condition[1].items[index1].browserConditionParam.conditionDataParams = {
+ ...this.condition[1].items[index1].browserConditionParam.conditionDataParams,
+ [key]: schemeId,
+ currenttime: currenttime
+ }
+ this.condition[1].items[index1].browserConditionParam.dataParams = {
+ ...this.condition[1].items[index1].browserConditionParam.dataParams,
+ [key]: schemeId,
+ currenttime: currenttime
+ }
+ this.condition[1].items[index1].browserConditionParam.destDataParams = {
+ ...this.condition[1].items[index1].browserConditionParam.destDataParams,
+ [key]: schemeId,
+ currenttime: currenttime
+ }
}
- this.condition[1].items[index1].browserConditionParam.conditionDataParams = {
- [key]: schemeId,
- ...this.condition[1].items[index1].browserConditionParam.conditionDataParams,
- currenttime: currenttime
- }
- this.condition[1].items[index1].browserConditionParam.dataParams = {
- [key]: schemeId,
- ...this.condition[1].items[index1].browserConditionParam.dataParams,
- currenttime: currenttime
- }
- this.condition[1].items[index1].browserConditionParam.destDataParams = {
- [key]: schemeId,
- ...this.condition[1].items[index1].browserConditionParam.destDataParams,
- currenttime: currenttime
- }
-
- this.form.updateFields({
- levelId: {
+ this.form1.updateFields({
+ scheme_id: {
+ value: ''
+ },
+ level_id: {
value: ''
},
grade_id: {
value: ''
}
});
- } else {
-
- //清空职等并限制范围
- let label = "职等"
- const index2 = findIndex(this.condition[1].items, { label });
- let currenttime = Date.now();
- let key1 = `id_${currenttime}`;
- const lastKey = this.key1;
- this.key1 = key1;
- const levelId = '11,12';
- Reflect.deleteProperty(this.condition[1].items[index2].browserConditionParam.completeParams, lastKey);
- Reflect.deleteProperty(this.condition[1].items[index2].browserConditionParam.conditionDataParams, lastKey);
- Reflect.deleteProperty(this.condition[1].items[index2].browserConditionParam.dataParams, lastKey);
- Reflect.deleteProperty(this.condition[1].items[index2].browserConditionParam.destDataParams, lastKey);
-
- this.condition[1].items[index2].browserConditionParam.completeParams = {
- [key1]: levelId,
- ...this.condition[1].items[index2].browserConditionParam.completeParams,
- currenttime: currenttime
+ } else if (data.grade_id) {
+ if (data.grade_id.valueObj.length > 0) {
+ //清空职等并限制范围
+ let label = "职等"
+ const index2 = findIndex(this.condition[1].items, { label });
+ let currenttime = 1657247378274;
+ let key1 = `level_id_${currenttime}`;
+ let key2 = `scheme_id_${currenttime}`;
+ let params = {
+ id:data.grade_id.value
+ };
+ Api.getLevelId(params).then(res => {
+ if (res.code === 200) {
+ const levelId = res.data;
+ this.condition[1].items[index2].browserConditionParam.completeParams = {
+ ...this.condition[1].items[index2].browserConditionParam.completeParams,
+ [key1]: levelId,
+ [key2]: "''",
+ currenttime: currenttime
+ }
+ this.condition[1].items[index2].browserConditionParam.conditionDataParams = {
+ ...this.condition[1].items[index2].browserConditionParam.conditionDataParams,
+ [key1]: levelId,
+ [key2]: "''",
+ currenttime: currenttime
+ }
+ this.condition[1].items[index2].browserConditionParam.dataParams = {
+ ...this.condition[1].items[index2].browserConditionParam.dataParams,
+ [key1]: levelId,
+ [key2]: "''",
+ currenttime: currenttime
+ }
+ this.condition[1].items[index2].browserConditionParam.destDataParams = {
+ ...this.condition[1].items[index2].browserConditionParam.destDataParams,
+ [key]: levelId,
+ [key2]: "''",
+ currenttime: currenttime
+ }
+ } else {
+ message.warning(res.msg);
+ }
+ }, error => {
+ message.warning(error.msg);
+ })
}
- this.condition[1].items[index2].browserConditionParam.conditionDataParams = {
- [key1]: levelId,
- ...this.condition[1].items[index2].browserConditionParam.conditionDataParams,
- currenttime: currenttime
- }
- this.condition[1].items[index2].browserConditionParam.dataParams = {
- [key1]: levelId,
- ...this.condition[1].items[index2].browserConditionParam.dataParams,
- currenttime: currenttime
- }
- this.condition[1].items[index2].browserConditionParam.destDataParams = {
- [key]: levelId,
- ...this.condition[1].items[index2].browserConditionParam.destDataParams,
- currenttime: currenttime
- }
-
- this.form.updateFields({
- grade_id: {
+ this.form1.updateFields({
+ level_id: {
value: ''
}
});
}
- this.setCondition(this.condition, false);
+ this.setCondition(this.condition);
this.form1.initFormFields(this.condition);
}
diff --git a/pc4mobx/organization/stores/jobextend.js b/pc4mobx/organization/stores/jobextend.js
index ba32c8b..c1ba6bc 100644
--- a/pc4mobx/organization/stores/jobextend.js
+++ b/pc4mobx/organization/stores/jobextend.js
@@ -4,14 +4,15 @@ import isEmpty from 'lodash/isEmpty'
import { WeaTableNew } from "comsMobx";
import { Modal, message } from "antd";
import { i18n } from "../public/i18n";
-import forEach from 'lodash/forEach'
import * as Api from '../apis/job'; // 引入API接口文件
-
+import {
+ findIndex, forEach
+} from 'lodash';
export class JobExtendStore {
@observable form = new WeaForm();
@observable tableInfo = []
- @observable conditions = [];
+ @observable condition = [];
@observable isEditor = false;
@observable isNew = true;
@observable loading = true;
@@ -43,12 +44,10 @@ export class JobExtendStore {
this.isEditor = true;
this.getData();
this.getTabInfo();
- //this.tabkey = '0';
this.detailSelectedKey = '0'
}
init = () => {
- //this.tabkey = '0';
this.detailSelectedKey = '0'
this.isEditor = false;
}
@@ -130,7 +129,7 @@ export class JobExtendStore {
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);
+ res.data.result.conditions && this.setCondition(res.data.result.conditions);
this.tableInfo = this.handleTable(res.data.result.tables);
this.getTabInfo();
res.data.result.buttons && this.setButtons(res.data.result.buttons);
@@ -144,10 +143,6 @@ export class JobExtendStore {
}, error => {
message.warning(error.msg);
})
-
-
-
-
}
handleTable = (datas) => {
@@ -171,15 +166,114 @@ export class JobExtendStore {
})
}
})
- //if (!isEmpty(this.tabInfo)) this.tabkey = this.tabInfo[0].key;
if (!isEmpty(this.tabInfo)) this.detailSelectedKey = this.tabInfo[0].key;
}
+
+ updateConditions(data) {
+ if (data.sequence_id) {
+ if (data.sequence_id.valueObj.length > 0) {
+ let label = "等级方案"
+ const index = findIndex(this.condition[1].items, { label });
+ const schemeId = data.sequence_id.valueObj[0].scheme_values;
+ this.condition[1].items[index].browserConditionParam.replaceDatas = [{ name: data.sequence_id.valueObj[0].scheme_ids, id: schemeId }];
+ //清空职级并限制范围
+ label = "职级"
+ const index1 = findIndex(this.condition[1].items, { label });
+ let currenttime = 1657247378274
+ let key = `scheme_id_${currenttime}`;
+ this.condition[1].items[index1].browserConditionParam.completeParams = {
+ ...this.condition[1].items[index1].browserConditionParam.completeParams,
+ [key]: schemeId,
+ currenttime: currenttime
+ }
+ this.condition[1].items[index1].browserConditionParam.conditionDataParams = {
+ ...this.condition[1].items[index1].browserConditionParam.conditionDataParams,
+ [key]: schemeId,
+ currenttime: currenttime
+ }
+ this.condition[1].items[index1].browserConditionParam.dataParams = {
+ ...this.condition[1].items[index1].browserConditionParam.dataParams,
+ [key]: schemeId,
+ currenttime: currenttime
+ }
+ this.condition[1].items[index1].browserConditionParam.destDataParams = {
+ ...this.condition[1].items[index1].browserConditionParam.destDataParams,
+ [key]: schemeId,
+ currenttime: currenttime
+ }
+ }
+ this.form.updateFields({
+ scheme_id: {
+ value: ''
+ },
+ level_id: {
+ value: ''
+ },
+ grade_id: {
+ value: ''
+ }
+ });
+ } else if (data.grade_id) {
+ if (data.grade_id.valueObj.length > 0) {
+ //清空职等并限制范围
+ let label = "职等"
+ const index2 = findIndex(this.condition[1].items, { label });
+ let currenttime = 1657247378274;
+ let key1 = `level_id_${currenttime}`;
+ let key2 = `scheme_id_${currenttime}`;
+ let params = {
+ id:data.grade_id.value
+ };
+ Api.getLevelId(params).then(res => {
+ if (res.code === 200) {
+ const levelId = res.data;
+ this.condition[1].items[index2].browserConditionParam.completeParams = {
+ ...this.condition[1].items[index2].browserConditionParam.completeParams,
+ [key1]: levelId,
+ [key2]: "''",
+ currenttime: currenttime
+ }
+ this.condition[1].items[index2].browserConditionParam.conditionDataParams = {
+ ...this.condition[1].items[index2].browserConditionParam.conditionDataParams,
+ [key1]: levelId,
+ [key2]: "''",
+ currenttime: currenttime
+ }
+ this.condition[1].items[index2].browserConditionParam.dataParams = {
+ ...this.condition[1].items[index2].browserConditionParam.dataParams,
+ [key1]: levelId,
+ [key2]: "''",
+ currenttime: currenttime
+ }
+ this.condition[1].items[index2].browserConditionParam.destDataParams = {
+ ...this.condition[1].items[index2].browserConditionParam.destDataParams,
+ [key]: levelId,
+ [key2]: "''",
+ currenttime: currenttime
+ }
+ } else {
+ message.warning(res.msg);
+ }
+ }, error => {
+ message.warning(error.msg);
+ })
+
+ }
+ this.form.updateFields({
+ level_id: {
+ value: ''
+ }
+ });
+ }
+ this.setCondition(this.condition);
+ //this.form.initFormFields(this.condition);
+ }
+
setLoading(val) {
this.loading = val;
}
-
updateTabKey = (key) => {
this.tabKey = key;
}
@@ -228,8 +322,8 @@ export class JobExtendStore {
this.personalEditTables = ref;
}
- setConditions(conditions) {
- this.conditions = conditions;
+ setCondition(condition) {
+ this.condition = condition;
}
setButtons(buttons) {
diff --git a/pc4mobx/organization/stores/jobgrade.js b/pc4mobx/organization/stores/jobgrade.js
index 83141e5..242e4a8 100644
--- a/pc4mobx/organization/stores/jobgrade.js
+++ b/pc4mobx/organization/stores/jobgrade.js
@@ -47,7 +47,7 @@ export class JobGradeStore {
@observable selectedKey = -1;
@observable topTab = [];
@observable topTabCount = {};
- @observable key = '';//
+ @observable lastime = '';//
@observable hasRight = true;
@observable treeLoading = true;
@@ -277,36 +277,39 @@ export class JobGradeStore {
}
updateConditions(val) {
- let currenttime = 1657247378274;
+ let currenttime = Date.now();
let key = `scheme_id_${currenttime}`;
- let id_key = `level_id_${currenttime}`
- // const lastKey = this.key;
- // Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.completeParams, lastKey);
- // Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.conditionDataParams, lastKey);
- // Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.dataParams, lastKey);
- // Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.destDataParams, lastKey);
- // this.setKey(key);
+ let id_key = `level_id_${currenttime}`;
+ Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.completeParams, `scheme_id_${this.lastime}`);
+ Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.conditionDataParams, `scheme_id_${this.lastime}`);
+ Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.dataParams, `scheme_id_${this.lastime}`);
+ Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.destDataParams, `scheme_id_${this.lastime}`);
+ Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.completeParams, `level_id_${this.lastime}`);
+ Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.conditionDataParams, `level_id_${this.lastime}`);
+ Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.dataParams, `level_id_${this.lastime}`);
+ Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.destDataParams, `level_id_${this.lastime}`);
+ this.setLastTime(currenttime);
this.condition[0].items[4].browserConditionParam.completeParams = {
- [key]: val,
...this.condition[0].items[4].browserConditionParam.completeParams,
+ [key]: val,
currenttime: currenttime,
[id_key]:"''"
}
this.condition[0].items[4].browserConditionParam.conditionDataParams = {
- [key]: val,
...this.condition[0].items[4].browserConditionParam.conditionDataParams,
+ [key]: val,
currenttime: currenttime,
[id_key]:"''"
}
this.condition[0].items[4].browserConditionParam.dataParams = {
- [key]: val,
...this.condition[0].items[4].browserConditionParam.dataParams,
+ [key]: val,
currenttime: currenttime,
[id_key]:"''"
}
this.condition[0].items[4].browserConditionParam.destDataParams = {
- [key]: val,
...this.condition[0].items[4].browserConditionParam.destDataParams,
+ [key]: val,
currenttime: currenttime,
[id_key]:"''"
}
@@ -424,6 +427,10 @@ export class JobGradeStore {
this.key = key;
}
+ setLastTime(time) {
+ this.lastime = time;
+ }
+
setHasRight(bool) {
this.hasRight = bool;
}
diff --git a/pc4mobx/organization/stores/resourceExtend.js b/pc4mobx/organization/stores/resourceExtend.js
index a07aa4d..98f645a 100644
--- a/pc4mobx/organization/stores/resourceExtend.js
+++ b/pc4mobx/organization/stores/resourceExtend.js
@@ -141,10 +141,6 @@ export class ResourceExtendStore {
}, error => {
message.warning(error.msg);
})
-
-
-
-
}
handleTable = (datas) => {