This commit is contained in:
parent
ff4817a938
commit
876e299996
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import './index.less';
|
||||
declare const Empty: () => JSX.Element;
|
||||
export default Empty;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import './index.less';
|
||||
declare const Empty: () => JSX.Element;
|
||||
export default Empty;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import './index.less';
|
||||
interface QrCodeProps {
|
||||
id?: string;
|
||||
|
|
|
|||
|
|
@ -1 +1,19 @@
|
|||
export default function render(this: any): JSX.Element;
|
||||
/// <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';
|
||||
declare type Config = WebConfig | WechatPublicConfig | WechatMpConfig;
|
||||
export default function render(props: WebComponentProps<EntityDict, 'user', false, {
|
||||
entity: string;
|
||||
name: string;
|
||||
currentConfig: Config;
|
||||
dirty: boolean;
|
||||
type: AppType;
|
||||
}, {
|
||||
resetConfig: () => void;
|
||||
updateConfig: () => void;
|
||||
setValue: (path: string, value: string) => void;
|
||||
removeItem: (path: string, index: number) => void;
|
||||
cleanKey: (path: string, key: string) => void;
|
||||
}>): JSX.Element;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -20,22 +20,21 @@ function AppView(props) {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
function render() {
|
||||
var _this = this;
|
||||
var _a = this.props, entity = _a.entity, name = _a.name, type = _a.type;
|
||||
var _b = this.state, currentConfig = _b.currentConfig, dirty = _b.dirty;
|
||||
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 _this.resetConfig(); }, style: {
|
||||
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;
|
||||
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 _this.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: [
|
||||
} }, { 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) {
|
||||
return _this.setValue(path, value);
|
||||
return setValue(path, value);
|
||||
}, removeItem: function (path, index) {
|
||||
return _this.removeItem(path, index);
|
||||
return removeItem(path, index);
|
||||
}, cleanKey: function (path, key) {
|
||||
return _this.cleanKey(path, key);
|
||||
return cleanKey(path, key);
|
||||
} })),
|
||||
},
|
||||
] }) }))] }));
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { WebConfig } from '../../../../general-app-domain/Application/Schema';
|
||||
export default function Web(props: {
|
||||
config: WebConfig;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { WechatMpConfig } from '../../../../general-app-domain/Application/Schema';
|
||||
export default function WechatMp(props: {
|
||||
config: WechatMpConfig;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { WechatPublicConfig } from '../../../../general-app-domain/Application/Schema';
|
||||
export default function WechatPublic(props: {
|
||||
config: WechatPublicConfig;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { Config } from '../../../../types/Config';
|
||||
export default function Account(props: {
|
||||
account: Required<Config>['Account'];
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { Config } from '../../../../types/Config';
|
||||
export default function Cos(props: {
|
||||
cos: Required<Config>['Cos'];
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { Config } from '../../../../types/Config';
|
||||
export default function Cos(props: {
|
||||
live: Required<Config>['Live'];
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { Config } from '../../../../types/Config';
|
||||
export default function Cos(props: {
|
||||
map: Required<Config>['Map'];
|
||||
|
|
|
|||
|
|
@ -1 +1,15 @@
|
|||
export default function render(this: any): JSX.Element;
|
||||
/// <reference types="react" />
|
||||
import { Config } from '../../../types/Config';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {
|
||||
entity: string;
|
||||
name: string;
|
||||
currentConfig: Config;
|
||||
dirty: boolean;
|
||||
}, {
|
||||
resetConfig: () => void;
|
||||
updateConfig: () => void;
|
||||
setValue: (path: string, value: string) => void;
|
||||
removeItem: (path: string, index: number) => void;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -8,44 +8,43 @@ var index_1 = tslib_1.__importDefault(require("./account/index"));
|
|||
var index_2 = tslib_1.__importDefault(require("./cos/index"));
|
||||
var index_3 = tslib_1.__importDefault(require("./map/index"));
|
||||
var index_4 = tslib_1.__importDefault(require("./live/index"));
|
||||
function render() {
|
||||
var _this = this;
|
||||
var _a = this.props, entity = _a.entity, name = _a.name;
|
||||
var _b = this.state, currentConfig = _b.currentConfig, dirty = _b.dirty;
|
||||
var _c = currentConfig, account = _c.Account, cos = _c.Cos, map = _c.Map, live = _c.Live;
|
||||
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 _this.resetConfig(); }, style: {
|
||||
function Render(props) {
|
||||
var _a = props.data, entity = _a.entity, name = _a.name, currentConfig = _a.currentConfig, dirty = _a.dirty;
|
||||
var _b = props.methods, resetConfig = _b.resetConfig, updateConfig = _b.updateConfig, setValue = _b.setValue, removeItem = _b.removeItem;
|
||||
var account = currentConfig.Account, cos = currentConfig.Cos, map = currentConfig.Map, live = currentConfig.Live;
|
||||
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 _this.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: [
|
||||
} }, { 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)(index_1.default, { account: account || {}, setValue: function (path, value) {
|
||||
return _this.setValue("Account.".concat(path), value);
|
||||
return setValue("Account.".concat(path), value);
|
||||
}, removeItem: function (path, index) {
|
||||
return _this.removeItem("Account.".concat(path), index);
|
||||
return removeItem("Account.".concat(path), index);
|
||||
} })),
|
||||
},
|
||||
{
|
||||
key: '云存储设置',
|
||||
label: '云存储设置',
|
||||
children: ((0, jsx_runtime_1.jsx)(index_2.default, { cos: cos || {}, setValue: function (path, value) {
|
||||
return _this.setValue("Cos.".concat(path), value);
|
||||
return setValue("Cos.".concat(path), value);
|
||||
} })),
|
||||
},
|
||||
{
|
||||
key: '直播api设置',
|
||||
label: '直播api设置',
|
||||
children: ((0, jsx_runtime_1.jsx)(index_4.default, { live: live || {}, setValue: function (path, value) {
|
||||
return _this.setValue("Map.".concat(path), value);
|
||||
return setValue("Map.".concat(path), value);
|
||||
} })),
|
||||
},
|
||||
{
|
||||
key: '地图api设置',
|
||||
label: '地图api设置',
|
||||
children: ((0, jsx_runtime_1.jsx)(index_3.default, { map: map || {}, setValue: function (path, value) {
|
||||
return _this.setValue("Map.".concat(path), value);
|
||||
return setValue("Map.".concat(path), value);
|
||||
} })),
|
||||
},
|
||||
] }) }))] }));
|
||||
}
|
||||
exports.default = render;
|
||||
exports.default = Render;
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
/// <reference types="react" />
|
||||
export default function render(): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { UploadFile } from 'antd';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <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,3 +1,4 @@
|
|||
/// <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,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'userEntityGrant', true, {
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ var DEV_CONFIG_1 = require("./DEV-CONFIG");
|
|||
exports.systems = [
|
||||
{
|
||||
id: DEV_CONFIG_1.DEV_SYSTEM_ID,
|
||||
name: '',
|
||||
description: '',
|
||||
name: '测试系统',
|
||||
description: '测试系统',
|
||||
config: {
|
||||
App: {},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <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,3 +1,4 @@
|
|||
/// <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,6 +1,5 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
exports.default = OakComponent({
|
||||
isList: false,
|
||||
entity: 'application',
|
||||
|
|
@ -12,11 +11,7 @@ exports.default = OakComponent({
|
|||
},
|
||||
formData: function (_a) {
|
||||
var data = _a.data;
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
return tslib_1.__generator(this, function (_b) {
|
||||
return [2 /*return*/, data || {}];
|
||||
});
|
||||
});
|
||||
return data || {};
|
||||
},
|
||||
methods: {},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1 +1,13 @@
|
|||
export default function render(this: any): JSX.Element;
|
||||
/// <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';
|
||||
declare type Config = WebConfig | WechatPublicConfig | WechatMpConfig;
|
||||
export default function render(props: WebComponentProps<EntityDict, 'application', false, {
|
||||
name: string;
|
||||
description: string;
|
||||
oakId: string;
|
||||
config: Config;
|
||||
type: AppType;
|
||||
}, {}>): JSX.Element;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -5,9 +5,8 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|||
var application_1 = tslib_1.__importDefault(require("../../../../components/config/application"));
|
||||
var pageHeader_1 = tslib_1.__importDefault(require("../../../../components/common/pageHeader"));
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
function render() {
|
||||
var _a = this.props, namespace = _a.namespace, oakId = _a.oakId;
|
||||
var _b = this.state, config = _b.config, name = _b.name, type = _b.type;
|
||||
return ((0, jsx_runtime_1.jsx)(pageHeader_1.default, tslib_1.__assign({ showBack: true, title: "\u5E94\u7528\u914D\u7F6E" }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: (0, jsx_runtime_1.jsx)(application_1.default, { type: type, config: config, entity: "application", entityId: oakId, name: name, namespace: namespace }) })) })));
|
||||
function render(props) {
|
||||
var _a = props.data, oakId = _a.oakId, config = _a.config, name = _a.name, type = _a.type;
|
||||
return ((0, jsx_runtime_1.jsx)(pageHeader_1.default, tslib_1.__assign({ showBack: true, title: "\u5E94\u7528\u914D\u7F6E" }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: (0, jsx_runtime_1.jsx)(application_1.default, { type: type, config: config, entity: "application", entityId: oakId, name: name }) })) })));
|
||||
}
|
||||
exports.default = render;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
exports.default = OakComponent({
|
||||
isList: false,
|
||||
entity: 'application',
|
||||
|
|
@ -14,11 +13,7 @@ exports.default = OakComponent({
|
|||
},
|
||||
formData: function (_a) {
|
||||
var data = _a.data;
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
return tslib_1.__generator(this, function (_b) {
|
||||
return [2 /*return*/, data || {}];
|
||||
});
|
||||
});
|
||||
return data || {};
|
||||
},
|
||||
methods: {},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1 +1,15 @@
|
|||
export default function render(this: any): JSX.Element;
|
||||
/// <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';
|
||||
declare type Config = WebConfig | WechatPublicConfig | WechatMpConfig;
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'platform', false, {
|
||||
name: string;
|
||||
description: string;
|
||||
oakId: string;
|
||||
config: Config;
|
||||
tabValue: 'detail';
|
||||
}, {
|
||||
onTabClick: (key: string) => void;
|
||||
}>): JSX.Element;
|
||||
export {};
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ 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() {
|
||||
var _a = this.props, namespace = _a.namespace, oakId = _a.oakId;
|
||||
var _b = this.state, config = _b.config, name = _b.name;
|
||||
function Render(props) {
|
||||
var _a = props.data, oakId = _a.oakId, config = _a.config, name = _a.name, tabValue = _a.tabValue;
|
||||
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: "\u5E94\u7528\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: name, bordered: false }, { children: (0, jsx_runtime_1.jsx)(antd_1.Tabs, { items: [
|
||||
{
|
||||
label: '应用概览',
|
||||
|
|
@ -16,4 +16,4 @@ function render() {
|
|||
},
|
||||
] }) })) })) })));
|
||||
}
|
||||
exports.default = render;
|
||||
exports.default = Render;
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ exports.default = OakComponent({
|
|||
},
|
||||
removeApplication: function (id) {
|
||||
this.removeItem(id);
|
||||
this.execute();
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1 +1,16 @@
|
|||
export default function render(this: any): JSX.Element;
|
||||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'application', true, {
|
||||
searchValue: string;
|
||||
list: EntityDict['application']['Schema'][];
|
||||
pagination: any;
|
||||
showBack: boolean;
|
||||
variant?: 'inline' | 'alone' | 'dialog';
|
||||
}, {
|
||||
goDetail: (id: string) => void;
|
||||
goCreate: () => void;
|
||||
goSetConfig: (id: string) => void;
|
||||
goUpdate: (id: string) => void;
|
||||
removeApplication: (id: string) => void;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -4,15 +4,13 @@ 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"));
|
||||
// import ApplicationUpsert from '../../../pages/application/upsert';
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
function render() {
|
||||
var _this = this;
|
||||
var _a = this.props, variant = _a.variant, namespace = _a.namespace, systemId = _a.systemId;
|
||||
var _b = this.state, _c = _b.list, list = _c === void 0 ? [] : _c, oakLoading = _b.oakLoading, pagination = _b.pagination;
|
||||
var _d = pagination || {}, pageSize = _d.pageSize, total = _d.total, currentPage = _d.currentPage;
|
||||
function Render(props) {
|
||||
var _a = props.data, pagination = _a.pagination, _b = _a.list, list = _b === void 0 ? [] : _b, oakLoading = _a.oakLoading, showBack = _a.showBack, variant = _a.variant, oakFullpath = _a.oakFullpath;
|
||||
var _c = pagination || {}, pageSize = _c.pageSize, total = _c.total, currentPage = _c.currentPage;
|
||||
var _d = props.methods, t = _d.t, setPageSize = _d.setPageSize, setCurrentPage = _d.setCurrentPage, goCreate = _d.goCreate, goDetail = _d.goDetail, goSetConfig = _d.goSetConfig, goUpdate = _d.goUpdate, removeApplication = _d.removeApplication;
|
||||
return ((0, jsx_runtime_1.jsxs)(Container, tslib_1.__assign({ variant: variant }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Space, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "primary", onClick: function () {
|
||||
_this.goCreate();
|
||||
goCreate();
|
||||
} }, { children: "\u6DFB\u52A0\u5E94\u7528" })) }), (0, jsx_runtime_1.jsx)(antd_1.Table, { loading: oakLoading, dataSource: list, rowKey: "id", columns: [
|
||||
// {
|
||||
// dataIndex: 'id',
|
||||
|
|
@ -27,7 +25,7 @@ function render() {
|
|||
width: 300,
|
||||
render: function (value, record, index) {
|
||||
return ((0, jsx_runtime_1.jsx)(antd_1.Typography.Link, tslib_1.__assign({ onClick: function () {
|
||||
_this.goDetail(record.id);
|
||||
goDetail(record.id);
|
||||
} }, { children: value })));
|
||||
},
|
||||
},
|
||||
|
|
@ -41,7 +39,7 @@ function render() {
|
|||
dataIndex: 'type',
|
||||
title: '应用类型',
|
||||
render: function (value, record, index) {
|
||||
return _this.t("application:v.type.".concat(value));
|
||||
return t("application:v.type.".concat(value));
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -50,7 +48,7 @@ function render() {
|
|||
align: 'center',
|
||||
render: function (value, record, index) {
|
||||
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "link", onClick: function () {
|
||||
_this.goSetConfig(record.id);
|
||||
goSetConfig(record.id);
|
||||
} }, { children: "\u914D\u7F6E" })) }));
|
||||
},
|
||||
},
|
||||
|
|
@ -61,11 +59,11 @@ function render() {
|
|||
align: 'center',
|
||||
render: function (value, record, index) {
|
||||
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "link", onClick: function () {
|
||||
_this.goDetail(record.id);
|
||||
goDetail(record.id);
|
||||
} }, { children: "\u8BE6\u60C5" })), (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "link", onClick: function () {
|
||||
_this.goUpdate(record.id);
|
||||
goUpdate(record.id);
|
||||
} }, { children: "\u66F4\u65B0" })), (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "link", onClick: function () {
|
||||
_this.removeApplication(record.id);
|
||||
removeApplication(record.id);
|
||||
} }, { children: "\u5220\u9664" }))] }));
|
||||
},
|
||||
fixed: 'right',
|
||||
|
|
@ -75,17 +73,17 @@ function render() {
|
|||
pageSize: pageSize,
|
||||
current: currentPage,
|
||||
onShowSizeChange: function (pageSize) {
|
||||
_this.setPageSize(pageSize);
|
||||
setPageSize(pageSize);
|
||||
},
|
||||
onChange: function (current) {
|
||||
_this.setCurrentPage(current);
|
||||
setCurrentPage(current);
|
||||
},
|
||||
} })] })));
|
||||
}
|
||||
exports.default = render;
|
||||
exports.default = Render;
|
||||
function Container(props) {
|
||||
var children = props.children, variant = props.variant, showBack = props.showBack;
|
||||
if (variant === 'inline') {
|
||||
var children = props.children, _a = props.variant, variant = _a === void 0 ? 'alone' : _a, showBack = props.showBack;
|
||||
if (['inline', 'dialog'].includes(variant)) {
|
||||
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
|
||||
}
|
||||
return ((0, jsx_runtime_1.jsx)(pageHeader_1.default, tslib_1.__assign({ showBack: showBack, title: "\u5E94\u7528\u7BA1\u7406" }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: children })) })));
|
||||
|
|
|
|||
|
|
@ -1 +1,19 @@
|
|||
export default function render(this: any): JSX.Element;
|
||||
/// <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'];
|
||||
typeArr: Array<{
|
||||
label: string;
|
||||
value: EntityDict['application']['Schema']['type'];
|
||||
}>;
|
||||
systemId: string;
|
||||
oakId: string;
|
||||
}, {
|
||||
confirm: () => void;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -5,34 +5,39 @@ 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() {
|
||||
var _this = this;
|
||||
var _a = this.props, variant = _a.variant, _b = _a.showBack, showBack = _b === void 0 ? true : _b, oakId = _a.oakId, systemId = _a.systemId;
|
||||
var _c = this.state, name = _c.name, description = _c.description, type = _c.type, typeArr = _c.typeArr;
|
||||
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 _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: [
|
||||
{
|
||||
required: true,
|
||||
},
|
||||
] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input, { onChange: function (e) {
|
||||
_this.setUpdateData('name', e.target.value);
|
||||
update({
|
||||
name: e.target.value,
|
||||
});
|
||||
}, value: name }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "\u63CF\u8FF0", requiredMark: true, name: "description" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input.TextArea, { onChange: function (e) {
|
||||
_this.setUpdateData('description', e.target.value);
|
||||
update({
|
||||
description: e.target.value,
|
||||
});
|
||||
}, value: description }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "\u5E94\u7528\u7C7B\u578B", requiredMark: true, name: "type", rules: [
|
||||
{
|
||||
required: true,
|
||||
},
|
||||
] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Select, { value: type, style: { width: 120 }, disabled: !!oakId, options: typeArr.map(function (ele) { return ({
|
||||
label: _this.t("application:v.type.".concat(ele.value)),
|
||||
label: t("application:v.type.".concat(ele.value)),
|
||||
value: ele.value,
|
||||
}); }), onChange: function (value) {
|
||||
_this.setUpdateData('type', value);
|
||||
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 () {
|
||||
_this.confirm();
|
||||
confirm();
|
||||
} }, { children: "\u786E\u5B9A" })), (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ onClick: function () {
|
||||
_this.navigateBack();
|
||||
navigateBack();
|
||||
} }, { children: "\u8FD4\u56DE" }))] }) })) }))] })) })) }) })));
|
||||
}
|
||||
exports.default = render;
|
||||
exports.default = Render;
|
||||
function Action(props) {
|
||||
var children = props.children, variant = props.variant;
|
||||
if (variant === 'dialog') {
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
/// <reference types="react" />
|
||||
export default function render(this: any): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <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,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
export default function render(props: WebComponentProps<EntityDict, 'article', false, {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
<!--index.wxml-->
|
||||
<view class="container">
|
||||
|
||||
</view>
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import '@wangeditor/editor/dist/css/style.css';
|
||||
import { EntityDict } from './../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <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 +1,2 @@
|
|||
/// <reference types="react" />
|
||||
export default function render(this: any): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
export default function render(props: WebComponentProps<EntityDict, 'mobile', true, {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function render(props: WebComponentProps<EntityDict, 'area', true, {
|
||||
|
|
|
|||
|
|
@ -1 +1,10 @@
|
|||
export default function render(this: any): JSX.Element;
|
||||
/// <reference types="react" />
|
||||
import { Config } from '../../../../types/Config';
|
||||
import { EntityDict } from '../../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'platform', false, {
|
||||
name: string;
|
||||
description: string;
|
||||
oakId: string;
|
||||
config: Config;
|
||||
}, {}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -5,9 +5,8 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|||
var upsert_1 = tslib_1.__importDefault(require("../../../../components/config/upsert"));
|
||||
var pageHeader_1 = tslib_1.__importDefault(require("../../../../components/common/pageHeader"));
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
function render() {
|
||||
var _a = this.props, namespace = _a.namespace, oakId = _a.oakId;
|
||||
var _b = this.state, config = _b.config, name = _b.name;
|
||||
return ((0, jsx_runtime_1.jsx)(pageHeader_1.default, tslib_1.__assign({ showBack: true, title: "\u5E73\u53F0\u914D\u7F6E" }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: (0, jsx_runtime_1.jsx)(upsert_1.default, { config: config, entity: "platform", entityId: oakId, name: name, namespace: namespace }) })) })));
|
||||
function Render(props) {
|
||||
var _a = props.data, oakId = _a.oakId, config = _a.config, name = _a.name;
|
||||
return ((0, jsx_runtime_1.jsx)(pageHeader_1.default, tslib_1.__assign({ showBack: true, title: "\u5E73\u53F0\u914D\u7F6E" }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: (0, jsx_runtime_1.jsx)(upsert_1.default, { config: config, entity: "platform", entityId: oakId, name: name }) })) })));
|
||||
}
|
||||
exports.default = render;
|
||||
exports.default = Render;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
exports.default = OakComponent({
|
||||
isList: false,
|
||||
entity: 'platform',
|
||||
|
|
@ -11,11 +10,7 @@ exports.default = OakComponent({
|
|||
},
|
||||
formData: function (_a) {
|
||||
var data = _a.data;
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
return tslib_1.__generator(this, function (_b) {
|
||||
return [2 /*return*/, data || {}];
|
||||
});
|
||||
});
|
||||
return data || {};
|
||||
},
|
||||
observers: {
|
||||
tab: function (tab) {
|
||||
|
|
|
|||
|
|
@ -1 +1,13 @@
|
|||
export default function render(this: any): JSX.Element;
|
||||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { Config } from '../../../types/Config';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'platform', false, {
|
||||
name: string;
|
||||
description: string;
|
||||
oakId: string;
|
||||
config: Config;
|
||||
tabValue: 'detail' | 'system_list';
|
||||
}, {
|
||||
onTabClick: (key: string) => void;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -6,12 +6,11 @@ var antd_1 = require("antd");
|
|||
var pageHeader_1 = tslib_1.__importDefault(require("../../../components/common/pageHeader"));
|
||||
var list_1 = tslib_1.__importDefault(require("../../../pages/system/list"));
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
function render() {
|
||||
var _this = this;
|
||||
var _a = this.props, namespace = _a.namespace, oakId = _a.oakId;
|
||||
var _b = this.state, config = _b.config, name = _b.name, tabValue = _b.tabValue;
|
||||
function Render(props) {
|
||||
var _a = props.data, oakId = _a.oakId, config = _a.config, name = _a.name, tabValue = _a.tabValue;
|
||||
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: "\u5E73\u53F0\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: name, bordered: false }, { children: (0, jsx_runtime_1.jsx)(antd_1.Tabs, { activeKey: tabValue, onTabClick: function (key) {
|
||||
_this.onTabClick(key);
|
||||
onTabClick(key);
|
||||
}, items: [
|
||||
{
|
||||
label: '平台概览',
|
||||
|
|
@ -21,8 +20,8 @@ function render() {
|
|||
{
|
||||
label: '系统管理',
|
||||
key: 'system_list',
|
||||
children: ((0, jsx_runtime_1.jsx)(list_1.default, { namespace: namespace, platformId: oakId, variant: "inline", oakPath: "$platform/detail/-system/list", oakAutoUnmount: true })),
|
||||
children: ((0, jsx_runtime_1.jsx)(list_1.default, { platformId: oakId, variant: "inline", oakPath: "$platform/detail/-system/list", oakAutoUnmount: true })),
|
||||
},
|
||||
] }) })) })) })));
|
||||
}
|
||||
exports.default = render;
|
||||
exports.default = Render;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
exports.default = OakComponent({
|
||||
isList: true,
|
||||
entity: 'platform',
|
||||
|
|
@ -9,27 +8,22 @@ exports.default = OakComponent({
|
|||
name: 1,
|
||||
description: 1,
|
||||
config: 1,
|
||||
$$createAt$$: 1
|
||||
$$createAt$$: 1,
|
||||
},
|
||||
formData: function (_a) {
|
||||
var data = _a.data;
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
var pagination;
|
||||
return tslib_1.__generator(this, function (_b) {
|
||||
pagination = this.getPagination();
|
||||
return [2 /*return*/, {
|
||||
list: data,
|
||||
pagination: pagination,
|
||||
}];
|
||||
});
|
||||
});
|
||||
var pagination = this.getPagination();
|
||||
return {
|
||||
list: data,
|
||||
pagination: pagination,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
goDetail: function (id) {
|
||||
this.navigateTo({
|
||||
url: '/platform/detail',
|
||||
oakId: id,
|
||||
tab: 'detail'
|
||||
tab: 'detail',
|
||||
});
|
||||
},
|
||||
goUpdate: function (id) {
|
||||
|
|
@ -44,7 +38,7 @@ exports.default = OakComponent({
|
|||
oakId: id,
|
||||
});
|
||||
},
|
||||
goNewPlatform: function () {
|
||||
goCreate: function () {
|
||||
this.navigateTo({
|
||||
url: '/platform/upsert',
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1 +1,15 @@
|
|||
export default function render(this: any): JSX.Element;
|
||||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'platform', true, {
|
||||
searchValue: string;
|
||||
list: EntityDict['platform']['Schema'][];
|
||||
pagination: any;
|
||||
showBack: boolean;
|
||||
variant?: 'inline' | 'alone' | 'dialog';
|
||||
}, {
|
||||
goDetail: (id: string) => void;
|
||||
goCreate: () => void;
|
||||
goSetConfig: (id: string) => void;
|
||||
goUpdate: (id: string) => void;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -6,12 +6,12 @@ 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"));
|
||||
var dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
||||
function render() {
|
||||
var _this = this;
|
||||
var _a = this.state, _b = _a.list, list = _b === void 0 ? [] : _b, oakLoading = _a.oakLoading, pagination = _a.pagination;
|
||||
function Render(props) {
|
||||
var _a = props.data, pagination = _a.pagination, _b = _a.list, list = _b === void 0 ? [] : _b, oakLoading = _a.oakLoading, showBack = _a.showBack, variant = _a.variant, oakFullpath = _a.oakFullpath;
|
||||
var _c = pagination || {}, pageSize = _c.pageSize, total = _c.total, currentPage = _c.currentPage;
|
||||
var _d = props.methods, t = _d.t, setPageSize = _d.setPageSize, setCurrentPage = _d.setCurrentPage, goCreate = _d.goCreate, goDetail = _d.goDetail, goSetConfig = _d.goSetConfig, goUpdate = _d.goUpdate;
|
||||
return ((0, jsx_runtime_1.jsx)(pageHeader_1.default, tslib_1.__assign({ title: "\u5E73\u53F0\u7BA1\u7406" }, { children: (0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Space, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "primary", onClick: function () {
|
||||
_this.goNewPlatform();
|
||||
goCreate();
|
||||
} }, { children: "\u6DFB\u52A0\u5E73\u53F0" })) }), (0, jsx_runtime_1.jsx)(antd_1.Table, { loading: oakLoading, dataSource: list, rowKey: "id", columns: [
|
||||
// {
|
||||
// dataIndex: 'id',
|
||||
|
|
@ -26,7 +26,7 @@ function render() {
|
|||
width: 300,
|
||||
render: function (value, record, index) {
|
||||
return ((0, jsx_runtime_1.jsx)(antd_1.Typography.Link, tslib_1.__assign({ onClick: function () {
|
||||
_this.goDetail(record.id);
|
||||
goDetail(record.id);
|
||||
} }, { children: value })));
|
||||
},
|
||||
},
|
||||
|
|
@ -50,7 +50,7 @@ function render() {
|
|||
align: 'center',
|
||||
render: function (value, record, index) {
|
||||
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "link", onClick: function () {
|
||||
_this.goSetConfig(record.id);
|
||||
goSetConfig(record.id);
|
||||
} }, { children: "\u914D\u7F6E" })) }));
|
||||
},
|
||||
},
|
||||
|
|
@ -61,9 +61,9 @@ function render() {
|
|||
align: 'center',
|
||||
render: function (value, record, index) {
|
||||
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "link", onClick: function () {
|
||||
_this.goDetail(record.id);
|
||||
goDetail(record.id);
|
||||
} }, { children: "\u6982\u89C8" })), (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "link", onClick: function () {
|
||||
_this.goUpdate(record.id);
|
||||
goUpdate(record.id);
|
||||
} }, { children: "\u66F4\u65B0" }))] }));
|
||||
},
|
||||
fixed: 'right',
|
||||
|
|
@ -73,11 +73,11 @@ function render() {
|
|||
pageSize: pageSize,
|
||||
current: currentPage,
|
||||
onShowSizeChange: function (pageSize) {
|
||||
_this.setPageSize(pageSize);
|
||||
setPageSize(pageSize);
|
||||
},
|
||||
onChange: function (current) {
|
||||
_this.setCurrentPage(current);
|
||||
setCurrentPage(current);
|
||||
},
|
||||
} })] })) })));
|
||||
}
|
||||
exports.default = render;
|
||||
exports.default = Render;
|
||||
|
|
|
|||
|
|
@ -12,11 +12,7 @@ exports.default = OakComponent({
|
|||
},
|
||||
formData: function (_a) {
|
||||
var data = _a.data;
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
return tslib_1.__generator(this, function (_b) {
|
||||
return [2 /*return*/, data || {}];
|
||||
});
|
||||
});
|
||||
return data || {};
|
||||
},
|
||||
methods: {
|
||||
confirm: function () {
|
||||
|
|
|
|||
|
|
@ -1 +1,9 @@
|
|||
export default function render(this: any): JSX.Element;
|
||||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'platform', false, {
|
||||
name: string;
|
||||
description: string;
|
||||
}, {
|
||||
confirm: () => void;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -5,19 +5,25 @@ 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() {
|
||||
var _this = this;
|
||||
var _a = this.state, name = _a.name, description = _a.description;
|
||||
function Render(props) {
|
||||
var _a = props.data, name = _a.name, description = _a.description;
|
||||
var _b = props.methods, t = _b.t, update = _b.update, navigateBack = _b.navigateBack, confirm = _b.confirm;
|
||||
return ((0, jsx_runtime_1.jsx)(pageHeader_1.default, tslib_1.__assign({ showBack: true, title: "\u5E73\u53F0\u7F16\u8F91" }, { 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.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: 4 }, wrapperCol: { span: 16 } }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "\u540D\u79F0", requiredMark: true, name: "name", 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) {
|
||||
_this.setUpdateData('name', e.target.value);
|
||||
update({
|
||||
name: e.target.value,
|
||||
});
|
||||
}, value: name }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "\u63CF\u8FF0", requiredMark: true, name: "description" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input.TextArea, { onChange: function (e) {
|
||||
_this.setUpdateData('description', e.target.value);
|
||||
}, value: description }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ wrapperCol: { offset: 4 } }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "primary", onClick: function () {
|
||||
_this.confirm();
|
||||
} }, { children: "\u786E\u5B9A" })) }))] })) })) }) })) })));
|
||||
update({
|
||||
description: e.target.value,
|
||||
});
|
||||
}, value: description }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ wrapperCol: { offset: 4 } }, { 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();
|
||||
} }, { children: "\u8FD4\u56DE" }))] }) }))] })) })) }) })) })));
|
||||
}
|
||||
exports.default = render;
|
||||
exports.default = Render;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
exports.default = OakComponent({
|
||||
isList: false,
|
||||
entity: 'system',
|
||||
|
|
@ -11,11 +10,7 @@ exports.default = OakComponent({
|
|||
},
|
||||
formData: function (_a) {
|
||||
var data = _a.data;
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
return tslib_1.__generator(this, function (_b) {
|
||||
return [2 /*return*/, data || {}];
|
||||
});
|
||||
});
|
||||
return data || {};
|
||||
},
|
||||
methods: {},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1 +1,10 @@
|
|||
export default function render(this: any): JSX.Element;
|
||||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../../general-app-domain';
|
||||
import { Config } from '../../../../types/Config';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'system', false, {
|
||||
name: string;
|
||||
description: string;
|
||||
oakId: string;
|
||||
config: Config;
|
||||
}, {}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -5,9 +5,8 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|||
var upsert_1 = tslib_1.__importDefault(require("../../../../components/config/upsert"));
|
||||
var pageHeader_1 = tslib_1.__importDefault(require("../../../../components/common/pageHeader"));
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
function render() {
|
||||
var _a = this.props, namespace = _a.namespace, oakId = _a.oakId;
|
||||
var _b = this.state, config = _b.config, name = _b.name;
|
||||
return ((0, jsx_runtime_1.jsx)(pageHeader_1.default, tslib_1.__assign({ showBack: true, title: "\u7CFB\u7EDF\u914D\u7F6E" }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: (0, jsx_runtime_1.jsx)(upsert_1.default, { config: config, entity: "system", entityId: oakId, name: name, namespace: namespace }) })) })));
|
||||
function Render(props) {
|
||||
var _a = props.data, oakId = _a.oakId, config = _a.config, name = _a.name;
|
||||
return ((0, jsx_runtime_1.jsx)(pageHeader_1.default, tslib_1.__assign({ showBack: true, title: "\u7CFB\u7EDF\u914D\u7F6E" }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: (0, jsx_runtime_1.jsx)(upsert_1.default, { config: config, entity: "system", entityId: oakId, name: name }) })) })));
|
||||
}
|
||||
exports.default = render;
|
||||
exports.default = Render;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
exports.default = OakComponent({
|
||||
isList: false,
|
||||
entity: 'system',
|
||||
|
|
@ -14,11 +13,7 @@ exports.default = OakComponent({
|
|||
},
|
||||
formData: function (_a) {
|
||||
var data = _a.data;
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
return tslib_1.__generator(this, function (_b) {
|
||||
return [2 /*return*/, data || {}];
|
||||
});
|
||||
});
|
||||
return data || {};
|
||||
},
|
||||
observers: {
|
||||
tab: function (tab) {
|
||||
|
|
|
|||
|
|
@ -1 +1,13 @@
|
|||
export default function render(this: any): JSX.Element;
|
||||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { Config } from '../../../types/Config';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'platform', false, {
|
||||
name: string;
|
||||
description: string;
|
||||
oakId: string;
|
||||
config: Config;
|
||||
tabValue: 'detail' | 'application_list';
|
||||
}, {
|
||||
onTabClick: (key: string) => void;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -6,12 +6,11 @@ var antd_1 = require("antd");
|
|||
var pageHeader_1 = tslib_1.__importDefault(require("../../../components/common/pageHeader"));
|
||||
var list_1 = tslib_1.__importDefault(require("../../../pages/application/list"));
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
function render() {
|
||||
var _this = this;
|
||||
var _a = this.props, namespace = _a.namespace, oakId = _a.oakId;
|
||||
var _b = this.state, config = _b.config, name = _b.name, tabValue = _b.tabValue;
|
||||
function Render(props) {
|
||||
var _a = props.data, oakId = _a.oakId, config = _a.config, name = _a.name, tabValue = _a.tabValue;
|
||||
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: "\u7CFB\u7EDF\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: name, bordered: false }, { children: (0, jsx_runtime_1.jsx)(antd_1.Tabs, { activeKey: tabValue, onTabClick: function (key) {
|
||||
_this.onTabClick(key);
|
||||
onTabClick(key);
|
||||
}, items: [
|
||||
{
|
||||
label: '系统概览',
|
||||
|
|
@ -21,8 +20,8 @@ function render() {
|
|||
{
|
||||
label: '应用管理',
|
||||
key: 'application_list',
|
||||
children: ((0, jsx_runtime_1.jsx)(list_1.default, { namespace: namespace, systemId: oakId, variant: "inline", oakPath: "$system/detail-application/list", oakAutoUnmount: true })),
|
||||
children: ((0, jsx_runtime_1.jsx)(list_1.default, { systemId: oakId, variant: "inline", oakPath: "$system/detail-application/list", oakAutoUnmount: true })),
|
||||
},
|
||||
] }) })) })) })));
|
||||
}
|
||||
exports.default = render;
|
||||
exports.default = Render;
|
||||
|
|
|
|||
|
|
@ -57,15 +57,9 @@ exports.default = OakComponent({
|
|||
},
|
||||
goCreate: function () {
|
||||
var _a = this.props, width = _a.width, platformId = _a.platformId;
|
||||
if (width === 'xs') {
|
||||
this.navigateTo({
|
||||
url: '/system/upsert',
|
||||
platformId: platformId,
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
open: true,
|
||||
this.navigateTo({
|
||||
url: '/system/upsert',
|
||||
platformId: platformId,
|
||||
});
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1 +1,15 @@
|
|||
export default function render(this: any): JSX.Element;
|
||||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'system', true, {
|
||||
searchValue: string;
|
||||
list: EntityDict['system']['Schema'][];
|
||||
pagination: any;
|
||||
showBack: boolean;
|
||||
variant?: 'inline' | 'alone' | 'dialog';
|
||||
}, {
|
||||
goDetail: (id: string) => void;
|
||||
goCreate: () => void;
|
||||
goSetConfig: (id: string) => void;
|
||||
goUpdate: (id: string) => void;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -4,15 +4,13 @@ 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 upsert_1 = tslib_1.__importDefault(require("../../../pages/system/upsert"));
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
function render() {
|
||||
var _this = this;
|
||||
var _a = this.props, variant = _a.variant, namespace = _a.namespace, platformId = _a.platformId, showBack = _a.showBack;
|
||||
var _b = this.state, _c = _b.list, list = _c === void 0 ? [] : _c, oakLoading = _b.oakLoading, pagination = _b.pagination;
|
||||
var _d = pagination || {}, pageSize = _d.pageSize, total = _d.total, currentPage = _d.currentPage;
|
||||
function Render(props) {
|
||||
var _a = props.data, pagination = _a.pagination, _b = _a.list, list = _b === void 0 ? [] : _b, oakLoading = _a.oakLoading, showBack = _a.showBack, variant = _a.variant, oakFullpath = _a.oakFullpath;
|
||||
var _c = pagination || {}, pageSize = _c.pageSize, total = _c.total, currentPage = _c.currentPage;
|
||||
var _d = props.methods, t = _d.t, setPageSize = _d.setPageSize, setCurrentPage = _d.setCurrentPage, goCreate = _d.goCreate, goDetail = _d.goDetail, goSetConfig = _d.goSetConfig, goUpdate = _d.goUpdate;
|
||||
return ((0, jsx_runtime_1.jsxs)(Container, tslib_1.__assign({ showBack: showBack, variant: variant }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Space, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "primary", onClick: function () {
|
||||
_this.goCreate();
|
||||
goCreate();
|
||||
} }, { children: "\u6DFB\u52A0\u7CFB\u7EDF" })) }), (0, jsx_runtime_1.jsx)(antd_1.Table, { loading: oakLoading, dataSource: list, rowKey: "id", columns: [
|
||||
// {
|
||||
// dataIndex: 'id',
|
||||
|
|
@ -27,7 +25,7 @@ function render() {
|
|||
width: 300,
|
||||
render: function (value, record, index) {
|
||||
return ((0, jsx_runtime_1.jsx)(antd_1.Typography.Link, tslib_1.__assign({ onClick: function () {
|
||||
_this.goDetail(record.id);
|
||||
goDetail(record.id);
|
||||
} }, { children: value })));
|
||||
},
|
||||
},
|
||||
|
|
@ -50,7 +48,7 @@ function render() {
|
|||
align: 'center',
|
||||
render: function (value, record, index) {
|
||||
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "link", onClick: function () {
|
||||
_this.goSetConfig(record.id);
|
||||
goSetConfig(record.id);
|
||||
} }, { children: "\u914D\u7F6E" })) }));
|
||||
},
|
||||
},
|
||||
|
|
@ -61,9 +59,9 @@ function render() {
|
|||
align: 'center',
|
||||
render: function (value, record, index) {
|
||||
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "link", onClick: function () {
|
||||
_this.goDetail(record.id);
|
||||
goDetail(record.id);
|
||||
} }, { children: "\u6982\u89C8" })), (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "link", onClick: function () {
|
||||
_this.goUpdate(record.id);
|
||||
goUpdate(record.id);
|
||||
} }, { children: "\u66F4\u65B0" }))] }));
|
||||
},
|
||||
fixed: 'right',
|
||||
|
|
@ -73,36 +71,14 @@ function render() {
|
|||
pageSize: pageSize,
|
||||
current: currentPage,
|
||||
onShowSizeChange: function (pageSize) {
|
||||
_this.setPageSize(pageSize);
|
||||
setPageSize(pageSize);
|
||||
},
|
||||
onChange: function (current) {
|
||||
_this.setCurrentPage(current);
|
||||
setCurrentPage(current);
|
||||
},
|
||||
} }), (0, jsx_runtime_1.jsx)(antd_1.Modal, tslib_1.__assign({ title: "\u521B\u5EFA\u7CFB\u7EDF", destroyOnClose: true, open: this.state.open, onCancel: function () {
|
||||
_this.setState({
|
||||
open: false,
|
||||
});
|
||||
}, width: "60%", onOk: function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
// todo
|
||||
this.createItem();
|
||||
/* await this.execute(
|
||||
{
|
||||
action: 'create',
|
||||
data: {
|
||||
id: await generateNewId(),
|
||||
},
|
||||
},
|
||||
// '$system/list-system/upsert'
|
||||
); */
|
||||
this.setState({
|
||||
open: false,
|
||||
});
|
||||
return [2 /*return*/];
|
||||
});
|
||||
}); }, okText: "\u786E\u5B9A", cancelText: "\u53D6\u6D88" }, { children: (0, jsx_runtime_1.jsx)(upsert_1.default, { platformId: platformId, namespace: namespace, variant: "dialog", oakPath: this.state.oakFullpath }) }))] })));
|
||||
} })] })));
|
||||
}
|
||||
exports.default = render;
|
||||
exports.default = Render;
|
||||
function Container(props) {
|
||||
var children = props.children, _a = props.variant, variant = _a === void 0 ? 'alone' : _a, showBack = props.showBack;
|
||||
if (['inline', 'dialog'].includes(variant)) {
|
||||
|
|
|
|||
|
|
@ -1 +1,12 @@
|
|||
export default function render(this: any): JSX.Element;
|
||||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'system', false, {
|
||||
name: string;
|
||||
description: string;
|
||||
super: boolean;
|
||||
variant: 'inline' | 'alone' | 'dialog';
|
||||
showBack: boolean;
|
||||
}, {
|
||||
confirm: () => void;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -5,25 +5,32 @@ 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() {
|
||||
var _this = this;
|
||||
var _a = this.props, variant = _a.variant, _b = _a.showBack, showBack = _b === void 0 ? true : _b;
|
||||
var _c = this.state, name = _c.name, description = _c.description, super2 = _c.super;
|
||||
function Render(props) {
|
||||
var _a = props.data, name = _a.name, description = _a.description, super2 = _a.super, variant = _a.variant, _b = _a.showBack, showBack = _b === void 0 ? true : _b;
|
||||
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: [
|
||||
{
|
||||
required: true,
|
||||
},
|
||||
] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input, { onChange: function (e) {
|
||||
_this.setUpdateData('name', e.target.value);
|
||||
update({
|
||||
name: e.target.value,
|
||||
});
|
||||
}, value: name }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "\u63CF\u8FF0", requiredMark: true, name: "description" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input.TextArea, { onChange: function (e) {
|
||||
_this.setUpdateData('description', e.target.value);
|
||||
update({
|
||||
description: e.target.value,
|
||||
});
|
||||
}, value: description }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "\u662F\u5426\u4E3A\u8D85\u7EA7\u7CFB\u7EDF", requiredMark: true, name: "super" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Switch, { checkedChildren: "\u662F", unCheckedChildren: "\u5426", checked: super2, onChange: function (checked) {
|
||||
_this.setUpdateData('super', checked);
|
||||
} }) }) })), (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.jsx)(antd_1.Button, tslib_1.__assign({ type: "primary", onClick: function () {
|
||||
_this.confirm();
|
||||
} }, { children: "\u786E\u5B9A" })) })) }))] })) })) }) })));
|
||||
update({
|
||||
super: checked,
|
||||
});
|
||||
} }) }) })), (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();
|
||||
} }, { children: "\u8FD4\u56DE" }))] }) })) }))] })) })) }) })));
|
||||
}
|
||||
exports.default = render;
|
||||
exports.default = Render;
|
||||
function Action(props) {
|
||||
var children = props.children, variant = props.variant;
|
||||
if (variant === 'dialog') {
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
/** index.wxss **/
|
||||
@import "../../../config/styles/mp/index.less";
|
||||
@import "../../../config/styles/mp/mixins.less";
|
||||
|
||||
.page-body {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
background-color: @bg-color-fade;
|
||||
}
|
||||
|
||||
.userInfo {
|
||||
padding: @spacer-1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.nickname {
|
||||
font-size: @font-size-base;
|
||||
color: @text-level-3-color;
|
||||
padding-top: @spacer-1;
|
||||
padding-bottom: @spacer-1;
|
||||
}
|
||||
|
||||
|
||||
.cell {
|
||||
background-color: #fff;
|
||||
flex: 1;
|
||||
}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'token', true, {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <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,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function render(props: WebComponentProps<EntityDict, 'user', true, {
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
/// <reference types="react" />
|
||||
export default function render(this: any): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
/// <reference types="react" />
|
||||
export default function render(): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
/// <reference types="react" />
|
||||
export default function render(this: any): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
/// <reference types="react" />
|
||||
export default function render(): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'user', true, {
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
/// <reference types="react" />
|
||||
export default function render(this: any): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <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,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'user', true, {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'user', true, {
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
/// <reference types="react" />
|
||||
export default function render(this: any): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
/// <reference types="react" />
|
||||
export default function render(this: any): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
/// <reference types="react" />
|
||||
export default function render(this: any): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../../general-app-domain';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'mobile', false, {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <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 +1,2 @@
|
|||
/// <reference types="react" />
|
||||
export default function render(this: any): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../../general-app-domain';
|
||||
export default function render(props: WebComponentProps<EntityDict, 'userEntityGrant', false, {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <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 +1,2 @@
|
|||
/// <reference types="react" />
|
||||
export default function render(this: any): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <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 +1,2 @@
|
|||
/// <reference types="react" />
|
||||
export default function render(this: any): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/// <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 +1,2 @@
|
|||
/// <reference types="react" />
|
||||
export default function render(this: any): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
/// <reference types="react" />
|
||||
export default function render(this: any): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
"gen:areaDebug": "ts-node ./scripts/generateAreaDebug.ts",
|
||||
"clean:dir": "ts-node ./scripts/cleanDtsAndJs",
|
||||
"test": "ts-node ./test/test.ts",
|
||||
"prepare": "rimraf node_modules/react & rimraf node_modules/react-dom & rimraf node_modules/react-router & rimraf node_modules/antd"
|
||||
"prepare": "rimraf node_modules/react & rimraf node_modules/react-dom & rimraf node_modules/react-router"
|
||||
},
|
||||
"main": "lib/index"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@ export default function render(
|
|||
>
|
||||
) {
|
||||
const { entity, name, type, currentConfig, dirty } = props.data;
|
||||
const { resetConfig, updateConfig, setValue, removeItem } = props.methods;
|
||||
const { resetConfig, updateConfig, setValue, removeItem, cleanKey } =
|
||||
props.methods;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export default function Render(
|
|||
{
|
||||
name: string;
|
||||
description: string;
|
||||
super: string;
|
||||
super: boolean;
|
||||
variant: 'inline' | 'alone' | 'dialog';
|
||||
showBack: boolean;
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue