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