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

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

上级 d174b69d
......@@ -196,7 +196,7 @@ export default class DropDownList extends Vue {
val = tempVal.length >0?tempVal[0].value:null;
}
const type: string = this.$util.typeOf(val);
val = Object.is(type, 'null') || Object.is(type, 'undefined') ? undefined : val;
val = Object.is(type, 'null') || Object.is(type, 'undefined') ? null : val;
this.$emit('change', val);
}
......
......@@ -233,6 +233,44 @@ mock.onPost(new RegExp(/^\/execresults\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).r
return [status, data];
});
// DeleteAsync
mock.onPost(new RegExp(/^\/execresults\/?([a-zA-Z0-9\-\;]{0,35})\/deleteasync$/)).reply((config: any) => {
console.groupCollapsed("实体:execresult 方法: DeleteAsync");
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(/^\/execresults\/([a-zA-Z0-9\-\;]{1,35})\/deleteasync$/).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];
});
// Save
mock.onPost(new RegExp(/^\/execresults\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
console.groupCollapsed("实体:execresult 方法: Save");
......@@ -270,6 +308,44 @@ mock.onPost(new RegExp(/^\/execresults\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply
console.groupEnd();
return [status, data];
});
// SaveAsync
mock.onPost(new RegExp(/^\/execresults\/?([a-zA-Z0-9\-\;]{0,35})\/saveasync$/)).reply((config: any) => {
console.groupCollapsed("实体:execresult 方法: SaveAsync");
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(/^\/execresults\/([a-zA-Z0-9\-\;]{1,35})\/saveasync$/).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];
});
// FetchDefault
mock.onGet(new RegExp(/^\/execresults\/fetchdefault$/)).reply((config: any) => {
......
......@@ -169,6 +169,20 @@ export default class DABuildServiceBase extends EntityService {
return res;
}
/**
* RunBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DABuildServiceBase
*/
public async RunBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dabuild/runbatch`,tempData,isloading);
}
/**
* Save接口方法
*
......
......@@ -246,6 +246,24 @@ export default class DAMetricServiceBase extends EntityService {
return res;
}
/**
* SyncRuleBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DAMetricServiceBase
*/
public async SyncRuleBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.dabuild && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dabuilds/${context.dabuild}/dametric/syncrulebatch`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dametric/syncrulebatch`,tempData,isloading);
}
/**
* FetchDefault接口方法
*
......
......@@ -153,6 +153,20 @@ export default class DstDataSourceServiceBase extends EntityService {
return res;
}
/**
* BuildDSBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DstDataSourceServiceBase
*/
public async BuildDSBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstdatasource/builddsbatch`,tempData,isloading);
}
/**
* CheckKey接口方法
*
......
......@@ -186,6 +186,20 @@ export default class DstSystemServiceBase extends EntityService {
return res;
}
/**
* SyncSysModelBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DstSystemServiceBase
*/
public async SyncSysModelBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstsystem/syncsysmodelbatch`,tempData,isloading);
}
/**
* FetchDefault接口方法
*
......
......@@ -153,6 +153,34 @@ export default class ExecResultServiceBase extends EntityService {
return res;
}
/**
* DeleteAsync接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ExecResultServiceBase
*/
public async DeleteAsync(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/execresults/${context.execresult}/deleteasync`,data,isloading);
return res;
}
/**
* DeleteAsyncBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ExecResultServiceBase
*/
public async DeleteAsyncBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/execresult/deleteasyncbatch`,tempData,isloading);
}
/**
* Save接口方法
*
......@@ -170,6 +198,34 @@ export default class ExecResultServiceBase extends EntityService {
return res;
}
/**
* SaveAsync接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ExecResultServiceBase
*/
public async SaveAsync(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let res:any = Http.getInstance().post(`/execresults/${context.execresult}/saveasync`,data,isloading);
return res;
}
/**
* SaveAsyncBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof ExecResultServiceBase
*/
public async SaveAsyncBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/execresult/saveasyncbatch`,tempData,isloading);
}
/**
* FetchDefault接口方法
*
......
......@@ -227,6 +227,24 @@ export default class MetaEntityServiceBase extends EntityService {
return res;
}
/**
* GetDefaultModelBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MetaEntityServiceBase
*/
public async GetDefaultModelBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
if(context.dstsystem && true){
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/dstsystems/${context.dstsystem}/metaentity/getdefaultmodelbatch`,tempData,isloading);
}
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/metaentity/getdefaultmodelbatch`,tempData,isloading);
}
/**
* Save接口方法
*
......
......@@ -153,6 +153,20 @@ export default class MetaModelServiceBase extends EntityService {
return res;
}
/**
* ChangeBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MetaModelServiceBase
*/
public async ChangeBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/metamodel/changebatch`,tempData,isloading);
}
/**
* CheckKey接口方法
*
......
......@@ -167,6 +167,20 @@ export default class RuleEngineServiceBase extends EntityService {
return res;
}
/**
* RunBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof RuleEngineServiceBase
*/
public async RunBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/ruleengine/runbatch`,tempData,isloading);
}
/**
* Save接口方法
*
......
......@@ -153,6 +153,20 @@ export default class RuleItemServiceBase extends EntityService {
return res;
}
/**
* BuildRuleFileBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof RuleItemServiceBase
*/
public async BuildRuleFileBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/ruleitem/buildrulefilebatch`,tempData,isloading);
}
/**
* CheckKey接口方法
*
......@@ -181,6 +195,20 @@ export default class RuleItemServiceBase extends EntityService {
return res;
}
/**
* ModelchangeBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof RuleItemServiceBase
*/
public async ModelchangeBatch(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
let tempData:any = JSON.parse(JSON.stringify(data));
return await Http.getInstance().post(`/ruleitem/modelchangebatch`,tempData,isloading);
}
/**
* Save接口方法
*
......
......@@ -146,9 +146,26 @@ export default class RuleEngineUIServiceBase extends UIService {
}
context = UIActionTool.handleContextParam(actionTarget,_args,parentContext,parentViewParam,context);
data = UIActionTool.handleActionParam(actionTarget,_args,parentContext,parentViewParam,params);
if(Object.is(actionTarget,"MULTIKEY")){
let tempDataArray:Array<any> = [];
if((_args.length >1) && (Object.keys(data).length >0)){
for(let i =0;i<_args.length;i++){
let tempObject:any = {};
Object.keys(data).forEach((key:string) =>{
Object.assign(tempObject,{[key]:data[key].split(',')[i]});
})
tempDataArray.push(tempObject);
}
}else{
tempDataArray.push(data);
}
data = tempDataArray;
}
context = Object.assign({},actionContext.context,context);
let parentObj:any = {srfparentdename:srfParentDeName?srfParentDeName:null,srfparentkey:srfParentDeName?context[srfParentDeName.toLowerCase()]:null};
Object.assign(data,parentObj);
if(!Object.is(actionTarget,"MULTIKEY")){
Object.assign(data,parentObj);
}
Object.assign(context,parentObj);
// 直接调实体服务需要转换的数据
if(context && context.srfsessionid){
......
......@@ -37,7 +37,7 @@ export declare interface AppPopover {
* @param {number} [height]
* @memberof AppPopover
*/
openPopover(event: MouseEvent, content: (h: CreateElement) => any, title?: string, position?: PopperJs.Placement, isAutoClose?: boolean, width?: number, height?: number): void;
openPopover(event: MouseEvent, content: (h: CreateElement) => any, position?: PopperJs.Placement, isAutoClose?: boolean, width?: number, height?: number): void;
/**
* 销毁popper(带回填数据)
*
......
......@@ -850,6 +850,11 @@ export default class MainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -869,7 +874,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -1279,10 +1284,6 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
......@@ -850,6 +850,11 @@ export default class MainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -869,7 +874,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -1279,10 +1284,6 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
......@@ -919,6 +919,11 @@ export default class MainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -938,7 +943,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -1372,10 +1377,6 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
......@@ -850,6 +850,11 @@ export default class MainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -869,7 +874,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -1279,10 +1284,6 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
......@@ -808,6 +808,11 @@ export default class MainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -827,7 +832,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -1237,10 +1242,6 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
......@@ -829,6 +829,11 @@ export default class MainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -848,7 +853,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -1258,10 +1263,6 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
......@@ -913,6 +913,11 @@ export default class MainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -932,7 +937,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -1342,10 +1347,6 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
......@@ -1062,6 +1062,11 @@ export default class MainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -1081,7 +1086,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -1499,10 +1504,6 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
......@@ -947,6 +947,11 @@ export default class MainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -966,7 +971,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -1376,10 +1381,6 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
......@@ -878,6 +878,11 @@ export default class MainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -897,7 +902,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -1307,10 +1312,6 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
......@@ -1731,6 +1731,11 @@ export default class EditMainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -1750,7 +1755,7 @@ export default class EditMainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -2200,10 +2205,6 @@ export default class EditMainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
......@@ -1396,6 +1396,11 @@ export default class MainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -1415,7 +1420,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -1865,10 +1870,6 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
......@@ -808,6 +808,11 @@ export default class MainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -827,7 +832,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -1237,10 +1242,6 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
......@@ -864,6 +864,11 @@ export default class MainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -883,7 +888,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -1293,10 +1298,6 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
......@@ -1128,6 +1128,11 @@ export default class EditMainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -1147,7 +1152,7 @@ export default class EditMainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -1557,10 +1562,6 @@ export default class EditMainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
......@@ -969,6 +969,11 @@ export default class MainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -988,7 +993,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -1398,10 +1403,6 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
......@@ -873,6 +873,11 @@ export default class MainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -892,7 +897,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -1310,10 +1315,6 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
......@@ -943,6 +943,11 @@ export default class MainBase extends Vue implements ControlInterface {
const sort: string = this.minorSortPSDEF+","+this.minorSortDir;
Object.assign(page, { sort: sort });
}
//清空selections
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
Object.assign(arg, page);
const parentdata: any = {};
this.$emit('beforeload', parentdata);
......@@ -962,7 +967,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.totalrow = response.total;
this.items = JSON.parse(JSON.stringify(data));
// 清空selections,gridItemsModel
//this.selections = [];
// this.selections = [];
this.gridItemsModel = [];
this.items.forEach(()=>{this.gridItemsModel.push(this.getGridRowModel())});
this.items.forEach((item:any)=>{
......@@ -1380,10 +1385,6 @@ export default class MainBase extends Vue implements ControlInterface {
return;
}
if(Object.is(action,'appRefresh')){
if(this.selections && this.selections.length > 0) {
this.selections = [];
this.$emit('selectionchange', this.selections);
}
this.refresh([data]);
}
})
......
package cn.ibizlab.core.extensions.service;
import cn.ibizlab.core.rule.service.impl.ExecResultServiceImpl;
import lombok.extern.slf4j.Slf4j;
import cn.ibizlab.core.rule.domain.ExecResult;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Primary;
import java.util.*;
/**
* 实体[执行结果] 自定义服务对象
*/
@Slf4j
@Primary
@Service("ExecResultExService")
public class ExecResultExService extends ExecResultServiceImpl {
@Override
protected Class currentModelClass() {
return com.baomidou.mybatisplus.core.toolkit.ReflectionKit.getSuperClassGenericType(this.getClass().getSuperclass(), 1);
}
/**
* [DeleteAsync:DeleteAsync] 行为扩展
* @param et
* @return
*/
@Override
@Transactional
public ExecResult deleteAsync(ExecResult et) {
return super.deleteAsync(et);
}
/**
* [SaveAsync:SaveAsync] 行为扩展
* @param et
* @return
*/
@Override
@Transactional
public ExecResult saveAsync(ExecResult et) {
return super.saveAsync(et);
}
}
......@@ -34,8 +34,12 @@ public interface IExecResultService extends IService<ExecResult> {
ExecResult get(String key);
ExecResult getDraft(ExecResult et);
boolean checkKey(ExecResult et);
ExecResult deleteAsync(ExecResult et);
boolean deleteAsyncBatch(List<ExecResult> etList);
boolean save(ExecResult et);
void saveBatch(List<ExecResult> list);
ExecResult saveAsync(ExecResult et);
boolean saveAsyncBatch(List<ExecResult> etList);
Page<ExecResult> searchDefault(ExecResultSearchContext context);
List<ExecResult> selectByRuleId(String rule_id);
void removeByRuleId(String rule_id);
......
......@@ -126,6 +126,22 @@ public class ExecResultServiceImpl extends ServiceImpl<ExecResultMapper, ExecRes
public boolean checkKey(ExecResult et) {
return (!ObjectUtils.isEmpty(et.getId())) && (!Objects.isNull(this.getById(et.getId())));
}
@Override
@Transactional
public ExecResult deleteAsync(ExecResult et) {
//自定义代码
return et;
}
@Override
@Transactional
public boolean deleteAsyncBatch(List<ExecResult> etList) {
for(ExecResult et : etList) {
deleteAsync(et);
}
return true;
}
@Override
@Transactional
public boolean save(ExecResult et) {
......@@ -160,6 +176,22 @@ public class ExecResultServiceImpl extends ServiceImpl<ExecResultMapper, ExecRes
saveOrUpdateBatch(list,batchSize);
}
@Override
@Transactional
public ExecResult saveAsync(ExecResult et) {
//自定义代码
return et;
}
@Override
@Transactional
public boolean saveAsyncBatch(List<ExecResult> etList) {
for(ExecResult et : etList) {
saveAsync(et);
}
return true;
}
@Override
public List<ExecResult> selectByRuleId(String rule_id) {
......
......@@ -164,7 +164,7 @@
<!--输出实体[RU_EXECRESULT]数据结构 -->
<changeSet author="root" id="tab-ru_execresult-44-8">
<changeSet author="root" id="tab-ru_execresult-46-8">
<createTable tableName="IBZRULERESULT">
<column name="RU_EXECRESULTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_RU_EXECRESULT_RU_EXECRESULT"/>
......
......@@ -80,7 +80,7 @@
"delogicname":"执行结果",
"sysmoudle":{"id":"RULE","name":"rule"},
"dedataset":[{"id":"Default" , "name":"数据集"}],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" }],
"deaction":[{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"DeleteAsync" , "name":"DeleteAsync" , "type":"USERCUSTOM" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"SaveAsync" , "name":"SaveAsync" , "type":"USERCUSTOM" }],
"datascope":[{"id":"all","name":"全部数据"}]
}
, {
......
......@@ -121,6 +121,23 @@ public class ExecResultResource {
return ResponseEntity.status(HttpStatus.OK).body(execresultService.checkKey(execresultMapping.toDomain(execresultdto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-ExecResult-DeleteAsync-all')")
@ApiOperation(value = "DeleteAsync", tags = {"执行结果" }, notes = "DeleteAsync")
@RequestMapping(method = RequestMethod.POST, value = "/execresults/{execresult_id}/deleteasync")
public ResponseEntity<ExecResultDTO> deleteAsync(@PathVariable("execresult_id") String execresult_id, @RequestBody ExecResultDTO execresultdto) {
ExecResult domain = execresultMapping.toDomain(execresultdto);
domain.setId(execresult_id);
domain = execresultService.deleteAsync(domain);
execresultdto = execresultMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(execresultdto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-ExecResult-DeleteAsync-all')")
@ApiOperation(value = "批量处理[DeleteAsync]", tags = {"执行结果" }, notes = "批量处理[DeleteAsync]")
@RequestMapping(method = RequestMethod.POST, value = "/execresults/{execresult_id}/deleteasyncbatch")
public ResponseEntity<Boolean> deleteAsyncBatch(@RequestBody List<ExecResultDTO> execresultdtos) {
return ResponseEntity.status(HttpStatus.OK).body(execresultService.deleteAsyncBatch(execresultMapping.toDomain(execresultdtos)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-ExecResult-Save-all')")
@ApiOperation(value = "保存执行结果", tags = {"执行结果" }, notes = "保存执行结果")
@RequestMapping(method = RequestMethod.POST, value = "/execresults/save")
......@@ -136,6 +153,23 @@ public class ExecResultResource {
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-ExecResult-SaveAsync-all')")
@ApiOperation(value = "SaveAsync", tags = {"执行结果" }, notes = "SaveAsync")
@RequestMapping(method = RequestMethod.POST, value = "/execresults/{execresult_id}/saveasync")
public ResponseEntity<ExecResultDTO> saveAsync(@PathVariable("execresult_id") String execresult_id, @RequestBody ExecResultDTO execresultdto) {
ExecResult domain = execresultMapping.toDomain(execresultdto);
domain.setId(execresult_id);
domain = execresultService.saveAsync(domain);
execresultdto = execresultMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(execresultdto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-ExecResult-SaveAsync-all')")
@ApiOperation(value = "批量处理[SaveAsync]", tags = {"执行结果" }, notes = "批量处理[SaveAsync]")
@RequestMapping(method = RequestMethod.POST, value = "/execresults/{execresult_id}/saveasyncbatch")
public ResponseEntity<Boolean> saveAsyncBatch(@RequestBody List<ExecResultDTO> execresultdtos) {
return ResponseEntity.status(HttpStatus.OK).body(execresultService.saveAsyncBatch(execresultMapping.toDomain(execresultdtos)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-ExecResult-searchDefault-all')")
@ApiOperation(value = "获取数据集", tags = {"执行结果" } ,notes = "获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/execresults/fetchdefault")
......
......@@ -20,10 +20,7 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.*;
@Slf4j
@Component
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册