feat:【ele】【crm】product/category 迁移
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
// TODO @xingyu:要不要改成 yudao-ui-admin-vue3/src/components/OperateLogV2/src/OperateLogV2.vue 这种;一行:时间、userType、userName、action
|
||||
import type { OperateLogProps } from './typing';
|
||||
|
||||
import { DICT_TYPE } from '@vben/constants';
|
||||
|
||||
@@ -85,7 +85,7 @@ export function useGridColumns(): VxeTableGridOptions<CrmProductCategoryApi.Prod
|
||||
{
|
||||
field: 'actions',
|
||||
title: '操作',
|
||||
width: 200,
|
||||
width: 250,
|
||||
fixed: 'right',
|
||||
slots: {
|
||||
default: 'actions',
|
||||
|
||||
@@ -68,6 +68,8 @@ const [Modal, modalApi] = useVbenModal({
|
||||
// 加载数据
|
||||
let data = modalApi.getData<CrmProductCategoryApi.ProductCategory>();
|
||||
if (!data || !data.id) {
|
||||
// 设置上级
|
||||
await formApi.setValues(data);
|
||||
return;
|
||||
}
|
||||
modalApi.lock();
|
||||
|
||||
@@ -31,7 +31,9 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
} as CrmProductCategoryApi.ProductCategory);
|
||||
return handleTree(data);
|
||||
},
|
||||
fieldNames: { label: 'name', value: 'id', children: 'children' },
|
||||
labelField: 'name',
|
||||
valueField: 'id',
|
||||
childrenField: 'children',
|
||||
placeholder: '请选择上级分类',
|
||||
showSearch: true,
|
||||
treeDefaultExpandAll: true,
|
||||
@@ -85,7 +87,7 @@ export function useGridColumns(): VxeTableGridOptions<CrmProductCategoryApi.Prod
|
||||
{
|
||||
field: 'actions',
|
||||
title: '操作',
|
||||
width: 200,
|
||||
width: 250,
|
||||
fixed: 'right',
|
||||
slots: {
|
||||
default: 'actions',
|
||||
|
||||
@@ -68,6 +68,8 @@ const [Modal, modalApi] = useVbenModal({
|
||||
// 加载数据
|
||||
let data = modalApi.getData<CrmProductCategoryApi.ProductCategory>();
|
||||
if (!data || !data.id) {
|
||||
// 设置上级
|
||||
await formApi.setValues(data);
|
||||
return;
|
||||
}
|
||||
modalApi.lock();
|
||||
|
||||
Reference in New Issue
Block a user