模型转换应用

This commit is contained in:
qinoy 2022-09-30 16:40:01 +08:00
parent 595f0b3738
commit 68e3fd5e81
86 changed files with 90932 additions and 2 deletions

View File

@ -0,0 +1,5 @@
node_modules
.DS_Store
dist
dist-ssr
*.local

View File

@ -0,0 +1,17 @@
module.exports = {
moduleTemplateInAWS: "apps/install/com.actionsoft.apps.coe.pal.modelconvert/template/page/main.htm", /*apps/install/_bpm.platform/template/page/console.m.dw.design.vue.htm*/ //build后生成到平台的模板位置及名称
outputDir: "apps/install/com.actionsoft.apps.coe.pal.modelconvert/web/com.actionsoft.apps.coe.pal.modelconvert/main", /*webserver/webapps/portal/apps/_bpm.platform/dw/designer/main*/ //build后js或css生成到平台的位置
publicPath: "../apps/com.actionsoft.apps.coe.pal.modelconvert/main", /*../apps/_bpm.platform/dw/designer/main*/ //build到平台后生成到模板中引入js文件的相对平台的位置
importAWSCSS: [ //引入平台的css在portal目录开始,开发或build通用
"commons/css/font/iconfont.css"
],
importAWSJS: [ //引入平台的js
// 示例
// "commons/js/jquery/scripts/ui/echarts/echarts.min.js",
// "commons/js/jquery/scripts/ui/echarts/mapJsonJs/china.js",
// "commons/js/jquery/scripts/ui/echarts/theme/white_bg.js",
// "commons/js/jquery/scripts/ui/echarts/walden.js",
// "commons/js/jquery/scripts/ui/echarts/theme/black_bg.js",
//"commons/js/util/Base64.js",
],
}

View File

@ -0,0 +1,9 @@
module.exports = {
AWSPortalUrl: "http://localhost:8088/portal/",//aws平台启动地址用于开发时获取平台静态资源请求数据等注意最后的/,不要删)
AWSReleasePath: "/Users/actionsoft/Documents/workspace/IDEA/yili_coding/release/", /*C:/work/workspace/release/*/ //aws的平台路径暂时写绝对路径用于build生成的主文件位置注意最后的/,不要删)
devUserInfo: {//开发时通过用户名及密码获取sessionId前提必须需要安装并启动appcom.actionsoft.apps.getsession.app
userid: "admin", //具有后台管理的用户名
pwd: "admin", //密码
deviceType: "pc",
}
}

View File

@ -0,0 +1,11 @@
# Vue 3 + Typescript + Vite
This template should help get you started developing with Vue 3 and Typescript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
## Recommended IDE Setup
- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
## Type Support For `.vue` Imports in TS
Since TypeScript cannot handle type information for `.vue` imports, they are shimmed to be a generic Vue component type by default. In most cases this is fine if you don't really care about component prop types outside of templates. However, if you wish to get actual prop types in `.vue` imports (for example to get props validation when using manual `h(...)` calls), you can enable Volar's `.vue` type support plugin by running `Volar: Switch TS Plugin on/off` from VSCode command palette.

View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script>
if(window.navigator.userAgent.indexOf('MSIE') > -1 || window.navigator.userAgent.indexOf('Trident') > -1){
window.location.replace("../not_support_vue.htm");
}
</script>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="/favicon.ico" />
<title></title>
${AWSJSAndCSSImport}
<!--
其它的js或css引用方式示例<%= htmlWebpackPlugin.options.awsjsandcsspath%>
<link rel="stylesheet" type="text/css" href="<%= htmlWebpackPlugin.options.awsjsandcsspath%>apps/_bpm.platform/css/model/console.m.dw.design.css"/>
-->
<script>
const settingParam = ${settingParam};
const axiosBaseUrl = "${axiosBaseUrl}";
const production = ${isProduction};
const devUserInfo = ${devUserInfo};
</script>
</head>
<body style="margin:0;">
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
<!-- built files will be auto injected -->
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,25 @@
import { App } from "vue";
import acAddress from "./src/ac-address.vue";
declare interface acOption {
sid: '';
width: number;
resourceId: string;
resourceType: string;
assignmentTypes?: string;
groupType: string;
title: string;
permissionType: string;
accessModeScope: string;
isRestrict: Boolean;
callback?: (acList: any) => void;
}
declare const openAc: (options: acOption) => void;
declare const closeAc: () => void;
export { acOption, openAc, closeAc, acAddress };
declare const _default: {
install: (app: App) => void;
openAc: (options: acOption) => void;
closeAc: () => void;
acAddress: import("vue").DefineComponent<{}, {}, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{} & {} & {}>, {}>;
};
export default _default;

View File

@ -0,0 +1,21 @@
declare interface addressOption {
data: {
value: string;
address: string;
sid: string;
appId: string;
addressDomId: string;
formData: string;
width: Number;
height: Number;
cmd: string;
title: string;
};
url: string;
type: string;
}
declare const _default: {
openAddress: (options: addressOption) => void;
closeAddress: () => void;
};
export default _default;

View File

@ -0,0 +1,21 @@
declare module 'axios' {
interface AxiosRequestConfig {
alert?: boolean;
result: string;
}
}
declare module 'axios' {
interface AxiosResponse {
result: string;
}
}
declare const _default: {
config: (AWSPageContext: any) => void;
get(params: any): void;
post<T = any>(params: {
url: string;
data: T;
}): Promise<import("axios").AxiosResponse<any>>;
aslp(params: any): Promise<import("axios").AxiosResponse<any>>;
};
export default _default;

View File

@ -0,0 +1,2 @@
import AwsAppInfo from './src/app-info.vue';
export default AwsAppInfo;

View File

@ -0,0 +1,2 @@
import AwsAppSelect from './src/app-select.vue';
export default AwsAppSelect;

View File

@ -0,0 +1,2 @@
import AwsuiAside from './src/aside.vue';
export default AwsuiAside;

View File

@ -0,0 +1,2 @@
import AwsuiButtonGroup from '../button/src/button-group.vue';
export default AwsuiButtonGroup;

View File

@ -0,0 +1,2 @@
import AwsuiButton from './src/button.vue';
export default AwsuiButton;

View File

@ -0,0 +1,2 @@
import AwsuiCascader from './src/cascader.vue';
export default AwsuiCascader;

View File

@ -0,0 +1,2 @@
import AwsuiCheckbox from './src/checkbox.vue';
export default AwsuiCheckbox;

View File

@ -0,0 +1,8 @@
import AwsuiCodeHelper from './src/CodeHelper.vue';
import "../../plugins/codemirror_lasted/codemirror/lib/codemirror.css";
import "../../plugins/codemirror_lasted/codemirror/theme/dracula.css";
import "../../plugins/codemirror_lasted/codemirror/addon/display/fullscreen.css";
import "../../plugins/codemirror_lasted/codemirror/addon/display/fullscreen";
import "../../plugins/codemirror_lasted/codemirror/mode/javascript/javascript";
import "../../plugins/codemirror_lasted/codemirror/mode/css/css";
export default AwsuiCodeHelper;

View File

@ -0,0 +1,2 @@
import AwsuiCodemirror from './src/codemirror.vue';
export default AwsuiCodemirror;

View File

@ -0,0 +1,2 @@
import AwsuiCol from './src/col';
export default AwsuiCol;

View File

