|
|
@ -79,8 +79,24 @@ |
|
|
|
</a-form> |
|
|
|
</a-form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
|
|
|
|
<div class="operator"> |
|
|
|
|
|
|
|
<a-button @click="addNew" type="primary">新建</a-button> |
|
|
|
|
|
|
|
<a-button >批量操作</a-button> |
|
|
|
|
|
|
|
<a-dropdown> |
|
|
|
|
|
|
|
<a-menu @click="handleMenuClick" slot="overlay"> |
|
|
|
|
|
|
|
<a-menu-item key="delete">删除</a-menu-item> |
|
|
|
|
|
|
|
<a-menu-item key="audit">审批</a-menu-item> |
|
|
|
|
|
|
|
</a-menu> |
|
|
|
|
|
|
|
<a-button> |
|
|
|
|
|
|
|
更多操作 <a-icon type="down" /> |
|
|
|
|
|
|
|
</a-button> |
|
|
|
|
|
|
|
</a-dropdown> |
|
|
|
|
|
|
|
</div> |
|
|
|
<standard-table |
|
|
|
<standard-table |
|
|
|
:columns="columns" |
|
|
|
:columns="columns" |
|
|
|
|
|
|
|
:dataSource="dataSource" |
|
|
|
|
|
|
|
:selectedRows="selectedRows" |
|
|
|
|
|
|
|
@change="onchange" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-card> |
|
|
|
</a-card> |
|
|
@ -99,8 +115,11 @@ import ADatePicker from 'vue-antd-ui/es/date-picker/index' |
|
|
|
import AButton from 'vue-antd-ui/es/button/button' |
|
|
|
import AButton from 'vue-antd-ui/es/button/button' |
|
|
|
import AIcon from 'vue-antd-ui/es/icon/icon' |
|
|
|
import AIcon from 'vue-antd-ui/es/icon/icon' |
|
|
|
import StandardTable from '../table/StandardTable' |
|
|
|
import StandardTable from '../table/StandardTable' |
|
|
|
|
|
|
|
import ADropdown from 'vue-antd-ui/es/dropdown' |
|
|
|
|
|
|
|
import AMenu from 'vue-antd-ui/es/menu/index' |
|
|
|
|
|
|
|
|
|
|
|
const ASelectOption = ASelect.Option |
|
|
|
const ASelectOption = ASelect.Option |
|
|
|
|
|
|
|
const AMenuItem = AMenu.Item |
|
|
|
|
|
|
|
|
|
|
|
const columns = [ |
|
|
|
const columns = [ |
|
|
|
{ |
|
|
|
{ |
|
|
@ -115,26 +134,40 @@ const columns = [ |
|
|
|
title: '服务调用次数', |
|
|
|
title: '服务调用次数', |
|
|
|
dataIndex: 'callNo', |
|
|
|
dataIndex: 'callNo', |
|
|
|
sorter: true, |
|
|
|
sorter: true, |
|
|
|
needTotal: true |
|
|
|
needTotal: true, |
|
|
|
|
|
|
|
customRender: (text) => text + ' 次' |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '状态', |
|
|
|
title: '状态', |
|
|
|
dataIndex: 'status' |
|
|
|
dataIndex: 'status', |
|
|
|
|
|
|
|
needTotal: true |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '更新时间', |
|
|
|
title: '更新时间', |
|
|
|
dataIndex: 'updatedAt', |
|
|
|
dataIndex: 'updatedAt', |
|
|
|
sorter: true |
|
|
|
sorter: true |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
title: '操作', |
|
|
|
|
|
|
|
key: 'action' |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const dataSource = [] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < 100; i++) { |
|
|
|
|
|
|
|
dataSource.push({ |
|
|
|
|
|
|
|
key: i, |
|
|
|
|
|
|
|
no: 'NO ' + i, |
|
|
|
|
|
|
|
description: '这是一段描述', |
|
|
|
|
|
|
|
callNo: Math.floor(Math.random() * 1000), |
|
|
|
|
|
|
|
status: Math.floor(Math.random() * 10) % 4, |
|
|
|
|
|
|
|
updatedAt: '2018-07-26' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: 'QueryList', |
|
|
|
name: 'QueryList', |
|
|
|
components: { |
|
|
|
components: { |
|
|
|
|
|
|
|
AMenuItem, |
|
|
|
|
|
|
|
AMenu, |
|
|
|
|
|
|
|
ADropdown, |
|
|
|
StandardTable, |
|
|
|
StandardTable, |
|
|
|
AIcon, |
|
|
|
AIcon, |
|
|
|
AButton, |
|
|
|
AButton, |
|
|
@ -151,12 +184,38 @@ export default { |
|
|
|
data () { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
advanced: true, |
|
|
|
advanced: true, |
|
|
|
columns: columns |
|
|
|
columns: columns, |
|
|
|
|
|
|
|
dataSource: dataSource, |
|
|
|
|
|
|
|
selectedRowKeys: [], |
|
|
|
|
|
|
|
selectedRows: [] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
toggleAdvanced () { |
|
|
|
toggleAdvanced () { |
|
|
|
this.advanced = !this.advanced |
|
|
|
this.advanced = !this.advanced |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
onchange (selectedRowKeys, selectedRows) { |
|
|
|
|
|
|
|
this.selectedRowKeys = selectedRowKeys |
|
|
|
|
|
|
|
this.selectedRows = selectedRows |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
remove () { |
|
|
|
|
|
|
|
this.dataSource = this.dataSource.filter(item => this.selectedRowKeys.indexOf(item.key) < 0) |
|
|
|
|
|
|
|
this.selectedRows = this.selectedRows.filter(item => this.selectedRowKeys.indexOf(item.key) < 0) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
addNew () { |
|
|
|
|
|
|
|
this.dataSource.unshift({ |
|
|
|
|
|
|
|
key: this.dataSource.length, |
|
|
|
|
|
|
|
no: 'NO ' + this.dataSource.length, |
|
|
|
|
|
|
|
description: '这是一段描述', |
|
|
|
|
|
|
|
callNo: Math.floor(Math.random() * 1000), |
|
|
|
|
|
|
|
status: Math.floor(Math.random() * 10) % 4, |
|
|
|
|
|
|
|
updatedAt: '2018-07-26' |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleMenuClick (e) { |
|
|
|
|
|
|
|
if (e.key === 'delete') { |
|
|
|
|
|
|
|
this.remove() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -170,6 +229,9 @@ export default { |
|
|
|
width: calc(100% - 216px); |
|
|
|
width: calc(100% - 216px); |
|
|
|
display: inline-block |
|
|
|
display: inline-block |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.operator{ |
|
|
|
|
|
|
|
margin-bottom: 18px; |
|
|
|
|
|
|
|
} |
|
|
|
@media screen and (max-width: 900px) { |
|
|
|
@media screen and (max-width: 900px) { |
|
|
|
.fold { |
|
|
|
.fold { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|