|
@@ -17,95 +17,43 @@
|
|
|
<template>
|
|
|
<div class="list-model">
|
|
|
<div class="table-box">
|
|
|
- <table>
|
|
|
- <tr>
|
|
|
- <th>
|
|
|
- <span>{{$t('#')}}</span>
|
|
|
- </th>
|
|
|
- <th>
|
|
|
- <span>{{$t('Tenant Code')}}</span>
|
|
|
- </th>
|
|
|
- <th>
|
|
|
- <span>{{$t('Tenant Name')}}</span>
|
|
|
- </th>
|
|
|
- <th>
|
|
|
- <span>{{$t('Description')}}</span>
|
|
|
- </th>
|
|
|
- <th>
|
|
|
- <span>{{$t('Queue')}}</span>
|
|
|
- </th>
|
|
|
- <th>
|
|
|
- <span>{{$t('Create Time')}}</span>
|
|
|
- </th>
|
|
|
- <th>
|
|
|
- <span>{{$t('Update Time')}}</span>
|
|
|
- </th>
|
|
|
- <th width="70">
|
|
|
- <span>{{$t('Operation')}}</span>
|
|
|
- </th>
|
|
|
- </tr>
|
|
|
- <tr v-for="(item, $index) in list" :key="$index">
|
|
|
- <td>
|
|
|
- <span>{{parseInt(pageNo === 1 ? ($index + 1) : (($index + 1) + (pageSize * (pageNo - 1))))}}</span>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <span>
|
|
|
- {{item.tenantCode}}
|
|
|
- </span>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <span>
|
|
|
- {{item.tenantName}}
|
|
|
- </span>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <span v-if="item.description" class="ellipsis" v-tooltip.large.top.start.light="{text: item.description, maxWidth: '500px'}">{{item.description}}</span>
|
|
|
- <span v-else>-</span>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <span>{{item.queueName}}</span>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <span v-if="item.createTime">{{item.createTime | formatDate}}</span>
|
|
|
- <span v-else>-</span>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <span v-if="item.updateTime">{{item.updateTime | formatDate}}</span>
|
|
|
- <span v-else>-</span>
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <x-button
|
|
|
- type="info"
|
|
|
- shape="circle"
|
|
|
- size="xsmall"
|
|
|
- data-toggle="tooltip"
|
|
|
- :title="$t('Edit')"
|
|
|
- @click="_edit(item)"
|
|
|
- icon="ans-icon-edit">
|
|
|
- </x-button>
|
|
|
- <x-poptip
|
|
|
- :ref="'poptip-' + $index"
|
|
|
- placement="bottom-end"
|
|
|
- width="90">
|
|
|
- <p>{{$t('Delete?')}}</p>
|
|
|
- <div style="text-align: right; margin: 0;padding-top: 4px;">
|
|
|
- <x-button type="text" size="xsmall" shape="circle" @click="_closeDelete($index)">{{$t('Cancel')}}</x-button>
|
|
|
- <x-button type="primary" size="xsmall" shape="circle" @click="_delete(item,$index)">{{$t('Confirm')}}</x-button>
|
|
|
- </div>
|
|
|
- <template slot="reference">
|
|
|
- <x-button
|
|
|
- icon="ans-icon-trash"
|
|
|
- type="error"
|
|
|
- shape="circle"
|
|
|
- size="xsmall"
|
|
|
- data-toggle="tooltip"
|
|
|
- :title="$t('delete')">
|
|
|
- </x-button>
|
|
|
- </template>
|
|
|
- </x-poptip>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
+ <el-table :data="list" size="mini" style="width: 100%">
|
|
|
+ <el-table-column type="index" width="50"></el-table-column>
|
|
|
+ <el-table-column prop="tenantCode" :label="$t('Tenant Code')" width="180"></el-table-column>
|
|
|
+ <el-table-column prop="tenantName" :label="$t('Tenant Name')" width="180"></el-table-column>
|
|
|
+ <el-table-column prop="description" :label="$t('Description')" width="180"></el-table-column>
|
|
|
+ <el-table-column prop="queueName" :label="$t('Queue')" width="180"></el-table-column>
|
|
|
+ <el-table-column :label="$t('Create Time')">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.createTime | formatDate}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column :label="$t('Update Time')">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{scope.row.updateTime | formatDate}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column :label="$t('Operation')" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tooltip :content="$t('Edit')" placement="top">
|
|
|
+ <el-button type="primary" size="mini" icon="el-icon-edit" @click="_edit(scope.row)" circle></el-button>
|
|
|
+ </el-tooltip>
|
|
|
+ <el-tooltip :content="$t('delete')" placement="top">
|
|
|
+ <el-button type="danger" size="mini" icon="el-icon-delete" circle></el-button>
|
|
|
+ <el-popconfirm
|
|
|
+ :confirmButtonText="$t('Confirm')"
|
|
|
+ :cancelButtonText="$t('Cancel')"
|
|
|
+ icon="el-icon-info"
|
|
|
+ iconColor="red"
|
|
|
+ :title="$t('Delete?')"
|
|
|
+ @onConfirm="_delete(scope.row,scope.row.id)"
|
|
|
+ >
|
|
|
+ <el-button type="danger" size="mini" icon="el-icon-delete" circle slot="reference"></el-button>
|
|
|
+ </el-popconfirm>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -127,18 +75,13 @@
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions('security', ['deleteQueue']),
|
|
|
- _closeDelete (i) {
|
|
|
- this.$refs[`poptip-${i}`][0].doClose()
|
|
|
- },
|
|
|
_delete (item, i) {
|
|
|
this.deleteQueue({
|
|
|
id: item.id
|
|
|
}).then(res => {
|
|
|
- this.$refs[`poptip-${i}`][0].doClose()
|
|
|
this.$emit('on-update')
|
|
|
this.$message.success(res.msg)
|
|
|
}).catch(e => {
|
|
|
- this.$refs[`poptip-${i}`][0].doClose()
|
|
|
this.$message.error(e.msg || '')
|
|
|
})
|
|
|
},
|