Compare commits
30 Commits
Author | SHA1 | Date |
---|---|---|
|
294eccdda7 | 9 months ago |
|
411722d6a8 | 3 years ago |
|
4dbeaf2b36 | 3 years ago |
|
bc75ce7993 | 3 years ago |
|
bc1e6d3997 | 3 years ago |
|
720098a068 | 3 years ago |
|
1c35191071 | 3 years ago |
|
2f8548211a | 3 years ago |
|
3ac88e8a1a | 3 years ago |
|
f676d9e2d8 | 3 years ago |
|
8f09a38a1b | 3 years ago |
|
2ebf5df542 | 3 years ago |
|
8d8098bb60 | 3 years ago |
|
689e5c1573 | 3 years ago |
|
aa43b3c2d7 | 3 years ago |
|
495f73bf6f | 3 years ago |
|
6ba3be89d9 | 3 years ago |
|
8dc468c261 | 3 years ago |
|
4b6ec4c9a2 | 3 years ago |
|
58db1fc807 | 3 years ago |
|
209ab9a802 | 3 years ago |
|
fe46ca80b7 | 3 years ago |
|
036c9834a6 | 3 years ago |
|
f58e91a420 | 3 years ago |
|
44a72a93ec | 3 years ago |
|
e6b3652c36 | 3 years ago |
|
a35b485add | 4 years ago |
|
d76ab10342 | 4 years ago |
|
1bc637f97c | 4 years ago |
|
b8d8b7ab9a | 4 years ago |
78 changed files with 3536 additions and 2685 deletions
@ -1,7 +1,7 @@
|
||||
{ |
||||
"/api": { |
||||
"target": "http://39.106.78.171:8000", |
||||
"target": "http://218.75.214.31:28085/", |
||||
"secure": false, |
||||
"changeOrigin": true |
||||
} |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -1,25 +0,0 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||
|
||||
import { EntryPlanLookComponent } from './entry-plan-look.component'; |
||||
|
||||
describe('EntryPlanLookComponent', () => { |
||||
let component: EntryPlanLookComponent; |
||||
let fixture: ComponentFixture<EntryPlanLookComponent>; |
||||
|
||||
beforeEach(async(() => { |
||||
TestBed.configureTestingModule({ |
||||
declarations: [ EntryPlanLookComponent ] |
||||
}) |
||||
.compileComponents(); |
||||
})); |
||||
|
||||
beforeEach(() => { |
||||
fixture = TestBed.createComponent(EntryPlanLookComponent); |
||||
component = fixture.componentInstance; |
||||
fixture.detectChanges(); |
||||
}); |
||||
|
||||
it('should create', () => { |
||||
expect(component).toBeTruthy(); |
||||
}); |
||||
}); |
File diff suppressed because it is too large
Load Diff
@ -1,103 +1,174 @@
|
||||
.header { |
||||
width: 100%; |
||||
padding: 12px 5px; |
||||
width: 100%; |
||||
padding: 12px 5px; |
||||
// margin-bottom: 10px; |
||||
box-sizing: border-box; |
||||
box-sizing: border-box; |
||||
|
||||
// border-bottom: 1px solid black; |
||||
.queryBox { |
||||
box-sizing: border-box; |
||||
padding: 5px 0 0 15px; |
||||
display: flex; |
||||
flex-direction: row; |
||||
flex-wrap: wrap; |
||||
align-items:center; |
||||
// justify-content:center; |
||||
.queryField { |
||||
//margin: 3px 10px; |
||||
input { |
||||
.queryBox { |
||||
box-sizing: border-box; |
||||
padding: 5px 0 0 15px; |
||||
display: flex; |
||||
flex-direction: row; |
||||
flex-wrap: wrap; |
||||
align-items: center; |
||||
|
||||
// justify-content:center; |
||||
.queryField { |
||||
|
||||
//margin: 3px 10px; |
||||
input { |
||||
width: 180px; |
||||
height: 22px; |
||||
line-height: 22px; |
||||
border-radius: 3px; |
||||
} |
||||
|
||||
@media screen and (min-device-width:1400px) { |
||||
margin: 3px 20px; |
||||
} |
||||
|
||||
@media screen and (max-device-width:1400px)and (min-device-width:1200px) { |
||||
margin: 3px 10px; |
||||
|
||||
mat-form-field { |
||||
width: 180px; |
||||
height: 22px; |
||||
line-height: 22px; |
||||
border-radius: 3px; |
||||
} |
||||
@media screen and (min-device-width:1400px){ |
||||
margin: 3px 20px; |
||||
} |
||||
@media screen and (max-device-width:1400px)and (min-device-width:1200px){ |
||||
margin: 3px 10px; |
||||
mat-form-field{ |
||||
width: 180px; |
||||
} |
||||
} |
||||
@media screen and (max-device-width:1200px){ |
||||
margin: 3px 0 3px 10px; |
||||
mat-form-field{ |
||||
width: 130px; |
||||
} |
||||
} |
||||
} |
||||
|
||||
} //queryBox |
||||
.ordiv{ |
||||
position: relative; |
||||
|
||||
.organizationbox{ |
||||
width:450px; |
||||
height: 200px; |
||||
background: white; |
||||
position: absolute; |
||||
top: 48px; |
||||
left: 77px; |
||||
z-index: 999; |
||||
border: 1px solid grey; |
||||
overflow-y: auto; |
||||
li{ |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
white-space: nowrap; |
||||
} |
||||
mat-tree-node{ |
||||
cursor: pointer; |
||||
white-space:pre; |
||||
} |
||||
mat-tree-node:hover{ |
||||
background: rgba(225, 225, 225, 0.8); |
||||
} |
||||
.closediv{ |
||||
z-index: 100; |
||||
position: absolute; |
||||
right: 0; |
||||
top: 0; |
||||
width: 30px; |
||||
height: 30px; |
||||
cursor: pointer; |
||||
line-height: 30px; |
||||
text-align: center; |
||||
} |
||||
.closediv:hover{ |
||||
background:rgba(225, 225, 225, 0.8); |
||||
} |
||||
|
||||
@media screen and (max-device-width:1200px) { |
||||
margin: 3px 0 3px 10px; |
||||
|
||||
mat-form-field { |
||||
width: 130px; |
||||
} |
||||
|
||||
} |
||||
} |
||||
|
||||
} |
||||
.body{ |
||||
.buttonbox{ |
||||
padding-left: 50px; |
||||
button{ |
||||
margin:0 10px |
||||
} |
||||
|
||||
//queryBox |
||||
.ordiv { |
||||
position: relative; |
||||
|
||||
.organizationbox { |
||||
width: 450px; |
||||
height: 200px; |
||||
background: white; |
||||
position: absolute; |
||||
top: 48px; |
||||
left: 77px; |
||||
z-index: 999; |
||||
border: 1px solid grey; |
||||
overflow-y: auto; |
||||
|
||||
li { |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
white-space: nowrap; |
||||
} |
||||
|
||||
mat-tree-node { |
||||
cursor: pointer; |
||||
white-space: pre; |
||||
} |
||||
|
||||
mat-tree-node:hover { |
||||
background: rgba(225, 225, 225, 0.8); |
||||
} |
||||
.tablebox{ |
||||
table{ |
||||
width: 100%; |
||||
margin-top: 15px; |
||||
} |
||||
th,td{ |
||||
text-align: center; |
||||
} |
||||
mat-paginator{ |
||||
width: 100%; |
||||
} |
||||
|
||||
.closediv { |
||||
z-index: 100; |
||||
position: absolute; |
||||
right: 0; |
||||
top: 0; |
||||
width: 30px; |
||||
height: 30px; |
||||
cursor: pointer; |
||||
line-height: 30px; |
||||
text-align: center; |
||||
} |
||||
} |
||||
|
||||
.closediv:hover { |
||||
background: rgba(225, 225, 225, 0.8); |
||||
} |
||||
} |
||||
|
||||
} |
||||
} |
||||
|
||||
.body { |
||||
.buttonbox { |
||||
padding-left: 50px; |
||||
|
||||
button { |
||||
margin: 0 10px |
||||
} |
||||
} |
||||
|
||||
.tablebox { |
||||
table { |
||||
width: 100%; |
||||
margin-top: 15px; |
||||
} |
||||
|
||||
th, |
||||
td { |
||||
text-align: center; |
||||
} |
||||
|
||||
mat-paginator { |
||||
width: 100%; |
||||
} |
||||
} |
||||
} |
||||
|
||||
@media screen and (max-width:1200px) { |
||||
.bigimgbox { |
||||
width: 880px; |
||||
height: 580px; |
||||
|
||||
//预览图片 |
||||
.previewImgBox { |
||||
width: 800px; |
||||
height: 475px; |
||||
text-align: center; |
||||
} |
||||
} |
||||
} |
||||
|
||||
@media screen and (min-width:1200px) and (max-width:1400px) { |
||||
.bigimgbox { |
||||
width: 880px; |
||||
height: 610px; |
||||
|
||||
//预览图片 |
||||
.previewImgBox { |
||||
width: 800px; |
||||
height: 500px; |
||||
text-align: center; |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
@media screen and (min-width:1400px) { |
||||
.bigimgbox { |
||||
width: 1110px; |
||||
height: 860px; |
||||
|
||||
//预览图片 |
||||
.previewImgBox { |
||||
width: 900px; |
||||
height: 100%; |
||||
text-align: center; |
||||
} |
||||
|
||||
.previewImgBottom { |
||||
text-align: center; |
||||
height: 30px; |
||||
margin: 20px auto; |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
@ -1,25 +0,0 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||
|
||||
import { OpenPlanComponent } from './open-plan.component'; |
||||
|
||||
describe('OpenPlanComponent', () => { |
||||
let component: OpenPlanComponent; |
||||
let fixture: ComponentFixture<OpenPlanComponent>; |
||||
|
||||
beforeEach(async(() => { |
||||
TestBed.configureTestingModule({ |
||||
declarations: [ OpenPlanComponent ] |
||||
}) |
||||
.compileComponents(); |
||||
})); |
||||
|
||||
beforeEach(() => { |
||||
fixture = TestBed.createComponent(OpenPlanComponent); |
||||
component = fixture.componentInstance; |
||||
fixture.detectChanges(); |
||||
}); |
||||
|
||||
it('should create', () => { |
||||
expect(component).toBeTruthy(); |
||||
}); |
||||
}); |
@ -0,0 +1,29 @@
|
||||
<!-- |
||||
* @Descripttion: |
||||
* @version: |
||||
* @Author: sueRimn |
||||
* @Date: 2021-05-18 15:09:43 |
||||
* @LastEditors: sueRimn |
||||
* @LastEditTime: 2021-05-18 15:25:35 |
||||
--> |
||||
|
||||
<div class="bigimgbox"> |
||||
<!-- <div mat-dialog-title>图片详情</div> --> |
||||
<div class="swiper-container"> |
||||
<div class="swiper-wrapper"> |
||||
<div *ngFor="let item of allImages" class="swiper-slide previewImgBox"> |
||||
<img [ngClass]="{'rotateA':rotationAngle==90,'rotateB':rotationAngle==180,'rotateC':rotationAngle==270}" class="swiper-lazy" |
||||
[attr.data-src]="item"> |
||||
<div class="swiper-lazy-preloader"></div> |
||||
</div> |
||||
</div> |
||||
|
||||
<!-- 如果需要导航按钮 --> |
||||
<div class="swiper-button-prev"></div> |
||||
<div class="swiper-button-next"></div> |
||||
</div> |
||||
|
||||
<div class="previewImgBottom"> |
||||
<button type="button" mat-icon-button (click)='rotate()'><mat-icon>refresh</mat-icon></button> |
||||
</div> |
||||
</div> |
@ -1,233 +1,327 @@
|
||||
.header { |
||||
width: 100%; |
||||
padding: 12px 10px; |
||||
width: 100%; |
||||
padding: 12px 10px; |
||||
box-sizing: border-box; |
||||
|
||||
.queryBox { |
||||
box-sizing: border-box; |
||||
.queryBox { |
||||
box-sizing: border-box; |
||||
padding: 5px 0 0 5px; |
||||
// margin-left: 50px; |
||||
display: flex; |
||||
flex-direction: row; |
||||
flex-wrap: wrap; |
||||
align-items:center; |
||||
// justify-content:center; |
||||
padding: 5px 0 0 5px; |
||||
// margin-left: 50px; |
||||
display: flex; |
||||
flex-direction: row; |
||||
flex-wrap: wrap; |
||||
align-items: center; |
||||
|
||||
// justify-content:center; |
||||
.queryField { |
||||
|
||||
//margin: 0 10px; |
||||
input { |
||||
width: 180px; |
||||
height: 22px; |
||||
line-height: 22px; |
||||
border-radius: 3px; |
||||
} |
||||
@media screen and (min-device-width:1400px){ |
||||
margin: 3px 20px; |
||||
} |
||||
@media screen and (max-device-width:1400px)and (min-device-width:1200px){ |
||||
margin: 3px 10px; |
||||
mat-form-field{ |
||||
width: 180px; |
||||
} |
||||
} |
||||
|
||||
@media screen and (min-device-width:1400px) { |
||||
margin: 3px 20px; |
||||
} |
||||
|
||||
@media screen and (max-device-width:1400px)and (min-device-width:1200px) { |
||||
margin: 3px 10px; |
||||
|
||||
mat-form-field { |
||||
width: 180px; |
||||
} |
||||
@media screen and (max-device-width:1200px){ |
||||
margin: 3px 0 3px 10px; |
||||
mat-form-field{ |
||||
width: 120px; |
||||
} |
||||
} |
||||
|
||||
@media screen and (max-device-width:1200px) { |
||||
margin: 3px 0 3px 10px; |
||||
|
||||
mat-form-field { |
||||
width: 120px; |
||||
} |
||||
|
||||
} |
||||
|
||||
} |
||||
|
||||
} //queryBox |
||||
.butclass{ |
||||
button{ |
||||
width: 80px;height: 36px; |
||||
font-size: 16px; |
||||
} |
||||
} |
||||
.ordiv{ |
||||
position: relative; |
||||
.organizationbox{ |
||||
width:450px; |
||||
height: 200px; |
||||
background: white; |
||||
position: absolute; |
||||
top: 48px; |
||||
left: 77px; |
||||
z-index: 999; |
||||
border: 1px solid grey; |
||||
overflow-y: auto; |
||||
li{ |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
white-space: nowrap; |
||||
} |
||||
mat-tree-node{ |
||||
cursor: pointer; |
||||
white-space:pre; |
||||
} |
||||
mat-tree-node:hover{ |
||||
background: rgba(225, 225, 225, 0.8); |
||||
} |
||||
.closediv{ |
||||
z-index: 100; |
||||
position: absolute; |
||||
right: 0; |
||||
top: 0; |
||||
width: 30px; |
||||
height: 30px; |
||||
cursor: pointer; |
||||
line-height: 30px; |
||||
text-align: center; |
||||
} |
||||
.closediv:hover{ |
||||
background:rgba(225, 225, 225, 0.8); |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
} |
||||
|
||||
//queryBox |
||||
.butclass { |
||||
button { |
||||
width: 80px; |
||||
height: 36px; |
||||
font-size: 16px; |
||||
} |
||||
} |
||||
.body{ |
||||
.buttonbox{ |
||||
padding-left: 50px; |
||||
button{ |
||||
margin:0 10px |
||||
} |
||||
|
||||
.ordiv { |
||||
position: relative; |
||||
|
||||
.organizationbox { |
||||
width: 450px; |
||||
height: 200px; |
||||
background: white; |
||||
position: absolute; |
||||
top: 48px; |
||||
left: 77px; |
||||
z-index: 999; |
||||
border: 1px solid grey; |
||||
overflow-y: auto; |
||||
|
||||
li { |
||||
overflow: hidden; |
||||
text-overflow: ellipsis; |
||||
white-space: nowrap; |
||||
} |
||||
.tablebox{ |
||||
table{ |
||||
width: 100%; |
||||
// margin-left: 2%; |
||||
margin-top: 15px; |
||||
} |
||||
mat-paginator{ |
||||
width:100%; |
||||
// margin-left: 2%; |
||||
// margin-top: 30px; |
||||
} |
||||
|
||||
mat-tree-node { |
||||
cursor: pointer; |
||||
white-space: pre; |
||||
} |
||||
|
||||
mat-tree-node:hover { |
||||
background: rgba(225, 225, 225, 0.8); |
||||
} |
||||
|
||||
.closediv { |
||||
z-index: 100; |
||||
position: absolute; |
||||
right: 0; |
||||
top: 0; |
||||
width: 30px; |
||||
height: 30px; |
||||
cursor: pointer; |
||||
line-height: 30px; |
||||
text-align: center; |
||||
} |
||||
|
||||
.closediv:hover { |
||||
background: rgba(225, 225, 225, 0.8); |
||||
} |
||||
} |
||||
|
||||
} |
||||
.mat-header-cell{ |
||||
text-align: center; |
||||
} |
||||
.mat-cell{ |
||||
text-align: center; |
||||
|
||||
|
||||
.body { |
||||
.buttonbox { |
||||
padding-left: 50px; |
||||
|
||||
button { |
||||
margin: 0 10px |
||||
} |
||||
} |
||||
|
||||
.tablebox { |
||||
table { |
||||
width: 100%; |
||||
// margin-left: 2%; |
||||
margin-top: 15px; |
||||
} |
||||
|
||||
mat-paginator { |
||||
width: 100%; |
||||
// margin-left: 2%; |
||||
// margin-top: 30px; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.mat-header-cell { |
||||
text-align: center; |
||||
} |
||||
|
||||
.mat-cell { |
||||
text-align: center; |
||||
|
||||
} |
||||
|
||||
//完整度 |
||||
.integrityDiv{ |
||||
width: 180px; |
||||
height: 30px; |
||||
background-color: #e2e7ee; |
||||
// background-image: linear-gradient(to right, #e2e7ee ,#FF4500, #FF8C00,#32cd32); |
||||
margin: 0 auto; |
||||
position: relative; |
||||
.integrityNum{ |
||||
position: absolute; |
||||
left: 50%; |
||||
top: 50%; |
||||
transform: translate(-50%, -50%); |
||||
color: black; |
||||
.integrityDiv { |
||||
width: 180px; |
||||
height: 30px; |
||||
background-color: #e2e7ee; |
||||
// background-image: linear-gradient(to right, #e2e7ee ,#FF4500, #FF8C00,#32cd32); |
||||
margin: 0 auto; |
||||
position: relative; |
||||
|
||||
.integrityNum { |
||||
position: absolute; |
||||
left: 50%; |
||||
top: 50%; |
||||
transform: translate(-50%, -50%); |
||||
color: black; |
||||
font-weight: 800; |
||||
font-size: 15px; |
||||
cursor: default; |
||||
} |
||||
|
||||
.integrityColorDiv { |
||||
height: 100%; |
||||
} |
||||
|
||||
.integrityDetails { |
||||
position: absolute; |
||||
display: none; |
||||
width: 350px; |
||||
height: 280px; |
||||
border: 1px solid rgba(0, 0, 0, 0.22); |
||||
background-color: white; |
||||
|
||||
.integrityDetailsTop { |
||||
width: 100%; |
||||
height: 23px; |
||||
line-height: 23px; |
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.22); |
||||
margin-bottom: 1px; |
||||
font-size: 14px; |
||||
|
||||
span { |
||||
display: inline-block; |
||||
text-align: center; |
||||
font-weight: 800; |
||||
font-size: 15px; |
||||
cursor: default; |
||||
} |
||||
.integrityColorDiv{ |
||||
height: 100%; |
||||
} |
||||
|
||||
.span1 { |
||||
width: 25%; |
||||
} |
||||
|
||||
.span2 { |
||||
width: 60%; |
||||
} |
||||
|
||||
.span3 { |
||||
width: 15%; |
||||
} |
||||
} |
||||
.integrityDetails{ |
||||
position: absolute; |
||||
display: none; |
||||
width: 350px; |
||||
height:280px; |
||||
border: 1px solid rgba(0, 0, 0, 0.22); |
||||
background-color: white; |
||||
.integrityDetailsTop{ |
||||
width: 100%; |
||||
height: 23px; |
||||
line-height:23px; |
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.22); |
||||
margin-bottom: 1px; |
||||
font-size: 14px; |
||||
span{ |
||||
display: inline-block; |
||||
text-align: center; |
||||
font-weight: 800; |
||||
} |
||||
.span1{ |
||||
width: 25%; |
||||
} |
||||
.span2{ |
||||
width: 60%; |
||||
} |
||||
.span3{ |
||||
width: 15%; |
||||
|
||||
.integrityDetailsBody { |
||||
ul { |
||||
li { |
||||
width: 100%; |
||||
height: 23px; |
||||
line-height: 23px; |
||||
margin: 3px 0; |
||||
|
||||
div { |
||||
float: left; |
||||
font-size: 13px; |
||||
} |
||||
|
||||
.name { |
||||
width: 25%; |
||||
height: 100%; |
||||
} |
||||
|
||||
.colorDiv { |
||||
width: 60%; |
||||
height: 100%; |
||||
position: relative; |
||||
|
||||
.colorDivBac { |
||||
width: 90%; |
||||
height: 100%; |
||||
position: absolute; |
||||
left: 50%; |
||||
top: 50%; |
||||
transform: translate(-50%, -50%); |
||||
background-color: #dfe5ec; |
||||
border-radius: 5px; |
||||
|
||||
.colorDivCon { |
||||
border-radius: 5px; |
||||
height: 100%; |
||||
background-color: #2398f1; |
||||
} |
||||
} |
||||
} |
||||
.integrityDetailsBody{ |
||||
ul{ |
||||
li{ |
||||
width: 100%; |
||||
height: 23px; |
||||
line-height: 23px; |
||||
margin: 3px 0; |
||||
div{ |
||||
float: left; |
||||
font-size: 13px; |
||||
} |
||||
.name{ |
||||
width: 25%; |
||||
height: 100%; |
||||
} |
||||
.colorDiv{ |
||||
width: 60%; |
||||
height: 100%; |
||||
position: relative; |
||||
.colorDivBac{ |
||||
width: 90%; |
||||
height: 100%; |
||||
position: absolute; |
||||
left: 50%; |
||||
top: 50%; |
||||
transform: translate(-50%,-50%); |
||||
background-color: #dfe5ec; |
||||
border-radius: 5px; |
||||
.colorDivCon{ |
||||
border-radius: 5px; |
||||
height: 100%; |
||||
background-color: #2398f1; |
||||
} |
||||
} |
||||
span{ |
||||
position: absolute; |
||||
left: 50%; |
||||
top: 50%; |
||||
transform: translate(-50%,-50%); |
||||
// color: white; |
||||
font-weight: 600; |
||||
} |
||||
} |
||||
.number{ |
||||
width: 15%; |
||||
height: 100%; |
||||
} |
||||
} |
||||
|
||||
span { |
||||
position: absolute; |
||||
left: 50%; |
||||
top: 50%; |
||||
transform: translate(-50%, -50%); |
||||
// color: white; |
||||
font-weight: 600; |
||||
} |
||||
|
||||
} |
||||
|
||||
.number { |
||||
width: 15%; |
||||
height: 100%; |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
||||
.bottomposition{ |
||||
top: 2px; |
||||
left: 188px; |
||||
} |
||||
|
||||
.bottomposition { |
||||
top: 2px; |
||||
left: 188px; |
||||
} |
||||
|
||||
.topposition { |
||||
top: -252px; |
||||
left: 188px; |
||||
} |
||||
} |
||||
|
||||
.integrityDiv:hover { |
||||
.integrityDetails { |
||||
display: block; |
||||
} |
||||
} |
||||
|
||||
|
||||
@media screen and (max-width:1200px) { |
||||
.bigimgbox { |
||||
width: 880px; |
||||
height: 580px; |
||||
|
||||
//预览图片 |
||||
.previewImgBox { |
||||
width: 800px; |
||||
height: 475px; |
||||
text-align: center; |
||||
} |
||||
.topposition{ |
||||
top: -252px; |
||||
left: 188px; |
||||
} |
||||
} |
||||
|
||||
@media screen and (min-width:1200px) and (max-width:1400px) { |
||||
.bigimgbox { |
||||
width: 880px; |
||||
height: 610px; |
||||
|
||||
//预览图片 |
||||
.previewImgBox { |
||||
width: 800px; |
||||
height: 500px; |
||||
text-align: center; |
||||
} |
||||
} |
||||
|
||||
} |
||||
.integrityDiv:hover{ |
||||
.integrityDetails{ |
||||
display: block; |
||||
|
||||
@media screen and (min-width:1400px) { |
||||
.bigimgbox { |
||||
width: 1110px; |
||||
height: 860px; |
||||
|
||||
//预览图片 |
||||
.previewImgBox { |
||||
width: 900px; |
||||
height: 100%; |
||||
text-align: center; |
||||
} |
||||
|
||||
.previewImgBottom { |
||||
text-align: center; |
||||
height: 30px; |
||||
margin: 20px auto; |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
@ -1,25 +0,0 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; |
||||
|
||||
import { PassPlanComponent } from './pass-plan.component'; |
||||
|
||||
describe('PassPlanComponent', () => { |
||||
let component: PassPlanComponent; |
||||
let fixture: ComponentFixture<PassPlanComponent>; |
||||
|
||||
beforeEach(async(() => { |
||||
TestBed.configureTestingModule({ |
||||
declarations: [ PassPlanComponent ] |
||||
}) |
||||
.compileComponents(); |
||||
})); |
||||
|
||||
beforeEach(() => { |
||||
fixture = TestBed.createComponent(PassPlanComponent); |
||||
component = fixture.componentInstance; |
||||
fixture.detectChanges(); |
||||
}); |
||||
|
||||
it('should create', () => { |
||||
expect(component).toBeTruthy(); |
||||
}); |
||||
}); |
@ -0,0 +1,29 @@
|
||||
<!-- |
||||
* @Descripttion: |
||||
* @version: |
||||
* @Author: sueRimn |
||||
* @Date: 2021-05-18 15:09:43 |
||||
* @LastEditors: sueRimn |
||||
* @LastEditTime: 2021-05-18 15:25:35 |
||||
--> |
||||
|
||||
<div class="bigimgbox"> |
||||
<!-- <div mat-dialog-title>图片详情</div> --> |
||||
<div class="swiper-container"> |
||||
<div class="swiper-wrapper"> |
||||
<div *ngFor="let item of allImages" class="swiper-slide previewImgBox"> |
||||
<img [ngClass]="{'rotateA':rotationAngle==90,'rotateB':rotationAngle==180,'rotateC':rotationAngle==270}" class="swiper-lazy" |
||||
[attr.data-src]="item"> |
||||
<div class="swiper-lazy-preloader"></div> |
||||
</div> |
||||
</div> |
||||
|
||||
<!-- 如果需要导航按钮 --> |
||||
<div class="swiper-button-prev"></div> |
||||
<div class="swiper-button-next"></div> |
||||
</div> |
||||
|
||||
<div class="previewImgBottom"> |
||||
<button type="button" mat-icon-button (click)='rotate()'><mat-icon>refresh</mat-icon></button> |
||||
</div> |
||||
</div> |
@ -0,0 +1,5 @@
|
||||
<!-- 视频 --> |
||||
<div class="video" style="text-align: center; overflow: hidden; height: 768px;"> |
||||
<video [src]="data" controls="controls" width="auto" height="100%"></video> |
||||
</div> |
||||
<!-- 视频 --> |
@ -0,0 +1,19 @@
|
||||
import { Component, Inject, OnInit } from '@angular/core'; |
||||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; |
||||
import { ImgDetails } from '../entry-plan-look/entry-plan-look.component'; |
||||
|
||||
@Component({ |
||||
selector: 'app-see-video', |
||||
templateUrl: './see-video.component.html', |
||||
styleUrls: ['./see-video.component.scss'] |
||||
}) |
||||
export class SeeVideoComponent implements OnInit { |
||||
|
||||
constructor(public dialog: MatDialog, public dialogRef: MatDialogRef<ImgDetails>, |
||||
@Inject(MAT_DIALOG_DATA) public data) { } |
||||
|
||||
ngOnInit(): void { |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,29 @@
|
||||
<!-- |
||||
* @Descripttion: |
||||
* @version: |
||||
* @Author: sueRimn |
||||
* @Date: 2021-05-18 15:09:43 |
||||
* @LastEditors: sueRimn |
||||
* @LastEditTime: 2021-05-18 15:25:35 |
||||
--> |
||||
|
||||
<div class="bigimgbox"> |
||||
<!-- <div mat-dialog-title>图片详情</div> --> |
||||
<div class="swiper-container"> |
||||
<div class="swiper-wrapper"> |
||||
<div *ngFor="let item of allImages" class="swiper-slide previewImgBox"> |
||||
<img [ngClass]="{'rotateA':rotationAngle==90,'rotateB':rotationAngle==180,'rotateC':rotationAngle==270}" class="swiper-lazy" |
||||
[attr.data-src]="item"> |
||||
<div class="swiper-lazy-preloader"></div> |
||||
</div> |
||||
</div> |
||||
|
||||
<!-- 如果需要导航按钮 --> |
||||
<div class="swiper-button-prev"></div> |
||||
<div class="swiper-button-next"></div> |
||||
</div> |
||||
|
||||
<div class="previewImgBottom"> |
||||
<button type="button" mat-icon-button (click)='rotate()'><mat-icon>refresh</mat-icon></button> |
||||
</div> |
||||
</div> |
@ -1,41 +1,62 @@
|
||||
import { Component, OnInit, Inject } from '@angular/core'; |
||||
import {MatTreeFlatDataSource, MatTreeFlattener} from '@angular/material/tree'; |
||||
import {FlatTreeControl} from '@angular/cdk/tree'; |
||||
import { HttpClient } from '@angular/common/http'; |
||||
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material/dialog'; |
||||
import {FormControl} from '@angular/forms'; |
||||
import { MatSnackBar } from '@angular/material/snack-bar'; |
||||
import format from 'date-fns/format'; |
||||
import { Component, OnInit, Inject } from "@angular/core"; |
||||
import { |
||||
MatTreeFlatDataSource, |
||||
MatTreeFlattener, |
||||
} from "@angular/material/tree"; |
||||
import { FlatTreeControl } from "@angular/cdk/tree"; |
||||
import { HttpClient } from "@angular/common/http"; |
||||
import { |
||||
MatDialog, |
||||
MatDialogRef, |
||||
MAT_DIALOG_DATA, |
||||
} from "@angular/material/dialog"; |
||||
import { FormControl } from "@angular/forms"; |
||||
import { MatSnackBar } from "@angular/material/snack-bar"; |
||||
@Component({ |
||||
selector: 'editmatlibrary', |
||||
templateUrl: './editmatlibrary.component.html', |
||||
styleUrls: ['./material-bank.component.scss'] |
||||
}) |
||||
export class EditMatLibrary { |
||||
myControl = new FormControl(); |
||||
constructor(private http: HttpClient,public dialogRef: MatDialogRef<EditMatLibrary>,@Inject(MAT_DIALOG_DATA) public data) {} |
||||
name:any |
||||
input:any |
||||
ngOnInit(): void { |
||||
this.name = this.data.material.name |
||||
this.input = this.data.material.tag |
||||
selector: "editmatlibrary", |
||||
templateUrl: "./editmatlibrary.component.html", |
||||
styleUrls: ["./material-bank.component.scss"], |
||||
}) |
||||
export class EditMatLibrary { |
||||
myControl = new FormControl(); |
||||
constructor( |
||||
private http: HttpClient, |
||||
public dialogRef: MatDialogRef<EditMatLibrary>, |
||||
@Inject(MAT_DIALOG_DATA) public data |
||||
) {} |
||||
name: any; |
||||
input: any; |
||||
ngOnInit(): void { |
||||
this.name = this.data.material.name; |
||||
this.input = this.data.material.tag; |
||||
} |
||||
onNoClick(): void { |
||||
this.dialogRef.close(); |
||||
} |
||||
onSubmit(value) { |
||||
let newdate = new Date(); |
||||
function getDate(date) { |
||||
//date是传过来的时间戳,注意需为13位,10位需*1000
|
||||
//也可以不传,获取的就是当前时间
|
||||
var time = new Date(date); |
||||
var year = time.getFullYear(); //年
|
||||
var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
|
||||
var day = ("0" + time.getDate()).slice(-2); //日
|
||||
var mydate = year + "-" + month + "-" + day; |
||||
return mydate; |
||||
} |
||||
onNoClick(): void { |
||||
|
||||
this.dialogRef.close(); |
||||
} |
||||
onSubmit(value){ |
||||
let newdate = new Date(); |
||||
let time = format(newdate, 'yyyy-MM-dd')
|
||||
this.http.put(`/api/AssetLibraries/${this.data.material.id}`,{ |
||||
id: this.data.material.id, |
||||
name: value.name, |
||||
order: this.data.material.order, |
||||
tag: value.tag, |
||||
enabled: true, |
||||
modifiedTime: time |
||||
}).subscribe(data=>{ |
||||
this.dialogRef.close(); |
||||
}) |
||||
} |
||||
} |
||||
let time = getDate(newdate); |
||||
this.http |
||||
.put(`/api/AssetLibraries/${this.data.material.id}`, { |
||||
id: this.data.material.id, |
||||
name: value.name, |
||||
order: this.data.material.order, |
||||
tag: value.tag, |
||||
enabled: true, |
||||
modifiedTime: time, |
||||
}) |
||||
.subscribe((data) => { |
||||
this.dialogRef.close(); |
||||
}); |
||||
} |
||||
} |
||||
|
@ -1,572 +1,596 @@
|
||||
import { Component, OnInit, Inject } from '@angular/core'; |
||||
import { HttpClient } from '@angular/common/http'; |
||||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; |
||||
import { AddMatLibrary } from './addmatlibrary.component' |
||||
import { EditMatLibrary } from './editmatlibrary.component' |
||||
import { AddOriginalCopy } from './addoriginalcopy.component' |
||||
import { MatTableDataSource } from '@angular/material/table'; |
||||
import { EditOriginalCopy } from './editoriginalcopy.component' |
||||
import { SelectOriginalCopy } from './selectoriginalcopy.component' |
||||
import { MatSnackBar,MatSnackBarConfig } from '@angular/material/snack-bar'; |
||||
import format from 'date-fns/format'; |
||||
|
||||
|
||||
|
||||
import { Component, OnInit, Inject } from "@angular/core"; |
||||
import { HttpClient } from "@angular/common/http"; |
||||
import { |
||||
MatDialog, |
||||
MatDialogRef, |
||||
MAT_DIALOG_DATA, |
||||
} from "@angular/material/dialog"; |
||||
import { AddMatLibrary } from "./addmatlibrary.component"; |
||||
import { EditMatLibrary } from "./editmatlibrary.component"; |
||||
import { AddOriginalCopy } from "./addoriginalcopy.component"; |
||||
import { MatTableDataSource } from "@angular/material/table"; |
||||
import { EditOriginalCopy } from "./editoriginalcopy.component"; |
||||
import { SelectOriginalCopy } from "./selectoriginalcopy.component"; |
||||
import { MatSnackBar, MatSnackBarConfig } from "@angular/material/snack-bar"; |
||||
@Component({ |
||||
selector: 'app-material-bank', |
||||
templateUrl: './material-bank.component.html', |
||||
styleUrls: ['./material-bank.component.scss'] |
||||
selector: "app-material-bank", |
||||
templateUrl: "./material-bank.component.html", |
||||
styleUrls: ["./material-bank.component.scss"], |
||||
}) |
||||
export class MaterialBankComponent implements OnInit { |
||||
|
||||
constructor(private http:HttpClient,public dialog: MatDialog,public snackBar: MatSnackBar) { } |
||||
constructor( |
||||
private http: HttpClient, |
||||
public dialog: MatDialog, |
||||
public snackBar: MatSnackBar |
||||
) {} |
||||
|
||||
ngOnInit(): void { |
||||
this.http.get('/api/AssetLibraries').subscribe(data=>{ |
||||
this.material = data[0] |
||||
this.allMaterialBank = data |
||||
this.getSourceMaterial() |
||||
}) |
||||
this.http.get("/api/AssetLibraries").subscribe((data) => { |
||||
this.material = data[0]; |
||||
this.allMaterialBank = data; |
||||
this.getSourceMaterial(); |
||||
}); |
||||
} |
||||
|
||||
allMaterialBank:any = []; //所有素材库
|
||||
material:any={name:''}; //选中的素材库
|
||||
materialIndex:any=0; //选中的素材库index
|
||||
allMaterialBank: any = []; //所有素材库
|
||||
material: any = { name: "" }; //选中的素材库
|
||||
materialIndex: any = 0; //选中的素材库index
|
||||
|
||||
sourceMaterial:any; //素材库对应所有原件
|
||||
Original:any; //选中的原件
|
||||
OriginalIndex:any=null; //选中的原件index
|
||||
isshow = true//左侧列表的显示隐藏
|
||||
sourceMaterial: any; //素材库对应所有原件
|
||||
Original: any; //选中的原件
|
||||
OriginalIndex: any = null; //选中的原件index
|
||||
isshow = true; //左侧列表的显示隐藏
|
||||
|
||||
//收起左侧列表
|
||||
showlist(){ |
||||
this.isshow = !this.isshow |
||||
//收起左侧列表
|
||||
showlist() { |
||||
this.isshow = !this.isshow; |
||||
} |
||||
//获取所有素材库
|
||||
getMaterialBank () { |
||||
this.http.get('/api/AssetLibraries').subscribe(data=>{ |
||||
this.allMaterialBank = data |
||||
this.material = data[this.materialIndex] |
||||
}) |
||||
getMaterialBank() { |
||||
this.http.get("/api/AssetLibraries").subscribe((data) => { |
||||
this.allMaterialBank = data; |
||||
this.material = data[this.materialIndex]; |
||||
}); |
||||
} |
||||
|
||||
//获得指定素材库所有原件
|
||||
getSourceMaterial () { |
||||
this.sourceMaterial = null |
||||
getSourceMaterial() { |
||||
this.sourceMaterial = null; |
||||
if (this.material) { |
||||
let data = { |
||||
libraryId:this.material.id |
||||
} |
||||
this.http.get('/api/Assets',{ |
||||
params:data |
||||
}).subscribe(data=>{ |
||||
this.sourceMaterial = data |
||||
this.Original = data[this.OriginalIndex] |
||||
}) |
||||
libraryId: this.material.id, |
||||
}; |
||||
this.http |
||||
.get("/api/Assets", { |
||||
params: data, |
||||
}) |
||||
.subscribe((data) => { |
||||
this.sourceMaterial = data; |
||||
this.Original = data[this.OriginalIndex]; |
||||
}); |
||||
} |
||||
} |
||||
|
||||
//选中素材库
|
||||
add (e,index) { |
||||
this.Original = null |
||||
this.OriginalIndex = null |
||||
add(e, index) { |
||||
this.Original = null; |
||||
this.OriginalIndex = null; |
||||
if (this.materialIndex != index) { |
||||
this.material = e |
||||
this.materialIndex = index |
||||
this.getSourceMaterial() |
||||
this.material = e; |
||||
this.materialIndex = index; |
||||
this.getSourceMaterial(); |
||||
} |
||||
} |
||||
|
||||
//选中原件
|
||||
addOriginal (e,index) { |
||||
this.Original = e |
||||
this.OriginalIndex = index |
||||
addOriginal(e, index) { |
||||
this.Original = e; |
||||
this.OriginalIndex = index; |
||||
} |
||||
|
||||
//打开查看属性弹窗
|
||||
viewProperties () { |
||||
if(this.Original){ |
||||
let data = this.Original |
||||
const dialogRef = this.dialog.open(attributeComponent, |
||||
{width: '1000px',data}); |
||||
dialogRef.afterClosed().subscribe( |
||||
(data)=>{if(data){this.getSourceMaterial()}} |
||||
) |
||||
}else { |
||||
viewProperties() { |
||||
if (this.Original) { |
||||
let data = this.Original; |
||||
const dialogRef = this.dialog.open(attributeComponent, { |
||||
width: "1000px", |
||||
data, |
||||
}); |
||||
dialogRef.afterClosed().subscribe((data) => { |
||||
if (data) { |
||||
this.getSourceMaterial(); |
||||
} |
||||
}); |
||||
} else { |
||||
const config = new MatSnackBarConfig(); |
||||
config.verticalPosition = 'top'; |
||||
config.duration = 3000 |
||||
this.snackBar.open('请选择原件','确定',config); |
||||
config.verticalPosition = "top"; |
||||
config.duration = 3000; |
||||
this.snackBar.open("请选择原件", "确定", config); |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
//新增素材库
|
||||
addmatlibrary(){ |
||||
let data = this.allMaterialBank || [] |
||||
const dialogRef = this.dialog.open(AddMatLibrary, {//调用open方法打开对话框并且携带参数过去
|
||||
width: '260px', |
||||
data |
||||
addmatlibrary() { |
||||
let data = this.allMaterialBank || []; |
||||
const dialogRef = this.dialog.open(AddMatLibrary, { |
||||
//调用open方法打开对话框并且携带参数过去
|
||||
width: "260px", |
||||
data, |
||||
}); |
||||
dialogRef.afterClosed().subscribe((data) => { |
||||
this.getMaterialBank(); |
||||
}); |
||||
dialogRef.afterClosed().subscribe( |
||||
data=>{ |
||||
this.getMaterialBank () |
||||
} |
||||
); |
||||
} |
||||
|
||||
//编辑素材库
|
||||
editmatlibrary(){ |
||||
const dialogRef = this.dialog.open(EditMatLibrary, {//调用open方法打开对话框并且携带参数过去
|
||||
width: '260px', |
||||
data: {allMaterialBank:this.allMaterialBank,material:this.material} |
||||
editmatlibrary() { |
||||
const dialogRef = this.dialog.open(EditMatLibrary, { |
||||
//调用open方法打开对话框并且携带参数过去
|
||||
width: "260px", |
||||
data: { allMaterialBank: this.allMaterialBank, material: this.material }, |
||||
}); |
||||
dialogRef.afterClosed().subscribe((data) => { |
||||
this.getMaterialBank(); |
||||
}); |
||||
dialogRef.afterClosed().subscribe( |
||||
data=>{ |
||||
this.getMaterialBank () |
||||
} |
||||
); |
||||
} |
||||
|
||||
//删除素材库
|
||||
delete(){ |
||||
var isdeleted = confirm(`确定要删除${this.material.name}素材库吗?`) |
||||
if(isdeleted){ |
||||
delete() { |
||||
var isdeleted = confirm(`确定要删除${this.material.name}素材库吗?`); |
||||
if (isdeleted) { |
||||
//请求删除接口
|
||||
this.http.delete(`/api/AssetLibraries/${this.material.id}`).subscribe( data=>{
|
||||
this.materialIndex -= 1//删除之后焦点前移
|
||||
this.getMaterialBank () |
||||
}) |
||||
this.http |
||||
.delete(`/api/AssetLibraries/${this.material.id}`) |
||||
.subscribe((data) => { |
||||
this.materialIndex -= 1; //删除之后焦点前移
|
||||
this.getMaterialBank(); |
||||
}); |
||||
} |
||||
} |
||||
|
||||
//禁启用素材库
|
||||
disabled(){ |
||||
disabled() { |
||||
let newdate = new Date(); |
||||
let time = format(newdate, 'yyyy-MM-dd')
|
||||
if(this.material.enabled){ |
||||
this.http.put(`/api/AssetLibraries/${this.material.id}`,{ |
||||
id: this.material.id, |
||||
name: this.material.name, |
||||
order: this.material.order, |
||||
tag: this.material.tag, |
||||
enabled: false, |
||||
modifiedTime: time |
||||
}).subscribe(data=>{ |
||||
const config = new MatSnackBarConfig(); |
||||
config.verticalPosition = 'top'; |
||||
config.duration = 3000 |
||||
this.snackBar.open('禁用成功','确定',config); |
||||
this.getMaterialBank () |
||||
}) |
||||
}else{ |
||||
this.http.put(`/api/AssetLibraries/${this.material.id}`,{ |
||||
id: this.material.id, |
||||
name: this.material.name, |
||||
order: this.material.order, |
||||
tag: this.material.tag, |
||||
enabled: true, |
||||
modifiedTime: time |
||||
}).subscribe(data=>{ |
||||
const config = new MatSnackBarConfig(); |
||||
config.verticalPosition = 'top'; |
||||
config.duration = 3000 |
||||
this.snackBar.open('启用成功','确定',config); |
||||
this.getMaterialBank () |
||||
}) |
||||
function getDate(date) { |
||||
//date是传过来的时间戳,注意需为13位,10位需*1000
|
||||
//也可以不传,获取的就是当前时间
|
||||
var time = new Date(date); |
||||
var year = time.getFullYear(); //年
|
||||
var month = ("0" + (time.getMonth() + 1)).slice(-2); //月
|
||||
var day = ("0" + time.getDate()).slice(-2); //日
|
||||
var mydate = year + "-" + month + "-" + day; |
||||
return mydate; |
||||
} |
||||
let time = getDate(newdate); |
||||
if (this.material.enabled) { |
||||
this.http |
||||
.put(`/api/AssetLibraries/${this.material.id}`, { |
||||
id: this.material.id, |
||||
name: this.material.name, |
||||
order: this.material.order, |
||||
tag: this.material.tag, |
||||
enabled: false, |
||||
modifiedTime: time, |
||||
}) |
||||
.subscribe((data) => { |
||||
const config = new MatSnackBarConfig(); |
||||
config.verticalPosition = "top"; |
||||
config.duration = 3000; |
||||
this.snackBar.open("禁用成功", "确定", config); |
||||
this.getMaterialBank(); |
||||
}); |
||||
} else { |
||||
this.http |
||||
.put(`/api/AssetLibraries/${this.material.id}`, { |
||||
id: this.material.id, |
||||
name: this.material.name, |
||||
order: this.material.order, |
||||
tag: this.material.tag, |
||||
enabled: true, |
||||
modifiedTime: time, |
||||
}) |
||||
.subscribe((data) => { |
||||
const config = new MatSnackBarConfig(); |
||||
config.verticalPosition = "top"; |
||||
config.duration = 3000; |
||||
this.snackBar.open("启用成功", "确定", config); |
||||
this.getMaterialBank(); |
||||
}); |
||||
} |
||||
|
||||
} |
||||
|
||||
//新增素材原件
|
||||
addoriginalcopy(node){ |
||||
const dialogRef = this.dialog.open(AddOriginalCopy, {//调用open方法打开对话框并且携带参数过去
|
||||
addoriginalcopy(node) { |
||||
const dialogRef = this.dialog.open(AddOriginalCopy, { |
||||
//调用open方法打开对话框并且携带参数过去
|
||||
// height:"715px",
|
||||
width:"640px", |
||||
data: {allMaterialBank:this.allMaterialBank,node:node,sourceMaterial:this.sourceMaterial} |
||||
width: "640px", |
||||
data: { |
||||
allMaterialBank: this.allMaterialBank, |
||||
node: node, |
||||
sourceMaterial: this.sourceMaterial, |
||||
}, |
||||
}); |
||||
dialogRef.afterClosed().subscribe( |
||||
data=>{ |
||||
if(data){ |
||||
this.getSourceMaterial () |
||||
} |
||||
|
||||
dialogRef.afterClosed().subscribe((data) => { |
||||
if (data) { |
||||
this.getSourceMaterial(); |
||||
} |
||||
); |
||||
}); |
||||
} |
||||
//修改素材原件
|
||||
editoriginalcopy(node){ |
||||
if(this.Original){ |
||||
const dialogRef = this.dialog.open(EditOriginalCopy, {//调用open方法打开对话框并且携带参数过去
|
||||
editoriginalcopy(node) { |
||||
if (this.Original) { |
||||
const dialogRef = this.dialog.open(EditOriginalCopy, { |
||||
//调用open方法打开对话框并且携带参数过去
|
||||
// height:"590px",
|
||||
width:"640px", |
||||
data: {allMaterialBank:this.allMaterialBank,node:node,Original:this.Original} |
||||
width: "640px", |
||||
data: { |
||||
allMaterialBank: this.allMaterialBank, |
||||
node: node, |
||||
Original: this.Original, |
||||
}, |
||||
}); |
||||
dialogRef.afterClosed().subscribe( |
||||
data=>{ |
||||
if(data){ |
||||
this.getSourceMaterial () |
||||
} |
||||
dialogRef.afterClosed().subscribe((data) => { |
||||
if (data) { |
||||
this.getSourceMaterial(); |
||||
} |
||||
); |
||||
}else{ |
||||
}); |
||||
} else { |
||||
const config = new MatSnackBarConfig(); |
||||
config.verticalPosition = 'top'; |
||||
config.duration = 3000 |
||||
this.snackBar.open('请选择原件','确定',config); |
||||
config.verticalPosition = "top"; |
||||
config.duration = 3000; |
||||
this.snackBar.open("请选择原件", "确定", config); |
||||
} |
||||
|
||||
} |
||||
|
||||
//禁启用原件
|
||||
disableoriginal(material){ |
||||
if(this.Original){ |
||||
this.http.put(`/api/Assets/${this.Original.id}`,{ |
||||
id:this.Original.id, |
||||
name:this.Original.name, |
||||
width: this.Original.width, |
||||
height: this.Original.height, |
||||
angle: this.Original.angle, |
||||
interactiveMode:this.Original.interactiveMode,//交互方式
|
||||
fixedSize: this.Original.fixedSize, |
||||
fillMode: this.Original.fillMode,//填充方式
|
||||
color: this.Original.color, |
||||
imageUrl:this.Original.imageUrl, |
||||
order: this.Original.order, |
||||
enabled: !this.Original.enabled, |
||||
propertyInfos: this.Original.propertyInfos, |
||||
fireElementId:this.Original.fireElementId |
||||
}).subscribe((data)=>{ |
||||
this.getSourceMaterial () |
||||
}) |
||||
}else{ |
||||
disableoriginal(material) { |
||||
if (this.Original) { |
||||
this.http |
||||
.put(`/api/Assets/${this.Original.id}`, { |
||||
id: this.Original.id, |
||||
name: this.Original.name, |
||||
width: this.Original.width, |
||||
height: this.Original.height, |
||||
angle: this.Original.angle, |
||||
interactiveMode: this.Original.interactiveMode, //交互方式
|
||||
fixedSize: this.Original.fixedSize, |
||||
fillMode: this.Original.fillMode, //填充方式
|
||||
color: this.Original.color, |
||||
imageUrl: this.Original.imageUrl, |
||||
order: this.Original.order, |
||||
enabled: !this.Original.enabled, |
||||
propertyInfos: this.Original.propertyInfos, |
||||
fireElementId: this.Original.fireElementId, |
||||
}) |
||||
.subscribe((data) => { |
||||
this.getSourceMaterial(); |
||||
}); |
||||
} else { |
||||
const config = new MatSnackBarConfig(); |
||||
config.verticalPosition = 'top'; |
||||
config.duration = 3000 |
||||
this.snackBar.open('请选择原件','确定',config); |
||||
config.verticalPosition = "top"; |
||||
config.duration = 3000; |
||||
this.snackBar.open("请选择原件", "确定", config); |
||||
} |
||||
} |
||||
|
||||
//删除原件
|
||||
deleteoriginal(material){ |
||||
if(this.Original){ |
||||
var isdeleted = confirm(`确定要删除当前原件吗?`) |
||||
if(isdeleted){ |
||||
deleteoriginal(material) { |
||||
if (this.Original) { |
||||
var isdeleted = confirm(`确定要删除当前原件吗?`); |
||||
if (isdeleted) { |
||||
//请求删除接口
|
||||
this.http.delete(`/api/Assets`,{ |
||||
params:{ |
||||
libraryId:material.id, |
||||
id:this.Original.id |
||||
} |
||||
}).subscribe( data=>{
|
||||
this.getSourceMaterial () |
||||
}) |
||||
this.http |
||||
.delete(`/api/Assets`, { |
||||
params: { |
||||
libraryId: material.id, |
||||
id: this.Original.id, |
||||
}, |
||||
}) |
||||
.subscribe((data) => { |
||||
this.getSourceMaterial(); |
||||
}); |
||||
} |
||||
}else{ |
||||
} else { |
||||
const config = new MatSnackBarConfig(); |
||||
config.verticalPosition = 'top'; |
||||
config.duration = 3000 |
||||
this.snackBar.open('请选择原件','确定',config); |
||||
config.verticalPosition = "top"; |
||||
config.duration = 3000; |
||||
this.snackBar.open("请选择原件", "确定", config); |
||||
} |
||||
} |
||||
|
||||
//选择原件素材 material为当前素材库的信息
|
||||
selectoriginal(material){ |
||||
const dialogRef = this.dialog.open(SelectOriginalCopy, {//调用open方法打开对话框并且携带参数过去
|
||||
selectoriginal(material) { |
||||
const dialogRef = this.dialog.open(SelectOriginalCopy, { |
||||
//调用open方法打开对话框并且携带参数过去
|
||||
// height:"525px",
|
||||
data: {allMaterialBank:this.allMaterialBank,material:material} |
||||
data: { allMaterialBank: this.allMaterialBank, material: material }, |
||||
}); |
||||
dialogRef.afterClosed().subscribe( |
||||
data=>{ |
||||
if(data){ |
||||
this.getSourceMaterial () |
||||
} |
||||
|
||||
dialogRef.afterClosed().subscribe((data) => { |
||||
if (data) { |
||||
this.getSourceMaterial(); |
||||
} |
||||
); |
||||
}); |
||||
} |
||||
|
||||
|
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
//原件对应所有属性弹窗
|
||||
@Component({ |
||||
selector: 'app-attribute', |
||||
templateUrl: './attribute.html', |
||||
styleUrls: ['./material-bank.component.scss'] |
||||
selector: "app-attribute", |
||||
templateUrl: "./attribute.html", |
||||
styleUrls: ["./material-bank.component.scss"], |
||||
}) |
||||
export class attributeComponent { |
||||
|
||||
constructor(private http:HttpClient,public dialog: MatDialog, |
||||
public dialogRef: MatDialogRef<attributeComponent >, |
||||
@Inject(MAT_DIALOG_DATA) public data,public snackBar: MatSnackBar) { } |
||||
constructor( |
||||
private http: HttpClient, |
||||
public dialog: MatDialog, |
||||
public dialogRef: MatDialogRef<attributeComponent>, |
||||
@Inject(MAT_DIALOG_DATA) public data, |
||||
public snackBar: MatSnackBar |
||||
) {} |
||||
|
||||
ngOnInit(): void { |
||||
if (this.data.propertyInfos == null) { |
||||
this.data.propertyInfos = [] |
||||
this.data.propertyInfos = []; |
||||
} |
||||
this.setIndex() |
||||
this.dataSource = new MatTableDataSource<any>(this.data.propertyInfos) |
||||
} |
||||
|
||||
displayedColumns = ['checked', 'name', 'type', 'default','required','physicalUnit','operation']; |
||||
dataSource:any=[]; //当前原件属性渲染table
|
||||
dataSourceIndex:any=[]; //选中属性的index
|
||||
|
||||
this.setIndex(); |
||||
this.dataSource = new MatTableDataSource<any>(this.data.propertyInfos); |
||||
} |
||||
|
||||
displayedColumns = [ |
||||
"checked", |
||||
"name", |
||||
"type", |
||||
"default", |
||||
"required", |
||||
"physicalUnit", |
||||
"operation", |
||||
]; |
||||
dataSource: any = []; //当前原件属性渲染table
|
||||
dataSourceIndex: any = []; //选中属性的index
|
||||
|
||||
//封装函数每次更改,重新获取下标
|
||||
setIndex () { |
||||
setIndex() { |
||||
if (this.data.propertyInfos) { |
||||
this.data.propertyInfos.forEach((item,index)=>{ |
||||
item.index = index |
||||
}) |
||||
this.data.propertyInfos.forEach((item, index) => { |
||||
item.index = index; |
||||
}); |
||||
} |
||||
} |
||||
|
||||
//点击checked框获取当前属性index
|
||||
checkedChange (e,index) { |
||||
checkedChange(e, index) { |
||||
if (e.checked) { |
||||
this.dataSourceIndex.push(index) |
||||
this.dataSourceIndex.push(index); |
||||
} else { |
||||
this.dataSourceIndex.splice(this.dataSourceIndex.findIndex(item=>item==index),1) |
||||
this.dataSourceIndex.splice( |
||||
this.dataSourceIndex.findIndex((item) => item == index), |
||||
1 |
||||
); |
||||
} |
||||
} |
||||
|
||||
|
||||
//上移
|
||||
toTop () { |
||||
if(this.dataSourceIndex.length) { |
||||
let index = this.dataSourceIndex[this.dataSourceIndex.length-1] |
||||
toTop() { |
||||
if (this.dataSourceIndex.length) { |
||||
let index = this.dataSourceIndex[this.dataSourceIndex.length - 1]; |
||||
if (index != 0) { |
||||
let data = this.data.propertyInfos[index] |
||||
this.data.propertyInfos[index]=this.data.propertyInfos[index-1] |
||||
this.data.propertyInfos[index-1] = data |
||||
this.dataSourceIndex[this.dataSourceIndex.length-1] = index-1 |
||||
this.setIndex() |
||||
this.dataSource = new MatTableDataSource<any>(this.data.propertyInfos) |
||||
let data = this.data.propertyInfos[index]; |
||||
this.data.propertyInfos[index] = this.data.propertyInfos[index - 1]; |
||||
this.data.propertyInfos[index - 1] = data; |
||||
this.dataSourceIndex[this.dataSourceIndex.length - 1] = index - 1; |
||||
this.setIndex(); |
||||
this.dataSource = new MatTableDataSource<any>(this.data.propertyInfos); |
||||
} |
||||
} |
||||
} |
||||
|
||||
//下移
|
||||
toBottom () { |
||||
if(this.dataSourceIndex.length) { |
||||
let index = this.dataSourceIndex[this.dataSourceIndex.length-1] |
||||
if (index != this.data.propertyInfos.length-1) { |
||||
let data = this.data.propertyInfos[index] |
||||
this.data.propertyInfos[index]=this.data.propertyInfos[index+1] |
||||
this.data.propertyInfos[index+1] = data |
||||
this.dataSourceIndex[this.dataSourceIndex.length-1] = index+1 |
||||
this.setIndex() |
||||
this.dataSource = new MatTableDataSource<any>(this.data.propertyInfos) |
||||
toBottom() { |
||||
if (this.dataSourceIndex.length) { |
||||
let index = this.dataSourceIndex[this.dataSourceIndex.length - 1]; |
||||
if (index != this.data.propertyInfos.length - 1) { |
||||
let data = this.data.propertyInfos[index]; |
||||
this.data.propertyInfos[index] = this.data.propertyInfos[index + 1]; |
||||
this.data.propertyInfos[index + 1] = data; |
||||
this.dataSourceIndex[this.dataSourceIndex.length - 1] = index + 1; |
||||
this.setIndex(); |
||||
this.dataSource = new MatTableDataSource<any>(this.data.propertyInfos); |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
//新增属性弹窗
|
||||
add () { |
||||
add() { |
||||
const dialogRef = this.dialog.open(addAttributeComponent); |
||||
dialogRef.afterClosed().subscribe( |
||||
(data)=>{ |
||||
if (data) { |
||||
this.data.propertyInfos.push(data) |
||||
this.setIndex() |
||||
this.dataSource = new MatTableDataSource<any>(this.data.propertyInfos)} |
||||
}) |
||||
dialogRef.afterClosed().subscribe((data) => { |
||||
if (data) { |
||||
this.data.propertyInfos.push(data); |
||||
this.setIndex(); |
||||
this.dataSource = new MatTableDataSource<any>(this.data.propertyInfos); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
//编辑属性弹窗
|
||||
edit (e) { |
||||
|
||||
let data = this.data.propertyInfos[e] |
||||
const dialogRef = this.dialog.open(editAttribute,{data}); |
||||
dialogRef.afterClosed().subscribe( |
||||
data=>{ |
||||
if (data) { |
||||
this.data.propertyInfos[data.index] = data |
||||
this.setIndex() |
||||
this.dataSource = new MatTableDataSource<any>(this.data.propertyInfos)} |
||||
}) |
||||
edit(e) { |
||||
let data = this.data.propertyInfos[e]; |
||||
const dialogRef = this.dialog.open(editAttribute, { data }); |
||||
dialogRef.afterClosed().subscribe((data) => { |
||||
if (data) { |
||||
this.data.propertyInfos[data.index] = data; |
||||
this.setIndex(); |
||||
this.dataSource = new MatTableDataSource<any>(this.data.propertyInfos); |
||||
} |
||||
}); |
||||
} |
||||
|
||||
//显示
|
||||
visible (e) { |
||||
this.data.propertyInfos[e].visible = true |
||||
visible(e) { |
||||
this.data.propertyInfos[e].visible = true; |
||||
} |
||||
//隐藏
|
||||
noVisible (e) { |
||||
this.data.propertyInfos[e].visible = false |
||||
noVisible(e) { |
||||
this.data.propertyInfos[e].visible = false; |
||||
} |
||||
//启用
|
||||
enabled (e) { |
||||
this.data.propertyInfos[e].enabled = true |
||||
enabled(e) { |
||||
this.data.propertyInfos[e].enabled = true; |
||||
} |
||||
//禁用
|
||||
noEnabled (e) { |
||||
this.data.propertyInfos[e].enabled = false |
||||
noEnabled(e) { |
||||
this.data.propertyInfos[e].enabled = false; |
||||
} |
||||
//删除
|
||||
delete (e) { |
||||
let isTrue = confirm('您确定要删除吗') |
||||
delete(e) { |
||||
let isTrue = confirm("您确定要删除吗"); |
||||
if (isTrue) { |
||||
this.data.propertyInfos.splice(e,1) |
||||
this.setIndex() |
||||
this.dataSource = new MatTableDataSource<any>(this.data.propertyInfos) |
||||
this.data.propertyInfos.splice(e, 1); |
||||
this.setIndex(); |
||||
this.dataSource = new MatTableDataSource<any>(this.data.propertyInfos); |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
//原件属性保存
|
||||
preservation () { |
||||
preservation() { |
||||
if (this.data.propertyInfos.length) { |
||||
this.data.propertyInfos.forEach(item => { |
||||
delete item.index |
||||
this.data.propertyInfos.forEach((item) => { |
||||
delete item.index; |
||||
}); |
||||
this.submit() |
||||
this.submit(); |
||||
} else { |
||||
this.submit() |
||||
this.submit(); |
||||
} |
||||
} |
||||
|
||||
//提交保存
|
||||
submit () { |
||||
this.http.put(`/api/Assets/${this.data.id}`,{ |
||||
id:this.data.id, |
||||
name:this.data.name, |
||||
width:this.data.width, |
||||
height:this.data.height, |
||||
angle:this.data.angle, |
||||
interactiveMode:this.data.interactiveMode, |
||||
isFromBuilding: this.data.isFromBuilding, |
||||
canConnect:this.data.canConnect, |
||||
holeMaxCount:this.data.holeMaxCount, |
||||
fixedSize:this.data.fixedSize, |
||||
fillMode:this.data.fillMode, |
||||
color:this.data.color, |
||||
imageUrl:this.data.imageUrl, |
||||
drawMode:this.data.drawMode, |
||||
border:this.data.border, |
||||
order:this.data.order, |
||||
enabled:this.data.enabled, |
||||
propertyInfos:this.data.propertyInfos, |
||||
fireElementId:this.data.fireElementId |
||||
}).subscribe(data=>{ |
||||
const config = new MatSnackBarConfig(); |
||||
config.verticalPosition = 'top'; |
||||
config.duration = 3000 |
||||
this.snackBar.open('保存成功','确定',config); |
||||
this.dialogRef.close('success') |
||||
}) |
||||
submit() { |
||||
this.http |
||||
.put(`/api/Assets/${this.data.id}`, { |
||||
id: this.data.id, |
||||
name: this.data.name, |
||||
width: this.data.width, |
||||
height: this.data.height, |
||||
angle: this.data.angle, |
||||
interactiveMode: this.data.interactiveMode, |
||||
isFromBuilding: this.data.isFromBuilding, |
||||
canConnect: this.data.canConnect, |
||||
holeMaxCount: this.data.holeMaxCount, |
||||
fixedSize: this.data.fixedSize, |
||||
fillMode: this.data.fillMode, |
||||
color: this.data.color, |
||||
imageUrl: this.data.imageUrl, |
||||
drawMode: this.data.drawMode, |
||||
border: this.data.border, |
||||
order: this.data.order, |
||||
enabled: this.data.enabled, |
||||
propertyInfos: this.data.propertyInfos, |
||||
fireElementId: this.data.fireElementId, |
||||
}) |
||||
.subscribe((data) => { |
||||
const config = new MatSnackBarConfig(); |
||||
config.verticalPosition = "top"; |
||||
config.duration = 3000; |
||||
this.snackBar.open("保存成功", "确定", config); |
||||
this.dialogRef.close("success"); |
||||
}); |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
//新增属性弹窗
|
||||
export interface Food { |
||||
value: number; |
||||
viewValue: string; |
||||
} |
||||
@Component({ |
||||
selector: 'app-addAttribute', |
||||
templateUrl: './addAttribute.html', |
||||
styleUrls: ['./material-bank.component.scss'] |
||||
selector: "app-addAttribute", |
||||
templateUrl: "./addAttribute.html", |
||||
styleUrls: ["./material-bank.component.scss"], |
||||
}) |
||||
export class addAttributeComponent { |
||||
|
||||
constructor(private http:HttpClient,public dialog: MatDialog, |
||||
public dialogRef: MatDialogRef<addAttributeComponent>,) { } |
||||
constructor( |
||||
private http: HttpClient, |
||||
public dialog: MatDialog, |
||||
public dialogRef: MatDialogRef<addAttributeComponent> |
||||
) {} |
||||
|
||||
ngOnInit(): void {} |
||||
|
||||
//定义属性数据
|
||||
propertyType:Food[]=[ |
||||
{value:0, viewValue: '单行文本'}, |
||||
{value:1, viewValue: '多行文本'}, |
||||
{value:2, viewValue: '数值'}, |
||||
{value:3, viewValue: '图片'}, |
||||
{value:4, viewValue: '图片数量'}, |
||||
{value:5, viewValue: '方向'}, |
||||
{value:6, viewValue: '布尔值'}, |
||||
{value:7, viewValue: '供给区域'}, |
||||
{value:8, viewValue: '供给类型'}] |
||||
propertyType: Food[] = [ |
||||
{ value: 0, viewValue: "单行文本" }, |
||||
{ value: 1, viewValue: "多行文本" }, |
||||
{ value: 2, viewValue: "数值" }, |
||||
{ value: 3, viewValue: "图片" }, |
||||
{ value: 4, viewValue: "图片数量" }, |
||||
{ value: 5, viewValue: "方向" }, |
||||
{ value: 6, viewValue: "布尔值" }, |
||||
{ value: 7, viewValue: "供给区域" }, |
||||
{ value: 8, viewValue: "供给类型" }, |
||||
]; |
||||
|
||||
//提交表单
|
||||
onSubmit (e) { |
||||
e.order = 0 |
||||
e.enabled = true |
||||
e.visible = true |
||||
e.required = e.required=='true'? true: false, |
||||
this.dialogRef.close(e) |
||||
} |
||||
|
||||
onSubmit(e) { |
||||
e.order = 0; |
||||
e.enabled = true; |
||||
e.visible = true; |
||||
(e.required = e.required == "true" ? true : false), this.dialogRef.close(e); |
||||
} |
||||
} |
||||
|
||||
|
||||
|
||||
//编辑属性弹窗
|
||||
@Component({ |
||||
selector: 'app-editAttribute', |
||||
templateUrl: './editAttribute.html', |
||||
styleUrls: ['./material-bank.component.scss'] |
||||
selector: "app-editAttribute", |
||||
templateUrl: "./editAttribute.html", |
||||
styleUrls: ["./material-bank.component.scss"], |
||||
}) |
||||
export class editAttribute { |
||||
|
||||
constructor(private http:HttpClient,public dialog: MatDialog, |
||||
constructor( |
||||
private http: HttpClient, |
||||
public dialog: MatDialog, |
||||
public dialogRef: MatDialogRef<editAttribute>, |
||||
@Inject(MAT_DIALOG_DATA) public data,) { } |
||||
@Inject(MAT_DIALOG_DATA) public data |
||||
) {} |
||||
|
||||
ngOnInit(): void { |
||||
this.propertyName = this.data.propertyName |
||||
this.propertyValue = this.data.propertyValue |
||||
this.propertyType = this.data.propertyType |
||||
this.required = String(this.data.required) |
||||
this.ruleName = this.data.ruleName |
||||
this.ruleValue = this.data.ruleValue |
||||
this.physicalUnit = this.data.physicalUnit |
||||
this.tag = this.data.tag} |
||||
|
||||
|
||||
propertyName:any |
||||
propertyValue:any; |
||||
propertyType:number; |
||||
required:any; |
||||
ruleName:any; |
||||
ruleValue:any; |
||||
physicalUnit:any; |
||||
tag:any; |
||||
this.propertyName = this.data.propertyName; |
||||
this.propertyValue = this.data.propertyValue; |
||||
this.propertyType = this.data.propertyType; |
||||
this.required = String(this.data.required); |
||||
this.ruleName = this.data.ruleName; |
||||
this.ruleValue = this.data.ruleValue; |
||||
this.physicalUnit = this.data.physicalUnit; |
||||
this.tag = this.data.tag; |
||||
} |
||||
|
||||
propertyName: any; |
||||
propertyValue: any; |
||||
propertyType: number; |
||||
required: any; |
||||
ruleName: any; |
||||
ruleValue: any; |
||||
physicalUnit: any; |
||||
tag: any; |
||||
|
||||
//定义属性数据
|
||||
type:Food[]=[ |
||||
{value:0, viewValue: '单行文本'}, |
||||
{value:1, viewValue: '多行文本'}, |
||||
{value:2, viewValue: '数值'}, |
||||
{value:3, viewValue: '图片'}, |
||||
{value:4, viewValue: '图片数量'}, |
||||
{value:5, viewValue: '方向'}, |
||||
{value:6, viewValue: '布尔值'}, |
||||
{value:7, viewValue: '供给区域'}, |
||||
{value:8, viewValue: '供给类型'}] |
||||
type: Food[] = [ |
||||
{ value: 0, viewValue: "单行文本" }, |
||||
{ value: 1, viewValue: "多行文本" }, |
||||
{ value: 2, viewValue: "数值" }, |
||||
{ value: 3, viewValue: "图片" }, |
||||
{ value: 4, viewValue: "图片数量" }, |
||||
{ value: 5, viewValue: "方向" }, |
||||
{ value: 6, viewValue: "布尔值" }, |
||||
{ value: 7, viewValue: "供给区域" }, |
||||
{ value: 8, viewValue: "供给类型" }, |
||||
]; |
||||
|
||||
//提交表单
|
||||
onSubmit (e) { |
||||
e.order = 0 |
||||
e.enabled = this.data.enabled |
||||
e.visible = this.data.visible |
||||
e.index = this.data.index |
||||
e.required = e.required=='true'? true: false, |
||||
this.dialogRef.close(e) |
||||
onSubmit(e) { |
||||
e.order = 0; |
||||
e.enabled = this.data.enabled; |
||||
e.visible = this.data.visible; |
||||
e.index = this.data.index; |
||||
(e.required = e.required == "true" ? true : false), this.dialogRef.close(e); |
||||
} |
||||
|
||||
|
||||
|
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue