template上的改动
This commit is contained in:
parent
3e7a7c3cb1
commit
d1ce7a3acd
|
|
@ -1,2 +1,2 @@
|
||||||
//小程序使用
|
//小程序使用
|
||||||
@import "@oak-general-business/config/styles/mp/index.less";
|
@import "../../../../node_modules/oak-general-business/es/config/styles/mp/index.less";
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
@import '@oak-general-business/config/styles/web/index.less'; // 少量公共样式
|
@import '../../../../node_modules/oak-general-business/es/config/styles/web/index.less'; // 少量公共样式
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { EntityDict } from '@project/oak-app-domain';
|
||||||
|
import { Feature } from 'oak-frontend-base';
|
||||||
|
import { CommonAspectDict } from 'oak-common-aspect';
|
||||||
|
import { AspectDict } from '../aspects/AspectDict';
|
||||||
|
import { BackendRuntimeContext } from '@project/context/BackendRuntimeContext';
|
||||||
|
import { FrontendRuntimeContext } from '@project/context/FrontendRuntimeContext';
|
||||||
|
import { Cache } from 'oak-frontend-base/es/features/cache';
|
||||||
|
|
||||||
|
export default class Console extends Feature {
|
||||||
|
private cache: Cache<EntityDict, BackendRuntimeContext, FrontendRuntimeContext, CommonAspectDict<EntityDict, BackendRuntimeContext>>;
|
||||||
|
|
||||||
|
constructor(cache: Cache<EntityDict, BackendRuntimeContext, FrontendRuntimeContext, CommonAspectDict<EntityDict, BackendRuntimeContext>>) {
|
||||||
|
super();
|
||||||
|
this.cache = cache;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -84,7 +84,7 @@ export default class Menu extends Feature {
|
||||||
}
|
}
|
||||||
|
|
||||||
refreshMenus() {
|
refreshMenus() {
|
||||||
const roomId = this.console.getRoomId();
|
/* const roomId = this.console.getRoomId();
|
||||||
const menus = this.contextMenuFactory.getMenusByContext<IMenu<keyof EntityDict>>('room', roomId);
|
const menus = this.contextMenuFactory.getMenusByContext<IMenu<keyof EntityDict>>('room', roomId);
|
||||||
const menuGroup = groupBy(menus, 'parent');
|
const menuGroup = groupBy(menus, 'parent');
|
||||||
this.menus = (menus as any[]).filter(ele => !ele.parent).concat(
|
this.menus = (menus as any[]).filter(ele => !ele.parent).concat(
|
||||||
|
|
@ -98,7 +98,7 @@ export default class Menu extends Feature {
|
||||||
};
|
};
|
||||||
}).filter((ele) => !!ele.children)
|
}).filter((ele) => !!ele.children)
|
||||||
);
|
);
|
||||||
this.publish();
|
this.publish(); */
|
||||||
}
|
}
|
||||||
|
|
||||||
getMenus() {
|
getMenus() {
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
|
||||||
import { FrontendRuntimeContext } from '../context/FrontendRuntimeContext';
|
import { FrontendRuntimeContext } from '../context/FrontendRuntimeContext';
|
||||||
import { AAD, AFD } from '@project/types/RuntimeCxt';
|
import { AAD, AFD } from '@project/types/RuntimeCxt';
|
||||||
import Sample from './Sample';
|
import Sample from './Sample';
|
||||||
|
import Console from './Console';
|
||||||
|
import Menu from './Menu';
|
||||||
|
|
||||||
export function initialize(
|
export function initialize(
|
||||||
generalFeatures: BasicFeatures<
|
generalFeatures: BasicFeatures<
|
||||||
|
|
@ -36,9 +38,13 @@ export function initialize(
|
||||||
} = generalFeatures;
|
} = generalFeatures;
|
||||||
|
|
||||||
const sample = new Sample(cache);
|
const sample = new Sample(cache);
|
||||||
|
const console = new Console(cache);
|
||||||
|
const menu = new Menu(contextMenuFactory, console);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
sample,
|
sample,
|
||||||
|
console,
|
||||||
|
menu,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"navigationBarTitleText": "书店详情",
|
|
||||||
"usingComponents": {}
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
/** index.wxss **/
|
|
||||||
|
|
||||||
.container {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
import { Schema as ExtraFile } from '@oak-app-domain/ExtraFile/Schema';
|
|
||||||
|
|
||||||
export default OakComponent({
|
|
||||||
entity: 'store',
|
|
||||||
projection: {
|
|
||||||
id: 1,
|
|
||||||
iState: 1,
|
|
||||||
name: 1,
|
|
||||||
coordinate: 1,
|
|
||||||
areaId: 1,
|
|
||||||
addrDetail: 1,
|
|
||||||
extraFile$entity: {
|
|
||||||
$entity: 'extraFile',
|
|
||||||
data: {
|
|
||||||
id: 1,
|
|
||||||
tag1: 1,
|
|
||||||
origin: 1,
|
|
||||||
bucket: 1,
|
|
||||||
objectId: 1,
|
|
||||||
filename: 1,
|
|
||||||
extra1: 1,
|
|
||||||
extension: 1,
|
|
||||||
type: 1,
|
|
||||||
entity: 1,
|
|
||||||
},
|
|
||||||
filter: {
|
|
||||||
tag1: {
|
|
||||||
$in: ['cover'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
isList: false,
|
|
||||||
formData: function ({ data: store, features }) {
|
|
||||||
|
|
||||||
return {
|
|
||||||
iState: store?.iState,
|
|
||||||
name: store?.name,
|
|
||||||
coordinate: store?.coordinate,
|
|
||||||
areaId: store?.areaId,
|
|
||||||
addrDetail: store?.addrDetail,
|
|
||||||
id: store?.id,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async confirm() {
|
|
||||||
await this.execute();
|
|
||||||
this.navigateBack();
|
|
||||||
},
|
|
||||||
async reset() {
|
|
||||||
// 重置
|
|
||||||
this.clean();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
<!--index.wxml-->
|
|
||||||
<view class="container">
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"submit": "提交",
|
|
||||||
"reset": "重置"
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
|
|
||||||
.container {
|
|
||||||
background: var(--td-bg-color-container);
|
|
||||||
box-shadow: 0 2px 3px #0000001a;
|
|
||||||
border-radius: 3px;
|
|
||||||
padding: 30px 32px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
import React, { useState, useRef } from 'react';
|
|
||||||
import Style from './web.module.less';
|
|
||||||
import { WebComponentProps } from 'oak-frontend-base';
|
|
||||||
import { EntityDict } from '@oak-app-domain';
|
|
||||||
|
|
||||||
export default function Render(props: WebComponentProps<EntityDict, 'store', false, {}, {}>) {
|
|
||||||
const { t } = props.methods;
|
|
||||||
const { data } = props;
|
|
||||||
|
|
||||||
return <div className={Style.container}></div>;
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"navigationBarTitleText": "书店管理",
|
|
||||||
"usingComponents": {}
|
|
||||||
}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
/** index.wxss **/
|
|
||||||
|
|
@ -1,74 +0,0 @@
|
||||||
import { OpSchema as ExtraFile } from '@oak-app-domain/ExtraFile/Schema';
|
|
||||||
|
|
||||||
export default OakComponent({
|
|
||||||
entity: 'store',
|
|
||||||
projection: {
|
|
||||||
id: 1,
|
|
||||||
iState: 1,
|
|
||||||
name: 1,
|
|
||||||
coordinate: 1,
|
|
||||||
areaId: 1,
|
|
||||||
addrDetail: 1,
|
|
||||||
extraFile$entity: {
|
|
||||||
$entity: 'extraFile',
|
|
||||||
data: {
|
|
||||||
id: 1,
|
|
||||||
tag1: 1,
|
|
||||||
origin: 1,
|
|
||||||
bucket: 1,
|
|
||||||
objectId: 1,
|
|
||||||
filename: 1,
|
|
||||||
extra1: 1,
|
|
||||||
extension: 1,
|
|
||||||
type: 1,
|
|
||||||
entity: 1,
|
|
||||||
},
|
|
||||||
filter: {
|
|
||||||
tag1: {
|
|
||||||
$in: ['cover'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
isList: true,
|
|
||||||
formData: function ({ data: stores, features }) {
|
|
||||||
|
|
||||||
return {
|
|
||||||
stores: stores?.map((store, index: number) => {
|
|
||||||
return {
|
|
||||||
iState: store?.iState,
|
|
||||||
name: store?.name,
|
|
||||||
coordinate: store?.coordinate,
|
|
||||||
areaId: store?.areaId,
|
|
||||||
addrDetail: store?.addrDetail,
|
|
||||||
id: store?.id,
|
|
||||||
};
|
|
||||||
}),
|
|
||||||
};
|
|
||||||
},
|
|
||||||
// filters: [],
|
|
||||||
// sorters: [],
|
|
||||||
methods: {
|
|
||||||
goUpsert() {
|
|
||||||
this.navigateTo({
|
|
||||||
url: '/store/upsert',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goUpsertById(id: string) {
|
|
||||||
this.navigateTo({
|
|
||||||
url: '/store/upsert',
|
|
||||||
oakId: id,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goDetailById(id: string) {
|
|
||||||
this.navigateTo({
|
|
||||||
url: '/store/detail',
|
|
||||||
oakId: id,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onRemove(id: string) {
|
|
||||||
this.removeItem(id);
|
|
||||||
this.execute();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
<!--index.wxml-->
|
|
||||||
<view class="container">
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"action": {
|
|
||||||
"add": "添加书店"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
.container {
|
|
||||||
background: var(--td-bg-color-container);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
.container {
|
|
||||||
background: var(--td-bg-color-container);
|
|
||||||
box-shadow: 0 2px 3px #0000001a;
|
|
||||||
border-radius: 3px;
|
|
||||||
padding: 30px 32px;
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
import React, { useState, useRef } from 'react';
|
|
||||||
import Style from './web.pc.module.less';
|
|
||||||
import { WebComponentProps } from 'oak-frontend-base';
|
|
||||||
import { EntityDict } from '@oak-app-domain';
|
|
||||||
|
|
||||||
export default function Render(props: WebComponentProps<EntityDict, 'store', true, {}, {}>) {
|
|
||||||
const { t } = props.methods;
|
|
||||||
const { data } = props;
|
|
||||||
|
|
||||||
return <div className={Style.container}></div>;
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
import React, { useState, useRef } from 'react';
|
|
||||||
import Style from './web.pc.module.less';
|
|
||||||
import { WebComponentProps } from 'oak-frontend-base';
|
|
||||||
import { EntityDict } from '@oak-app-domain';
|
|
||||||
|
|
||||||
export default function Render(props: WebComponentProps<EntityDict, 'store', true, {}, {}>) {
|
|
||||||
const { t } = props.methods;
|
|
||||||
const { data } = props;
|
|
||||||
|
|
||||||
return <div className={Style.container}></div>;
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"navigationBarTitleText": "编辑书店",
|
|
||||||
"usingComponents": {}
|
|
||||||
}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
/** index.wxss **/
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
||||||
|
|
||||||
export default OakComponent({
|
|
||||||
entity: 'store',
|
|
||||||
projection: {
|
|
||||||
id: 1,
|
|
||||||
iState: 1,
|
|
||||||
name: 1,
|
|
||||||
coordinate: 1,
|
|
||||||
areaId: 1,
|
|
||||||
addrDetail: 1,
|
|
||||||
extraFile$entity: {
|
|
||||||
$entity: 'extraFile',
|
|
||||||
data: {
|
|
||||||
id: 1,
|
|
||||||
tag1: 1,
|
|
||||||
origin: 1,
|
|
||||||
bucket: 1,
|
|
||||||
objectId: 1,
|
|
||||||
filename: 1,
|
|
||||||
extra1: 1,
|
|
||||||
extension: 1,
|
|
||||||
type: 1,
|
|
||||||
entity: 1,
|
|
||||||
},
|
|
||||||
filter: {
|
|
||||||
tag1: {
|
|
||||||
$in: ['cover'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
isList: false,
|
|
||||||
formData: function ({ data: store, features }) {
|
|
||||||
return {
|
|
||||||
iState: store?.iState,
|
|
||||||
name: store?.name,
|
|
||||||
coordinate: store?.coordinate,
|
|
||||||
areaId: store?.areaId,
|
|
||||||
addrDetail: store?.addrDetail,
|
|
||||||
id: store?.id,
|
|
||||||
extraFile$entity: store?.extraFile$entity,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
data: {
|
|
||||||
visible: false,
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async confirm() {
|
|
||||||
await this.execute();
|
|
||||||
this.navigateBack();
|
|
||||||
},
|
|
||||||
async reset() {
|
|
||||||
// 重置
|
|
||||||
this.clean();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
<!--index.wxml-->
|
|
||||||
<view class="container">
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"submit": "提交",
|
|
||||||
"reset": "重置"
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
.container {
|
|
||||||
background-color: var(--td-bg-color-container);
|
|
||||||
padding: 30px 32px;
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
import React, { useState, useRef } from 'react';
|
|
||||||
import Style from './web.module.less';
|
|
||||||
import { WebComponentProps } from 'oak-frontend-base';
|
|
||||||
import { EntityDict } from '@oak-app-domain';
|
|
||||||
|
|
||||||
export default function Render(props: WebComponentProps<EntityDict, 'store', false, {}, {}>) {
|
|
||||||
const { t } = props.methods;
|
|
||||||
const { data } = props;
|
|
||||||
|
|
||||||
return <div className={Style.container}></div>;
|
|
||||||
}
|
|
||||||
|
|
@ -51,8 +51,6 @@ const init = async () => {
|
||||||
error = err;
|
error = err;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 这个操作要在初始化完成后异步调用
|
|
||||||
features.token.loadTokenInfo();
|
|
||||||
const application = features.application.getApplication();
|
const application = features.application.getApplication();
|
||||||
const folder = application?.system?.folder;
|
const folder = application?.system?.folder;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue