@dssp/project 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/assets/images/hatiolab-logo.png +0 -0
- package/assets/images/o-mark.png +0 -0
- package/assets/images/x-mark.png +0 -0
- package/client/bootstrap.ts +0 -0
- package/client/index.ts +0 -0
- package/client/pages/checklist/checklist-importer.ts +96 -0
- package/client/pages/checklist/checklist-list-page.ts +355 -0
- package/client/pages/lib/waether.ts +159 -0
- package/client/pages/project/ox-progress-circle.ts +133 -0
- package/client/pages/project/project-create-popup.ts +148 -0
- package/client/pages/project/project-detail.ts +618 -0
- package/client/pages/project/project-list.ts +354 -0
- package/client/pages/project/project-plan-management.ts +437 -0
- package/client/pages/project/project-schedule-list.ts +280 -0
- package/client/pages/project/project-schedule.ts +248 -0
- package/client/pages/project/project-setting-list.ts +298 -0
- package/client/pages/project/project-update.ts +797 -0
- package/client/pages/resource/resource-importer.ts +96 -0
- package/client/pages/resource/resource-list-page.ts +355 -0
- package/client/pages/task/task-importer.ts +96 -0
- package/client/pages/task/task-list-page.ts +355 -0
- package/client/route.ts +39 -0
- package/client/tsconfig.json +11 -0
- package/dist-client/bootstrap.d.ts +0 -0
- package/dist-client/bootstrap.js +2 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/index.d.ts +0 -0
- package/dist-client/index.js +2 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/pages/checklist/checklist-importer.d.ts +9 -0
- package/dist-client/pages/checklist/checklist-importer.js +100 -0
- package/dist-client/pages/checklist/checklist-importer.js.map +1 -0
- package/dist-client/pages/checklist/checklist-list-page.d.ts +62 -0
- package/dist-client/pages/checklist/checklist-list-page.js +331 -0
- package/dist-client/pages/checklist/checklist-list-page.js.map +1 -0
- package/dist-client/pages/lib/waether.d.ts +6 -0
- package/dist-client/pages/lib/waether.js +152 -0
- package/dist-client/pages/lib/waether.js.map +1 -0
- package/dist-client/pages/project/ox-progress-circle.d.ts +41 -0
- package/dist-client/pages/project/ox-progress-circle.js +182 -0
- package/dist-client/pages/project/ox-progress-circle.js.map +1 -0
- package/dist-client/pages/project/project-create-popup.d.ts +14 -0
- package/dist-client/pages/project/project-create-popup.js +153 -0
- package/dist-client/pages/project/project-create-popup.js.map +1 -0
- package/dist-client/pages/project/project-detail.d.ts +35 -0
- package/dist-client/pages/project/project-detail.js +617 -0
- package/dist-client/pages/project/project-detail.js.map +1 -0
- package/dist-client/pages/project/project-list.d.ts +88 -0
- package/dist-client/pages/project/project-list.js +303 -0
- package/dist-client/pages/project/project-list.js.map +1 -0
- package/dist-client/pages/project/project-plan-management.d.ts +27 -0
- package/dist-client/pages/project/project-plan-management.js +438 -0
- package/dist-client/pages/project/project-plan-management.js.map +1 -0
- package/dist-client/pages/project/project-schedule-list.d.ts +18 -0
- package/dist-client/pages/project/project-schedule-list.js +292 -0
- package/dist-client/pages/project/project-schedule-list.js.map +1 -0
- package/dist-client/pages/project/project-schedule.d.ts +23 -0
- package/dist-client/pages/project/project-schedule.js +256 -0
- package/dist-client/pages/project/project-schedule.js.map +1 -0
- package/dist-client/pages/project/project-setting-list.d.ts +23 -0
- package/dist-client/pages/project/project-setting-list.js +307 -0
- package/dist-client/pages/project/project-setting-list.js.map +1 -0
- package/dist-client/pages/project/project-update.d.ts +24 -0
- package/dist-client/pages/project/project-update.js +797 -0
- package/dist-client/pages/project/project-update.js.map +1 -0
- package/dist-client/pages/resource/resource-importer.d.ts +9 -0
- package/dist-client/pages/resource/resource-importer.js +100 -0
- package/dist-client/pages/resource/resource-importer.js.map +1 -0
- package/dist-client/pages/resource/resource-list-page.d.ts +62 -0
- package/dist-client/pages/resource/resource-list-page.js +331 -0
- package/dist-client/pages/resource/resource-list-page.js.map +1 -0
- package/dist-client/pages/task/task-importer.d.ts +9 -0
- package/dist-client/pages/task/task-importer.js +100 -0
- package/dist-client/pages/task/task-importer.js.map +1 -0
- package/dist-client/pages/task/task-list-page.d.ts +62 -0
- package/dist-client/pages/task/task-list-page.js +331 -0
- package/dist-client/pages/task/task-list-page.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +32 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-server/controllers/index.js +1 -0
- package/dist-server/controllers/index.js.map +1 -0
- package/dist-server/controllers/project-to-excel.js +30 -0
- package/dist-server/controllers/project-to-excel.js.map +1 -0
- package/dist-server/index.js +6 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/middlewares/index.js +8 -0
- package/dist-server/middlewares/index.js.map +1 -0
- package/dist-server/routes.js +105 -0
- package/dist-server/routes.js.map +1 -0
- package/dist-server/service/check-item/check-item-mutation.js +129 -0
- package/dist-server/service/check-item/check-item-mutation.js.map +1 -0
- package/dist-server/service/check-item/check-item-query.js +86 -0
- package/dist-server/service/check-item/check-item-query.js.map +1 -0
- package/dist-server/service/check-item/check-item-type.js +69 -0
- package/dist-server/service/check-item/check-item-type.js.map +1 -0
- package/dist-server/service/check-item/check-item.js +84 -0
- package/dist-server/service/check-item/check-item.js.map +1 -0
- package/dist-server/service/check-item/index.js +9 -0
- package/dist-server/service/check-item/index.js.map +1 -0
- package/dist-server/service/checklist/checklist-mutation.js +129 -0
- package/dist-server/service/checklist/checklist-mutation.js.map +1 -0
- package/dist-server/service/checklist/checklist-query.js +86 -0
- package/dist-server/service/checklist/checklist-query.js.map +1 -0
- package/dist-server/service/checklist/checklist-type.js +69 -0
- package/dist-server/service/checklist/checklist-type.js.map +1 -0
- package/dist-server/service/checklist/checklist.js +120 -0
- package/dist-server/service/checklist/checklist.js.map +1 -0
- package/dist-server/service/checklist/index.js +9 -0
- package/dist-server/service/checklist/index.js.map +1 -0
- package/dist-server/service/index.js +36 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/project/index.js +11 -0
- package/dist-server/service/project/index.js.map +1 -0
- package/dist-server/service/project/project-mutation.js +190 -0
- package/dist-server/service/project/project-mutation.js.map +1 -0
- package/dist-server/service/project/project-query.js +143 -0
- package/dist-server/service/project/project-query.js.map +1 -0
- package/dist-server/service/project/project-type.js +106 -0
- package/dist-server/service/project/project-type.js.map +1 -0
- package/dist-server/service/project/project.js +146 -0
- package/dist-server/service/project/project.js.map +1 -0
- package/dist-server/service/resource/index.js +9 -0
- package/dist-server/service/resource/index.js.map +1 -0
- package/dist-server/service/resource/resource-mutation.js +129 -0
- package/dist-server/service/resource/resource-mutation.js.map +1 -0
- package/dist-server/service/resource/resource-query.js +86 -0
- package/dist-server/service/resource/resource-query.js.map +1 -0
- package/dist-server/service/resource/resource-type.js +69 -0
- package/dist-server/service/resource/resource-type.js.map +1 -0
- package/dist-server/service/resource/resource.js +62 -0
- package/dist-server/service/resource/resource.js.map +1 -0
- package/dist-server/service/task/index.js +9 -0
- package/dist-server/service/task/index.js.map +1 -0
- package/dist-server/service/task/task-mutation.js +129 -0
- package/dist-server/service/task/task-mutation.js.map +1 -0
- package/dist-server/service/task/task-query.js +86 -0
- package/dist-server/service/task/task-query.js.map +1 -0
- package/dist-server/service/task/task-type.js +69 -0
- package/dist-server/service/task/task-type.js.map +1 -0
- package/dist-server/service/task/task.js +106 -0
- package/dist-server/service/task/task.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/helps/management/alarm.md +160 -0
- package/helps/management/alter-video.md +160 -0
- package/helps/management/cctv.md +160 -0
- package/helps/management/device.md +160 -0
- package/helps/management/parking.md +160 -0
- package/helps/management/site.md +160 -0
- package/helps/management/sun-pnl.md +160 -0
- package/helps/project/checklist.md +160 -0
- package/helps/project/project.md +160 -0
- package/helps/project/resource.md +160 -0
- package/helps/project/task.md +160 -0
- package/package.json +38 -0
- package/server/controllers/index.ts +0 -0
- package/server/controllers/project-to-excel.ts +40 -0
- package/server/index.ts +3 -0
- package/server/middlewares/index.ts +3 -0
- package/server/routes.ts +108 -0
- package/server/service/check-item/check-item-mutation.ts +142 -0
- package/server/service/check-item/check-item-query.ts +56 -0
- package/server/service/check-item/check-item-type.ts +49 -0
- package/server/service/check-item/check-item.ts +74 -0
- package/server/service/check-item/index.ts +6 -0
- package/server/service/checklist/checklist-mutation.ts +142 -0
- package/server/service/checklist/checklist-query.ts +56 -0
- package/server/service/checklist/checklist-type.ts +49 -0
- package/server/service/checklist/checklist.ts +105 -0
- package/server/service/checklist/index.ts +6 -0
- package/server/service/index.ts +35 -0
- package/server/service/project/index.ts +8 -0
- package/server/service/project/project-mutation.ts +201 -0
- package/server/service/project/project-query.ts +103 -0
- package/server/service/project/project-type.ts +71 -0
- package/server/service/project/project.ts +131 -0
- package/server/service/resource/index.ts +6 -0
- package/server/service/resource/resource-mutation.ts +139 -0
- package/server/service/resource/resource-query.ts +56 -0
- package/server/service/resource/resource-type.ts +49 -0
- package/server/service/resource/resource.ts +56 -0
- package/server/service/task/index.ts +6 -0
- package/server/service/task/task-mutation.ts +136 -0
- package/server/service/task/task-query.ts +56 -0
- package/server/service/task/task-type.ts +49 -0
- package/server/service/task/task.ts +97 -0
- package/server/tsconfig.json +10 -0
- package/things-factory.config.js +20 -0
- package/translations/en.json +1 -0
- package/translations/ja.json +1 -0
- package/translations/ko.json +9 -0
- package/translations/ms.json +1 -0
- package/translations/zh.json +1 -0
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
import { PageView } from '@operato/shell'
|
|
2
|
+
import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'
|
|
3
|
+
import { css, html } from 'lit'
|
|
4
|
+
import { customElement, state } from 'lit/decorators.js'
|
|
5
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
6
|
+
import { client } from '@operato/graphql'
|
|
7
|
+
import { notify } from '@operato/layout'
|
|
8
|
+
|
|
9
|
+
import gql from 'graphql-tag'
|
|
10
|
+
import { Building, Project } from './project-list'
|
|
11
|
+
import '@material/web/button/elevated-button.js'
|
|
12
|
+
import '@material/web/textfield/outlined-text-field.js'
|
|
13
|
+
import '@material/web/button/filled-button.js'
|
|
14
|
+
import '@material/web/button/outlined-button.js'
|
|
15
|
+
|
|
16
|
+
@customElement('project-plan-management')
|
|
17
|
+
export class ProjectPlanManagement extends ScopedElementsMixin(PageView) {
|
|
18
|
+
static styles = [
|
|
19
|
+
css`
|
|
20
|
+
:host {
|
|
21
|
+
display: grid;
|
|
22
|
+
grid-template-rows: 75px auto;
|
|
23
|
+
color: #4e5055;
|
|
24
|
+
|
|
25
|
+
width: 100%;
|
|
26
|
+
background-color: #f7f7f7;
|
|
27
|
+
overflow-y: auto;
|
|
28
|
+
|
|
29
|
+
--grid-record-emphasized-background-color: red;
|
|
30
|
+
--grid-record-emphasized-color: yellow;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
md-outlined-text-field {
|
|
34
|
+
width: 100%;
|
|
35
|
+
|
|
36
|
+
--md-outlined-text-field-container-shape: 5px;
|
|
37
|
+
--md-sys-color-primary: #586878;
|
|
38
|
+
--md-outlined-text-field-input-text-size: 14px;
|
|
39
|
+
--md-outlined-field-bottom-space: 4px;
|
|
40
|
+
--md-outlined-field-top-space: 4px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
ox-input-image {
|
|
44
|
+
width: 100px;
|
|
45
|
+
height: 100px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
div[header] {
|
|
49
|
+
display: flex;
|
|
50
|
+
margin: 0px 20px;
|
|
51
|
+
|
|
52
|
+
h2 {
|
|
53
|
+
flex: 0.5;
|
|
54
|
+
color: #3f71a0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
div[button-container] {
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
justify-content: end;
|
|
61
|
+
flex: 0.5;
|
|
62
|
+
|
|
63
|
+
md-elevated-button {
|
|
64
|
+
margin: 0px 3px;
|
|
65
|
+
|
|
66
|
+
--md-elevated-button-container-height: 35px;
|
|
67
|
+
--md-elevated-button-label-text-size: 16px;
|
|
68
|
+
--md-elevated-button-container-color: #0595e5;
|
|
69
|
+
|
|
70
|
+
--md-elevated-button-label-text-color: #fff;
|
|
71
|
+
--md-elevated-button-hover-label-text-color: #fff;
|
|
72
|
+
--md-elevated-button-pressed-label-text-color: #fff;
|
|
73
|
+
--md-elevated-button-focus-label-text-color: #fff;
|
|
74
|
+
--md-elevated-button-icon-color: #fff;
|
|
75
|
+
--md-elevated-button-hover-icon-color: #fff;
|
|
76
|
+
--md-elevated-button-pressed-icon-color: #fff;
|
|
77
|
+
--md-elevated-button-focus-icon-color: #fff;
|
|
78
|
+
|
|
79
|
+
&[green] {
|
|
80
|
+
--md-elevated-button-container-color: #42b382;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
div[body] {
|
|
87
|
+
display: grid;
|
|
88
|
+
grid-template-rows: 240px 400px 60px;
|
|
89
|
+
margin: 0px 25px 25px 25px;
|
|
90
|
+
gap: 8px;
|
|
91
|
+
|
|
92
|
+
& > div {
|
|
93
|
+
display: grid;
|
|
94
|
+
grid-template-rows: 25px auto;
|
|
95
|
+
padding: 15px;
|
|
96
|
+
background-color: #ffffff;
|
|
97
|
+
border: 1px solid #cccccc80;
|
|
98
|
+
border-radius: 5px;
|
|
99
|
+
gap: 14px;
|
|
100
|
+
|
|
101
|
+
h3 {
|
|
102
|
+
color: #2e79be;
|
|
103
|
+
font-size: 18px;
|
|
104
|
+
margin: 0px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
& > div[building-container] > div {
|
|
109
|
+
display: flex;
|
|
110
|
+
gap: 16px;
|
|
111
|
+
overflow-x: auto;
|
|
112
|
+
overflow-y: hidden;
|
|
113
|
+
|
|
114
|
+
ox-input-file {
|
|
115
|
+
height: 120px;
|
|
116
|
+
}
|
|
117
|
+
span[building] {
|
|
118
|
+
width: 125px;
|
|
119
|
+
text-align: center;
|
|
120
|
+
|
|
121
|
+
div {
|
|
122
|
+
color: #586878;
|
|
123
|
+
margin-top: 7px;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
& > div[floor-container] {
|
|
129
|
+
div[floor-title] {
|
|
130
|
+
display: flex;
|
|
131
|
+
justify-content: space-between;
|
|
132
|
+
height: fit-content;
|
|
133
|
+
|
|
134
|
+
span[building-button] {
|
|
135
|
+
display: flex;
|
|
136
|
+
max-width: 500px;
|
|
137
|
+
gap: 10px;
|
|
138
|
+
overflow-x: auto;
|
|
139
|
+
overflow-y: hidden;
|
|
140
|
+
|
|
141
|
+
md-filled-button {
|
|
142
|
+
--md-filled-button-container-color: #0595e5;
|
|
143
|
+
--md-filled-button-container-height: 30px;
|
|
144
|
+
--md-filled-button-trailing-space: 15px;
|
|
145
|
+
--md-filled-button-leading-space: 15px;
|
|
146
|
+
}
|
|
147
|
+
md-outlined-button {
|
|
148
|
+
--md-outlined-button-container-height: 30px;
|
|
149
|
+
--md-outlined-button-trailing-space: 15px;
|
|
150
|
+
--md-outlined-button-leading-space: 15px;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
div[floor-plan] {
|
|
156
|
+
overflow-y: auto;
|
|
157
|
+
margin-top: 10px;
|
|
158
|
+
|
|
159
|
+
& > span {
|
|
160
|
+
width: 150px;
|
|
161
|
+
display: inline-block;
|
|
162
|
+
text-align: center;
|
|
163
|
+
margin: 0px 10px 15px 0px;
|
|
164
|
+
|
|
165
|
+
& > div {
|
|
166
|
+
margin-top: 7px;
|
|
167
|
+
|
|
168
|
+
&[no-data] {
|
|
169
|
+
color: #f16154;
|
|
170
|
+
font-weight: bold;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
& > div[plan-scale-container] {
|
|
178
|
+
display: flex;
|
|
179
|
+
|
|
180
|
+
& > div {
|
|
181
|
+
display: flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
gap: 12px;
|
|
184
|
+
margin-left: 10px;
|
|
185
|
+
|
|
186
|
+
md-outlined-text-field {
|
|
187
|
+
width: 100px;
|
|
188
|
+
--md-outlined-text-container-height: 30px;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
`
|
|
194
|
+
]
|
|
195
|
+
|
|
196
|
+
get context() {
|
|
197
|
+
return {
|
|
198
|
+
title: '도면 관리'
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
private defaultProject = {
|
|
203
|
+
name: '',
|
|
204
|
+
buildingComplex: {
|
|
205
|
+
address: '',
|
|
206
|
+
area: 0,
|
|
207
|
+
constructionCompany: '',
|
|
208
|
+
clientCompany: '',
|
|
209
|
+
supervisoryCompany: '',
|
|
210
|
+
designCompany: '',
|
|
211
|
+
constructionType: '',
|
|
212
|
+
buildings: []
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
@state() projectId: string = ''
|
|
216
|
+
@state() project: Project = { ...this.defaultProject }
|
|
217
|
+
@state() selectedBuildingIdx: number = 0
|
|
218
|
+
|
|
219
|
+
render() {
|
|
220
|
+
return html`
|
|
221
|
+
<div header>
|
|
222
|
+
<h2>도면 관리</h2>
|
|
223
|
+
<div button-container>
|
|
224
|
+
<md-elevated-button green @click=${this._saveProject}>
|
|
225
|
+
<md-icon slot="icon">save</md-icon>정보 저장
|
|
226
|
+
</md-elevated-button>
|
|
227
|
+
<md-elevated-button href=${`project-update/${this.project.id}`}>
|
|
228
|
+
<md-icon slot="icon">assignment</md-icon>프로젝트 정보 수정
|
|
229
|
+
</md-elevated-button>
|
|
230
|
+
<md-elevated-button href=${`project-task-update/${this.project.id}`}>
|
|
231
|
+
<md-icon slot="icon">event_note</md-icon>공정표 관리
|
|
232
|
+
</md-elevated-button>
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
235
|
+
|
|
236
|
+
<div body>
|
|
237
|
+
<div building-container>
|
|
238
|
+
<h3>동별 도면(BIM)</h3>
|
|
239
|
+
<div>
|
|
240
|
+
${this.project.buildingComplex?.buildings?.map((building, idx) => {
|
|
241
|
+
return html`
|
|
242
|
+
<span building>
|
|
243
|
+
<ox-input-file
|
|
244
|
+
name="building-drawing"
|
|
245
|
+
.value=${building?.drawing || undefined}
|
|
246
|
+
label=" "
|
|
247
|
+
description="동 도면 업로드"
|
|
248
|
+
idx=${idx}
|
|
249
|
+
@change=${this.onCreateAttachment.bind(this)}
|
|
250
|
+
></ox-input-file>
|
|
251
|
+
<div>${building.name}</div>
|
|
252
|
+
</span>
|
|
253
|
+
`
|
|
254
|
+
})}
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
|
|
258
|
+
<div floor-container>
|
|
259
|
+
<div floor-title>
|
|
260
|
+
<h3>${this.project.buildingComplex?.buildings?.[this.selectedBuildingIdx]?.name} 층별 도면(PDF)</h3>
|
|
261
|
+
<span building-button>
|
|
262
|
+
${this.project.buildingComplex.buildings?.map((building, idx) => {
|
|
263
|
+
return this.project.buildingComplex?.buildings?.[this.selectedBuildingIdx]?.id === building.id
|
|
264
|
+
? html`
|
|
265
|
+
<md-filled-button @click=${() => this._onClickBuildingChange(idx)}>
|
|
266
|
+
${building.name}
|
|
267
|
+
</md-filled-button>
|
|
268
|
+
`
|
|
269
|
+
: html`
|
|
270
|
+
<md-outlined-button @click=${() => this._onClickBuildingChange(idx)}>
|
|
271
|
+
${building.name}
|
|
272
|
+
</md-outlined-button>
|
|
273
|
+
`
|
|
274
|
+
})}
|
|
275
|
+
</span>
|
|
276
|
+
</div>
|
|
277
|
+
|
|
278
|
+
<div floor-plan>
|
|
279
|
+
${this.project.buildingComplex?.buildings?.[this.selectedBuildingIdx]?.buildingLevels?.map(
|
|
280
|
+
(buildingLevel, idx) => {
|
|
281
|
+
return html`
|
|
282
|
+
<span plan>
|
|
283
|
+
<ox-input-file
|
|
284
|
+
name="building-plan"
|
|
285
|
+
.value=${buildingLevel?.mainDrawing || undefined}
|
|
286
|
+
label=" "
|
|
287
|
+
description="층 도면 업로드"
|
|
288
|
+
idx=${idx}
|
|
289
|
+
@change=${this.onCreateAttachment.bind(this)}
|
|
290
|
+
></ox-input-file>
|
|
291
|
+
<div ?no-data=${!buildingLevel?.mainDrawing}>${buildingLevel.floor}층</div>
|
|
292
|
+
</span>
|
|
293
|
+
`
|
|
294
|
+
}
|
|
295
|
+
)}
|
|
296
|
+
</div>
|
|
297
|
+
</div>
|
|
298
|
+
|
|
299
|
+
<div plan-scale-container>
|
|
300
|
+
<h3>도면 축척 설정</h3>
|
|
301
|
+
<div>
|
|
302
|
+
<span>가로</span>
|
|
303
|
+
<md-outlined-text-field
|
|
304
|
+
type="text"
|
|
305
|
+
name="planXScale"
|
|
306
|
+
numeric
|
|
307
|
+
.value=${this.project.buildingComplex.planXScale?.toString() || ''}
|
|
308
|
+
@input=${this._onInputChange}
|
|
309
|
+
suffix-text="mm"
|
|
310
|
+
>
|
|
311
|
+
</md-outlined-text-field>
|
|
312
|
+
<span>X</span>
|
|
313
|
+
<span>세로</span>
|
|
314
|
+
<md-outlined-text-field
|
|
315
|
+
type="text"
|
|
316
|
+
name="planYScale"
|
|
317
|
+
numeric
|
|
318
|
+
.value=${this.project.buildingComplex.planYScale?.toString() || ''}
|
|
319
|
+
@input=${this._onInputChange}
|
|
320
|
+
suffix-text="mm"
|
|
321
|
+
>
|
|
322
|
+
</md-outlined-text-field>
|
|
323
|
+
</div>
|
|
324
|
+
</div>
|
|
325
|
+
</div>
|
|
326
|
+
`
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
async pageInitialized(lifecycle: PageLifecycle) {}
|
|
330
|
+
|
|
331
|
+
async pageUpdated(changes: any, lifecycle: PageLifecycle) {
|
|
332
|
+
if (this.active) {
|
|
333
|
+
this.projectId = lifecycle.resourceId || ''
|
|
334
|
+
await this.initProject(this.projectId)
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
async initProject(projectId: string = '') {
|
|
339
|
+
const response = await client.query({
|
|
340
|
+
query: gql`
|
|
341
|
+
query Project($id: String!) {
|
|
342
|
+
project(id: $id) {
|
|
343
|
+
id
|
|
344
|
+
name
|
|
345
|
+
buildingComplex {
|
|
346
|
+
id
|
|
347
|
+
planXScale
|
|
348
|
+
planYScale
|
|
349
|
+
buildings {
|
|
350
|
+
id
|
|
351
|
+
name
|
|
352
|
+
drawing {
|
|
353
|
+
id
|
|
354
|
+
name
|
|
355
|
+
}
|
|
356
|
+
buildingLevels {
|
|
357
|
+
id
|
|
358
|
+
floor
|
|
359
|
+
mainDrawing {
|
|
360
|
+
id
|
|
361
|
+
name
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
`,
|
|
369
|
+
variables: {
|
|
370
|
+
id: projectId
|
|
371
|
+
}
|
|
372
|
+
})
|
|
373
|
+
|
|
374
|
+
this.project = response.data?.project
|
|
375
|
+
this.selectedBuildingIdx = 0
|
|
376
|
+
|
|
377
|
+
console.log('init project : ', this.project)
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
private async _saveProject() {
|
|
381
|
+
// 첨부 파일 필드 제거 (첨부 파일은 {filename}Upload 로 전송)
|
|
382
|
+
for (let buildingKey in this.project.buildingComplex.buildings) {
|
|
383
|
+
const building = this.project.buildingComplex.buildings[buildingKey]
|
|
384
|
+
delete this.project.buildingComplex.buildings[buildingKey].drawing
|
|
385
|
+
|
|
386
|
+
for (let levelKey in building.buildingLevels) {
|
|
387
|
+
delete this.project.buildingComplex.buildings[buildingKey].buildingLevels[levelKey].mainDrawing
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
console.log('this.project :', this.project)
|
|
392
|
+
|
|
393
|
+
const response = await client.mutate({
|
|
394
|
+
mutation: gql`
|
|
395
|
+
mutation UpdateProjectPlan($project: ProjectPatch!) {
|
|
396
|
+
updateProjectPlan(project: $project) {
|
|
397
|
+
id
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
`,
|
|
401
|
+
variables: {
|
|
402
|
+
project: this.project
|
|
403
|
+
},
|
|
404
|
+
context: {
|
|
405
|
+
hasUpload: true
|
|
406
|
+
}
|
|
407
|
+
})
|
|
408
|
+
|
|
409
|
+
if (!response.errors) {
|
|
410
|
+
notify({ message: '저장에 성공하였습니다.' })
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
// Input 요소의 값이 변경될 때 호출되는 콜백 함수
|
|
415
|
+
private _onInputChange(event: InputEvent, idx: number) {
|
|
416
|
+
const target = event.target as HTMLInputElement
|
|
417
|
+
let inputVal: any = target.value
|
|
418
|
+
this.project.buildingComplex![target.name] = Number(inputVal.replace(/\D/g, ''))
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
// 이미지 업로드
|
|
422
|
+
async onCreateAttachment(e: CustomEvent) {
|
|
423
|
+
const target = e.target as HTMLInputElement
|
|
424
|
+
const file = e.detail[0] || null
|
|
425
|
+
const idx = Number(target.getAttribute('idx')) || 0
|
|
426
|
+
|
|
427
|
+
if (target.name === 'building-drawing') {
|
|
428
|
+
this.project.buildingComplex!.buildings![idx].drawingUpload = file
|
|
429
|
+
} else {
|
|
430
|
+
this.project.buildingComplex!.buildings![this.selectedBuildingIdx].buildingLevels![idx].mainDrawingUpload = file
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
_onClickBuildingChange(idx: number) {
|
|
435
|
+
this.selectedBuildingIdx = idx
|
|
436
|
+
}
|
|
437
|
+
}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { PageView } from '@operato/shell'
|
|
2
|
+
import { css, html } from 'lit'
|
|
3
|
+
import { customElement, state } from 'lit/decorators.js'
|
|
4
|
+
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
5
|
+
import { client } from '@operato/graphql'
|
|
6
|
+
import gql from 'graphql-tag'
|
|
7
|
+
import { Project } from './project-list'
|
|
8
|
+
|
|
9
|
+
@customElement('project-schedule-list')
|
|
10
|
+
export class ProjectScheduleListPage extends ScopedElementsMixin(PageView) {
|
|
11
|
+
static styles = [
|
|
12
|
+
css`
|
|
13
|
+
:host {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
overflow-y: auto;
|
|
17
|
+
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
background-color: #f7f7f7;
|
|
21
|
+
|
|
22
|
+
--grid-record-emphasized-background-color: red;
|
|
23
|
+
--grid-record-emphasized-color: yellow;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
div[header] {
|
|
27
|
+
display: flex;
|
|
28
|
+
height: 100px;
|
|
29
|
+
align-items: center;
|
|
30
|
+
background-color: #2ea4df1a;
|
|
31
|
+
border: 1px solid #2ea4df33;
|
|
32
|
+
margin: 15px 23px;
|
|
33
|
+
font-size: 18px;
|
|
34
|
+
padding: 7px;
|
|
35
|
+
border-radius: 5px;
|
|
36
|
+
|
|
37
|
+
md-filled-text-field[type='search'] {
|
|
38
|
+
margin-left: 5px;
|
|
39
|
+
margin-right: 26px;
|
|
40
|
+
|
|
41
|
+
--md-filled-text-field-container-shape: 0px;
|
|
42
|
+
--md-sys-color-primary: #006a6a;
|
|
43
|
+
--md-sys-color-surface-container-highest: transparent;
|
|
44
|
+
--md-filled-text-field-label-text-color: #999999;
|
|
45
|
+
--md-filled-text-field-input-text-color: #4e5055;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
md-elevated-button[add-project] {
|
|
49
|
+
font-weight: bold;
|
|
50
|
+
font-size: 16px;
|
|
51
|
+
margin-left: 17px;
|
|
52
|
+
padding: 13px 20px;
|
|
53
|
+
|
|
54
|
+
--md-sys-color-surface-container-low: #24be7b;
|
|
55
|
+
--md-sys-color-primary: #ffffff;
|
|
56
|
+
--md-elevated-button-container-shape: 7px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
div[body] {
|
|
61
|
+
div[project-container] {
|
|
62
|
+
height: 140px;
|
|
63
|
+
margin: 17px 23px;
|
|
64
|
+
background-color: #ffffff;
|
|
65
|
+
border: 1px solid #cccccc80;
|
|
66
|
+
border-radius: 5px;
|
|
67
|
+
|
|
68
|
+
& > a {
|
|
69
|
+
display: flex;
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 100%;
|
|
72
|
+
text-decoration: none;
|
|
73
|
+
color: #000;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
img[project-img] {
|
|
77
|
+
width: 285px;
|
|
78
|
+
background-color: #cccccc80;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
span[project-info] {
|
|
82
|
+
flex: 0.45;
|
|
83
|
+
padding: 6px 15px;
|
|
84
|
+
font-size: 16px;
|
|
85
|
+
|
|
86
|
+
white-space: nowrap;
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
text-overflow: ellipsis;
|
|
89
|
+
|
|
90
|
+
div[name] {
|
|
91
|
+
color: #2e79be;
|
|
92
|
+
font-weight: bold;
|
|
93
|
+
font-size: 19px;
|
|
94
|
+
margin-bottom: 2px;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
span[project-state] {
|
|
99
|
+
flex: 0.55;
|
|
100
|
+
padding: 10px 20px;
|
|
101
|
+
|
|
102
|
+
& > div {
|
|
103
|
+
margin-bottom: 3px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
div[progress] {
|
|
107
|
+
position: relative;
|
|
108
|
+
|
|
109
|
+
md-linear-progress {
|
|
110
|
+
--md-linear-progress-track-height: 18px;
|
|
111
|
+
--md-linear-progress-active-indicator-height: 18px;
|
|
112
|
+
--md-linear-progress-track-shape: 5px;
|
|
113
|
+
--md-sys-color-primary: #0595e51a;
|
|
114
|
+
--md-sys-color-surface-container-highest: #0595e533;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
span {
|
|
118
|
+
position: absolute;
|
|
119
|
+
top: 0;
|
|
120
|
+
left: 12px;
|
|
121
|
+
font-size: 12px;
|
|
122
|
+
font-weight: bold;
|
|
123
|
+
color: #2e79be;
|
|
124
|
+
|
|
125
|
+
&:last-child {
|
|
126
|
+
left: unset;
|
|
127
|
+
right: 12px;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
`
|
|
135
|
+
]
|
|
136
|
+
|
|
137
|
+
get context() {
|
|
138
|
+
return {
|
|
139
|
+
title: '진행중 프로젝트'
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@state() private projectName: string = ''
|
|
144
|
+
@state() private projectList: Project[] = []
|
|
145
|
+
@state() private projectCount: number = 0
|
|
146
|
+
|
|
147
|
+
render() {
|
|
148
|
+
return html`
|
|
149
|
+
<div header>
|
|
150
|
+
<label>프로젝트 이름</label>
|
|
151
|
+
<md-filled-text-field
|
|
152
|
+
name="projectName"
|
|
153
|
+
type="search"
|
|
154
|
+
label="프로젝트 이름"
|
|
155
|
+
.value=${this.projectName}
|
|
156
|
+
@input=${this._onInputChange}
|
|
157
|
+
@keypress=${this._onKeypress}
|
|
158
|
+
>
|
|
159
|
+
<md-icon slot="leading-icon">search</md-icon>
|
|
160
|
+
</md-filled-text-field>
|
|
161
|
+
|
|
162
|
+
<strong>총 ${this.projectCount}개</strong>
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
<div body>
|
|
166
|
+
${this.projectList?.map((project: Project) => {
|
|
167
|
+
return html`
|
|
168
|
+
<div project-container>
|
|
169
|
+
<a href=${`project-schedule/${project.id}`}>
|
|
170
|
+
<img project-img src=${project.mainPhoto?.fullpath || ''} />
|
|
171
|
+
|
|
172
|
+
<span project-info>
|
|
173
|
+
<div name>${project.name}</div>
|
|
174
|
+
<div content>${project.buildingComplex.address}</div>
|
|
175
|
+
<div content>면적: ${project.buildingComplex.area}㎡</div>
|
|
176
|
+
<div content>착공~준공: ${project.startDate}~${project.endDate}</div>
|
|
177
|
+
<div content>발주처: <strong>${project.buildingComplex.clientCompany}</strong></div>
|
|
178
|
+
</span>
|
|
179
|
+
|
|
180
|
+
<span project-state>
|
|
181
|
+
<div progress>
|
|
182
|
+
<md-linear-progress buffer="100" max="100" value=${project.totalProgress || 0}>
|
|
183
|
+
</md-linear-progress>
|
|
184
|
+
<span>전체</span>
|
|
185
|
+
<span>${project.totalProgress || 0}%</span>
|
|
186
|
+
</div>
|
|
187
|
+
<div progress>
|
|
188
|
+
<md-linear-progress buffer="100" max="100" value=${project.weeklyProgress || 0}>
|
|
189
|
+
</md-linear-progress>
|
|
190
|
+
<span>주간</span>
|
|
191
|
+
<span>${project.weeklyProgress || 0}%</span>
|
|
192
|
+
</div>
|
|
193
|
+
<div progress>
|
|
194
|
+
<md-linear-progress buffer="100" max="100" value=${project.kpi || 0}> </md-linear-progress>
|
|
195
|
+
<span>KPI</span>
|
|
196
|
+
<span>${project.kpi || 0}%</span>
|
|
197
|
+
</div>
|
|
198
|
+
<div progress>
|
|
199
|
+
<md-linear-progress buffer="100" max="100" value=${project.inspPassRate || 0}> </md-linear-progress>
|
|
200
|
+
<span>Inspection Passing Rate</span>
|
|
201
|
+
<span>${project.inspPassRate || 0}%</span>
|
|
202
|
+
</div>
|
|
203
|
+
<div progress>
|
|
204
|
+
<md-linear-progress buffer="100" max="100" value=${project.robotProgressRate || 0}>
|
|
205
|
+
</md-linear-progress>
|
|
206
|
+
<span>Robot Progress</span>
|
|
207
|
+
<span>${project.robotProgressRate || 0}%</span>
|
|
208
|
+
</div>
|
|
209
|
+
<div progress>
|
|
210
|
+
<md-linear-progress buffer="100" max="100" value=${project.structuralSafetyRate || 0}>
|
|
211
|
+
</md-linear-progress>
|
|
212
|
+
<span>Structural safety</span>
|
|
213
|
+
<span>${project.structuralSafetyRate || 0}%</span>
|
|
214
|
+
</div>
|
|
215
|
+
</span>
|
|
216
|
+
</a>
|
|
217
|
+
</div>
|
|
218
|
+
`
|
|
219
|
+
})}
|
|
220
|
+
</div>
|
|
221
|
+
`
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
async pageInitialized(lifecycle: any) {
|
|
225
|
+
this.getProjectList()
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
async pageUpdated(changes: any, lifecycle: any) {}
|
|
229
|
+
|
|
230
|
+
async getProjectList() {
|
|
231
|
+
const response = await client.query({
|
|
232
|
+
query: gql`
|
|
233
|
+
query Projects($projectName: String!) {
|
|
234
|
+
projects(projectName: $projectName) {
|
|
235
|
+
items {
|
|
236
|
+
id
|
|
237
|
+
name
|
|
238
|
+
startDate
|
|
239
|
+
endDate
|
|
240
|
+
mainPhoto {
|
|
241
|
+
fullpath
|
|
242
|
+
}
|
|
243
|
+
totalProgress
|
|
244
|
+
weeklyProgress
|
|
245
|
+
kpi
|
|
246
|
+
inspPassRate
|
|
247
|
+
robotProgressRate
|
|
248
|
+
structuralSafetyRate
|
|
249
|
+
buildingComplex {
|
|
250
|
+
address
|
|
251
|
+
area
|
|
252
|
+
clientCompany
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
total
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
`,
|
|
259
|
+
variables: {
|
|
260
|
+
projectName: this.projectName || ''
|
|
261
|
+
}
|
|
262
|
+
})
|
|
263
|
+
|
|
264
|
+
this.projectList = response.data.projects?.items || []
|
|
265
|
+
this.projectCount = response.data.projects?.total || 0
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// Input 요소의 값이 변경될 때 호출되는 콜백 함수
|
|
269
|
+
private _onInputChange(event: InputEvent) {
|
|
270
|
+
const target = event.target as HTMLInputElement
|
|
271
|
+
this[target.name] = target.value
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// 검색창에서 엔터입력시 검색
|
|
275
|
+
private _onKeypress(event: KeyboardEvent) {
|
|
276
|
+
if (event.code === 'Enter') {
|
|
277
|
+
this.getProjectList()
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|