给部分表增加启用状态和排序字段,完善对应页面

This commit is contained in:
季圣华
2022-08-26 01:52:48 +08:00
parent f8e542cbcc
commit b6cf6d4ac3
16 changed files with 132 additions and 57 deletions

View File

@@ -37,6 +37,8 @@
<a-dropdown>
<a-menu slot="overlay">
<a-menu-item key="1" v-if="btnEnableList.indexOf(1)>-1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="2" v-if="btnEnableList.indexOf(1)>-1" @click="batchSetStatus(true)"><a-icon type="check-square"/>启用</a-menu-item>
<a-menu-item key="3" v-if="btnEnableList.indexOf(1)>-1" @click="batchSetStatus(false)"><a-icon type="close-square"/>禁用</a-menu-item>
</a-menu>
<a-button>
批量操作 <a-icon type="down" />
@@ -64,6 +66,11 @@
<a>删除</a>
</a-popconfirm>
</span>
<!-- 状态渲染模板 -->
<template slot="customRenderFlag" slot-scope="enabled">
<a-tag v-if="enabled" color="green">启用</a-tag>
<a-tag v-if="!enabled" color="orange">禁用</a-tag>
</template>
</a-table>
</div>
<!-- table区域-end -->
@@ -109,16 +116,14 @@
}
},
{
title: '姓名',
align:"center",
dataIndex: 'name',
width: 100,
title: '姓名', align:"center", dataIndex: 'name', width: 100,
},
{
title: '类型',
align:"center",
dataIndex: 'type',
width: 100,
title: '类型', align:"center", dataIndex: 'type', width: 100,
},
{ title: '排序', dataIndex: 'sort', width: 60},
{ title: '状态',dataIndex: 'enabled',width:60,align:"center",
scopedSlots: { customRender: 'customRenderFlag' }
},
{
title: '操作',
@@ -131,7 +136,8 @@
url: {
list: "/person/list",
delete: "/person/delete",
deleteBatch: "/person/deleteBatch"
deleteBatch: "/person/deleteBatch",
batchSetStatusUrl: "/person/batchSetStatus"
}
}
},