diff --git a/src/app/pages/left-domain/left-domain.component.html b/src/app/pages/left-domain/left-domain.component.html
index 3aacebb..6ae3c2f 100644
--- a/src/app/pages/left-domain/left-domain.component.html
+++ b/src/app/pages/left-domain/left-domain.component.html
@@ -138,7 +138,11 @@
@@ -169,7 +173,11 @@
diff --git a/src/app/pages/left-domain/left-domain.component.scss b/src/app/pages/left-domain/left-domain.component.scss
index 07efc39..6169419 100644
--- a/src/app/pages/left-domain/left-domain.component.scss
+++ b/src/app/pages/left-domain/left-domain.component.scss
@@ -38,9 +38,9 @@
.tableInput{ border: none; outline: none; background-color: transparent; width: 100%; height: 100%; }
.tableSelect{ width: 100%; height: 100%; color: #fff; }
.propertyImage{
- padding-left: 15px;
- img{ width: auto; max-height: 130px; display: block; margin-bottom: 10px; }
- .imgTitle{ font-size: 14px; height: 20px; line-height: 20px; margin: 10px 0; }
+ position: relative;
+ .imgTitle{ font-size: 14px; height: 20px; line-height: 20px; margin: 10px 0; padding-left: 10px; }
+ img{ width: 120px; height: auto; max-height: 100px; display: block; margin-bottom: 10px; }
.uploadImgBox{ margin: 0; width: 50px; height: 50px; line-height: 50px; text-align: center; }
}
diff --git a/src/app/pages/left-domain/left-domain.component.ts b/src/app/pages/left-domain/left-domain.component.ts
index 7858498..dadc79d 100644
--- a/src/app/pages/left-domain/left-domain.component.ts
+++ b/src/app/pages/left-domain/left-domain.component.ts
@@ -140,6 +140,17 @@ export class LeftDomainComponent implements OnInit {
}
}
+ //删除设备 图片
+ deleteImg(item: FacilityInfoUIItem) {
+ let isDelete = confirm("您确定要删除吗?")
+ if (isDelete) {
+ this.http.delete(`${item.getPropertyData().img}`).subscribe(data=>{
+ item.getPropertyData().img = ""
+ this.message.info("删除成功!");
+ })
+ }
+ }
+
@ViewChild('nzTreeComponent', { static: false }) nzTreeComponent!: NzTreeComponent;
treeData: NzTreeNodeOptions[] = []; //tree data
diff --git a/src/app/pages/plan/plan.component.html b/src/app/pages/plan/plan.component.html
index f0e6f5e..c013d57 100644
--- a/src/app/pages/plan/plan.component.html
+++ b/src/app/pages/plan/plan.component.html
@@ -67,8 +67,14 @@
图片
-
-
+
+
+
+
+
@@ -149,12 +155,18 @@
diff --git a/src/app/pages/plan/plan.component.scss b/src/app/pages/plan/plan.component.scss
index a14884e..6b561f5 100644
--- a/src/app/pages/plan/plan.component.scss
+++ b/src/app/pages/plan/plan.component.scss
@@ -192,11 +192,11 @@
.natureContent{
box-sizing: border-box;
padding: 0 20px;
- margin-bottom: 5px;
+ margin: 5px 0;
.natureTitle{ margin-bottom: 5px; height: 20px; line-height: 20px; }
input{ width: 100%; height: 28px; background: rgba(145, 204, 255, 0.41); border: 1px solid #91CCFF; padding: 0; resize: none; outline: none; }
textarea{ width: 100%; height: 75px; background: rgba(145, 204, 255, 0.41); border: 1px solid #91CCFF; padding: 0; resize: none; outline: none; }
- .natureImg{ margin-bottom: 5px; img{ width: auto; height: auto; max-height: 120px; } }
+ .natureImg{ margin-bottom: 5px; position: relative; img{ width: 120px; height: auto; max-height: 100px; } }
.natureUpload{ margin: 0; text-align: center; width: 50px; height: 50px; line-height: 50px; }
}
}
@@ -336,10 +336,8 @@
input{ border: none; outline: none; background-color: transparent; width: 100%; height: 100%; }
textarea{ width: 100%; height: 50px; background: rgba(145, 204, 255, 0.41); border: 1px solid #91CCFF; padding: 0; resize: none; outline: none; }
}
- .planHeaderImg{ width: 140px; height: 100%; text-align: center; line-height: 80px; .imgSrc{ width: 100px; height: auto; max-height: 100%; } }
- .uploadImage{ width: 20px; height: 20px; line-height: 20px; float: right; margin-top: 30px; }
- .planHeaderVideo{ width: 180px; height: 100%; text-align: center; line-height: 80px; video{ width: 120px; height: auto; max-height: 100%; } }
- .uploadVideo{ width: 30px; height: 30px; line-height: 30px; float: right; margin-top: 25px; }
+ .planHeaderImg{ width: 100px; height: 100%; text-align: center; position: relative; margin: 0 30px; .imgSrc{ width: 100%; height: 100%; } }
+ .planHeaderVideo{ width: 120px; height: 100%; text-align: center; position: relative; video{ width: 100%; height: 100%; } }
}
.bottomPlanCenter{
height: 35px;
diff --git a/src/app/pages/plan/plan.component.ts b/src/app/pages/plan/plan.component.ts
index b8b394a..6cb954e 100644
--- a/src/app/pages/plan/plan.component.ts
+++ b/src/app/pages/plan/plan.component.ts
@@ -673,6 +673,29 @@ export class PlanComponent implements OnInit {
}
}
+ //删除 图片/视频
+ deleteImgVideo(type: number) {
+ let isDelete = confirm("您确定要删除吗?")
+ if (isDelete) {
+ if (type === 1) {
+ this.http.delete(`${this.beforeOnePropertyData.getPropertyData().img}`).subscribe(data=>{
+ this.beforeOnePropertyData.getPropertyData().img = ""
+ this.message.info("删除成功!");
+ })
+ } else if (type === 2) {
+ this.http.delete(`${this.beforePlanNode.texture}`).subscribe(data=>{
+ this.beforePlanNode.texture = ""
+ this.message.info("删除成功!");
+ })
+ } else if (type === 3) {
+ this.http.delete(`${this.beforePlanNode.video}`).subscribe(data=>{
+ this.beforePlanNode.video = ""
+ this.message.info("删除成功!");
+ })
+ }
+ }
+ }
+
//打开视频弹窗
openVideo(src: string) {
this.videoDialogType.isVideo = true
diff --git a/src/app/pages/plan/publicPop.scss b/src/app/pages/plan/publicPop.scss
index a221c9b..b99ad3f 100644
--- a/src/app/pages/plan/publicPop.scss
+++ b/src/app/pages/plan/publicPop.scss
@@ -27,10 +27,12 @@
display: inline-block;
}
.imgAndVideoUpload{
+ width: 20px;
+ height: 20px;
+ margin-right: 10px;
+ vertical-align: top;
position: relative;
cursor: pointer;
- background: rgba(145, 204, 255, 0.41);
- border: 1px dashed #91CCFF;
overflow: hidden;
display: inline-block;
}
@@ -41,5 +43,16 @@
right: 0;
top: 0;
opacity: 0;
- cursor: pointer
+ cursor: pointer;
+}
+
+//绝对定位 上传/删除 图片/视频弹窗
+.positionHandleImgVideo {
+ position: absolute;
+ left: 0;
+ bottom: 0px;
+ height: 20px;
+ text-align: center;
+ background: rgba(0, 0, 0, 0.7);
+ .anticon { font-size: 20px; color: #fff; cursor: pointer; }
}
\ No newline at end of file