@ -0,0 +1,83 @@
import type { PropType } from 'vue';
declare type SizeObject = {
span: number;
offset: number;
};
declare const AwsuiCol: import("vue").DefineComponent<{
tag: {
type: StringConstructor;
default: string;
};
span: {
type: NumberConstructor;
default: number;
};
offset: {
type: NumberConstructor;
default: number;
};
pull: {
type: NumberConstructor;
default: number;
};
push: {
type: NumberConstructor;
default: number;
};
xs: {
type: PropType<number | SizeObject>;
default: () => SizeObject;
};
sm: {
type: PropType<number | SizeObject>;
default: () => SizeObject;
};
md: {
type: PropType<number | SizeObject>;
default: () => SizeObject;
};
lg: {
type: PropType<number | SizeObject>;
default: () => SizeObject;
};
xl: {
type: PropType<number | SizeObject>;
default: () => SizeObject;
};
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
tag?: unknown;
span?: unknown;
offset?: unknown;
pull?: unknown;
push?: unknown;
xs?: unknown;
sm?: unknown;
md?: unknown;
lg?: unknown;
xl?: unknown;
} & {
tag: string;
span: number;
offset: number;
pull: number;
push: number;
xs: number | SizeObject;
sm: number | SizeObject;
md: number | SizeObject;
lg: number | SizeObject;
xl: number | SizeObject;
} & {}>, {
tag: string;
span: number;
offset: number;
pull: number;
push: number;
xs: number | SizeObject;
sm: number | SizeObject;
md: number | SizeObject;
lg: number | SizeObject;
xl: number | SizeObject;
}>;
export default AwsuiCol;

View File

@ -0,0 +1,2 @@
import deploy from './src/deploy.vue';
export default deploy;

View File

@ -0,0 +1,2 @@
import AwsuiDialog from './src/dialog.vue';
export default AwsuiDialog;

View File

@ -0,0 +1,2 @@
import AwsuiDownSelectItem from './src/down-select-item.vue';
export default AwsuiDownSelectItem;

View File

@ -0,0 +1,2 @@
import AwsuiDownSelect from '../down-select-item/src/down-select.vue';
export default AwsuiDownSelect;

View File

@ -0,0 +1,11 @@
import 'element-plus/dist/index.css';
import 'dayjs/locale/zh-cn';
import { App } from "vue";
declare const _default: {
Element: {
version: string;
install: (app: App<any>, opts: import("element-plus/lib/utils/config").InstallOptions) => void;
};
install(app: App): void;
};
export default _default;

View File

@ -0,0 +1,2 @@
import AwsuiFooter from './src/footer.vue';
export default AwsuiFooter;

View File

@ -0,0 +1,2 @@
import AwsuiFormItem from '../form/src/form-item.vue';
export default AwsuiFormItem;

View File

@ -0,0 +1,2 @@
import Form from './src/form.vue';
export default Form;

View File

@ -0,0 +1,14 @@
declare interface formulaOption {
url: string;
data: {
sid: string;
cmd: string;
contextData: string;
};
callback?: (acList: any) => void;
}
declare const _default: {
openFormula: (options: formulaOption) => void;
closeFormula: () => void;
};
export default _default;

View File

@ -0,0 +1,2 @@
import AwsuiHeader from './src/header.vue';
export default AwsuiHeader;

View File

@ -0,0 +1,2 @@
import hello from './src/HelloWorld.vue';
export default hello;

View File

@ -0,0 +1,2 @@
import AwsuiIconPicker from './src/icon-picker.vue';
export default AwsuiIconPicker;

View File

@ -0,0 +1,2 @@
import iframe from './src/iframe.vue';
export default iframe;

View File

@ -0,0 +1,31 @@
declare interface iframeOption {
/**
*
*/
url: string;
/**
*
*/
data?: any;
/**
*
*/
width?: string;
/**
*
*/
height?: string;
/**
*使
*/
scrolling?: string;
/**
*
*/
type?: "get" | "post" | string;
/**
*
*/
onload?: () => void;
}
export { iframeOption };

View File

@ -0,0 +1,111 @@
declare module 'axios' {
interface AxiosResponse {
result: string;
}
}
import { App } from "vue";
import ElementUI from "./ele/index";
import "../static/css/reset.css";
import "../static/css/public.css";
import type { InstallOptions } from 'element-plus/packages/utils/config';
import AwsuiCodemirror from "./codemirror/index";
import axios from "./api/awsAxios";
import getSid from "./utils/sid";
import tools from "./utils/tools";
declare const CodeMirror: any;
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
AWSPageContext?: {
devUserInfo?: any;
formulaLabelMap?: any;
settingParam?: any;
axiosBaseUrl?: string;
production?: boolean;
iconfontMap?: any;
};
}
}
declare const install: (app: App, opt: InstallOptions) => void;
import AwsuiFormulaDialog from "./formula/index";
export { CodeMirror, AwsuiCodemirror, install, AwsuiFormulaDialog, ElementUI, getSid, tools, axios };
declare const _default: {
HelloWorld: import("vue").DefineComponent<{}, {}, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{} & {} & {}>, {}>;
CodeMirror: any;
AwsuiCodemirror: import("vue").DefineComponent<{}, {}, any, import("vue").ComputedOptions, import("vue").MethodOptions, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{} & {} & {}>, {}>;
install: (app: App<any>, opt: InstallOptions) => void;
ElementUI: {
Element: {
version: string;
install: (app: App<any>, opts: import("element-plus/lib/utils/config").InstallOptions) => void;
};
install(app: App<any>): void;
};
tools: {
tools: {
getConstByName<T = any>(name: string, defaultValue: T): T;
uuid(): string;
getCountIndex(type?: string | undefined): number;
isNotNull(str: string): boolean;
isNull(str: string): boolean;
isNotNullObject(obj: any): boolean;
queryObjectInArrayIndex(arr: string[], objKey: any, filed: string): number;
getOffset: (elem: HTMLElement) => {
top: number;
left: number;
height: number;
width: number;
};
addCls: (toDom: HTMLElement, cls: string) => void;
removeCls: (toDom: HTMLElement, cls: string) => void;
_buildIndex(baseId: string, ...args: any[]): string;
formatDate(date: Date, fmt: string): string;
generMenuId(item: any, baseId: string, i?: number | null | undefined): void;
getBrowser(): {
isStrict: boolean;
isOpera: boolean;
isSafari: boolean;
isIE: boolean;
isIE6: boolean;
isIE7: boolean;
isIE8: boolean;
isIE9: boolean;
isIE10: boolean;
isIE11: boolean;
isGecko: boolean;
isFirefox: boolean;
isChrome: boolean;
isBorderBox: boolean;
isWindows: boolean;
isMac: boolean;
isAir: boolean;
isLinux: boolean;
isSecure: boolean;
isIPhone: boolean;
isIPhoneX: boolean;
isIPad: boolean;
isAWSMobilePortalApp: boolean;
isAndroid: boolean;
isDingtalk: boolean;
isWechat: boolean;
isWxWork: boolean;
isFeishu: boolean;
isWeLink: boolean;
isMobile: boolean;
};
};
install(app: App<any>): void;
};
getSid: {
exec(app: App<any>): Promise<void>;
};
axios: {
config: (AWSPageContext: any) => void;
get(params: any): void;
post<T_1 = any>(params: {
url: string;
data: T_1;
}): Promise<import("axios").AxiosResponse<any>>;
aslp(params: any): Promise<import("axios").AxiosResponse<any>>;
};
};
export default _default;

View File

@ -0,0 +1,2 @@
import input from './src/input.vue';
export default input;

View File

@ -0,0 +1,2 @@
import AwsuiLayout from './src/layout.vue';
export default AwsuiLayout;

View File

@ -0,0 +1,2 @@
import AwsuiMain from './src/main.vue';
export default AwsuiMain;

View File

@ -0,0 +1,18 @@
import "./css.css";
declare let _common: any;
export default _common;
export { _common };
export declare function messageObject(): {
message: import("element-plus/es/utils/types").SFCWithInstall<import("element-plus").IMessage>;
messageBox: import("element-plus/es/utils/types").SFCWithInstall<import("element-plus").IElMessageBox>;
};
export declare function message(options: any): import("element-plus").IMessageHandle;
export declare function messageSuccess(options: any): import("element-plus").IMessageHandle;
export declare function messageWarning(options: any): import("element-plus").IMessageHandle;
export declare function messageError(options: any): import("element-plus").IMessageHandle;
export declare function msgbox(options: any): Promise<import("element-plus").MessageBoxData>;
export declare function alert(message: any, title: any, options: any): Promise<import("element-plus").MessageBoxData>;
export declare function confirm(message: any, title: any, options: any): Promise<import("element-plus").MessageBoxData>;
export declare function prompt(message: any, title: any, options: any): Promise<import("element-plus").MessageBoxData>;
export declare function MessageWarning(text?: string): void;
export declare function MessageBoxWarning(text?: string): Promise<import("element-plus").MessageBoxData>;

