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 d9c29aa..ba9753e 100644 --- a/src/app/pages/plan/plan.component.ts +++ b/src/app/pages/plan/plan.component.ts @@ -672,6 +672,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