application数据结构改动
This commit is contained in:
parent
9ed4eaf28c
commit
37e2e7a8ff
|
|
@ -1,4 +0,0 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
/// <reference types="react" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../general-app-domain").EntityDict, "message", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
"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*/];
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
/// <reference types="react" />
|
||||
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;
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
"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,9 +0,0 @@
|
|||
{
|
||||
"add": "创建",
|
||||
"search": "搜索",
|
||||
"entrepreneurial": "创业服务",
|
||||
"industry": "产业服务",
|
||||
"knowledge": "知识分享",
|
||||
"attractInvestment": "招商服务",
|
||||
"other": "其他"
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
/// <reference types="react" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../general-app-domain").EntityDict, keyof import("../../../general-app-domain").EntityDict, false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
@ -1,161 +0,0 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
exports.default = OakComponent({
|
||||
entity: 'service',
|
||||
projection: {
|
||||
id: 1,
|
||||
areaId: 1,
|
||||
name: 1,
|
||||
parentId: 1,
|
||||
parent: {
|
||||
id: 1,
|
||||
areaId: 1,
|
||||
name: 1,
|
||||
regToYearValue: 1,
|
||||
regToYearUnit: 1,
|
||||
type: 1,
|
||||
},
|
||||
regToYearValue: 1,
|
||||
regToYearUnit: 1,
|
||||
type: 1,
|
||||
show: 1,
|
||||
description: 1,
|
||||
extraFile$entity: {
|
||||
$entity: 'extraFile',
|
||||
data: {
|
||||
id: 1,
|
||||
tag1: 1,
|
||||
origin: 1,
|
||||
bucket: 1,
|
||||
objectId: 1,
|
||||
filename: 1,
|
||||
extra1: 1,
|
||||
extension: 1,
|
||||
type: 1,
|
||||
entity: 1,
|
||||
},
|
||||
filter: {
|
||||
tag1: 'icon',
|
||||
},
|
||||
},
|
||||
},
|
||||
isList: false,
|
||||
formData: function (_a) {
|
||||
var _b;
|
||||
var service = _a.data;
|
||||
return {
|
||||
name: service === null || service === void 0 ? void 0 : service.name,
|
||||
areaId: service === null || service === void 0 ? void 0 : service.areaId,
|
||||
parentId: service === null || service === void 0 ? void 0 : service.parentId,
|
||||
regToYearValue: service === null || service === void 0 ? void 0 : service.regToYearValue,
|
||||
regToYearUnit: service === null || service === void 0 ? void 0 : service.regToYearUnit,
|
||||
type: service === null || service === void 0 ? void 0 : service.type,
|
||||
parentName: (_b = service === null || service === void 0 ? void 0 : service.parent) === null || _b === void 0 ? void 0 : _b.name,
|
||||
description: service === null || service === void 0 ? void 0 : service.description,
|
||||
show: service === null || service === void 0 ? void 0 : service.show,
|
||||
};
|
||||
},
|
||||
data: {
|
||||
typeArr: [
|
||||
{
|
||||
label: '创业服务',
|
||||
value: 'entrepreneurial',
|
||||
},
|
||||
{
|
||||
label: '产业服务',
|
||||
value: 'industry',
|
||||
},
|
||||
{
|
||||
label: '招商服务',
|
||||
value: 'attractInvestment',
|
||||
},
|
||||
{
|
||||
label: '其他',
|
||||
value: 'other',
|
||||
},
|
||||
],
|
||||
},
|
||||
lifetimes: {
|
||||
ready: function () {
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
var _a, parentId, oakId, _b, service;
|
||||
return tslib_1.__generator(this, function (_c) {
|
||||
switch (_c.label) {
|
||||
case 0:
|
||||
_a = this.props, parentId = _a.parentId, oakId = _a.oakId;
|
||||
if (!!oakId) return [3 /*break*/, 3];
|
||||
if (!parentId) return [3 /*break*/, 2];
|
||||
return [4 /*yield*/, this.features.cache.refresh('service', {
|
||||
data: {
|
||||
id: 1,
|
||||
type: 1,
|
||||
show: 1,
|
||||
},
|
||||
filter: {
|
||||
id: parentId,
|
||||
},
|
||||
})];
|
||||
case 1:
|
||||
_b = tslib_1.__read.apply(void 0, [(_c.sent()).data, 1]), service = _b[0];
|
||||
if (service) {
|
||||
this.update({
|
||||
parentId: parentId,
|
||||
type: service.type,
|
||||
show: service.show,
|
||||
});
|
||||
}
|
||||
return [3 /*break*/, 3];
|
||||
case 2:
|
||||
this.update({
|
||||
type: 'entrepreneurial',
|
||||
show: 'shop',
|
||||
});
|
||||
_c.label = 3;
|
||||
case 3: return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
confirm: function () {
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
if (!this.state.type) {
|
||||
this.setMessage({
|
||||
type: 'error',
|
||||
content: '请选择类型',
|
||||
});
|
||||
return [2 /*return*/];
|
||||
}
|
||||
if (!this.state.name) {
|
||||
this.setMessage({
|
||||
type: 'error',
|
||||
content: '请输入服务名称',
|
||||
});
|
||||
return [2 /*return*/];
|
||||
}
|
||||
if (!this.state.show) {
|
||||
this.setMessage({
|
||||
type: 'error',
|
||||
content: '请选择展示形式',
|
||||
});
|
||||
return [2 /*return*/];
|
||||
}
|
||||
return [4 /*yield*/, this.execute()];
|
||||
case 1:
|
||||
_a.sent();
|
||||
this.navigateBack();
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
reset: function () {
|
||||
this.clean();
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"navigationBarTitleText": "创建服务",
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
/// <reference types="react" />
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '@oak-app-domain';
|
||||
export default function render(props: WebComponentProps<EntityDict, 'service', false, {
|
||||
parentId?: string;
|
||||
parentName: string;
|
||||
type: string;
|
||||
description: string;
|
||||
name: string;
|
||||
typeArr: Array<{
|
||||
label: string;
|
||||
value: string;
|
||||
}>;
|
||||
oakId: string;
|
||||
show: string;
|
||||
}, {
|
||||
confirm: () => void;
|
||||
reset: () => void;
|
||||
}>): JSX.Element;
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
"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 web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
var gallery_1 = tslib_1.__importDefault(require("@oak-general-business/components/extraFile/gallery"));
|
||||
var pageHeader_1 = tslib_1.__importDefault(require("@oak-general-business/components/common/pageHeader"));
|
||||
var TextArea = antd_1.Input.TextArea;
|
||||
function render(props) {
|
||||
var data = props.data, methods = props.methods;
|
||||
var t = methods.t, update = methods.update, reset = methods.reset, confirm = methods.confirm;
|
||||
var oakId = data.oakId, oakFullpath = data.oakFullpath, parentId = data.parentId, parentName = data.parentName, type = data.type, description = data.description, name = data.name, typeArr = data.typeArr, show = data.show;
|
||||
return ((0, jsx_runtime_1.jsx)(pageHeader_1.default, tslib_1.__assign({ showBack: true, title: "\u6DFB\u52A0\u670D\u52A1" }, { 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: 16 }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Form, tslib_1.__assign({ colon: true, labelCol: { span: 4 }, wrapperCol: { span: 20 } }, { children: [parentId ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: t('service:attr.parent'), name: "parent" }, { children: (0, jsx_runtime_1.jsx)(antd_1.Tooltip, { children: parentName }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: t('service:attr.name'), name: "name", rules: [
|
||||
{
|
||||
required: true,
|
||||
message: '服务名称必填',
|
||||
},
|
||||
] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input, { placeholder: "\u8BF7\u8F93\u5165\u670D\u52A1\u540D\u79F0", onChange: function (e) {
|
||||
update({
|
||||
name: e.target.value,
|
||||
});
|
||||
}, value: name }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: t('service:attr.show'), name: "show", rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "\u672A\u586B\u5199".concat(t('service:attr.show')),
|
||||
},
|
||||
], requiredMark: true, tooltip: "\u6D89\u53CA\u4EA7\u54C1\u521B\u5EFA\u548C\u8BE6\u60C5\u663E\u793A" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Select, { value: show, onChange: function (value) {
|
||||
update({
|
||||
show: value,
|
||||
});
|
||||
}, options: [
|
||||
'shop',
|
||||
'independent',
|
||||
'self',
|
||||
].map(function (ele) { return ({
|
||||
label: t("service:v.show.".concat(ele)),
|
||||
value: ele,
|
||||
}); }) }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: t('service:attr.description'), name: "description" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(TextArea, { placeholder: "\u8BF7\u8F93\u5165\u63CF\u8FF0(\u9009\u586B)", value: description, onChange: function (e) {
|
||||
update({
|
||||
description: e.target.value,
|
||||
});
|
||||
}, maxLength: 200, autoSize: {
|
||||
minRows: 2,
|
||||
maxRows: 6,
|
||||
} }) }) }))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: t('service:attr.type'), name: "type", rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "\u672A\u586B\u5199".concat(t('service:attr.type')),
|
||||
},
|
||||
], requiredMark: true }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Select, { value: type, onChange: function (value) {
|
||||
update({
|
||||
type: value,
|
||||
});
|
||||
}, options: typeArr }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: t('service:attr.name'), name: "name", rules: [
|
||||
{
|
||||
required: true,
|
||||
message: '服务名称必填',
|
||||
},
|
||||
] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input, { placeholder: "\u8BF7\u8F93\u5165\u670D\u52A1\u540D\u79F0", onChange: function (e) {
|
||||
update({
|
||||
name: e.target.value,
|
||||
});
|
||||
}, value: name }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: t('service:attr.show'), name: "show", rules: [
|
||||
{
|
||||
required: true,
|
||||
message: "\u672A\u586B\u5199".concat(t('service:attr.show')),
|
||||
},
|
||||
], requiredMark: true, tooltip: "\u6D89\u53CA\u4EA7\u54C1\u521B\u5EFA\u548C\u8BE6\u60C5\u663E\u793A" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Select, { value: show, onChange: function (value) {
|
||||
update({
|
||||
show: value,
|
||||
});
|
||||
}, options: [
|
||||
'shop',
|
||||
'independent',
|
||||
'self',
|
||||
].map(function (ele) { return ({
|
||||
label: t("service:v.show.".concat(ele)),
|
||||
value: ele,
|
||||
}); }) }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "\u56FE\u6807", rules: [
|
||||
{
|
||||
required: true,
|
||||
},
|
||||
], help: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.help }, { children: (0, jsx_runtime_1.jsx)("span", { children: "\u4EC5\u652F\u6301SVG\u683C\u5F0F\u3002" }) })) }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(gallery_1.default, { accept: ".svg, .SVG", oakPath: oakFullpath
|
||||
? "".concat(oakFullpath, ".extraFile$entity")
|
||||
: undefined, type: "image", origin: "qiniu", tag1: "icon", entity: "service" }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: t('service:attr.description'), name: "description" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(TextArea, { showCount: true, placeholder: "\u8BF7\u8F93\u5165\u63CF\u8FF0(\u9009\u586B)", value: description, onChange: function (e) {
|
||||
update({
|
||||
description: e.target.value,
|
||||
});
|
||||
}, maxLength: 200, autoSize: {
|
||||
minRows: 2,
|
||||
maxRows: 6,
|
||||
} }) }) }))] })), (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: "\u63D0\u4EA4" })), (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ onClick: function () {
|
||||
reset();
|
||||
} }, { children: "\u91CD\u7F6E" }))] }) }))] })) })) }) })) })));
|
||||
}
|
||||
exports.default = render;
|
||||
|
|
@ -19,7 +19,7 @@ export type WechatMpConfig = {
|
|||
mode: 'clear' | 'compatible' | 'safe'; //消息加解密方式 明文模式 兼容模式 安全模式
|
||||
dataFormat: 'json' | 'xml';
|
||||
};
|
||||
passport: Passport[];
|
||||
passport?: Passport[];
|
||||
};
|
||||
|
||||
export type WebConfig = {
|
||||
|
|
@ -30,7 +30,7 @@ export type WebConfig = {
|
|||
domain?: string;
|
||||
enable?: boolean; //启用扫码登录
|
||||
};
|
||||
passport: Passport[];
|
||||
passport?: Passport[];
|
||||
};
|
||||
|
||||
export type WechatPublicTemplateMsgsConfig = Record<string, string>; // key值代表messageTypeId,value的值代表对应的templateId,data的转换改成message上的函数注入
|
||||
|
|
@ -54,7 +54,7 @@ export type WechatPublicConfig = {
|
|||
//公众号跳小程序配置 originalId
|
||||
originalId: string; //原始id
|
||||
};
|
||||
passport: Passport[];
|
||||
passport?: Passport[];
|
||||
};
|
||||
|
||||
export interface Schema extends EntityShape {
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ export default function Render(
|
|||
</Space>
|
||||
</>
|
||||
</Form.Item>
|
||||
<Form.Item label="微信帐号">
|
||||
{/* <Form.Item label="微信帐号">
|
||||
<>
|
||||
{wechatUser ? (
|
||||
<Space>
|
||||
|
|
@ -227,7 +227,7 @@ export default function Render(
|
|||
</Button>
|
||||
)}
|
||||
</>
|
||||
</Form.Item>
|
||||
</Form.Item> */}
|
||||
<Form.Item
|
||||
wrapperCol={{
|
||||
xs: { offset: 4 },
|
||||
|
|
|
|||
Loading…
Reference in New Issue