企通学配置
This commit is contained in:
parent
a7a0de166e
commit
403d040956
|
|
@ -2,5 +2,8 @@ import { WeaTools } from 'ecCom';
|
|||
|
||||
|
||||
export const getQtxConfigInfo = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/cardAccess/getCardButtonTable', 'GET', params);
|
||||
}
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/config/selectConfigInfo', 'GET', params);
|
||||
}
|
||||
export const saveQtxConfigInfo = (params) => {
|
||||
return WeaTools.callApi('/api/bs/hrmorganization/config/saveConfigInfo', 'POST', params);
|
||||
}
|
||||
|
|
@ -90,7 +90,8 @@ export default class QtxConfig extends React.Component {
|
|||
const {
|
||||
qtxConfig
|
||||
} = this.props;
|
||||
//qtxConfig.saveQuickSearchInfo();
|
||||
let result = this.tableEdit.refs.edit.doRequiredCheck();
|
||||
result.pass && qtxConfig.saveQtxConfigInfo();
|
||||
}
|
||||
|
||||
login = () => {
|
||||
|
|
@ -157,6 +158,7 @@ export default class QtxConfig extends React.Component {
|
|||
<WeaSearchGroup ecId={`${this && this.props && this.props.ecId || ''}_WeaSearchGroup@s8pupj`} needTigger={false} showGroup={true} title={getLabel(-1, "数据库设置")}>
|
||||
<WeaTableEdit
|
||||
ecId={`${this && this.props && this.props.ecId || ""}_WeaTableEdit@7rorir`}
|
||||
ref={el => {this.tableEdit = el}}
|
||||
draggable
|
||||
deleteConfirm
|
||||
showCopy={false}
|
||||
|
|
|
|||
|
|
@ -64,9 +64,9 @@ export class QtxConfigStore {
|
|||
columns: columns,
|
||||
loading: false
|
||||
});
|
||||
// this.configForm.updateFields({
|
||||
// isquicksearch: data.setting.isquicksearch,
|
||||
// });
|
||||
this.configForm.updateFields({
|
||||
isopenconfig: data.isopenconfig,
|
||||
});
|
||||
} else {
|
||||
message.error(`[${getLabel(127353, "错误") + code}]:${msg}`);
|
||||
}
|
||||
|
|
@ -74,7 +74,6 @@ export class QtxConfigStore {
|
|||
}
|
||||
|
||||
setTableEditDatas = (e) => {
|
||||
debugger;
|
||||
if(e.length > 1) {
|
||||
e.pop();
|
||||
message.error("默认只能添加一条配置数据!!!")
|
||||
|
|
@ -85,35 +84,40 @@ export class QtxConfigStore {
|
|||
}
|
||||
|
||||
@action("保存页面") saveQtxConfigInfo = () => {
|
||||
// let datas = this.quickSearchData.datas;
|
||||
// datas.map((data, index) => {
|
||||
// data.orderid = index
|
||||
// });
|
||||
|
||||
// let formparm = this.configForm.getFormParams();
|
||||
// if (!this.checkQuickSearchData()) {
|
||||
// message.error(getLabel('387954', "条件字段不能重复"));
|
||||
// return;
|
||||
// }
|
||||
// let id = this.quickSearchData.setting.id;
|
||||
// if (id == null) {
|
||||
// return;
|
||||
// }
|
||||
// API.saveQuickSearchInfo({
|
||||
// id: id,
|
||||
// data: JSON.stringify(datas), ...formparm
|
||||
// }).then(({ code, data, msg }) => {
|
||||
// if (code == 200) {
|
||||
// message.success(getLabel(83551, '保存成功!'));
|
||||
// this.qcSelectedRowKeys = [];
|
||||
// this.getQuickSearchInfo();
|
||||
// } else {
|
||||
// message.error(`[${getLabel(127353, "错误") + code}]:${msg}`);
|
||||
// }
|
||||
// });
|
||||
// this.quickSearchData.setting.id = null;
|
||||
if(this.editTableData.datas.length == 0) {
|
||||
return message.error("至少保存一条配置数据!!")
|
||||
}
|
||||
let editTable = JSON.stringify(this.editTableData.datas[0]);
|
||||
API.saveQtxConfigInfo({
|
||||
...this.configForm.getFormParams(),
|
||||
editTable,
|
||||
}).then(({ code, data, msg }) => {
|
||||
if (code == 200) {
|
||||
message.success(getLabel(83551, '保存成功!'));
|
||||
this.getQtxConfigInfo();
|
||||
} else {
|
||||
message.error(`[${getLabel(127353, "错误") + code}]:${msg}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
arrToJson = (arr) => {
|
||||
let json = {};
|
||||
const _rows = isEmpty(arr) ? [] : rows;
|
||||
_rows && _rows.map(index => {
|
||||
arr[index][rowKey] = "1";
|
||||
});
|
||||
arr.map((item, index) => {
|
||||
if (!item[rowKey]) item[rowKey] = "0";
|
||||
for (let key in item) {
|
||||
json[key + "_" + index] = item[key];
|
||||
}
|
||||
});
|
||||
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
/**===========================buttons=========================== */
|
||||
rightMenu = [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue