From 37184edfc5d634b9fbdb32bad44d082691587f3a Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 20 Apr 2022 15:50:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=BF=94=E4=BD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../routes/partner/partner-routing.module.ts | 9 +- src/app/routes/partner/partner.module.ts | 6 +- .../components/config/config.component.html | 187 +++++++++++++ .../components/config/config.component.less | 22 ++ .../components/config/config.component.ts | 258 ++++++++++++++++++ .../system-config/services/config.service.ts | 12 + .../list/detail/detail.component.ts | 2 +- 7 files changed, 492 insertions(+), 4 deletions(-) create mode 100644 src/app/routes/partner/system-config/components/config/config.component.html create mode 100644 src/app/routes/partner/system-config/components/config/config.component.less create mode 100644 src/app/routes/partner/system-config/components/config/config.component.ts create mode 100644 src/app/routes/partner/system-config/services/config.service.ts diff --git a/src/app/routes/partner/partner-routing.module.ts b/src/app/routes/partner/partner-routing.module.ts index 8c979b66..fd999157 100644 --- a/src/app/routes/partner/partner-routing.module.ts +++ b/src/app/routes/partner/partner-routing.module.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-24 15:07:57 * @LastEditors : Shiming - * @LastEditTime : 2022-03-11 15:22:36 + * @LastEditTime : 2022-04-20 15:42:10 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\partner-routing.module.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -49,6 +49,7 @@ import { BannerComponentsAddComponent } from './knowledge/banner/components/add/ import { PersonalPartnerDetailComponent } from './partner-list/components/personal-partner-detail/personal-partner-detail.component'; import { ParterAdviceFeedbackListComponent } from './advice-feedback/components/list/list.component'; import { ParterAdviceFeedbackDetailComponent } from './advice-feedback/components/feedback-detail/feedback-detail.component'; +import { PartnerSystemConfigComponent } from './system-config/components/config/config.component'; const routes: Routes = [ { @@ -152,6 +153,12 @@ const routes: Routes = [ { path: 'record/detail/:id', component: PartnerRecordedDetailComponent } ] }, + { + path: 'config', + children: [ + { path: '', component: PartnerSystemConfigComponent }, + ] + }, { path: 'knowledge', children: [ diff --git a/src/app/routes/partner/partner.module.ts b/src/app/routes/partner/partner.module.ts index 3255e0c1..300a83f1 100644 --- a/src/app/routes/partner/partner.module.ts +++ b/src/app/routes/partner/partner.module.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-03-09 14:34:55 * @LastEditors : Shiming - * @LastEditTime : 2022-03-11 15:28:01 + * @LastEditTime : 2022-04-20 15:45:20 * @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\partner.module.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -63,6 +63,7 @@ import { ParterAdviceFeedbackListComponent } from './advice-feedback/components/ import { ParterAdviceFeedbackDetailComponent } from './advice-feedback/components/feedback-detail/feedback-detail.component'; import { ParterRebateManageMentAddPartnerListComponent } from './rebate-management/components/rebate-setting/add-partnerlist/add-partnerlist.component'; import { ChannelLogModalComponent } from './partner-list/components/channel-log-modal/channel-log-modal.component'; +import { PartnerSystemConfigComponent } from './system-config/components/config/config.component'; const COMPONENTS: any[] = [ PartnerBusinessStatisticsIndexComponent, @@ -115,7 +116,8 @@ const COMPONENTS: any[] = [ ParterAdviceFeedbackListComponent, ParterAdviceFeedbackDetailComponent, ParterRebateManageMentAddPartnerListComponent, - ChannelLogModalComponent + ChannelLogModalComponent, + PartnerSystemConfigComponent ]; @NgModule({ diff --git a/src/app/routes/partner/system-config/components/config/config.component.html b/src/app/routes/partner/system-config/components/config/config.component.html new file mode 100644 index 00000000..9606bc20 --- /dev/null +++ b/src/app/routes/partner/system-config/components/config/config.component.html @@ -0,0 +1,187 @@ + +
+
+
    +
  • + {{ item.name }} +
  • +
+
+ +
+ +

货主端配置

+

图片配置

+ + + + + +
可输入字符
+ +
+
+

短信配置

+
+
+ +

配置用户端登陆页注册帐号、修改密码、修改手机号时的短信内容

+ +
+
+
+

通知配置

+
+
+ + + + +
+
+

客服电话配置

+
+
+ + + +
+
+
+ + +

司机端配置

+

图片配置

+ + + + + +
可输入字符
+ +
+
+

短信配置

+
+
+ +

配置用户端登陆页注册帐号、修改密码、修改手机号时的短信内容

+ +
+
+
+

通知配置

+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+

客服电话配置

+
+
+ + + +
+
+

证件提醒配置

+
+
+ + 距离到期时间 + + 天开始提醒,每隔 + + 天提醒一次 + +
+
+
+ +
+ + +
+
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+
\ No newline at end of file diff --git a/src/app/routes/partner/system-config/components/config/config.component.less b/src/app/routes/partner/system-config/components/config/config.component.less new file mode 100644 index 00000000..09e68362 --- /dev/null +++ b/src/app/routes/partner/system-config/components/config/config.component.less @@ -0,0 +1,22 @@ +:host { + ::ng-deep { + .card-height { + min-height: 600px; + } + + .save-btn { + width : 100%; + text-align: right; + } + + .block-radio { + display : flex; + min-height : 32px; + } + + input { + width : 100px; + margin-left: 10px; + } + } + } \ No newline at end of file diff --git a/src/app/routes/partner/system-config/components/config/config.component.ts b/src/app/routes/partner/system-config/components/config/config.component.ts new file mode 100644 index 00000000..27a32a88 --- /dev/null +++ b/src/app/routes/partner/system-config/components/config/config.component.ts @@ -0,0 +1,258 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { SFComponent, SFSchema, SFUploadWidgetSchema } from '@delon/form'; +import { Observable, Observer } from 'rxjs'; +import { ConfigService } from '../../services/config.service'; + +@Component({ + selector: 'app-config', + templateUrl: './config.component.html', + styleUrls: ['./config.component.less'] +}) +export class PartnerSystemConfigComponent implements OnInit { + @ViewChild('sf', { static: false }) sf!: SFComponent; + formDate: any = { + isAudit: false, + isEveryDay: false, + isEveryWeek: false + }; + tabs = [ + { + name: '货主端配置' + }, + { + name: '司机端配置' + } + ]; + selectedTab = 0; + + checkOptionsOne = [ + { label: '周一', value: '周一', checked: true }, + { label: '周二', value: '周二' }, + { label: '周三', value: '周三' }, + { label: '周四', value: '周四' }, + { label: '周五', value: '周五' }, + { label: '周六', value: '周六' }, + { label: '周日', value: '周日' } + ]; + + i: any; + schema!: SFSchema; + schema2!: SFSchema; + + imageConfig = { + widget: 'upload', + action: `/scm/cms/cms/upload/multipartFile/fileModel`, + limit: 1, + limitFileCount: 1, + resReName: 'url', + urlReName: 'url', + data: { + appId: this.service.envSrv.getEnvironment().appId + }, + multiple: false, + listType: 'picture-card', + showRequired: true + }; + constructor(private service: ConfigService) {} + + ngOnInit() { + this.initSF(); + } + + changeType(type: number): void { + this.selectedTab = type; + } + + initSF() { + this.schema = { + properties: { + sysMinLogo: { + type: 'string', + title: '系统LOGO(大)', + // enum: [], + ui: { + ...this.imageConfig, + descriptionI18n: '大尺寸logo,支持JPG、PNG格式,文件小于2M(建议尺寸300*170px)。', + change: args => { + if (args.type === 'success') { + const avatar = this.getImageModel(args, 'sysMinLogo'); + this.sf?.setValue('/sysMinLogo', avatar); + this.i.sysMinLogo = avatar; + } + }, + beforeUpload: this.uploadBefore + } as SFUploadWidgetSchema + }, + sysMaxLogo: { + type: 'string', + title: '用户默认头像', + ui: { + ...this.imageConfig, + descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸60*60px)。', + change: args => { + if (args.type === 'success') { + const avatar = this.getImageModel(args, -1); + this.sf?.setValue('/sysMaxLogo', avatar); + this.i.sysMaxLogo = avatar; + } + }, + beforeUpload: this.uploadBefore + } as SFUploadWidgetSchema + }, + sysMaxLogo1: { + type: 'string', + title: '用户默认头像', + ui: { + ...this.imageConfig, + descriptionI18n: '支持JPG、PNG格式,文件小于5M(建议尺寸375*773px)。', + change: args => { + if (args.type === 'success') { + const avatar = this.getImageModel(args, -1); + this.sf?.setValue('/sysMaxLogo1', avatar); + this.i.sysMaxLogo1 = avatar; + } + }, + beforeUpload: this.uploadBefore + } as SFUploadWidgetSchema + }, + }, + required: ['sysMinLogo', 'sysMaxLogo', 'sysMaxLogo1'] + }; + this.schema2 = { + properties: { + sysMinLogo: { + type: 'string', + title: '系统LOGO(小)', + // enum: [], + ui: { + ...this.imageConfig, + descriptionI18n: '小尺寸logo,支持JPG、PNG格式,文件小于2M(建议尺寸32*32px)。', + change: args => { + if (args.type === 'success') { + const avatar = this.getImageModel(args, 'sysMinLogo'); + this.sf?.setValue('/sysMinLogo', avatar); + this.i.sysMinLogo = avatar; + } + }, + beforeUpload: this.uploadBefore + } as SFUploadWidgetSchema + }, + sysMaxLogo: { + type: 'string', + title: '系统LOGO(大)', + ui: { + ...this.imageConfig, + descriptionI18n: '小尺寸logo,支持JPG、PNG格式,文件小于2M(建议尺寸32*32px)。', + change: args => { + if (args.type === 'success') { + const avatar = this.getImageModel(args, -1); + this.sf?.setValue('/sysMaxLogo', avatar); + this.i.sysMaxLogo = avatar; + } + }, + beforeUpload: this.uploadBefore + } as SFUploadWidgetSchema + }, + sysMaxLogo1: { + type: 'string', + title: '用户默认头像', + ui: { + ...this.imageConfig, + descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸60*60px)。', + change: args => { + if (args.type === 'success') { + const avatar = this.getImageModel(args, -1); + this.sf?.setValue('/sysMaxLogo1', avatar); + this.i.sysMaxLogo1 = avatar; + } + }, + beforeUpload: this.uploadBefore + } as SFUploadWidgetSchema + }, + sysMaxLogo2: { + type: 'string', + title: '企业默认头像', + ui: { + ...this.imageConfig, + descriptionI18n: '支持JPG、PNG格式,文件小于2M(建议尺寸60*60px)。', + change: args => { + if (args.type === 'success') { + const avatar = this.getImageModel(args, -1); + this.sf?.setValue('/sysMaxLogo2', avatar); + this.i.sysMaxLogo2 = avatar; + } + }, + beforeUpload: this.uploadBefore + } as SFUploadWidgetSchema + }, + sysMaxLogo3: { + type: 'string', + title: '货主PC端登陆页海报', + ui: { + ...this.imageConfig, + descriptionI18n: '支持JPG、PNG格式,文件小于5M(建议尺寸1920*630px)。', + change: args => { + if (args.type === 'success') { + const avatar = this.getImageModel(args, -1); + this.sf?.setValue('/sysMaxLogo3', avatar); + this.i.sysMaxLogo3 = avatar; + } + }, + beforeUpload: this.uploadBefore + } as SFUploadWidgetSchema + }, + sysMaxLogo4: { + type: 'string', + title: 'APP开屏海报', + ui: { + ...this.imageConfig, + descriptionI18n: '支持JPG、PNG格式,文件小于5M(建议尺寸375*773px)。', + change: args => { + if (args.type === 'success') { + const avatar = this.getImageModel(args, -1); + this.sf?.setValue('/sysMaxLogo4', avatar); + this.i.sysMaxLogo4 = avatar; + } + }, + beforeUpload: this.uploadBefore + } as SFUploadWidgetSchema + }, + }, + required: ['sysMinLogo', 'sysMaxLogo', 'sysMaxLogo1', 'sysMaxLogo2', 'sysMaxLogo3', 'sysMaxLogo4'] + }; + } + + private uploadBefore = (file: any, fileList: any) => { + return new Observable((observer: Observer) => { + const isLt1M = file.size / 1024 / 1024 < 2; + const fileType = 'image/png,image/jpeg'; + if (fileType.indexOf(file.type) === -1) { + this.service.msgSrv.warning('图片格式不正确!'); + observer.complete(); + return; + } + if (!isLt1M) { + // this.service.msgSrv.warning('图片需小于1M'); + this.service.msgSrv.warning('图片大小超过2M!'); + observer.complete(); + return; + } + observer.next(isLt1M); + observer.complete(); + }); + }; + + private getImageModel(args: any, key: any) { + return [ + { + uid: key, + name: 'LOGO', + status: 'done', + url: args.fileList[0].response.url, + response: { + url: args.fileList[0].response.url + } + } + ]; + } +} diff --git a/src/app/routes/partner/system-config/services/config.service.ts b/src/app/routes/partner/system-config/services/config.service.ts new file mode 100644 index 00000000..0b79dfd0 --- /dev/null +++ b/src/app/routes/partner/system-config/services/config.service.ts @@ -0,0 +1,12 @@ +import { Injectable, Injector } from '@angular/core'; +import { BaseService } from '@shared'; + +@Injectable({ + providedIn: 'root', +}) +export class ConfigService extends BaseService { + + constructor(public injector: Injector) { + super(injector); + } +} diff --git a/src/app/routes/vehicle/components/list/detail/detail.component.ts b/src/app/routes/vehicle/components/list/detail/detail.component.ts index a07c9e7d..6cdb9990 100644 --- a/src/app/routes/vehicle/components/list/detail/detail.component.ts +++ b/src/app/routes/vehicle/components/list/detail/detail.component.ts @@ -107,7 +107,7 @@ export class VehicleComponentsListDetailComponent implements OnInit { { text: '上传协议', click: _record => this.updateEvaluate(_record), - iif: item => item.auditStatusEnum == -1 + // iif: item => item.auditStatusEnum == -1 } ] } From d3362c9023155676531cedd41678d061f8a67038 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 20 Apr 2022 15:50:50 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=BF=94=E4=BD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/routes/vehicle/components/list/edit/edit.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/routes/vehicle/components/list/edit/edit.component.ts b/src/app/routes/vehicle/components/list/edit/edit.component.ts index ef6b14f3..0de6585d 100644 --- a/src/app/routes/vehicle/components/list/edit/edit.component.ts +++ b/src/app/routes/vehicle/components/list/edit/edit.component.ts @@ -100,7 +100,7 @@ export class VehicleComponentsListEditComponent implements OnInit { }; this.ui = { '*': { - spanLabelFixed: 120, + spanLabelFixed: 200, grid: { span: 24 }, }, };