花名册模板管理

This commit is contained in:
Chengliang 2023-01-16 09:50:36 +08:00
parent 5baac661e2
commit fc1184c64d
3 changed files with 22 additions and 21 deletions

View File

@ -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"]}

View File

@ -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 <a href='javascript:void(0);' onClick={() => {
@ -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 && <div ref='page' style={{ height: '100%' }}>
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@k6oc4u`}
@ -548,6 +548,7 @@ export default class Resource extends React.Component {
needScroll={true}
getColumns={c => this.reRenderColumns(c)}
onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)}
tableWidth={width}
/>
</WeaLeftRightLayout>
</WeaTop>

View File

@ -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);
}