提交 52d5ce41 编写于 作者: tony001's avatar tony001

update:更新打包逻辑

上级 86857734
......@@ -5,11 +5,13 @@ import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import net.ibizsys.model.app.view.IPSAppViewRef;
import net.ibizsys.model.control.IPSControl;
import net.ibizsys.model.control.layout.IPSGridLayoutPos;
import net.ibizsys.model.control.IPSControlContainer;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@Getter
......@@ -32,6 +34,16 @@ public class CtrlModel extends BaseModel{
this.setId(String.format("%1$s-%2$s-%3$s-%4$s",app.getCodeName(),folder,psControl.getName(),psControl.getCodeName()));
if(psControl instanceof IPSControlContainer){
List<IPSAppViewRef> IPSAppViewRefs = ((IPSControlContainer)psControl).getPSAppViewRefs();
if(IPSAppViewRefs != null && IPSAppViewRefs.size() >0){
IPSAppViewRefs.forEach(appViewRef ->{
if(viewRefMap.get(appViewRef.getRefPSAppView().getId()) == null){
viewRefMap.put(appViewRef.getRefPSAppView().getId(),appViewRef);
}
});
}
}
}
public Map<String,CtrlModel> ctrlsMap = new LinkedHashMap();
......@@ -42,6 +54,8 @@ public class CtrlModel extends BaseModel{
private LabelExt folder;
private Map<String, IPSAppViewRef> viewRefMap = new LinkedHashMap();
public CtrlModel addCtrl(String codeName,CtrlModel ctrlModel)
{
if(!ctrlsMap.containsKey(codeName))
......@@ -68,4 +82,8 @@ public class CtrlModel extends BaseModel{
}
}
public Collection<IPSAppViewRef> getAppViewRefs(){
return this.viewRefMap.values();
}
}
......@@ -59,7 +59,7 @@ public class PageModel extends BaseModel{
ctrlModel.setAppEntity(ctrlAppEntity);
ctrlAppEntity.addCtrl(ctrlModel.getId(), ctrlModel);
}
ctrl.addCtrl(ctrlModel.getCodeName().toString(), ctrlModel);
ctrl.addCtrl(ctrlModel.getId(), ctrlModel);
if(!this.app.getCtrlsMap().containsKey(ctrlModel.getId())) {
this.app.getCtrlsMap().put(ctrlModel.getId(),ctrlModel);
}
......
{
"name": "ibiz-vue3",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
......
......@@ -17,6 +17,7 @@ const routes = [
{{#each app.appEntityResources as |appEntityResource|}}
{{#if appEntityResource.appDataEntity.allPSAppViews}}
{{#each appEntityResource.appDataEntity.allPSAppViews as |appView|}}
{{#if (eq appView.getRefFlag true)}}
{{#if (or (eq appView.viewType 'DEEDITVIEW') (eq appView.viewType 'DEGRIDVIEW') (eq appView.viewType 'DETREEEXPVIEW'))}}
{
path: "{{appEntityResource.path}}/views/{{lowerCase appView.codeName}}",
......@@ -26,6 +27,7 @@ const routes = [
component: () => import("@views/{{spinalCase appView.psAppModule.codeName}}/{{spinalCase appView.codeName}}"),
},
{{/if}}
{{/if}}
{{/each}}
{{/if}}
{{/each}}
......
{{>@macro/front-end/widgets/form-detail/include-form.hbs}}
import { ControlVOBase, verifyRules, EditFormService } from '@core';
import { ControlVOBase, EditFormService } from '@core';
import { {{pascalCase ctrl.psAppDataEntity.codeName}}Service } from '@api/{{spinalCase ctrl.psAppDataEntity.codeName}}/{{spinalCase ctrl.psAppDataEntity.codeName}}-service';
/**
......
......@@ -7,11 +7,11 @@ import { ctrlState } from './{{spinalCase ctrl.codeName}}-tree-exp-bar-state';
import { {{codeName}}Tree} from '@widgets/{{spinalCase appEntity.codeName}}/{{spinalCase codeName}}-tree';
{{/eq}}
{{/ctrl.ctrls}}
{{#each ctrl.psAppViewRefs as | viewRef |}}
{{!-- {{#each ctrl.getAppViewRefs as | viewRef |}}
{{#if viewRef.refPSAppView}}
import {{viewRef.refPSAppView.name}} from '@views/{{spinalCase viewRef.refPSAppView.psAppModule.codeName}}/{{spinalCase viewRef.refPSAppView.codeName}}';
{{/if}}
{{/each}}
{{/each}} --}}
interface Props {
context: IContext;
......@@ -59,7 +59,7 @@ defineExpose({ state, name: '{{ctrl.name}}' });
{{/ctrl.ctrls}}
</a-layout-sider>
<a-layout>
{{#each ctrl.psAppViewRefs as | viewRef |}}
{{!-- {{#each ctrl.psAppViewRefs as | viewRef |}}
{{#if viewRef.refPSAppView}}
<{{viewRef.refPSAppView.name}}
v-if="state.selection.viewName && state.selection.viewName === '{{viewRef.refPSAppView.name}}'"
......@@ -68,7 +68,7 @@ defineExpose({ state, name: '{{ctrl.name}}' });
:viewParams="JSON.stringify(state.selection.viewParams)">
</{{viewRef.refPSAppView.name}}>
{{/if}}
{{/each}}
{{/each}} --}}
</a-layout>
</a-layout>
</template>
\ No newline at end of file
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import path from 'path';
const { resolve } = path;
// 自动导入element-plus
import AutoImport from 'unplugin-auto-import/vite'
......@@ -10,7 +11,6 @@ import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
// 代码编辑器 代码提示插件
import monacoEditorPlugin from "vite-plugin-monaco-editor";
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: {
......@@ -37,4 +37,8 @@ export default defineConfig({
}),
monacoEditorPlugin(),
],
build: {
outDir: resolve(__dirname, 'dist')
}
});
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册