代码生成模板默认替换为 Monorepo
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
No deletion without permission, or be held responsible to law. -->
|
||||
<template>
|
||||
<name>vueApi</name>
|
||||
<filePath>${frontDir}/src/api/${moduleName}/${subModuleName}</filePath>
|
||||
<filePath>${frontDir}/packages/${moduleName}/api/${moduleName}/${subModuleName}</filePath>
|
||||
<fileName>${className}.ts</fileName>
|
||||
<content><![CDATA[
|
||||
/**
|
||||
@@ -11,18 +11,18 @@
|
||||
* No deletion without permission, or be held responsible to law.
|
||||
* @author ${functionAuthor}
|
||||
*/
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
import { defHttp } from '@jeesite/core/utils/http/axios';
|
||||
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
||||
<% if(table.isTreeEntity){ %>
|
||||
import { TreeDataModel, TreeModel } from '/@/api/model/baseModel';
|
||||
import { TreeDataModel, TreeModel } from '@jeesite/core/api/model/baseModel';
|
||||
<% }else if(isNotBlank(table.optionMap['leftTreeRightTableUrl'])){ %>
|
||||
import { BasicModel, Page, TreeDataModel } from '/@/api/model/baseModel';
|
||||
import { BasicModel, Page, TreeDataModel } from '@jeesite/core/api/model/baseModel';
|
||||
<% }else{ %>
|
||||
import { BasicModel, Page } from '/@/api/model/baseModel';
|
||||
import { BasicModel, Page } from '@jeesite/core/api/model/baseModel';
|
||||
<% } %>
|
||||
<% if(toBoolean(table.optionMap['isImportExport'])){ %>
|
||||
import { UploadApiResult } from '/@/api/sys/upload';
|
||||
import { UploadFileParams } from '/#/axios';
|
||||
import { UploadApiResult } from '@jeesite/core/api/sys/upload';
|
||||
import { UploadFileParams } from '@jeesite/types/axios';
|
||||
|
||||
const { ctxPath, adminPath } = useGlobSetting();
|
||||
<% }else{ %>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
No deletion without permission, or be held responsible to law. -->
|
||||
<template>
|
||||
<name>vueForm</name>
|
||||
<filePath>${frontDir}/src/views/${urlPrefix}</filePath>
|
||||
<filePath>${frontDir}/packages/${moduleName}/views/${urlPrefix}</filePath>
|
||||
<fileName>form.vue</fileName>
|
||||
<content><![CDATA[
|
||||
<% var modalOrDrawer = @StringUtils.contains(table.tplCategory, '_modal') ? 'Modal' : 'Drawer'; %>
|
||||
@@ -57,13 +57,13 @@
|
||||
</template>
|
||||
<script lang="ts" setup name="${compNamePrefix}Form">
|
||||
import { ref, unref, computed } from 'vue';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { router } from '/@/router';
|
||||
import { Icon } from '/@/components/Icon';
|
||||
import { BasicForm, FormSchema, useForm } from '/@/components/Form';
|
||||
import { Basic${modalOrDrawer}, use${modalOrDrawer}Inner } from '/@/components/${modalOrDrawer}';
|
||||
import { ${ClassName}, ${className}Save, ${className}Form<% if(table.isTreeEntity){ %>, ${className}TreeData<% } %> } from '/@/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${className}';
|
||||
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
||||
import { router } from '@jeesite/core/router';
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
||||
import { Basic${modalOrDrawer}, use${modalOrDrawer}Inner } from '@jeesite/core/components/${modalOrDrawer}';
|
||||
import { ${ClassName}, ${className}Save, ${className}Form<% if(table.isTreeEntity){ %>, ${className}TreeData<% } %> } from '@jeesite/${moduleName}/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${className}';
|
||||
<%
|
||||
var userselectExists = false;
|
||||
var officeselectExists = false;
|
||||
@@ -84,16 +84,16 @@
|
||||
}
|
||||
%>
|
||||
<% if(userselectExists || officeselectExists) { %>
|
||||
import { officeTreeData } from '/@/api/sys/office';
|
||||
import { officeTreeData } from '@jeesite/core/api/sys/office';
|
||||
<% } %>
|
||||
<% if(companyselectExists) { %>
|
||||
import { companyTreeData } from '/@/api/sys/company';
|
||||
import { companyTreeData } from '@jeesite/core/api/sys/company';
|
||||
<% } %>
|
||||
<% if(areaselectExists) { %>
|
||||
import { areaTreeData } from '/@/api/sys/area';
|
||||
import { areaTreeData } from '@jeesite/core/api/sys/area';
|
||||
<% } %>
|
||||
<% if(toBoolean(table.optionMap['isBpmForm'])){ %>
|
||||
import { BpmButton } from '/@/components/Bpm';
|
||||
import { BpmButton } from '@jeesite/bpm/components/Bpm';
|
||||
<% } %>
|
||||
<% for (child in table.childList){ %>
|
||||
import Form${@StringUtils.cap(child.classNameSimple)}List from './form${@StringUtils.cap(child.classNameSimple)}List.vue';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
No deletion without permission, or be held responsible to law. -->
|
||||
<template>
|
||||
<name>vueFormChildList</name>
|
||||
<filePath>${frontDir}/src/views/${urlPrefix}</filePath>
|
||||
<filePath>${frontDir}/packages/${moduleName}/views/${urlPrefix}</filePath>
|
||||
<fileName>form${@StringUtils.cap(table.classNameSimple)}List.vue</fileName>
|
||||
<content><![CDATA[
|
||||
<!--
|
||||
@@ -23,10 +23,10 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { Icon } from '/@/components/Icon';
|
||||
import { BasicTable, BasicColumn, useTable } from '/@/components/Table';
|
||||
import { ${ParentClassName} } from '/@/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${parentClassName}';
|
||||
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { BasicTable, BasicColumn, useTable } from '@jeesite/core/components/Table';
|
||||
import { ${ParentClassName} } from '@jeesite/${moduleName}/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${parentClassName}';
|
||||
<%
|
||||
var userselectExists = false;
|
||||
var officeselectExists = false;
|
||||
@@ -47,13 +47,13 @@
|
||||
}
|
||||
%>
|
||||
<% if(userselectExists || officeselectExists) { %>
|
||||
import { officeTreeData } from '/@/api/sys/office';
|
||||
import { officeTreeData } from '@jeesite/core/api/sys/office';
|
||||
<% } %>
|
||||
<% if(companyselectExists) { %>
|
||||
import { companyTreeData } from '/@/api/sys/company';
|
||||
import { companyTreeData } from '@jeesite/core/api/sys/company';
|
||||
<% } %>
|
||||
<% if(areaselectExists) { %>
|
||||
import { areaTreeData } from '/@/api/sys/area';
|
||||
import { areaTreeData } from '@jeesite/core/api/sys/area';
|
||||
<% } %>
|
||||
|
||||
const { t } = useI18n('${moduleName}${isNotEmpty(subModuleName)?'.'+subModuleName:''}.${className}');
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
No deletion without permission, or be held responsible to law. -->
|
||||
<template>
|
||||
<name>vueFormRoute</name>
|
||||
<filePath>${frontDir}/src/views/${urlPrefix}</filePath>
|
||||
<filePath>${frontDir}/packages/${moduleName}/views/${urlPrefix}</filePath>
|
||||
<fileName>formRoute.vue</fileName>
|
||||
<content><![CDATA[
|
||||
<!--
|
||||
@@ -62,17 +62,17 @@
|
||||
</template>
|
||||
<script lang="ts" setup name="${compNamePrefix}Form">
|
||||
import { ref, unref, computed, onMounted } from 'vue';
|
||||
import { useEmitter } from '/@/store/modules/user';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { router } from '/@/router';
|
||||
import { Icon } from '/@/components/Icon';
|
||||
import { CollapseForm } from '/@/components/CollapseForm';
|
||||
import { BasicForm, FormSchema, useForm } from '/@/components/Form';
|
||||
import { useEmitter } from '@jeesite/core/store/modules/user';
|
||||
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
||||
import { router } from '@jeesite/core/router';
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { CollapseForm } from '@jeesite/core/components/CollapseForm';
|
||||
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
|
||||
<% if (table.childList.~size > 0){ %>
|
||||
import { BasicTable, useTable } from '/@/components/Table';
|
||||
import { BasicTable, useTable } from '@jeesite/core/components/Table';
|
||||
<% } %>
|
||||
import { ${ClassName}, ${className}Save, ${className}Form<% if(table.isTreeEntity){ %>, ${className}TreeData<% } %> } from '/@/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${className}';
|
||||
import { ${ClassName}, ${className}Save, ${className}Form<% if(table.isTreeEntity){ %>, ${className}TreeData<% } %> } from '@jeesite/${moduleName}/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${className}';
|
||||
<%
|
||||
var userselectExists = false;
|
||||
var officeselectExists = false;
|
||||
@@ -93,19 +93,19 @@ for(c in table.columnList){
|
||||
}
|
||||
%>
|
||||
<% if(userselectExists || officeselectExists) { %>
|
||||
import { officeTreeData } from '/@/api/sys/office';
|
||||
import { officeTreeData } from '@jeesite/core/api/sys/office';
|
||||
<% } %>
|
||||
<% if(companyselectExists) { %>
|
||||
import { companyTreeData } from '/@/api/sys/company';
|
||||
import { companyTreeData } from '@jeesite/core/api/sys/company';
|
||||
<% } %>
|
||||
<% if(areaselectExists) { %>
|
||||
import { areaTreeData } from '/@/api/sys/area';
|
||||
import { areaTreeData } from '@jeesite/core/api/sys/area';
|
||||
<% } %>
|
||||
<% if(toBoolean(table.optionMap['isBpmForm'])){ %>
|
||||
import { BpmButton } from '/@/components/Bpm';
|
||||
import { BpmButton } from '@jeesite/bpm/components/Bpm';
|
||||
<% } %>
|
||||
import { useQuery } from '/@/hooks/web/usePage';
|
||||
import { useTabs } from '/@/hooks/web/useTabs';
|
||||
import { useQuery } from '@jeesite/core/hooks/web/usePage';
|
||||
import { useTabs } from '@jeesite/core/hooks/web/useTabs';
|
||||
|
||||
const formConfig = ref<any[]>([
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
No deletion without permission, or be held responsible to law. -->
|
||||
<template>
|
||||
<name>vueFormImport</name>
|
||||
<filePath>${frontDir}/src/views/${urlPrefix}</filePath>
|
||||
<filePath>${frontDir}/packages/${moduleName}/views/${urlPrefix}</filePath>
|
||||
<fileName>formImport.vue</fileName>
|
||||
<content><![CDATA[
|
||||
<% if(toBoolean(table.optionMap['isImportExport'])){ %>
|
||||
@@ -45,13 +45,13 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { Upload } from 'ant-design-vue';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
import { downloadByUrl } from '/@/utils/file/download';
|
||||
import { Icon } from '/@/components/Icon';
|
||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||
import { ${className}ImportData } from '/@/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${className}';
|
||||
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
||||
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
||||
import { downloadByUrl } from '@jeesite/core/utils/file/download';
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
|
||||
import { ${className}ImportData } from '@jeesite/${moduleName}/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${className}';
|
||||
import { FileType } from 'ant-design-vue/es/upload/interface';
|
||||
import { AxiosProgressEvent } from 'axios';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
No deletion without permission, or be held responsible to law. -->
|
||||
<template>
|
||||
<name>vueIndex</name>
|
||||
<filePath>${frontDir}/src/views/${urlPrefix}</filePath>
|
||||
<filePath>${frontDir}/packages/${moduleName}/views/${urlPrefix}</filePath>
|
||||
<fileName>index.vue</fileName>
|
||||
<content><![CDATA[
|
||||
<% if(table.isTreeEntity || isNotBlank(table.optionMap['leftTreeRightTableUrl'])){ %>
|
||||
@@ -30,10 +30,10 @@
|
||||
</template>
|
||||
<script lang="ts" setup name="${compNamePrefix}Index">
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { PageWrapper } from '/@/components/Page';
|
||||
import { BasicTree } from '/@/components/Tree';
|
||||
import { ${className}TreeData } from '/@/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${className}';
|
||||
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||
import { PageWrapper } from '@jeesite/core/components/Page';
|
||||
import { BasicTree } from '@jeesite/core/components/Tree';
|
||||
import { ${className}TreeData } from '@jeesite/${moduleName}/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${className}';
|
||||
import ListView from './list.vue';
|
||||
|
||||
const { t } = useI18n('${moduleName}${isNotEmpty(subModuleName)?'.'+subModuleName:''}.${className}');
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
No deletion without permission, or be held responsible to law. -->
|
||||
<template>
|
||||
<name>vueList</name>
|
||||
<filePath>${frontDir}/src/views/${urlPrefix}</filePath>
|
||||
<filePath>${frontDir}/packages/${moduleName}/views/${urlPrefix}</filePath>
|
||||
<fileName>list.vue</fileName>
|
||||
<content><![CDATA[
|
||||
<% var modalOrDrawer = @StringUtils.contains(table.tplCategory, '_modal') ? 'Modal' : 'Drawer'; %>
|
||||
@@ -97,23 +97,23 @@ if(table.isTreeEntity){
|
||||
import { unref<% if(toBoolean(table.optionMap['isImportExport'])){ %>, ref<% } %><% if(table.isTreeEntity || isNotBlank(table.optionMap['leftTreeRightTableFk'])){ %>, watch<% }
|
||||
%><% if(table.isTreeEntity){ %>, nextTick<% } %> } from 'vue';
|
||||
<% if(@StringUtils.contains(table.tplCategory, '_route')) { %>
|
||||
import { useEmitter } from '/@/store/modules/user';
|
||||
import { useEmitter } from '@jeesite/core/store/modules/user';
|
||||
<% } %>
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
|
||||
<% if(toBoolean(table.optionMap['isImportExport'])){ %>
|
||||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
import { downloadByUrl } from '/@/utils/file/download';
|
||||
import { useGlobSetting } from '@jeesite/core/hooks/setting';
|
||||
import { downloadByUrl } from '@jeesite/core/utils/file/download';
|
||||
<% } %>
|
||||
<% if(@StringUtils.contains(table.tplCategory, '_route')) { %>
|
||||
import { useGo } from '/@/hooks/web/usePage';
|
||||
import { useGo } from '@jeesite/core/hooks/web/usePage';
|
||||
<% } %>
|
||||
import { router } from '/@/router';
|
||||
import { Icon } from '/@/components/Icon';
|
||||
import { BasicTable, BasicColumn, useTable } from '/@/components/Table';
|
||||
import { ${className}Delete, ${className}ListData } from '/@/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${className}';
|
||||
import { router } from '@jeesite/core/router';
|
||||
import { Icon } from '@jeesite/core/components/Icon';
|
||||
import { BasicTable, BasicColumn, useTable } from '@jeesite/core/components/Table';
|
||||
import { ${className}Delete, ${className}ListData } from '@jeesite/${moduleName}/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${className}';
|
||||
<% if(toBoolean(table.optionMap['isHaveDisableEnable'])){ %>
|
||||
import { ${className}Disable, ${className}Enable } from '/@/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${className}';
|
||||
import { ${className}Disable, ${className}Enable } from '@jeesite/${moduleName}/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${className}';
|
||||
<% } %>
|
||||
<%
|
||||
var userselectExists = false;
|
||||
@@ -135,27 +135,27 @@ if(table.isTreeEntity){
|
||||
}
|
||||
%>
|
||||
<% if(userselectExists || officeselectExists) { %>
|
||||
import { officeTreeData } from '/@/api/sys/office';
|
||||
import { officeTreeData } from '@jeesite/core/api/sys/office';
|
||||
<% } %>
|
||||
<% if(companyselectExists) { %>
|
||||
import { companyTreeData } from '/@/api/sys/company';
|
||||
import { companyTreeData } from '@jeesite/core/api/sys/company';
|
||||
<% } %>
|
||||
<% if(areaselectExists) { %>
|
||||
import { areaTreeData } from '/@/api/sys/area';
|
||||
import { areaTreeData } from '@jeesite/core/api/sys/area';
|
||||
<% } %>
|
||||
<% if(modalOrDrawer == 'Drawer' && !@StringUtils.contains(table.tplCategory, '_route')){ %>
|
||||
import { useDrawer } from '/@/components/Drawer';
|
||||
import { useDrawer } from '@jeesite/core/components/Drawer';
|
||||
<% } %>
|
||||
<% if(modalOrDrawer == 'Modal' || (toBoolean(table.optionMap['isBpmForm'])
|
||||
|| toBoolean(table.optionMap['isImportExport']))){ %>
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import { useModal } from '@jeesite/core/components/Modal';
|
||||
<% } %>
|
||||
<% if(toBoolean(table.optionMap['isBpmForm'])){ %>
|
||||
import { BpmRuntimeTrace } from '/@/components/Bpm';
|
||||
import { BpmRuntimeTrace } from '@jeesite/bpm/components/Bpm';
|
||||
<% } %>
|
||||
import { FormProps } from '/@/components/Form';
|
||||
import { FormProps } from '@jeesite/core/components/Form';
|
||||
<% if(table.isTreeEntity || isNotBlank(table.optionMap['leftTreeRightTableFk'])) { %>
|
||||
import { isEmpty } from '/@/utils/is';
|
||||
import { isEmpty } from '@jeesite/core/utils/is';
|
||||
<% } %>
|
||||
<% if(!@StringUtils.contains(table.tplCategory, '_route')) { %>
|
||||
import InputForm from './form.vue';
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
No deletion without permission, or be held responsible to law. -->
|
||||
<template>
|
||||
<name>vueSelect</name>
|
||||
<filePath>${frontDir}/src/views/${urlPrefix}</filePath>
|
||||
<filePath>${frontDir}/packages/${moduleName}/views/${urlPrefix}</filePath>
|
||||
<fileName>select.ts</fileName>
|
||||
<content><![CDATA[
|
||||
import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { BasicColumn, BasicTableProps, FormProps } from '/@/components/Table';
|
||||
import { ${className}ListData } from '/@/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${className}';
|
||||
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
|
||||
import { BasicColumn, BasicTableProps, FormProps } from '@jeesite/core/components/Table';
|
||||
import { ${className}ListData } from '@jeesite/${moduleName}/api/${moduleName}${isNotEmpty(subModuleName)?'/'+subModuleName:''}/${className}';
|
||||
<%
|
||||
var userselectExists = false;
|
||||
var officeselectExists = false;
|
||||
@@ -29,13 +29,13 @@ for(c in table.columnList){
|
||||
}
|
||||
%>
|
||||
<% if(userselectExists || officeselectExists) { %>
|
||||
import { officeTreeData } from '/@/api/sys/office';
|
||||
import { officeTreeData } from '@jeesite/core/api/sys/office';
|
||||
<% } %>
|
||||
<% if(companyselectExists) { %>
|
||||
import { companyTreeData } from '/@/api/sys/company';
|
||||
import { companyTreeData } from '@jeesite/core/api/sys/company';
|
||||
<% } %>
|
||||
<% if(areaselectExists) { %>
|
||||
import { areaTreeData } from '/@/api/sys/area';
|
||||
import { areaTreeData } from '@jeesite/core/api/sys/area';
|
||||
<% } %>
|
||||
|
||||
const { t } = useI18n('${moduleName}${isNotEmpty(subModuleName)?'.'+subModuleName:''}.${className}');
|
||||
|
||||
Reference in New Issue
Block a user