@ningboyz/types 1.6.126 → 1.6.128
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import _ from "lodash";
|
|
1
2
|
import { IFlowMainResponse } from "../flow";
|
|
2
3
|
import { IGamsCnfgResponse } from "../gams";
|
|
3
4
|
import type { IDictResponse } from "./IDictResponse";
|
|
4
5
|
import type { IPartResponse } from "./IPartResponse";
|
|
6
|
+
import { ISysMenuWithExpdResponseMenuPara, TSysMenuWithExpdResponseMenuPara } from "./ISysMenuWithExpdResponseMenuPara";
|
|
5
7
|
|
|
6
8
|
export interface ISysMenuWithExpdResponse {
|
|
7
9
|
DWLXP5PZ: any[];
|
|
@@ -162,6 +164,8 @@ export interface ISysMenuWithExpdResponse {
|
|
|
162
164
|
listGamsText: string;
|
|
163
165
|
/** 报销标准账套名称 */
|
|
164
166
|
listCnfgText: string;
|
|
167
|
+
/**参数约定 */
|
|
168
|
+
menuParaConv: ISysMenuWithExpdResponseMenuPara;
|
|
165
169
|
}
|
|
166
170
|
|
|
167
171
|
export class TSysMenuWithExpdResponse implements ISysMenuWithExpdResponse {
|
|
@@ -317,4 +321,25 @@ export class TSysMenuWithExpdResponse implements ISysMenuWithExpdResponse {
|
|
|
317
321
|
flowType: IFlowMainResponse[] = [];
|
|
318
322
|
listGamsText: string = "";
|
|
319
323
|
listCnfgText: string = "";
|
|
324
|
+
|
|
325
|
+
menuParaConv: ISysMenuWithExpdResponseMenuPara = new TSysMenuWithExpdResponseMenuPara();
|
|
326
|
+
|
|
327
|
+
public parseJsons(listMenu: ISysMenuWithExpdResponse[]) {
|
|
328
|
+
for (let i = 0; i < listMenu.length; i++) {
|
|
329
|
+
const menu = listMenu[i];
|
|
330
|
+
menu.menuParaConv = TSysMenuWithExpdResponse.parseJson(menu.menuPara);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
public static parseJson(menuPara: string) {
|
|
335
|
+
const defaultMenuPara = new TSysMenuWithExpdResponseMenuPara();
|
|
336
|
+
if (_.isEmpty(menuPara)) {
|
|
337
|
+
return defaultMenuPara;
|
|
338
|
+
}
|
|
339
|
+
try {
|
|
340
|
+
const obj = JSON.parse(menuPara) as TSysMenuWithExpdResponseMenuPara;
|
|
341
|
+
return _.merge(defaultMenuPara, obj);
|
|
342
|
+
} catch (e) {}
|
|
343
|
+
return defaultMenuPara;
|
|
344
|
+
}
|
|
320
345
|
}
|