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

ibiz4j 发布系统代码 [ibz-dst,应用]

上级 963b907c
......@@ -50,6 +50,8 @@ function getAppLocale(){
nomore:"དེ་ལས་མང་བ་མི་འདུག",
other:"གཞན་དག",
valueNotEmpty:"སྟོང་མི་ཆོག",
createFailed:"གསར་འཛུགས་ཕམ་པ།",
isExist:"གནས་པ་",
},
local:{
new: "གསར་འཛུགས།",
......
......@@ -50,6 +50,8 @@ function getAppLocale(){
nomore:"No more",
other:"other",
valueNotEmpty:"The value cannot be null",
createFailed:"Create Failed",
isExist:"Exist",
},
local:{
new: "New",
......
......@@ -50,6 +50,8 @@ function getAppLocale(){
nomore:"没有更多了",
other:"其他",
valueNotEmpty:"值不能为空",
createFailed:"创建失败",
isExist:"已存在",
},
local:{
new: "新建",
......
......@@ -123,6 +123,14 @@ function getLocaleResourceBase(){
},
},
editviewtoolbar_toolbar: {
tbitem1_initds: {
caption: commonLogic.appcommonhandle("初始化",null),
tip: commonLogic.appcommonhandle("初始化",null),
},
tbitem2: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem3: {
caption: commonLogic.appcommonhandle("保存",null),
tip: commonLogic.appcommonhandle("保存",null),
......
......@@ -123,6 +123,14 @@ function getLocaleResourceBase(){
},
},
editviewtoolbar_toolbar: {
tbitem1_initds: {
caption: commonLogic.appcommonhandle("初始化",null),
tip: commonLogic.appcommonhandle("初始化",null),
},
tbitem2: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem3: {
caption: commonLogic.appcommonhandle("Save",null),
tip: commonLogic.appcommonhandle("Save",null),
......
......@@ -123,6 +123,14 @@ function getLocaleResourceBase(){
},
},
editviewtoolbar_toolbar: {
tbitem1_initds: {
caption: commonLogic.appcommonhandle("初始化",null),
tip: commonLogic.appcommonhandle("初始化",null),
},
tbitem2: {
caption: commonLogic.appcommonhandle("-",null),
tip: commonLogic.appcommonhandle("",null),
},
tbitem3: {
caption: commonLogic.appcommonhandle("保存",null),
tip: commonLogic.appcommonhandle("保存",null),
......
......@@ -87,16 +87,16 @@ mock.onDelete(new RegExp(/^\/dacharts\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/dacharts\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:dachart 方法: Select");
// CheckKey
mock.onPost(new RegExp(/^\/dacharts\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:dachart 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['chart_id'];
const matchArray:any = new RegExp(/^\/dacharts\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
const matchArray:any = new RegExp(/^\/dacharts\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/dacharts\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.chart_id, tempValue.chart_id));
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.chart_id, tempValue.chart_id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['chart_id'] == tempValue['chart_id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, _items];
return [status, data];
});
// Create
......@@ -141,44 +151,6 @@ mock.onPost(new RegExp(/^\/dacharts\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/dacharts\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dachart 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['chart_id'];
const matchArray:any = new RegExp(/^\/dacharts\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.chart_id, tempValue.chart_id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['chart_id'] == tempValue['chart_id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/dacharts\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:dachart 方法: GetDraft");
......@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/dacharts\/getdraft$/)).reply((config: any) => {
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/dacharts\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:dachart 方法: CheckKey");
// Save
mock.onPost(new RegExp(/^\/dacharts\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:dachart 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['chart_id'];
const matchArray:any = new RegExp(/^\/dacharts\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/dacharts\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/dacharts\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/dacharts\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:dachart 方法: Save");
// Update
mock.onPut(new RegExp(/^\/dacharts\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dachart 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['chart_id'];
const matchArray:any = new RegExp(/^\/dacharts\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/dacharts\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/dacharts\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/dacharts\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:dachart 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['chart_id'];
const matchArray:any = new RegExp(/^\/dacharts\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.chart_id, tempValue.chart_id));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Remove
mock.onDelete(new RegExp(/^\/dacharts\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dachart 方法: Remove");
// Get
mock.onGet(new RegExp(/^\/dacharts\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dachart 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/dacharts\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/dacharts\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dachart 方法: Get");
// Remove
mock.onDelete(new RegExp(/^\/dacharts\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dachart 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......
......@@ -87,16 +87,16 @@ mock.onDelete(new RegExp(/^\/dareports\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/dareports\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:dareport 方法: Select");
// CheckKey
mock.onPost(new RegExp(/^\/dareports\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:dareport 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['report_id'];
const matchArray:any = new RegExp(/^\/dareports\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
const matchArray:any = new RegExp(/^\/dareports\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/dareports\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.report_id, tempValue.report_id));
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.report_id, tempValue.report_id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['report_id'] == tempValue['report_id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, _items];
return [status, data];
});
// Create
......@@ -141,44 +151,6 @@ mock.onPost(new RegExp(/^\/dareports\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/dareports\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dareport 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['report_id'];
const matchArray:any = new RegExp(/^\/dareports\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.report_id, tempValue.report_id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['report_id'] == tempValue['report_id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/dareports\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:dareport 方法: GetDraft");
......@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/dareports\/getdraft$/)).reply((config: any) => {
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/dareports\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:dareport 方法: CheckKey");
// Save
mock.onPost(new RegExp(/^\/dareports\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:dareport 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['report_id'];
const matchArray:any = new RegExp(/^\/dareports\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/dareports\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/dareports\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).rep
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/dareports\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:dareport 方法: Save");
// Update
mock.onPut(new RegExp(/^\/dareports\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dareport 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['report_id'];
const matchArray:any = new RegExp(/^\/dareports\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/dareports\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/dareports\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((c
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/dareports\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:dareport 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['report_id'];
const matchArray:any = new RegExp(/^\/dareports\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.report_id, tempValue.report_id));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Remove
mock.onDelete(new RegExp(/^\/dareports\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dareport 方法: Remove");
// Get
mock.onGet(new RegExp(/^\/dareports\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dareport 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/dareports\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((confi
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/dareports\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dareport 方法: Get");
// Remove
mock.onDelete(new RegExp(/^\/dareports\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dareport 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......
......@@ -87,16 +87,16 @@ mock.onDelete(new RegExp(/^\/dictcatalogs\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/dictcatalogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:dictcatalog 方法: Select");
// CheckKey
mock.onPost(new RegExp(/^\/dictcatalogs\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:dictcatalog 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/dictcatalogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
const matchArray:any = new RegExp(/^\/dictcatalogs\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/dictcatalogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).repl
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['id'] == tempValue['id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, _items];
return [status, data];
});
// Create
......@@ -141,44 +151,6 @@ mock.onPost(new RegExp(/^\/dictcatalogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((con
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/dictcatalogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dictcatalog 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/dictcatalogs\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['id'] == tempValue['id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/dictcatalogs\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:dictcatalog 方法: GetDraft");
......@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/dictcatalogs\/getdraft$/)).reply((config: any) => {
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/dictcatalogs\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:dictcatalog 方法: CheckKey");
// Save
mock.onPost(new RegExp(/^\/dictcatalogs\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:dictcatalog 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/dictcatalogs\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/dictcatalogs\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/dictcatalogs\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/dictcatalogs\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:dictcatalog 方法: Save");
// Update
mock.onPut(new RegExp(/^\/dictcatalogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dictcatalog 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/dictcatalogs\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/dictcatalogs\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/dictcatalogs\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/dictcatalogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:dictcatalog 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/dictcatalogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Remove
mock.onDelete(new RegExp(/^\/dictcatalogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dictcatalog 方法: Remove");
// Get
mock.onGet(new RegExp(/^\/dictcatalogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dictcatalog 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/dictcatalogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((co
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/dictcatalogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dictcatalog 方法: Get");
// Remove
mock.onDelete(new RegExp(/^\/dictcatalogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dictcatalog 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......
......@@ -87,16 +87,16 @@ mock.onDelete(new RegExp(/^\/dstsystems\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:dstsystem 方法: Select");
// CheckKey
mock.onPost(new RegExp(/^\/dstsystems\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:dstsystem 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['pssystemid'];
const matchArray:any = new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
const matchArray:any = new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply(
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.pssystemid, tempValue.pssystemid));
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.pssystemid, tempValue.pssystemid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['pssystemid'] == tempValue['pssystemid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, _items];
return [status, data];
});
// Create
......@@ -141,44 +151,6 @@ mock.onPost(new RegExp(/^\/dstsystems\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((confi
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/dstsystems\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dstsystem 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['pssystemid'];
const matchArray:any = new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.pssystemid, tempValue.pssystemid));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['pssystemid'] == tempValue['pssystemid'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/dstsystems\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:dstsystem 方法: GetDraft");
......@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/dstsystems\/getdraft$/)).reply((config: any) => {
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/dstsystems\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:dstsystem 方法: CheckKey");
// Save
mock.onPost(new RegExp(/^\/dstsystems\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:dstsystem 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['pssystemid'];
const matchArray:any = new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/dstsystems\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).re
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/dstsystems\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:dstsystem 方法: Save");
// SyncSysModel
mock.onPost(new RegExp(/^\/dstsystems\/?([a-zA-Z0-9\-\;]{0,35})\/syncsysmodel$/)).reply((config: any) => {
console.groupCollapsed("实体:dstsystem 方法: SyncSysModel");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['pssystemid'];
const matchArray:any = new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})\/syncsysmodel$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -271,16 +243,16 @@ mock.onPost(new RegExp(/^\/dstsystems\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply(
return [status, data];
});
// SyncSysModel
mock.onPost(new RegExp(/^\/dstsystems\/?([a-zA-Z0-9\-\;]{0,35})\/syncsysmodel$/)).reply((config: any) => {
console.groupCollapsed("实体:dstsystem 方法: SyncSysModel");
// Update
mock.onPut(new RegExp(/^\/dstsystems\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dstsystem 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['pssystemid'];
const matchArray:any = new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})\/syncsysmodel$/).exec(config.url);
const matchArray:any = new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -360,10 +332,38 @@ mock.onGet(new RegExp(/^\/dstsystems\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:dstsystem 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['pssystemid'];
const matchArray:any = new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.pssystemid, tempValue.pssystemid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Remove
mock.onDelete(new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dstsystem 方法: Remove");
// Get
mock.onGet(new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dstsystem 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......@@ -389,9 +389,9 @@ mock.onDelete(new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((conf
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dstsystem 方法: Get");
// Remove
mock.onDelete(new RegExp(/^\/dstsystems\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:dstsystem 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......
......@@ -87,16 +87,16 @@ mock.onDelete(new RegExp(/^\/execlogs\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/execlogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:execlog 方法: Select");
// CheckKey
mock.onPost(new RegExp(/^\/execlogs\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:execlog 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/execlogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
const matchArray:any = new RegExp(/^\/execlogs\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/execlogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['id'] == tempValue['id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, _items];
return [status, data];
});
// Create
......@@ -141,44 +151,6 @@ mock.onPost(new RegExp(/^\/execlogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/execlogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:execlog 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/execlogs\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['id'] == tempValue['id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/execlogs\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:execlog 方法: GetDraft");
......@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/execlogs\/getdraft$/)).reply((config: any) => {
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/execlogs\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:execlog 方法: CheckKey");
// Save
mock.onPost(new RegExp(/^\/execlogs\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:execlog 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/execlogs\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/execlogs\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/execlogs\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/execlogs\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:execlog 方法: Save");
// Update
mock.onPut(new RegExp(/^\/execlogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:execlog 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/execlogs\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/execlogs\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/execlogs\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/execlogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:execlog 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/execlogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Remove
mock.onDelete(new RegExp(/^\/execlogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:execlog 方法: Remove");
// Get
mock.onGet(new RegExp(/^\/execlogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:execlog 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/execlogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/execlogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:execlog 方法: Get");
// Remove
mock.onDelete(new RegExp(/^\/execlogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:execlog 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......
......@@ -87,16 +87,16 @@ mock.onDelete(new RegExp(/^\/metamodules\/batch$/)).reply((config: any) => {
});
// Select
mock.onGet(new RegExp(/^\/metamodules\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:metamodule 方法: Select");
// CheckKey
mock.onPost(new RegExp(/^\/metamodules\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:metamodule 方法: CheckKey");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/metamodules\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
const matchArray:any = new RegExp(/^\/metamodules\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/metamodules\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['id'] == tempValue['id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, _items];
return [status, data];
});
// Create
......@@ -141,44 +151,6 @@ mock.onPost(new RegExp(/^\/metamodules\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((conf
return [status, mockDatas[0]];
});
// Update
mock.onPut(new RegExp(/^\/metamodules\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:metamodule 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/metamodules\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let data = JSON.parse(config.data);
mockDatas.forEach((item)=>{
if(item['id'] == tempValue['id'] ){
for(let value in data){
if(item.hasOwnProperty(value)){
item[value] = data[value];
}
}
}
})
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(data);
console.groupEnd();
console.groupEnd();
return [status, data];
});
// GetDraft
mock.onGet(new RegExp(/^\/metamodules\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:metamodule 方法: GetDraft");
......@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/metamodules\/getdraft$/)).reply((config: any) => {
return [status, {}];
});
// CheckKey
mock.onPost(new RegExp(/^\/metamodules\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
console.groupCollapsed("实体:metamodule 方法: CheckKey");
// Save
mock.onPost(new RegExp(/^\/metamodules\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:metamodule 方法: Save");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/metamodules\/([a-zA-Z0-9\-\;]{1,35})\/checkkey$/).exec(config.url);
const matchArray:any = new RegExp(/^\/metamodules\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/metamodules\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).r
return [status, data];
});
// Save
mock.onPost(new RegExp(/^\/metamodules\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:metamodule 方法: Save");
// Update
mock.onPut(new RegExp(/^\/metamodules\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:metamodule 方法: Update");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/metamodules\/([a-zA-Z0-9\-\;]{1,35})\/save$/).exec(config.url);
const matchArray:any = new RegExp(/^\/metamodules\/([a-zA-Z0-9\-\;]{1,35})$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
......@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/metamodules\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply(
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock.onGet(new RegExp(/^\/metamodules\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:metamodule 方法: Select");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
return [status, null];
}
const paramArray:Array<any> = ['id'];
const matchArray:any = new RegExp(/^\/metamodules\/([a-zA-Z0-9\-\;]{1,35})\/select$/).exec(config.url);
let tempValue: any = {};
if(matchArray && matchArray.length >1 && paramArray && paramArray.length >0){
paramArray.forEach((item: any, index: number) => {
Object.defineProperty(tempValue, item, {
enumerable: true,
value: matchArray[index + 1]
});
});
}
let items = mockDatas ? mockDatas : [];
let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items);
console.groupEnd();
console.groupEnd();
return [status, _items];
});
// Remove
mock.onDelete(new RegExp(/^\/metamodules\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:metamodule 方法: Remove");
// Get
mock.onGet(new RegExp(/^\/metamodules\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:metamodule 方法: Get");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/metamodules\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((con
return [status, _items?_items:{}];
});
// Get
mock.onGet(new RegExp(/^\/metamodules\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:metamodule 方法: Get");
// Remove
mock.onDelete(new RegExp(/^\/metamodules\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:metamodule 方法: Remove");
console.table({url:config.url, method: config.method, data:config.data});
let status = MockAdapter.mockStatus(config);
if (status !== 200) {
......
package cn.ibizlab.core.util.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
/**
* 通用配置类
*/
@Configuration
public class CommonAutoConfig {
@Value("${jbpm.enable.multi.con:true}")
private String flag;
/**
* 处理逻辑节点支持多来源配置
*/
@Component
public class InstallSystemParamsCommandLineRunner implements CommandLineRunner {
@Override
public void run(String... var1){
System.setProperty("jbpm.enable.multi.con", flag);
}
}
}
......@@ -166,7 +166,7 @@
<!--输出实体[DST_DATASOURCE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-dst_datasource-6-7">
<changeSet author="a_A_5d9d78509" id="tab-dst_datasource-7-7">
<createTable tableName="IBZDATASOURCE">
<column name="DSID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_DST_DATASOURCE_DSID"/>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册