给部分表增加启用状态和排序字段,完善对应页面
This commit is contained in:
@@ -27,6 +27,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" />
|
||||
@@ -54,6 +56,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 -->
|
||||
@@ -125,10 +132,13 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{ title: '状态',dataIndex: 'enabled',width:60,align:"center",
|
||||
scopedSlots: { customRender: 'customRenderFlag' }
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
width:120,
|
||||
width:100,
|
||||
align:"center",
|
||||
scopedSlots: { customRender: 'action' },
|
||||
}
|
||||
@@ -136,7 +146,8 @@
|
||||
url: {
|
||||
list: "/unit/list",
|
||||
delete: "/unit/delete",
|
||||
deleteBatch: "/unit/deleteBatch"
|
||||
deleteBatch: "/unit/deleteBatch",
|
||||
batchSetStatusUrl: "/unit/batchSetStatus"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user