diff --git a/pc4mobx/organization/components/NewWeaTableEditDialog.js b/pc4mobx/organization/components/NewWeaTableEditDialog.js index 19a44f8..730ffec 100644 --- a/pc4mobx/organization/components/NewWeaTableEditDialog.js +++ b/pc4mobx/organization/components/NewWeaTableEditDialog.js @@ -45,7 +45,8 @@ export default class NewWeaTableEditDialog extends React.Component { ecId={`${this && this.props && this.props.ecId || ""}_WeaTableEdit@7rorir`} draggable deleteConfirm - title="" + title="模板" + showCopy={false} columns={toJS(columns)} datas={toJS(datas)} copyFilterProps={["id"]} diff --git a/pc4mobx/organization/components/resource/resource.js b/pc4mobx/organization/components/resource/resource.js index 5fc987c..93f0d48 100644 --- a/pc4mobx/organization/components/resource/resource.js +++ b/pc4mobx/organization/components/resource/resource.js @@ -364,6 +364,7 @@ export default class Resource extends React.Component { reRenderColumns(columns) { let _this = this; columns.forEach((c, index) => { + c.className = "wea-table-indent" if (c.dataIndex == 'lastname') { c.render = function (text, record) { return { @@ -509,8 +510,7 @@ export default class Resource extends React.Component { if (hasRight === false) { return renderNoright(); } - - + const width = tableStore.columns.filter(c => c.display === "true").length * 50; return ( hasRight &&
this.reRenderColumns(c)} onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)} + tableWidth={width} /> diff --git a/pc4mobx/organization/stores/resource.js b/pc4mobx/organization/stores/resource.js index d75b09c..f02e843 100644 --- a/pc4mobx/organization/stores/resource.js +++ b/pc4mobx/organization/stores/resource.js @@ -251,25 +251,23 @@ export class ResourceStore { @action("列定制保存") saveCustomDefine = () => { if(this.customTemplateId == '-1') { - message.error("默认模板不能修改"); - }else { - - const params = { - columns:this.transfer.transferKeys, - templateId:this.customTemplateId - } - Api.getTemplateSelectKeys(params).then(res => { - if (res.code === 200) { - this.transfer.transferKeys = res.data.split(","); - } else { - this.searchDialog.visible = false; - this.getTableInfo(); - } - }, error => { - message.warning(error.msg); - }) + message.error("默认模板不能修改,将返回默认模板列"); } + const params = { + columns:this.transfer.transferKeys, + templateId:this.customTemplateId + } + Api.saveColumnsCustomTemplate(params).then(res => { + if (res.code === 200) { + this.searchDialog.visible = false; + this.getTableInfo(); + } + }, error => { + message.warning(error.msg); + }) + + } @action("高级搜索模板切换") changeSearchTemplate(v) { @@ -381,7 +379,8 @@ export class ResourceStore { }).then(data => { if (data.code === 200) { this.customTemplateId = data.data; - + this.getSearchTemplate(); + message.success(data.msg); } else { message.warning(data.msg); }