车辆接口更新

This commit is contained in:
wangshiming
2022-02-09 17:22:46 +08:00
parent 9b2c25524a
commit de20e1859a
10 changed files with 158 additions and 87 deletions

View File

@ -1,3 +1,13 @@
/*
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-25 13:10:49
* @LastEditors : Shiming
* @LastEditTime : 2022-01-26 17:45:11
* @FilePath : \\tms-obc-web\\src\\app\\routes\\sys-setting\\components\\basic-setting\\basic-setting.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { Component, OnInit, ViewChild } from '@angular/core';
import { SFComponent, SFSchema, SFUISchema } from '@delon/form';
import { dateTimePickerUtil } from '@delon/util';
@ -24,8 +34,8 @@ export class BasicSettingComponent implements OnInit {
if (res?.length > 0) {
const typeData = res.find(config => config.configFullKey === 'sys.config');
if (typeData) {
this.tabs = typeData.children;
this.selectedTab = typeData.children[0];
this.tabs = typeData?.children;
this.selectedTab = typeData?.children?.[0];
this.getConfigList(this.selectedTab);
}
}
@ -34,7 +44,7 @@ export class BasicSettingComponent implements OnInit {
getConfigList(selectedTab: any) {
this.selectedTab = selectedTab;
this.service.request(this.service.$api_get_config_by_parent_id, { id: selectedTab.id }).subscribe((res: Array<any>) => {
this.service.request(this.service.$api_get_config_by_parent_id, { id: selectedTab?.id }).subscribe((res: Array<any>) => {
if (res?.length > 0) {
res = res.map(item => ({
...item,