微调
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
<ProTable ref='proTable' :columns="columns" :request-api='getDictDataListByTypeId' :initParam="initParam">
|
||||
<template #tableHeader="scope">
|
||||
<el-button type="primary" :icon="CirclePlus" @click="openDialog('add')">新增</el-button>
|
||||
<el-button type='primary' :icon='Download' plain>导出</el-button>
|
||||
<el-button type="danger" :icon="Delete" plain :disabled="!scope.isSelected"
|
||||
@click="batchDelete(scope.selectedListIds)">
|
||||
批量删除
|
||||
@@ -24,7 +25,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx" name="dictData">
|
||||
import {CirclePlus, Delete, EditPen} from '@element-plus/icons-vue'
|
||||
import {CirclePlus, Delete, Download, EditPen} from '@element-plus/icons-vue'
|
||||
import {Dict} from '@/api/system/dictionary/interface'
|
||||
import {ProTableInstance, ColumnProps} from '@/components/ProTable/interface'
|
||||
import {useHandleData} from '@/hooks/useHandleData'
|
||||
@@ -47,8 +48,8 @@ const dataPopup = ref()
|
||||
|
||||
const props = defineProps({
|
||||
width: {
|
||||
type: String,
|
||||
default: '800px',
|
||||
type: Number,
|
||||
default: 800,
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
@@ -87,10 +88,9 @@ const columns = reactive<ColumnProps<Dict.ResDictData>[]>([
|
||||
render: scope => {
|
||||
return (
|
||||
<>
|
||||
{scope.row.level === 0 || scope.row.level === null || scope.row.level === undefined ?
|
||||
(<span>—</span>) :
|
||||
{
|
||||
(<el-tag type={scope.row.level === 1 ? 'info' : scope.row.level === 2 ? 'warning' : 'danger'}>
|
||||
{scope.row.level === 1 ? '普通' : scope.row.level === 2 ? '警告' : '危险'}
|
||||
{scope.row.level === 1 ? '普通' : scope.row.level === 2 ? '中等' : '严重'}
|
||||
</el-tag>)
|
||||
}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user