Merge branch 'dev' of codeup.aliyun.com:61c14a7efa282c88e103c23f/oak-general-business into dev
This commit is contained in:
commit
bf149178ec
|
|
@ -44,6 +44,11 @@ declare type GeneralAspectDict<ED extends EntityDict, Cxt extends BackendRuntime
|
|||
entityId: string;
|
||||
config: Config;
|
||||
}, context: Cxt) => Promise<void>;
|
||||
updateApplicationConfig: (params: {
|
||||
entity: 'application';
|
||||
entityId: string;
|
||||
config: EntityDict['application']['Schema']['config'];
|
||||
}, context: Cxt) => Promise<void>;
|
||||
};
|
||||
export declare type AspectDict<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>> = GeneralAspectDict<ED, Cxt>;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -6,3 +6,8 @@ export declare function updateConfig<ED extends EntityDict, Cxt extends BackendR
|
|||
entityId: string;
|
||||
config: Config;
|
||||
}, context: Cxt): Promise<void>;
|
||||
export declare function updateApplicationConfig<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>>(params: {
|
||||
entity: 'application';
|
||||
entityId: string;
|
||||
config: EntityDict['application']['Schema']['config'];
|
||||
}, context: Cxt): Promise<void>;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.updateConfig = void 0;
|
||||
exports.updateApplicationConfig = exports.updateConfig = void 0;
|
||||
var tslib_1 = require("tslib");
|
||||
var uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
function updateConfig(params, context) {
|
||||
|
|
@ -28,3 +28,28 @@ function updateConfig(params, context) {
|
|||
});
|
||||
}
|
||||
exports.updateConfig = updateConfig;
|
||||
function updateApplicationConfig(params, context) {
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
var entity, entityId, config;
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
entity = params.entity, entityId = params.entityId, config = params.config;
|
||||
return [4 /*yield*/, context.operate(entity, {
|
||||
id: (0, uuid_1.generateNewId)(),
|
||||
action: 'update',
|
||||
data: {
|
||||
config: config,
|
||||
},
|
||||
filter: {
|
||||
id: entityId,
|
||||
},
|
||||
}, {})];
|
||||
case 1:
|
||||
_a.sent();
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
exports.updateApplicationConfig = updateApplicationConfig;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { loginByMobile, loginWechat, loginWechatMp, syncUserInfoWechatMp, sendCaptcha } from './token';
|
||||
import { getUploadInfo } from './extraFile';
|
||||
import { getApplication } from './application';
|
||||
import { updateConfig } from './config';
|
||||
import { updateConfig, updateApplicationConfig } from './config';
|
||||
export declare const aspectDict: {
|
||||
loginByMobile: typeof loginByMobile;
|
||||
loginWechat: typeof loginWechat;
|
||||
|
|
@ -11,4 +11,5 @@ export declare const aspectDict: {
|
|||
sendCaptcha: typeof sendCaptcha;
|
||||
getApplication: typeof getApplication;
|
||||
updateConfig: typeof updateConfig;
|
||||
updateApplicationConfig: typeof updateApplicationConfig;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ var token_1 = require("./token");
|
|||
var extraFile_1 = require("./extraFile");
|
||||
var application_1 = require("./application");
|
||||
var config_1 = require("./config");
|
||||
// import commonAspectDict from 'oak-common-aspect';
|
||||
exports.aspectDict = {
|
||||
loginByMobile: token_1.loginByMobile,
|
||||
loginWechat: token_1.loginWechat,
|
||||
|
|
@ -15,5 +14,5 @@ exports.aspectDict = {
|
|||
sendCaptcha: token_1.sendCaptcha,
|
||||
getApplication: application_1.getApplication,
|
||||
updateConfig: config_1.updateConfig,
|
||||
updateApplicationConfig: config_1.updateApplicationConfig,
|
||||
};
|
||||
// export type AspectDict<ED extends EntityDict & BaseEntityDict> = TokenAD<ED> & CrudAD<ED>;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import './index.less';
|
||||
declare const Empty: () => JSX.Element;
|
||||
export default Empty;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import './index.less';
|
||||
declare const Empty: () => JSX.Element;
|
||||
export default Empty;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import './index.less';
|
||||
interface QrCodeProps {
|
||||
id?: string;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ exports.default = OakComponent({
|
|||
case 0:
|
||||
currentConfig = this.state.currentConfig;
|
||||
_a = this.props, entity = _a.entity, entityId = _a.entityId;
|
||||
return [4 /*yield*/, this.features.config.updateConfig(entity, entityId, currentConfig)];
|
||||
return [4 /*yield*/, this.features.config.updateApplicationConfig(entity, entityId, currentConfig)];
|
||||
case 1:
|
||||
_b.sent();
|
||||
this.setMessage({
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { AppType, WebConfig, WechatPublicConfig, WechatMpConfig } from '../../../general-app-domain/Application/Schema';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
|
|
@ -9,6 +8,7 @@ export default function render(props: WebComponentProps<EntityDict, 'user', fals
|
|||
currentConfig: Config;
|
||||
dirty: boolean;
|
||||
type: AppType;
|
||||
isService?: boolean;
|
||||
}, {
|
||||
resetConfig: () => void;
|
||||
updateConfig: () => void;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ var index_1 = tslib_1.__importDefault(require("./web/index"));
|
|||
var index_2 = tslib_1.__importDefault(require("./wechatMp/index"));
|
||||
var index_3 = tslib_1.__importDefault(require("./wechatPublic/index"));
|
||||
function AppView(props) {
|
||||
var type = props.type, config = props.config, setValue = props.setValue, removeItem = props.removeItem, cleanKey = props.cleanKey;
|
||||
var type = props.type, config = props.config, setValue = props.setValue, removeItem = props.removeItem, cleanKey = props.cleanKey, isService = props.isService;
|
||||
if (type === 'web') {
|
||||
return ((0, jsx_runtime_1.jsx)(index_1.default, { config: config || {}, setValue: function (path, value) { return setValue(path, value); }, removeItem: function (path, index) { return removeItem(path, index); }, cleanKey: function (path, key) { return cleanKey(path, key); } }));
|
||||
}
|
||||
|
|
@ -16,20 +16,20 @@ function AppView(props) {
|
|||
return ((0, jsx_runtime_1.jsx)(index_2.default, { config: config || {}, setValue: function (path, value) { return setValue(path, value); }, removeItem: function (path, index) { return removeItem(path, index); }, cleanKey: function (path, key) { return cleanKey(path, key); } }));
|
||||
}
|
||||
if (type === 'wechatPublic') {
|
||||
return ((0, jsx_runtime_1.jsx)(index_3.default, { config: config || {}, setValue: function (path, value) { return setValue(path, value); }, removeItem: function (path, index) { return removeItem(path, index); }, cleanKey: function (path, key) { return cleanKey(path, key); } }));
|
||||
return ((0, jsx_runtime_1.jsx)(index_3.default, { isService: isService, config: config || {}, setValue: function (path, value) { return setValue(path, value); }, removeItem: function (path, index) { return removeItem(path, index); }, cleanKey: function (path, key) { return cleanKey(path, key); } }));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function render(props) {
|
||||
var _a = props.data, entity = _a.entity, name = _a.name, type = _a.type, currentConfig = _a.currentConfig, dirty = _a.dirty;
|
||||
var _b = props.methods, resetConfig = _b.resetConfig, updateConfig = _b.updateConfig, setValue = _b.setValue, removeItem = _b.removeItem, cleanKey = _b.cleanKey;
|
||||
var _a = props.data, entity = _a.entity, name = _a.name, type = _a.type, currentConfig = _a.currentConfig, dirty = _a.dirty, _b = _a.isService, isService = _b === void 0 ? true : _b;
|
||||
var _c = props.methods, resetConfig = _c.resetConfig, updateConfig = _c.updateConfig, setValue = _c.setValue, removeItem = _c.removeItem, cleanKey = _c.cleanKey;
|
||||
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(antd_1.Affix, tslib_1.__assign({ offsetTop: 64 }, { children: (0, jsx_runtime_1.jsx)(antd_1.Alert, { message: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("text", { children: ["\u60A8\u6B63\u5728\u66F4\u65B0", (0, jsx_runtime_1.jsx)(antd_1.Typography.Text, tslib_1.__assign({ keyboard: true, className: web_module_less_1.default.weight }, { children: entity })), "\u5BF9\u8C61", (0, jsx_runtime_1.jsx)(antd_1.Typography.Text, tslib_1.__assign({ keyboard: true, className: web_module_less_1.default.weight }, { children: name })), "\u7684\u914D\u7F6E\uFF0C\u8BF7\u8C28\u614E\u64CD\u4F5C"] }) }), type: "info", showIcon: true, action: (0, jsx_runtime_1.jsxs)(antd_1.Space, { children: [(0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ disabled: !dirty, type: "primary", danger: true, onClick: function () { return resetConfig(); }, style: {
|
||||
marginRight: 10,
|
||||
} }, { children: "\u91CD\u7F6E" })), (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ disabled: !dirty, type: "primary", onClick: function () { return updateConfig(); } }, { children: "\u786E\u5B9A" }))] }) }) })), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: (0, jsx_runtime_1.jsx)(antd_1.Tabs, { tabPosition: "left", items: [
|
||||
{
|
||||
key: '参数设置',
|
||||
label: '参数设置',
|
||||
children: ((0, jsx_runtime_1.jsx)(AppView, { type: type, config: currentConfig || {}, setValue: function (path, value) {
|
||||
children: ((0, jsx_runtime_1.jsx)(AppView, { isService: isService, type: type, config: currentConfig || {}, setValue: function (path, value) {
|
||||
return setValue(path, value);
|
||||
}, removeItem: function (path, index) {
|
||||
return removeItem(path, index);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { WebConfig } from '../../../../general-app-domain/Application/Schema';
|
||||
export default function Web(props: {
|
||||
config: WebConfig;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { WechatMpConfig } from '../../../../general-app-domain/Application/Schema';
|
||||
export default function WechatMp(props: {
|
||||
config: WechatMpConfig;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/// <reference types="react" />
|
||||
import { WechatPublicConfig } from '../../../../general-app-domain/Application/Schema';
|
||||
export default function WechatPublic(props: {
|
||||
isService?: boolean;
|
||||
config: WechatPublicConfig;
|
||||
setValue: (path: string, value: any) => void;
|
||||
removeItem: (path: string, index: number) => void;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
|||
function WechatPublic(props) {
|
||||
var _a = tslib_1.__read((0, react_1.useState)(false), 2), open = _a[0], setModal = _a[1];
|
||||
var _b = tslib_1.__read((0, react_1.useState)(''), 2), messageType = _b[0], setMessageType = _b[1];
|
||||
var config = props.config, setValue = props.setValue, cleanKey = props.cleanKey, removeItem = props.removeItem;
|
||||
var config = props.config, setValue = props.setValue, cleanKey = props.cleanKey, removeItem = props.removeItem, _c = props.isService, isService = _c === void 0 ? true : _c;
|
||||
var templateMsgs = (config === null || config === void 0 ? void 0 : config.templateMsgs) || {};
|
||||
return ((0, jsx_runtime_1.jsxs)(antd_1.Space, tslib_1.__assign({ direction: "vertical", size: "middle", style: { display: 'flex' } }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Row, { children: (0, jsx_runtime_1.jsx)(antd_1.Card, tslib_1.__assign({ className: web_module_less_1.default.tips }, { children: "\u6BCF\u79CD\u5747\u53EF\u914D\u7F6E\u4E00\u4E2A\uFF0C\u76F8\u5E94\u7684\u670D\u52A1\u6240\u4F7F\u7528\u7684\u5E10\u53F7\u8BF7\u51C6\u786E\u5BF9\u5E94" })) }), (0, jsx_runtime_1.jsxs)(antd_1.Col, tslib_1.__assign({ flex: "auto" }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Divider, tslib_1.__assign({ orientation: "left", className: web_module_less_1.default.title }, { children: "\u5FAE\u4FE1\u516C\u4F17\u53F7-\u57FA\u7840" })), (0, jsx_runtime_1.jsx)(antd_1.Tabs, { tabPosition: 'top', size: 'middle', type: "card", items: [
|
||||
{
|
||||
|
|
@ -18,11 +18,11 @@ function WechatPublic(props) {
|
|||
return setValue("appId", e.target.value);
|
||||
} }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "appSecret", name: "appSecret" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input, { placeholder: "\u8BF7\u8F93\u5165appSecret", type: "text", value: config === null || config === void 0 ? void 0 : config.appSecret, onChange: function (e) {
|
||||
return setValue("appSecret", e.target.value);
|
||||
} }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "\u662F\u5426\u4E3A\u670D\u52A1\u53F7", name: "isService" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Switch, { checkedChildren: "\u662F", unCheckedChildren: "\u5426", checked: config === null || config === void 0 ? void 0 : config.isService, onChange: function (checked) {
|
||||
} }) }) })), isService && ((0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "\u662F\u5426\u4E3A\u670D\u52A1\u53F7", name: "isService" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Switch, { checkedChildren: "\u662F", unCheckedChildren: "\u5426", checked: config === null || config === void 0 ? void 0 : config.isService, onChange: function (checked) {
|
||||
return setValue("isService", checked);
|
||||
} }) }) }))] }))),
|
||||
} }) }) })))] }))),
|
||||
},
|
||||
] })] })), (0, jsx_runtime_1.jsxs)(antd_1.Col, tslib_1.__assign({ flex: "auto" }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Divider, tslib_1.__assign({ orientation: "left", className: web_module_less_1.default.title }, { children: "\u5FAE\u4FE1\u516C\u4F17\u53F7-\u6A21\u7248" })), (0, jsx_runtime_1.jsx)(antd_1.Tabs, { tabPosition: 'top', size: 'middle', type: "editable-card",
|
||||
] })] })), isService && ((0, jsx_runtime_1.jsxs)(antd_1.Col, tslib_1.__assign({ flex: "auto" }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Divider, tslib_1.__assign({ orientation: "left", className: web_module_less_1.default.title }, { children: "\u5FAE\u4FE1\u516C\u4F17\u53F7-\u6A21\u7248" })), (0, jsx_runtime_1.jsx)(antd_1.Tabs, { tabPosition: 'top', size: 'middle', type: "editable-card",
|
||||
// hideAdd={!(Object.keys(templateMsgs).length > 0)}
|
||||
onEdit: function (targetKey, action) {
|
||||
if (action === 'add') {
|
||||
|
|
@ -38,7 +38,8 @@ function WechatPublic(props) {
|
|||
key: "".concat(name),
|
||||
label: "".concat(name),
|
||||
children: ((0, jsx_runtime_1.jsx)(antd_1.Form, tslib_1.__assign({ colon: true, labelAlign: "left", layout: "vertical", style: { marginTop: 10 } }, { children: (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "templateId", name: "templateId" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input, { placeholder: "\u8BF7\u8F93\u5165templateId", type: "text", value: templateId, onChange: function (e) {
|
||||
return setValue("templateMsgs.".concat(name), e.target.value);
|
||||
return setValue("templateMsgs.".concat(name), e.target
|
||||
.value);
|
||||
} }) }) })) }))),
|
||||
};
|
||||
})
|
||||
|
|
@ -63,6 +64,6 @@ function WechatPublic(props) {
|
|||
setMessageType('');
|
||||
}, open: open, cancelText: "\u53D6\u6D88", okText: "\u786E\u5B9A", destroyOnClose: true }, { children: (0, jsx_runtime_1.jsx)(antd_1.Form, tslib_1.__assign({ colon: true, labelAlign: "left", layout: "vertical", style: { marginTop: 10 } }, { children: (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "\u6807\u7B7E\u540D\u79F0", name: "messageType", help: "\u53EA\u80FD\u8F93\u5165\u82F1\u6587\u548C\u4E2D\u6587" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input, { placeholder: "\u8BF7\u8F93\u5165\u6807\u7B7E\u540D\u79F0", type: "text", value: messageType, onChange: function (e) {
|
||||
return setMessageType(e.target.value.replace(/[0-9-.]/g, ''));
|
||||
} }) }) })) })) }))] }))] })));
|
||||
} }) }) })) })) }))] })))] })));
|
||||
}
|
||||
exports.default = WechatPublic;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
import { Style as StyleType } from '../../../types/Style';
|
||||
declare type StyleProps = {
|
||||
value?: StyleType | null;
|
||||
onChange: (value: StyleType) => void;
|
||||
};
|
||||
export default function Render(props: StyleProps): JSX.Element;
|
||||
export {};
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var antd_1 = require("antd");
|
||||
var lodash_1 = require("oak-domain/lib/utils/lodash");
|
||||
var Colors = ['primary', 'success', 'error', 'warning', 'info'];
|
||||
function Color(props) {
|
||||
var _a = props.value, value = _a === void 0 ? {} : _a, setValue = props.setValue;
|
||||
;
|
||||
return ((0, jsx_runtime_1.jsx)(antd_1.Form, { children: Colors.map(function (ele) { return ((0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: ele, requiredMark: true, name: "folder", tooltip: "\u8BBE\u7F6E\u7CFB\u7EDF\u3010".concat(ele, "\u3011\u989C\u8272"), rules: [
|
||||
{
|
||||
required: true,
|
||||
},
|
||||
] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input, { onChange: function (e) {
|
||||
setValue(ele, e.target.value);
|
||||
}, value: (0, lodash_1.get)(value, ele) }) }) }), ele)); }) }));
|
||||
}
|
||||
function Render(props) {
|
||||
var styleValue = props.value, onChange = props.onChange;
|
||||
var setStyle = function (path, value) {
|
||||
var newStyle = (0, lodash_1.set)(styleValue || {}, path, value);
|
||||
onChange(newStyle);
|
||||
};
|
||||
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(antd_1.Tabs, { onChange: function () { }, type: "card", items: [
|
||||
{
|
||||
label: '颜色',
|
||||
key: 'color',
|
||||
component: Color,
|
||||
},
|
||||
].map(function (ele, i) {
|
||||
var ItemComponent = ele.component;
|
||||
return {
|
||||
label: ele.label,
|
||||
key: ele.key,
|
||||
children: ((0, jsx_runtime_1.jsx)(ItemComponent, { value: (0, lodash_1.get)(styleValue, ele.key), setValue: function (path, value) {
|
||||
setStyle("".concat(ele.key, ".").concat(path), value);
|
||||
} })),
|
||||
};
|
||||
}) }) }));
|
||||
}
|
||||
exports.default = Render;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
|
||||
.box {
|
||||
display: block;
|
||||
}
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { Config } from '../../../../types/Config';
|
||||
export default function Account(props: {
|
||||
account: Required<Config>['Account'];
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { Config } from '../../../../types/Config';
|
||||
export default function Cos(props: {
|
||||
cos: Required<Config>['Cos'];
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { Config } from '../../../../types/Config';
|
||||
export default function Cos(props: {
|
||||
live: Required<Config>['Live'];
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { Config } from '../../../../types/Config';
|
||||
export default function Cos(props: {
|
||||
map: Required<Config>['Map'];
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { Config } from '../../../types/Config';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
|
|
|
|||
|
|
@ -1,2 +1 @@
|
|||
/// <reference types="react" />
|
||||
export default function render(): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"t-icon": "../../../miniprogram_npm/tdesign/icon/icon"
|
||||
"l-icon": "../../../miniprogram_npm/lin-ui/icon/index"
|
||||
},
|
||||
"componentGenerics": {
|
||||
"item": true
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<slot />
|
||||
</view>
|
||||
<view class="file-list__image--add">
|
||||
<t-icon name="add" size="80" />
|
||||
<l-icon name="add" size="80" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { UploadFile } from 'antd';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from "oak-frontend-base";
|
||||
import { EntityDict } from "../../../general-app-domain";
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
export default function render(props: WebComponentProps<EntityDict, 'address', true, {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../general-app-domain';
|
||||
import './web.less';
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
declare const _default: import("react").ComponentType<any>;
|
||||
export default _default;
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = OakComponent({
|
||||
isList: false,
|
||||
entity: 'message',
|
||||
projection: {
|
||||
id: 1,
|
||||
$$createAt$$: 1,
|
||||
type: 1,
|
||||
title: 1,
|
||||
content: 1,
|
||||
visitState: 1,
|
||||
userId: 1,
|
||||
user: {
|
||||
id: 1,
|
||||
name: 1,
|
||||
},
|
||||
params: 1,
|
||||
props: 1,
|
||||
},
|
||||
formData: function (_a) {
|
||||
var message = _a.data, features = _a.features, props = _a.props;
|
||||
return message || {};
|
||||
},
|
||||
methods: {},
|
||||
actions: ['visit'],
|
||||
});
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'message', false, {
|
||||
onItemClicked: (item: {
|
||||
id: string;
|
||||
params: EntityDict['message']['Schema']['params'];
|
||||
}) => void;
|
||||
$$createAt$$: number;
|
||||
type: string;
|
||||
title: string;
|
||||
params: EntityDict['message']['Schema']['params'];
|
||||
visitState: EntityDict['message']['Schema']['visitState'];
|
||||
id: string;
|
||||
}, {}>): JSX.Element;
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var antd_1 = require("antd");
|
||||
var dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
var MessageType = {
|
||||
adminNotification: '系统通知',
|
||||
conversationMessage: '客服消息',
|
||||
};
|
||||
// success、 processing、error、default、warning
|
||||
var MessageTypeToColor = {
|
||||
adminNotification: 'processing',
|
||||
conversationMessage: 'warning',
|
||||
};
|
||||
function Render(props) {
|
||||
var data = props.data, methods = props.methods;
|
||||
var id = data.id, params = data.params, title = data.title, type = data.type, $$createAt$$ = data.$$createAt$$, visitState = data.visitState, _a = data.oakLegalActions, oakLegalActions = _a === void 0 ? [] : _a, onItemClicked = data.onItemClicked;
|
||||
var navigateTo = methods.navigateTo, execute = methods.execute;
|
||||
return ((0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: web_module_less_1.default.list, onClick: onItemClicked
|
||||
? function () {
|
||||
onItemClicked({
|
||||
id: id,
|
||||
params: params,
|
||||
});
|
||||
}
|
||||
: undefined }, { children: [(0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: web_module_less_1.default.list__notify }, { children: [visitState === 'unvisited' && ((0, jsx_runtime_1.jsx)(antd_1.Badge, { style: { marginRight: 5 }, status: "processing" })), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.notify_deadline }, { children: title })), oakLegalActions.includes('visit') && ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.notify_mask, onClick: function (event) {
|
||||
execute('visit', false);
|
||||
event.stopPropagation();
|
||||
} }, { children: "\u6807\u8BB0\u5DF2\u8BFB" })))] })), (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: web_module_less_1.default.list__info }, { children: [(0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.tags }, { children: (0, jsx_runtime_1.jsx)(antd_1.Tag, tslib_1.__assign({ color: MessageTypeToColor[type] }, { children: MessageType[type] })) })), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.create_time }, { children: (0, dayjs_1.default)($$createAt$$).format('YYYY-MM-DD HH:mm:ss') }))] }))] })));
|
||||
}
|
||||
exports.default = Render;
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
.list {
|
||||
padding: 10px 20px 10px 31px;
|
||||
border-bottom: 1px solid #ddd;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list__notify {
|
||||
margin-bottom: 5px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
|
||||
.notify_mask {
|
||||
// display: none;
|
||||
color: var(--oak-color-primary);
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
white-space: nowrap;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.notify_deadline {
|
||||
color: #000;
|
||||
font-weight: 600;
|
||||
line-height: 20px;
|
||||
flex: 1 1 auto;
|
||||
min-width: 20px;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.list__info {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
|
||||
|
||||
.create_time {
|
||||
color: rgba(0, 0, 0, .4);
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
declare const _default: import("react").ComponentType<any>;
|
||||
export default _default;
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
exports.default = OakComponent({
|
||||
entity: 'message',
|
||||
isList: false,
|
||||
formData: function (_a) {
|
||||
var data = _a.data;
|
||||
return {};
|
||||
},
|
||||
actions: ['visit'],
|
||||
methods: {
|
||||
tapAction: function (action) {
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
var id;
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
id = this.props.oakId;
|
||||
switch (action) {
|
||||
case 'visit': {
|
||||
this.execute('visit', false);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return [2 /*return*/];
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'message', false, {}, {
|
||||
tapAction: (action: string) => void;
|
||||
}>): JSX.Element[] | null;
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var antd_1 = require("antd");
|
||||
function Render(props) {
|
||||
var data = props.data, methods = props.methods;
|
||||
var t = methods.t, tapAction = methods.tapAction;
|
||||
var oakLegalActions = data.oakLegalActions;
|
||||
return oakLegalActions && (oakLegalActions === null || oakLegalActions === void 0 ? void 0 : oakLegalActions.length) > 0
|
||||
? oakLegalActions.map(function (ele) {
|
||||
return ((0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "link", onClick: function (event) {
|
||||
var modal = antd_1.Modal.confirm({
|
||||
title: "\u786E\u8BA4\u8BE5\u6D88\u606F\u6807\u4E3A\u5DF2\u8BFB\u5417\uFF1F",
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
onOk: function (e) {
|
||||
tapAction(ele);
|
||||
modal.destroy();
|
||||
},
|
||||
onCancel: function (e) {
|
||||
modal.destroy();
|
||||
},
|
||||
});
|
||||
} }, { children: "\u6807\u4E3A\u5DF2\u8BFB" })));
|
||||
})
|
||||
: null;
|
||||
}
|
||||
exports.default = Render;
|
||||
|
|
@ -1 +1 @@
|
|||
<l-message />
|
||||
<l-message id="#oak-message" />
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { MessageProps } from 'oak-frontend-base/lib/types/Message';
|
||||
export default function render(props: {
|
||||
data: {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { AvatarSize } from 'antd/es/avatar/SizeContext';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'token', false, {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'token', false, {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
declare const _default: import("react").ComponentType<any>;
|
||||
export default _default;
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
exports.default = OakComponent({
|
||||
isList: false,
|
||||
lifetimes: {
|
||||
attached: function () {
|
||||
this.getMessageCount();
|
||||
},
|
||||
},
|
||||
data: {
|
||||
count: undefined,
|
||||
},
|
||||
methods: {
|
||||
goMessageList: function () {
|
||||
this.navigateTo({
|
||||
url: '/message/list',
|
||||
});
|
||||
},
|
||||
getMessageCount: function () {
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
var userId, application, systemId, result;
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
userId = this.features.token.getUserId(true);
|
||||
application = this.features.application.getApplication();
|
||||
systemId = application.systemId;
|
||||
if (!userId) return [3 /*break*/, 2];
|
||||
return [4 /*yield*/, this.features.cache.count('message', {
|
||||
data: {
|
||||
id: 1,
|
||||
},
|
||||
filter: {
|
||||
userId: userId,
|
||||
systemId: systemId,
|
||||
visitState: 'unvisited',
|
||||
},
|
||||
})];
|
||||
case 1:
|
||||
result = _a.sent();
|
||||
this.setState({
|
||||
count: result,
|
||||
});
|
||||
_a.label = 2;
|
||||
case 2: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
.icon {
|
||||
font-size: 20px;
|
||||
color: var(--oak-color-primary);
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {
|
||||
count?: number;
|
||||
}, {
|
||||
goMessageList: () => void;
|
||||
}>): JSX.Element;
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var antd_mobile_1 = require("antd-mobile");
|
||||
var icons_1 = require("@ant-design/icons");
|
||||
var mobile_module_less_1 = tslib_1.__importDefault(require("./mobile.module.less"));
|
||||
function Render(props) {
|
||||
var data = props.data, methods = props.methods;
|
||||
var count = data.count;
|
||||
var goMessageList = methods.goMessageList;
|
||||
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_mobile_1.Badge, tslib_1.__assign({ content: count || '' }, { children: (0, jsx_runtime_1.jsx)(icons_1.BellOutlined, { className: mobile_module_less_1.default.icon, onClick: function () {
|
||||
goMessageList();
|
||||
} }) })) }));
|
||||
}
|
||||
exports.default = Render;
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
.btn {
|
||||
padding-inline-start: 5px;
|
||||
padding-inline-end: 5px;
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {
|
||||
count?: number;
|
||||
}, {
|
||||
goMessageList: () => void;
|
||||
}>): JSX.Element;
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var react_1 = require("react");
|
||||
var antd_1 = require("antd");
|
||||
var icons_1 = require("@ant-design/icons");
|
||||
var drawerList_1 = tslib_1.__importDefault(require("../../../pages/message/drawerList"));
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
function Render(props) {
|
||||
var data = props.data;
|
||||
var count = data.count;
|
||||
var _a = tslib_1.__read((0, react_1.useState)(false), 2), open = _a[0], setOpen = _a[1];
|
||||
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(antd_1.Badge, tslib_1.__assign({ count: count }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, { className: web_module_less_1.default.btn, type: "text", shape: "circle", icon: (0, jsx_runtime_1.jsx)(icons_1.BellOutlined, {}), onClick: function () {
|
||||
setOpen(true);
|
||||
} }) })), (0, jsx_runtime_1.jsx)(drawerList_1.default, { open: open, onClose: function () {
|
||||
setOpen(false);
|
||||
} })] }));
|
||||
}
|
||||
exports.default = Render;
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'userEntityGrant', true, {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { String, Text } from 'oak-domain/lib/types/DataType';
|
||||
import { String, Text, Int } from 'oak-domain/lib/types/DataType';
|
||||
import { EntityShape } from 'oak-domain/lib/types/Entity';
|
||||
export declare type WechatPublicConfig = {
|
||||
type: 'wechatPublic';
|
||||
|
|
@ -11,4 +11,5 @@ export interface Schema extends EntityShape {
|
|||
name: String<32>;
|
||||
description: Text;
|
||||
config: WechatPublicConfig;
|
||||
offset: Int<4>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ var locale = {
|
|||
entityId: '对象Id',
|
||||
description: '描述',
|
||||
config: '配置',
|
||||
offset: '已同步素材位置',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,4 +10,5 @@ export declare class Config<ED extends EntityDict, Cxt extends BackendRuntimeCon
|
|||
private cache;
|
||||
constructor(cache: Cache<ED, Cxt, FrontCxt, AD & CommonAspectDict<ED, Cxt>>);
|
||||
updateConfig(entity: 'platform' | 'system', entityId: string, config: ConfigDef): Promise<void>;
|
||||
updateApplicationConfig(entity: 'application', entityId: string, config: EntityDict['application']['Schema']['config']): Promise<void>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,24 @@ var Config = /** @class */ (function (_super) {
|
|||
case 0: return [4 /*yield*/, this.cache.exec('updateConfig', {
|
||||
entity: entity,
|
||||
entityId: entityId,
|
||||
config: config
|
||||
config: config,
|
||||
})];
|
||||
case 1:
|
||||
_a.sent();
|
||||
this.publish();
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
Config.prototype.updateApplicationConfig = function (entity, entityId, config) {
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, this.cache.exec('updateApplicationConfig', {
|
||||
entity: entity,
|
||||
entityId: entityId,
|
||||
config: config,
|
||||
})];
|
||||
case 1:
|
||||
_a.sent();
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ export declare type OpSchema = EntityShape & {
|
|||
author: String<32>;
|
||||
abstract?: Text | null;
|
||||
content?: Text | null;
|
||||
url?: Text | null;
|
||||
sign: String<32>;
|
||||
iState?: IState | null;
|
||||
};
|
||||
|
|
@ -23,6 +24,7 @@ export declare type Schema = EntityShape & {
|
|||
author: String<32>;
|
||||
abstract?: Text | null;
|
||||
content?: Text | null;
|
||||
url?: Text | null;
|
||||
sign: String<32>;
|
||||
iState?: IState | null;
|
||||
extraFile$entity?: Array<ExtraFile.Schema>;
|
||||
|
|
@ -40,6 +42,7 @@ declare type AttrFilter = {
|
|||
author: Q_StringValue;
|
||||
abstract: Q_StringValue;
|
||||
content: Q_StringValue;
|
||||
url: Q_StringValue;
|
||||
sign: Q_StringValue;
|
||||
iState: Q_EnumValue<IState>;
|
||||
};
|
||||
|
|
@ -57,6 +60,7 @@ export declare type Projection = {
|
|||
author?: number;
|
||||
abstract?: number;
|
||||
content?: number;
|
||||
url?: number;
|
||||
sign?: number;
|
||||
iState?: number;
|
||||
extraFile$entity?: ExtraFile.Selection & {
|
||||
|
|
@ -76,6 +80,7 @@ export declare type ExportProjection = {
|
|||
author?: string;
|
||||
abstract?: string;
|
||||
content?: string;
|
||||
url?: string;
|
||||
sign?: string;
|
||||
iState?: string;
|
||||
extraFile$entity?: ExtraFile.Exportation & {
|
||||
|
|
@ -105,6 +110,8 @@ export declare type SortAttr = {
|
|||
abstract: number;
|
||||
} | {
|
||||
content: number;
|
||||
} | {
|
||||
url: number;
|
||||
} | {
|
||||
sign: number;
|
||||
} | {
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@ exports.desc = {
|
|||
content: {
|
||||
type: "text"
|
||||
},
|
||||
url: {
|
||||
type: "text"
|
||||
},
|
||||
sign: {
|
||||
type: "varchar",
|
||||
params: {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{ "attr": { "title": "标题", "author": "作者", "abstract": "简介", "content": "正文", "files": "封面图", "iState": "状态", "entity": "关联对象", "entityId": "关联对象id", "sign": "唯一标志" }, "action": { "online": "上架", "offline": "下架", "disabled": "禁用" }, "v": { "iState": { "online": "已上架", "offline": "已下架", "disabled": "已禁用" } } }
|
||||
{ "attr": { "title": "标题", "author": "作者", "abstract": "简介", "content": "正文", "files": "封面图", "iState": "状态", "url": "外部链接", "entity": "关联对象", "entityId": "关联对象id", "sign": "唯一标志" }, "action": { "online": "上架", "offline": "下架", "disabled": "禁用" }, "v": { "iState": { "online": "已上架", "offline": "已下架", "disabled": "已禁用" } } }
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import { EntityDef as Mobile } from "./Mobile/Schema";
|
|||
import { EntityDef as Platform } from "./Platform/Schema";
|
||||
import { EntityDef as UserRole } from "./UserRole/Schema";
|
||||
import { EntityDef as Role } from "./Role/Schema";
|
||||
import { EntityDef as Subscription } from "./Subscription/Schema";
|
||||
import { EntityDef as System } from "./System/Schema";
|
||||
import { EntityDef as Token } from "./Token/Schema";
|
||||
import { EntityDef as UserEntityGrant } from "./UserEntityGrant/Schema";
|
||||
|
|
@ -45,6 +46,7 @@ export declare type EntityDict = {
|
|||
platform: Platform;
|
||||
userRole: UserRole;
|
||||
role: Role;
|
||||
subscription: Subscription;
|
||||
system: System;
|
||||
token: Token;
|
||||
userEntityGrant: UserEntityGrant;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction a
|
|||
import { Action, ParticularAction, IState } from "./Action";
|
||||
import * as Message from "../Message/Schema";
|
||||
export declare type OpSchema = EntityShape & {
|
||||
channel: 'public' | 'jPush' | 'jim' | 'mp' | 'gsm';
|
||||
channel: 'wechat' | 'jPush' | 'jim' | 'mp' | 'sms';
|
||||
data: Object;
|
||||
messageId: ForeignKey<"message">;
|
||||
data1: Object;
|
||||
|
|
@ -15,7 +15,7 @@ export declare type OpSchema = EntityShape & {
|
|||
};
|
||||
export declare type OpAttr = keyof OpSchema;
|
||||
export declare type Schema = EntityShape & {
|
||||
channel: 'public' | 'jPush' | 'jim' | 'mp' | 'gsm';
|
||||
channel: 'wechat' | 'jPush' | 'jim' | 'mp' | 'sms';
|
||||
data: Object;
|
||||
messageId: ForeignKey<"message">;
|
||||
data1: Object;
|
||||
|
|
@ -30,7 +30,7 @@ declare type AttrFilter = {
|
|||
$$createAt$$: Q_DateValue;
|
||||
$$seq$$: Q_StringValue;
|
||||
$$updateAt$$: Q_DateValue;
|
||||
channel: Q_EnumValue<'public' | 'jPush' | 'jim' | 'mp' | 'gsm'>;
|
||||
channel: Q_EnumValue<'wechat' | 'jPush' | 'jim' | 'mp' | 'sms'>;
|
||||
data: Object;
|
||||
messageId: Q_StringValue | SubQuery.MessageIdSubQuery;
|
||||
message: Message.Filter;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{ "attr": { "channel": "消息渠道", "data": "消息数据", "message": "消息", "data1": "数据1", "data2": "数据2", "iState": "状态" }, "action": { "succeed": "成功", "fail": "失败" }, "v": { "iState": { "sending": "发送中", "success": "发送成功", "failure": "发送失败" }, "channel": { "public": "公众号", "jPush": "极光推送", "jim": "极光消息", "mp": "小程序", "gsm": "短信" } } }
|
||||
{ "attr": { "channel": "消息渠道", "data": "消息数据", "message": "消息", "data1": "数据1", "data2": "数据2", "iState": "状态" }, "action": { "succeed": "成功", "fail": "失败" }, "v": { "iState": { "sending": "发送中", "success": "发送成功", "failure": "发送失败" }, "channel": { "wechat": "公众号", "jPush": "极光推送", "jim": "极光消息", "mp": "小程序", "sms": "短信" } } }
|
||||
|
|
|
|||
|
|
@ -21,12 +21,13 @@ var Storage_17 = require("./Mobile/Storage");
|
|||
var Storage_18 = require("./Platform/Storage");
|
||||
var Storage_19 = require("./UserRole/Storage");
|
||||
var Storage_20 = require("./Role/Storage");
|
||||
var Storage_21 = require("./System/Storage");
|
||||
var Storage_22 = require("./Token/Storage");
|
||||
var Storage_23 = require("./UserEntityGrant/Storage");
|
||||
var Storage_24 = require("./UserSystem/Storage");
|
||||
var Storage_25 = require("./WechatQrCode/Storage");
|
||||
var Storage_26 = require("./WechatUser/Storage");
|
||||
var Storage_21 = require("./Subscription/Storage");
|
||||
var Storage_22 = require("./System/Storage");
|
||||
var Storage_23 = require("./Token/Storage");
|
||||
var Storage_24 = require("./UserEntityGrant/Storage");
|
||||
var Storage_25 = require("./UserSystem/Storage");
|
||||
var Storage_26 = require("./WechatQrCode/Storage");
|
||||
var Storage_27 = require("./WechatUser/Storage");
|
||||
exports.storageSchema = {
|
||||
modi: Storage_1.desc,
|
||||
modiEntity: Storage_2.desc,
|
||||
|
|
@ -48,10 +49,11 @@ exports.storageSchema = {
|
|||
platform: Storage_18.desc,
|
||||
userRole: Storage_19.desc,
|
||||
role: Storage_20.desc,
|
||||
system: Storage_21.desc,
|
||||
token: Storage_22.desc,
|
||||
userEntityGrant: Storage_23.desc,
|
||||
userSystem: Storage_24.desc,
|
||||
wechatQrCode: Storage_25.desc,
|
||||
wechatUser: Storage_26.desc
|
||||
subscription: Storage_21.desc,
|
||||
system: Storage_22.desc,
|
||||
token: Storage_23.desc,
|
||||
userEntityGrant: Storage_24.desc,
|
||||
userSystem: Storage_25.desc,
|
||||
wechatQrCode: Storage_26.desc,
|
||||
wechatUser: Storage_27.desc
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,129 @@
|
|||
import { String, Text } from "oak-domain/lib/types/DataType";
|
||||
import { Q_DateValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey } from "oak-domain/lib/types/Demand";
|
||||
import { OneOf } from "oak-domain/lib/types/Polyfill";
|
||||
import * as SubQuery from "../_SubQuery";
|
||||
import { FormCreateData, FormUpdateData, Operation as OakOperation, MakeAction as OakMakeAction, EntityShape } from "oak-domain/lib/types/Entity";
|
||||
import { GenericAction } from "oak-domain/lib/actions/action";
|
||||
export declare type WechatPublicConfig = {
|
||||
type: 'wechatPublic';
|
||||
appId: string;
|
||||
appSecret: string;
|
||||
};
|
||||
export declare type OpSchema = EntityShape & {
|
||||
entity: String<32>;
|
||||
entityId: String<64>;
|
||||
name: String<32>;
|
||||
description: Text;
|
||||
config: WechatPublicConfig;
|
||||
};
|
||||
export declare type OpAttr = keyof OpSchema;
|
||||
export declare type Schema = EntityShape & {
|
||||
entity: String<32>;
|
||||
entityId: String<64>;
|
||||
name: String<32>;
|
||||
description: Text;
|
||||
config: WechatPublicConfig;
|
||||
} & {
|
||||
[A in ExpressionKey]?: any;
|
||||
};
|
||||
declare type AttrFilter = {
|
||||
id: Q_StringValue | SubQuery.SubscriptionIdSubQuery;
|
||||
$$createAt$$: Q_DateValue;
|
||||
$$seq$$: Q_StringValue;
|
||||
$$updateAt$$: Q_DateValue;
|
||||
entity: Q_StringValue;
|
||||
entityId: Q_StringValue;
|
||||
name: Q_StringValue;
|
||||
description: Q_StringValue;
|
||||
config: Q_EnumValue<WechatPublicConfig>;
|
||||
};
|
||||
export declare type Filter = MakeFilter<AttrFilter & ExprOp<OpAttr | string>>;
|
||||
export declare type Projection = {
|
||||
"#id"?: NodeId;
|
||||
[k: string]: any;
|
||||
id: number;
|
||||
$$createAt$$?: number;
|
||||
$$updateAt$$?: number;
|
||||
$$seq$$?: number;
|
||||
entity?: number;
|
||||
entityId?: number;
|
||||
name?: number;
|
||||
description?: number;
|
||||
config?: number;
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
export declare type ExportProjection = {
|
||||
"#id"?: NodeId;
|
||||
[k: string]: any;
|
||||
id?: string;
|
||||
$$createAt$$?: string;
|
||||
$$updateAt$$?: string;
|
||||
$$seq$$?: string;
|
||||
entity?: string;
|
||||
entityId?: string;
|
||||
name?: string;
|
||||
description?: string;
|
||||
config?: string;
|
||||
} & Partial<ExprOp<OpAttr | string>>;
|
||||
declare type SubscriptionIdProjection = OneOf<{
|
||||
id: number;
|
||||
}>;
|
||||
export declare type SortAttr = {
|
||||
id: number;
|
||||
} | {
|
||||
$$createAt$$: number;
|
||||
} | {
|
||||
$$seq$$: number;
|
||||
} | {
|
||||
$$updateAt$$: number;
|
||||
} | {
|
||||
entity: number;
|
||||
} | {
|
||||
entityId: number;
|
||||
} | {
|
||||
name: number;
|
||||
} | {
|
||||
description: number;
|
||||
} | {
|
||||
config: number;
|
||||
} | {
|
||||
[k: string]: any;
|
||||
} | OneOf<ExprOp<OpAttr | string>>;
|
||||
export declare type SortNode = {
|
||||
$attr: SortAttr;
|
||||
$direction?: "asc" | "desc";
|
||||
};
|
||||
export declare type Sorter = SortNode[];
|
||||
export declare type SelectOperation<P extends Object = Projection> = Omit<OakOperation<"select", P, Filter, Sorter>, "id">;
|
||||
export declare type Selection<P extends Object = Projection> = Omit<SelectOperation<P>, "action">;
|
||||
export declare type Exportation = OakOperation<"export", ExportProjection, Filter, Sorter>;
|
||||
export declare type CreateOperationData = FormCreateData<Omit<OpSchema, "entity" | "entityId">> & ({
|
||||
entity?: string;
|
||||
entityId?: string;
|
||||
[K: string]: any;
|
||||
});
|
||||
export declare type CreateSingleOperation = OakOperation<"create", CreateOperationData>;
|
||||
export declare type CreateMultipleOperation = OakOperation<"create", Array<CreateOperationData>>;
|
||||
export declare type CreateOperation = CreateSingleOperation | CreateMultipleOperation;
|
||||
export declare type UpdateOperationData = FormUpdateData<OpSchema> & {
|
||||
[k: string]: any;
|
||||
};
|
||||
export declare type UpdateOperation = OakOperation<"update" | string, UpdateOperationData, Filter, Sorter>;
|
||||
export declare type RemoveOperationData = {};
|
||||
export declare type RemoveOperation = OakOperation<"remove", RemoveOperationData, Filter, Sorter>;
|
||||
export declare type Operation = CreateOperation | UpdateOperation | RemoveOperation | SelectOperation;
|
||||
export declare type SubscriptionIdSubQuery = Selection<SubscriptionIdProjection>;
|
||||
export declare type NativeAttr = OpAttr;
|
||||
export declare type FullAttr = NativeAttr;
|
||||
export declare type EntityDef = {
|
||||
Schema: Schema;
|
||||
OpSchema: OpSchema;
|
||||
Action: OakMakeAction<GenericAction> | string;
|
||||
Selection: Selection;
|
||||
Operation: Operation;
|
||||
Create: CreateOperation;
|
||||
Update: UpdateOperation;
|
||||
Remove: RemoveOperation;
|
||||
CreateSingle: CreateSingleOperation;
|
||||
CreateMulti: CreateMultipleOperation;
|
||||
};
|
||||
export {};
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
import { StorageDesc } from "oak-domain/lib/types/Storage";
|
||||
import { OpSchema } from "./Schema";
|
||||
export declare const desc: StorageDesc<OpSchema>;
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.desc = void 0;
|
||||
var action_1 = require("oak-domain/lib/actions/action");
|
||||
exports.desc = {
|
||||
attributes: {
|
||||
entity: {
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 32
|
||||
}
|
||||
},
|
||||
entityId: {
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 64
|
||||
}
|
||||
},
|
||||
name: {
|
||||
type: "varchar",
|
||||
params: {
|
||||
length: 32
|
||||
}
|
||||
},
|
||||
description: {
|
||||
type: "text"
|
||||
},
|
||||
config: {
|
||||
type: "object"
|
||||
}
|
||||
},
|
||||
actionType: "crud",
|
||||
actions: action_1.genericActions,
|
||||
indexes: [
|
||||
//索引
|
||||
{
|
||||
name: 'index_name',
|
||||
attributes: [
|
||||
{
|
||||
name: 'name'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'index_entity',
|
||||
attributes: [
|
||||
{
|
||||
name: 'entity'
|
||||
},
|
||||
{
|
||||
name: 'entityId'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
@ -0,0 +1 @@
|
|||
{ "attr": { "name": "名称", "entity": "对象名称", "entityId": "对象Id", "description": "描述", "config": "配置" } }
|
||||
|
|
@ -18,6 +18,7 @@ import * as Mobile from "./Mobile/Schema";
|
|||
import * as Platform from "./Platform/Schema";
|
||||
import * as UserRole from "./UserRole/Schema";
|
||||
import * as Role from "./Role/Schema";
|
||||
import * as Subscription from "./Subscription/Schema";
|
||||
import * as System from "./System/Schema";
|
||||
import * as Token from "./Token/Schema";
|
||||
import * as UserEntityGrant from "./UserEntityGrant/Schema";
|
||||
|
|
@ -164,6 +165,11 @@ export declare type RoleIdSubQuery = {
|
|||
entity: "role";
|
||||
}) | any;
|
||||
};
|
||||
export declare type SubscriptionIdSubQuery = {
|
||||
[K in "$in" | "$nin"]?: (Subscription.SubscriptionIdSubQuery & {
|
||||
entity: "subscription";
|
||||
}) | any;
|
||||
};
|
||||
export declare type SystemIdSubQuery = {
|
||||
[K in "$in" | "$nin"]?: (Application.SystemIdSubQuery & {
|
||||
entity: "application";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'address', true, {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'address', false, {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { AppType, WebConfig, WechatPublicConfig, WechatMpConfig } from '../../../../general-app-domain/Application/Schema';
|
||||
import { EntityDict } from '../../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { WebConfig, WechatPublicConfig, WechatMpConfig } from '../../../general-app-domain/Application/Schema';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ function Render(props) {
|
|||
{
|
||||
label: '应用概览',
|
||||
key: 'detail',
|
||||
children: ((0, jsx_runtime_1.jsxs)(antd_1.Descriptions, tslib_1.__assign({ column: 1, bordered: true }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Descriptions.Item, tslib_1.__assign({ label: "id" }, { children: oakId })), (0, jsx_runtime_1.jsx)(antd_1.Descriptions.Item, tslib_1.__assign({ label: t('application:attr.name') }, { children: name })), (0, jsx_runtime_1.jsx)(antd_1.Descriptions.Item, tslib_1.__assign({ label: t('application:attr.description') }, { children: description })), (0, jsx_runtime_1.jsx)(antd_1.Descriptions.Item, tslib_1.__assign({ label: t('application:attr.type') }, { children: t("application:v.type.".concat(type)) })), (0, jsx_runtime_1.jsx)(antd_1.Descriptions.Item, tslib_1.__assign({ label: t('application:attr.system') +
|
||||
children: ((0, jsx_runtime_1.jsxs)(antd_1.Descriptions, tslib_1.__assign({ column: 1, bordered: true }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Descriptions.Item, tslib_1.__assign({ label: "id" }, { children: (0, jsx_runtime_1.jsx)(antd_1.Typography.Paragraph, tslib_1.__assign({ copyable: true }, { children: oakId })) })), (0, jsx_runtime_1.jsx)(antd_1.Descriptions.Item, tslib_1.__assign({ label: t('application:attr.name') }, { children: name })), (0, jsx_runtime_1.jsx)(antd_1.Descriptions.Item, tslib_1.__assign({ label: t('application:attr.description') }, { children: description })), (0, jsx_runtime_1.jsx)(antd_1.Descriptions.Item, tslib_1.__assign({ label: t('application:attr.type') }, { children: t("application:v.type.".concat(type)) })), (0, jsx_runtime_1.jsx)(antd_1.Descriptions.Item, tslib_1.__assign({ label: t('application:attr.system') +
|
||||
t('system:attr.name') }, { children: system === null || system === void 0 ? void 0 : system.name }))] }))),
|
||||
},
|
||||
] }) })) })) })));
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'application', true, {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ exports.default = OakComponent({
|
|||
description: 1,
|
||||
type: 1,
|
||||
systemId: 1,
|
||||
style: 1,
|
||||
},
|
||||
formData: function (_a) {
|
||||
var data = _a.data;
|
||||
|
|
@ -22,10 +23,10 @@ exports.default = OakComponent({
|
|||
value: 'web',
|
||||
},
|
||||
{
|
||||
value: "wechatMp",
|
||||
value: 'wechatMp',
|
||||
},
|
||||
{
|
||||
value: "wechatPublic",
|
||||
value: 'wechatPublic',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'application', false, {
|
||||
name: string;
|
||||
description: string;
|
||||
super: string;
|
||||
variant: 'inline' | 'alone' | 'dialog';
|
||||
showBack: boolean;
|
||||
type: EntityDict['application']['Schema']['type'];
|
||||
|
|
@ -14,6 +12,7 @@ export default function Render(props: WebComponentProps<EntityDict, 'application
|
|||
}>;
|
||||
systemId: string;
|
||||
oakId: string;
|
||||
style: EntityDict['system']['Schema']['style'];
|
||||
}, {
|
||||
confirm: () => void;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ var tslib_1 = require("tslib");
|
|||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var antd_1 = require("antd");
|
||||
var pageHeader_1 = tslib_1.__importDefault(require("../../../components/common/pageHeader"));
|
||||
var style_1 = tslib_1.__importDefault(require("../../../components/config/style"));
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
function Render(props) {
|
||||
var _a = props.data, name = _a.name, description = _a.description, type = _a.type, typeArr = _a.typeArr, variant = _a.variant, _b = _a.showBack, showBack = _b === void 0 ? true : _b, systemId = _a.systemId, oakId = _a.oakId;
|
||||
var _a = props.data, name = _a.name, description = _a.description, type = _a.type, typeArr = _a.typeArr, variant = _a.variant, _b = _a.showBack, showBack = _b === void 0 ? true : _b, systemId = _a.systemId, oakId = _a.oakId, style = _a.style;
|
||||
var _c = props.methods, t = _c.t, update = _c.update, navigateBack = _c.navigateBack, confirm = _c.confirm;
|
||||
return ((0, jsx_runtime_1.jsx)(Container, tslib_1.__assign({ variant: variant, showBack: showBack }, { children: (0, jsx_runtime_1.jsx)(antd_1.Row, { children: (0, jsx_runtime_1.jsx)(antd_1.Col, tslib_1.__assign({ xs: 24, sm: 12 }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Form, tslib_1.__assign({ colon: true, labelCol: { span: 6 }, wrapperCol: { span: 16 } }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "\u540D\u79F0", requiredMark: true, name: "name", rules: [
|
||||
{
|
||||
|
|
@ -31,7 +32,11 @@ function Render(props) {
|
|||
update({
|
||||
type: value,
|
||||
});
|
||||
} }) }) })), (0, jsx_runtime_1.jsx)(Action, tslib_1.__assign({ variant: variant }, { children: (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ wrapperCol: { offset: 6 } }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Space, { children: [(0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "primary", onClick: function () {
|
||||
} }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "\u6837\u5F0F", requiredMark: true, name: "style" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(style_1.default, { onChange: function (value) {
|
||||
update({
|
||||
style: value,
|
||||
});
|
||||
}, value: style }) }) })), (0, jsx_runtime_1.jsx)(Action, tslib_1.__assign({ variant: variant }, { children: (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ wrapperCol: { offset: 6 } }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Space, { children: [(0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "primary", onClick: function () {
|
||||
confirm();
|
||||
} }, { children: "\u786E\u5B9A" })), (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ onClick: function () {
|
||||
navigateBack();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from './../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function render(props: WebComponentProps<EntityDict, 'article', false, {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
export default function render(props: WebComponentProps<EntityDict, 'article', true, {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'article', false, {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import '@wangeditor/editor/dist/css/style.css';
|
||||
import { EntityDict } from './../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@ exports.default = OakComponent({
|
|||
projection: {
|
||||
id: 1,
|
||||
systemId: 1,
|
||||
system: {
|
||||
id: 1,
|
||||
name: 1,
|
||||
},
|
||||
url: 1,
|
||||
apiPath: 1,
|
||||
port: 1,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'domain', false, {
|
||||
|
|
@ -9,6 +8,7 @@ export default function Render(props: WebComponentProps<EntityDict, 'domain', fa
|
|||
port: string;
|
||||
protocol: EntityDict['domain']['Schema']['protocol'];
|
||||
tabValue: 'detail';
|
||||
system: EntityDict['system']['Schema'];
|
||||
}, {
|
||||
onTabClick: (key: string) => void;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ var antd_1 = require("antd");
|
|||
var pageHeader_1 = tslib_1.__importDefault(require("../../../components/common/pageHeader"));
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
function Render(props) {
|
||||
var _a = props.data, oakId = _a.oakId, url = _a.url, tabValue = _a.tabValue;
|
||||
var _a = props.data, oakId = _a.oakId, url = _a.url, tabValue = _a.tabValue, system = _a.system, apiPath = _a.apiPath, protocol = _a.protocol, port = _a.port;
|
||||
var _b = props.methods, t = _b.t, navigateBack = _b.navigateBack, onTabClick = _b.onTabClick;
|
||||
return ((0, jsx_runtime_1.jsx)(pageHeader_1.default, tslib_1.__assign({ showBack: true, title: "\u57DF\u540D\u6982\u89C8" }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: (0, jsx_runtime_1.jsx)(antd_1.Card, tslib_1.__assign({ title: url, bordered: false }, { children: (0, jsx_runtime_1.jsx)(antd_1.Tabs, { activeKey: tabValue, onTabClick: function (key) {
|
||||
onTabClick(key);
|
||||
|
|
@ -14,7 +14,8 @@ function Render(props) {
|
|||
{
|
||||
label: '域名概览',
|
||||
key: 'detail',
|
||||
children: (0, jsx_runtime_1.jsx)("div", { children: "\u8BE6\u60C5" }),
|
||||
children: ((0, jsx_runtime_1.jsxs)(antd_1.Descriptions, tslib_1.__assign({ column: 1, bordered: true }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Descriptions.Item, tslib_1.__assign({ label: "id" }, { children: (0, jsx_runtime_1.jsx)(antd_1.Typography.Paragraph, tslib_1.__assign({ copyable: true }, { children: oakId })) })), (0, jsx_runtime_1.jsx)(antd_1.Descriptions.Item, tslib_1.__assign({ label: t('domain:attr.url') }, { children: url })), (0, jsx_runtime_1.jsx)(antd_1.Descriptions.Item, tslib_1.__assign({ label: t('domain:attr.apiPath') }, { children: apiPath })), (0, jsx_runtime_1.jsx)(antd_1.Descriptions.Item, tslib_1.__assign({ label: t('domain:attr.port') }, { children: port })), (0, jsx_runtime_1.jsx)(antd_1.Descriptions.Item, tslib_1.__assign({ label: t('domain:attr.protocol') }, { children: protocol })), (0, jsx_runtime_1.jsx)(antd_1.Descriptions.Item, tslib_1.__assign({ label: t('domain:attr.system') +
|
||||
t('system:attr.name') }, { children: system === null || system === void 0 ? void 0 : system.name }))] }))),
|
||||
},
|
||||
] }) })) })) })));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'system', true, {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,11 @@ function Render(props) {
|
|||
{
|
||||
dataIndex: 'url',
|
||||
title: '域名',
|
||||
render: function (value, record, index) {
|
||||
return ((0, jsx_runtime_1.jsx)(antd_1.Typography.Link, tslib_1.__assign({ onClick: function () {
|
||||
goDetail(record.id);
|
||||
} }, { children: value })));
|
||||
},
|
||||
},
|
||||
{
|
||||
dataIndex: 'apiPath',
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'domain', false, {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../general-app-domain';
|
||||
export default function render(props: WebComponentProps<EntityDict, 'token', false, {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
declare const _default: import("react").ComponentType<any>;
|
||||
export default _default;
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
exports.default = OakComponent({
|
||||
entity: 'message',
|
||||
projection: {
|
||||
id: 1,
|
||||
$$createAt$$: 1,
|
||||
type: 1,
|
||||
title: 1,
|
||||
content: 1,
|
||||
visitState: 1,
|
||||
userId: 1,
|
||||
user: {
|
||||
id: 1,
|
||||
name: 1,
|
||||
},
|
||||
params: 1,
|
||||
props: 1,
|
||||
},
|
||||
isList: false,
|
||||
formData: function (_a) {
|
||||
var message = _a.data;
|
||||
return message || {};
|
||||
},
|
||||
observers: {
|
||||
'visitState,userId': function (visitState, userId) {
|
||||
var userId2 = this.features.token.getUserId(true);
|
||||
if (userId === userId2) {
|
||||
if (visitState === 'unvisited') {
|
||||
this.execute('visit', false);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
goPage: function () {
|
||||
var params = this.state.params;
|
||||
var pathname = params === null || params === void 0 ? void 0 : params.pathname;
|
||||
var props = (params === null || params === void 0 ? void 0 : params.props) || {};
|
||||
var state = params === null || params === void 0 ? void 0 : params.state;
|
||||
if (!pathname) {
|
||||
return;
|
||||
}
|
||||
this.redirectTo(tslib_1.__assign({ url: pathname }, props), state);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"navigationBarTitleText": "消息详情",
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
/** index.wxss **/
|
||||
.container {
|
||||
background: var(--oak-bg-color-container);
|
||||
box-shadow: 0 2px 3px #0000001a;
|
||||
border-radius: 3px;
|
||||
padding: 30px 32px;
|
||||
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
|
||||
.title {
|
||||
font-family: "helvetica neue", PingFangSC-Light, arial, "hiragino sans gb", "microsoft yahei ui", "microsoft yahei", simsun, sans-serif;
|
||||
font-size: 20px;
|
||||
line-height: 36px;
|
||||
margin: 0px 0px 22px;
|
||||
}
|
||||
|
||||
.content {
|
||||
font-family: "helvetica neue", PingFangSC-Light, arial, "hiragino sans gb", "microsoft yahei ui", "microsoft yahei", simsun, sans-serif;
|
||||
font-size: 14px;
|
||||
color: rgb(51, 51, 51);
|
||||
line-height: 24px;
|
||||
margin: 6px 0px 0px;
|
||||
overflow-wrap: break-word;
|
||||
word-break: break-all;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'message', false, {
|
||||
title: string;
|
||||
content: string;
|
||||
id: string;
|
||||
$$createAt$$: number;
|
||||
type: string;
|
||||
visitState: EntityDict['message']['Schema']['visitState'];
|
||||
params: EntityDict['message']['Schema']['params'];
|
||||
}, {
|
||||
goPage: () => void;
|
||||
}>): JSX.Element;
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var antd_1 = require("antd");
|
||||
var mobile_module_less_1 = tslib_1.__importDefault(require("./mobile.module.less"));
|
||||
function Render(props) {
|
||||
var data = props.data, methods = props.methods;
|
||||
var title = data.title, content = data.content, params = data.params;
|
||||
var t = methods.t, goPage = methods.goPage;
|
||||
var pathname = params === null || params === void 0 ? void 0 : params.pathname;
|
||||
return ((0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: mobile_module_less_1.default.container }, { children: [(0, jsx_runtime_1.jsx)("h1", tslib_1.__assign({ className: mobile_module_less_1.default.title }, { children: title })), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: mobile_module_less_1.default.content }, { children: content })), pathname && ((0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ className: mobile_module_less_1.default.btn, block: true, type: "primary", onClick: function () {
|
||||
goPage();
|
||||
} }, { children: "\u524D\u5F80" })))] })));
|
||||
}
|
||||
exports.default = Render;
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
/** index.wxss **/
|
||||
.container {
|
||||
background: var(--oak-bg-color-container);
|
||||
box-shadow: 0 2px 3px #0000001a;
|
||||
border-radius: 3px;
|
||||
padding: 30px 32px;
|
||||
}
|
||||
|
||||
.warp {
|
||||
word-break: break-all;
|
||||
min-width: 320px;
|
||||
max-width: 600px;
|
||||
border: 1px solid rgb(246, 246, 246);
|
||||
background-color: rgb(247, 248, 250);
|
||||
margin: auto;
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.inner {
|
||||
background-color: rgb(255, 255, 255);
|
||||
padding: 30px;
|
||||
box-shadow: rgb(122 55 55 / 20%) 0px 1px 1px 0px;
|
||||
}
|
||||
|
||||
|
||||
.title {
|
||||
// font-family: "helvetica neue", PingFangSC-Light, arial, "hiragino sans gb", "microsoft yahei ui", "microsoft yahei", simsun, sans-serif;
|
||||
font-size: 20px;
|
||||
line-height: 36px;
|
||||
margin: 0px 0px 22px;
|
||||
}
|
||||
|
||||
.content {
|
||||
// font-family: "helvetica neue", PingFangSC-Light, arial, "hiragino sans gb", "microsoft yahei ui", "microsoft yahei", simsun, sans-serif;
|
||||
font-size: 14px;
|
||||
color: rgb(51, 51, 51);
|
||||
line-height: 24px;
|
||||
margin: 6px 0px 0px;
|
||||
overflow-wrap: break-word;
|
||||
word-break: break-all;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'message', false, {
|
||||
title: string;
|
||||
content: string;
|
||||
id: string;
|
||||
$$createAt$$: number;
|
||||
type: string;
|
||||
visitState: EntityDict['message']['Schema']['visitState'];
|
||||
params: EntityDict['message']['Schema']['params'];
|
||||
}, {
|
||||
goPage: () => void;
|
||||
}>): JSX.Element;
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var antd_1 = require("antd");
|
||||
var pageHeader_1 = tslib_1.__importDefault(require("../../../components/common/pageHeader"));
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
function Render(props) {
|
||||
var data = props.data, methods = props.methods;
|
||||
var title = data.title, content = data.content, params = data.params;
|
||||
var t = methods.t, goPage = methods.goPage;
|
||||
var pathname = params === null || params === void 0 ? void 0 : params.pathname;
|
||||
return ((0, jsx_runtime_1.jsx)(pageHeader_1.default, tslib_1.__assign({ title: "\u6D88\u606F\u8BE6\u60C5", showBack: true }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.warp }, { children: (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: web_module_less_1.default.inner }, { children: [(0, jsx_runtime_1.jsx)("h1", tslib_1.__assign({ className: web_module_less_1.default.title }, { children: title })), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.content }, { children: content })), pathname && ((0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ className: web_module_less_1.default.btn, block: true, type: "primary", onClick: function () {
|
||||
goPage();
|
||||
} }, { children: "\u524D\u5F80" })))] })) })) })) })));
|
||||
}
|
||||
exports.default = Render;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue