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

chitanda 发布系统代码 [TrainSys,网页端]

上级 ccc1d12d
......@@ -12,21 +12,21 @@
},
"dependencies": {
"@floating-ui/dom": "^1.0.11",
"@ibiz-template/command": "^0.0.1-beta.49",
"@ibiz-template/controller": "^0.0.1-beta.49",
"@ibiz-template/core": "^0.0.1-beta.49",
"@ibiz-template/model": "^0.0.1-beta.49",
"@ibiz-template/runtime": "^0.0.1-beta.49",
"@ibiz-template/service": "^0.0.1-beta.49",
"@ibiz-template/theme": "^0.0.1-beta.49",
"@ibiz-template/vue-util": "^0.0.1-beta.49",
"@ibiz/dynamic-model-api": "^2.1.11",
"@ibiz-template/command": "^0.0.1-beta.50",
"@ibiz-template/controller": "^0.0.1-beta.50",
"@ibiz-template/core": "^0.0.1-beta.50",
"@ibiz-template/model": "^0.0.1-beta.50",
"@ibiz-template/runtime": "^0.0.1-beta.50",
"@ibiz-template/service": "^0.0.1-beta.50",
"@ibiz-template/theme": "^0.0.1-beta.50",
"@ibiz-template/vue-util": "^0.0.1-beta.50",
"@ibiz/dynamic-model-api": "^2.1.17",
"dayjs": "^1.11.7",
"lodash-es": "^4.17.21",
"path-browserify": "^1.0.1",
"pinia": "^2.0.28",
"qs": "^6.11.0",
"qx-util": "^0.4.4",
"qx-util": "^0.4.8",
"ramda": "^0.28.0",
"view-design": "^4.7.0",
"vue": "^2.7.14",
......@@ -35,7 +35,7 @@
"devDependencies": {
"@commitlint/cli": "^17.3.0",
"@commitlint/config-conventional": "^17.3.0",
"@types/lodash-es": "^4.17.6",
"@types/lodash-es": "^4.17.7",
"@types/node": "^18.11.15",
"@types/path-browserify": "^1.0.0",
"@types/qs": "^6.9.7",
......@@ -55,23 +55,23 @@
"eslint-plugin-vue": "^9.8.0",
"husky": "^8.0.2",
"lint-staged": "^13.1.0",
"postcss": "^8.4.20",
"postcss": "^8.4.21",
"postcss-scss": "^4.0.6",
"prettier": "^2.8.1",
"prettier": "^2.8.7",
"rollup-plugin-visualizer": "^5.8.3",
"sass": "^1.56.2",
"stylelint": "^14.16.0",
"stylelint-config-prettier": "^9.0.4",
"stylelint-config-prettier": "^9.0.5",
"stylelint-config-recess-order": "^3.0.0",
"stylelint-config-standard": "^29.0.0",
"stylelint-config-standard-scss": "^6.1.0",
"stylelint-scss": "^4.3.0",
"terser": "^5.16.1",
"typescript": "^4.9.4",
"vite": "^4.0.1",
"vite": "^4.2.1",
"vite-plugin-eslint": "^1.8.1",
"vue-eslint-parser": "^9.1.0",
"vue-tsc": "^1.0.13"
"vue-eslint-parser": "^9.1.1",
"vue-tsc": "^1.2.0"
},
"lint-staged": {
"*.{ts,vue}": "eslint --fix",
......
此差异已折叠。
......@@ -23,7 +23,10 @@ async function loadAppPlugins(): Promise<void> {
) {
const config = JSON.parse(pluginRef.rTObjectRepo);
if (config && config.app === true) {
await ibiz.plugin.loadPluginRef(pluginRef);
await ibiz.plugin.loadPluginRef(
pluginRef.rTObjectName,
pluginRef.rTObjectRepo,
);
}
}
});
......
import Vue from 'vue';
import { RuntimeError } from '@ibiz-template/core';
import { DefectModelError } from '@ibiz-template/model';
import {
IPluginFactory,
IPluginItem,
RemotePluginConfig,
RemotePluginItem,
} from '@ibiz-template/runtime';
import { IPSAppPFPluginRef, IPSSysPFPlugin } from '@ibiz/dynamic-model-api';
import { basename, dirname, join } from 'path-browserify';
import { join } from 'path-browserify';
import { VueConstructor, PluginObject } from 'vue';
/**
* 插件工具类
......@@ -56,6 +57,79 @@ export class PluginFactory implements IPluginFactory {
*/
protected pluginCache: Map<string, RemotePluginItem> = new Map();
/**
* 所有的插件
*
* @author chitanda
* @date 2023-02-02 16:02:55
* @protected
* @type {PluginObject<unknown>[]}
*/
protected pluginCodes: PluginObject<unknown>[] = [];
/**
* 预定义插件集合
*
* @author chitanda
* @date 2023-03-09 17:03:46
* @protected
* @type {Map<string, IPluginItem>}
*/
protected predefinedPlugins: Map<string, IPluginItem> = new Map();
/**
* 注册视图默认插件
*
* @author chitanda
* @date 2023-02-06 21:02:10
* @param {IPluginItem} plugin
*/
registerPredefinedPlugin(plugin: IPluginItem): void {
this.predefinedPlugins.set(plugin.name, plugin);
}
/**
* 给入应用实例,将已经加载的过插件注入。主要用于多实例的情况
*
* @author chitanda
* @date 2023-02-02 16:02:51
* @param {App} app
*/
register(app: VueConstructor): void {
this.pluginCodes.forEach(plugin => {
app.use(plugin);
});
}
/**
* 加载预置插件
*
* @author chitanda
* @date 2023-03-09 18:03:48
* @param {string} name
* @return {*} {Promise<void>}
*/
async loadPredefinedPlugin(name: string): Promise<void> {
if (this.predefinedPlugins.has(name)) {
const plugin = this.predefinedPlugins.get(name)!;
if (plugin) {
await this.loadPluginRef(plugin.name, plugin.path);
}
}
}
/**
* 插件刚加载完成回来,设置到目前所有的 vue 实例当中
*
* @author chitanda
* @date 2023-02-02 17:02:38
* @protected
* @param {PluginObject<unknown>} code
*/
protected setPluginCode(code: PluginObject<unknown>): void {
this.pluginCodes.push(code);
}
/**
* 设置开发插件,用于本地调试
*
......@@ -80,41 +154,62 @@ export class PluginFactory implements IPluginFactory {
if (plugin.runtimeObject === true) {
const pluginRef = plugin as unknown as IPSAppPFPluginRef;
if (pluginRef) {
return this.loadPluginRef(pluginRef);
try {
await this.loadPluginRef(
pluginRef.rTObjectName,
pluginRef.rTObjectRepo,
);
} catch (error) {
throw new DefectModelError(pluginRef, `配置加载失败`);
}
}
}
return false;
}
/**
* 加载应用饮用插件
* 加载应用插件
*
* @author chitanda
* @date 2022-10-31 16:10:57
* @param {IPSAppPFPluginRef} pluginRef
* @return {*} {Promise<boolean>}
*/
async loadPluginRef(pluginRef: IPSAppPFPluginRef): Promise<boolean> {
if (this.pluginCache.has(pluginRef.rTObjectName)) {
async loadPluginRef(
rtObjectName: string,
rtObjectRepo: string,
): Promise<boolean> {
if (this.pluginCache.has(rtObjectName)) {
return true;
}
let config: IParams = {};
try {
config = JSON.parse(pluginRef.rTObjectRepo);
} catch (err) {
throw new DefectModelError(
pluginRef,
`插件[${pluginRef.name}]参数格式异常请检查`,
);
let configData: unknown = null;
const fn = this.devPackages.get(rtObjectName);
if (fn) {
configData = await fn();
} else {
const pluginPath: string = rtObjectRepo;
const configUrl = this.urlReg.test(pluginPath)
? `${pluginPath}/package.json`
: `${ibiz.env.pluginBaseUrl}/${join(pluginPath, 'package.json')}`;
const res = await ibiz.net.axios({
method: 'get',
headers: { 'Access-Control-Allow-Origin': '*' },
url: configUrl,
});
if (res.status !== 200) {
throw new Error(`配置加载失败`);
}
configData = res.data;
}
const remotePlugin = new RemotePluginItem(
pluginRef.rTObjectName,
config as unknown as RemotePluginConfig,
rtObjectName,
rtObjectRepo,
configData as RemotePluginConfig,
);
if (remotePlugin) {
try {
await this.loadScript(remotePlugin);
this.pluginCache.set(pluginRef.rTObjectName, remotePlugin);
this.pluginCache.set(rtObjectName, remotePlugin);
return true;
} catch (error) {
ibiz.log.error(error);
......@@ -133,10 +228,20 @@ export class PluginFactory implements IPluginFactory {
* @return {*} {Promise<void>}
*/
protected async loadScript(remotePlugin: RemotePluginItem): Promise<void> {
const { baseUrl, name, version, system, module } = remotePlugin.config;
const scriptUrl = this.devPackages.has(name)
? join(baseUrl, `${name}@${version}`, module)
: join(baseUrl, `${name}@${version}`, system);
const pluginPath: string = remotePlugin.repo;
const { name, version, system, module } = remotePlugin.config;
let scriptUrl = '';
if (this.devPackages.has(name)) {
scriptUrl = join(`${name}@${version}`, module);
} else if (ibiz.env.dev) {
scriptUrl = this.urlReg.test(pluginPath)
? `${pluginPath}/${join(module)}`
: `${ibiz.env.pluginBaseUrl}/${pluginPath}/${join(module)}`;
} else {
scriptUrl = `${pluginPath}${pluginPath.endsWith('/') ? '' : '/'}${join(
system,
)}`;
}
if (scriptUrl) {
if (this.cache.has(scriptUrl)) {
return;
......@@ -148,67 +253,31 @@ export class PluginFactory implements IPluginFactory {
const fn = this.devPackages.get(name)!;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const pluginModule = (await fn()) as any;
Vue.use(pluginModule.default, remotePlugin);
this.setPluginCode(pluginModule.default);
this.cache.set(scriptUrl, true);
const mateUrl: string = pluginModule.default.mateUrl || '';
await this.loadStyles(
remotePlugin,
mateUrl.split('/').splice(3).join('/'),
);
} else if (ibiz.env.dev) {
data = await import(scriptUrl /* @vite-ignore */);
} else {
data = await System.import(url);
if (data) {
if (data.default) {
Vue.use(data.default, remotePlugin);
} else {
throw new RuntimeError(
`远程插件加载失败, 远程插件未找到[default]默认导出`,
);
}
this.cache.set(scriptUrl, true);
await this.loadStyles(remotePlugin, url);
System.addImportMap({
imports: {
[name]: url,
},
});
data = await System.import(name);
}
if (data) {
if (data.default) {
this.setPluginCode(data.default);
} else {
throw new RuntimeError(`远程插件加载失败, 未找到文件`);
throw new RuntimeError(
`远程插件加载失败, 远程插件未找到[default]默认导出`,
);
}
}
}
}
/**
* 加载插件样式文件
*
* @author chitanda
* @date 2022-11-02 21:11:51
* @protected
* @param {RemotePluginItem} remotePlugin
* @param {string} [rootJsPath] 入口 js 文件全路径,用于计算拼接 css 文件所在路径
* @return {*} {Promise<void>}
*/
protected async loadStyles(
remotePlugin: RemotePluginItem,
rootJsPath: string,
): Promise<void> {
const { styles } = remotePlugin.config;
if (styles) {
const arr = styles instanceof Array ? styles : [styles];
if (arr && arr.length > 0) {
const folder = dirname(rootJsPath);
const all = arr.map(styleUrl => {
const url = `${folder}/${basename(styleUrl)}`;
if (this.cache.has(url)) {
return false;
}
return new Promise((resolve, reject) => {
const linkDom = document.createElement('link');
linkDom.setAttribute('type', 'text/css');
linkDom.setAttribute('rel', 'stylesheet');
linkDom.setAttribute('href', url);
linkDom.onload = resolve;
linkDom.onerror = reject;
document.head.appendChild(linkDom);
});
});
await Promise.all(all);
this.cache.set(scriptUrl, true);
} else {
throw new RuntimeError(
`远程插件加载失败, 未找到文件或文件内容格式不正确`,
);
}
}
}
......@@ -232,6 +301,6 @@ export class PluginFactory implements IPluginFactory {
}
return `${ibiz.env.pluginBaseUrl}/${script}`;
}
return `./${join(ibiz.env.pluginBaseUrl, script)}`;
return `${join(ibiz.env.pluginBaseUrl, script)}`;
}
}
......@@ -10,7 +10,7 @@ function IBizVitePlugin(): Plugin[] {
closeBundle() {
// 其他第三方依赖包
const map = {
'node_modules/qx-util/dist/umd/qx-util.umd.js':
'node_modules/qx-util/dist/qx-util.umd.js':
'dist/extras/js/qx-util.min.js',
'node_modules/@ibiz/dynamic-model-api/dist/ibiz-dynamic-model-api.system.min.js':
'dist/extras/js/ibiz-dynamic-model-api.system.min.js',
......
......@@ -1219,16 +1219,16 @@
"mOSFilePath" : "pssysapps/TemplatePublish/psappviewmsggroups/VMGroup2",
"name" : "视图消息组2",
"getPSAppViewMsgGroupDetails" : [ {
"name" : "视图消息",
"name" : "视图消息2",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg2"
"id" : "ViewMsg3"
}
}, {
"name" : "视图消息2",
"name" : "视图消息",
"getPSAppViewMsg" : {
"modelref" : true,
"id" : "ViewMsg3"
"id" : "ViewMsg2"
}
} ],
"rTMOSFilePath" : "pssysapps/TemplatePublish/psappviewmsggroups/VMGroup2"
......
......@@ -2311,6 +2311,114 @@
"modelref" : true,
"id" : "Begin"
}
}, {
"codeName" : "gridSelectionChange",
"defaultParamName" : "Default",
"logicName" : "表格数据变更",
"mOSFilePath" : "pssysapps/Web/psappdataentities/TEST/psappdeuilogics/gridSelectionChange",
"name" : "表格数据变更",
"getPSDEUILogicNodes" : [ {
"codeName" : "Begin",
"leftPos" : 200,
"logicNodeType" : "BEGIN",
"mOSFilePath" : "psappdeuilogicnodes/Begin",
"name" : "开始",
"getPSDEUILogicLinks" : [ {
"getDstPSDEUILogicNode" : {
"modelref" : true,
"id" : "PREPAREJSPARAM1"
},
"linkMode" : 0,
"name" : "连接名称",
"getSrcPSDEUILogicNode" : {
"modelref" : true,
"id" : "Begin"
}
} ],
"rTMOSFilePath" : "psappdeuilogicnodes/Begin",
"topPos" : 200,
"parallelOutput" : true
}, {
"codeName" : "PREPAREJSPARAM1",
"leftPos" : 160,
"logicNodeType" : "PREPAREJSPARAM",
"mOSFilePath" : "psappdeuilogicnodes/PREPAREJSPARAM1",
"name" : "准备参数",
"getPSDEUILogicLinks" : [ {
"getDstPSDEUILogicNode" : {
"modelref" : true,
"id" : "VIEWCTRLINVOKE1"
},
"linkMode" : 0,
"name" : "连接名称",
"getSrcPSDEUILogicNode" : {
"modelref" : true,
"id" : "PREPAREJSPARAM1"
}
} ],
"getPSDEUILogicNodeParams" : [ {
"dstFieldName" : "data",
"getDstPSDEUILogicParam" : {
"modelref" : true,
"id" : "invokeParams"
},
"name" : "Default ==> invokeParams[data]",
"paramAction" : "SETPARAMVALUE",
"getSrcPSDEUILogicParam" : {
"modelref" : true,
"id" : "Default"
},
"srcValueType" : "SRCDLPARAM"
} ],
"rTMOSFilePath" : "psappdeuilogicnodes/PREPAREJSPARAM1",
"topPos" : 370
}, {
"codeName" : "VIEWCTRLINVOKE1",
"getInvokeCtrl" : {
"modelref" : true,
"id" : "toolbar"
},
"invokeMethod" : "calcButtonState",
"getInvokeParam" : {
"modelref" : true,
"id" : "invokeParams"
},
"leftPos" : 160,
"logicNodeType" : "VIEWCTRLINVOKE",
"mOSFilePath" : "psappdeuilogicnodes/VIEWCTRLINVOKE1",
"name" : "视图部件调用",
"rTMOSFilePath" : "psappdeuilogicnodes/VIEWCTRLINVOKE1",
"topPos" : 506
} ],
"getPSDEUILogicParams" : [ {
"codeName" : "Default",
"logicName" : "传入变量",
"mOSFilePath" : "psappdeuilogicparams/Default",
"name" : "传入变量",
"rTMOSFilePath" : "psappdeuilogicparams/Default",
"default" : true,
"entityParam" : true
}, {
"codeName" : "invokeParams",
"logicName" : "操作参数",
"mOSFilePath" : "psappdeuilogicparams/invokeParams",
"name" : "操作参数",
"rTMOSFilePath" : "psappdeuilogicparams/invokeParams",
"simpleParam" : true
}, {
"codeName" : "toolbar",
"logicName" : "工具栏",
"mOSFilePath" : "psappdeuilogicparams/toolbar",
"name" : "工具栏",
"paramTag" : "CUSTOMTOOLBAR",
"rTMOSFilePath" : "psappdeuilogicparams/toolbar",
"ctrlParam" : true
} ],
"rTMOSFilePath" : "pssysapps/Web/psappdataentities/TEST/psappdeuilogics/gridSelectionChange",
"getStartPSDEUILogicNode" : {
"modelref" : true,
"id" : "Begin"
}
} ],
"getAllPSAppViews" : [ {
"modelref" : true,
......
......@@ -37,6 +37,67 @@
}
} ],
"getPSDEFormItemVRs" : [ {
"checkMode" : 3,
"name" : "表单项值规则",
"getPSDEFValueRule" : {
"codeName" : "ValueRule2",
"mOSFilePath" : "psmodules/Test/psdataentities/TEST/psdefields/FIELD/psdefvaluerules/ValueRule2",
"name" : "field值规则",
"getPSDEFVRGroupCondition" : {
"condOp" : "AND",
"condType" : "GROUP",
"name" : "默认组",
"getPSDEFVRConditions" : [ {
"condType" : "VALUERANGE2",
"dEFName" : "FIELD",
"maxValue" : 20.0,
"minValue" : 10.0,
"name" : "[数值范围] 大于等于 10.0 且 小于等于 20.0",
"ruleInfo" : "10<=field<=20",
"includeMaxValue" : true,
"includeMinValue" : true
} ],
"ruleInfo" : "10<=field<=20"
},
"rTMOSFilePath" : "psmodules/Test/psdataentities/TEST/psdefields/FIELD/psdefvaluerules/ValueRule2",
"ruleInfo" : "10<=field<=20",
"checkDefault" : false,
"defaultMode" : false,
"enableBackend" : true,
"enableFront" : true
},
"getPSDEFormItemName" : "field",
"valueRuleType" : "DEFVALUERULE"
}, {
"checkMode" : 3,
"name" : "表单项值规则",
"getPSDEFValueRule" : {
"codeName" : "ValueRule3",
"mOSFilePath" : "psmodules/Test/psdataentities/TEST/psdefields/FIELD2/psdefvaluerules/ValueRule3",
"name" : "field2值规则",
"getPSDEFVRGroupCondition" : {
"condOp" : "AND",
"condType" : "GROUP",
"name" : "默认组",
"getPSDEFVRConditions" : [ {
"condType" : "REGEX",
"dEFName" : "FIELD2",
"name" : "[正则式](^[0-9]*$)",
"regExCode" : "^[0-9]*$",
"ruleInfo" : "只能写数字"
} ],
"ruleInfo" : "只能写数字"
},
"rTMOSFilePath" : "psmodules/Test/psdataentities/TEST/psdefields/FIELD2/psdefvaluerules/ValueRule3",
"ruleInfo" : "只能写数字",
"checkDefault" : false,
"defaultMode" : false,
"enableBackend" : true,
"enableFront" : true
},
"getPSDEFormItemName" : "field2",
"valueRuleType" : "DEFVALUERULE"
}, {
"checkMode" : 3,
"name" : "表单项值规则",
"getPSDEFValueRule" : {
......@@ -330,67 +391,6 @@
},
"getPSDEFormItemName" : "field5",
"valueRuleType" : "DEFVALUERULE"
}, {
"checkMode" : 3,
"name" : "表单项值规则",
"getPSDEFValueRule" : {
"codeName" : "ValueRule2",
"mOSFilePath" : "psmodules/Test/psdataentities/TEST/psdefields/FIELD/psdefvaluerules/ValueRule2",
"name" : "field值规则",
"getPSDEFVRGroupCondition" : {
"condOp" : "AND",
"condType" : "GROUP",
"name" : "默认组",
"getPSDEFVRConditions" : [ {
"condType" : "VALUERANGE2",
"dEFName" : "FIELD",
"maxValue" : 20.0,
"minValue" : 10.0,
"name" : "[数值范围] 大于等于 10.0 且 小于等于 20.0",
"ruleInfo" : "10<=field<=20",
"includeMaxValue" : true,
"includeMinValue" : true
} ],
"ruleInfo" : "10<=field<=20"
},
"rTMOSFilePath" : "psmodules/Test/psdataentities/TEST/psdefields/FIELD/psdefvaluerules/ValueRule2",
"ruleInfo" : "10<=field<=20",
"checkDefault" : false,
"defaultMode" : false,
"enableBackend" : true,
"enableFront" : true
},
"getPSDEFormItemName" : "field",
"valueRuleType" : "DEFVALUERULE"
}, {
"checkMode" : 3,
"name" : "表单项值规则",
"getPSDEFValueRule" : {
"codeName" : "ValueRule3",
"mOSFilePath" : "psmodules/Test/psdataentities/TEST/psdefields/FIELD2/psdefvaluerules/ValueRule3",
"name" : "field2值规则",
"getPSDEFVRGroupCondition" : {
"condOp" : "AND",
"condType" : "GROUP",
"name" : "默认组",
"getPSDEFVRConditions" : [ {
"condType" : "REGEX",
"dEFName" : "FIELD2",
"name" : "[正则式](^[0-9]*$)",
"regExCode" : "^[0-9]*$",
"ruleInfo" : "只能写数字"
} ],
"ruleInfo" : "只能写数字"
},
"rTMOSFilePath" : "psmodules/Test/psdataentities/TEST/psdefields/FIELD2/psdefvaluerules/ValueRule3",
"ruleInfo" : "只能写数字",
"checkDefault" : false,
"defaultMode" : false,
"enableBackend" : true,
"enableFront" : true
},
"getPSDEFormItemName" : "field2",
"valueRuleType" : "DEFVALUERULE"
} ],
"getPSDEFormItems" : [ {
"id" : "srfupdatedate",
......
......@@ -10,7 +10,7 @@
"id" : "fetch"
},
"groupMode" : "NONE",
"hookEventNames" : [ "ONBEFORELOAD" ],
"hookEventNames" : [ "ONBEFORELOAD", "ONSELECTIONCHANGE" ],
"logicName" : "自定义表格",
"mOSFilePath" : "psmodules/Test/psdataentities/TEST/psdegrids/CustomGrid",
"getPSAppDataEntity" : {
......@@ -26,6 +26,15 @@
"modelref" : true,
"id" : "VIWELOGICBEFORELOAD"
}
}, {
"eventNames" : "onSelectionChange",
"logicTag" : "CUSTOMGRID",
"logicType" : "APPVIEWLOGIC",
"name" : "GRIDSELECTIONCHANGE",
"getPSAppViewLogic" : {
"modelref" : true,
"id" : "GRIDSELECTIONCHANGE"
}
} ],
"getPSDEGridColumns" : [ {
"align" : "LEFT",
......
......@@ -93,6 +93,20 @@
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/TEST.json"
},
"getPSViewCtrlName" : "CUSTOMSEARCHFORM"
}, {
"eventNames" : "onSelectionChange",
"logicTrigger" : "CTRLEVENT",
"logicType" : "DEUILOGIC",
"name" : "GRIDSELECTIONCHANGE",
"getPSAppDEUILogic" : {
"modelref" : true,
"id" : "gridSelectionChange"
},
"getPSAppDataEntity" : {
"modelref" : true,
"path" : "PSSYSAPPS/Web/PSAPPDATAENTITIES/TEST.json"
},
"getPSViewCtrlName" : "CUSTOMGRID"
}, {
"eventNames" : "onBeforeLoad",
"logicName" : "gridBeforeLoad",
......@@ -276,7 +290,7 @@
"id" : "fetch"
},
"groupMode" : "NONE",
"hookEventNames" : [ "ONBEFORELOAD" ],
"hookEventNames" : [ "ONBEFORELOAD", "ONSELECTIONCHANGE" ],
"logicName" : "自定义表格",
"mOSFilePath" : "psmodules/Test/psdataentities/TEST/psdegrids/CustomGrid",
"getPSAppDataEntity" : {
......@@ -374,6 +388,15 @@
"modelref" : true,
"id" : "VIWELOGICBEFORELOAD"
}
}, {
"eventNames" : "onSelectionChange",
"logicTag" : "CUSTOMGRID",
"logicType" : "APPVIEWLOGIC",
"name" : "GRIDSELECTIONCHANGE",
"getPSAppViewLogic" : {
"modelref" : true,
"id" : "GRIDSELECTIONCHANGE"
}
} ],
"getPSControlParam" : {
"autoLoad" : true,
......
......@@ -166,6 +166,67 @@
"id" : "FORM"
},
"getPSDEFormItemVRs" : [ {
"checkMode" : 3,
"name" : "表单项值规则",
"getPSDEFValueRule" : {
"codeName" : "ValueRule2",
"mOSFilePath" : "psmodules/Test/psdataentities/TEST/psdefields/FIELD/psdefvaluerules/ValueRule2",
"name" : "field值规则",
"getPSDEFVRGroupCondition" : {
"condOp" : "AND",
"condType" : "GROUP",
"name" : "默认组",
"getPSDEFVRConditions" : [ {
"condType" : "VALUERANGE2",
"dEFName" : "FIELD",
"maxValue" : 20.0,
"minValue" : 10.0,
"name" : "[数值范围] 大于等于 10.0 且 小于等于 20.0",
"ruleInfo" : "10<=field<=20",
"includeMaxValue" : true,
"includeMinValue" : true
} ],
"ruleInfo" : "10<=field<=20"
},
"rTMOSFilePath" : "psmodules/Test/psdataentities/TEST/psdefields/FIELD/psdefvaluerules/ValueRule2",
"ruleInfo" : "10<=field<=20",
"checkDefault" : false,
"defaultMode" : false,
"enableBackend" : true,
"enableFront" : true
},
"getPSDEFormItemName" : "field",
"valueRuleType" : "DEFVALUERULE"
}, {
"checkMode" : 3,
"name" : "表单项值规则",
"getPSDEFValueRule" : {
"codeName" : "ValueRule3",
"mOSFilePath" : "psmodules/Test/psdataentities/TEST/psdefields/FIELD2/psdefvaluerules/ValueRule3",
"name" : "field2值规则",
"getPSDEFVRGroupCondition" : {
"condOp" : "AND",
"condType" : "GROUP",
"name" : "默认组",
"getPSDEFVRConditions" : [ {
"condType" : "REGEX",
"dEFName" : "FIELD2",
"name" : "[正则式](^[0-9]*$)",
"regExCode" : "^[0-9]*$",
"ruleInfo" : "只能写数字"
} ],
"ruleInfo" : "只能写数字"
},
"rTMOSFilePath" : "psmodules/Test/psdataentities/TEST/psdefields/FIELD2/psdefvaluerules/ValueRule3",
"ruleInfo" : "只能写数字",
"checkDefault" : false,
"defaultMode" : false,
"enableBackend" : true,
"enableFront" : true
},
"getPSDEFormItemName" : "field2",
"valueRuleType" : "DEFVALUERULE"
}, {
"checkMode" : 3,
"name" : "表单项值规则",
"getPSDEFValueRule" : {
......@@ -459,67 +520,6 @@
},
"getPSDEFormItemName" : "field5",
"valueRuleType" : "DEFVALUERULE"
}, {
"checkMode" : 3,
"name" : "表单项值规则",
"getPSDEFValueRule" : {
"codeName" : "ValueRule2",
"mOSFilePath" : "psmodules/Test/psdataentities/TEST/psdefields/FIELD/psdefvaluerules/ValueRule2",
"name" : "field值规则",
"getPSDEFVRGroupCondition" : {
"condOp" : "AND",
"condType" : "GROUP",
"name" : "默认组",
"getPSDEFVRConditions" : [ {
"condType" : "VALUERANGE2",
"dEFName" : "FIELD",
"maxValue" : 20.0,
"minValue" : 10.0,
"name" : "[数值范围] 大于等于 10.0 且 小于等于 20.0",
"ruleInfo" : "10<=field<=20",
"includeMaxValue" : true,
"includeMinValue" : true
} ],
"ruleInfo" : "10<=field<=20"
},
"rTMOSFilePath" : "psmodules/Test/psdataentities/TEST/psdefields/FIELD/psdefvaluerules/ValueRule2",
"ruleInfo" : "10<=field<=20",
"checkDefault" : false,
"defaultMode" : false,
"enableBackend" : true,
"enableFront" : true
},
"getPSDEFormItemName" : "field",
"valueRuleType" : "DEFVALUERULE"
}, {
"checkMode" : 3,
"name" : "表单项值规则",
"getPSDEFValueRule" : {
"codeName" : "ValueRule3",
"mOSFilePath" : "psmodules/Test/psdataentities/TEST/psdefields/FIELD2/psdefvaluerules/ValueRule3",
"name" : "field2值规则",
"getPSDEFVRGroupCondition" : {
"condOp" : "AND",
"condType" : "GROUP",
"name" : "默认组",
"getPSDEFVRConditions" : [ {
"condType" : "REGEX",
"dEFName" : "FIELD2",
"name" : "[正则式](^[0-9]*$)",
"regExCode" : "^[0-9]*$",
"ruleInfo" : "只能写数字"
} ],
"ruleInfo" : "只能写数字"
},
"rTMOSFilePath" : "psmodules/Test/psdataentities/TEST/psdefields/FIELD2/psdefvaluerules/ValueRule3",
"ruleInfo" : "只能写数字",
"checkDefault" : false,
"defaultMode" : false,
"enableBackend" : true,
"enableFront" : true
},
"getPSDEFormItemName" : "field2",
"valueRuleType" : "DEFVALUERULE"
} ],
"getPSDEFormItems" : [ {
"id" : "srfupdatedate",
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册