chenjingyu 4 years ago
parent
commit
9156c983d1
  1. 11
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html
  2. 5
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts
  3. 2
      src/app/ui/collection-tools-building/collection-tools.component.html
  4. 12
      src/app/ui/role/role.component.ts

11
src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html

@ -1,7 +1,7 @@
<div class="bigbox">
<div class="titlebox" *ngIf="pattern == 'edit'">
<div class="titleitembox">
<div class="item" *ngFor="let item of planTemplateData;let key = index" (click)="clickTitleItem(item)"
<div class="titleitembox" cdkDropList cdkDropListOrientation="horizontal" (cdkDropListDropped)="drop($event)">
<div cdkDrag class="item" *ngFor="let item of planTemplateData;let key = index" (click)="clickTitleItem(item)"
[ngClass]="{'selectedItem': selectedItem == item.groupName}" [title]="item.groupName">
{{key + 1}}.{{item.groupName}}
</div>
@ -19,6 +19,7 @@
<mat-icon>visibility</mat-icon> 退出预览
</button>
<div class="contentbox" [ngClass]="{'noPadding': pattern == 'look'}">
<div class="leftbox"
*ngIf="pattern == 'edit' && (selectedItem == '重点图示' || selectedItem == '交通水源' || selectedItem == '预案附件' || selectedItem == '单位概况')">
<div *ngIf="selectedItem == '重点图示'" class="leftKeyImg">
@ -181,7 +182,8 @@
</div>
</div>
</div>
<div class="leftnew" *ngIf="pattern == 'edit' && ( selectedItem == '组织指挥'|| selectedItem == '社会联动'|| selectedItem == '勤务保障'|| selectedItem == '辅助决策')">
<div class="leftnew" *ngIf="pattern == 'edit' && ( selectedItem == '组织指挥' || selectedItem == '社会联动' || selectedItem == '勤务保障'|| selectedItem == '辅助决策')">
<div class="newHead">
<span>模板列表</span>
</div>
@ -1056,8 +1058,7 @@
</div>
</div>
</div>
<div class="toolDiv" *ngIf="pattern == 'look'">
<button title="下载文档" mat-mini-fab color="primary" (click)="generatingDoc()">
<mat-icon>vertical_align_bottom</mat-icon>

5
src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts

@ -19,6 +19,7 @@ import { PageEvent } from '@angular/material/paginator';
import { TreeService } from '../../http-interceptors/tree.service'
import Viewer from 'viewerjs';
import { async } from 'rxjs/internal/scheduler/async';
import {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';
declare var $: any
@Component({
selector: 'app-create-plan-online-five',
@ -363,6 +364,10 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
}
}
drop(event: CdkDragDrop<string[]>) {
moveItemInArray(this.planTemplateData, event.previousIndex, event.currentIndex);
}
//获取建筑信息
buildingsData=[]
buildDataName

2
src/app/ui/collection-tools-building/collection-tools.component.html

@ -26,7 +26,7 @@
复制<mat-icon>library_books</mat-icon>
</button>
<button (click)="pasteAsset()" class="copytobutn marginLeftRight" mat-button title="粘贴" *ngIf="isEditPattern">
粘贴
粘贴<mat-icon>screen_share</mat-icon>
</button>
<span title="适应缩放" class="zoom" (click)="adaptZoom()">

12
src/app/ui/role/role.component.ts

@ -4,7 +4,6 @@ import {FormControl} from '@angular/forms';
import { HttpClient } from '@angular/common/http';
import { CacheTokenService } from '../../http-interceptors/cache-token.service'
import format from 'date-fns/format';
import {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop';
import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree';
import {FlatTreeControl} from '@angular/cdk/tree';
import { TreeService } from '../../http-interceptors/tree.service'
@ -169,17 +168,6 @@ export class RoleComponent implements OnInit {
)
}
drop(event: CdkDragDrop<string[]>) {//拖拽函数
moveItemInArray(this.dataSource, event.previousIndex, event.currentIndex);
this.dataSource.forEach((item, index) => {
item.order = index;
})
const a = [...this.dataSource];
this.dataSource = [];
setTimeout(() => {
this.dataSource = a;
}, 10);
};
}

Loading…
Cancel
Save