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

ibizdev提交

上级 0d6b375e
...@@ -7,6 +7,7 @@ const mockDatas: Array<any> = [ ...@@ -7,6 +7,7 @@ const mockDatas: Array<any> = [
]; ];
// GetDraft // GetDraft
mock.onGet(new RegExp(/^\/orgdeptusers\/getdraft$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/orgdeptusers\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdeptuser 方法: GetDraft"); console.groupCollapsed("实体:orgdeptuser 方法: GetDraft");
...@@ -22,6 +23,35 @@ mock.onGet(new RegExp(/^\/orgdeptusers\/getdraft$/)).reply((config: any) => { ...@@ -22,6 +23,35 @@ mock.onGet(new RegExp(/^\/orgdeptusers\/getdraft$/)).reply((config: any) => {
console.groupEnd(); console.groupEnd();
return [status, {}]; return [status, {}];
}); });
// Get
mock.onGet(new RegExp(/^\/orgdeptusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdeptuser 方法: Get");
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> = ['orgdeptuserid'];
const matchArray:any = new RegExp(/^\/orgdeptusers\/([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.orgdeptuserid, tempValue.orgdeptuserid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Save // Save
mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
...@@ -60,6 +90,7 @@ mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).repl ...@@ -60,6 +90,7 @@ mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).repl
console.groupEnd(); console.groupEnd();
return [status, data]; return [status, data];
}); });
// Create // Create
mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
...@@ -86,6 +117,35 @@ mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((con ...@@ -86,6 +117,35 @@ mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((con
console.groupEnd(); console.groupEnd();
return [status, mockDatas[0]]; return [status, mockDatas[0]];
}); });
// Remove
mock.onDelete(new RegExp(/^\/orgdeptusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdeptuser 方法: Remove");
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> = ['orgdeptuserid'];
const matchArray:any = new RegExp(/^\/orgdeptusers\/([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.orgdeptuserid, tempValue.orgdeptuserid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Update // Update
mock.onPut(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => { mock.onPut(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
...@@ -124,6 +184,7 @@ mock.onPut(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((conf ...@@ -124,6 +184,7 @@ mock.onPut(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((conf
console.groupEnd(); console.groupEnd();
return [status, data]; return [status, data];
}); });
// CheckKey // CheckKey
mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
...@@ -162,6 +223,7 @@ mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)). ...@@ -162,6 +223,7 @@ mock.onPost(new RegExp(/^\/orgdeptusers\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).
console.groupEnd(); console.groupEnd();
return [status, data]; return [status, data];
}); });
// FetchGetorgdeptuser // FetchGetorgdeptuser
mock.onGet(new RegExp(/^\/orgdeptusers\/fetchgetorgdeptuser$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/orgdeptusers\/fetchgetorgdeptuser$/)).reply((config: any) => {
...@@ -178,6 +240,7 @@ mock.onGet(new RegExp(/^\/orgdeptusers\/fetchgetorgdeptuser$/)).reply((config: a ...@@ -178,6 +240,7 @@ mock.onGet(new RegExp(/^\/orgdeptusers\/fetchgetorgdeptuser$/)).reply((config: a
return [status, mockDatas ? mockDatas : []]; return [status, mockDatas ? mockDatas : []];
}); });
// FetchGetorgdeptuser // FetchGetorgdeptuser
mock.onGet(new RegExp(/^\/orgdeptusers\/fetchgetorgdeptuser(\?[\w-./?%&=]*)*$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/orgdeptusers\/fetchgetorgdeptuser(\?[\w-./?%&=]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdeptuser 方法: FetchGetorgdeptuser"); console.groupCollapsed("实体:orgdeptuser 方法: FetchGetorgdeptuser");
...@@ -206,6 +269,9 @@ mock.onGet(new RegExp(/^\/orgdeptusers\/fetchgetorgdeptuser(\?[\w-./?%&=]*)*$/)) ...@@ -206,6 +269,9 @@ mock.onGet(new RegExp(/^\/orgdeptusers\/fetchgetorgdeptuser(\?[\w-./?%&=]*)*$/))
console.groupEnd(); console.groupEnd();
return [status, records ? records : []]; return [status, records ? records : []];
}); });
// FetchDefault // FetchDefault
mock.onGet(new RegExp(/^\/orgdeptusers\/fetchdefault$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/orgdeptusers\/fetchdefault$/)).reply((config: any) => {
...@@ -222,6 +288,7 @@ mock.onGet(new RegExp(/^\/orgdeptusers\/fetchdefault$/)).reply((config: any) => ...@@ -222,6 +288,7 @@ mock.onGet(new RegExp(/^\/orgdeptusers\/fetchdefault$/)).reply((config: any) =>
return [status, mockDatas ? mockDatas : []]; return [status, mockDatas ? mockDatas : []];
}); });
// FetchDefault // FetchDefault
mock.onGet(new RegExp(/^\/orgdeptusers\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/orgdeptusers\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdeptuser 方法: FetchDefault"); console.groupCollapsed("实体:orgdeptuser 方法: FetchDefault");
...@@ -250,67 +317,19 @@ mock.onGet(new RegExp(/^\/orgdeptusers\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply( ...@@ -250,67 +317,19 @@ mock.onGet(new RegExp(/^\/orgdeptusers\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply(
console.groupEnd(); console.groupEnd();
return [status, records ? records : []]; return [status, records ? records : []];
}); });
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现
// Get // URI参数传递情况未实现
mock.onGet(new RegExp(/^\/orgdeptusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdeptuser 方法: Get");
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> = ['orgdeptuserid'];
const matchArray:any = new RegExp(/^\/orgdeptusers\/([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.orgdeptuserid, tempValue.orgdeptuserid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Remove // URI参数传递情况未实现
mock.onDelete(new RegExp(/^\/orgdeptusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:orgdeptuser 方法: Remove");
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> = ['orgdeptuserid'];
const matchArray:any = new RegExp(/^\/orgdeptusers\/([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.orgdeptuserid, tempValue.orgdeptuserid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
...@@ -6,6 +6,35 @@ const mock = MockAdapter.getInstance(); ...@@ -6,6 +6,35 @@ const mock = MockAdapter.getInstance();
const mockDatas: Array<any> = [ const mockDatas: Array<any> = [
]; ];
// Remove
mock.onDelete(new RegExp(/^\/orgusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:orguser 方法: Remove");
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> = ['orguserid'];
const matchArray:any = new RegExp(/^\/orgusers\/([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.orguserid, tempValue.orguserid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Save // Save
mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
...@@ -44,6 +73,7 @@ mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((c ...@@ -44,6 +73,7 @@ mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((c
console.groupEnd(); console.groupEnd();
return [status, data]; return [status, data];
}); });
// Update // Update
mock.onPut(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => { mock.onPut(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
...@@ -82,6 +112,7 @@ mock.onPut(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: ...@@ -82,6 +112,7 @@ mock.onPut(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
console.groupEnd(); console.groupEnd();
return [status, data]; return [status, data];
}); });
// CheckKey // CheckKey
mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
...@@ -121,6 +152,7 @@ mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl ...@@ -121,6 +152,7 @@ mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
return [status, data]; return [status, data];
}); });
// GetDraft // GetDraft
mock.onGet(new RegExp(/^\/orgusers\/getdraft$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/orgusers\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:orguser 方法: GetDraft"); console.groupCollapsed("实体:orguser 方法: GetDraft");
...@@ -136,6 +168,7 @@ mock.onGet(new RegExp(/^\/orgusers\/getdraft$/)).reply((config: any) => { ...@@ -136,6 +168,7 @@ mock.onGet(new RegExp(/^\/orgusers\/getdraft$/)).reply((config: any) => {
console.groupEnd(); console.groupEnd();
return [status, {}]; return [status, {}];
}); });
// Create // Create
mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
...@@ -162,6 +195,35 @@ mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: ...@@ -162,6 +195,35 @@ mock.onPost(new RegExp(/^\/orgusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
console.groupEnd(); console.groupEnd();
return [status, mockDatas[0]]; return [status, mockDatas[0]];
}); });
// Get
mock.onGet(new RegExp(/^\/orgusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:orguser 方法: Get");
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> = ['orguserid'];
const matchArray:any = new RegExp(/^\/orgusers\/([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.orguserid, tempValue.orguserid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// FetchDefault // FetchDefault
mock.onGet(new RegExp(/^\/orgusers\/fetchdefault$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/orgusers\/fetchdefault$/)).reply((config: any) => {
...@@ -178,6 +240,7 @@ mock.onGet(new RegExp(/^\/orgusers\/fetchdefault$/)).reply((config: any) => { ...@@ -178,6 +240,7 @@ mock.onGet(new RegExp(/^\/orgusers\/fetchdefault$/)).reply((config: any) => {
return [status, mockDatas ? mockDatas : []]; return [status, mockDatas ? mockDatas : []];
}); });
// FetchDefault // FetchDefault
mock.onGet(new RegExp(/^\/orgusers\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/orgusers\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:orguser 方法: FetchDefault"); console.groupCollapsed("实体:orguser 方法: FetchDefault");
...@@ -206,67 +269,19 @@ mock.onGet(new RegExp(/^\/orgusers\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((con ...@@ -206,67 +269,19 @@ mock.onGet(new RegExp(/^\/orgusers\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((con
console.groupEnd(); console.groupEnd();
return [status, records ? records : []]; return [status, records ? records : []];
}); });
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现
// Remove // URI参数传递情况未实现
mock.onDelete(new RegExp(/^\/orgusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:orguser 方法: Remove");
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> = ['orguserid'];
const matchArray:any = new RegExp(/^\/orgusers\/([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.orguserid, tempValue.orguserid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get // URI参数传递情况未实现
mock.onGet(new RegExp(/^\/orgusers\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:orguser 方法: Get");
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> = ['orguserid'];
const matchArray:any = new RegExp(/^\/orgusers\/([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.orguserid, tempValue.orguserid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
...@@ -7,6 +7,7 @@ const mockDatas: Array<any> = [ ...@@ -7,6 +7,7 @@ const mockDatas: Array<any> = [
]; ];
// Select // Select
mock.onGet(new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: any) => {
console.groupCollapsed("实体:ps 方法: Select"); console.groupCollapsed("实体:ps 方法: Select");
...@@ -34,6 +35,35 @@ mock.onGet(new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config: ...@@ -34,6 +35,35 @@ mock.onGet(new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((config:
console.groupEnd(); console.groupEnd();
return [status, _items]; return [status, _items];
}); });
// Remove
mock.onDelete(new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ps 方法: Remove");
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> = ['psid'];
const matchArray:any = new RegExp(/^\/ps\/([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.psid, tempValue.psid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Create // Create
mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
...@@ -60,6 +90,35 @@ mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) ...@@ -60,6 +90,35 @@ mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any)
console.groupEnd(); console.groupEnd();
return [status, mockDatas[0]]; return [status, mockDatas[0]];
}); });
// Get
mock.onGet(new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ps 方法: Get");
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> = ['psid'];
const matchArray:any = new RegExp(/^\/ps\/([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.psid, tempValue.psid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// XD // XD
mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/xd$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/xd$/)).reply((config: any) => {
...@@ -99,6 +158,7 @@ mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/xd$/)).reply((config: a ...@@ -99,6 +158,7 @@ mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/xd$/)).reply((config: a
return [status, data]; return [status, data];
}); });
// GetDraft // GetDraft
mock.onGet(new RegExp(/^\/ps\/getdraft$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/ps\/getdraft$/)).reply((config: any) => {
console.groupCollapsed("实体:ps 方法: GetDraft"); console.groupCollapsed("实体:ps 方法: GetDraft");
...@@ -114,6 +174,7 @@ mock.onGet(new RegExp(/^\/ps\/getdraft$/)).reply((config: any) => { ...@@ -114,6 +174,7 @@ mock.onGet(new RegExp(/^\/ps\/getdraft$/)).reply((config: any) => {
console.groupEnd(); console.groupEnd();
return [status, {}]; return [status, {}];
}); });
// Save // Save
mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: any) => {
...@@ -152,6 +213,7 @@ mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config: ...@@ -152,6 +213,7 @@ mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((config:
console.groupEnd(); console.groupEnd();
return [status, data]; return [status, data];
}); });
// Update // Update
mock.onPut(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => { mock.onPut(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) => {
...@@ -190,6 +252,7 @@ mock.onPut(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) = ...@@ -190,6 +252,7 @@ mock.onPut(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any) =
console.groupEnd(); console.groupEnd();
return [status, data]; return [status, data];
}); });
// CreateAndStartIM // CreateAndStartIM
mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/createandstartim$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/createandstartim$/)).reply((config: any) => {
...@@ -228,6 +291,7 @@ mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/createandstartim$/)).re ...@@ -228,6 +291,7 @@ mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/createandstartim$/)).re
console.groupEnd(); console.groupEnd();
return [status, data]; return [status, data];
}); });
// CheckKey // CheckKey
mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => { mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((config: any) => {
...@@ -266,6 +330,7 @@ mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((con ...@@ -266,6 +330,7 @@ mock.onPost(new RegExp(/^\/ps\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply((con
console.groupEnd(); console.groupEnd();
return [status, data]; return [status, data];
}); });
// FetchDefault // FetchDefault
mock.onGet(new RegExp(/^\/ps\/fetchdefault$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/ps\/fetchdefault$/)).reply((config: any) => {
...@@ -282,6 +347,7 @@ mock.onGet(new RegExp(/^\/ps\/fetchdefault$/)).reply((config: any) => { ...@@ -282,6 +347,7 @@ mock.onGet(new RegExp(/^\/ps\/fetchdefault$/)).reply((config: any) => {
return [status, mockDatas ? mockDatas : []]; return [status, mockDatas ? mockDatas : []];
}); });
// FetchDefault // FetchDefault
mock.onGet(new RegExp(/^\/ps\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((config: any) => { mock.onGet(new RegExp(/^\/ps\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((config: any) => {
console.groupCollapsed("实体:ps 方法: FetchDefault"); console.groupCollapsed("实体:ps 方法: FetchDefault");
...@@ -310,67 +376,19 @@ mock.onGet(new RegExp(/^\/ps\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((config: a ...@@ -310,67 +376,19 @@ mock.onGet(new RegExp(/^\/ps\/fetchdefault(\?[\w-./?%&=]*)*$/)).reply((config: a
console.groupEnd(); console.groupEnd();
return [status, records ? records : []]; return [status, records ? records : []];
}); });
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现 // URI参数传递情况未实现
// URI参数传递情况未实现
// Remove // URI参数传递情况未实现
mock.onDelete(new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ps 方法: Remove");
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> = ['psid'];
const matchArray:any = new RegExp(/^\/ps\/([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.psid, tempValue.psid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
// Get // URI参数传递情况未实现
mock.onGet(new RegExp(/^\/ps\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: any) => {
console.groupCollapsed("实体:ps 方法: Get");
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> = ['psid'];
const matchArray:any = new RegExp(/^\/ps\/([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.psid, tempValue.psid));
console.groupCollapsed("response数据 status: "+status+" data: ");
console.table(_items?_items:{});
console.groupEnd();
console.groupEnd();
return [status, _items?_items:{}];
});
...@@ -230,7 +230,6 @@ export default class PSEditViewBase extends Vue { ...@@ -230,7 +230,6 @@ export default class PSEditViewBase extends Vue {
onParamData(newVal: any, oldVal: any) { onParamData(newVal: any, oldVal: any) {
if(newVal){ if(newVal){
Object.assign(this.viewparams, JSON.parse(this.viewparam)); Object.assign(this.viewparams, JSON.parse(this.viewparam));
} }
} }
......
...@@ -128,10 +128,9 @@ ...@@ -128,10 +128,9 @@
:viewState="viewState" :viewState="viewState"
:viewparams="viewparams" :viewparams="viewparams"
:context="context" :context="context"
:isSingleSelect="isSingleSelect" :isSingleSelect="isSingleSelect"
:showBusyIndicator="true" :showBusyIndicator="true"
:isOpenEdit="false" :isOpenEdit="false"
:gridRowActiveMode="gridRowActiveMode"
@save="onSave" @save="onSave"
updateAction="" updateAction=""
removeAction="Remove" removeAction="Remove"
...@@ -259,7 +258,6 @@ export default class PSGridViewBase extends Vue { ...@@ -259,7 +258,6 @@ export default class PSGridViewBase extends Vue {
onParamData(newVal: any, oldVal: any) { onParamData(newVal: any, oldVal: any) {
if(newVal){ if(newVal){
Object.assign(this.viewparams, JSON.parse(this.viewparam)); Object.assign(this.viewparams, JSON.parse(this.viewparam));
} }
} }
...@@ -1233,7 +1231,7 @@ export default class PSGridViewBase extends Vue { ...@@ -1233,7 +1231,7 @@ export default class PSGridViewBase extends Vue {
* @memberof PSGridViewBase * @memberof PSGridViewBase
*/ */
protected ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) { protected ToggleRowEdit(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
xData.actualIsOpenEdit = !xData.actualIsOpenEdit; xData.isOpenEdit = !xData.isOpenEdit;
} }
/** /**
* 新建行 * 新建行
...@@ -1254,7 +1252,7 @@ export default class PSGridViewBase extends Vue { ...@@ -1254,7 +1252,7 @@ export default class PSGridViewBase extends Vue {
} else if(xData.newRow && xData.newRow instanceof Function) { } else if(xData.newRow && xData.newRow instanceof Function) {
xData.newRow([{ ...data }], params, $event, xData); xData.newRow([{ ...data }], params, $event, xData);
}else{ }else{
_this.$Notice.error({ title: '错误', desc: 'newRow 视图处理逻辑不存在,请添加!' }); _this.$Notice.error({ title: '错误', desc: 'newdata 视图处理逻辑不存在,请添加!' });
} }
} }
/** /**
......
...@@ -143,7 +143,6 @@ export default class AppIndexViewBase extends Vue { ...@@ -143,7 +143,6 @@ export default class AppIndexViewBase extends Vue {
onParamData(newVal: any, oldVal: any) { onParamData(newVal: any, oldVal: any) {
if(newVal){ if(newVal){
Object.assign(this.viewparams, JSON.parse(this.viewparam)); Object.assign(this.viewparams, JSON.parse(this.viewparam));
} }
} }
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<template v-else> <template v-else>
<template v-if="item1.type =='MENUITEM'"> <template v-if="item1.type =='MENUITEM'">
<el-menu-item v-show="!item1.hidden" :index="item1.name" :key="item1.id"> <el-menu-item v-show="!item1.hidden" :index="item1.name" :key="item1.id">
<template v-if="item1.icon && item1.icon != ''"> <template v-if="item1.icon && item.icon != ''">
<img :src="item1.icon" class='app-menu-icon' /> <img :src="item1.icon" class='app-menu-icon' />
</template> </template>
<template v-else-if="item1.iconcls && item1.iconcls != ''"> <template v-else-if="item1.iconcls && item1.iconcls != ''">
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<template v-else> <template v-else>
<template v-if="item0.type =='MENUITEM'"> <template v-if="item0.type =='MENUITEM'">
<el-menu-item v-show="!item0.hidden" :index="item0.name" :key="item0.id"> <el-menu-item v-show="!item0.hidden" :index="item0.name" :key="item0.id">
<template v-if="item0.icon && item0.icon != ''"> <template v-if="item0.icon && item.icon != ''">
<img :src="item0.icon" class='app-menu-icon' /> <img :src="item0.icon" class='app-menu-icon' />
</template> </template>
<template v-else-if="item0.iconcls && item0.iconcls != ''"> <template v-else-if="item0.iconcls && item0.iconcls != ''">
...@@ -529,7 +529,7 @@ export default class AppIndexViewBase extends Vue implements ControlInterface { ...@@ -529,7 +529,7 @@ export default class AppIndexViewBase extends Vue implements ControlInterface {
private dataProcess(items: any[]): void { private dataProcess(items: any[]): void {
items.forEach((_item: any) => { items.forEach((_item: any) => {
if (_item.expanded) { if (_item.expanded) {
this.defaultOpeneds.push(_item.name); this.defaultOpeneds.push(_item.id);
} }
if (_item.items && _item.items.length > 0) { if (_item.items && _item.items.length > 0) {
this.dataProcess(_item.items) this.dataProcess(_item.items)
......
...@@ -697,11 +697,6 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -697,11 +697,6 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof Main * @memberof Main
*/ */
private onFormLoad(data: any = {},action:string): void { private onFormLoad(data: any = {},action:string): void {
if(Object.is(action,"save") || Object.is(action,"autoSave"))
// 更新context的实体主键
if(data.ps){
Object.assign(this.context,{ps:data.ps})
}
this.setFormEnableCond(data); this.setFormEnableCond(data);
this.fillForm(data,action); this.fillForm(data,action);
this.oldData = {}; this.oldData = {};
......
...@@ -4,9 +4,8 @@ ...@@ -4,9 +4,8 @@
:default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }" :default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"
@sort-change="onSortChange($event)" @sort-change="onSortChange($event)"
:border="isDragendCol" :border="isDragendCol"
:height="isEnablePagingBar && items.length > 0 ? 'calc(100% - 50px)' : '100%'" stripe :height="isEnablePagingBar && items.length > 0 ? 'calc(100% - 50px)' : '100%'"
:highlight-current-row ="isSingleSelect" :highlight-current-row ="isSingleSelect"
:row-class-name="getRowClassName"
@row-click="rowClick($event)" @row-click="rowClick($event)"
@select-all="selectAll($event)" @select-all="selectAll($event)"
@select="select($event)" @select="select($event)"
...@@ -388,51 +387,6 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -388,51 +387,6 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
@Prop() protected isSingleSelect?: boolean; @Prop() protected isSingleSelect?: boolean;
/**
* 选中数据字符串
*
* @type {string}
* @memberof Main
*/
@Prop() protected selectedData?: string;
/**
* 选中值变化
*
* @param {*} newVal
* @param {*} oldVal
* @memberof MainTree
*/
@Watch('selectedData')
public onValueChange(newVal: any, oldVal: any) {
this.selections = [];
if(this.selectedData){
const refs: any = this.$refs;
if (refs.multipleTable) {
refs.multipleTable.clearSelection();
JSON.parse(this.selectedData).forEach((selection:any)=>{
let selectedItem = this.items.find((item:any)=>{
return Object.is(item.srfkey, selection.srfkey);
});
if(selectedItem){
this.rowClick(selectedItem);
}
});
}
}
}
/**
* 表格行数据默认激活模式
* 0 不激活
* 1 单击激活
* 2 双击激活
*
* @type {(number | 0 | 1 | 2)}
* @memberof Main
*/
@Prop({default: 2}) protected gridRowActiveMode!: number;
/** /**
* 是否开启行编辑 * 是否开启行编辑
* *
...@@ -441,14 +395,6 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -441,14 +395,6 @@ export default class MainBase extends Vue implements ControlInterface {
*/ */
@Prop({default: false}) protected isOpenEdit!: boolean; @Prop({default: false}) protected isOpenEdit!: boolean;
/**
* 实际是否开启行编辑
*
* @type {boolean}
* @memberof Main
*/
protected actualIsOpenEdit: boolean = this.isOpenEdit;
/** /**
* 总条数 * 总条数
* *
...@@ -609,11 +555,11 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -609,11 +555,11 @@ export default class MainBase extends Vue implements ControlInterface {
if(_this.isSelectFirstDefault){ if(_this.isSelectFirstDefault){
_this.rowClick(_this.items[0]); _this.rowClick(_this.items[0]);
} }
if(_this.selectedData){ if(_this.context.selectedData){
const refs: any = _this.$refs; const refs: any = _this.$refs;
if (refs.multipleTable) { if (refs.multipleTable) {
refs.multipleTable.clearSelection(); refs.multipleTable.clearSelection();
JSON.parse(_this.selectedData).forEach((selection:any)=>{ _this.context.selectedData.forEach((selection:any)=>{
let selectedItem = _this.items.find((item:any)=>{ let selectedItem = _this.items.find((item:any)=>{
return Object.is(item.srfkey, selection.srfkey); return Object.is(item.srfkey, selection.srfkey);
}); });
...@@ -694,17 +640,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -694,17 +640,7 @@ export default class MainBase extends Vue implements ControlInterface {
} else { } else {
this.$Notice.success({ title: '', desc: '删除成功!' }); this.$Notice.success({ title: '', desc: '删除成功!' });
} }
//删除items中已删除的项 this.load({});
console.log(this.items);
_datas.forEach((data: any) => {
this.items.some((item:any,index:number)=>{
if(Object.is(item.srfkey,data.srfkey)){
this.items.splice(index,1);
return true;
}
});
});
this.totalrow -= _datas.length;
this.$emit('remove', null); this.$emit('remove', null);
this.selections = []; this.selections = [];
resolve(response); resolve(response);
...@@ -783,11 +719,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -783,11 +719,7 @@ export default class MainBase extends Vue implements ControlInterface {
if (Object.is(data.type, 'maxRowCount')) { if (Object.is(data.type, 'maxRowCount')) {
Object.assign(page, { page: 0, size: data.maxRowCount }); Object.assign(page, { page: 0, size: data.maxRowCount });
} else if (Object.is(data.type, 'activatedPage')) { } else if (Object.is(data.type, 'activatedPage')) {
try { doExport(JSON.parse(JSON.stringify(this.items)));
doExport(JSON.parse(JSON.stringify(this.items)));
} catch (error) {
console.error(error);
}
return; return;
} }
// 设置排序 // 设置排序
...@@ -807,11 +739,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -807,11 +739,7 @@ export default class MainBase extends Vue implements ControlInterface {
this.$Notice.error({ title: '', desc: '数据导出失败,' + response.info }); this.$Notice.error({ title: '', desc: '数据导出失败,' + response.info });
return; return;
} }
try { doExport(JSON.parse(JSON.stringify(response.data)));
doExport(JSON.parse(JSON.stringify(response.data)));
} catch (error) {
console.error(error);
}
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
...@@ -995,7 +923,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -995,7 +923,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof Main * @memberof Main
*/ */
protected rowDBLClick($event: any): void { protected rowDBLClick($event: any): void {
if (!$event || this.actualIsOpenEdit || Object.is(this.gridRowActiveMode,0)) { if (!$event || this.isOpenEdit) {
return; return;
} }
this.selections = []; this.selections = [];
...@@ -1051,7 +979,7 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1051,7 +979,7 @@ export default class MainBase extends Vue implements ControlInterface {
* @memberof Main * @memberof Main
*/ */
protected rowClick($event: any, ifAlways: boolean = false): void { protected rowClick($event: any, ifAlways: boolean = false): void {
if (!ifAlways && (!$event || this.actualIsOpenEdit)) { if (!ifAlways && (!$event || this.isOpenEdit)) {
return; return;
} }
if(this.stopRowClick) { if(this.stopRowClick) {
...@@ -1075,10 +1003,8 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1075,10 +1003,8 @@ export default class MainBase extends Vue implements ControlInterface {
if (refs.multipleTable) { if (refs.multipleTable) {
if(this.isSingleSelect){ if(this.isSingleSelect){
refs.multipleTable.clearSelection(); refs.multipleTable.clearSelection();
refs.multipleTable.setCurrentRow($event);
}else{
refs.multipleTable.toggleRowSelection($event);
} }
refs.multipleTable.toggleRowSelection($event);
} }
this.$emit('selectionchange', this.selections); this.$emit('selectionchange', this.selections);
...@@ -1266,19 +1192,6 @@ export default class MainBase extends Vue implements ControlInterface { ...@@ -1266,19 +1192,6 @@ export default class MainBase extends Vue implements ControlInterface {
} }
/**
* 获取对应行class
*
* @param {*} $args row 行数据,rowIndex 行索引
* @returns {void}
* @memberof Main
*/
protected getRowClassName(args:{row: any,rowIndex: number}){
let isSelected = this.selections.some((item:any)=>{
return Object.is(item.ps,args.row.ps);
});
return isSelected ? "grid-selected-row" : "";
}
} }
</script> </script>
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
} }
} }
.el-table__body-wrapper{ .el-table__body-wrapper{
height: calc(100% - 83px) !important; height: 100% !important;
} }
.el-table__empty-block{ .el-table__empty-block{
height: auto !important; height: auto !important;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册