提交 07c2a3e2 编写于 作者: ibizdev's avatar ibizdev

zhujiamin 发布系统代码 [TrainSys,网页端]

上级 ce2054c0
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
"dependencies": { "dependencies": {
"@floating-ui/dom": "^1.5.3", "@floating-ui/dom": "^1.5.3",
"@ibiz-template/command": "^0.0.1-beta.50", "@ibiz-template/command": "^0.0.1-beta.50",
"@ibiz-template/controller": "^0.0.1-beta.137", "@ibiz-template/controller": "^0.0.1-beta.138",
"@ibiz-template/core": "^0.0.1-beta.137", "@ibiz-template/core": "^0.0.1-beta.138",
"@ibiz-template/model": "^0.0.1-beta.137", "@ibiz-template/model": "^0.0.1-beta.138",
"@ibiz-template/runtime": "^0.0.1-beta.137", "@ibiz-template/runtime": "^0.0.1-beta.138",
"@ibiz-template/service": "^0.0.1-beta.137", "@ibiz-template/service": "^0.0.1-beta.138",
"@ibiz-template/theme": "^0.0.1-beta.137", "@ibiz-template/theme": "^0.0.1-beta.138",
"@ibiz-template/vue-util": "^0.0.1-beta.137", "@ibiz-template/vue-util": "^0.0.1-beta.138",
"@ibiz/dynamic-model-api": "^2.1.28", "@ibiz/dynamic-model-api": "^2.1.28",
"@riophae/vue-treeselect": "^0.4.0", "@riophae/vue-treeselect": "^0.4.0",
"dayjs": "^1.11.10", "dayjs": "^1.11.10",
......
此差异已折叠。
...@@ -61,6 +61,7 @@ import { ...@@ -61,6 +61,7 @@ import {
ListExpView, ListExpView,
ListView, ListView,
TreeExpView, TreeExpView,
PickupView2,
} from './components/views'; } from './components/views';
import { IndexView } from './views'; import { IndexView } from './views';
import AppKeepAlive from './components/common/app-keep-alive/app-keep-alive.vue'; import AppKeepAlive from './components/common/app-keep-alive/app-keep-alive.vue';
...@@ -153,6 +154,7 @@ export const AppRegister = { ...@@ -153,6 +154,7 @@ export const AppRegister = {
v.component('ListExpView', ListExpView); v.component('ListExpView', ListExpView);
v.component('ListView', ListView); v.component('ListView', ListView);
v.component('TreeExpView', TreeExpView); v.component('TreeExpView', TreeExpView);
v.component('PickupView2', PickupView2);
// 注册部件组件 // 注册部件组件
v.component('AppMenu', AppMenu); v.component('AppMenu', AppMenu);
v.component('GridControl', GridControl); v.component('GridControl', GridControl);
......
...@@ -13,6 +13,7 @@ export const ViewShell = defineComponent({ ...@@ -13,6 +13,7 @@ export const ViewShell = defineComponent({
modal: { type: Object as PropType<IModal> }, modal: { type: Object as PropType<IModal> },
isRouter: { type: Boolean }, isRouter: { type: Boolean },
modelPath: { type: String, required: true }, modelPath: { type: String, required: true },
noLoadDefault: { type: Boolean, default: false },
}, },
setup(props) { setup(props) {
const provider = ref<IViewProvider>(); const provider = ref<IViewProvider>();
......
...@@ -14,3 +14,4 @@ export * from './tab-exp-view/tab-exp-view'; ...@@ -14,3 +14,4 @@ export * from './tab-exp-view/tab-exp-view';
export * from './list-exp-view/list-exp-view'; export * from './list-exp-view/list-exp-view';
export * from './list-view/list-view'; export * from './list-view/list-view';
export * from './tree-exp-view/tree-exp-view'; export * from './tree-exp-view/tree-exp-view';
export * from './pickup-view2/pickup-view2';
import { IModal } from '@ibiz-template/runtime';
import {
useNamespace,
usePickupView2Controller,
} from '@ibiz-template/vue-util';
import { defineComponent, getCurrentInstance, PropType, VNode } from 'vue';
import '@ibiz-template/theme/style/components/views/pickup-view2/pickup-view2.scss';
export const PickupView2 = defineComponent({
props: {
context: Object as PropType<IContext>,
params: { type: Object as PropType<IParams>, default: () => ({}) },
modelPath: { type: String, required: true },
modal: { type: Object as PropType<IModal> },
noLoadDefault: { type: Boolean, required: false },
},
setup(props) {
const { proxy } = getCurrentInstance()!;
const c = usePickupView2Controller(proxy, props.modelPath);
const ns = useNamespace('view-depickupview2');
return { c, ns };
},
render(h) {
let panelComponent = null;
let treeComponent: VNode | null = null;
if (this.c.complete) {
const { tree, pickupViewPanel } = this.c.model;
if (this.c.providers[tree.name]) {
treeComponent = h(this.c.providers[tree.name].component, {
props: {
modelData: tree,
context: this.c.context,
params: this.c.params,
isSelectFirstDefault: true,
},
on: {
neuronInit: this.c.nerve.onNeuronInit('tree'),
},
});
}
if (this.c.providers[pickupViewPanel.name]) {
panelComponent = h(this.c.providers[pickupViewPanel.name].component, {
props: {
modelData: pickupViewPanel,
context: this.c.navPanelParams.context,
params: this.c.navPanelParams.params,
noLoadDefault: true,
},
on: {
neuronInit: this.c.nerve.onNeuronInit(pickupViewPanel.name),
},
});
}
}
return (
<view-base controller={this.c}>
<div class={this.ns.b('container')}>
<div class={this.ns.b('left')}>{treeComponent}</div>
<div class={this.ns.b('right')}>{panelComponent}</div>
</div>
</view-base>
);
},
});
...@@ -11,6 +11,7 @@ export const PickupViewPanel = defineComponent({ ...@@ -11,6 +11,7 @@ export const PickupViewPanel = defineComponent({
}, },
context: { type: Object as PropType<IContext>, required: true }, context: { type: Object as PropType<IContext>, required: true },
params: { type: Object as PropType<IParams>, default: () => ({}) }, params: { type: Object as PropType<IParams>, default: () => ({}) },
noLoadDefault: { type: Boolean, default: false },
}, },
setup(props) { setup(props) {
const { proxy } = getCurrentInstance()!; const { proxy } = getCurrentInstance()!;
...@@ -39,6 +40,7 @@ export const PickupViewPanel = defineComponent({ ...@@ -39,6 +40,7 @@ export const PickupViewPanel = defineComponent({
params: this.c.params, params: this.c.params,
modal: this.modal, modal: this.modal,
modelPath: this.viewPath, modelPath: this.viewPath,
noLoadDefault: this.noLoadDefault,
}, },
on: { on: {
neuronInit: this.c.nerve.onNeuronInit('embedView'), neuronInit: this.c.nerve.onNeuronInit('embedView'),
......
...@@ -74,9 +74,13 @@ export const TreeControl = defineComponent({ ...@@ -74,9 +74,13 @@ export const TreeControl = defineComponent({
c.isSelectFirstDefault && c.isSelectFirstDefault &&
c.defaultSelectKeys.length === 0 c.defaultSelectKeys.length === 0
) { ) {
// UI上通过 key 设置某个节点的当前选中状态 if (data[0]?.id) {
treeRef.value!.setCurrentKey(data[0].id); // UI上通过 key 设置某个节点的当前选中状态
c.onTreeNodeClick(data[0]); treeRef.value!.setCurrentKey(data[0].id);
c.onTreeNodeClick(data[0]);
} else {
ibiz.log.error('树加载成功后无数据');
}
} }
if ( if (
isFirstLoad && isFirstLoad &&
......
...@@ -16,6 +16,7 @@ import { WFDynaActionViewProvider } from './wf-dyna-action-view-provider'; ...@@ -16,6 +16,7 @@ import { WFDynaActionViewProvider } from './wf-dyna-action-view-provider';
import { WFDynaEditView3Provider } from './wf-dyna-edit-view3-provider'; import { WFDynaEditView3Provider } from './wf-dyna-edit-view3-provider';
import { WFDynaStartViewProvider } from './wf-dyna-start-view-provider'; import { WFDynaStartViewProvider } from './wf-dyna-start-view-provider';
import { WFStepTraceViewProvider } from './wf-step-trace-view-provider'; import { WFStepTraceViewProvider } from './wf-step-trace-view-provider';
import { PickupView2Provider } from './pickup-view2-provider';
/** /**
* 预置默认的视图适配器 * 预置默认的视图适配器
...@@ -49,6 +50,7 @@ export function presetViewProvider(): void { ...@@ -49,6 +50,7 @@ export function presetViewProvider(): void {
view.register(ViewType.APP_WF_STEP_TRACE_VIEW, new WFStepTraceViewProvider()); view.register(ViewType.APP_WF_STEP_TRACE_VIEW, new WFStepTraceViewProvider());
view.register(ViewType.APP_PORTAL_VIEW, new AppPortalViewProvider()); view.register(ViewType.APP_PORTAL_VIEW, new AppPortalViewProvider());
view.register(ViewType.DE_PORTAL_VIEW, new AppPortalViewProvider()); view.register(ViewType.DE_PORTAL_VIEW, new AppPortalViewProvider());
view.register(ViewType.DE_PICKUP_VIEW2, new PickupView2Provider());
// 导航 // 导航
view.register(ViewType.DE_TAB_EXP_VIEW, new TabExpViewProvider()); view.register(ViewType.DE_TAB_EXP_VIEW, new TabExpViewProvider());
view.register(ViewType.DE_LIST_EXP_VIEW, new ListExpViewProvider()); view.register(ViewType.DE_LIST_EXP_VIEW, new ListExpViewProvider());
...@@ -74,4 +76,5 @@ export { ...@@ -74,4 +76,5 @@ export {
ListViewProvider, ListViewProvider,
TabExpViewProvider, TabExpViewProvider,
TreeExpViewProvider, TreeExpViewProvider,
PickupView2Provider,
}; };
import { IViewProvider } from '@ibiz-template/controller';
/**
* 实体数据选择视图(左右关系)适配器
*
* @author lxm
* @date 2022-10-25 18:10:57
* @export
* @class PickupView2Provider
* @implements {IViewProvider}
*/
export class PickupView2Provider implements IViewProvider {
component: string = 'PickupView2';
}
...@@ -1579,16 +1579,16 @@ ...@@ -1579,16 +1579,16 @@
"codeName" : "VMGroup2", "codeName" : "VMGroup2",
"name" : "视图消息组2", "name" : "视图消息组2",
"getPSAppViewMsgGroupDetails" : [ { "getPSAppViewMsgGroupDetails" : [ {
"name" : "视图消息2", "name" : "视图消息",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg3" "id" : "ViewMsg2"
} }
}, { }, {
"name" : "视图消息", "name" : "视图消息2",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg2" "id" : "ViewMsg3"
} }
} ] } ]
}, { }, {
......
...@@ -12841,16 +12841,16 @@ ...@@ -12841,16 +12841,16 @@
"codeName" : "VMGroup2", "codeName" : "VMGroup2",
"name" : "视图消息组2", "name" : "视图消息组2",
"getPSAppViewMsgGroupDetails" : [ { "getPSAppViewMsgGroupDetails" : [ {
"name" : "视图消息2", "name" : "视图消息",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg3" "id" : "ViewMsg2"
} }
}, { }, {
"name" : "视图消息", "name" : "视图消息2",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg2" "id" : "ViewMsg3"
} }
} ] } ]
}, { }, {
...@@ -12879,16 +12879,16 @@ ...@@ -12879,16 +12879,16 @@
"codeName" : "VMGroup3", "codeName" : "VMGroup3",
"name" : "视图消息类型测试", "name" : "视图消息类型测试",
"getPSAppViewMsgGroupDetails" : [ { "getPSAppViewMsgGroupDetails" : [ {
"name" : "消息类型-警告信息", "name" : "消息类型-错误信息",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg5" "id" : "ViewMsg6"
} }
}, { }, {
"name" : "消息类型-错误信息", "name" : "消息类型-警告信息",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg6" "id" : "ViewMsg5"
} }
}, { }, {
"name" : "消息类型-常规信息", "name" : "消息类型-常规信息",
...@@ -12911,6 +12911,12 @@ ...@@ -12911,6 +12911,12 @@
"codeName" : "VMGroup4", "codeName" : "VMGroup4",
"name" : "视图消息位置测试", "name" : "视图消息位置测试",
"getPSAppViewMsgGroupDetails" : [ { "getPSAppViewMsgGroupDetails" : [ {
"name" : "消息位置-弹出",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg10"
}
}, {
"name" : "消息位置-视图内容区", "name" : "消息位置-视图内容区",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
...@@ -12928,29 +12934,23 @@ ...@@ -12928,29 +12934,23 @@
"modelref" : true, "modelref" : true,
"id" : "ViewMsg8" "id" : "ViewMsg8"
} }
}, {
"name" : "消息位置-弹出",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg10"
}
} ] } ]
}, { }, {
"codeName" : "VMGroup8", "codeName" : "VMGroup8",
"name" : "【静态测试】", "name" : "【静态测试】",
"getPSAppViewMsgGroupDetails" : [ { "getPSAppViewMsgGroupDetails" : [ {
"name" : "消息类型-常规信息", "name" : "关闭模式-本次删除-上方-警告",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg4" "id" : "ViewMsg13"
}, }
"position" : "POPUP"
}, { }, {
"name" : "关闭模式-无删除-上方-常规", "name" : "消息类型-错误信息",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg11" "id" : "ViewMsg6"
} },
"position" : "POPUP"
}, { }, {
"name" : "消息位置-视图下方", "name" : "消息位置-视图下方",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
...@@ -12958,17 +12958,18 @@ ...@@ -12958,17 +12958,18 @@
"id" : "ViewMsg8" "id" : "ViewMsg8"
} }
}, { }, {
"name" : "消息位置-视图内容区", "name" : "关闭模式-无删除-上方-常规",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg9" "id" : "ViewMsg11"
} }
}, { }, {
"name" : "关闭模式-默认删除-上方-错误", "name" : "消息类型-常规信息",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg12" "id" : "ViewMsg4"
} },
"position" : "POPUP"
}, { }, {
"name" : "消息类型-警告信息", "name" : "消息类型-警告信息",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
...@@ -12977,55 +12978,54 @@ ...@@ -12977,55 +12978,54 @@
}, },
"position" : "POPUP" "position" : "POPUP"
}, { }, {
"name" : "关闭模式-本次删除-上方-警告", "name" : "关闭模式-默认删除-上方-错误",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg13" "id" : "ViewMsg12"
} }
}, { }, {
"name" : "消息类型-错误信息", "name" : "消息位置-视图内容区",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg6" "id" : "ViewMsg9"
}, }
"position" : "POPUP"
} ] } ]
}, { }, {
"codeName" : "VMGroup5", "codeName" : "VMGroup5",
"name" : "视图消息关闭模式", "name" : "视图消息关闭模式",
"getPSAppViewMsgGroupDetails" : [ { "getPSAppViewMsgGroupDetails" : [ {
"name" : "关闭模式-默认删除", "name" : "关闭模式-删除",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg12" "id" : "ViewMsg11"
} }
}, { }, {
"name" : "关闭模式-本次删除", "name" : "关闭模式-默认删除",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg13" "id" : "ViewMsg12"
} }
}, { }, {
"name" : "关闭模式-删除", "name" : "关闭模式-本次删除",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg11" "id" : "ViewMsg13"
} }
} ] } ]
}, { }, {
"codeName" : "VMGroup6", "codeName" : "VMGroup6",
"name" : "视图消息动态模式测试", "name" : "视图消息动态模式测试",
"getPSAppViewMsgGroupDetails" : [ { "getPSAppViewMsgGroupDetails" : [ {
"name" : "动态模式-静态内容", "name" : "动态模式-实体数据集",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg15" "id" : "ViewMsg14"
} }
}, { }, {
"name" : "动态模式-实体数据集", "name" : "动态模式-静态内容",
"getPSAppViewMsg" : { "getPSAppViewMsg" : {
"modelref" : true, "modelref" : true,
"id" : "ViewMsg14" "id" : "ViewMsg15"
} }
} ] } ]
} ], } ],
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册