Browse Source

[完善]完善查看模式

master
邵佳豪 4 years ago
parent
commit
5d43adee5c
  1. 20
      src/app/key-unit/key-site/key-site.component.scss
  2. 6
      src/app/ui/know-route/know-route.component.html
  3. 4
      src/app/ui/know-route/know-route.component.scss
  4. 17
      src/app/ui/know-route/know-route.component.ts
  5. 6
      src/app/ui/photoofthescene/photoofthescene.component.html

20
src/app/key-unit/key-site/key-site.component.scss

@ -51,13 +51,13 @@ table {
max-width: 100%; max-width: 100%;
max-height: 100%;} max-height: 100%;}
} }
.previewImgBottom { .previewImgBottom {
text-align: center; text-align: center;
height: 30px; height: 30px;
margin: 20px auto; margin: 20px auto;
} }
.imgdialog{ .imgdialog{
width: 6.835938rem; width: 6.835938rem;
height: 5.859375rem; height: 5.859375rem;
overflow-y: auto; overflow-y: auto;
} }

6
src/app/ui/know-route/know-route.component.html

@ -10,7 +10,7 @@
<div class="addbw"> <div class="addbw">
<span style="margin-left: 8%;">添加熟悉部位:</span> <span style="margin-left: 8%;">添加熟悉部位:</span>
<button *ngFor="let item of knowBw; let key=index" (click)="addRoute($event,item)">{{item.name}}</button> <button *ngFor="let item of knowBw; let key=index" (click)="addRoute($event,item)">{{item.name}}</button>
<button class="button" (click)="savaClick()">保存</button> <button class="button" (click)="savaClick()" *ngIf="pattern == 'edit'">保存</button>
</div> </div>
<div class="addRoute"> <div class="addRoute">
<span style="margin-left: 8%;">添加路线:</span> <span style="margin-left: 8%;">添加路线:</span>
@ -22,14 +22,14 @@
<div class="uploadingimg" id="viewerjs"> <div class="uploadingimg" id="viewerjs">
<img [src]="imgsrc" [attr.data-original]="imgsrc.split('?')[0]" alt=""> <img [src]="imgsrc" [attr.data-original]="imgsrc.split('?')[0]" alt="">
</div> </div>
<div class="image" *ngIf="inputShow"> <div class="image" *ngIf="inputShow && pattern == 'edit'">
<input id="selectedfile" (change)="filechange($event)" type="file" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp"> <input id="selectedfile" (change)="filechange($event)" type="file" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp">
</div> </div>
</div> </div>
<div class="remarks"> <div class="remarks">
<div style="font-size: 16px;">备注:</div> <div style="font-size: 16px;">备注:</div>
<textarea name="" id="" cols="50" rows="10" [(ngModel)]="uploadSucced[chooseid].smark"></textarea> <textarea [disabled]="pattern == 'look'" name="" id="" cols="50" rows="10" [(ngModel)]="uploadSucced[chooseid].smark"></textarea>
</div> </div>
</div> </div>
</div> </div>

4
src/app/ui/know-route/know-route.component.scss

@ -71,7 +71,7 @@
height: 75%; height: 75%;
top: 0.058594rem; top: 0.058594rem;
position: absolute; position: absolute;
left: 8%; left: 10%;
border-radius:3px; border-radius:3px;
img{ img{
width: 100%; width: 100%;
@ -81,7 +81,7 @@
.image{ .image{
width: 70%; width: 70%;
height: 75%; height: 75%;
left: 8%; left: 10%;
top: 0.058594rem; top: 0.058594rem;
position: absolute; position: absolute;
border-radius:3px; border-radius:3px;

17
src/app/ui/know-route/know-route.component.ts

@ -20,8 +20,10 @@ export class KnowRouteComponent implements OnInit {
constructor(public snackBar: MatSnackBar,private http: HttpClient) { } constructor(public snackBar: MatSnackBar,private http: HttpClient) { }
ngOnInit(): void {
pattern:any = localStorage.getItem("pattern")//模式
ngOnInit(): void {
} }
@ -101,8 +103,17 @@ export class KnowRouteComponent implements OnInit {
//熟悉部位点击事件 //熟悉部位点击事件
addRoute(event,item){ addRoute(event,item){
this.knowRoute.push({name:event.target.innerHTML,idnum:"🠖"}) if(this.pattern == 'edit'){
this.uploadSucced.push({name:item.name,src:"",smark:""})
this.knowRoute.push({name:event.target.innerHTML,idnum:"🠖"})
this.uploadSucced.push({name:item.name,src:"",smark:""})
}else{
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
this.snackBar.open('处于查看模式','确定',config);
}
} }
savekey savekey

6
src/app/ui/photoofthescene/photoofthescene.component.html

@ -24,7 +24,7 @@
</div> </div>
</td> </td>
<td> <td>
<div class="noImg" *ngIf="!lingdaoImg"> <div class="noImg" *ngIf="!lingdaoImg" (click)="dialog()">
<div> <div>
<img src="../../../assets/images/camera.png" alt=""> <img src="../../../assets/images/camera.png" alt="">
</div> </div>
@ -48,7 +48,7 @@
</tr> </tr>
<tr> <tr>
<td> <td>
<div class="noImg" *ngIf="!peopleImg"> <div class="noImg" *ngIf="!peopleImg" (click)="dialog()">
<div> <div>
<img src="../../../assets/images/camera.png" alt=""> <img src="../../../assets/images/camera.png" alt="">
</div> </div>
@ -70,7 +70,7 @@
</div> </div>
</td> </td>
<td> <td>
<div class="noImg" *ngIf="!keysiteImg"> <div class="noImg" *ngIf="!keysiteImg" (click)="dialog()">
<div> <div>
<img src="../../../assets/images/camera.png" alt=""> <img src="../../../assets/images/camera.png" alt="">
</div> </div>

Loading…
Cancel
Save