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