微调
This commit is contained in:
@@ -2,7 +2,7 @@ import http from '@/api'
|
|||||||
import { type Dict } from '@/api/system/dictionary/interface'
|
import { type Dict } from '@/api/system/dictionary/interface'
|
||||||
|
|
||||||
//获取字典类型
|
//获取字典类型
|
||||||
export const getDictTreeList = (params: Dict.ReqDictTreeParams) => {
|
export const getDictTreeList = (params: Dict.ResDictTree) => {
|
||||||
return http.get(`/dictTree/queryTree`, params)
|
return http.get(`/dictTree/queryTree`, params)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ export const updateDictTree = (params: Dict.ResDictTree) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//删除字典类型
|
//删除字典类型
|
||||||
export const deleteDictTree = (params: string[]) => {
|
export const deleteDictTree = (params: Dict.ResDictTree) => {
|
||||||
return http.post(`/dictTree/delete`, params)
|
return http.post(`/dictTree/delete?id=${params.id}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -142,18 +142,6 @@ export namespace Dict {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 树形字典数据表格分页查询参数
|
|
||||||
*/
|
|
||||||
export interface ReqDictTreeParams extends ReqPage{
|
|
||||||
id: string;//指标字典表Id
|
|
||||||
pid: string;//
|
|
||||||
pids: string;//
|
|
||||||
name:string;//
|
|
||||||
code:string;//
|
|
||||||
sort:number;//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 树形字典数据新增、修改、根据id查询返回的对象
|
* 树形字典数据新增、修改、根据id查询返回的对象
|
||||||
*/
|
*/
|
||||||
@@ -165,7 +153,7 @@ export namespace Dict {
|
|||||||
code:string;//
|
code:string;//
|
||||||
sort:number;//
|
sort:number;//
|
||||||
remark?:string;//
|
remark?:string;//
|
||||||
status?:number;//'状态(字典 0正常 1停用 2删除)
|
state?:number;//'状态(字典 0正常 1停用 2删除)
|
||||||
createBy?:string | null;//
|
createBy?:string | null;//
|
||||||
createTime?:string | null;//
|
createTime?:string | null;//
|
||||||
updateBy?:string | null;//
|
updateBy?:string | null;//
|
||||||
@@ -176,11 +164,5 @@ export namespace Dict {
|
|||||||
children?: ResDictTree[];
|
children?: ResDictTree[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 电能质量指标字典数据表格查询分页返回的对象;
|
|
||||||
*/
|
|
||||||
export interface ResDictTreePage extends ResPage<ResDictTree> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ export namespace User {
|
|||||||
loginTime?: string;//最后一次登录时间
|
loginTime?: string;//最后一次登录时间
|
||||||
loginErrorTimes: number;//登录错误次数
|
loginErrorTimes: number;//登录错误次数
|
||||||
lockTime?: string; //用户密码错误锁定时间
|
lockTime?: string; //用户密码错误锁定时间
|
||||||
|
state:number;//0-删除;1-正常;2-锁定;3-待审核;4-休眠;5-密码过期
|
||||||
createBy?: string;//创建用户
|
createBy?: string;//创建用户
|
||||||
createTime?: string;//创建时间
|
createTime?: string;//创建时间
|
||||||
updateBy?: string;//更新用户
|
updateBy?: string;//更新用户
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
:data='resourceData'
|
:data='resourceData'
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
type="selection"
|
type="selection"
|
||||||
|
:pagination="false"
|
||||||
>
|
>
|
||||||
<!-- 表格 header 按钮 -->
|
<!-- 表格 header 按钮 -->
|
||||||
<template #tableHeader>
|
<template #tableHeader>
|
||||||
|
|||||||
@@ -21,13 +21,7 @@
|
|||||||
const {dialogVisible,data} = defineProps<{
|
const {dialogVisible,data} = defineProps<{
|
||||||
dialogVisible: boolean;
|
dialogVisible: boolean;
|
||||||
title: string;
|
title: string;
|
||||||
<<<<<<< HEAD
|
|
||||||
data: Role.Permission;
|
data: Role.Permission;
|
||||||
=======
|
|
||||||
data: Role.ResRoleLimport { Role } from '@/api/role/interface'
|
|
||||||
import { dialogBig } from '@/utils/elementBind'
|
|
||||||
ist;
|
|
||||||
>>>>>>> 74c03a2358e19cae853711ea22910b1697a4a903
|
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
// const leftvalue = ref<Role.Permission[]>([])
|
// const leftvalue = ref<Role.Permission[]>([])
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<el-form-item label='设备类型' prop='devType'>
|
<el-form-item label='设备类型' prop='devType'>
|
||||||
<el-select v-model="formContent.devType" clearable placeholder="请选择设备类型">
|
<el-select v-model="formContent.devType" clearable placeholder="请选择设备类型">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dictStore.getDictData('High_Cate')"
|
v-for="item in dictStore.getDictData('Dev_Type')"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
@@ -22,27 +22,48 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="设备通道数" prop="devChns" placeholder="请输入设备通道">
|
<el-form-item label="设备通道数" prop="devChns">
|
||||||
<el-input v-model="formContent.devChns" />
|
<el-select v-model="formContent.devChns" clearable placeholder="请选择设备通道数">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dictStore.getDictData('Dev_Chns')"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="24" >
|
<el-row :gutter="24" >
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="额定电压(V)" prop="devVolt">
|
<el-form-item label="额定电压(V)" prop="devVolt">
|
||||||
<el-input v-model='formContent.devVolt' placeholder="请输入额定电压"/>
|
<el-select v-model="formContent.devVolt" clearable placeholder="请选择额定电压">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dictStore.getDictData('Dev_Volt')"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="额定电流(A)" prop="devCurr" placeholder="请输入额定电流">
|
<el-form-item label="额定电流(A)" prop="devCurr" >
|
||||||
<el-input v-model="formContent.devCurr" />
|
<el-select v-model="formContent.devCurr" clearable placeholder="请选择额定电流">
|
||||||
|
<el-option
|
||||||
|
v-for="item in dictStore.getDictData('Dev_Curr')"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label='生产厂家' prop='manufacturer'>
|
<el-form-item label='生产厂家' prop='manufacturer'>
|
||||||
<el-select v-model="formContent.manufacturer" clearable placeholder="请选择生产厂家">
|
<el-select v-model="formContent.manufacturer" clearable placeholder="请选择生产厂家">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dictStore.getDictData('High_Cate')"
|
v-for="item in dictStore.getDictData('Dev_Manufacturers')"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
|||||||
{
|
{
|
||||||
prop: 'devType',
|
prop: 'devType',
|
||||||
label: '类型',
|
label: '类型',
|
||||||
enum: dictStore.getDictData('High_Cate'),
|
enum: dictStore.getDictData('Dev_Type'),
|
||||||
fieldNames: { label: 'name', value: 'code' },
|
fieldNames: { label: 'name', value: 'code' },
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
},
|
},
|
||||||
@@ -77,21 +77,27 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
|||||||
prop: 'devChns',
|
prop: 'devChns',
|
||||||
label: '设备通道数',
|
label: '设备通道数',
|
||||||
minWidth: 110,
|
minWidth: 110,
|
||||||
|
enum: dictStore.getDictData('Dev_Chns'),
|
||||||
|
fieldNames: { label: 'name', value: 'code' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'devVolt',
|
prop: 'devVolt',
|
||||||
label: '额定电压(V)',
|
label: '额定电压(V)',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
|
enum: dictStore.getDictData('Dev_Volt'),
|
||||||
|
fieldNames: { label: 'name', value: 'code' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'devCurr',
|
prop: 'devCurr',
|
||||||
label: '额定电流(A)',
|
label: '额定电流(A)',
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
|
enum: dictStore.getDictData('Dev_Curr'),
|
||||||
|
fieldNames: { label: 'name', value: 'code' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'manufacturer',
|
prop: 'manufacturer',
|
||||||
label: '生产厂商',
|
label: '生产厂商',
|
||||||
enum: dictStore.getDictData('High_Cate'),
|
enum: dictStore.getDictData('Dev_Manufacturers'),
|
||||||
search: { el: 'select', props: { filterable: true }},
|
search: { el: 'select', props: { filterable: true }},
|
||||||
fieldNames: { label: 'name', value: 'code' },
|
fieldNames: { label: 'name', value: 'code' },
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ const columns = reactive<ColumnProps<Dict.ResDictData>[]>([
|
|||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '名称',
|
label: '名称',
|
||||||
width: 180,
|
minWidth: 180,
|
||||||
search: {
|
search: {
|
||||||
el: 'input'
|
el: 'input'
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@ const columns = reactive<ColumnProps<Dict.ResDictData>[]>([
|
|||||||
{
|
{
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
label: '编码',
|
label: '编码',
|
||||||
width: 180,
|
minWidth: 180,
|
||||||
search: {
|
search: {
|
||||||
el: 'input'
|
el: 'input'
|
||||||
}
|
}
|
||||||
@@ -78,12 +78,12 @@ const columns = reactive<ColumnProps<Dict.ResDictData>[]>([
|
|||||||
{
|
{
|
||||||
prop: 'value',
|
prop: 'value',
|
||||||
label: '值',
|
label: '值',
|
||||||
width: 180
|
minWidth: 180
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'level',
|
prop: 'level',
|
||||||
label: '事件等级',
|
label: '事件等级',
|
||||||
width: 180,
|
minWidth: 180,
|
||||||
render: scope => {
|
render: scope => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -99,13 +99,13 @@ const columns = reactive<ColumnProps<Dict.ResDictData>[]>([
|
|||||||
{
|
{
|
||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
width: 180
|
minWidth: 180
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'operation',
|
prop: 'operation',
|
||||||
label: '操作',
|
label: '操作',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
minWidth: 300
|
width: 200
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<el-form-item label='数据统计类型' :label-width='140' prop='statMethod'>
|
<el-form-item label='数据统计类型' :label-width='140' prop='statMethod'>
|
||||||
<el-select v-model="selectedStatMethods" multiple placeholder="请选择数据统计类型">
|
<el-select v-model="selectedStatMethods" multiple placeholder="请选择数据统计类型">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dictStore.getDictData('Event_Type')"
|
v-for="item in dictStore.getDictData('stat_Method')"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.code"
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
prop: 'statMethod',
|
prop: 'statMethod',
|
||||||
label: '数据统计类型',
|
label: '数据统计类型',
|
||||||
width: 250,
|
width: 250,
|
||||||
enum: dictStore.getDictData('Event_Type'),
|
enum: dictStore.getDictData('stat_Method'),
|
||||||
fieldNames: { label: 'name', value: 'code' },
|
fieldNames: { label: 'name', value: 'code' },
|
||||||
render: (scope) => {
|
render: (scope) => {
|
||||||
// 假设 statMethod 是一个数组,包含多个 'code' 值
|
// 假设 statMethod 是一个数组,包含多个 'code' 值
|
||||||
|
|||||||
@@ -33,8 +33,8 @@
|
|||||||
import { addDictTree, updateDictTree } from '@/api/system/dictionary/dictTree'
|
import { addDictTree, updateDictTree } from '@/api/system/dictionary/dictTree'
|
||||||
import { computed, type Ref, ref } from 'vue';
|
import { computed, type Ref, ref } from 'vue';
|
||||||
import { useDictStore } from '@/stores/modules/dict'
|
import { useDictStore } from '@/stores/modules/dict'
|
||||||
|
import { type ResultData } from '@/api/interface';
|
||||||
const dictStore = useDictStore()
|
const dictStore = useDictStore()
|
||||||
const selectedStatMethods = ref<string[]>([])
|
|
||||||
// 定义弹出组件元信息
|
// 定义弹出组件元信息
|
||||||
const dialogFormRef = ref()
|
const dialogFormRef = ref()
|
||||||
function useMetaInfo() {
|
function useMetaInfo() {
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
code: ' ',
|
code: ' ',
|
||||||
sort: 100,
|
sort: 100,
|
||||||
remark: '',
|
remark: '',
|
||||||
status: 1,
|
state: 0,
|
||||||
children: [],
|
children: [],
|
||||||
})
|
})
|
||||||
return { dialogVisible, titleType, formContent }
|
return { dialogVisible, titleType, formContent }
|
||||||
@@ -59,13 +59,13 @@
|
|||||||
const resetFormContent = () => {
|
const resetFormContent = () => {
|
||||||
formContent.value = {
|
formContent.value = {
|
||||||
id: '',
|
id: '',
|
||||||
pid: '',
|
pid: '0',
|
||||||
pids: '',
|
pids: '0',
|
||||||
name: '',
|
name: '',
|
||||||
code: ' ',
|
code: ' ',
|
||||||
sort: 100,
|
sort: 100,
|
||||||
remark: '',
|
remark: '',
|
||||||
status: 1,
|
state: 0,
|
||||||
children: [],
|
children: [],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -76,8 +76,8 @@
|
|||||||
|
|
||||||
// 定义表单校验规则
|
// 定义表单校验规则
|
||||||
const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
|
const rules: Ref<Record<string, Array<FormItemRule>>> = ref({
|
||||||
dataType: [{ required: true, message: '数据模型必选!', trigger: 'change' }],
|
name: [{ required: true, message: '字典名称必填!', trigger: 'blur' }],
|
||||||
name: [{ required: true, message: '指标名称必填!', trigger: 'blur' }],
|
code: [{ required: true, message: '编码必填!', trigger: 'blur' }],
|
||||||
})
|
})
|
||||||
|
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
@@ -87,7 +87,6 @@
|
|||||||
resetFormContent()
|
resetFormContent()
|
||||||
// 重置表单
|
// 重置表单
|
||||||
dialogFormRef.value?.resetFields()
|
dialogFormRef.value?.resetFields()
|
||||||
selectedStatMethods.value = []
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存数据
|
// 保存数据
|
||||||
@@ -96,13 +95,18 @@
|
|||||||
dialogFormRef.value?.validate(async (valid: boolean) => {
|
dialogFormRef.value?.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (formContent.value.id) {
|
if (formContent.value.id) {
|
||||||
const result = await updateDictTree(formContent.value);
|
let result: ResultData<unknown>;
|
||||||
|
if( titleType.value == 'add'){
|
||||||
|
result = await addDictTree(formContent.value);
|
||||||
|
}else{
|
||||||
|
result = await updateDictTree(formContent.value);
|
||||||
|
}
|
||||||
|
|
||||||
if(result.code != 'A0000'){
|
if(result.code != 'A0000'){
|
||||||
ElMessage.error({ message: result.message})
|
ElMessage.error({ message: result.message})
|
||||||
}else{
|
}else{
|
||||||
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
ElMessage.success({ message: `${dialogTitle.value}成功!` })
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
const result = await addDictTree(formContent.value);
|
const result = await addDictTree(formContent.value);
|
||||||
if(result.code != 'A0000'){
|
if(result.code != 'A0000'){
|
||||||
@@ -126,7 +130,12 @@
|
|||||||
titleType.value = sign
|
titleType.value = sign
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
if (data.id) {
|
if (data.id) {
|
||||||
|
if(sign == 'add'){
|
||||||
|
resetFormContent()
|
||||||
|
formContent.value.pid = data.id
|
||||||
|
}else{
|
||||||
formContent.value = { ...data }
|
formContent.value = { ...data }
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
resetFormContent()
|
resetFormContent()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,14 @@
|
|||||||
ref='proTable'
|
ref='proTable'
|
||||||
:columns='columns'
|
:columns='columns'
|
||||||
:request-api='getDictTreeList'
|
:request-api='getDictTreeList'
|
||||||
|
:pagination="false"
|
||||||
>
|
>
|
||||||
<template #tableHeader>
|
<template #tableHeader>
|
||||||
<el-button type='primary' :icon='CirclePlus' @click="openDialog('add')">新增</el-button>
|
<el-button type='primary' :icon='CirclePlus' @click="openDialog('add')">新增</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #operation='scope'>
|
<template #operation='scope'>
|
||||||
<el-button type='primary' :icon='CirclePlus' @click="openDialog('add')">新增</el-button>
|
<el-button type='primary' link :icon='CirclePlus' @click="openDialog('add',scope.row)">新增</el-button>
|
||||||
<el-button type='primary' link :icon='EditPen' @click="openDialog('edit', scope.row)">编辑</el-button>
|
<el-button type='primary' link :icon='EditPen' @click="openDialog('edit', scope.row)">编辑</el-button>
|
||||||
<el-button type='primary' link :icon='Delete' @click='handleDelete(scope.row)'>删除</el-button>
|
<el-button type='primary' link :icon='Delete' @click='handleDelete(scope.row)'>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -41,42 +42,49 @@
|
|||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '字典名称',
|
label: '字典名称',
|
||||||
width: 180,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
label: '编码',
|
label: '编码',
|
||||||
width: 180,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'remark',
|
prop: 'remark',
|
||||||
label: '描述',
|
label: '描述',
|
||||||
width: 180,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'status',
|
prop: 'state',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
width: 180,
|
minWidth:30,
|
||||||
|
enum: dictStore.getDictData('state'),
|
||||||
|
fieldNames: { label: 'label', value: 'code' },
|
||||||
|
render: scope => {
|
||||||
|
return (
|
||||||
|
<el-tag type={scope.row.state === 0 ? 'success' : (scope.row.state === 1 ? 'warning' : 'danger')}>
|
||||||
|
{scope.row.state === 0 ? '正常' : (scope.row.state === 1 ? '停用' : '删除')}
|
||||||
|
</el-tag>
|
||||||
|
)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'operation',
|
prop: 'operation',
|
||||||
label: '操作',
|
label: '操作',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
minWidth: 200,
|
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
// 打开 drawer(新增、编辑)
|
// 打开 drawer(新增、编辑)
|
||||||
const openDialog = (titleType: string, row: Partial<Dict.ResDictTree> = {}) => {
|
const openDialog = (titleType: string, row: Partial<Dict.ResDictTree> = {}) => {
|
||||||
treePopup.value?.open(titleType, row)
|
treePopup.value?.open(titleType, row)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 删除字典类型
|
// 删除字典类型
|
||||||
const handleDelete = async (params: Dict.ResDictTree) => {
|
const handleDelete = async (params: Dict.ResDictTree) => {
|
||||||
await useHandleData(deleteDictTree, [params.id], `删除【${params.name}】树形字典类型`)
|
console.log(params)
|
||||||
|
await useHandleData(deleteDictTree, params, `删除【${params.name}】树形字典类型`)
|
||||||
proTable.value?.getTableList()
|
proTable.value?.getTableList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const columns = reactive<ColumnProps<Dict.ResDictType>[]>([
|
|||||||
{
|
{
|
||||||
prop: 'name',
|
prop: 'name',
|
||||||
label: '类型名称',
|
label: '类型名称',
|
||||||
width: 180,
|
minWidth: 180,
|
||||||
search: {
|
search: {
|
||||||
el: 'input',
|
el: 'input',
|
||||||
},
|
},
|
||||||
@@ -57,7 +57,7 @@ const columns = reactive<ColumnProps<Dict.ResDictType>[]>([
|
|||||||
{
|
{
|
||||||
prop: 'code',
|
prop: 'code',
|
||||||
label: '类型编码',
|
label: '类型编码',
|
||||||
width: 180,
|
minWidth: 200,
|
||||||
search: {
|
search: {
|
||||||
el: 'input',
|
el: 'input',
|
||||||
},
|
},
|
||||||
@@ -67,16 +67,21 @@ const columns = reactive<ColumnProps<Dict.ResDictType>[]>([
|
|||||||
label: '描述',
|
label: '描述',
|
||||||
minWidth: 300,
|
minWidth: 300,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'sort',
|
||||||
|
label: '排序',
|
||||||
|
minWidth: 70,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
label: '创建时间',
|
label: '创建时间',
|
||||||
width: 180,
|
minWidth: 180,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'operation',
|
prop: 'operation',
|
||||||
label: '操作',
|
label: '操作',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
width: 330,
|
minWidth: 300,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user