Browse Source

[完善]完善拖动样式

tangshan
邵佳豪 4 years ago
parent
commit
a0c599f3f6
  1. 3
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.html
  2. 1
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss
  3. 14
      src/app/plan-management/create-plan-online-five/create-plan-online-five.component.ts

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

@ -2,7 +2,8 @@
<div class="titlebox" *ngIf="pattern == 'edit'">
<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">
[ngClass]="{'selectedItem': selectedItem == item.groupName}" [title]="item.groupName"
[cdkDragDisabled]="item.groupName == '封面'">
{{key + 1}}.{{item.groupName}}
</div>
</div>

1
src/app/plan-management/create-plan-online-five/create-plan-online-five.component.scss

@ -39,6 +39,7 @@
overflow: hidden; /*超出部分隐藏*/
white-space: nowrap; /*不换行*/
text-overflow: ellipsis; /*超出部分文字以...显示*/
user-select: none;
}
.item:hover {
background: #e8f4fe;

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

@ -65,9 +65,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
this.pattern='edit'
}
this.getUnitData()
//this.getpili()
this.getOrganizations();
//this.getAllBuildings()
this.getOrganizations()
}
zdysearch=''
organizationName: any //当前单位组织机构名称
@ -168,6 +166,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
pilinData=[]
async getpili(){
let result = await new Promise((resolve) =>{
console.log(1111,this.planTemplateData)
this.planTemplateData[1].building.forEach(element => {
let id = {buildingId:element.buildingId}
this.http.get('/api/BuildingAdjoins',{params:id}).subscribe(data=>{
@ -348,13 +347,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
}
});
/* this.planTemplateData[1].building[0].body[0].attinf[0].value=this.planTemplateData[1].attribute[0].attinf[0].olddata = this.unitData.usci
this.planTemplateData[1].attribute[0].attinf[1].value=this.planTemplateData[1].attribute[0].attinf[1].olddata = this.unitData.buildingTypes[0].name
this.planTemplateData[1].attribute[0].attinf[2].value=this.planTemplateData[1].attribute[0].attinf[2].olddata = this.unitData.contacts
this.planTemplateData[1].attribute[0].attinf[3].value=this.planTemplateData[1].attribute[0].attinf[3].olddata = this.unitData.phone
this.planTemplateData[1].attribute[0].attinf[4].value=this.planTemplateData[1].attribute[0].attinf[4].olddata = this.unitData.organizationName
this.planTemplateData[1].attribute[0].attinf[5].value=this.planTemplateData[1].attribute[0].attinf[5].olddata = this.unitData.address */
console.log(this.planTemplateData)
} /* else if (this.selectedItem == '单位概况') {
@ -366,6 +359,7 @@ export class CreatePlanOnlineFiveComponent implements OnInit {
drop(event: CdkDragDrop<string[]>) {
moveItemInArray(this.planTemplateData, event.previousIndex, event.currentIndex);
console.log('拖拽标题',this.planTemplateData)
}
//获取建筑信息

Loading…
Cancel
Save