Browse Source

[修改]熟悉路线input框显隐

master
chenjingyu 4 years ago
parent
commit
1f69310417
  1. 4
      src/app/ui/know-route/know-route.component.html
  2. 17
      src/app/ui/know-route/know-route.component.scss
  3. 7
      src/app/ui/know-route/know-route.component.ts

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

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-11-05 15:27:58
* @LastEditors: sueRimn
* @LastEditTime: 2020-11-07 12:25:26
* @LastEditTime: 2020-11-07 13:08:20
-->
<div class="box">
<div class="addbw">
@ -24,7 +24,7 @@
</div>
</div>
<div class="image" >
<input id="selectedfile" (change)="filechange($event)" type="file" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp">
<input *ngIf="inputShow" id="selectedfile" (change)="filechange($event)" type="file" name="imgFile" accept=".jpg,.png,.jpeg,.gif,.webp">
</div>
<div class="remarks">
<span>备注:</span><br>

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

@ -5,7 +5,7 @@
.addbw{
height: 0.488281rem;
width: 100%;
margin: 0.488281rem 0.097656rem;
margin: 0.488281rem 0.78125rem;
button{
margin-left: 0.097656rem;
}
@ -26,7 +26,7 @@
.addRoute{
width: 100%;
height: 1.464844rem;
margin: 0.488281rem 0.097656rem;
margin: 0.488281rem 0.78125rem;
position:relative;
white-space: nowrap;
input{
@ -59,7 +59,7 @@
.bottomAll{
width: 100%;
height: 100%;
margin-top: 0.976563rem;
//margin-top: 0.976563rem;
display: flex;
.upload{
width: 50%;
@ -70,13 +70,14 @@
// background: url('../../../assets/images/upload2.png') no-repeat center center;
position: absolute;
left: 0.097656rem;
bottom: 0.048828rem;
left: 0.488281rem;
//top: 0.097656rem;
bottom: 80px;
//border: 1px dashed gray;
border-radius:3px;
img{
margin-left: 0.195313rem;
margin-top: 0.048828rem;
margin-top: 0.097656rem;
}
}
}
@ -90,8 +91,8 @@
width: 2.929688rem;
height: 1.708984rem;
position: absolute;
left: 0.097656rem;
bottom: 0.048828rem;
left: 0.683594rem;
bottom: 0.78125rem;
opacity: 0;
margin-top: 0.048828rem;
cursor: pointer;

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

@ -4,7 +4,7 @@
* @Author: sueRimn
* @Date: 2020-11-05 15:27:58
* @LastEditors: sueRimn
* @LastEditTime: 2020-11-07 12:38:14
* @LastEditTime: 2020-11-07 13:08:13
*/
import { Component, OnInit } from '@angular/core';
import { HttpClient,HttpHeaders, HttpEventType } from '@angular/common/http';
@ -49,6 +49,8 @@ export class KnowRouteComponent implements OnInit {
autoUpload: false,
removeAfterUpload:true //上传之后是否在队列中移除,如果不移除就会出现无法上传第二次的情况
});
//input框显隐
inputShow=true
//控制底部div显隐
showorfalse="www"
//判断选中路线的值
@ -192,6 +194,7 @@ export class KnowRouteComponent implements OnInit {
if( JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx")) && JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))[key].src!=""){
this.imgsrc=JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))[key].src
this.textareazhi=JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))[key].smark
this.inputShow=false
//console.log(JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))[key])
}else if(this.uploadSucced[key].src!=""){
//this.imgsrc=this.uploadSucced[0].src
@ -202,10 +205,12 @@ export class KnowRouteComponent implements OnInit {
}else{this.imgsrc="../../../assets/images/upload.jpg"}
} */
this.imgsrc=this.uploadSucced[key].src
this.inputShow=false
}
else{
this.imgsrc="../../../assets/images/upload.jpg"
this.textareazhi=""
this.inputShow=true
}
}
//保存点击事件

Loading…
Cancel
Save