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