提交 0cd482cb 编写于 作者: ibizdev's avatar ibizdev

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

上级 1395dae0
......@@ -101,7 +101,7 @@ export default defineComponent({
return null;
}
return h('ViewShell', {
props: {
attrs: {
context: this.viewData.context,
params: this.viewData.params,
modelPath: this.viewData.viewPath,
......
import { IViewProvider } from '@ibiz-template/controller';
import { ModelUtil } from '@ibiz-template/model';
import { useNamespace } from '@ibiz-template/vue-util';
import { defineComponent, PropType, ref } from 'vue';
import { computed, defineComponent, PropType, ref } from 'vue';
import '@ibiz-template/theme/style/components/view-shell/view-shell.scss';
import { IModal } from '@ibiz-template/runtime';
......@@ -24,18 +24,23 @@ export const ViewShell = defineComponent({
const ns = useNamespace('view-shell');
// 路由绘制的视图,添加一个上下文isRouter
const cloneContext = props.context.clone();
cloneContext.isRouter = props.isRouter === true;
const cloneContext = computed(() => {
const temp = props.context.clone();
temp.isRouter = props.isRouter === true;
return temp;
});
return { ns, provider, cloneContext };
},
render(h) {
if (this.provider) {
const opts = {
...this.$vnode.data,
attrs: {
...this.$props,
...this.$attrs,
context: this.cloneContext,
},
on: this.$listeners,
};
opts.props!.context = this.cloneContext;
return h('AppTransition', {}, [h(this.provider.component, opts)]);
}
return (
......
......@@ -62,7 +62,7 @@ export const EditView3 = defineComponent({
{!this.c.isNewData &&
this.lazyList.includes(page.source.name) &&
h('ViewShell', {
props: {
attrs: {
context: drPage.context,
params: drPage.params,
modal: { mode: ViewMode.EMBED },
......
......@@ -93,7 +93,7 @@ export const ListExpView = defineComponent({
}
// 非路由模式下绘制嵌入视图
return h('ViewShell', {
props: {
attrs: {
context: this.c.navItem.context,
params: this.c.navItem.params,
modal: { mode: ViewMode.EMBED },
......
......@@ -10,8 +10,8 @@ import {
computed,
defineComponent,
getCurrentInstance,
h,
PropType,
h,
ref,
} from 'vue';
import './tab-exp-view.scss';
......@@ -105,6 +105,8 @@ export const TabExpView = defineComponent({
return Object.values(c.tabExpPages).map(item => item.key);
});
const embedViewModal = { mode: ViewMode.EMBED };
return {
c,
ns,
......@@ -113,6 +115,7 @@ export const TabExpView = defineComponent({
deactivateAll,
activeTab,
keyHistory,
embedViewModal,
};
},
render() {
......@@ -143,10 +146,10 @@ export const TabExpView = defineComponent({
>
{this.lazyList.includes(page.name) &&
h('ViewShell', {
props: {
attrs: {
context: this.c.context,
params: this.c.params,
modal: { mode: ViewMode.EMBED },
modal: this.embedViewModal,
modelPath: page.embedView.source.modelPath,
},
on: {
......
......@@ -95,7 +95,7 @@ export const WFDynaEditView3 = defineComponent({
{!this.c.isNewData &&
this.lazyList.includes(page.source.name) &&
h('ViewShell', {
props: {
attrs: {
context: drPage.context,
params: drPage.params,
modal: { mode: ViewMode.EMBED },
......
......@@ -34,7 +34,7 @@ export const ViewPortlet = defineComponent({
return (
<portlet-layout controller={this.controller} class={classArr}>
{h('ViewShell', {
props: {
attrs: {
context: c.viewContext,
params: c.params,
modal: { mode: ViewMode.EMBED },
......
......@@ -50,7 +50,7 @@ export const FormDRUIPart = defineComponent({
class={this.ns.b()}
>
{h('ViewShell', {
props: {
attrs: {
context: this.$props.controller.context,
params: this.$props.controller.params,
modal: this.modal,
......
......@@ -79,7 +79,7 @@ export const GridFieldColumn = defineComponent({
) : (
<span class={this.ns.e('text')}>
{fieldValue}
{fieldValue && c.model.unitName}
{fieldValue != null && c.model.unitName}
</span>
)}
</div>
......
......@@ -34,7 +34,7 @@ export const PickupViewPanel = defineComponent({
return;
}
return h('ViewShell', {
props: {
attrs: {
context: this.c.context,
params: this.c.params,
modal: this.modal,
......
......@@ -34,7 +34,7 @@ export const ViewPanel = defineComponent({
return;
}
return h('ViewShell', {
props: {
attrs: {
context: this.c.context,
params: this.c.params,
modal: this.modal,
......
......@@ -15,7 +15,7 @@ export function createOverlayView(
): (_h: CreateElement) => VNode {
return (h: CreateElement) =>
h('ViewShell', {
props,
attrs: props,
on: {
neuronInit: (neuron: ViewNeuron) => {
neuron.evt.on('closeView', (res: IModalData) => {
......
......@@ -54,6 +54,9 @@ export default defineComponent({
const route = useRoute(instance.proxy);
const ru = (route.query.ru as string) || '/';
ibiz.appData = undefined;
ibiz.orgData = undefined;
onMounted(() => {
setTimeout(() => {
const el = document.querySelector('.app-loading-x') as HTMLDivElement;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册