【update】数据字典表格的替换
This commit is contained in:
@@ -35,40 +35,22 @@
|
||||
<a-button type="primary" icon="hdd" @click="openDeleteList">{{ $t('recycleBin') }}</a-button>
|
||||
</div>
|
||||
|
||||
<a-table
|
||||
ref="table"
|
||||
<j-table
|
||||
rowKey="id"
|
||||
size="middle"
|
||||
can-drag
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
@change="handleTableChange">
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="handleEdit(record)">
|
||||
<a-icon type="edit"/>
|
||||
{{ $t('edit') }}
|
||||
</a>
|
||||
<a-divider type="vertical"/>
|
||||
<a-dropdown>
|
||||
<a class="ant-dropdown-link">
|
||||
{{ $t('more') }} <a-icon type="down"/>
|
||||
</a>
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item>
|
||||
<!-- <a-icon type="setting"/>-->
|
||||
<a @click="editDictItem(record)">{{ $t('dict.dictConfiguration') }}</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a-popconfirm :title="$t('areYouSure')" @confirm="() =>handleDelete(record.id)">
|
||||
<a>{{ $t('delete') }}</a>
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</span>
|
||||
</a-table>
|
||||
|
||||
:scroll="{x: '100%'}"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange"
|
||||
>
|
||||
<div slot="action" class="table-action" slot-scope="{text, record}">
|
||||
<a class="action-dict" @click="editDictItem(record)">{{ $t('system.tag.dictionaryConfiguration') }}</a>
|
||||
<a class="action-edit" @click="handleEdit(record)" v-has="'sys:dict:operation'">{{ $t('edit') }}</a>
|
||||
<a class="action-delete" @click="handleDelete(record.id)" v-has="'sys:dict:operation'">{{ $t('delete') }}</a>
|
||||
</div>
|
||||
</j-table>
|
||||
</div>
|
||||
<dict-modal ref="modalForm" @ok="modalFormOk"></dict-modal> <!-- 字典类型 -->
|
||||
<dict-item-list ref="dictItemList"></dict-item-list>
|
||||
@@ -86,11 +68,12 @@ import JInput from '@/components/jero/JInput'
|
||||
import { getAction } from '@/api/manage'
|
||||
import { UI_CACHE_DB_DICT_DATA } from '@/store/mutation-types'
|
||||
import Vue from 'vue'
|
||||
import JTable from '../../components/jero/JTable'
|
||||
|
||||
export default {
|
||||
name: 'DictList',
|
||||
mixins: [JeroListMixin],
|
||||
components: { DictModal, DictItemList, DictDeleteList, JInput },
|
||||
components: { DictModal, DictItemList, DictDeleteList, JInput, JTable },
|
||||
data () {
|
||||
return {
|
||||
description: '这是数据字典页面',
|
||||
@@ -106,7 +89,7 @@ export default {
|
||||
title: '#',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 120,
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
@@ -115,27 +98,36 @@ export default {
|
||||
{
|
||||
title: this.$t('dict.dictionaryName'),
|
||||
align: 'left',
|
||||
dataIndex: 'dictName'
|
||||
width: 100,
|
||||
dataIndex: 'dictName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
title: this.$t('dict.dictionaryEnglishName'),
|
||||
align: 'left',
|
||||
dataIndex: 'dictEnglishName'
|
||||
width: 100,
|
||||
dataIndex: 'dictEnglishName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
title: this.$t('dict.dictionaryNumber'),
|
||||
align: 'left',
|
||||
dataIndex: 'dictCode'
|
||||
width: 100,
|
||||
dataIndex: 'dictCode',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
title: this.$t('description'),
|
||||
align: 'left',
|
||||
dataIndex: 'description'
|
||||
dataIndex: 'description',
|
||||
width: 200,
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
dataIndex: 'action',
|
||||
align: 'center',
|
||||
// dataIndex: 'action',
|
||||
align: 'left',
|
||||
width: 170,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
}
|
||||
],
|
||||
|
||||
@@ -132,7 +132,7 @@ export default {
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('message.my.MessageContent'),
|
||||
title: this.$t('message.my.messageContent'),
|
||||
align: 'left',
|
||||
dataIndex: 'msgContent',
|
||||
ellipsis: true,
|
||||
|
||||
Reference in New Issue
Block a user