diff --git a/src/app/ui/know-route/know-route.component.ts b/src/app/ui/know-route/know-route.component.ts
index f56f664..c23ee8a 100644
--- a/src/app/ui/know-route/know-route.component.ts
+++ b/src/app/ui/know-route/know-route.component.ts
@@ -10,7 +10,7 @@ import { Component, OnInit } from '@angular/core';
import { HttpClient,HttpHeaders, HttpEventType } from '@angular/common/http';
import { MatSnackBar ,MatSnackBarConfig} from '@angular/material/snack-bar';
import { FileUploader, FileItem } from 'ng2-file-upload'
-
+import Viewer from 'viewerjs';
@Component({
selector: 'app-know-route',
templateUrl: './know-route.component.html',
@@ -23,32 +23,9 @@ export class KnowRouteComponent implements OnInit {
ngOnInit(): void {
// this.uploadSucced = JSON.parse(localStorage.getItem(sessionStorage.getItem("companyId")+"xxx")) || []
}
- unitinfo:any={
- id: '',
- name: '', //单位信息名字
- usci: '', //单位信用代码
- contacts: '', //联系人
- phone: '', //联系电话
- address: '', //单位地址
- imageUrl: '', //图片地址
- location: '', //单位地理位置
- modifiedTime: '', //信息修改时间
- organizationId: '', //所属组织机构
- organizationName: '', //组织机构名称
- buildingTypes: [
- {
- id:'',
- name:''
- }
- ]
- }
- uploader:FileUploader = new FileUploader({ //初始化上传事件 ng2-upload
- url: `/api/Objects/PlanPlatform/${sessionStorage.getItem('companyId')}`,
- method: "POST",
- itemAlias: "uploadedfile",
- autoUpload: false,
- removeAfterUpload:true //上传之后是否在队列中移除,如果不移除就会出现无法上传第二次的情况
- });
+
+
+
//input框显隐
inputShow=true
//控制底部div显隐
@@ -157,6 +134,7 @@ export class KnowRouteComponent implements OnInit {
}
}
}
+
//完成分块上传
endUploading() {
let data = this.PartNumberETag
@@ -165,45 +143,41 @@ export class KnowRouteComponent implements OnInit {
this.imgsrc = `/api/Objects/PlanPlatform/${this.objectName}?x-oss-process=image/resize,m_fill,h_170,w_299`
this.isspinner = false
this.PartNumberETag = []
- this.uploader.clearQueue(); //清空input控件文件
})
}
+
//熟悉部位点击事件
addRoute(event,item){
- //console.log(event.target.innerHTML)
- //this.knowRoute+=event.target.innerHTML+"🠖"
- this.showorfalse="show"
+ 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")) || []//上传成功暂存对象
+ gallery
//熟悉路线点击事件
knowroutwClick(event,key,item){
- console.log(123,key)
- //console.log(this.chooseid)
+ setTimeout(() => {
+ if(document.getElementById('viewerjs')){
+ this.gallery = new Viewer(document.getElementById('viewerjs'),{
+ url: 'data-original'
+ });
+ }
+
+ }, 0);
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
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
- /* for(var i=0;i
-
+
+
+
+
+
+