From 2d7a4476659834fd7d4590dbed3c11f3e5cb4364 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 28 Apr 2022 14:33:40 +0800 Subject: [PATCH] fix bug --- proxy.conf.js | 4 +- .../components/config/config.component.ts | 68 +++++++++++++------ 2 files changed, 51 insertions(+), 21 deletions(-) diff --git a/proxy.conf.js b/proxy.conf.js index d12c4111..4690cd30 100644 --- a/proxy.conf.js +++ b/proxy.conf.js @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-18 09:51:21 * @LastEditors : Shiming - * @LastEditTime : 2022-04-28 13:43:18 + * @LastEditTime : 2022-04-28 14:09:56 * @FilePath : \\tms-obc-web\\proxy.conf.js * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -30,7 +30,7 @@ module.exports = { // }, '//api': { target: { - host: 'tms-api-test.eascs.com', + host: 'tms-api-dev.eascs.com', protocol: 'https:', port: 443 }, diff --git a/src/app/routes/sys-setting/components/config/config.component.ts b/src/app/routes/sys-setting/components/config/config.component.ts index 90340eca..4cb4e19f 100644 --- a/src/app/routes/sys-setting/components/config/config.component.ts +++ b/src/app/routes/sys-setting/components/config/config.component.ts @@ -45,9 +45,9 @@ export class PartnerSystemConfigComponent implements OnInit, OnChanges { auditTime!: any; // 审核时间 silenceClient!: number; // 沉默客户 loseClient!: number; // 流失客户 - everyDay: boolean = false; + everyDay: any; auditTimeStatus: boolean = false; - MonthDay: boolean = false; + MonthDay: any; time: Date | null = null; defaultOpenValue = new Date(0, 0, 0, 0, 0, 0); tabs = [ @@ -123,13 +123,16 @@ export class PartnerSystemConfigComponent implements OnInit, OnChanges { this.everyDayData= changes.configList.currentValue[0]?.remark.everyDayData // 流失客户 this.MonthDayData= changes.configList.currentValue[0]?.remark.MonthDayData // 流失客户 if (this.auditTime == '2') { - this.auditTimeStatus = true; // 每天 + this.auditTimeStatus = true; if(this.everyDayData){ this.everyDayData = this.everyDayData - } else if(this.MonthDay) { + this.everyDay = 1 + } else if(this.MonthDayData) { // 每周 + this.MonthDay = 2 this.MonthDayData = this.MonthDayData + this.TimeStatus =false } } else { this.auditTimeStatus = false; @@ -162,23 +165,47 @@ export class PartnerSystemConfigComponent implements OnInit, OnChanges { }); } addMonth() { - this.MonthDayData.push({ - month: [ - { label: '周一', value: '周一' }, - { label: '周二', value: '周二' }, - { label: '周三', value: '周三' }, - { label: '周四', value: '周四' }, - { label: '周五', value: '周五' }, - { label: '周六', value: '周六' }, - { label: '周日', value: '周日' } - ], - Times: [ + console.log(this.MonthDayData); + if(this.MonthDayData) { + this.MonthDayData.push({ + month: [ + { label: '周一', value: '周一' }, + { label: '周二', value: '周二' }, + { label: '周三', value: '周三' }, + { label: '周四', value: '周四' }, + { label: '周五', value: '周五' }, + { label: '周六', value: '周六' }, + { label: '周日', value: '周日' } + ], + Times: [ + { + startTime: '', + endTime: '' + } + ] + }); + } else { + this.MonthDayData = [ { - startTime: '', - endTime: '' + month: [ + { label: '周一', value: '周一' }, + { label: '周二', value: '周二' }, + { label: '周三', value: '周三' }, + { label: '周四', value: '周四' }, + { label: '周五', value: '周五' }, + { label: '周六', value: '周六' }, + { label: '周日', value: '周日' } + ], + Times: [ + { + startTime: [], + endTime: [] + } + ] } - ] - }); + ]; + } + } delMonth(value: number, index: number) { this.MonthDayData[value].Times.splice(index, 1); @@ -356,6 +383,9 @@ export class PartnerSystemConfigComponent implements OnInit, OnChanges { }; if(this.auditTime == '2') { // 每天 + console.log(this.everyDay); + console.log(this.MonthDay); + if(this.everyDay){ params.everyDayData = this.everyDayData } else if(this.MonthDay) {