) => {
+ const isLt4M = file.size / 1024 / 1024 < 2;
+ if (!isLt4M) {
+ this.service.msgSrv.warning('图片大小超过2M!');
+ observer.complete();
+ return;
+ }
+ observer.next(isLt4M);
+ observer.complete();
+ });
+ },
+ previewFile: (file: NzUploadFile) => of(file.url),
+ },
+ },
+ linkType: {
+ type: 'string',
+ title: '可见范围',
+ ui: {
+ widget: 'radio',
+ showRequired: true,
+ } as SFRadioWidgetSchema,
+ enum: [
+ { label: '全部可见', value: 1 },
+ { label: '合伙人可见', value: 2 },
+ { label: '销售渠道可见', value: 3 },
+ ],
+ },
+ sortId: {
+ type: 'string',
+ title: '顺序',
+ ui: {
+ showRequired: true,
+ widget: '=',
+ placeholder: '请输入0~99,数字越大,排序越靠前',
+ serverSearch: true,
+ } as SFSelectWidgetSchema,
+ },
+ content: {
+ type: 'string',
+ title: '内容',
+ ui: {
+ widget: 'tinymce',
+ loadingTip: 'loading...',
+ config: {
+ height: 450
+ },
+ visibleIf: { name5: (value: string) => value === '1' }
+ },
+ },
+ },
+ required: [],
+ };
+ if (this.queryParams.type === 'add') {
+ setTimeout(() => {
+ this.sf.setValue('/takeEffectType', 1);
+ this.sf.setValue('/style', 1);
+ }, 500);
+ }
+ }
+ get reqParams() {
+ return {};
+ }
+ disabledDate = (current: Date): boolean => {
+ // Can not select days before today and today
+ return differenceInCalendarDays(current, this.today) < 0;
+ }
+ changeTime() {
+ this.changeTimeFlag = true;
+ }
+
+
+ checkSort() {
+ const params: any = {
+ navigationId: this.sf?.value.navigationId,
+ sortId: this.sf?.value.sortId,
+ takeEffectType: this.sf?.value.takeEffectType,
+ };
+ if (this.queryParams.id !== '0') {
+ params.advertisementId = this.queryParams.id;
+ }
+ if (this.sf.value.takeEffectType === 2) {
+ if (this.changeTimeFlag) {
+ params.takeEffectTime = format(this.detailData.takeEffectTime, 'yyyy-MM-dd HH:mm');
+ } else {
+ params.takeEffectTime = this.detailData.takeEffectTime;
+ }
+ }
+
+ }
+ save() {
+ const params: any = {
+ ...this.sf?.value,
+ latitude: this.inputPoint.lat,
+ longitude: this.inputPoint.lng,
+ id: this.queryParams.id
+ };
+ this.detailData.advertisementContentDTOList.forEach((item: any) => {
+ delete item.addId;
+ });
+ if (this.queryParams.type === 'add') {
+ delete params.id;
+ }
+ if (this.sf.value.takeEffectType === 2) {
+ if (this.changeTimeFlag) {
+ params.takeEffectTime = format(this.detailData.takeEffectTime, 'yyyy-MM-dd HH:mm');
+ } else {
+ params.takeEffectTime = this.detailData.takeEffectTime;
+ }
+ } else {
+ delete params.takeEffectTime;
+ }
+ this.service.request(this.service.$api_add_one, params).subscribe(res => {
+ if (res) {
+ this.service.msgSrv.success('保存成功');
+ this.router.navigate(['../list'], { relativeTo: this.route });
+ }
+ });
+ }
+
+ goBack() {
+ window.history.go(-1);
+ }
+ gotoMap() {
+ this.isVisible = true;
+ }
+
+ handleOk(): void {
+ this.isVisible = false;
+ }
+
+ handleCancel(): void {
+ this.isVisible = false;
+ }
+ outputPointAddress(data: any) {
+ this.sf.setValue('/companyAddress', data.address);
+ this.inputPoint = data.inputPoint;
+ }
+}
diff --git a/src/app/routes/partner/scrollimg/components/add/add.less b/src/app/routes/partner/scrollimg/components/add/add.less
new file mode 100644
index 00000000..0a6adacb
--- /dev/null
+++ b/src/app/routes/partner/scrollimg/components/add/add.less
@@ -0,0 +1,119 @@
+:host {
+ .styleBox {
+ display: flex;
+ align-items: flex-end;
+ margin: 10px 0 0 0;
+ }
+ .imgBox {
+ position: relative;
+ width: 200px;
+ padding: 6px 0;
+ text-align: center;
+ border: solid 1px #eee;
+ .leftBox,
+ .rightBox {
+ position: absolute;
+ top: 50%;
+ transform: translate(0, -50%);
+ }
+ img {
+ width: 170px;
+ height: 40px;
+ }
+ .leftBox {
+ left: 3px;
+ }
+ .rightBox {
+ right: 3px;
+ }
+ }
+ .imgBox_two {
+ width: 200px;
+ padding: 6px;
+ text-align: center;
+ border: solid 1px #eee;
+ img {
+ width: 100%;
+ height: 40px;
+ }
+ }
+ .imgBox_three {
+ width: 200px;
+ padding: 6px 0;
+ text-align: center;
+ border: solid 1px #eee;
+ img {
+ width: 25%;
+ height: 40px;
+ margin: 0 6% 0 0;
+ &:first-child {
+ margin: 0 6%;
+ }
+ }
+ }
+ .imgBox_four {
+ width: 200px;
+ padding: 6px 0;
+ text-align: center;
+ border: solid 1px #eee;
+ img {
+ width: 22%;
+ height: 40px;
+ margin: 0 2% 0 0;
+ &:first-child {
+ margin: 0 2%;
+ }
+ }
+ }
+ .imgBox_one {
+ width: 60px;
+ padding: 6px;
+ text-align: center;
+ border: solid 1px #eee;
+ img {
+ width: 100%;
+ height: 40px;
+ }
+ }
+ .imgBox_info {
+ width: 200px;
+ padding: 6px;
+ overflow: hidden;
+ border: solid 1px #eee;
+ .title {
+ width: 100%;
+ line-height: 30px;
+ text-align: center;
+ }
+ .infoBox {
+ .name {
+ line-height: 28px;
+ }
+ .map {
+ width: 100%;
+ text-align: center;
+ img {
+ width: 90%;
+ }
+ }
+ }
+ }
+ .hint {
+ margin: 0 0 0 10px;
+ color: #f00;
+ }
+ .addBtn {
+ margin: 0 0 10px 0;
+ }
+ }
+ .overflowText {
+ display: -webkit-box;
+ max-width: 200px;
+ overflow: hidden;
+ text-align: left;
+ text-overflow: -o-ellipsis-lastline;
+ text-overflow: ellipsis;
+ -webkit-line-clamp: 1;
+ line-clamp: 1;
+ -webkit-box-orient: vertical;
+ }
\ No newline at end of file
diff --git a/src/app/routes/partner/ad/components/list/list.component.html b/src/app/routes/partner/scrollimg/components/list/list.component.html
similarity index 94%
rename from src/app/routes/partner/ad/components/list/list.component.html
rename to src/app/routes/partner/scrollimg/components/list/list.component.html
index caedd311..216788b4 100644
--- a/src/app/routes/partner/ad/components/list/list.component.html
+++ b/src/app/routes/partner/scrollimg/components/list/list.component.html
@@ -5,7 +5,7 @@
-
+