View File

@ -0,0 +1,2 @@
import AwsuiPopover from './src/popover.vue';
export default AwsuiPopover;

View File

@ -0,0 +1,2 @@
import AwsuiSelect from './src/radio.vue';
export default AwsuiSelect;

View File

@ -0,0 +1,2 @@
import CustomMenu from './src/CustomMenu.vue';
export default CustomMenu;

View File

@ -0,0 +1,2 @@
import itemMenu from './src/ItemMenu.vue';
export default itemMenu;

View File

@ -0,0 +1,2 @@
import tabMenu from './src/TabMenu.vue';
export default tabMenu;

View File

@ -0,0 +1,2 @@
import richMenu from './src/popList/RichMenu.vue';
export default richMenu;

View File

@ -0,0 +1,3 @@
declare const menuOpenComponents: string[];
declare const bindMenu: (el: HTMLElement, binding: any, vnode: any, prevNode: any) => void;
export { menuOpenComponents, bindMenu };

View File

@ -0,0 +1,393 @@
declare interface menuItem {
/**
*,
*/
id?: string;
/**
*
*/
type?: string;
/**
* li的样式
*/
liStyle?: object;
/**
*button
*/
buttonEdit?: {
/**
*
*/
exec: (data: menuItem) => void;
};
/**
*
*/
exec?: (data: menuItem, params?: any) => void;
/**
*
*/
label?: string;
/**
* 便
*/
name?: string;
/**
*
*/
stext?: string;
/**
* li支持拖拽
*/
draggable?: boolean;
/**
*
*/
editable?: boolean;
/**
*placeholder
*/
placeholder?: string;
/**
*
*/
editType?: string;
/**
*edit的值
*/
value?: string;
/**
*
*/
update?: (data: menuItem | string, params?: any) => void;
/**
*
*/
required?: boolean;
/**
* [requiredName]
*/
requiredName?: string;
/**
*
*/
icon?: string;
/**
*
*/
checked?: boolean;
/**
*
*/
checkGroup?: string;
/**
*
*/
hidden?: boolean;
/**
*
*/
multiple?: boolean;
/**
*
*/
check?: (data: menuItem) => void;
/**
*
*/
uncheck?: (data: menuItem) => void;
/**
*scroll
*/
childrenAutoScroll?: boolean;
/**
*
*/
childrenNoIcon?: boolean;
/**
*slot名称slot内容slotslot
*/
slot?: string;
/**
*tabmenu时
*/
isActive?: boolean;
/**
*ac设置服务参数ac后stext属性文字的改变
*/
needChangeState?: any;
/**
*inputnumber组件
*/
inputNumber?: {
/**
*
*/
max?: number;
/**
*
*/
min?: number;
/**
*
*/
options?: [
{
value?: string;
}
];
/**
*
*/
value?: string;
symbol?: string;
};
titleStyle?: any;
iconStyle?: any;
style?: any;
topLine?: boolean;
/**
*
*/
baseItem?: any;
/**
*
*/
isMenuOpenComponent?: boolean;
/**
*
*/
children?: menuItem[];
/**
*
*/
btn?: {
/**
*
*/
exec?: (data: menuItem) => void;
};
/**
*colorpciker配置
*/
colorPicker?: {
value?: string;
};
/**
*itemmenu中的属性
*/
/**
*
*/
drag?: boolean;
/**
*
*/
disable?: boolean;
/**
*使使
*/
disableStyle?: boolean;
/**
*option中的
*/
itemMenuClass?: object;
/**
*option中的
*/
itemMenuStyle?: object;
/**
* "last",
*/
fixed?: string;
/**
*html
*/
html?: string;
/**
*
*/
close?: boolean;
}
declare interface transmitItem {
/**
*
*/
root?: boolean;
/**
*
*/
showPop: number;
/**
*
*/
closePop: number;
/**
*
*/
zIndex?: number;
/**
*dom进行计算top和left位置
*/
popToTarget?: HTMLElement;
/**
*
*/
offset?: number;
/**
*dom
*/
popTarget?: HTMLElement;
/**
*menu
*/
allowmenu?: boolean;
/**
*pop时执行
*/
openPopExec?: () => void;
/**
*pop时执行
*/
closePopExec?: () => void;
/**
*,
*/
childrenNoIcon?: boolean;
parentValue?: menuItem;
absoluteLeft?: (obj1: transmitItem, obj2: transmitItem) => number | number;
absoluteTop?: (obj1: transmitItem, obj2: transmitItem) => number | number;
/**
* rootfalse则阻止关闭
* @param e
* @param $this vue上下文
*/
beforeLeaveMenuClose?: (e: Event, $this: any) => boolean;
/**
*
*/
context: {
/**
*
*/
top?: number;
left?: number;
right?: number;
bottom?: number;
/**
*
*/
rootOffset: {
top?: number;
left?: number;
} | null;
} | null;
}
declare interface tabMenuItem {
/**
*li的样式
*/
liStyle?: object;
/**
*
*/
dstyle?: object;
/**
*span的样式
*/
spanStyle?: object;
id: string;
/**
* input的值
*/
value: string;
hidden?: boolean;
/**
*tooltip内容
*/
tip?: string;
/**
*线
*/
showRLine?: boolean;
/**
*ui类型
*/
uiType?: string;
option?: {
/**
* uiType == 'icon'
*/
icon?: string;
/**
* uiType == 'icon'
*/
circle?: boolean;
/**
*uiType == 'button'
*/
label?: string;
/**
*uiType == 'button'
*/
type?: string;
/**
*uiType == 'template'
*/
name?: string;
/**
*li的class样式
*/
class?: object;
};
}
/**
*itemMenu的option描述
*/
declare interface itemMenuOption {
/**
*
*/
customClass?: object;
/**
*
*/
customStyle?: object;
/**
*item中的itemMenuClass
*/
customItemClass?: object;
/**
*item中的itemMenuStyle
*/
customItemStyle?: object;
/**
*
*/
draggable?: boolean;
/**
*使
*/
customTemplate?: boolean;
/**
*
*/
columnNum?: number;
/**
*
*/
minWidth?: number;
/**
*customTemplate为true
*/
marginLeftForColumnNum?: number;
absoluteLeft?: (obj1: transmitItem, obj2: transmitItem) => number | number;
absoluteTop?: (obj1: transmitItem, obj2: transmitItem) => number | number;
/**
* rootfalse则阻止关闭
* @param e
* @param $this vue上下文
*/
beforeLeaveMenuClose?: (e: Event, $this: any) => boolean;
}
export { menuItem, transmitItem, tabMenuItem, itemMenuOption };

View File

@ -0,0 +1,2 @@
import AwsuiRow from './src/row';
export default AwsuiRow;

View File

@ -0,0 +1,43 @@
declare const _default: import("vue").DefineComponent<{
tag: {
type: StringConstructor;
default: string;
};
gutter: {
type: NumberConstructor;
default: number;
};
type: {
type: StringConstructor;
default: string;
};
justify: {
type: StringConstructor;
default: string;
};
align: {
type: StringConstructor;
default: string;
};
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
[key: string]: any;
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
tag?: unknown;
gutter?: unknown;
type?: unknown;
justify?: unknown;
align?: unknown;
} & {
tag: string;
gutter: number;
type: string;
justify: string;
align: string;
} & {}>, {
tag: string;
gutter: number;
type: string;
justify: string;
align: string;
}>;
export default _default;

View File

@ -0,0 +1,2 @@
import scrollBar from './src/Scrollbar.vue';
export default scrollBar;

View File

@ -0,0 +1,2 @@
import AwsuiSelect from './src/select.vue';
export default AwsuiSelect;

