feature/2.15.1.2407.01-权限
This commit is contained in:
parent
94a4d3a930
commit
cd768fff67
|
|
@ -297,22 +297,33 @@ export const personScopeConditions = [
|
|||
{
|
||||
conditionType: "SELECT_LINKAGE",
|
||||
domkey: ["targetParams"],
|
||||
fieldcol: 16,
|
||||
fieldcol: 18,
|
||||
label: "对象类型",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
labelcol: 6,
|
||||
options: [],
|
||||
rules: "required|string",
|
||||
selectLinkageDatas: {},
|
||||
selectLinkageDatas: {
|
||||
EMPLOYEE: {
|
||||
conditionType: "TEXTAREA",
|
||||
domkey: ["target"],
|
||||
fieldcol: 24,
|
||||
label: "",
|
||||
labelcol: 0,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
}
|
||||
},
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["employeeStatus"],
|
||||
fieldcol: 16,
|
||||
fieldcol: 18,
|
||||
label: "选择员工状态",
|
||||
lanId: 111,
|
||||
labelcol: 8,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
detailtype: "2",
|
||||
rules: "required|string",
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ class PersonalScopeModal extends Component {
|
|||
this.state = {
|
||||
loading: false, conditions: [],
|
||||
employeeStatus: [],
|
||||
targetTypeList: [],
|
||||
targetType: "EMPLOYEE",
|
||||
targetTypeIds: "",
|
||||
targetTypeIdsNames: "",
|
||||
|
|
@ -48,14 +47,15 @@ class PersonalScopeModal extends Component {
|
|||
if (status) {
|
||||
const { employeeStatus, targetTypeList } = data;
|
||||
this.setState({
|
||||
targetTypeList: _.map(targetTypeList, it => ({ key: it.id, showname: it.name })),
|
||||
employeeStatus: _.map(employeeStatus, it => ({ key: it.id, showname: it.name })),
|
||||
conditions: _.map(personScopeConditions, item => ({
|
||||
employeeStatus, conditions: _.map(personScopeConditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
if (getKey(o) === "employeeStatus") {
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label),
|
||||
options: _.map(employeeStatus, it => ({ key: it.id, showname: it.name }))
|
||||
options: [
|
||||
{ key: "ALL", showname: getLabel(111, "全选") },
|
||||
..._.map(employeeStatus, it => ({ key: it.id, showname: it.name }))
|
||||
]
|
||||
};
|
||||
}
|
||||
return {
|
||||
|
|
@ -128,6 +128,20 @@ class PersonalScopeModal extends Component {
|
|||
}}
|
||||
/>;
|
||||
};
|
||||
handleChange = (params) => {
|
||||
const { taxAgentStore: { personScopeForm } } = this.props, { employeeStatus } = this.state;
|
||||
const key = _.keys(params)[0], value = params[key].value;
|
||||
if (
|
||||
(key === "employeeStatus" && value.indexOf("ALL") !== -1)
|
||||
// (key === "employeeStatus" && value.indexOf("ALL") === -1 && _.every(employeeStatus, o => value.indexOf(o.id) !== -1))
|
||||
) {
|
||||
personScopeForm.updateFields({ [key]: { value: "ALL," + _.map(employeeStatus, o => o.id).join(",") } });
|
||||
} else if (key === "employeeStatus" && value.indexOf("ALL") === -1) {
|
||||
console.log(1)
|
||||
// personScopeForm.updateFields({ [key]: { value: "" } });
|
||||
}
|
||||
console.log(params);
|
||||
};
|
||||
handleReset = () => {
|
||||
this.setState({
|
||||
targetType: "EMPLOYEE",
|
||||
|
|
@ -150,7 +164,7 @@ class PersonalScopeModal extends Component {
|
|||
this.handleReset();
|
||||
onCancel();
|
||||
}}>
|
||||
<div className="form-dialog-layout">{getSearchs(personScopeForm, conditions, 1, false)}</div>
|
||||
<div className="form-dialog-layout">{getSearchs(personScopeForm, conditions, 1, false, this.handleChange)}</div>
|
||||
{/*<WeaSearchGroup col={1} needTigger title="" showGroup center>*/}
|
||||
{/* <WeaFormItem*/}
|
||||
{/* label="对象类型"*/}
|
||||
|
|
|
|||
Loading…
Reference in New Issue