调整代码生成模板.
This commit is contained in:
@@ -1,25 +1,28 @@
|
||||
-- 执行完成后 需要在菜单页面刷新缓存
|
||||
|
||||
-- 设置临时子菜单id
|
||||
-- 父菜单
|
||||
INSERT INTO system_menu
|
||||
(parent_id, name, type, sort, visible, status, cache)
|
||||
VALUES
|
||||
(0, '${vue.comment}管理', 1, 10, 1, 1, 1);
|
||||
|
||||
-- 设置临时父菜单id
|
||||
SELECT @TMP_PARENT_ID:=LAST_INSERT_ID();
|
||||
|
||||
-- 父菜单
|
||||
INSERT INTO system_menu (parent_id, name, type, sort, visible, status, cache)
|
||||
VALUES (0, '${vue.comment}管理', 1, 10, 1, 1, 1);
|
||||
|
||||
-- 子菜单
|
||||
INSERT INTO system_menu (parent_id, name, type, sort, visible, status, cache, component)
|
||||
VALUES (@TMP_PARENT_ID, '$vue.comment', 2, 10, 1, 1, 1, '$vue.module$vue.featureFirstUpper');
|
||||
INSERT INTO system_menu
|
||||
(parent_id, name, type, sort, visible, status, cache, component)
|
||||
VALUES
|
||||
(@TMP_PARENT_ID, '$vue.comment', 2, 10, 1, 1, 1, '$vue.module$vue.featureFirstUpper');
|
||||
|
||||
-- 设置临时子菜单id
|
||||
SELECT @TMP_SUB_ID:=LAST_INSERT_ID();
|
||||
|
||||
-- 功能
|
||||
INSERT INTO system_menu (parent_id, name, permission, type, sort)
|
||||
VALUES (@TMP_SUB_ID, '创建$vue.comment', '${package.ModuleName}:${typeHyphen}:create', 3, 10);
|
||||
INSERT INTO system_menu (parent_id, name, permission, type, sort)
|
||||
VALUES (@TMP_SUB_ID, '修改$vue.comment', '${package.ModuleName}:${typeHyphen}:update', 3, 20);
|
||||
INSERT INTO system_menu (parent_id, name, permission, type, sort)
|
||||
VALUES (@TMP_SUB_ID, '查询$vue.comment', '${package.ModuleName}:${typeHyphen}:query', 3, 30);
|
||||
INSERT INTO system_menu (parent_id, name, permission, type, sort)
|
||||
VALUES (@TMP_SUB_ID, '删除$vue.comment', '${package.ModuleName}:${typeHyphen}:delete', 3, 40);
|
||||
INSERT INTO system_menu
|
||||
(parent_id, name, permission, type, sort)
|
||||
VALUES
|
||||
(@TMP_SUB_ID, '查询$vue.comment', '${package.ModuleName}:${typeHyphen}:query', 3, 10),
|
||||
(@TMP_SUB_ID, '创建$vue.comment', '${package.ModuleName}:${typeHyphen}:create', 3, 20),
|
||||
(@TMP_SUB_ID, '修改$vue.comment', '${package.ModuleName}:${typeHyphen}:update', 3, 30),
|
||||
(@TMP_SUB_ID, '删除$vue.comment', '${package.ModuleName}:${typeHyphen}:delete', 3, 40);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
body-class="modal-form"
|
||||
title-align="start"
|
||||
:title="title"
|
||||
:top="120"
|
||||
:top="80"
|
||||
:align-center="false"
|
||||
:draggable="true"
|
||||
:mask-closable="false"
|
||||
@@ -55,6 +55,8 @@
|
||||
import formRules from '../types/form.rules';
|
||||
import { create${vue.featureFirstUpper}, update${vue.featureFirstUpper} } from '@/api/${vue.module}/${vue.feature}';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { } from '../types/enum.types';
|
||||
import { toOptions } from '@/utils/enum';
|
||||
|
||||
const { visible, setVisible } = useVisible();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
@@ -115,6 +115,8 @@
|
||||
import useLoading from '@/hooks/loading';
|
||||
import columns from '../types/table.columns';
|
||||
import { defaultPagination, defaultRowSelection } from '@/types/table';
|
||||
import { } from '../types/enum.types';
|
||||
import { toOptions } from '@/utils/enum';
|
||||
|
||||
const tableRenderData = ref<${vue.featureFirstUpper}QueryResponse[]>();
|
||||
const { loading, setLoading } = useLoading();
|
||||
|
||||
@@ -18,6 +18,7 @@ const columns = [
|
||||
ellipsis: true,
|
||||
tooltip: true,
|
||||
#elseif(${field.propertyType} == 'Date')
|
||||
width: 180,
|
||||
render: ({ record }) => {
|
||||
return record.${field.propertyName} && dateFormat(new Date(record.${field.propertyName}));
|
||||
},
|
||||
@@ -27,6 +28,7 @@ const columns = [
|
||||
dataIndex: 'createTime',
|
||||
slotName: 'createTime',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
render: ({ record }) => {
|
||||
return dateFormat(new Date(record.createTime));
|
||||
},
|
||||
@@ -35,6 +37,7 @@ const columns = [
|
||||
dataIndex: 'updateTime',
|
||||
slotName: 'updateTime',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
render: ({ record }) => {
|
||||
return dateFormat(new Date(record.updateTime));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user