|
@@ -18,15 +18,24 @@
|
|
|
|
|
|
|
|
import { getFormSchemas, getTableColumns, getSearchFormSchemas } from './CategoryListView.config';
|
|
import { getFormSchemas, getTableColumns, getSearchFormSchemas } from './CategoryListView.config';
|
|
|
import { listApi, deleteApi, saveUpdateApi, getByIdApi } from './CategoryListView.api';
|
|
import { listApi, deleteApi, saveUpdateApi, getByIdApi } from './CategoryListView.api';
|
|
|
|
|
+ import { storeToRefs } from 'pinia';
|
|
|
|
|
+ import { useUserStore } from '@/store/modules/user';
|
|
|
|
|
|
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
|
const { getTableSize } = useSizeSetting();
|
|
const { getTableSize } = useSizeSetting();
|
|
|
|
|
|
|
|
|
|
+ const { getIsPlatformTenant } = storeToRefs(useUserStore());
|
|
|
|
|
+
|
|
|
const getTableActions = (row): ActionItem[] => {
|
|
const getTableActions = (row): ActionItem[] => {
|
|
|
return [
|
|
return [
|
|
|
{
|
|
{
|
|
|
label: t('system.views.category.button.addChild'),
|
|
label: t('system.views.category.button.addChild'),
|
|
|
- onClick: () => showAddModal({ parentId: row.id, parentName: row.categoryName }),
|
|
|
|
|
|
|
+ onClick: () =>
|
|
|
|
|
+ showAddModal({
|
|
|
|
|
+ parentId: row.id,
|
|
|
|
|
+ parentName: row.categoryName,
|
|
|
|
|
+ tenantCommonYn: row.tenantCommonYn,
|
|
|
|
|
+ }),
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
label: t('common.button.edit'),
|
|
label: t('common.button.edit'),
|
|
@@ -61,7 +70,7 @@
|
|
|
},
|
|
},
|
|
|
addEditConfig: {
|
|
addEditConfig: {
|
|
|
formConfig: {
|
|
formConfig: {
|
|
|
- schemas: getFormSchemas(t),
|
|
|
|
|
|
|
+ schemas: getFormSchemas(t, getIsPlatformTenant),
|
|
|
baseColProps: { span: 24 },
|
|
baseColProps: { span: 24 },
|
|
|
labelCol: { span: 6 },
|
|
labelCol: { span: 6 },
|
|
|
wrapperCol: { span: 17 },
|
|
wrapperCol: { span: 17 },
|