View File

@ -0,0 +1,2 @@
import sidebar from './src/sidebar.vue';
export default sidebar;

View File

@ -0,0 +1,2 @@
import AwsuiSwitch from './src/switch.vue';
export default AwsuiSwitch;

View File

@ -0,0 +1,2 @@
import AwsuiTree from './src/tree.vue';
export default AwsuiTree;

View File

@ -0,0 +1,2 @@
import upgradeService from "./src/upgrade-service.vue";
export default upgradeService;

View File

@ -0,0 +1,2 @@
import AwsuiUploadImage from './src/upload-image.vue';
export default AwsuiUploadImage;

View File

@ -0,0 +1,8 @@
/**
* database64文件格式转换为2进制
*
* @param {[String]} data dataURL data:image/png;base64,****,
* @param {[String]} mime [description]
* @return {[blob]} [description]
*/
export default function (data: any, mime: any): Blob;

View File

@ -0,0 +1,8 @@
/**
*
*
* @param {[event]} e [description]
* @param {[Object]} arg_opts [description]
* @return {[bollean]} [description]
*/
export default function (e: any, arg_opts: any): false | undefined;

View File

@ -0,0 +1,174 @@
declare const _default: {
zh: {
hint: string;
loading: string;
noSupported: string;
success: string;
fail: string;
preview: string;
btn: {
off: string;
close: string;
back: string;
save: string;
};
error: {
onlyImg: string;
outOfSize: string;
lowestPx: string;
};
};
en: {
hint: string;
loading: string;
noSupported: string;
success: string;
fail: string;
preview: string;
btn: {
off: string;
close: string;
back: string;
save: string;
};
error: {
onlyImg: string;
outOfSize: string;
lowestPx: string;
};
};
ro: {
hint: string;
loading: string;
noSupported: string;
success: string;
fail: string;
preview: string;
btn: {
off: string;
close: string;
back: string;
save: string;
};
error: {
onlyImg: string;
outOfSize: string;
loewstPx: string;
};
};
ru: {
hint: string;
loading: string;
noSupported: string;
success: string;
fail: string;
preview: string;
btn: {
off: string;
close: string;
back: string;
save: string;
};
error: {
onlyImg: string;
outOfSize: string;
lowestPx: string;
};
};
'pt-br': {
hint: string;
loading: string;
noSupported: string;
success: string;
fail: string;
preview: string;
btn: {
off: string;
close: string;
back: string;
save: string;
};
error: {
onlyImg: string;
outOfSize: string;
lowestPx: string;
};
};
fr: {
hint: string;
loading: string;
noSupported: string;
success: string;
fail: string;
preview: string;
btn: {
off: string;
close: string;
back: string;
save: string;
};
error: {
onlyImg: string;
outOfSize: string;
lowestPx: string;
};
};
nl: {
hint: string;
loading: string;
noSupported: string;
success: string;
fail: string;
preview: string;
btn: {
off: string;
close: string;
back: string;
save: string;
};
error: {
onlyImg: string;
outOfSize: string;
lowestPx: string;
};
};
tr: {
hint: string;
loading: string;
noSupported: string;
success: string;
fail: string;
preview: string;
btn: {
off: string;
close: string;
back: string;
save: string;
};
error: {
onlyImg: string;
outOfSize: string;
lowestPx: string;
};
};
'es-MX': {
hint: string;
loading: string;
noSupported: string;
success: string;
fail: string;
preview: string;
btn: {
off: string;
close: string;
back: string;
save: string;
};
error: {
onlyImg: string;
outOfSize: string;
lowestPx: string;
};
};
};
export default _default;

View File

@ -0,0 +1,5 @@
import { App } from "vue";
declare const _default: {
exec(app: App): Promise<void>;
};
export default _default;

View File

@ -0,0 +1,229 @@
import type { App } from "vue";
declare const tools: {
/**
* const变量
* @name
* @defaultValue
*
*/
getConstByName<T = any>(name: string, defaultValue: T): T;
/**
* 36ID字符串
*/
uuid(): string;
/**
* 1
* @param type 1
*/
getCountIndex(type?: string | undefined): number;
/**
* undefined
*/
isNotNull(str: string): boolean;
/**
* undefined
*/
isNull(str: string): boolean;
/**
* Object对象是否为空Boolean
*/
isNotNullObject(obj: any): boolean;
/**
* Object对象在Array中的索引值
*/
queryObjectInArrayIndex(arr: string[], objKey: any, filed: string): number;
/**
* offsetJquery的offset方法
* @param elem DOM对象
*
*/
getOffset: (elem: HTMLElement) => {
top: number;
left: number;
height: number;
width: number;
};
/**
* dom的样式
* @param toDom DOM对象
* @param cls
*
*/
addCls: (toDom: HTMLElement, cls: string) => void;
/**
* dom的样式
* @param toDom DOM对象
* @param cls
*
*/
removeCls: (toDom: HTMLElement, cls: string) => void;
_buildIndex(baseId: string, ...args: any[]): string;
/**
*
* @params date
* @params fmt
*/
formatDate(date: Date, fmt: string): string;
/**
* Idchildren~
* @param item
* @param baseId ID进行生成
* @param number
*
*/
generMenuId(item: any, baseId: string, i?: number | null | undefined): void;
/**
*
*/
getBrowser(): {
isStrict: boolean;
isOpera: boolean;
isSafari: boolean;
isIE: boolean;
isIE6: boolean;
isIE7: boolean;
isIE8: boolean;
isIE9: boolean;
isIE10: boolean;
isIE11: boolean;
isGecko: boolean;
isFirefox: boolean;
isChrome: boolean;
isBorderBox: boolean;
isWindows: boolean;
isMac: boolean;
isAir: boolean;
isLinux: boolean;
isSecure: boolean;
isIPhone: boolean;
isIPhoneX: boolean;
isIPad: boolean;
isAWSMobilePortalApp: boolean;
isAndroid: boolean;
isDingtalk: boolean;
isWechat: boolean;
isWxWork: boolean;
isFeishu: boolean;
isWeLink: boolean;
isMobile: boolean;
};
};
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
awsuiTools: typeof tools;
}
}
export { tools };
declare const _default: {
tools: {
/**
* const变量
* @name
* @defaultValue
*
*/
getConstByName<T = any>(name: string, defaultValue: T): T;
/**
* 36ID字符串
*/
uuid(): string;
/**
* 1
* @param type 1
*/
getCountIndex(type?: string | undefined): number;
/**
* undefined
*/
isNotNull(str: string): boolean;
/**
* undefined
*/
isNull(str: string): boolean;
/**
* Object对象是否为空Boolean
*/
isNotNullObject(obj: any): boolean;
/**
* Object对象在Array中的索引值
*/
queryObjectInArrayIndex(arr: string[], objKey: any, filed: string): number;
/**
* offsetJquery的offset方法
* @param elem DOM对象
*
*/
getOffset: (elem: HTMLElement) => {
top: number;
left: number;
height: number;
width: number;
};
/**
* dom的样式
* @param toDom DOM对象
* @param cls
*
*/
addCls: (toDom: HTMLElement, cls: string) => void;
/**
* dom的样式
* @param toDom DOM对象
* @param cls
*
*/
removeCls: (toDom: HTMLElement, cls: string) => void;
_buildIndex(baseId: string, ...args: any[]): string;
/**
*
* @params date
* @params fmt
*/
formatDate(date: Date, fmt: string): string;
/**
* Idchildren~
* @param item
* @param baseId ID进行生成
* @param number
*
*/
generMenuId(item: any, baseId: string, i?: number | null | undefined): void;
/**
*
*/
getBrowser(): {
isStrict: boolean;
isOpera: boolean;
isSafari: boolean;
isIE: boolean;
isIE6: boolean;
isIE7: boolean;
isIE8: boolean;
isIE9: boolean;
isIE10: boolean;
isIE11: boolean;
isGecko: boolean;
isFirefox: boolean;
isChrome: boolean;
isBorderBox: boolean;
isWindows: boolean;
isMac: boolean;
isAir: boolean;
isLinux: boolean;
isSecure: boolean;
isIPhone: boolean;
isIPhoneX: boolean;
isIPad: boolean;
isAWSMobilePortalApp: boolean;
isAndroid: boolean;
isDingtalk: boolean;
isWechat: boolean;
isWxWork: boolean;
isFeishu: boolean;
isWeLink: boolean;
isMobile: boolean;
};
};
install(app: App): void;
};
export default _default;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,66 @@
{
"name": "vue3.0-ts-template",
"version": "0.0.1",
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview"
},
"dependencies": {
"core-js": "^3.6.5",
"register-service-worker": "^1.7.1",
"vue": "^3.2.19",
"vue-router": "^4.0.2",
"vuex": "^4.0.2"
},
"devDependencies": {
"fs-extra": "^10.0.0",
"@types/fs-extra": "^9.0.12",
"@typescript-eslint/eslint-plugin": "^4.18.0",
"@typescript-eslint/parser": "^4.18.0",
"@vue/eslint-config-typescript": "^7.0.0",
"@vitejs/plugin-vue": "^2.3.3",
"@vue/compiler-sfc": "^3.2.19",
"babel-polyfill": "^6.26.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^7.0.0",
"less": "^3.0.4",
"less-loader": "^5.0.0",
"typescript": "^4.3.2",
"vite": "^2.9.9",
"vue-tsc": "^0.2.2"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended",
"@vue/typescript/recommended"
],
"parserOptions": {
"ecmaVersion": 2020
},
"rules": {
"generator-star-spacing": "off",
"no-tabs": "off",
"no-this-alias": "off",
"no-unused-vars": "off",
"no-console": "off",
"no-irregular-whitespace": "off",
"no-debugger": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,10 @@
<template>
<router-view/>
</template>
<style lang="less">
#app {
width: 100%;
height: 100%;
}
</style>

