提交 13310400 编写于 作者: ibizdev's avatar ibizdev

chitanda 发布系统代码 [TrainSys,应用]

上级 d2bc4a7d

要显示的变更太多。

为了保持性能,仅显示文件中的 1000/1000+

// dynamic front template
\ No newline at end of file
// 远程登录地址,本地开发调试使用
VUE_APP_BASEURL=/api
// 远程登录地址,本地开发调试使用
VUE_APP_REMOTELOGIN=/ibizutil/login
// 文件导出
VUE_APP_EXPORTFILE=/ibizutil/download
// 文件上传
VUE_APP_UPLOADFILE=/ibizutil/upload
// 数据导入单次上传最大数量
VUE_APP_SLICEUPLOADCNT=100
// 是否为开发模式
VUE_APP_DEVMODE=false
// 是否启用AppData
VUE_APP_ENABLEAPPDATA=true
// 是否开启权限认证
VUE_APP_ENABLEPERMISSIONVALID=false
// 远端动态基础路径
VUE_APP_REMOTEDYNAPATH=
// 是否开启工作流
VUE_APP_WORKFLOW=false
// 是否启用动态
VUE_APP_BDYNAMIC=false
// SaaS模式
VUE_APP_SAASMODE=false
// 仿真mockDcSystemId
VUE_APP_MOCKDCSYSTEMID=
// 登录地址
VUE_APP_LOGINURL=
// 门户地址
VUE_APP_PORTALURL=
// 刷新token即将到期时间间隔(默认10分钟,单位:ms)
VUE_APP_REFRESHTOKENTIME=600000
// 微应用名称
VUE_APP_MICROAPPNAME=OldWebAppTest
//统一地址
VUE_APP_UNITEADDRESS=http=//172.16.100.202=8114
// 菜单权限模式,可选值:RT(RT模式),RESOURCE(资源模式),MINIX(混合模式),默认MINIX
VUE_APP_MENUPERMISSIONMODE=RESOURCE
// 预览动态基础路径
VUE_APP_PREVIEWDYNAPATH=http=//172.16.170.145
// 实例配置地址
VUE_APP_CONFIGDYNAPATH=http=//172.16.170.145/DynamicBackend/designtool/redirect
// 动态模式(RT/WEB)
VUE_APP_DYNAMODE=WEB
// 钉钉内部集成应用标识,用于钉钉应用内免登
VUE_APP_DINGTALKAPPID=
// 钉钉登录应用标识,用于网页扫码登录
VUE_APP_DINGTALKACCAPPID=
// 企业微信登录应用标识,用于网页扫码登录和企业微信内部免登
VUE_APP_WXWORKAPPID=
// cas登录地址
VUE_APP_CASLOGINURL=
// cas登出地址
VUE_APP_CASLOGOUTURL=
// 跳cas后cas未登录时默认跳转的地址
VUE_APP_CASREDIRECTURL=
// Debug栏模型配置工具地址
VUE_APP_DYNAMICCONFIGTOOLURL=http=//172.16.170.145/dynamictool/debug-bar/?origin=
// 表单项标题位置('', 'LEFT', 'RIGHT', 'TOP', 'BOTTOM')
VUE_APP_FORMITEMLABELPOS=
// 打包基础路径
VUE_APP_PUBLICPATH=./
// 是否提示所有的字段的错误信息
VUE_APP_NOTICEALLFIELDSERROR=false
// 系统默认的最大导出个数
VUE_APP_EXPORTMAXROWCOUNT=1000
# .env.dev 用于开发构建
// 打包模式
NODE_ENV=development
// 是否为开发模式
VUE_APP_DEVMODE=true
\ No newline at end of file
# .env.micro 用于微应用环境构建
// 打包模式(使用vue本身机制)
NODE_ENV=production
// 是否为开发模式
VUE_APP_DEVMODE=false
// 是否开启权限认证
VUE_APP_ENABLEPERMISSIONVALID=true
// 打包基础路径
VUE_APP_PUBLICPATH=http://localhost:8080
\ No newline at end of file
# .env.dev 用于开发构建
// 打包模式(使用vue本身机制)
NODE_ENV=production
// 是否为开发模式
VUE_APP_DEVMODE=false
// 是否开启权限认证
VUE_APP_ENABLEPERMISSIONVALID=true
// 打包基础路径
VUE_APP_PUBLICPATH=./
\ No newline at end of file
module.exports = {
printWidth: 120,
semi: true,
singleQuote: true,
trailingComma: 'all',
bracketSpacing: true,
jsxBracketSameLine: false,
jsxSingleQuote: true,
quoteProps: 'as-needed',
arrowParens: 'avoid',
tabWidth: 4,
useTabs: false,
endOfLine: 'lf',
};
## v8.0.7 (2023-01-10)
- 修复视图布局面板多数据容器不加载数据的问题[#6fbf46cb](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/6fbf46cb6aeb8f07a45db1c56fe88fde5e7e6a40)
- 调整错误的单词拼写[#fbcc9d47](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/fbcc9d4772ed5edd851c2f6d88c256129e2e2f38)
## v8.0.6 (2023-01-04)
- 调整工作流审批日志获取逻辑与获取操作路径逻辑[#4ea00eba](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/e02c80aaf9e0ad2ba5b1f42ae8ddbd1e4ea00eba)
## v8.0.5 (2022-12-23)
- 修复首页菜单展开显示异常问题[#10bddb05](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/a37d18c37aaf730c691ce423a713e33710bddb05)
- 修复开始流程选项框层级异常问题[#b695bb7e](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/9abab05c03c1ee26a9193da76e5824c6b695bb7e)
- 修复部分表单项代码表显示异常问题[#c4bb639f](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/f9bcab7c5e195cd306431d84ea2e2297c4bb639f)
- 修复访问用户客户端存储过期时间未同步接口返回数据问题[#ffd28fe1](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/3df250e962fa0ecb7c8f9a2a81f94e701c026f16)
## v8.0.4 (2022-12-16)
- 修复主从关系数据保存时,从数据中携带主键导致异常的问题[#ffd28fe1](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/c8d22116938e8189d119ba9cb93b4532ffd28fe1)
- 修复部分情况下获取不到上下文中的sessionkey的问题[#8666a9b9](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/570e48a3440bf9321afc8723f8a29dbb8666a9b9)
## v8.0.3 (2022-12-04)
- 调整关系界面遮罩显示逻辑[#a4b4f4cb](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/3762d40dbd17fa9fd6f4ab60f44c7457a4b4f4cb)
- 调整多表单编辑视图加载逻辑[#05ad0cd6](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/09c301d86d4ff21d49e6d7595a3f073905ad0cd6)
- 增加视图布局与面板部件容器类名[#5860a210](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/aa95ac9d2b6bb0b7d373c9d4b806fdbd5860a210)
- 调整布局样式类名[#4ce682d1](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/4ce682d1e842cd1ac4dd21e94c15f6ff2c58af48)
- 更新识别border布局自身对齐模式[#a5d99cdc](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/a5d99cdc1023559fba031f9a23cf9b70ed956c62)
- 修复信息表单模式下部分表单逻辑失效的问题[#59f97e6f](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/59f97e6ffe00a88c5b5b9a1595485e83cf4ae6a7)
- 调整视图布局面板样式名与样式表绑定[#a01c0fe3](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/a01c0fe38ea9a6ecb9246a4b46b5b94d7c62edb2)
- 调整界面逻辑数据对象列表参数设置指定属性值逻辑[#c7e6a1ab](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/7d7ec6281af949067c353093530ce286c7e6a1ab)
, [#3e6cacaf](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/16ab23c5f5b7016838e34cfb34abd6bd3e6cacaf)
- 调整界面逻辑数据对象列表参数获取指定属性值逻辑[#d25cfe4d2](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/d0b9b531b439edc60ee7fb920060d7dd25cfe4d2)
- 修复表格列没应用实体属性判断异常问题[#1e493bafd](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/fbec1110c3db8490afbd4663085bcd91e493bafd)
## v8.0.2 (2022-12-1)
- 修复表格列没应用实体属性判断异常问题[#8feed3a6e](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/8feed3a6e818ec24809c6a99f7ab844c61c9e6bb)
- 修复非布局模式下首页头部菜单样式异常[#3cae0041d](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/3cae0041da5a83e5f05d7574157e25c4b7d33b4c)
- 修复登录页显示异常问题[#69754b090](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/25a08d764fa2c41cdf133ae5bf2f93c10993b075)
- 删除无效依赖app-visual-sheet[#3da2e512](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/3da2e5129ecb0c72c44b4be53d5e1b719f475a50)
- 更新工作流首页标识[#a5a6b214](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/a5a6b2141fe5ea171d4249e28daec03172a34822)
- 更新表格头部样式[#ef0c3ac3](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/ef0c3ac38251e1995bfe711dfd40b0211e629987)
- 修复应用界面处理逻辑异常问题[#19cb2d2f](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/19cb2d2f392752bcecf44d04aa941440e7b36eab)
## v8.0.1 (2022-10-31)
- 新增面板项识别动态样式代码[#5dac32542](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/5dac325428c23c57b8d9fe8da495751884810c5b)
- 修复请求应用无权限模型数据未带srfdcsystem请求头[#e3e593405](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/e3e5934051cb43391db2b8f143d2481e0023ae0d)
- 修复应用容器布局代理模式下样式异样[#aa9ad7fc3](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/aa9ad7fc337940b578a1688b91b570d2ed336c7b)
- 更新视图处理部件特殊自定义参数,视图增强模式不识别仅布局内容区[#3d7025c82](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/3d7025c8286727c412ecf6479fbe470c236c2c32)
- 修复容器宽高识别宽高模式一样问题[#bfed6f3c6](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/bfed6f3c6f1e348b1f9f13ff07c4702cc7f59295)
- 更新应用登录视图登录/重置逻辑[#f211f12d6](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/f211f12d609336e2182a3a526799846197fbe373)
- 更新请求无权限数据,包含样式,视图数据[#66fb33dd6](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/66fb33dd6b87644aff2fa378372acc6c6daad09a)
- 新增STATIC_LABEL和STATIC_TEXT功能[#ffb49559b](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/ffb49559b7948d521b02d0ee5bf621c5704b2356)
- 新增识别html打开视图方式模型[#69754b090](http://172.16.180.229/tony/DYNAMIC_APP_RENDER_RES/commit/69754b0902dc811e9c36da3489a29d2f663a6d0f)
## v8.0.0 (2022-10-25)
初始化
\ No newline at end of file
FROM registry.cn-shanghai.aliyuncs.com/ibizops/nginx-dynamic:v1
WORKDIR /
COPY dist /dist
\ No newline at end of file
FROM srcimagename
WORKDIR /dist/assets
RUN rm -rf model
COPY model model
\ No newline at end of file
## 前言
### 1. 简介
R7动态模板是iBiz平台提供的一套全新的前端解决方案(以下简称前端动态模板),基于消费iBiz模型进行开发扩展。从某种意义上来讲,我们可以把它理解成解释器,根据所获取的iBiz模型数据(以下简称模型数据)和前端技术融合进行解释,绘制界面。需要注意的是,在这一过程中,它不关注模型数据的来源,只专注于自己解释模型数据,这样就提供了获取模型数据的灵活性,为实现业务提供了更多的可能,目前支持远端和本地2种方式来获取模型数据。本文档主要介绍该前端动态模板的整体架构、主要体系及二次开发做一阐述,旨在能够为开发人员提供一定开发指导支持。而今框架开源,希望能有更多志同道合的伙伴参与迭代 ^_^
### 2.开发语言:
`TypeScript``less``html`
### 3.技术选型:
- 前端MVVM框架:vue.js
- 路由:vue-router
- 状态管理:vuex
- 国际化:vue-i18n
- 数据交互:axios
- UI框架:element-ui , view-design
- 工具库:qs, path-to-regexp, rxjs,moment
- 图标库:font-awesome
- 图表集成:echarts
- 日历集成:fullcalendar
- 引入组件: tinymce,ibiz-vue-lib,interactjs
- 模型接口:@ibiz/dynamic-model-api
- 代码风格检测:eslint
### 4.特点
前端动态模板除了继承R7标准版的标准Restful设计、业务逻辑与界面表现分离、快速介入的代码能力的3大特点,另外还具备分层设计、引擎化2大特点。
1.分层设计
分层设计这一特点体现在代码管理方式和应用内部2个方面。前端动态模板整个项目结构采用monorepo的方式来管理代码,packages目录下的ibiz-core、ibiz-plugin、ibiz-vue各包专注解释自己的职责。在应用内部,又可划分UI体系和数据交互体系2个方面,在UI方面,从视图、部件、部件项逐层传递;在数据交互体系方面,从UI、UI服务、数据服务逐层传递。使用分层设计,层次清楚,低耦合,高内聚。
2.引擎化
引擎化这一特点是动态的必然结果。如需要实现某一个场景,我们会提前预置该场景的逻辑,该逻辑是通过接收模型数据进行不同的处理。相比于R7标准模板,前端动态模板始终只有一份代码,而R7标准模板,如果模型数据不一致,在成果物中所获得的代码会有所不同,在前端动态模板UI部分体现尤为明显。
## 快速上手
<blockquote style="border-color: blue;"><p>克隆项目</p></blockquote>
```javascript
git clone https://xxxxxx/vue-example.git
```
<blockquote style="border-color: blue;"><p>打开前端项目,进入工作空间下,执行安装依赖命令</p></blockquote>
```javascript
cd vue-example // 进入项目根目录
yarn install // 安装依赖
```
<blockquote style="border-color: blue;"><p>本地启动前,需执行 yarn link-model命令、修改远程代理地址</p></blockquote>
```javascript
yarn link-model // 把模型数据合入到前端assets目录下,走本地模式需用到
proxy: "http://172.16.190.141:30228/" // 修改远程代理文件 vue.config.js 代理地址
```
<blockquote style="border-color: blue;"><p>在工作空间下,执行启动命令</p></blockquote>
```
yarn serve
```
<blockquote style="border-color: blue;"><p>在工作空间下,执行打包命令,生成最终交付产物</p></blockquote>
```javascript
yarn build
```
## 目录结构
前端动态模板已经为你生成了一个完整的开发框架,提供了涵盖前端开发的各类功能和坑位,下面是整个项目的目录结构。
```javascript
| app_Web
| packages 本地依赖包
| ibiz-core ibiz-core核心依赖包
| src 工程文件夹
| engine 视图引擎
| entities 实体基类
| interface 接口
| logic 逻辑模型
| model 运行模型
| chart-detail 图表类模型
| error-detail 错误类模型
| form-detail 表单成员模型
| panel-detail 面板成员模型
| modules 模块
| service 服务基类
| types 声明文件
| utils 工具类
| ibiz-plugin ibiz-plugin插件依赖包
| ibiz-vue ibiz-vue Vue组件依赖包
| src 工程文件夹
| app-logic 应用逻辑
| app-backend-action.ts 后台界面行为
| app-front-ation.ts 前台界面行为
| app-lofic-factory.ts 界面行为工厂
| app-service 应用服务
| common-service 通用服务
| app-center-service.ts 应用中心服务
| app-component-sercice.ts 应用组件服务
| app-contet-store.ts 全局上下文仓库基类
| app-layout-service.ts 视图布局服务
| app-nav-history.ts 导航历史记录项
| app-navdata-service.ts 导航数据服务
| app-thrid-service.ts 第三方登录服务
| codelist-translator.ts 代码表翻译服务
| footer-items-service.ts 底部项绘制服务
| top-items-servicet.ts 顶部项绘制服务
| plugin-service.ts 插件服务
| ui-state-service.ts 应用UI状态管理服务
| loading-service 加载服务
| app-loading-service.ts 应用加载服务
| ctrl-loading-service.ts 部件加载服务
| view-loading-service.ts 视图加载服务
| logic-service 逻辑服务
| app-func-service.ts 应用功能服务
| app-global-action-service.ts 全局界面行为服务
| app-viewlogic-service.ts 视图逻辑服务
| components 组件
| common 通用Vue组件
| control 部件组件
| editor 编辑器组件
| layout 视图布局组件
| view 视图组件
| ctrl-model 部件模型类
| ctrl-service 部件服务
| decorators 装饰器
| directives 指令
| events 事件集
| types 声明文件
| utils 工具类
| view 视图组件基类
| view-container 视图容器
| app-indexview-shell.tsx 首页视图容器
| app-view-shell.tsx 视图容器
| view-container-base.tsx 视图容器基类
| widgets 部件组件基类
| public public文件夹
| assets 静态文件夹
| environments 环境文件
| src 项目工程文件夹
| assets 静态文件夹
| components 项目组件
| config 应用配置
| environments 环境文件
| locale 多语言文件
| pages 视图文件
| main.ts 应用主函数入口
| router.ts 应用路由管理
| plugin 插件文件夹
| router 自定义路由配置
| store 全局状态管理
| styles 应用样式文件夹
| default.less 默认样式
| style2.less style2样式
| app-style.less 样式表样式
| user.less 用户自定义样式
| var.css css变量定义文件
| theme 主题文件夹
| utils 工具类文件
| app-register.ts 公共组件全局注册
| App.vue 入口文件
| user-register.ts 自定义组件全局注册
| package.json 依赖管理文件
| vue.config.js vue cli配置
```
## 更新日志
每个版本的详细更改都记录在[发行说明](CHANGELOG.md)中。
## 如何贡献
如果你希望参与贡献,欢迎 [Pull Request](<http://demo.ibizlab.cn/ibiz_r7/vue_r7/issues/new>),或通过自助服务群给我们报告 Bug。
强烈推荐阅读 [《提问的智慧》](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way)(本指南不提供此项目的实际支持服务!)[《如何向开源社区提问题》](https://github.com/seajs/seajs/issues/545)[《如何有效地报告 Bug》](https://www.chiark.greenend.org.uk/~sgtatham/bugs-cn.html)[《如何向开源项目提交无法解答的问题》](https://zhuanlan.zhihu.com/p/25795393),更好的问题更容易获得帮助。
\ No newline at end of file
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset',
],
plugins: ["@babel/plugin-proposal-object-rest-spread"]
}
{
"pluginsFile": "tests/e2e/plugins/index.js"
}
module.exports = {
preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel'
}
server {
listen 80;
server_name localhost;
location /oldwebapptest/ {
alias /dist/;
index index.html index.htm;
}
location /trainsys__oldwebapptest {
proxy_pass http://gateway.ibizcloud.cn:20086;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
\ No newline at end of file
{
"name": "OldWebAppTest",
"version": "0.1.0",
"private": true,
"workspaces": [
"packages/*",
"plugins/*"
],
"scripts": {
"link-model": "./node_modules/.bin/ibz link ../trainsys-core/src/main/resources/model/cn/ibizlab/trainsys/PSSYSAPPS/OldWebAppTest ./public/assets/model",
"serve": "node --max_old_space_size=8102 ./node_modules/@vue/cli-service/bin/vue-cli-service serve --mode dev",
"dev-serve": "node --max_old_space_size=8102 ./node_modules/@vue/cli-service/bin/vue-cli-service serve --mode dev",
"build": "node --max_old_space_size=8102 ./node_modules/@vue/cli-service/bin/vue-cli-service build --mode prod",
"micro-build": "node --max_old_space_size=8102 ./node_modules/@vue/cli-service/bin/vue-cli-service build --mode micro",
"dev-build": "node --max_old_space_size=8102 ./node_modules/@vue/cli-service/bin/vue-cli-service build --mode dev",
"watch": "vue-cli-service build --watch --no-clean --mode dev",
"test:unit": "vue-cli-service test:unit",
"test:e2e": "vue-cli-service test:e2e",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@fullcalendar/core": "^4.4.0",
"@fullcalendar/daygrid": "^4.4.0",
"@fullcalendar/interaction": "^4.4.0",
"@fullcalendar/list": "^4.4.0",
"@fullcalendar/timegrid": "^4.4.0",
"@fullcalendar/vue": "^4.4.0",
"@ibiz/drawer-vue": "^0.0.7",
"@popperjs/core": "^2.9.2",
"@babel/plugin-proposal-object-rest-spread": "^7.14.7",
"dexie": "^3.0.3",
"dingtalk-jsapi": "^2.13.23",
"async-validator": "^3.5.1",
"axios": "^0.21.1",
"core-js": "^3.10.1",
"echarts": "5.0.2",
"element-ui": "^2.15.1",
"file-saver": "^2.0.5",
"font-awesome": "^4.7.0",
"ibiz-core": "1.0.0",
"ibiz-vue": "1.0.0",
"ibiz-plugin": "1.0.0",
"ibiz-vue-lib": "0.1.24",
"moment": "^2.29.1",
"vue-text-format": "^1.2.6",
"mavon-editor": "^2.9.1",
"path-to-regexp": "^6.2.0",
"qs": "^6.10.1",
"qx-util": "^0.0.7",
"pqgridf": "^3.5.1",
"jquery-ui-pack": "^1.12.3",
"jszip": "^3.7.1",
"jquery": "^3.6.0",
"@types/jquery": "^3.5.8",
"@types/jqueryui": "^1.12.16",
"rxjs": "^6.6.7",
"tinymce": "5.7.1",
"view-design": "4.4.0",
"vue": "^2.6.12",
"vue-amap": "^0.5.10",
"vue-class-component": "^7.2.6",
"vue-grid-layout": "^2.3.12",
"vue-i18n": "^8.24.3",
"vue-property-decorator": "^9.1.2",
"vue-router": "^3.5.1",
"vuedraggable": "^2.24.3",
"vuex": "^3.6.2",
"@interactjs/interact": "^1.10.11",
"@interactjs/auto-start": "^1.10.11",
"@interactjs/actions": "^1.10.11",
"@interactjs/modifiers": "^1.10.11",
"@interactjs/dev-tools": "^1.10.11",
"@ibiz/dynamic-model-api": "2.0.4",
"@ibiz/model-location": "0.0.8",
"xgplayer":"2.31.4",
"ramda": "^0.27.1",
"element-resize-detector": "^1.2.2",
"monaco-editor": "^0.24.0",
"json-editor": "^0.7.28",
"monaco-editor-webpack-plugin": "^3.1.0",
"xlsx": "^0.16.9"
},
"devDependencies": {
"@ibiz/cli": "0.2.7",
"@types/echarts": "^4.9.7",
"@types/mockjs": "^1.0.3",
"@types/qs": "^6.9.6",
"@vue/cli-plugin-babel": "^4.5.12",
"@vue/cli-plugin-router": "^4.5.12",
"@vue/cli-plugin-typescript": "^4.5.12",
"@vue/cli-plugin-vuex": "^4.5.12",
"@vue/cli-service": "^4.5.12",
"@vue/test-utils": "1.1.4",
"axios-mock-adapter": "^1.19.0",
"compression-webpack-plugin": "^5.0.1",
"less": "3.13.1",
"less-loader": "^7.3.0",
"mockjs": "^1.1.0",
"script-loader": "^0.7.2",
"typescript": "^4.2.4",
"vue-template-compiler": "^2.6.12"
}
}
\ No newline at end of file
{
"name": "ibiz-core",
"version": "1.0.0",
"description": "ibiz核心包",
"main": "src/index.ts",
"author": "ibiz-temp",
"license": "MIT",
"peerDependencies": {
"async-validator": "^3.5.1",
"qs": "^6.10.1",
"axios": "^0.21.1",
"ramda": "^0.27.1"
},
"devDependencies": {
"@types/ramda": "^0.27.40"
}
}
import { LogUtil } from "../utils";
import { CalendarExpViewEngine } from "./calendar-exp-view-engine";
import { CalendarViewEngine } from "./calendar-view-engine";
import { ChartExpViewEngine } from "./chart-exp-view-engine";
import { ChartViewEngine } from "./chart-view-engine";
import { CommonViewEngine } from "./common-view-engine";
import { DataViewEngine } from "./data-view-engine";
import { DataViewExpViewEngine } from "./data-view-exp-view-engine";
import { DeIndexViewEngine } from "./deindex-view-engine";
import { EditViewEngine } from "./edit-view-engine";
import { EditView2Engine } from "./edit-view2-engine";
import { EditView3Engine } from "./edit-view3-engine";
import { EditView4Engine } from "./edit-view4-engine";
import { GridExpViewEngine } from "./grid-exp-view-engine";
import { GridViewEngine } from "./grid-view-engine";
import { GridView4Engine } from "./grid-view4-engine";
import { IndexPickupDataViewEngine } from "./index-pickup-data-view-engine";
import { KanBanViewEngine } from "./kan-ban-view-engine";
import { ListExpViewEngine } from "./list-exp-view-engine";
import { ListViewEngine } from "./list-view-engine";
import { MapExpViewEngine } from "./map-exp-view-engine";
import { MapViewEngine } from "./map-view-engine";
import { MEditViewEngine } from "./medit-view-engine";
import { MPickupViewEngine } from "./mpickup-view-engine";
import { PanelViewEngine } from "./panel-view-engine";
import { PickupGridViewEngine } from "./pickup-grid-view-engine";
import { PickupTreeViewEngine } from "./pickup-tree-view-engine";
import { ReportViewEngine } from "./report-view-engine";
import { TabExpViewEngine } from "./tab-exp-view-engine";
import { TabSearchViewEngine } from "./tab-search-view-engine";
import { TreeExpViewEngine } from "./tree-exp-view-engine";
import { TreeGridExViewEngine } from "./tree-grid-ex-view-engine";
import { TreeViewEngine } from "./tree-view-engine";
import { GanttViewEngine } from "./gantt-view-engine";
import { PortalViewEngine } from "./portal-view-engine";
import { OptionViewEngine } from "./option-view-engine";
import { PickupViewEngine } from "./pickup-view-engine";
import { PickupView2Engine } from "./pickup-view2-engine";
import { WizardViewEngine } from "./wizard-view-engine";
import { MPickupView2Engine } from "./mpickup-view2-engine";
import { PickupView3Engine } from "./pickup-view3-engine";
import { EditView9Engine } from "./edit-view9-engine";
import { GridView9Engine } from "./grid-view9-engine";
export class appEngineService{
/**
* 获取引擎服务
*
* @static
* @param {string} type
* @memberof appEngineService
*/
public static getEngine(type:string){
switch (type) {
case 'DEGRIDVIEW':
return new GridViewEngine();
case 'DEGRIDVIEW4':
return new GridView4Engine();
case 'DEGRIDVIEW9':
return new GridView9Engine();
case 'DEEDITVIEW':
return new EditViewEngine();
case 'DEEDITVIEW9':
return new EditView9Engine();
case 'DECUSTOMVIEW':
return new CommonViewEngine();
case 'DEEDITVIEW2':
return new EditView2Engine();
case 'DEEDITVIEW3':
return new EditView3Engine();
case 'DEEDITVIEW4':
return new EditView4Engine();
case 'DELISTVIEW':
return new ListViewEngine();
case 'DEDATAVIEW':
return new DataViewEngine();
case 'DECALENDARVIEW':
return new CalendarViewEngine();
case 'DECHARTVIEW':
return new ChartViewEngine();
case 'DEKANBANVIEW':
return new KanBanViewEngine();
case 'DETREEVIEW':
return new TreeViewEngine();
case 'DEMEDITVIEW9':
return new MEditViewEngine();
case 'DETREEGRIDEXVIEW':
return new TreeGridExViewEngine();
case 'DEREPORTVIEW':
return new ReportViewEngine();
case 'DEMAPVIEW':
return new MapViewEngine();
case 'DEPICKUPGRIDVIEW':
return new PickupGridViewEngine();
case 'DEPICKUPTREEVIEW':
return new PickupTreeViewEngine();
case 'DEINDEXPICKUPDATAVIEW':
return new IndexPickupDataViewEngine();
case 'DETABSEARCHVIEW':
return new TabSearchViewEngine();
case 'DEMPICKUPVIEW':
return new MPickupViewEngine();
case 'DEMPICKUPVIEW2':
return new MPickupView2Engine();
case 'DEGRIDEXPVIEW':
return new GridExpViewEngine();
case 'DELISTEXPVIEW':
return new ListExpViewEngine();
case 'DEDATAVIEWEXPVIEW':
return new DataViewExpViewEngine();
case 'DECALENDAREXPVIEW':
return new CalendarExpViewEngine();
case 'DECHARTEXPVIEW':
return new ChartExpViewEngine();
case 'DEINDEXVIEW':
return new DeIndexViewEngine();
case 'DEPANELVIEW':
return new PanelViewEngine();
case 'DEMAPEXPVIEW':
return new MapExpViewEngine();
case 'DETABEXPVIEW':
return new TabExpViewEngine();
case 'DETREEEXPVIEW':
return new TreeExpViewEngine();
case 'DEGANTTVIEW':
return new GanttViewEngine();
case 'DEPORTALVIEW':
return new PortalViewEngine();
case 'DEOPTVIEW':
return new OptionViewEngine();
case 'DEPICKUPVIEW':
return new PickupViewEngine();
case 'DEPICKUPVIEW2':
return new PickupView2Engine();
case 'DEPICKUPVIEW3':
return new PickupView3Engine();
case 'DEWIZARDVIEW':
return new WizardViewEngine();
default:
LogUtil.warn(`${type}暂未实现`);
break;
}
}
}
\ No newline at end of file
import { ExpViewEngine } from './exp-view-engine';
/**
* 日历导航视图界面引擎
*
* @export
* @class CalendarExpViewEngine
* @extends {ViewEngine}
*/
export class CalendarExpViewEngine extends ExpViewEngine {
/**
* 初始化引擎
*
* @param {*} options
* @memberof CalendarExpViewEngine
*/
public init(options: any): void {
this.expBar = options.calendarexpbar;
super.init(options);
}
/**
* @description 视图销毁
* @memberof CalendarExpViewEngine
*/
public destroyed() {
super.destroyed();
this.expBar = null;
}
}
\ No newline at end of file
import { MDViewEngine } from "./md-view-engine";
/**
* 日历视图引擎
*
* @export
* @class CalendarViewEngine
* @extends {MDViewEngine}
*/
export class CalendarViewEngine extends MDViewEngine {
/**
* 日历部件
*
* @protected
* @type {*}
* @memberof CalendarViewEngine
*/
protected calendar: any;
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof CalendarViewEngine
*/
public init(options: any = {}): void {
this.calendar = options.calendar;
super.init(options);
}
/**
* 部件事件处理
*
* @param {string} ctrlName 部件标识
* @param {string} eventName 事件标识
* @param {*} args 事件参数
* @memberof CalendarViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, 'calendar')) {
this.MDCtrlEvent(eventName, args);
}
super.onCtrlEvent(ctrlName, eventName, args);
}
/**
* 获取日历部件
*
* @return {*} {*}
* @memberof CalendarViewEngine
*/
public getMDCtrl(): any {
return this.calendar;
}
/**
* @description 视图销毁
* @memberof CalendarViewEngine
*/
public destroyed() {
super.destroyed();
this.calendar = null;
}
}
\ No newline at end of file
import { ExpViewEngine } from './exp-view-engine';
/**
* 图表导航视图界面引擎
*
* @export
* @class ChartExpViewEngine
* @extends {ViewEngine}
*/
export class ChartExpViewEngine extends ExpViewEngine {
/**
* 初始化引擎
*
* @param {*} options
* @memberof ChartExpViewEngine
*/
public init(options: any): void {
this.expBar = options.chartexpbar;
super.init(options);
}
/**
* @description 视图销毁
* @memberof ChartExpViewEngine
*/
public destroyed() {
super.destroyed();
this.expBar = null;
}
}
\ No newline at end of file
import { MDViewEngine } from './md-view-engine';
/**
* 实体图表视图界面引擎
*
* @export
* @class ChartViewEngine
* @extends {SearchViewEngine}
*/
export class ChartViewEngine extends MDViewEngine {
/**
* 图表对象
*
* @type {*}
* @memberof ChartViewEngine
*/
public chart: any;
/**
* 图表初始化
*
* @param {*} options
* @memberof ChartViewEngine
*/
public init(options: any): void {
this.chart = options.chart;
super.init(options);
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof ChartViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, 'chart')) {
this.MDCtrlEvent(eventName, args);
}
super.onCtrlEvent(ctrlName, eventName, args);
}
/**
* 获取数据部件
*
* @returns {*}
* @memberof ChartViewEngine
*/
public getMDCtrl(): any {
return this.chart;
}
/**
* @description 视图销毁
* @memberof ChartViewEngine
*/
public destroyed() {
super.destroyed();
this.chart = null;
}
}
\ No newline at end of file
import { ChartViewEngine } from './chart-view-engine';
/**
* 实体图表视图(部件视图)界面引擎
*
* @export
* @class ChartView9Engine
* @extends {ChartViewEngine}
*/
export class ChartView9Engine extends ChartViewEngine {
}
\ No newline at end of file
import { LogUtil, Util } from "../utils";
import { ViewEngine } from "./view-engine";
/**
* 视图引擎基类
*
* @export
* @class CommonViewEngine
*/
export class CommonViewEngine extends ViewEngine {
/**
* 部件引擎集合
*
* @memberof CommonViewEngine
*/
public ctrlEngineArray: Array<any> = [];
/**
* 视图部件Map
*
* @memberof CommonViewEngine
*/
public viewCtrlMap: Map<string, any> = new Map();
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof CommonViewEngine
*/
public init(options: any = {}): void {
this.initViewControlMap(options.ctrl);
this.initCtrlEngineArray(options.engine);
super.init(options);
}
/**
* 初始化引擎Map
*
* @param {*} options
* @memberof CommonViewEngine
*/
public initCtrlEngineArray(options: any) {
if (options && options.length > 0) {
this.ctrlEngineArray = [];
options.forEach((element: any) => {
const result = this.handleViewEngineParams(element);
this.ctrlEngineArray.push(result);
});
}
}
/**
* 初始化视图部件Map
*
* @param {*} options
* @memberof CommonViewEngine
*/
public initViewControlMap(options: any) {
if (options && options.length > 0) {
options.forEach((element: any) => {
this.viewCtrlMap.set(element.name, element.ctrl);
});
}
}
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof CommonViewEngine
*/
public load(opts: any = {}): void {
// 处理搜索部件加载并搜索(参数可指定触发部件)
if (this.ctrlEngineArray.length > 0) {
for (let element of this.ctrlEngineArray) {
if (element.triggerCtrlName && Object.is(element.triggerCtrlName, 'VIEW')) {
if (element.triggerType && Object.is(element.triggerType, 'CtrlLoadAndSearch')) {
this.setViewState2({ tag: element.targetCtrlName, action: 'loaddraft', viewdata: Util.deepCopy(opts) });
}
}
}
}
// 处理部件加载(参数可指定触发部件)无指定触发部件时由容器触发
if (this.ctrlEngineArray.length > 0) {
for (let element of this.ctrlEngineArray) {
if (element.triggerType && Object.is(element.triggerType, 'CtrlLoad') && !element.triggerCtrlName) {
if (element.targetCtrlName && Object.is(element.targetCtrlName, 'form')) {
if (this.keyPSDEField &&
this.view.context[this.keyPSDEField] &&
!Object.is(this.view.context[this.keyPSDEField], '')) {
this.setViewState2({ tag: element.targetCtrlName, action: 'load', viewdata: Util.deepCopy(opts) });
} else {
this.setViewState2({ tag: element.targetCtrlName, action: 'loaddraft', viewdata: Util.deepCopy(opts) });
}
} else {
this.setViewState2({ tag: element.targetCtrlName, action: 'load', viewdata: Util.deepCopy(opts) });
}
}
}
}
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof CommonViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
// 处理部件加载(参数可指定触发部件)
if (Object.is(eventName, 'search') ||
Object.is(eventName, 'load') ||
Object.is(eventName, 'selectionchange')) {
if (this.ctrlEngineArray.length > 0) {
for (let element of this.ctrlEngineArray) {
if (element.triggerCtrlName && Object.is(element.triggerCtrlName, ctrlName)) {
if (element.triggerType && Object.is(element.triggerType, 'CtrlLoad')) {
if (this.view) {
if (this.view.$refs[element.targetCtrlName] && this.view.$refs[element.targetCtrlName].ctrl) {
this.view.$refs[element.targetCtrlName].ctrl.setNavdatas(Util.deepCopy(args));
}
if (Util.isExistData(args)) {
this.setViewState2({ tag: element.targetCtrlName, action: 'load', viewdata: Util.deepCopy(args) });
} else {
this.setViewState2({ tag: element.targetCtrlName, action: 'reset', viewdata: Util.deepCopy(args) });
}
}
}
}
}
}
}
}
/**
* 处理视图引擎参数
*
* @param {*} args 引擎数据
* @memberof CommonViewEngine
*/
public handleViewEngineParams(args: any) {
switch (args.engineType) {
case 'CtrlLoadTrigger':
return this.handleCtrlLoad(args.getPSUIEngineParams);
case 'CtrlLoad':
return this.handleCtrlLoad(args.getPSUIEngineParams);
case 'CtrlLoadAndSearch':
return this.CtrlLoadAndSearch(args.getPSUIEngineParams);
default:
LogUtil.warn(`${args.engineType}暂未支持`);
break;
}
}
/**
* 处理搜索部件加载并搜索(参数可指定触发部件)
*
* @param {*} args 引擎参数
* @memberof CommonViewEngine
*/
public CtrlLoadAndSearch(args: any) {
if (!args || args.length < 1) {
return null;
}
const targetCtrl = args.find((item: any) => {
return item.name === 'CTRL' && item.paramType === 'CTRL';
})
return { triggerCtrlName: 'VIEW', triggerType: 'CtrlLoadAndSearch', targetCtrlName: targetCtrl.ctrlName };
}
/**
* 处理部件加载(参数可指定触发部件)
*
* @param {*} args 引擎参数
* @memberof CommonViewEngine
*/
public handleCtrlLoad(args: any) {
if (!args || args.length < 1) {
return null;
}
const triggerCtrl = args.find((item: any) => {
return item.name === 'TRIGGER' && item.paramType === 'CTRL';
})
const targetCtrl = args.find((item: any) => {
return item.name === 'CTRL' && item.paramType === 'CTRL';
})
return { triggerCtrlName: triggerCtrl?.ctrlName, triggerType: 'CtrlLoad', targetCtrlName: targetCtrl.ctrlName };
}
/**
* @description 视图销毁
* @memberof CommonViewEngine
*/
public destroyed() {
super.destroyed();
this.viewCtrlMap.clear();
}
}
\ No newline at end of file
import { ViewEngine } from './view-engine';
import { AppServiceBase } from 'ibiz-core';
/**
* 快速摘要栏引擎
*
* @export
* @class DataPanelEngine
* @extends {ViewEngine}
*/
export class DataPanelEngine extends ViewEngine {
/**
* 快捷信息栏部件
*
* @protected
* @type {*}
* @memberof DataPanelEngine
*/
protected dataPanel: any = null;
/**
* 表单部件
*
* @protected
* @type {*}
* @memberof DataPanelEngine
*/
protected form: any = null;
/**
* 获取上下文
*
* @readonly
* @protected
* @type {*}
* @memberof DataPanelEngine
*/
protected get context(): any {
return this.view?.context || {};
}
/**
* 引擎初始化
*
* @param {*} [opt={}]
* @memberof DataPanelEngine
*/
public init(opt: any = {}): void {
super.init(opt);
this.dataPanel = opt.datapanel;
if (this.dataPanel) {
const tag = this.dataPanel.name;
let action: string = '';
if (
this.keyPSDEField &&
this.view.context[this.keyPSDEField] &&
!Object.is(this.view.context[this.keyPSDEField], '')
) {
action = 'load';
} else {
action = 'loaddraft';
}
this.setViewState2({ tag: tag, action: action, viewdata: this.view.viewparams });
}
}
/**
* 新增事件监听
*
* @protected
* @memberof DataPanelEngine
*/
protected addListener(): void {
if (this.view) {
this.view.$on('ModelLoaded', () => {
this.setData();
});
}
if (this.form) {
this.form.$on('load', () => {
this.setData();
});
}
}
/**
* 向快捷信息栏部件填充数据
*
* @memberof DataPanelEngine
*/
public setData(): void {
const data = AppServiceBase.getInstance().getAppStore();
if (this.dataPanel) {
if (Object.is(this.dataPanel.controlType, 'FORM')) {
if (data && data.data) {
this.dataPanel.fillForm(data.data).then(() =>{
this.dataPanel.formLogic({ name: '', newVal: null, oldVal: null });
})
}
} else if (Object.is(this.dataPanel.controlType, 'PANEL')) {
if (data && data.data) {
this.dataPanel.onInputDataChange(data.data);
}
}
}
}
/**
* @description 视图销毁
* @memberof DataPanelEngine
*/
public destroyed() {
super.destroyed();
this.dataPanel = null;
}
}
import { MDViewEngine } from './md-view-engine';
/**
* 视图引擎基础
*
* @export
* @class DataViewEngine
* @extends {MDViewEngine}
*/
export class DataViewEngine extends MDViewEngine {
/**
* 表格部件
*
* @type {*}
* @memberof DataViewEngine
*/
protected dataView: any;
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof DataViewEngine
*/
public init(options: any = {}): void {
this.dataView = options.dataview;
super.init(options);
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof DataViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, 'dataview')) {
this.MDCtrlEvent(eventName, args);
}
super.onCtrlEvent(ctrlName, eventName, args);
}
/**
* 获取多数据部件
*
* @returns {*}
* @memberof DataViewEngine
*/
public getMDCtrl(): any {
return this.dataView;
}
/**
* 删除操作
*
* @returns {void}
* @memberof DataViewEngine
*/
public doRemove(): void {
let selectedData = this.getMDCtrl() && this.getMDCtrl().getSelection();
if (!selectedData || selectedData == null || selectedData.length === 0) {
return;
}
let dataInfo = '';
selectedData.forEach((record: any, index: number) => {
let srfmajortext = record.srfmajortext;
if (index < 5) {
if (!Object.is(dataInfo, '')) {
dataInfo += '、';
}
dataInfo += srfmajortext;
} else {
return false;
}
});
if (selectedData.length < 5) {
dataInfo = dataInfo + this.view.$t('app.dataview.sum') + selectedData.length + this.view.$t('app.dataview.data');
} else {
dataInfo = dataInfo + '...' + this.view.$t('app.dataview.sum') + selectedData.length + this.view.$t('app.dataview.data');
}
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, '');
// 询问框
this.view.$Modal.confirm({
title: this.view.$t('app.commonwords.warning'),
content: this.view.$t('app.grid.confirmdel') + dataInfo + ',' + this.view.$t('app.grid.norecoverable'),
onOk: () => {
this.removeData(null);
},
onCancel: () => { }
});
}
/**
* 删除
*
* @param {*} [arg={}]
* @returns {void}
* @memberof DataViewEngine
*/
public removeData(arg: any = {}): void {
if (!arg) {
arg = {};
}
if (!arg.srfkeys) {
// 获取要删除的数据集合
const selectedData: Array<any> = this.getMDCtrl() && this.getMDCtrl().getSelection();
if (!selectedData || selectedData == null || selectedData.length === 0) {
return;
}
let keys = '';
selectedData.forEach((record) => {
let key = record.srfkey;
if (!Object.is(keys, '')) {
keys += ';';
}
keys += key;
});
arg.srfkeys = keys;
}
const dataView: any = this.getMDCtrl();
if (dataView) {
dataView.remove(arg);
}
}
/**
* @description 视图销毁
* @memberof DataViewEngine
*/
public destroyed() {
super.destroyed();
this.dataView = null;
}
}
\ No newline at end of file
import { ExpViewEngine } from './exp-view-engine';
/**
* 卡片视图导航视图界面引擎
*
* @export
* @class DataViewExpViewEngine
* @extends {ViewEngine}
*/
export class DataViewExpViewEngine extends ExpViewEngine {
/**
* 初始化引擎
*
* @param {*} options
* @memberof DataViewExpViewEngine
*/
public init(options: any): void {
this.expBar = options.dataviewexpbar;
super.init(options);
}
/**
* @description 视图销毁
* @memberof DataViewExpViewEngine
*/
public destroyed() {
super.destroyed();
this.expBar = null;
}
}
\ No newline at end of file
import { DataViewEngine } from './data-view-engine';
/**
*
*
* @export
* @class EditView9Engine
* @extends {EditViewEngine}
*/
export class DataView9Engine extends DataViewEngine {
}
import { ViewEngine } from './view-engine';
/**
* @description 实体首页视图引擎
* @export
* @class DeIndexViewEngine
* @extends {ViewEngine}
*/
export class DeIndexViewEngine extends ViewEngine {
/**
* @description 表单部件
* @private
* @type {*}
* @memberof DeIndexViewEngine
*/
private form: any;
/**
* @description 数据关系栏部件
* @private
* @type {*}
* @memberof DeIndexViewEngine
*/
private drBar: any;
/**
* @description 引擎初始化
* @param {*} opts
* @memberof DeIndexViewEngine
*/
public init(opts: any) {
this.form = opts.form;
this.drBar = opts.drbar;
super.init(opts);
}
/**
* @description 引擎加载
* @memberof DeIndexViewEngine
*/
public load() {
super.load();
const form = this.getForm();
if (form && this.isLoadDefault) {
const tag = form.name;
let action: string = 'loaddraft';
if (
this.keyPSDEField &&
this.view.context[this.keyPSDEField] &&
!Object.is(this.view.context[this.keyPSDEField], '')
) {
action = 'load';
}
this.setViewState2({ tag: tag, action: action, viewdata: this.view.viewparams });
}
}
/**
* @description 处理部件事件
* @param {string} ctrlName 部件名称
* @param {string} eventName 事件名称
* @param {*} args 事件数据
* @memberof DeIndexViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, this.getForm()?.name)) {
this.handleFormEvents(eventName, args);
}
if (Object.is(ctrlName, this.getDrBar()?.name)) {
this.handleDrBarEvents(eventName, args);
}
}
/**
* @description 处理表单部件事件
* @param {string} eventName 事件名
* @param {*} args 事件数据
* @memberof DeIndexViewEngine
*/
public handleFormEvents(eventName: string, args: any) {
if (Object.is(eventName, 'load')) {
this.onFormLoad(args);
}
if (Object.is(eventName, 'save')) {
this.onFormSave(args);
}
}
/**
* @description 处理数据关系栏部件事件
* @param {string} eventName 事件名
* @param {*} args 事件数据
* @memberof DeIndexViewEngine
*/
public handleDrBarEvents(eventName: string, args: any) {
if (Object.is(eventName, 'selectionchange')) {
this.drBarSelectionChange(args);
}
}
/**
* @description 表单加载完成
* @param {*} [arg={}]
* @memberof DeIndexViewEngine
*/
public onFormLoad(arg: any = {}): void {
this.view.model.dataInfo = Object.is(arg.srfuf, '1')
? this.majorPSDEField
? arg[this.majorPSDEField]
: arg.srfmajortext
: this.view.$t('app.local.new');
this.setTabCaption(this.view.model.dataInfo, Object.is(arg.srfuf, '0'));
const newdata: boolean = !Object.is(arg.srfuf, '1');
this.calcToolbarItemState(newdata);
this.calcToolbarItemAuthState(this.transformData(arg));
this.setDataCtrlData(arg,true);
this.emitViewEvent('load', arg);
const drBar = this.getDrBar();
if (drBar) {
const tag = drBar.name;
this.setViewState2({ tag: tag, action: 'state', viewdata: arg });
}
}
/**
* @description 表单保存完成
* @param {*} [arg={}]
* @memberof DeIndexViewEngine
*/
public onFormSave(arg: any = {}): void {
this.view.model.dataInfo = Object.is(arg.srfuf, '1')
? this.majorPSDEField
? arg[this.majorPSDEField]
: arg.srfmajortext
: this.view.$t('app.local.new');
this.setTabCaption(this.view.model.dataInfo, Object.is(arg.srfuf, '0'));
const newdata: boolean = !Object.is(arg.srfuf, '1');
this.calcToolbarItemState(newdata);
this.calcToolbarItemAuthState(this.transformData(arg));
this.emitViewEvent('save', arg);
this.emitViewEvent('viewdataschange',arg);
const drBar = this.getDrBar();
if (drBar) {
const tag = drBar.name;
this.setViewState2({ tag: tag, action: 'state', viewdata: arg });
}
}
/**
* @description 数据关系栏选中数据变化
* @param {any[]} args 选中数据
* @return {*} {void}
* @memberof DeIndexViewEngine
*/
public drBarSelectionChange(args: any[]): void {
const item = args[0];
if (!item || Object.keys(item).length === 0) {
return;
}
this.view.selection = {};
Object.assign(this.view.selection, JSON.parse(JSON.stringify(item)));
}
/**
* @description 设置分页标题
* @param {string} info
* @param {boolean} isNew
* @memberof DeIndexViewEngine
*/
public setTabCaption(info: string, isNew: boolean): void {
let viewModel: any = this.view.model;
if (viewModel && info && !Object.is(info, '')) {
// 解决表格视图标题问题
if (this.view.$tabPageExp && this.view.viewDefaultUsage) {
this.view.$tabPageExp.setCurPageCaption({
caption: viewModel.srfCaption,
title: viewModel.srfCaption,
info: info,
viewtag: this.view.viewtag,
cacheRoutePath: this.view.cacheRoutePath
}
);
}
if (this.view.$route) {
this.view.$route.meta.info = info;
}
}
}
/**
* @description 转化数据
* @param {*} arg 源数据
* @return {*}
* @memberof DeIndexViewEngine
*/
public transformData(arg: any) {
const form = this.getForm();
if (form && form.transformData && form.transformData instanceof Function) {
return form.transformData(arg);
}
return null;
}
/**
* @description 获取表单部件
* @return {*}
* @memberof DeIndexViewEngine
*/
public getForm() {
return this.form;
}
/**
* @description 获取数据关系栏部件
* @return {*}
* @memberof DeIndexViewEngine
*/
public getDrBar() {
return this.drBar;
}
/**
* @description 视图销毁
* @memberof DeIndexViewEngine
*/
public destroyed() {
super.destroyed();
this.form = null;
this.drBar = null;
}
}
\ No newline at end of file
import { AppServiceBase } from '../service';
import { LogUtil } from '../utils';
import { ViewEngine } from './view-engine';
/**
* 编辑视图引擎
*
* @export
* @class EditViewEngine
* @extends {ViewEngine}
*/
export class EditViewEngine extends ViewEngine {
/**
* 表单部件
*
* @protected
* @type {*}
* @memberof EditViewEngine
*/
protected form: any;
/**
* 父健为当前健
*
* @protected
* @type {string}
* @memberof EditViewEngine
*/
protected p2k: string = '';
/**
* 初始化编辑视图引擎
*
* @param {*} [options={}]
* @memberof EditViewEngine
*/
public init(options: any = {}): void {
this.form = options.form;
this.p2k = options.p2k;
super.init(options);
}
/**
* 引擎加载
*
* @param {*} [opts={}]
* @memberof EditViewEngine
*/
public load(opts: any = {}): void {
super.load(opts);
if (this.getForm() && this.isLoadDefault) {
const tag = this.getForm().name;
let action: string = '';
if (
this.keyPSDEField &&
this.view.context[this.keyPSDEField] &&
!Object.is(this.view.context[this.keyPSDEField], '')
) {
action = 'load';
} else {
action = 'loaddraft';
}
this.setViewState2({ tag: tag, action: action, viewdata: this.view.viewparams });
}
this.isLoadDefault = true;
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof EditViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'form')) {
this.formEvent(eventName, args);
}
}
/**
* 表单事件
*
* @param {string} eventName
* @param {*} args
* @memberof EditViewEngine
*/
public formEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'load')) {
this.onFormLoad(args);
}
if (Object.is(eventName, 'save')) {
this.onFormSave(args);
}
if (Object.is(eventName, 'remove')) {
this.onFormRemove(args);
}
}
/**
* 表单加载完成
*
* @param {*} args
* @memberof EditViewEngine
*/
public onFormLoad(arg: any): void {
this.view.model.dataInfo = Object.is(arg.srfuf, '1')
? this.majorPSDEField
? arg[this.majorPSDEField]
: arg.srfmajortext
: this.view.$t('app.local.new');
this.setTabCaption(this.view.model.dataInfo, Object.is(arg.srfuf, '0'));
const newdata: boolean = !Object.is(arg.srfuf, '1');
this.calcToolbarItemState(newdata);
this.calcToolbarItemAuthState(this.transformData(arg));
this.setDataCtrlData(arg, true);
this.readTask(arg);
this.emitViewEvent('load', arg);
}
/**
* 表单保存完成
*
* @param {*} args
* @memberof EditViewEngine
*/
public onFormSave(arg: any): void {
this.view.model.dataInfo = Object.is(arg.srfuf, '1')
? this.majorPSDEField
? arg[this.majorPSDEField]
: arg.srfmajortext
: this.view.$t('app.local.new');
this.setTabCaption(this.view.model.dataInfo, Object.is(arg.srfuf, '0'));
const newdata: boolean = !Object.is(arg.srfuf, '1');
this.calcToolbarItemState(newdata);
this.calcToolbarItemAuthState(this.transformData(arg));
this.emitViewEvent('save', arg);
this.emitViewEvent('viewdataschange', arg);
this.emitViewEvent('viewstatechange', { isSave: true });
if (this.view && this.view.viewInstance && Object.is(this.view.viewInstance.viewType, "DEEDITVIEW9")) {
this.emitViewEvent('drdatasaved', arg);
}
}
/**
* 表单删除完成
*
* @param {*} args
* @memberof EditViewEngine
*/
public onFormRemove(arg: any): void {
this.emitViewEvent('remove', arg);
this.emitViewEvent('viewdataschange', arg);
}
/**
* 编辑界面_保存操作
*
* @memberof IBizEditViewController
*/
public doSave(): void {
this.saveData({});
}
/**
* 保存视图数据
*
* @param {*} [arg={}]
* @memberof EditViewEngine
*/
public saveData(arg: any = {}): void {
if (this.getForm()) {
const tag = this.getForm().name;
this.setViewState2({ tag: tag, action: 'save', viewdata: arg });
}
}
/**
* 获取表单对象
*
* @returns {*}
* @memberof EditViewEngine
*/
public getForm(): any {
return this.form;
}
/**
* 设置分页标题
*
* @memberof EditViewEngine
*/
public setTabCaption(info: string, isNew: boolean): void {
let viewModel: any = this.view.model;
if (viewModel && info && !Object.is(info, '')) {
// 解决表格视图标题问题
if (this.view.$tabPageExp && this.view.viewDefaultUsage) {
this.view.$tabPageExp.setCurPageCaption({
caption: viewModel.srfCaption,
title: viewModel.srfCaption,
info: info,
viewtag: this.view.viewtag,
cacheRoutePath: this.view.cacheRoutePath
}
);
}
if (this.view.$route) {
this.view.$route.meta.info = info;
}
}
}
/**
* 将抄送任务标记为已读
*
* @param data 业务数据
* @memberof EditViewEngine
*/
public readTask(data: any) {
if (Object.is(this.view?.viewparams?.srfwf, "cc")) {
Object.assign(data, { taskId: this.view.viewparams.srftaskid });
this.view.appEntityService.ReadTask(this.view.context, data).then((response: any) => {
if (!response || response.status !== 200) {
LogUtil.warn(this.view.$t('app.editor.error'));
return;
}
AppServiceBase.getInstance().getAppMessageCenter().notifyMessage({ name: this.view.appDeCodeName, action: 'appRefresh', data: data });
}).catch((error: any) => {
LogUtil.warn(this.view.$t('app.editor.error'));
})
}
}
/**
* 转化数据
*
* @memberof EditViewEngine
*/
public transformData(arg: any) {
if (!this.getForm() || !(this.getForm().transformData instanceof Function)) {
return null;
}
return this.getForm().transformData(arg);
}
/**
* @description 视图销毁
* @memberof EditViewEngine
*/
public destroyed() {
super.destroyed();
this.form = null;
}
}
import { EditViewEngine } from './edit-view-engine';
/**
* 实体编辑视图(左右关系)界面引擎
*
* @export
* @class EditView2Engine
* @extends {EditViewEngine}
*/
export class EditView2Engine extends EditViewEngine {
/**
* 数据关系栏
*
* @protected
* @type {*}
* @memberof EditView2Engine
*/
protected drBar: any;
/**
* Creates an instance of EditView2Engine.
*
* @memberof EditView2Engine
*/
constructor() {
super();
}
/**
* 初始化引擎
*
* @param {*} [options={}]
* @memberof EditView2Engine
*/
public init(options: any = {}): void {
this.drBar = options.drbar;
super.init(options);
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof EditView2Engine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'drbar')) {
this.drbarEvent(eventName, args);
}
}
/**
* 数据关系栏事件
*
* @param {string} eventName
* @param {any[]} args
* @memberof EditView2Engine
*/
public drbarEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'selectionchange')) {
this.drBarSelectionChange(args);
}
}
/**
* 数据关系栏选中
*
* @param {any[]} args
* @memberof EditView2Engine
*/
public drBarSelectionChange(data: any): void {
if (data) {
this.view.drItem = data;
if (this.getDRBar()) {
this.setViewState2({ tag: this.getDRBar().name, action: 'change', viewdata: data });
}
this.view.$forceUpdate();
}
this.emitViewEvent('selectionchange', data);
}
/**
* 表单加载完成
*
* @param {*} [arg={}]
* @memberof EditView2Engine
*/
public onFormLoad(arg: any = {}): void {
super.onFormLoad(arg);
if (this.getDRBar()) {
const tag = this.getDRBar().name;
Object.assign(arg, {
srfparentdename: this.getForm().appDeCodeName,
srfparentkey: arg.srfkey,
});
this.setViewState2({ tag: tag, action: 'state', viewdata: arg });
}
}
/**
* 表单保存完成
*
* @param {*} [arg={}]
* @memberof EditView2Engine
*/
public onFormSave(arg: any = {}): void {
super.onFormSave(arg);
if (this.getDRBar()) {
const tag = this.getDRBar().name;
Object.assign(arg, {
srfparentdename: this.getForm().appDeCodeName,
srfparentkey: arg.srfkey,
});
this.setViewState2({ tag: tag, action: 'state', viewdata: arg });
}
}
/**
* 获取关系
*
* @returns {*}
* @memberof EditView2Engine
*/
public getDRBar(): any {
return this.drBar;
}
/**
* @description 视图销毁
* @memberof EditView2Engine
*/
public destroyed() {
super.destroyed();
this.drBar = null;
}
}
\ No newline at end of file
import { EditViewEngine } from './edit-view-engine';
/**
* 实体编辑视图(分页关系)界面引擎
*
* @export
* @class EditView3Engine
* @extends {EditViewEngine}
*/
export class EditView3Engine extends EditViewEngine {
/**
* 数据关系栏
*
* @protected
* @type {*}
* @memberof EditView3Engine
*/
protected drTab: any;
/**
* Creates an instance of EditView3Engine.
*
* @memberof EditView3Engine
*/
constructor() {
super();
}
/**
* 初始化引擎
*
* @param {*} [options={}]
* @memberof EditView3Engine
*/
public init(options: any = {}): void {
this.drTab = options.drtab;
super.init(options);
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof EditView3Engine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'drtab')) {
this.drTabEvent(eventName, args);
}
}
/**
* 数据关系栏事件
*
* @param {string} eventName
* @param {any[]} args
* @memberof EditView3Engine
*/
public drTabEvent(eventName: string, arg: any): void {
if (Object.is(eventName, 'selectionchange')) {
this.drTabSelectionChange(arg);
}
}
/**
* 数据关系栏选中
*
* @param {any[]} args
* @memberof EditView3Engine
*/
public drTabSelectionChange(data: any): void {
if (data) {
this.view.drItem = data;
if (this.getDrTab()) {
this.setViewState2({ tag: this.getDrTab().name, action: 'change', viewdata: data });
}
this.view.$forceUpdate();
}
this.emitViewEvent('selectionchange', data);
}
/**
* 表单加载完成
*
* @param {*} [arg={}]
* @memberof EditView3Engine
*/
public onFormLoad(arg: any = {}): void {
super.onFormLoad(arg);
if (this.getDrTab()) {
const tag = this.getDrTab().name;
Object.assign(arg, {
srfparentdename: this.getForm().appDeCodeName,
srfparentkey: arg.srfkey,
});
this.setViewState2({ tag: tag, action: 'state', viewdata: arg });
}
}
/**
* 表单保存完成
*
* @param {*} [arg={}]
* @memberof EditView3Engine
*/
public onFormSave(arg: any = {}): void {
super.onFormSave(arg);
if (this.getDrTab()) {
const tag = this.getDrTab().name;
Object.assign(arg, {
srfparentdename: this.getForm().appDeCodeName,
srfparentkey: arg.srfkey,
});
this.setViewState2({ tag: tag, action: 'state', viewdata: arg });
}
}
/**
* 获取关系
*
* @returns {*}
* @memberof EditView3Engine
*/
public getDrTab(): any {
return this.drTab;
}
/**
* @description 视图销毁
* @memberof EditView3Engine
*/
public destroyed() {
super.destroyed();
this.drTab = null;
}
}
\ No newline at end of file
import { EditViewEngine } from './edit-view-engine';
/**
* 实体编辑视图(上下关系)界面引擎
*
* @export
* @class EditView4Engine
* @extends {EditViewEngine}
*/
export class EditView4Engine extends EditViewEngine {
/**
* 数据关系栏
*
* @protected
* @type {*}
* @memberof EditView4Engine
*/
protected drTab: any;
/**
* Creates an instance of EditView4Engine.
*
* @memberof EditView4Engine
*/
constructor() {
super();
}
/**
* 初始化引擎
*
* @param {*} [options={}]
* @memberof EditView4Engine
*/
public init(options: any = {}): void {
this.drTab = options.drtab;
super.init(options);
}
/**
* 部件事件机制
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof EditView4Engine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
super.onCtrlEvent(ctrlName, eventName, args);
if (Object.is(ctrlName, 'drtab')) {
this.drTabEvent(eventName, args);
}
}
/**
* 数据关系栏事件
*
* @param {string} eventName
* @param {any[]} args
* @memberof EditView4Engine
*/
public drTabEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'selectionchange')) {
this.drTabSelectionChange(args);
}
}
/**
* 数据关系栏选中
*
* @param {any[]} args
* @memberof EditView4Engine
*/
public drTabSelectionChange(data: any): void {
if (data) {
this.view.drItem = data;
if (this.getDrTab()) {
this.setViewState2({ tag: this.getDrTab().name, action: 'change', viewdata: data });
}
this.view.$forceUpdate();
}
this.emitViewEvent('selectionchange', data);
}
/**
* 表单加载完成
*
* @param {*} [arg={}]
* @memberof EditView4Engine
*/
public onFormLoad(arg: any = {}): void {
super.onFormLoad(arg);
if (this.getDrTab()) {
const tag = this.getDrTab().name;
Object.assign(arg, {
srfparentdename: this.getForm().appDeCodeName,
srfparentkey: arg.srfkey,
});
this.setViewState2({ tag: tag, action: 'state', viewdata: arg });
}
}
/**
* 表单保存完成
*
* @param {*} [arg={}]
* @memberof EditView4Engine
*/
public onFormSave(arg: any = {}): void {
super.onFormSave(arg);
if (this.getDrTab()) {
const tag = this.getDrTab().name;
Object.assign(arg, {
srfparentdename: this.getForm().appDeCodeName,
srfparentkey: arg.srfkey,
});
this.setViewState2({ tag: tag, action: 'state', viewdata: arg });
}
}
/**
* 获取关系
*
* @returns {*}
* @memberof EditView4Engine
*/
public getDrTab(): any {
return this.drTab;
}
/**
* @description 视图销毁
* @memberof EditView4Engine
*/
public destroyed() {
super.destroyed();
this.drTab = null;
}
}
\ No newline at end of file
import { EditViewEngine } from './edit-view-engine';
/**
*
*
* @export
* @class EditView9Engine
* @extends {EditViewEngine}
*/
export class EditView9Engine extends EditViewEngine {
}
import { ViewEngine } from "./view-engine";
/**
* 导航视图引擎
*
* @export
* @class ExpViewEngine
* @extends {ViewEngine}
*/
export class ExpViewEngine extends ViewEngine {
/**
* 导航栏部件
*
* @protected
* @type {*}
* @memberof ExpViewEngine
*/
protected expBar: any = null;
/**
* 是否真正选中
*
* @protected
* @type {boolean}
* @memberof ExpViewEngine
*/
protected isRealSelected: boolean = false;
/**
* 是否关闭导航视图
*
* @protected
* @type {boolean}
* @memberof ExpViewEngine
*/
protected isCloseNavView: boolean = false;
/**
* 引擎加载
*
* @memberof ExpViewEngine
*/
public load() {
super.load();
if (this.getExpBar() && this.isLoadDefault) {
const tag = this.getExpBar().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
} else {
this.isLoadDefault = true;
}
}
/**
* 搜索
*
* @param {*} data
* @memberof ExpViewEngine
*/
public search(data: any) {
const expBar = this.getExpBar();
if (expBar) {
this.setViewState2({ tag: expBar.name, action: 'load', viewdata: null });
}
}
/**
* 关闭导航视图
*
* @memberof ExpViewEngine
*/
public closeNavView() {
this.view.backSplit = this.view.split;
this.view.split = 1;
this.view.navItem = null;
this.isCloseNavView = true;
}
/**
* 处理导航视图重绘(有选中项,且导航视图需要刷新则通知嵌入导航视图执行刷新逻辑)
*
* @memberof ExpViewEngine
*/
public handleNavViewRefresh(tag: string) {
if (this.view && this.view.viewState && this.isRealSelected) {
this.setViewState2({ tag, action: 'load', viewdata: this.view.viewparams });
}
}
/**
* 事件处理
*
* @param {string} ctrlName 事件标识
* @param {string} eventName
* @param {*} args
* @memberof ExpViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any) {
const expBar = this.getExpBar();
if (ctrlName === expBar?.name) {
this.handleExpBarEvents(eventName, args);
}
if (ctrlName === expBar?.xDataControlName) {
this.handleXDataControlEvents(eventName, args);
}
}
/**
* 处理导航栏事件
*
* @protected
* @param {string} eventName
* @param {*} args
* @memberof ExpViewEngine
*/
protected handleExpBarEvents(eventName: string, args: any) {
if (Object.is(eventName, 'load')) {
this.emitViewEvent('viewLoaded', args);
}
if (Object.is(eventName, 'selectionchange')) {
if (this.isCloseNavView) {
this.isCloseNavView = false;
return;
}
if (this.view && args && args.srfnavdata && args.srfnavdata.context && args.srfnavdata.context.viewpath) {
this.view.navItem = args;
if (this.view.backSplit !== 0) {
this.view.split = this.view.backSplit;
}
// 计算真实选中值
if (args && args.data && args.data[0]) {
const selectedData = args.data[0];
const result = Object.keys(selectedData).find((key: string) => {
return selectedData[key] !== null && key !== 'srfchecked';
})
if(result){
this.isRealSelected = true;
}else{
this.isRealSelected = false;
}
}
this.view.$forceUpdate();
}
this.emitViewEvent('viewdataschange', args?.data);
}
if (Object.is(eventName, 'activated')) {
this.emitViewEvent('viewdatasactivated', args);
}
}
/**
* 处理导航栏数据部件事件
*
* @protected
* @param {string} eventName
* @param {*} args
* @memberof ExpViewEngine
*/
protected handleXDataControlEvents(eventName: string, args: any) {
if (Object.is(eventName, 'beforeload')) {
this.handleBeforeLoad(args);
}
}
/**
* 导航栏数据部件加载之前
*
* @protected
* @param {*} args
* @memberof ExpViewEngine
*/
protected handleBeforeLoad(args: any) {
if (this.view && this.view.quickGroupData) {
Object.assign(args, { viewparams: this.view.quickGroupData });
}
}
/**
* 获取导航栏
*
* @return {*}
* @memberof ExpViewEngine
*/
public getExpBar() {
return this.expBar;
}
/**
* @description 视图销毁
* @memberof ExpViewEngine
*/
public destroyed() {
super.destroyed();
this.expBar = null;
}
}
\ No newline at end of file
import { MDViewEngine } from './md-view-engine';
/**
* 视图引擎基础
*
* @export
* @class GridViewEngine
* @extends {MDViewEngine}
*/
export class FormPickupDataViewEngine extends MDViewEngine {
/**
* 数据视图部件
*
* @type {*}
* @memberof FormPickupDataViewEngine
*/
protected dataview: any;
/**
* Creates an instance of GridViewEngine.
* @memberof GridViewEngine
*/
constructor() {
super();
}
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof GridViewEngine
*/
public init(options: any = {}): void {
this.dataview = options.dataview;
super.init(options);
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof GridViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, 'dataview')) {
this.MDCtrlEvent(eventName, args);
}
super.onCtrlEvent(ctrlName, eventName, args);
}
/**
* 获取多数据部件
*
* @returns {*}
* @memberof GridViewEngine
*/
public getMDCtrl(): any {
return this.dataview;
}
/**
* @description 视图销毁
* @memberof GridViewEngine
*/
public destroyed() {
super.destroyed();
this.dataview = null;
}
}
\ No newline at end of file
import { MDViewEngine } from './md-view-engine';
/**
* 实体树视图界面引擎
*
* @export
* @class GanttViewEngine
* @extends {ViewEngine}
*/
export class GanttViewEngine extends MDViewEngine {
/**
* 甘特图部件对象
*
* @type {*}
* @memberof GanttViewEngine
*/
public gantt: any;
/**
* 初始化引擎
*
* @param {*} options
* @memberof GanttViewEngine
*/
public init(options: any): void {
this.gantt = options.gantt;
super.init(options);
}
/**
* 树搜索
*
* @param {*} [arg]
* @memberof GanttViewEngine
*/
public search(arg?: any) {
if (this.getMDCtrl()) {
const tag = this.getMDCtrl().name;
this.setViewState2({ tag: tag, action: 'filter', viewdata: arg });
}
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof GanttViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, 'gantt')) {
this.MDCtrlEvent(eventName, args);
}
super.onCtrlEvent(ctrlName, eventName, args);
}
/**
* 多数据部件事件处理
*
* @param {string} eventName
* @param {*} args
* @memberof GanttViewEngine
*/
public MDCtrlEvent(eventName: string, args: any) {
if (Object.is(eventName, 'load')) {
this.onLoad(args);
}
if (Object.is(eventName, 'selectionchange')) {
this.onSelectionChange(args);
}
super.MDCtrlEvent(eventName, args);
}
/**
* 搜索栏事件
*
* @param {string} eventName
* @param {*} [args={}]
* @memberof GanttViewEngine
*/
public searchBarEvent(eventName: string, args: any = {}): void {
if (Object.is(eventName, 'search')) {
this.search({ srfnodefilter: args?.quickSearchValue });
}
}
/**
* 部件加载完
*
* @param {*} args
* @memberof GanttViewEngine
*/
public onLoad(args: any): void { }
/**
* 选中处理
*
* @param {any[]} args
* @memberof GanttViewEngine
*/
public onSelectionChange(args: any[]): void { }
/**
*
*获取树视图部件
* @returns {*}
* @memberof GanttViewEngine
*/
public getMDCtrl(): any {
return this.gantt;
}
/**
* @description 视图销毁
* @memberof GanttViewEngine
*/
public destroyed() {
super.destroyed();
this.gantt = null;
}
}
\ No newline at end of file
import { ExpViewEngine } from './exp-view-engine';
/**
* 表格导航视图界面引擎
*
* @export
* @class GridExpViewEngine
* @extends {ViewEngine}
*/
export class GridExpViewEngine extends ExpViewEngine {
/**
* 初始化引擎
*
* @param {*} options
* @memberof GridExpViewEngine
*/
public init(options: any): void {
this.expBar = options.gridexpbar;
super.init(options);
}
/**
* @description 视图销毁
* @memberof GridExpViewEngine
*/
public destroyed() {
super.destroyed();
this.expBar = null;
}
}
\ No newline at end of file
import { MDViewEngine } from './md-view-engine';
/**
* 视图引擎基础
*
* @export
* @class GridViewEngine
* @extends {MDViewEngine}
*/
export class GridViewEngine extends MDViewEngine {
/**
* 表格部件
*
* @type {*}
* @memberof GridViewEngine
*/
protected grid: any;
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof GridViewEngine
*/
public init(options: any = {}): void {
this.grid = options.grid;
super.init(options);
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof GridViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, this.grid.name)) {
this.MDCtrlEvent(eventName, args);
}
super.onCtrlEvent(ctrlName, eventName, args);
}
/**
* 获取多数据部件
*
* @returns {*}
* @memberof GridViewEngine
*/
public getMDCtrl(): any {
return this.grid;
}
/**
* 事件处理
*
* @param {string} eventName
* @param {*} args
* @memberof GridViewEngine
*/
public MDCtrlEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'rowdblclick') && this.gridRowAllowActive(2)) {
this.doEdit(args);
return;
}
if (Object.is(eventName, 'rowclick') && this.gridRowAllowActive(1)) {
this.doEdit(args);
return;
}
if (Object.is(eventName, 'selectionchange')) {
this.selectionChange(args);
return;
}
super.MDCtrlEvent(eventName, args);
}
/**
* 表格是否被允许激活
*
* @param {number} mode
* @returns {boolean}
* @memberof GridViewEngine
*/
public gridRowAllowActive(mode: number): boolean {
return this.view.viewInstance?.gridRowActiveMode === mode ? true : false;
}
/**
* @description 多数据部件加载完成
* @param {any[]} args
* @memberof GridViewEngine
*/
public MDCtrlLoad(args: any[]) {
super.MDCtrlLoad(args);
this.view.$nextTick(() => {
this.setViewContentHeight();
});
}
/**
* @description 设置视图内容区高度
* @memberof GridViewEngine
*/
public setViewContentHeight() {
const viewHeader:any = this.view.$el.getElementsByClassName('ivu-card-head')[0];
const viewContent: any = this.view.$el.getElementsByClassName('ivu-card-body')[0];
if (viewHeader?.offsetHeight && viewHeader?.offsetHeight != 49) {
viewContent.style.height = `calc(100% - ${viewHeader.offsetHeight}px)`
}
}
/**
* @description 视图销毁
* @memberof GridViewEngine
*/
public destroyed() {
super.destroyed();
this.grid = null;
}
}
\ No newline at end of file
import { GridViewEngine } from "./grid-view-engine";
/**
* 实体表格视图(上下关系)视图引擎
*
* @export
* @class GridView4Engine
* @extends {GridViewEngine}
*/
export class GridView4Engine extends GridViewEngine {
/**
* 数据关系分页部件
*
* @protected
* @type {*}
* @memberof GridView4Engine
*/
protected drTab: any = null;
/**
* 引擎初始化
*
* @param {*} opts
* @memberof GridView4Engine
*/
init(opts: any) {
this.drTab = opts.drtab;
super.init(opts);
}
/**
* 处理部件事件
*
* @param {string} controlName
* @param {string} action
* @param {*} data
* @memberof GridView4Engine
*/
public onCtrlEvent(controlName: string, action: string, data: any) {
const drTabName = this.getDrTab()?.name;
if (controlName === drTabName) {
if (Object.is(action,'selectionchange')) {
this.handleDrTabSelectionChange(data);
}
}
super.onCtrlEvent(controlName, action, data);
}
/**
* 处理数据关系分页部件选中变化
*
* @param {*} data
* @memberof GridView4Engine
*/
public handleDrTabSelectionChange(data: any) {
if (data) {
this.view.drItem = data;
this.setViewState2({ tag: this.getDrTab().name, action: 'change', viewdata: data });
this.view.$forceUpdate();
}
}
/**
* 表格部件选中数据变化
*
* @param {any[]} args
* @memberof GridView4Engine
*/
public selectionChange(args: any[]) {
if (args && args.length) {
const data = args[0];
Object.assign(data, {
srfparentdename: this.getMDCtrl()?.appDeCodeName,
srfparentkey: data.srfkey,
});
this.setViewState2({ tag: this.getDrTab()?.name, action: 'state', viewdata: data });
}
super.selectionChange(args);
}
/**
* 获取数据关系分页部件
*
* @return {*}
* @memberof GridView4Engine
*/
public getDrTab() {
return this.drTab;
}
/**
* @description 视图销毁
* @memberof GridView4Engine
*/
public destroyed() {
super.destroyed();
this.drTab = null;
}
}
\ No newline at end of file
import { GridViewEngine } from './grid-view-engine';
/**
* 视图引擎基础
*
* @export
* @class GridView8Engine
* @extends {GridViewEngine}
*/
export class GridView8Engine extends GridViewEngine {
/**
* 表格部件
*
* @type {*}
* @memberof GridView8Engine
*/
protected grid: any;
/**
* 表格部件
*
* @protected
* @type {*}
* @memberof Grid8ViewEngine
*/
protected totalgrid: any;
/**
* 选中数据集
*
* @protected
* @type {any[]}
* @memberof Grid8ViewEngine
*/
public selections: any[] = [];
/**
* 选中数据集
*
* @protected
* @type {any[]}
* @memberof Grid8ViewEngine
*/
public selections2: any[] = [];
/**
* Creates an instance of GridView8Engine.
* @memberof GridView8Engine
*/
constructor() {
super();
}
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof GridView8Engine
*/
public init(options: any = {}): void {
this.grid = options.grid;
this.totalgrid = options.totalgrid;
super.init(options);
}
/**
* 引擎加载
*
* @memberof MDViewEngine
*/
public load(): void {
super.load();
this.load2();
}
/**
* 加载
*
* @memberof Grid8ViewEngine
*/
public load2(): void {
if (this.getMDCtrl2()) {
const tag = this.getMDCtrl2().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: this.view.viewparams });
}
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof GridView8Engine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, 'totalgrid')) {
this.MD2Event(eventName, args);
}
super.onCtrlEvent(ctrlName, eventName, args);
}
/**
* 获取多数据部件
*
* @returns {*}
* @memberof GridView8Engine
*/
public getMDCtrl(): any {
return this.grid;
}
/**
* 获取多数据部件
*
* @returns {*}
* @memberof GridView8Engine
*/
public getMDCtrl2(): any {
return this.totalgrid;
}
/**
* 删除
*
* @param {*} [arg={}]
* @returns {void}
* @memberof GridView8Engine
*/
public removeData(items: any[] = []): void {
let arg: any = {};
// 获取要删除的数据集合
if (!items || items == null || items.length === 0) {
return;
}
let keys = '';
items.forEach((item) => {
let key = item.srfkey;
if (!Object.is(keys, '')) {
keys += ';';
}
keys += key;
});
arg.srfkeys = keys;
const grid: any = this.getMDCtrl();
if (grid) {
grid.remove(arg);
}
}
/**
* 添加数据
*
* @param {any[]} [items=[]]
* @memberof Grid8ViewEngine
*/
public addBatchData(items: any[] = []): void {
let arg: any = {};
// 获取要添加的数据集合
if (!items || items == null || items.length === 0) {
return;
}
let keys = '';
items.forEach((item) => {
let key = item.srfkey;
if (!Object.is(keys, '')) {
keys += ';';
}
keys += key;
});
arg.srfkeys = keys;
const grid: any = this.getMDCtrl();
if (grid) {
grid.addBatchData(arg);
}
}
/**
*
*
* @param {string} eventName
* @param {*} [args={}]
* @memberof GridView8Engine
*/
public MDEvent(eventName: string, args: any = {}): void {
if (Object.is(eventName, 'rowclick')) {
// this.***()
}
if (Object.is(eventName, 'rowdblclick')) {
// this.doEdit(args);
}
if (Object.is(eventName, 'selectionchange')) {
// this.***()
this.selectionChange(args);
}
if (Object.is(eventName, 'remove')) {
this.load2();
}
}
/**
*
*
* @param {string} eventName
* @param {*} [args={}]
* @memberof GridView8Engine
*/
public MD2Event(eventName: string, args: any = {}): void {
if (Object.is(eventName, 'rowclick')) {
// this.***()
}
if (Object.is(eventName, 'rowdblclick')) {
// this.doEdit(args);
}
if (Object.is(eventName, 'selectionchange')) {
// this.***()
this.selectionChange2(args);
}
}
/**
* 选中变化
*
* @param {any[]} args
* @memberof GridView8Engine
*/
public selectionChange(args: any[]): void {
this.selections = [...args];
}
/**
* 选中变化
*
* @param {any[]} args
* @memberof GridView8Engine
*/
public selectionChange2(args: any[]): void {
this.selections2 = [...args];
}
/**
* 移动数据
*
* @memberof Grid8ViewEngine
*/
public moveData() {
this.addBatchData(this.selections2);
}
/**
* 移动数据
*
* @memberof Grid8ViewEngine
*/
public moveData2() {
this.removeData(this.selections);
}
/**
* 移动全部数据
*
* @memberof Grid8ViewEngine
*/
public moveAllData() {
if (this.getMDCtrl2()) {
var items: any[] = this.getMDCtrl2().getDatas();
this.addBatchData(items);
}
}
/**
* 移动全部数据
*
* @memberof Grid8ViewEngine
*/
public moveAllData2() {
if (this.getMDCtrl()) {
var items: any[] = this.getMDCtrl().getDatas();
this.removeData(items);
}
}
/**
* @description 视图销毁
* @memberof Grid8ViewEngine
*/
public destroyed() {
super.destroyed();
this.grid = null;
this.totalgrid = null;
}
}
import { GridViewEngine } from './grid-view-engine';
/**
* 视图引擎基础
*
* @export
* @class GridView9Engine
* @extends {GridViewEngine}
*/
export class GridView9Engine extends GridViewEngine {
/**
* Creates an instance of GridView9Engine.
* @memberof GridView9Engine
*/
constructor() {
super();
}
}
\ No newline at end of file
import { ViewEngine } from './view-engine';
/**
*
*
* @export
* @class HtmlViewEngine
* @extends {ViewEngine}
*/
export class HtmlViewEngine extends ViewEngine {
}
import { MDViewEngine } from "./md-view-engine";
/**
* 实体索引选择数据视图引擎
*
* @export
* @class IndexPickupDataViewEngine
* @extends {MDViewEngine}
*/
export class IndexPickupDataViewEngine extends MDViewEngine {
/**
* 数据视图部件
*
* @protected
* @type {*}
* @memberof IndexPickupDataViewEngine
*/
protected dataView: any;
/**
* 引擎初始化
*
* @param {*} options
* @memberof IndexPickupDataViewEngine
*/
init(options: any) {
this.dataView = options.dataview;
super.init(options);
}
/**
* 处理部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof IndexPickupDataViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any) {
if (Object.is(ctrlName, 'dataview')) {
this.MDCtrlEvent(eventName, args);
}
super.onCtrlEvent(ctrlName, eventName, args);
}
/**
* 多数据部件事件处理
*
* @param {string} eventName
* @param {*} args
* @memberof IndexPickupDataViewEngine
*/
public MDCtrlEvent(eventName: string, args: any) {
if (Object.is(eventName, 'selectionchange')) {
this.emitViewEvent('viewdataschange', args);
}
}
/**
* 获取多数据部件
*
* @return {*}
* @memberof IndexPickupDataViewEngine
*/
getMDCtrl() {
return this.dataView;
}
/**
* @description 视图销毁
* @memberof IndexPickupDataViewEngine
*/
public destroyed() {
super.destroyed();
this.dataView = null;
}
}
\ No newline at end of file
export { ViewEngine } from './view-engine';
export { EditViewEngine } from './edit-view-engine';
export { EditView2Engine } from './edit-view2-engine';
export { EditView3Engine } from './edit-view3-engine';
export { EditView4Engine } from './edit-view4-engine';
export { EditView9Engine } from './edit-view9-engine';
export { MDViewEngine } from './md-view-engine';
export { GridViewEngine } from './grid-view-engine';
export { GridExpViewEngine } from './grid-exp-view-engine';
export { GridView8Engine } from './grid-view8-engine';
export { GridView9Engine } from './grid-view9-engine';
export { CalendarExpViewEngine } from './calendar-exp-view-engine';
export { ChartViewEngine } from './chart-view-engine';
export { ChartExpViewEngine } from './chart-exp-view-engine';
export { ChartView9Engine } from './chart-view9-engine';
export { DataViewEngine } from './data-view-engine';
export { DataViewExpViewEngine } from './data-view-exp-view-engine';
export { DataView9Engine } from './data-view9-engine';
export { FormPickupDataViewEngine } from './form-pickup-data-view-engine';
export { HtmlViewEngine } from './html-view-engine';
export { KanBanViewEngine } from './kan-ban-view-engine';
export { ListExpViewEngine } from './list-exp-view-engine';
export { ListViewEngine } from './list-view-engine';
export { ListView9Engine } from './list-view9-engine';
export { MapViewEngine } from './map-view-engine';
export { MapView9Engine } from './map-view9-engine';
export { MPickupViewEngine } from './mpickup-view-engine';
export { MPickupView2Engine } from './mpickup-view2-engine';
export { OptionViewEngine } from './option-view-engine';
export { PickupDataViewEngine } from './pickup-data-view-engine';
export { PickupGridViewEngine } from './pickup-grid-view-engine'
export { PickupTreeViewEngine } from './pickup-tree-view-engine';
export { PickupViewEngine } from './pickup-view-engine';
export { PickupView2Engine } from './pickup-view2-engine';
export { PickupView3Engine } from './pickup-view3-engine';
export { PortalViewEngine } from './portal-view-engine';
export { PortalView9Engine } from './portal-view9-engine';
export { SearchViewEngine } from './search-view-engine';
export { TabExpViewEngine } from './tab-exp-view-engine';
export { TabSearchViewEngine } from './tab-search-view-engine';
export { TreeExpViewEngine } from './tree-exp-view-engine';
export { TreeGridExViewEngine } from './tree-grid-ex-view-engine';
export { TreeViewEngine } from './tree-view-engine';
export { TreeView9Engine } from './tree-view9-engine';
export { WFActionViewEngine } from './wfaction-view-engine';
export { WFDynaEditViewEngine } from './wfdyna-edit-view-engine';
export { WFDynaExpGridViewEngine } from './wfdyna-exp-grid-view-engine';
export { WFEditViewEngine } from './wfedit-view-engine';
export { WFEditView3Engine } from './wfedit-view3-engine';
export { WFGridViewEngine } from './wfgrid-view-engine';
export { WFStartViewEngine } from './wfstart-view-engine';
export { WizardViewEngine } from './wizard-view-engine';
export { DataPanelEngine } from './data-panel-engine';
export { ReportViewEngine } from './report-view-engine';
export { MapExpViewEngine } from './map-exp-view-engine';
export { CommonViewEngine } from './common-view-engine';
export { DeIndexViewEngine } from './deindex-view-engine';
export * from './trigger-engine';
export { appEngineService } from './app-engine-service';
export { CalendarViewEngine } from './calendar-view-engine';
export { MEditViewEngine } from './medit-view-engine';
export { IndexPickupDataViewEngine } from './index-pickup-data-view-engine';
export { PanelViewEngine } from './panel-view-engine';
export { GridView4Engine } from './grid-view4-engine';
export { GanttViewEngine } from './gantt-view-engine';
export { ExpViewEngine } from './exp-view-engine';
\ No newline at end of file
import { DataViewEngine } from './data-view-engine';
/**
* 视图引擎基础
*
* @export
* @class DataViewEngine
* @extends {MDViewEngine}
*/
export class KanBanViewEngine extends DataViewEngine {
/**
* 表格部件
*
* @type {*}
* @memberof DataViewEngine
*/
protected kanban: any;
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof DataViewEngine
*/
public init(options: any = {}): void {
this.kanban = options.kanban;
super.init(options);
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof DataViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, 'kanban')) {
this.MDCtrlEvent(eventName, args);
}
super.onCtrlEvent(ctrlName, eventName, args);
}
/**
* 获取多数据部件
*
* @returns {*}
* @memberof DataViewEngine
*/
public getMDCtrl(): any {
return this.kanban;
}
/**
* @description 视图销毁
* @memberof DataViewEngine
*/
public destroyed() {
super.destroyed();
this.kanban = null;
}
}
\ No newline at end of file
import { ExpViewEngine } from './exp-view-engine';
/**
* 列表导航视图界面引擎
*
* @export
* @class ListExpViewEngine
* @extends {ViewEngine}
*/
export class ListExpViewEngine extends ExpViewEngine {
/**
* 初始化引擎
*
* @param {*} options
* @memberof ListExpViewEngine
*/
public init(options: any): void {
this.expBar = options.listexpbar;
super.init(options);
}
/**
* @description 视图销毁
* @memberof ListExpViewEngine
*/
public destroyed() {
super.destroyed();
this.expBar = null;
}
}
\ No newline at end of file
import { MDViewEngine } from './md-view-engine';
/**
* 视图引擎基础
*
* @export
* @class ListViewEngine
* @extends {MDViewEngine}
*/
export class ListViewEngine extends MDViewEngine {
/**
* 表格部件
*
* @type {*}
* @memberof ListViewEngine
*/
protected list: any;
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof ListViewEngine
*/
public init(options: any = {}): void {
this.list = options.list;
super.init(options);
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof ListViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, 'list')) {
this.MDCtrlEvent(eventName, args);
}
super.onCtrlEvent(ctrlName, eventName, args);
}
/**
* 获取多数据部件
*
* @returns {*}
* @memberof ListViewEngine
*/
public getMDCtrl(): any {
return this.list;
}
/**
* 删除操作
*
* @returns {void}
* @memberof ListViewEngine
*/
public doRemove(): void {
let selectedData = this.getMDCtrl() && this.getMDCtrl().getSelection();
if (!selectedData || selectedData == null || selectedData.length === 0) {
return;
}
let dataInfo = '';
selectedData.forEach((record: any, index: number) => {
let srfmajortext = record.srfmajortext;
if (index < 5) {
if (!Object.is(dataInfo, '')) {
dataInfo += '、';
}
dataInfo += srfmajortext;
} else {
return false;
}
});
if (selectedData.length < 5) {
dataInfo = dataInfo + this.view.$t('app.dataview.sum') + selectedData.length + this.view.$t('app.dataview.data');
} else {
dataInfo = dataInfo + '...' + this.view.$t('app.dataview.sum') + selectedData.length + this.view.$t('app.dataview.data');
}
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, '');
// 询问框
this.view.$Modal.confirm({
title: this.view.$t('app.commonwords.warning'),
content: this.view.$t('app.grid.confirmdel') + dataInfo + ',' + this.view.$t('app.grid.norecoverable'),
onOk: () => {
this.removeData(null);
},
onCancel: () => {
}
});
}
/**
* 删除
*
* @param {*} [arg={}]
* @returns {void}
* @memberof ListViewEngine
*/
public removeData(arg: any = {}): void {
if (!arg) {
arg = {};
}
if (!arg.srfkeys) {
// 获取要删除的数据集合
const selectedData: Array<any> = this.getMDCtrl() && this.getMDCtrl().getSelection();
if (!selectedData || selectedData == null || selectedData.length === 0) {
return;
}
let keys = '';
selectedData.forEach((record) => {
let key = record.srfkey;
if (!Object.is(keys, '')) {
keys += ';';
}
keys += key;
});
arg.srfkeys = keys;
}
const list: any = this.getMDCtrl();
if (list) {
list.remove(arg);
}
}
/**
* @description 视图销毁
* @memberof ListViewEngine
*/
public destroyed() {
super.destroyed();
this.list = null;
}
}
\ No newline at end of file
import { ListViewEngine } from './list-view-engine';
/**
*
*
* @export
* @class EditView9Engine
* @extends {EditViewEngine}
*/
export class ListView9Engine extends ListViewEngine {
}
import { ExpViewEngine } from './exp-view-engine';
/**
* 地图导航视图界面引擎
*
* @export
* @class MapExpViewEngine
* @extends {ViewEngine}
*/
export class MapExpViewEngine extends ExpViewEngine {
/**
* 初始化引擎
*
* @param {*} options
* @memberof MapExpViewEngine
*/
public init(options: any): void {
this.expBar = options.mapexpbar;
super.init(options);
}
/**
* @description 视图销毁
* @memberof MapExpViewEngine
*/
public destroyed() {
super.destroyed();
this.expBar = null;
}
}
\ No newline at end of file
import { MDViewEngine } from './md-view-engine';
/**
* 视图引擎基础
*
* @export
* @class GridViewEngine
* @extends {MDViewEngine}
*/
export class MapViewEngine extends MDViewEngine {
/**
* 表格部件
*
* @type {*}
* @memberof GridViewEngine
*/
protected map: any;
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof MapViewEngine
*/
public init(options: any = {}): void {
this.map = options.map;
super.init(options);
}
/**
* 获取多数据部件
*
* @returns {*}
* @memberof MapViewEngine
*/
public getMDCtrl(): any {
return this.map;
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof MapViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, 'map')) {
this.MDCtrlEvent(eventName, args);
}
super.onCtrlEvent(ctrlName, eventName, args);
}
/**
* 事件处理
*
* @param {string} eventName
* @param {*} args
* @memberof MapViewEngine
*/
public MDCtrlEvent(eventName: string, args: any): void {
if (Object.is(eventName, 'selectionchange')) {
// this.selectionChange(args);
// this.doEdit(args);
return;
}
super.MDCtrlEvent(eventName, args);
}
/**
* @description 视图销毁
* @memberof MapViewEngine
*/
public destroyed() {
super.destroyed();
this.map = null;
}
}
\ No newline at end of file
import { MapViewEngine } from './map-view-engine';
/**
* 视图引擎基础
*
* @export
* @class GridViewEngine
* @extends {MDViewEngine}
*/
export class MapView9Engine extends MapViewEngine {
}
\ No newline at end of file
import { MDViewEngine } from "./md-view-engine";
/**
* 实体多编辑视图引擎
*
* @export
* @class MEditViewEngine
* @extends {MDViewEngine}
*/
export class MEditViewEngine extends MDViewEngine {
/**
* 多编辑视图面板
*
* @type {*}
* @memberof MEditViewEngine
*/
public mEditViewPanel: any;
/**
* 多编辑视图引擎初始化
*
* @param {*} options
* @memberof MEditViewEngine
*/
public init(options: any) {
this.mEditViewPanel = options.meditviewpanel;
super.init(options);
}
/**
* 多编辑视图引擎加载
*
* @param {*} options
* @memberof MEditViewEngine
*/
public load(opts: any = {}): void {
Object.assign(this.view.viewparams, opts);
if (!this.isLoadDefault && this.view && this.view.isNavView) {
this.view.renderNoDataShade();
} else {
this.view.removeNoDataShade();
}
if (!this.view.viewDefaultUsage) {
return;
}
if (this.getSearchForm() && (this.isLoadDefault)) {
const tag = this.getSearchForm().name;
this.setViewState2({ tag: tag, action: 'loaddraft', viewdata: this.view.viewparams });
} else if (this.getMDCtrl() && (this.isLoadDefault)) {
const tag = this.getMDCtrl().name;
this.setViewState2({ tag: tag, action: 'load', viewdata: Object.assign(this.view.viewparams, opts) });
} else {
this.isLoadDefault = true;
}
}
/**
* 部件事件处理
*
* @param {string} ctrlName 部件标识
* @param {string} eventName 事件标识
* @param {*} args 事件参数
* @memberof MEditViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any) {
if (Object.is(ctrlName, 'meditviewpanel')) {
this.MDCtrlEvent(eventName, args);
}
super.onCtrlEvent(ctrlName, eventName, args);
}
public MDCtrlEvent(eventName: string, args: any) {
if (Object.is(eventName, 'drdatasaved')) {
this.emitViewEvent('drdatasaved', args);
}
if (Object.is(eventName, 'drdatachange')) {
this.emitViewEvent('drdatachange', args);
}
super.MDCtrlEvent(eventName, args);
}
/**
* 获取多编辑视图面板
*
* @return {*}
* @memberof MEditViewEngine
*/
public getMDCtrl() {
return this.mEditViewPanel;
}
/**
* @description 视图销毁
* @memberof MEditViewEngine
*/
public destroyed() {
super.destroyed();
this.mEditViewPanel = null;
}
}
\ No newline at end of file
import { EditViewEngine } from './edit-view-engine';
/**
* 实体选项操作视图界面引擎
*
* @export
* @class OptionViewEngine
* @extends {EditViewEngine}
*/
export class OptionViewEngine extends EditViewEngine {
/**
* Creates an instance of OptionViewEngine.
* 创建 OptionViewEngine 实例对象
*
* @memberof OptionViewEngine
*/
constructor() {
super();
}
/**
* 确认
*
* @memberof OptionViewEngine
*/
public ok() {
const form = this.getForm();
if (form && form.save instanceof Function) {
form.save().then((res: any) => {
if (res.status === 200) {
this.emitViewEvent('close', [res.data]);
}
});
}
}
/**
* 取消
*
* @memberof OptionViewEngine
*/
public cancel() {
this.view.$store.commit('viewAction/setViewDataChange', { viewTag: this.view.viewtag, viewDataChange: false });
this.emitViewEvent('close', null);
}
}
\ No newline at end of file
import { MDViewEngine } from './md-view-engine';
/**
* 视图引擎基础
*
* @export
* @class GridViewEngine
* @extends {MDViewEngine}
*/
export class PickupDataViewEngine extends MDViewEngine {
/**
* 数据视图部件
*
* @type {*}
* @memberof FormPickupDataViewEngine
*/
protected dataview: any;
/**
* Creates an instance of GridViewEngine.
* @memberof GridViewEngine
*/
constructor() {
super();
}
/**
* 引擎初始化
*
* @param {*} [options={}]
* @memberof GridViewEngine
*/
public init(options: any = {}): void {
this.dataview = options.dataview;
super.init(options);
}
/**
* 部件事件
*
* @param {string} ctrlName
* @param {string} eventName
* @param {*} args
* @memberof GridViewEngine
*/
public onCtrlEvent(ctrlName: string, eventName: string, args: any): void {
if (Object.is(ctrlName, 'dataview')) {
this.MDCtrlEvent(eventName, args);
}
super.onCtrlEvent(ctrlName, eventName, args);
}
/**
* 获取多数据部件
*
* @returns {*}
* @memberof GridViewEngine
*/
public getMDCtrl(): any {
return this.dataview;
}
/**
* @description 视图销毁
* @memberof GridViewEngine
*/
public destroyed() {
super.destroyed();
this.dataview = null;
}
}
\ No newline at end of file
import { PortalViewEngine } from './portal-view-engine';
/**
* 实体数据看板视图(部件视图)界面引擎
*
* @export
* @class PortalViewEngine
* @extends {PortalViewEngine}
*/
export class PortalView9Engine extends PortalViewEngine {
}
\ No newline at end of file
export { AppUITriggerEngine } from './app-ui-trigger-engine';
export { AppCtrlEventEngine } from './app-ctrlevent-engine';
export { AppViewEventEngine } from './app-viewevent-engine';
export { AppPanelEventEngine } from './app-panelevent-engine';
export { AppCustomEngine } from './app-custom-engine';
export { AppTimerEngine } from './app-timer-engine';
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册