提交 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),
......
......@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/dacharts\/batch$/)).reply((config: any) => {
return [status, {}];
});
// 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
......@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/dacharts\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
console.groupEnd();
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) => {
......@@ -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) {
......
......@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/dareports\/batch$/)).reply((config: any) => {
return [status, {}];
});
// 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
......@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/dareports\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config
console.groupEnd();
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) => {
......@@ -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) {
......
......@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/dictcatalogs\/batch$/)).reply((config: any) => {
return [status, {}];
});
// 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
......@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/dictcatalogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((con
console.groupEnd();
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) => {
......@@ -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) {
......
......@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/dstsystems\/batch$/)).reply((config: any) => {
return [status, {}];
});
// 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
......@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/dstsystems\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((confi
console.groupEnd();
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) => {
......@@ -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) {
......
......@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/execlogs\/batch$/)).reply((config: any) => {
return [status, {}];
});
// 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
......@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/execlogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
console.groupEnd();
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) => {
......@@ -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) {
......
......@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/metamodules\/batch$/)).reply((config: any) => {
return [status, {}];
});
// 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
......@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/metamodules\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((conf
console.groupEnd();
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) => {
......@@ -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) {
......
......@@ -6,6 +6,14 @@
<div slot='title' class="header-container">
<span class='caption-info'>{{$t(model.srfCaption)}}</span>
<div class='toolbar-container'>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem1_initds.visabled" :disabled="toolBarModels.tbitem1_initds.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem1_initds' }, $event)">
<i class=''></i>
<span class='caption'>{{$t('entities.dstdatasource.editviewtoolbar_toolbar.tbitem1_initds.caption')}}</span>
</i-button>
<div slot='content'>{{$t('entities.dstdatasource.editviewtoolbar_toolbar.tbitem1_initds.tip')}}</div>
</tooltip>
<span class='seperator'>|</span>
<tooltip :transfer="true" :max-width="600">
<i-button v-show="toolBarModels.tbitem3.visabled" :disabled="toolBarModels.tbitem3.disabled" class='' v-loading:i-button @click="toolbar_click({ tag: 'tbitem3' }, $event)">
<i class='fa fa-save'></i>
......@@ -378,6 +386,9 @@ export default class DstDataSourceEditViewBase extends Vue {
* @memberof DstDataSourceEditView
*/
public toolBarModels: any = {
tbitem1_initds: { name: 'tbitem1_initds', actiontarget: 'NONE', caption: '初始化', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'InitDS', target: 'SINGLEKEY' } },
tbitem2: { name: 'tbitem2', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
tbitem3: { name: 'tbitem3', actiontarget: 'NONE', caption: '保存', disabled: false, type: 'DEUIACTION', visabled: true,noprivdisplaymode:2,dataaccaction: '', uiaction: { tag: 'Save', target: '' } },
tbitem6: { name: 'tbitem6', type: 'SEPERATOR', visabled: true, dataaccaction: '', uiaction: { } },
......@@ -738,6 +749,9 @@ export default class DstDataSourceEditViewBase extends Vue {
* @memberof DstDataSourceEditViewBase
*/
public toolbar_click($event: any, $event2?: any) {
if (Object.is($event.tag, 'tbitem1_initds')) {
this.toolbar_tbitem1_initds_click(null, '', $event2);
}
if (Object.is($event.tag, 'tbitem3')) {
this.toolbar_tbitem3_click(null, '', $event2);
}
......@@ -820,6 +834,35 @@ export default class DstDataSourceEditViewBase extends Vue {
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public toolbar_tbitem1_initds_click(params: any = {}, tag?: any, $event?: any) {
// 参数
// 取数
let datas: any[] = [];
let xData: any = null;
// _this 指向容器对象
const _this: any = this;
let paramJO:any = {};
let contextJO:any = {};
xData = this.$refs.form;
if (xData.getDatas && xData.getDatas instanceof Function) {
datas = [...xData.getDatas()];
}
if(params){
datas = [params];
}
// 界面行为
const curUIService:DstDataSourceUIService = new DstDataSourceUIService();
curUIService.DstDataSource_InitDS(datas,contextJO, paramJO, $event, xData,this,"DstDataSource");
}
/**
* 逻辑事件
*
......
......@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册