View File

@ -0,0 +1,83 @@
// 通用js方法文件
/**
* 打开一个新的窗口,post请求
* @param id id 唯一值body中创建请求表单的id
* @param sid sessionId
* @param cmd 请求cmd
* @param params 参数列表{param1 : value1,param2 : value2}
* @param target 不给定则默认_blank新窗口
*/
const newPageWin = function (id, sid, cmd, params, target) {
if (!params) {
params = {};
}
params.cmd = cmd;
params.sid = sid;
newWin(id, './w', params, target);
}
/**
* 打开一个新的窗口,post请求
* @param id 唯一值body中创建请求表单的id
* @param url 例如 ./w./jd
* @param params 这个{param1 : value1,param2 : value2}
* @param target 打开窗口方式 _blank_self
*/
const newWin = function (id, url, params, target) {
// 防止反复添加
var dom = document.getElementById(id);
if(dom) {
document.body.removeChild(dom);
}
var temp_form = document.createElement("form");
temp_form.action = url;
temp_form.target = target == undefined ? "_blank" : target;
temp_form.method = "get";
temp_form.style.display = "none";
for (var x in params) {
var opt = document.createElement("textarea");
opt.name = x;
opt.value = params[x];
temp_form.appendChild(opt);
}
temp_form.setAttribute('id', id);
document.body.appendChild(temp_form);
temp_form.submit();
}
// 打开流程模型文件
const openDesigner = function(teamId, id, sid) {
newPageWin('palDesigner', sid, 'com.actionsoft.apps.coe.pal_pl_repository_designer', {uuid: id, teamId: teamId});
}
// 退出pal
const logout = function(sid) {
window.location.replace("./w?sid=" + sid + "&cmd=com.actionsoft.apps.coe.pal_user_logout");
}
// 类jquery方法
const closest = function(node, targetNodeName) {// 类似jquery closest函数获得匹配选择器的第一个祖先元素从当前元素开始沿 DOM 树向上
let curr = node;
while (curr.nodeName != targetNodeName && curr.nodeName != 'BODY') {
curr = curr.parentNode;
}
if (curr.nodeName == targetNodeName) {
return curr;
} else {
return null;
}
}
/**
* 修改PAL网页标题
* @param newTitle
*/
const updateHtmlTitle = function(newTitle) {
document.getElementsByTagName("title")[0].innerText = newTitle;
}
export {newWin, newPageWin, openDesigner, logout, closest, updateHtmlTitle}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@ -0,0 +1,57 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
<span @click="clickText">基于vue3.0+typescript模板</span>
<br>
用户名{{userid}}
<br>
sessionID{{sessionID}}
</p>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
declare const devUserInfo:any;
declare const settingParam:any;
export default defineComponent({
name: 'HelloWorld',
props: {
msg: String,
},
methods : {
clickText(){
alert("点击事件")
}
},
computed:{
userid(){
return devUserInfo.userid;
},
sessionID(){
return settingParam.sessionId;
}
}
});
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>

View File

@ -0,0 +1,8 @@
/// <reference types="vite/client" />
declare module '*.vue' {
import { DefineComponent } from 'vue'
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>
export default component
}

View File

@ -0,0 +1,27 @@
import { createApp } from 'vue'
import App from './App.vue'
//import './registerServiceWorker' pwa配置暂时不用
import router from './router'
import store from './store'
/* eslint-disable */
import awsui from "../lib/awsui.es"; //注意awsui组件库根据情况指定路径
import "../lib/awsui.css";
const app = createApp(App);
app.use(store);
app.use(router);
app.use(awsui);
// app.use(ElementPlus, { size: 'small', zIndex: 3000 });
const mountApp = ()=>{
app.mount('#app');
}
const getSid = awsui.getSid;
if(app.config.globalProperties.AWSPageContext.production){
mountApp();
}else{
getSid.exec(app).then(()=>{
mountApp();
});
}

View File

@ -0,0 +1,32 @@
/* eslint-disable no-console */
import { register } from 'register-service-worker'
if (process.env.NODE_ENV === 'production') {
register(`${process.env.BASE_URL}service-worker.js`, {
ready () {
console.log(
'App is being served from cache by a service worker.\n' +
'For more details, visit https://goo.gl/AFskqB'
)
},
registered () {
console.log('Service worker has been registered.')
},
cached () {
console.log('Content has been cached for offline use.')
},
updatefound () {
console.log('New content is downloading.')
},
updated () {
console.log('New content is available; please refresh.')
},
offline () {
console.log('No internet connection found. App is running in offline mode.')
},
error (error) {
console.error('Error during service worker registration:', error)
}
})
}

View File

@ -0,0 +1,21 @@
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
const routes: Array<RouteRecordRaw> = [
{
path: '/',
name: 'Home',
component: () => import("../views/Home.vue")
},
{
path: '/history',
name: 'History',
component: () => import("../views/History.vue")
}
]
const router = createRouter({
history: createWebHashHistory(),
routes
})
export default router

View File

@ -0,0 +1,12 @@
import { createStore } from 'vuex'
export default createStore({
state: {
},
mutations: {
},
actions: {
},
modules: {
}
})

View File

@ -0,0 +1,5 @@
<template>
<div class="about">
<h1>This is an about page</h1>
</div>
</template>

View File

@ -0,0 +1,239 @@
<template>
<div class="header-container">
<div class="back-to-home" @click="backToHomeFn">
<span><i class="awsui-iconfont">&#xe6fa;</i></span>
<span>返回</span>
</div>
<div class="search-container">
<span>
共有{{ history.tableData.length }}条记录
</span>
<span>
<el-input v-model="searchText" placeholder="请输入流程名称进行搜索">
<template #prefix>
<i class="awsui-iconfont">&#xe6e9;</i>
</template>
</el-input>
</span>
</div>
</div>
<div class="main-container">
<el-table ref="tableRef" :data="history.tableData" style="width: 100%;padding: 0 20px;">
<el-table-column prop="serialNumber" label="序号" min-width="180" />
<el-table-column prop="convertType" label="类型" min-width="180"
column-key="convertType"
:filters="convertTypeFilters"
:filter-method="filterHandlerFn"
/>
<el-table-column prop="operatorName" label="操作人" min-width="180" />
<el-table-column prop="operationTime" label="操作时间" min-width="180" />
<el-table-column prop="convertCount" label="转换数量" min-width="180" />
<el-table-column prop="repositoryNames" label="转换流程" min-width="400" />
<el-table-column label="操作" min-width="180">
<template #default="scope">
<span style="color: rgb(80,168,246);cursor: pointer" @click="openProcessListFn(scope.$index, scope.row)">查看流程清单</span>
</template>
</el-table-column>
</el-table>
<el-drawer
custom-class="history-detail-drawer"
v-model="drawer.visible"
:title="drawer.title"
:direction="drawer.direction"
:close-on-click-modal="false"
:close-on-press-escape="false"
size="45%"
>
<div class="drawer-body-container">
<div class="drawer-body-header">
<span>
<i class="awsui-iconfont" style="color: #0d84ff">&#xe635;</i>
总计:
</span>
<span>
{{ drawer.processList.length }}支流程
</span>
</div>
<div class="drawer-body-main">
<el-table :data="drawer.processList" style="width: 100%" :header-row-style="drawer.headerRowStyle">
<el-table-column prop="serialNumber" label="序号" min-width="180" />
<el-table-column prop="repositoryName" label="流程名称" min-width="180" />
<el-table-column label="操作">
<template #default="scope">
<span style="color: rgb(80,168,246);cursor: pointer" @click="openModelFn(scope.$index, scope.row)">打开文件</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
</el-drawer>
</div>
</template>
<script lang="ts">
import {defineComponent,getCurrentInstance,onMounted,ref,reactive} from 'vue';
import {openDesigner} from "@/api/commonFun";
export default defineComponent({
name: "history",
setup() {
const { proxy: $this } = getCurrentInstance();
const history = reactive({
historyRecordList: [] as any,
tableData: [] as any
});
const convertTypeFilters = [
{text: 'EPC转FlowChart',sourceMethod: 'EPC',targetMethod: 'FlowChart',value: 'EPC转FlowChart'},
{text: 'EPC转BPMN',sourceMethod: 'EPC',targetMethod: 'BPMN',value: 'EPC转BPMN'},
{text: 'FlowChart转BPMN',sourceMethod: 'FlowChart',targetMethod: 'BPMN',value: 'FlowChart转BPMN'},
]
const searchText = ref('');
const drawer = reactive({
visible: false,
title: '流程清单',
direction: 'rtl',
headerRowStyle: {
paddingTop: '10px'
},
processList: []
});
//
const loadHistoryFn = () => {
let param = {
url: './jd',
data: {
cmd: 'com.actionsoft.apps.coe.pal.model_convert_history_record_list',
sid: settingParam.sessionId,
wsId: settingParam.wsId ? settingParam.wsId : "6f4e292c-1b90-4dd2-8c20-7da159cb20a5",
teamId: settingParam.teamId
}
}
$this.awsuiaxios.post(param)
.then((ro: any) => {
if (ro.result === 'ok'){
history.historyRecordList = [...ro.data.recordList];
history.tableData = [...ro.data.recordList];
}
})
.catch((err: any) => {
console.log(err)
})
}
//
const openProcessListFn = (index: any,row: any) => {
drawer.visible = true;
let param = {
url: './jd',
data: {
cmd: 'com.actionsoft.apps.coe.pal.model_convert_history_record_detail_list',
sid: settingParam.sessionId,
historyId: row.historyId
}
}
$this.awsuiaxios.post(param)
.then((ro: any) => {
// console.log('',ro)
if (ro.result === 'ok'){
drawer.processList = [];
ro.data.detailList.forEach((item: any,index: any) => {
item.serialNumber = index+1;
drawer.processList.push(item);
})
}
})
.catch((err: any) => {
console.log(err)
})
}
const filterHandlerFn = (value: string, row: any, column: any) => {
// console.log('value',value,'row',row,'column',column);
const property = column['property']
return row[property] === value
}
//
const openModelFn = (index: any,row: any) => {
openDesigner(settingParam.teamId, row.repositoryId,settingParam.sessionId);
}
const backToHomeFn = () => {
$this.$router.push('/');
}
onMounted(() => {
loadHistoryFn();
})
return {
history,
searchText,
openProcessListFn,
convertTypeFilters,
filterHandlerFn,
backToHomeFn,
drawer,
openModelFn
}
}
});
</script>
<style scoped lang="less">
.header-container {
padding: 15px 25px;
.back-to-home {
cursor: pointer;
span {
padding: 0 2px;
}
}
.search-container {
display: flex;
justify-content: space-between;
align-items: center;
span {
margin: 0 30px;
}
}
}
.main-container {
:deep(.history-detail-drawer) {
.el-drawer__header {
font-size: 18px;
}
.el-drawer__body {
.drawer-body-container {
height: 100%;
padding: 10px 20px;
.drawer-body-header {
width: 100%;
height: 25px;
border: 1px solid skyblue;
border-radius: 6px;
background-color: rgb(228,247,254);
span {
display: inline-block;
line-height: 25px;
}
span:first-child {
margin-left: 18px;
}
span:last-child {
font-size: 15px;
font-weight: 600;
margin-left: 12px;
}
}
}
}
}
}
</style>

View File

@ -0,0 +1,105 @@
<template>
<div class="home">
<div class="convert-type-container">
<div class="convert-type-item" @click="modelConvertFn">
<el-image style="width: 80px; height: 80px" :src="epcToFlowChart" />
<div>EPC转FlowChart</div>
</div>
<div class="convert-type-item" @click="modelConvertFn">
<el-image style="width: 80px; height: 80px" :src="epcToBpmn" />
<div style="justify-items: center">EPC转BPMN</div>
</div>
<div class="convert-type-item" @click="modelConvertFn">
<el-image style="width: 80px; height: 80px" :src="flowChartToBpmn" />
<div>FlowChart转BPMN</div>
</div>
</div>
<div class="convert-history-container" @click="toHistoryPageFn">
<el-tooltip
effect="dark"
content="历史转换记录"
placement="left-end"
>
<el-image style="width: 80px; height: 80px" :src="his" />
</el-tooltip>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent,ref,getCurrentInstance } from 'vue';
import history from '@/assets/history.png';
import epc_bpmn from '@/assets/epc_bpmn.png';
import epc_flowchart from '@/assets/epc_flowchart.png';
import flowchart_bpmn from '@/assets/flowchart_bpmn.png';
export default defineComponent({
name: 'Home',
setup() {
const { proxy: $this } = getCurrentInstance();
const his = ref(history);
const epcToBpmn = ref(epc_bpmn);
const epcToFlowChart = ref(epc_flowchart);
const flowChartToBpmn = ref(flowchart_bpmn);
//
const modelConvertFn = (convertType: any) => {
$this.$message({message: '敬请期待',type: 'warning'});
}
//
const toHistoryPageFn = () => {
$this.$router.push('/history');
}
return {
his,
epcToBpmn,
epcToFlowChart,
flowChartToBpmn,
modelConvertFn,
toHistoryPageFn
}
}
});
</script>
<style lang="less">
.home {
width: 100%;
height: 100%;
background-color: rgb(241,241,241);
}
.convert-type-container {
overflow: auto;
height: 70%;
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-rows: 1fr 1fr;
column-gap: 50px;
row-gap: 50px;
padding: 70px;
align-items: center;
justify-items: center;
.convert-type-item {
width: 80%;
height: 80%;
background-color: rgb(255,255,255);
cursor: pointer;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
div {
margin-top: 10px;
}
}
}
.convert-history-container {
/*height: 30%;*/
float: right;
margin: 20px 30px;
cursor: pointer;
}
</style>

View File

@ -0,0 +1,15 @@
{
"compilerOptions": {
"target": "esnext",
"useDefineForClassFields": true,
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["esnext", "dom"]
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
}

View File

@ -0,0 +1,189 @@
import {defineConfig,} from 'vite'
import vue from '@vitejs/plugin-vue'
import fs from "fs-extra"
declare const require: any;
declare const process: any;
const path = require("path");
const AWSDevParams = require("./AWSDevParams");
Object.assign(AWSDevParams, require("./AWSDevServiceParams"));
const AWSReleasePath = AWSDevParams.AWSReleasePath;
const AWSPortalUrl = AWSDevParams.AWSPortalUrl;
//开发时通过用户名及密码获取sessionId
const devUserInfo = AWSDevParams.devUserInfo;
const AWSproxyPath = "/AWSDEVURL/r/"; //防止跨域的地址
const moduleTemplateInAWS = AWSDevParams.moduleTemplateInAWS;//平台的模板路径
const outputDir = AWSDevParams.outputDir;
const publicPath = AWSDevParams.publicPath;//决定生成在平台的js或css的相对路径,与build配置的路径要对应
//判断是否开发
const isProduction = process.env.NODE_ENV === "production";
//开发时路径和build到平台路径
const AWSJSAndCSSPath = isProduction ? "../" : AWSproxyPath.replace("r/", "");
const importAWSCSS = AWSDevParams.importAWSCSS == null ? [] : AWSDevParams.importAWSCSS;
const importAWSJS = AWSDevParams.importAWSJS == null ? [] : AWSDevParams.importAWSJS;
const AWSJSAndCSSImportArray = [] as any[];
for (const k of importAWSCSS) {
AWSJSAndCSSImportArray.push("<link type='text/css' rel='stylesheet' href='" + AWSJSAndCSSPath + k + "'/>");
}
for (const k of importAWSJS) {
AWSJSAndCSSImportArray.push("<script type='text/javascript' src='" + AWSJSAndCSSPath + k + "'></script>");
}
const getAWSFileRelativePath = () => {
let index = "./";
if (isProduction) {
index = publicPath;
}
return index;
};
const getIndexPath = () => {
let index = "index.html";
if (isProduction) {
index = AWSReleasePath + moduleTemplateInAWS;
}
return index;
};
const data = {
AWSJSAndCSSImport: AWSJSAndCSSImportArray.join("\n"),
AWSJSAndCSSPath,
devUserInfo: isProduction ? {} : devUserInfo,
publicDir: getAWSFileRelativePath(),
isProduction,
axiosBaseUrl: isProduction ? "./" : AWSproxyPath,
settingParam: isProduction ? "<#settingParam>" : "{}",
}
const replaceHtml = (html: string, htmlMap: any) => {
for (const key in htmlMap) {
if (key == "publicDir") {
//公共路径特殊处理
html = html.replace(/\/\$\{publicDir\}(.*?)"/g, htmlMap[key]+"$1\"");
} else {
html = html.replace(new RegExp("\\$\\{" + key + "\\}", "g"), typeof htmlMap[key] == "object" ? JSON.stringify(htmlMap[key]) : htmlMap[key]);
}
}
return html;
}
const AWSPlugin: any = () => {
let config = null as any;
return {
name: 'read-config',
configResolved(resolvedConfig: any) {
// 存储最终解析的配置
config = resolvedConfig;
},
// 在其他钩子中使用存储的配置
transform() {
if (config.command === 'serve') {
// serve: 由开发服务器调用的插件
} else {
// build: 由 Rollup 调用的插件
}
},
transformIndexHtml(html: string) {
return replaceHtml(html, data);
},
renderChunk(code: string, model: any) {
if (/\/\$\{publicDir\}\//.test(code)) {
return code.replace(/\/\$\{publicDir\}\//g, data["publicDir"] + "/");
}
return code;
},
closeBundle() {
fs.move(AWSReleasePath + outputDir + "/index.html", getIndexPath(), {
overwrite: true
});
// fs.rename(resolve(filePath + "/style.css"), resolve(filePath + "/awsui.css"));
// fs.rename(resolve(filePath + "/awsui.umd.js"), resolve(filePath + "/awsui.umd.min.js"));
},
}
}
const rollupPlugin = () => {
return {
name: 'rullupPlugin',
renderChunk(code: string, model: any) {
//去除js中的css文本串
for (const key in model.modules) {
if (/\.(css|less)$/.test(key)) {
code = code.replace(model.modules[key].code, "");
}
}
return code;
},
}
}
// https://vitejs.dev/config/
export default defineConfig({
// root: getIndexPath(),
// publicDir: getAWSFileRelativePath(),
//生成入口的html文件位置
base: isProduction ? "${publicDir}" : "/", //公共路径特殊处理
build: {
outDir: AWSReleasePath + outputDir,
emptyOutDir: true,
// sourcemap:"inline",
minify: "esbuild", //esbuild更快大一点点terser慢但仅小一点点
cssCodeSplit: false,
commonjsOptions: {
// non-CommonJS modules will be ignored, but you can also
// specifically include/exclude files
include: ['node_modules/**', "plugins/**", "lib/**", "src/**"], // Default: undefined
exclude: ['node_modules/foo/**', 'node_modules/bar/**'], // Default: undefined
// these values can also be regular expressions
// include: /node_modules/
// search for files other than .js files (must already
// be transpiled by a previous plugin!)
extensions: ['.js', '.coffee'], // Default: [ '.js' ]
// if true then uses of `global` won't be dealt with by this plugin
ignoreGlobal: false, // Default: false
// if false then skip sourceMap generation for CommonJS modules
sourceMap: false, // Default: true
// unconverted. Pass an array containing the IDs
// or a `id => boolean` function. Only use this
// option if you know what you're doing!
ignore: ['conditional-runtime-dependency']
},
rollupOptions: {
output: {
assetFileNames : 'assets/asset-[name]-[hash][extname]',
chunkFileNames: 'js/chunck-[name]-[hash].js',
entryFileNames: 'js/entry-[name]-[hash].js'
},
plugins: [rollupPlugin()]
}
},
// eslint-loader 是否在保存的时候检查
// lintOnSave: true,
// productionSourceMap: false, //打包不使用源码false后在平台无法调试
// use the full build with in-browser compiler?
// https://vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only
// compiler: false,
resolve: {
alias: {
"@": path.resolve(__dirname as any, "./src")
}
},
server: {
host : "0.0.0.0",
proxy: {
//配置跨域
"/AWSDEVURL": {
target: AWSPortalUrl,
ws: true,
changeOrigin: true, //允许跨域
rewrite: (path) => path.replace(/^\/AWSDEVURL/, '')
}
}
},
plugins: [vue(), AWSPlugin()],
})

File diff suppressed because it is too large Load Diff

View File

@ -197,6 +197,9 @@
<el-dropdown-item class="el-dropdown-row" @click.native="openRepositoryInfo('version')">
<div style="height: 100%;width: 100%;font-size: 14px;"><span style="display: inline-block;width: 20px;"></span><span style="font-size: 12px;">版本管理</span></div>
</el-dropdown-item>
<el-dropdown-item v-if="scope.row.methodId == 'process.epc'" @click.native="openModelConvertDialog(scope.row.id,scope.row.methodId,'single')">
<div style="height: 100%;width: 100%;font-size: 14px;"><span style="display: inline-block;width: 20px;"></span><span style="font-size: 12px;">模型转换</span></div>
</el-dropdown-item>
<el-dropdown-item v-if="(isOlderVersion ? havingWritePerm : scope.row.havingWritePerm)" divided style="height: 30px;line-height: 30px;" @click.native="removeFiles(scope.row.id)">
<div class="text-important-color" style="height: 100%;width: 100%;font-size: 14px;"><span style="display: inline-block;width: 20px;"><i class="iconfont icon-lajitong1" style="font-size: 12px;"></i></span><span style="font-size: 12px;">删除模型</span></div>
</el-dropdown-item>
@ -289,6 +292,7 @@
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange"></el-checkbox>
<awsui-button v-if="isOlderVersion ? havingWritePerm : true " style="width: 100px;margin-left: 15px;" class="button-general-color" type="primary" @click="moveFiles">移动至</awsui-button>
<awsui-button v-if="isOlderVersion ? havingWritePerm : true" style="width: 100px;" class="button-general-color-reverse" plain @click="copyFiles()">创建副本</awsui-button>
<awsui-button style="width: 100px;" class="button-general-color-reverse" plain @click="openModelConvertDialog('','','batch')">模型转换</awsui-button>
<awsui-button style="width: 100px;" class="button-general-color-reverse" plain @click="exportFiles()">导出</awsui-button>
<awsui-button v-if="isOlderVersion ? havingRemovePerm : true && category != 'itsystem'" style="width: 100px;" class="button-general-color-reverse2" plain @click="removeFiles()">删除</awsui-button>
<awsui-button style="width: 100px;" class="button-general-color-reverse3" plain @click="closeFooter">取消</awsui-button>
@ -358,6 +362,36 @@
:visible.sync="batchReplace.visible"
:methodCategory="uuid"
v-on:getResult="closeBatchReplaceFn"></batch-replace>
<!-- 模型转换的dialog -->
<el-dialog
custom-class="model-convert-dialog"
width="30%"
:close-on-click-modal="false"
:close-on-press-escape="false"
:show-close="false"
:visible.sync="modelConvertDialog.visible"
:title="modelConvertDialog.title">
<div v-if="modelConvertDialog.isSameName">
<span>{{ modelConvertDialog.content }}</span>
</div>
<div class="model-convert-dialog-body" v-else>
<div>请选择要转换的模型类型:</div>
<el-radio-group v-model="modelConvertDialog.checkTargetMethod">
<el-radio
v-for="item in modelConvertDialog.targetMethodArr"
:key="item.value"
:disabled="item.disabled"
:label="item.value">
{{ item.text }}
</el-radio>
</el-radio-group>
</div>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="clearModelConvertDialog"> </el-button>
<el-button v-if="modelConvertDialog.isSameName" size="small" type="primary" :loading="modelConvertDialog.loading" @click="convertFn(modelConvertDialog.type)"> </el-button>
<el-button v-else size="small" type="primary" :loading="modelConvertDialog.loading" @click="modelConvertFn"> </el-button>
</div>
</el-dialog>
</el-container>
@ -488,7 +522,23 @@
havingVersionManagePerm: false,
havingWritePerm: false
},
modelConvertDialog: {
visible: false,
title: '',
isSameName: false,
duplicateName: false,
checkTargetMethod: '',
targetMethodArr: [
{value: 'process.flowchart',text: 'FlowChart',disabled: false},
{value: 'process.bpmn',text: 'BPMN',disabled: true},
],
repositoryId: '',
sourceMethod: '',
content: '',
repositoryIds: [],
type: '', // single / batch
loading: false
}
}
},
created() {
@ -511,6 +561,111 @@
});
},
methods: {
openModelConvertDialog(repositoryId,sourceMethod,type){
let that = this;
that.modelConvertDialog.visible = true;
that.modelConvertDialog.title = '选择转换类型';
that.modelConvertDialog.repositoryId = repositoryId;
that.modelConvertDialog.sourceMethod = sourceMethod;
that.modelConvertDialog.type = type;
},
clearModelConvertDialog(){
let that = this;
that.modelConvertDialog.visible = false;
that.modelConvertDialog.title = '';
that.modelConvertDialog.repositoryId = '';
that.modelConvertDialog.checkTargetMethod = '';
that.modelConvertDialog.isSameName = false;
that.modelConvertDialog.sourceMethod = '';
that.modelConvertDialog.content = '';
that.modelConvertDialog.repositoryIds = [];
that.modelConvertDialog.type = '';
that.modelConvertDialog.loading = false;
},
convertFn(type){
let that = this;
that.modelConvertDialog.loading = true;
const data = {
url:'jd',
data:{}
};
if (type === 'single') {
data.data.cmd = 'com.actionsoft.apps.coe.pal.handle_epc_to_flowchart';
data.data.repositoryId = that.modelConvertDialog.repositoryId;
data.data.targetMethod = that.modelConvertDialog.checkTargetMethod;
data.data.sourceMethod = that.modelConvertDialog.sourceMethod;
data.data.duplicateName = that.modelConvertDialog.duplicateName;
}else if (type === 'batch') {
console.log('batch',that.modelConvertDialog.repositoryIds);
data.data.cmd = 'com.actionsoft.apps.coe.pal.handle_epc_to_flowchart_batch';
data.data.repositoryIds = JSON.stringify(that.modelConvertDialog.repositoryIds);
data.data.targetMethod = that.modelConvertDialog.checkTargetMethod;
data.data.sourceMethod = 'process.epc';
data.data.duplicateName = that.modelConvertDialog.duplicateName;
}
console.log('=======',data,type);
//
awsuiAxios.post(data).then(function (ro) {
if(ro.result == 'ok') {
console.log('转换结果',ro);
that.$message({type: 'success',message: '转换成功'});
that.initData();
that.modelConvertDialog.loading = false;
that.clearModelConvertDialog();
}
}).catch(error=>{
console.log(error);
})
},
//
modelConvertFn(){
let that = this;
if (!that.modelConvertDialog.checkTargetMethod){
that.$message({type: 'warning',message: '请选择转换类型'});
return;
}
that.modelConvertDialog.loading = true;
const data = {
url:'jd',
data:{
targetMethod: that.modelConvertDialog.checkTargetMethod,
}
};
console.log('modelConvertFn',that.modelConvertDialog.repositoryIds);
if (that.modelConvertDialog.type === 'single') {
data.data.cmd = 'com.actionsoft.apps.coe.pal.check_repository_name_exist';
data.data.repositoryId = that.modelConvertDialog.repositoryId;
}else if (that.modelConvertDialog.type === 'batch') {
data.data.cmd = 'com.actionsoft.apps.coe.pal.check_repository_name_exist_batch';
data.data.repositoryIds = JSON.stringify(that.modelConvertDialog.repositoryIds);
}
awsuiAxios.post(data).then(function (ro) {
if(ro.result == 'ok') {
that.modelConvertDialog.loading = false;
console.log('重名校验',ro);
if (ro.data.duplicateName) {
that.modelConvertDialog.title = '提示';
that.modelConvertDialog.isSameName = true;
if (that.modelConvertDialog.type === 'single') {
that.modelConvertDialog.content = `${ro.data.repositoryName}】名称已经存在,是否继续转换生成新的副本`;
}else if (that.modelConvertDialog.type === 'batch') {
let repositoryNames = ro.data.repositoryNames;
console.log('重名',repositoryNames);
let content = '';
repositoryNames.forEach(item => {
content = `文件【${item}\n`;
});
that.modelConvertDialog.content = content;
}
that.modelConvertDialog.duplicateName = ro.data.duplicateName;
}else {
that.convertFn(that.modelConvertDialog.type);
}
}
}).catch(error=>{
console.log(error);
})
},
newwidthbind(){
if(this.newwidthtrue==false){
this.newwidthtrue = true;
@ -844,7 +999,14 @@
const that = this;
that.checkedRepositorys = val;
let checkedCount = val.length;
that.modelConvertDialog.repositoryIds = [];
if (checkedCount > 0) {
val.forEach(item => {
if (that.modelConvertDialog.repositoryIds.indexOf(item.id) === -1){
that.modelConvertDialog.repositoryIds.push(item.id);
}
});
console.log('======',that.modelConvertDialog.repositoryIds);
that.showFooter = true;
//
for (let i = 0; i < checkedCount; i++) {
@ -1889,5 +2051,17 @@
position: relative;
top: 0px;
}
/deep/ .model-convert-dialog .el-dialog__body {
padding-top: 0px;
}
/deep/ .model-convert-dialog .model-convert-dialog-body {
padding: 0 30px;
}
/deep/ .model-convert-dialog .model-convert-dialog-body div:first-child{
margin: 15px 0;
font-weight: 800;
}
/deep/ .model-convert-dialog .model-convert-dialog-body div:last-child{
padding: 0 20px;
}
</style>