fix bug
This commit is contained in:
@ -69,7 +69,7 @@ nzMessage="签收后不可再修改运费,请确保运费等信息准确无误
|
||||
[nzPreview]="handlePreview1"
|
||||
[nzBeforeUpload]="beforeUpload"
|
||||
(nzChange)="handleChange1($event)"
|
||||
>
|
||||
>beforeUpload
|
||||
<div>
|
||||
<i nz-icon nzType="plus"></i>
|
||||
<div style="margin-top: 8px">请上传图片</div>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-25 16:03:45
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-14 16:18:02
|
||||
* @LastEditTime : 2022-02-15 11:16:42
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting-h5\\dynamic-setting-h5.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
@ -38,6 +38,7 @@
|
||||
<label nz-radio [nzValue]="1" class="ml-xl">{{item.remark?.[1] || '是'}}</label>
|
||||
</nz-radio-group>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngSwitchCase="3">
|
||||
<nz-time-picker nzFormat="HH:mm" nzPlaceHolder="请选择时间" [(ngModel)]="item.itemValue"
|
||||
class="ml-md mr-xl">
|
||||
@ -78,6 +79,22 @@
|
||||
<input nz-input placeholder="请输入" [(ngModel)]="item.itemValue" />
|
||||
</nz-input-group>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="9">
|
||||
<nz-upload
|
||||
[nzAction]="service.$api_upload_url"
|
||||
[nzName]="'multipartFile'"
|
||||
[nzHeaders]="{ authorization: 'authorization-text' }"
|
||||
[(nzFileList)]="item.itemValue"
|
||||
>
|
||||
<button nz-button>
|
||||
<i nz-icon nzType="upload"></i>
|
||||
上传文件
|
||||
</button>
|
||||
</nz-upload>
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="10">
|
||||
<nz-switch [(ngModel)]="item.itemValue"></nz-switch>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</se>
|
||||
</div>
|
||||
|
||||
@ -1,17 +1,18 @@
|
||||
/*
|
||||
* @Description :
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-25 16:03:45
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-14 14:54:08
|
||||
* @LastEditTime : 2022-02-15 10:40:43
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting-h5\\dynamic-setting-h5.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
import { Component, OnInit, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { BaseService } from '@shared';
|
||||
import { NzUploadChangeParam } from 'ng-zorro-antd/upload';
|
||||
|
||||
const JSONTYPE = new Set([5,6]);
|
||||
const JSONTYPE = new Set([5, 6, 9]);
|
||||
@Component({
|
||||
selector: 'app-dynamic-setting-h5',
|
||||
templateUrl: './dynamic-setting-h5.component.html',
|
||||
@ -36,27 +37,37 @@ export class DynamicSettingH5Component implements OnInit {
|
||||
labelWidth = 250;
|
||||
@Input()
|
||||
itemValue = 'itemValue';
|
||||
|
||||
listUrls: any;
|
||||
constructor(public service: BaseService) {}
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.tabs)
|
||||
console.log(this.tabs);
|
||||
}
|
||||
|
||||
changeType(type: any): void {
|
||||
this.selectedTab = type;
|
||||
console.log(type);
|
||||
|
||||
|
||||
this.selectedEvent.emit(this.selectedTab);
|
||||
}
|
||||
|
||||
|
||||
saveAction() {
|
||||
if (this.configList?.length < 0) {
|
||||
return;
|
||||
}
|
||||
console.log(this.configList)
|
||||
console.log(this.configList);
|
||||
let params = [...this.configList];
|
||||
params = params.map((item: any) => {
|
||||
console.log(item);
|
||||
if (item.itemType == 9) {
|
||||
const files = item.itemValue?.map(({ url, name }: any) => ({ url, name }));
|
||||
return {
|
||||
...item,
|
||||
remark: item.remark ? JSON.stringify(item.remark) : null,
|
||||
itemData: item.itemData ? JSON.stringify(item.itemData) : null,
|
||||
itemValue: item.itemValue ? JSON.stringify(files) : null
|
||||
};
|
||||
}
|
||||
if (JSONTYPE.has(item.itemType)) {
|
||||
item.itemValue = item.itemValue ? JSON.stringify(item.itemValue) : null;
|
||||
}
|
||||
@ -66,6 +77,8 @@ export class DynamicSettingH5Component implements OnInit {
|
||||
itemData: item.itemData ? JSON.stringify(item.itemData) : null
|
||||
};
|
||||
});
|
||||
console.log(params);
|
||||
this.saveEvent.emit(params);
|
||||
}
|
||||
}
|
||||
// [0]?.response?.data.fullFilePath
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-10 16:06:17
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-14 16:19:54
|
||||
* @LastEditTime : 2022-02-15 11:23:29
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting-modal\\dynamic-setting-modal.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -101,7 +101,7 @@ export class DynamicSettingModalComponent implements OnInit {
|
||||
remark: item?.remark ? JSON.parse(item?.remark) : null,
|
||||
extend: item?.extend ? JSON.parse(item?.extend) : [],
|
||||
// itemData: item.itemData ? JSON.parse(item.itemData) : item.itemData,
|
||||
itemValue: item?.itemValue ? item?.itemType === 1? JSON.parse(item?.itemValue) : item?.itemValue : item?.itemValue
|
||||
itemValue: item?.itemValue ? item?.itemType !== 8? JSON.parse(item?.itemValue) : item?.itemValue : item?.itemValue
|
||||
}));
|
||||
}
|
||||
return [];
|
||||
|
||||
@ -1,15 +1,26 @@
|
||||
/*
|
||||
* @Description :
|
||||
* @Version : 1.0
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-25 13:10:49
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-15 10:09:24
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\dynamic-setting\\dynamic-setting.module.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { DynamicSettingH5Component } from './dynamic-setting-h5/dynamic-setting-h5.component';
|
||||
import { SHARED_ZORRO_MODULES } from '../../shared-zorro.module';
|
||||
import { SHARED_DELON_MODULES } from '../../shared-delon.module';
|
||||
import { NzSwitchModule } from 'ng-zorro-antd/switch';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { DynamicSettingModalComponent } from './dynamic-setting-modal/dynamic-setting-modal.component';
|
||||
import { FreightTableComponent } from './freight-table/freight-table.component';
|
||||
const COMPONENTS = [DynamicSettingH5Component, DynamicSettingModalComponent, FreightTableComponent];
|
||||
@NgModule({
|
||||
declarations: [...COMPONENTS],
|
||||
imports: [CommonModule, FormsModule, SHARED_ZORRO_MODULES, SHARED_DELON_MODULES],
|
||||
imports: [CommonModule, FormsModule, NzSwitchModule,SHARED_ZORRO_MODULES, SHARED_DELON_MODULES],
|
||||
exports: [...COMPONENTS]
|
||||
})
|
||||
export class DynamicSettingModule {}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: Maple
|
||||
* @Date: 2021-03-20 16:38:44
|
||||
* @LastEditors: Do not edit
|
||||
* @LastEditTime: 2021-06-17 15:06:37
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-15 09:41:48
|
||||
* @Description: 全局基础服务:
|
||||
* 所有实体类服务必须使用extends扩展此类
|
||||
* 几个特别的Get参数:
|
||||
@ -63,7 +63,8 @@ export class BaseService implements IBase {
|
||||
public $api_import_download_tpl!: string;
|
||||
// 获取字典选项
|
||||
public $api_get_dict!: string;
|
||||
|
||||
// 上传图片
|
||||
public $api_upload_url = `/api/mdc/pbc/upload/multipartFile/file`;
|
||||
constructor(public injector: Injector) {}
|
||||
|
||||
get http(): _HttpClient {
|
||||
|
||||
Reference in New Issue
Block a user