+
@@ -28,7 +28,7 @@
\ No newline at end of file
diff --git a/src/app/ui/know-route/know-route.component.ts b/src/app/ui/know-route/know-route.component.ts
index cfd8ada..53ca27e 100644
--- a/src/app/ui/know-route/know-route.component.ts
+++ b/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-06 16:36:48
+ * @LastEditTime: 2020-11-07 12:38:14
*/
import { Component, OnInit } from '@angular/core';
import { HttpClient,HttpHeaders, HttpEventType } from '@angular/common/http';
@@ -21,6 +21,7 @@ export class KnowRouteComponent implements OnInit {
constructor(public snackBar: MatSnackBar,private http: HttpClient) { }
ngOnInit(): void {
+ // this.uploadSucced = JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx")) || []
}
unitinfo:any={
id: '',
@@ -51,13 +52,14 @@ export class KnowRouteComponent implements OnInit {
//控制底部div显隐
showorfalse="www"
//判断选中路线的值
- chooseid=-1
+ chooseid:any
//熟悉路线对象
knowRoute=[{name:``,idnum:""}]
//熟悉部位对象
knowBw=[{name:"消控室"},{name:"水泵房"},{name:"疏散楼梯"},{name:"各楼层"},{name:"楼层消火栓"},{name:"水泵结合器"},{name:"室外消防水源"}]
-
- imgsrc = "../../../assets/images/upload.jpg" //没有上传图片时显示的图片,当上传后就会被替换,即保存时需要传的图片地址参数
+ textareazhi:""
+ //没有上传图片时显示的图片,当上传后就会被替换,即保存时需要传的图片地址参数
+ imgsrc = "../../../assets/images/upload.jpg"
imgUrl = ""//返回来的图片地址后缀
file: any; //上传的文件
objectName: any; //上传对象名
@@ -102,6 +104,12 @@ export class KnowRouteComponent implements OnInit {
this.isspinner = false
this.imgUrl = data.objectName
this.imgsrc = `/api/Objects/PlanPlatform/${this.imgUrl}?x-oss-process=image/resize,m_fill,h_170,w_299`
+ console.log(this.imgsrc)
+ //localStorage.setItem(this.clickName,this.imgsrc)
+ //this.uploadSucced.push({name:this.clickName,src:this.imgsrc,smark})
+ this.uploadSucced[this.chooseid].src=this.imgsrc
+ //this.uploadSucced[this.chooseid].smark=this.textareazhi
+ console.log(this.uploadSucced)
const config = new MatSnackBarConfig();
config.verticalPosition = 'top';
config.duration = 3000
@@ -159,17 +167,57 @@ export class KnowRouteComponent implements OnInit {
})
}
//熟悉部位点击事件
- addRoute(event){
+ addRoute(event,item){
//console.log(event.target.innerHTML)
//this.knowRoute+=event.target.innerHTML+"🠖"
this.showorfalse="show"
this.knowRoute.push({name:event.target.innerHTML,idnum:"🠖"})
+ this.uploadSucced.push({name:item.name,src:"",smark:""})
+ // console.log(this.chooseid)
+ console.log(this.uploadSucced)
}
+ clickName
+ savekey
+ uploadSucced:any = JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx")) || []//上传成功暂存对象
//熟悉路线点击事件
- knowroutwClick(event,key){
- console.log(event)
+ knowroutwClick(event,key,item){
+ console.log(123,key)
+ //console.log(this.chooseid)
+ this.showorfalse="show"
+ this.uploadSucced[key].smark = this.textareazhi
this.chooseid=key
//event.target.style.border="1px solid #000000"
+ this.clickName=item.name+key+sessionStorage.getItem("companyId")
+ console.log(this.uploadSucced)
+ 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
+ //console.log(JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx"))[key])
+ }else if(this.uploadSucced[key].src!=""){
+ //this.imgsrc=this.uploadSucced[0].src
+ /* for(var i=0;i
@@ -21,7 +21,7 @@
-
熟悉路线
+
@@ -54,7 +54,7 @@
-
发现问题
+