应用配置添加是否显示脱敏表人员信息的配置项完成
This commit is contained in:
parent
d9a6a70012
commit
8040e2fa27
|
|
@ -14,7 +14,7 @@ class AppConfig extends Component {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
openAcctResultSum: "0",
|
openAcctResultSum: "0",
|
||||||
displayPersonalInfo: "0",
|
displayEmpInfoReport: "0",
|
||||||
loading: false
|
loading: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -26,27 +26,27 @@ class AppConfig extends Component {
|
||||||
queryAppsetting = () => {
|
queryAppsetting = () => {
|
||||||
API.queryAppsetting().then(({ status, data }) => {
|
API.queryAppsetting().then(({ status, data }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
const { openAcctResultSum } = data;
|
const { openAcctResultSum, displayEmpInfoReport } = data;
|
||||||
this.setState({ openAcctResultSum });
|
this.setState({ openAcctResultSum, displayEmpInfoReport });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
appSettingSave = () => {
|
appSettingSave = () => {
|
||||||
const { openAcctResultSum } = this.state;
|
const { openAcctResultSum, displayEmpInfoReport } = this.state;
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
API.appSettingSave({ openAcctResultSum }).then(({ status }) => {
|
API.appSettingSave({ openAcctResultSum, displayEmpInfoReport }).then(({ status, errormsg }) => {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
if (status) {
|
if (status) {
|
||||||
message.success("设置成功!");
|
message.success("设置成功!");
|
||||||
this.queryAppsetting();
|
this.queryAppsetting();
|
||||||
} else {
|
} else {
|
||||||
message.error("设置失败!");
|
message.error(errormsg || "设置失败!");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { openAcctResultSum,displayPersonalInfo, loading } = this.state;
|
const { openAcctResultSum, displayEmpInfoReport, loading } = this.state;
|
||||||
const btns = [<Button type="primary" loading={loading} onClick={this.appSettingSave}>保存</Button>];
|
const btns = [<Button type="primary" loading={loading} onClick={this.appSettingSave}>保存</Button>];
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
|
|
@ -61,9 +61,9 @@ class AppConfig extends Component {
|
||||||
{
|
{
|
||||||
com: CheckBox({
|
com: CheckBox({
|
||||||
label: "是否显示脱敏表人员信息",
|
label: "是否显示脱敏表人员信息",
|
||||||
value: displayPersonalInfo,
|
value: displayEmpInfoReport,
|
||||||
onChange: (displayPersonalInfo) => {
|
onChange: (displayEmpInfoReport) => {
|
||||||
this.setState({ displayPersonalInfo });
|
this.setState({ displayEmpInfoReport });
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue