|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
<div>
|
|
|
|
|
<a-card :bordered="false" :bodyStyle="tstyle">
|
|
|
|
|
|
|
|
|
|
<div class="table-page-search-wrapper" v-if="hasPerm('BookingTemplate:page')">
|
|
|
|
|
<div class="table-page-search-wrapper">
|
|
|
|
|
<a-form layout="inline">
|
|
|
|
|
<a-row :gutter="48">
|
|
|
|
|
<a-col :md="8" :sm="24">
|
|
|
|
@ -32,18 +32,17 @@
|
|
|
|
|
<a-card :bordered="false">
|
|
|
|
|
<s-table ref="table" :columns="columns" :data="loadData" :alert="true" :rowKey="(record) => record.id"
|
|
|
|
|
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
|
|
|
|
|
<template class="table-operator" slot="operator" v-if="hasPerm('BookingTemplate:add')">
|
|
|
|
|
<a-button type="primary" v-if="hasPerm('BookingTemplate:add')" icon="plus" @click="$refs.addForm.add()">新增订舱模板
|
|
|
|
|
<template class="table-operator" slot="operator">
|
|
|
|
|
<a-button type="primary" icon="plus" @click="$refs.addForm.add()">新增订舱模板
|
|
|
|
|
</a-button>
|
|
|
|
|
</template>
|
|
|
|
|
<span slot="typescopedSlots" slot-scope="text">
|
|
|
|
|
{{ showType(text) }}
|
|
|
|
|
</span>
|
|
|
|
|
<span slot="action" slot-scope="text, record">
|
|
|
|
|
<a v-if="hasPerm('BookingTemplate:edit')" @click="$refs.editForm.edit(record)">编辑</a>
|
|
|
|
|
<a-divider type="vertical" v-if="hasPerm('BookingTemplate:edit') & hasPerm('BookingTemplate:delete')" />
|
|
|
|
|
<a-popconfirm v-if="hasPerm('BookingTemplate:delete')" placement="topRight" title="确认删除?"
|
|
|
|
|
@confirm="() => BookingTemplateDelete(record)">
|
|
|
|
|
<a @click="$refs.editForm.edit(record)">编辑</a>
|
|
|
|
|
<a-divider type="vertical" />
|
|
|
|
|
<a-popconfirm placement="topRight" title="确认删除?" @confirm="() => BookingTemplateDelete(record)">
|
|
|
|
|
<a>删除</a>
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
</span>
|
|
|
|
@ -113,14 +112,12 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
if (this.hasPerm('BookingTemplate:edit') || this.hasPerm('BookingTemplate:delete')) {
|
|
|
|
|
this.columns.push({
|
|
|
|
|
title: '操作',
|
|
|
|
|
width: '150px',
|
|
|
|
|
dataIndex: 'action',
|
|
|
|
|
scopedSlots: { customRender: 'action' }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
this.columns.push({
|
|
|
|
|
title: '操作',
|
|
|
|
|
width: '150px',
|
|
|
|
|
dataIndex: 'action',
|
|
|
|
|
scopedSlots: { customRender: 'action' }
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.typeData = [{
|
|
|
|
|
code: 10,
|
|
|
|
@ -162,9 +159,8 @@ export default {
|
|
|
|
|
this.selectedRows = selectedRows
|
|
|
|
|
},
|
|
|
|
|
showType(code) {
|
|
|
|
|
var find= this.typeData.filter(item => item.code == code)
|
|
|
|
|
if(find.length>0)
|
|
|
|
|
{
|
|
|
|
|
var find = this.typeData.filter(item => item.code == code)
|
|
|
|
|
if (find.length > 0) {
|
|
|
|
|
return find[0].name
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|