diff --git a/pc4mobx/organization/components/columnSetting/customItem.js b/pc4mobx/organization/components/columnSetting/customItem.js index becd1ab..c0f5e0c 100644 --- a/pc4mobx/organization/components/columnSetting/customItem.js +++ b/pc4mobx/organization/components/columnSetting/customItem.js @@ -16,12 +16,11 @@ class CustomItem extends Component { }; onRowSelect = (sRowKeys, rows, dataIndex, selectedDatas) => { - console.log(sRowKeys, rows, dataIndex, selectedDatas); const { columnSetting } = this.props; if (dataIndex === undefined || selectedDatas === undefined) { return; } - columnSetting.setEnableRows(selectedDatas.isused); + columnSetting.setEnableThreeRows(selectedDatas.status); }; render() { diff --git a/pc4mobx/organization/stores/columnSetting.js b/pc4mobx/organization/stores/columnSetting.js index 24a2ab0..a52a72f 100644 --- a/pc4mobx/organization/stores/columnSetting.js +++ b/pc4mobx/organization/stores/columnSetting.js @@ -176,6 +176,21 @@ export class ColumnSetting { if (!columns || !datas) { return; } + + columns.map((c, index) => { + if (c.key === "url") { + c.title = + {c.title} + + + + ; + } + }); extendObservable(this.tabThreeRelatedData, { datas: datas, columns: columns @@ -235,25 +250,15 @@ export class ColumnSetting { }); } customItemSave() { - // if (!this.verify(toJS(this.tabThreeRelatedData.datas))) return; let params = this.tabThreeSaveParams; - Api.saveFieldDefinedInfo(params).then(res => { - console.log(res); - // let { - // api_status, - // sign - // } = res; - // - // if (api_status) { - // if (sign == "1") { - // res.message && message.success(res.message); - // } else { - // res.message && message.warning(res.message); - // } - // } else { - // message.error(res.message); - // } + let { code, msg } = res; + if (code === 200) { + message.success(msg || "操作成功"); + this.loadTabThreeRelatedData(); + } else { + message.error(msg); + } }).catch(error => { message.error(error); }); @@ -309,6 +314,13 @@ export class ColumnSetting { } }); } + setEnableThreeRows(e) { + extendObservable(this.tabThreeRelatedData, { + selectedData: { + status: e + } + }); + } arrToJson(arr, rows, rowKey="isused") { let json = {};