@dssp/project 0.0.2 → 0.0.6
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/client/pages/checklist/checklist-importer.ts +6 -8
- package/client/pages/checklist/checklist-list-page.ts +10 -25
- package/client/pages/project/popup/popup-plan-upload.ts +138 -0
- package/client/pages/project/{project-create-popup.ts → popup/popup-project-create.ts} +2 -3
- package/client/pages/project/project-detail.ts +11 -11
- package/client/pages/project/project-list.ts +17 -10
- package/client/pages/project/project-plan-management.ts +117 -39
- package/client/pages/project/project-schedule-list.ts +2 -0
- package/client/pages/project/project-schedule.ts +296 -7
- package/client/pages/project/project-setting-list.ts +10 -6
- package/client/pages/project/project-update.ts +5 -2
- package/client/pages/resource/construction-type-management.ts +211 -0
- package/client/pages/resource/manager-management.ts +202 -0
- package/client/pages/resource/worker-type-management.ts +226 -0
- package/client/pages/task/task-importer.ts +6 -8
- package/client/pages/task/task-list-page.ts +10 -25
- package/client/route.ts +8 -4
- package/dist-client/pages/checklist/checklist-importer.d.ts +1 -0
- package/dist-client/pages/checklist/checklist-importer.js +3 -2
- package/dist-client/pages/checklist/checklist-importer.js.map +1 -1
- package/dist-client/pages/checklist/checklist-list-page.d.ts +1 -0
- package/dist-client/pages/checklist/checklist-list-page.js +8 -16
- package/dist-client/pages/checklist/checklist-list-page.js.map +1 -1
- package/dist-client/pages/project/popup/popup-plan-upload.d.ts +10 -0
- package/dist-client/pages/project/popup/popup-plan-upload.js +139 -0
- package/dist-client/pages/project/popup/popup-plan-upload.js.map +1 -0
- package/dist-client/pages/project/{project-create-popup.d.ts → popup/popup-project-create.d.ts} +1 -3
- package/dist-client/pages/project/{project-create-popup.js → popup/popup-project-create.js} +9 -10
- package/dist-client/pages/project/popup/popup-project-create.js.map +1 -0
- package/dist-client/pages/project/project-detail.d.ts +5 -4
- package/dist-client/pages/project/project-detail.js +9 -10
- package/dist-client/pages/project/project-detail.js.map +1 -1
- package/dist-client/pages/project/project-list.d.ts +12 -2
- package/dist-client/pages/project/project-list.js +11 -14
- package/dist-client/pages/project/project-list.js.map +1 -1
- package/dist-client/pages/project/project-plan-management.d.ts +9 -4
- package/dist-client/pages/project/project-plan-management.js +105 -35
- package/dist-client/pages/project/project-plan-management.js.map +1 -1
- package/dist-client/pages/project/project-schedule-list.d.ts +1 -0
- package/dist-client/pages/project/project-schedule-list.js +1 -0
- package/dist-client/pages/project/project-schedule-list.js.map +1 -1
- package/dist-client/pages/project/project-schedule.d.ts +10 -3
- package/dist-client/pages/project/project-schedule.js +294 -7
- package/dist-client/pages/project/project-schedule.js.map +1 -1
- package/dist-client/pages/project/project-setting-list.d.ts +3 -2
- package/dist-client/pages/project/project-setting-list.js +9 -6
- package/dist-client/pages/project/project-setting-list.js.map +1 -1
- package/dist-client/pages/project/project-update.d.ts +3 -2
- package/dist-client/pages/project/project-update.js +4 -2
- package/dist-client/pages/project/project-update.js.map +1 -1
- package/dist-client/pages/resource/construction-type-management.d.ts +22 -0
- package/dist-client/pages/resource/construction-type-management.js +208 -0
- package/dist-client/pages/resource/construction-type-management.js.map +1 -0
- package/dist-client/pages/resource/manager-management.d.ts +31 -0
- package/dist-client/pages/resource/manager-management.js +196 -0
- package/dist-client/pages/resource/manager-management.js.map +1 -0
- package/dist-client/pages/resource/worker-type-management.d.ts +28 -0
- package/dist-client/pages/resource/worker-type-management.js +222 -0
- package/dist-client/pages/resource/worker-type-management.js.map +1 -0
- package/dist-client/pages/task/task-importer.d.ts +1 -0
- package/dist-client/pages/task/task-importer.js +3 -2
- package/dist-client/pages/task/task-importer.js.map +1 -1
- package/dist-client/pages/task/task-list-page.d.ts +1 -0
- package/dist-client/pages/task/task-list-page.js +8 -16
- package/dist-client/pages/task/task-list-page.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +7 -4
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/controllers/index.d.ts +0 -0
- package/dist-server/controllers/project-to-excel.d.ts +7 -0
- package/dist-server/index.d.ts +2 -0
- package/dist-server/middlewares/index.d.ts +1 -0
- package/dist-server/routes.d.ts +1 -0
- package/dist-server/service/check-item/check-item-mutation.d.ts +10 -0
- package/dist-server/service/check-item/check-item-query.d.ts +11 -0
- package/dist-server/service/check-item/check-item-type.d.ts +18 -0
- package/dist-server/service/check-item/check-item.d.ts +18 -0
- package/dist-server/service/check-item/index.d.ts +5 -0
- package/dist-server/service/checklist/checklist-mutation.d.ts +10 -0
- package/dist-server/service/checklist/checklist-query.d.ts +11 -0
- package/dist-server/service/checklist/checklist-type.d.ts +18 -0
- package/dist-server/service/checklist/checklist.d.ts +26 -0
- package/dist-server/service/checklist/index.d.ts +5 -0
- package/dist-server/service/construction-type/construction-type-mutation.d.ts +6 -0
- package/dist-server/service/construction-type/construction-type-mutation.js +64 -0
- package/dist-server/service/construction-type/construction-type-mutation.js.map +1 -0
- package/dist-server/service/construction-type/construction-type-query.d.ts +11 -0
- package/dist-server/service/construction-type/construction-type-query.js +78 -0
- package/dist-server/service/construction-type/construction-type-query.js.map +1 -0
- package/dist-server/service/construction-type/construction-type-type.d.ts +11 -0
- package/dist-server/service/construction-type/construction-type-type.js +43 -0
- package/dist-server/service/construction-type/construction-type-type.js.map +1 -0
- package/dist-server/service/construction-type/construction-type.d.ts +16 -0
- package/dist-server/service/construction-type/construction-type.js +77 -0
- package/dist-server/service/construction-type/construction-type.js.map +1 -0
- package/dist-server/service/construction-type/index.d.ts +5 -0
- package/dist-server/service/construction-type/index.js +9 -0
- package/dist-server/service/construction-type/index.js.map +1 -0
- package/dist-server/service/index.d.ts +12 -0
- package/dist-server/service/index.js +12 -4
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/manager/index.d.ts +5 -0
- package/dist-server/service/manager/index.js +9 -0
- package/dist-server/service/manager/index.js.map +1 -0
- package/dist-server/service/manager/manager-mutation.d.ts +5 -0
- package/dist-server/service/manager/manager-mutation.js +39 -0
- package/dist-server/service/manager/manager-mutation.js.map +1 -0
- package/dist-server/service/manager/manager-query.d.ts +4 -0
- package/dist-server/service/manager/manager-query.js +39 -0
- package/dist-server/service/manager/manager-query.js.map +1 -0
- package/dist-server/service/manager/manager-type.d.ts +15 -0
- package/dist-server/service/manager/manager-type.js +62 -0
- package/dist-server/service/manager/manager-type.js.map +1 -0
- package/dist-server/service/manager/manager.d.ts +8 -0
- package/dist-server/service/manager/manager.js +41 -0
- package/dist-server/service/manager/manager.js.map +1 -0
- package/dist-server/service/project/index.d.ts +7 -0
- package/dist-server/service/project/project-mutation.d.ts +9 -0
- package/dist-server/service/project/project-mutation.js +61 -55
- package/dist-server/service/project/project-mutation.js.map +1 -1
- package/dist-server/service/project/project-query.d.ts +16 -0
- package/dist-server/service/project/project-query.js +3 -3
- package/dist-server/service/project/project-query.js.map +1 -1
- package/dist-server/service/project/project-type.d.ts +29 -0
- package/dist-server/service/project/project-type.js +1 -2
- package/dist-server/service/project/project-type.js.map +1 -1
- package/dist-server/service/project/project.d.ts +35 -0
- package/dist-server/service/project/project.js +1 -2
- package/dist-server/service/project/project.js.map +1 -1
- package/dist-server/service/task/index.d.ts +5 -0
- package/dist-server/service/task/task-mutation.d.ts +10 -0
- package/dist-server/service/task/task-query.d.ts +11 -0
- package/dist-server/service/task/task-type.d.ts +18 -0
- package/dist-server/service/task/task.d.ts +25 -0
- package/dist-server/service/worker-type/index.d.ts +5 -0
- package/dist-server/service/worker-type/index.js +9 -0
- package/dist-server/service/worker-type/index.js.map +1 -0
- package/dist-server/service/worker-type/worker-type-mutation.d.ts +6 -0
- package/dist-server/service/worker-type/worker-type-mutation.js +64 -0
- package/dist-server/service/worker-type/worker-type-mutation.js.map +1 -0
- package/dist-server/service/worker-type/worker-type-query.d.ts +11 -0
- package/dist-server/service/{resource/resource-query.js → worker-type/worker-type-query.js} +31 -39
- package/dist-server/service/worker-type/worker-type-query.js.map +1 -0
- package/dist-server/service/worker-type/worker-type-type.d.ts +11 -0
- package/dist-server/service/worker-type/worker-type-type.js +43 -0
- package/dist-server/service/worker-type/worker-type-type.js.map +1 -0
- package/dist-server/service/worker-type/worker-type.d.ts +16 -0
- package/dist-server/service/{resource/resource.js → worker-type/worker-type.js} +35 -20
- package/dist-server/service/worker-type/worker-type.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/server/service/construction-type/construction-type-mutation.ts +66 -0
- package/server/service/construction-type/construction-type-query.ts +47 -0
- package/server/service/construction-type/construction-type-type.ts +26 -0
- package/server/service/{resource/resource.ts → construction-type/construction-type.ts} +18 -6
- package/server/service/construction-type/index.ts +6 -0
- package/server/service/index.ts +12 -4
- package/server/service/manager/index.ts +6 -0
- package/server/service/manager/manager-mutation.ts +42 -0
- package/server/service/manager/manager-query.ts +28 -0
- package/server/service/manager/manager-type.ts +40 -0
- package/server/service/manager/manager.ts +29 -0
- package/server/service/project/project-mutation.ts +101 -79
- package/server/service/project/project-query.ts +5 -8
- package/server/service/worker-type/index.ts +6 -0
- package/server/service/worker-type/worker-type-mutation.ts +66 -0
- package/server/service/worker-type/worker-type-query.ts +47 -0
- package/server/service/worker-type/worker-type-type.ts +26 -0
- package/server/service/worker-type/worker-type.ts +68 -0
- package/things-factory.config.js +3 -0
- package/client/pages/project/ox-progress-circle.ts +0 -133
- package/client/pages/resource/resource-importer.ts +0 -96
- package/client/pages/resource/resource-list-page.ts +0 -355
- package/dist-client/pages/project/ox-progress-circle.d.ts +0 -41
- package/dist-client/pages/project/ox-progress-circle.js +0 -182
- package/dist-client/pages/project/ox-progress-circle.js.map +0 -1
- package/dist-client/pages/project/project-create-popup.js.map +0 -1
- package/dist-client/pages/resource/resource-importer.d.ts +0 -9
- package/dist-client/pages/resource/resource-importer.js +0 -100
- package/dist-client/pages/resource/resource-importer.js.map +0 -1
- package/dist-client/pages/resource/resource-list-page.d.ts +0 -62
- package/dist-client/pages/resource/resource-list-page.js +0 -331
- package/dist-client/pages/resource/resource-list-page.js.map +0 -1
- package/dist-server/service/resource/index.js +0 -9
- package/dist-server/service/resource/index.js.map +0 -1
- package/dist-server/service/resource/resource-mutation.js +0 -129
- package/dist-server/service/resource/resource-mutation.js.map +0 -1
- package/dist-server/service/resource/resource-query.js.map +0 -1
- package/dist-server/service/resource/resource-type.js +0 -69
- package/dist-server/service/resource/resource-type.js.map +0 -1
- package/dist-server/service/resource/resource.js.map +0 -1
- package/server/service/resource/index.ts +0 -6
- package/server/service/resource/resource-mutation.ts +0 -139
- package/server/service/resource/resource-query.ts +0 -56
- package/server/service/resource/resource-type.ts +0 -49
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/button/elevated-button.js'
|
|
1
2
|
import '@operato/data-grist'
|
|
2
3
|
|
|
3
4
|
import gql from 'graphql-tag'
|
|
@@ -28,7 +29,7 @@ export class ChecklistImporter extends LitElement {
|
|
|
28
29
|
padding: var(--padding-default);
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
md-elevated-button {
|
|
32
33
|
margin-left: var(--margin-default);
|
|
33
34
|
}
|
|
34
35
|
`
|
|
@@ -65,15 +66,13 @@ export class ChecklistImporter extends LitElement {
|
|
|
65
66
|
<ox-grist
|
|
66
67
|
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
67
68
|
.config=${this.columns}
|
|
68
|
-
.data=${
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
}
|
|
69
|
+
.data=${{
|
|
70
|
+
records: this.checklists
|
|
71
|
+
}}
|
|
73
72
|
></ox-grist>
|
|
74
73
|
|
|
75
74
|
<div class="button-container">
|
|
76
|
-
<
|
|
75
|
+
<md-elevated-button raised @click="${this.save.bind(this)}">${i18next.t('button.save')}</md-elevated-button>
|
|
77
76
|
</div>
|
|
78
77
|
`
|
|
79
78
|
}
|
|
@@ -93,4 +92,3 @@ export class ChecklistImporter extends LitElement {
|
|
|
93
92
|
this.dispatchEvent(new CustomEvent('imported'))
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
|
-
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import '@operato/data-grist'
|
|
2
3
|
|
|
3
4
|
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
@@ -5,12 +6,7 @@ import { PageView, store } from '@operato/shell'
|
|
|
5
6
|
import { css, html } from 'lit'
|
|
6
7
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
7
8
|
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
8
|
-
import {
|
|
9
|
-
ColumnConfig,
|
|
10
|
-
DataGrist,
|
|
11
|
-
FetchOption,
|
|
12
|
-
SortersControl
|
|
13
|
-
} from '@operato/data-grist'
|
|
9
|
+
import { ColumnConfig, DataGrist, FetchOption, SortersControl } from '@operato/data-grist'
|
|
14
10
|
import { client } from '@operato/graphql'
|
|
15
11
|
import { i18next, localize } from '@operato/i18n'
|
|
16
12
|
import { notify, openPopup } from '@operato/layout'
|
|
@@ -24,7 +20,6 @@ import { ChecklistImporter } from './checklist-importer'
|
|
|
24
20
|
|
|
25
21
|
@customElement('checklist-list-page')
|
|
26
22
|
export class ChecklistListPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {
|
|
27
|
-
|
|
28
23
|
static styles = [
|
|
29
24
|
ScrollbarStyles,
|
|
30
25
|
CommonGristStyles,
|
|
@@ -93,11 +88,7 @@ export class ChecklistListPage extends connect(store)(localize(i18next)(ScopedEl
|
|
|
93
88
|
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')
|
|
94
89
|
|
|
95
90
|
return html`
|
|
96
|
-
<ox-grist
|
|
97
|
-
.mode=${mode}
|
|
98
|
-
.config=${this.gristConfig}
|
|
99
|
-
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
100
|
-
>
|
|
91
|
+
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
101
92
|
<div slot="headroom">
|
|
102
93
|
<div id="filters">
|
|
103
94
|
<ox-filters-form autofocus></ox-filters-form>
|
|
@@ -105,7 +96,7 @@ export class ChecklistListPage extends connect(store)(localize(i18next)(ScopedEl
|
|
|
105
96
|
|
|
106
97
|
<div id="sorters">
|
|
107
98
|
Sort
|
|
108
|
-
<
|
|
99
|
+
<md-icon
|
|
109
100
|
@click=${e => {
|
|
110
101
|
const target = e.currentTarget
|
|
111
102
|
this.sortersControl.open({
|
|
@@ -113,7 +104,7 @@ export class ChecklistListPage extends connect(store)(localize(i18next)(ScopedEl
|
|
|
113
104
|
top: target.offsetTop + target.offsetHeight
|
|
114
105
|
})
|
|
115
106
|
}}
|
|
116
|
-
>expand_more</
|
|
107
|
+
>expand_more</md-icon
|
|
117
108
|
>
|
|
118
109
|
<ox-popup id="sorter-control">
|
|
119
110
|
<ox-sorters-control> </ox-sorters-control>
|
|
@@ -121,9 +112,9 @@ export class ChecklistListPage extends connect(store)(localize(i18next)(ScopedEl
|
|
|
121
112
|
</div>
|
|
122
113
|
|
|
123
114
|
<div id="modes">
|
|
124
|
-
<
|
|
125
|
-
<
|
|
126
|
-
<
|
|
115
|
+
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
|
|
116
|
+
<md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>
|
|
117
|
+
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
127
118
|
</div>
|
|
128
119
|
</div>
|
|
129
120
|
</ox-grist>
|
|
@@ -312,12 +303,7 @@ export class ChecklistListPage extends connect(store)(localize(i18next)(ScopedEl
|
|
|
312
303
|
|
|
313
304
|
private async exportHandler() {
|
|
314
305
|
const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records
|
|
315
|
-
const targetFieldSet = new Set([
|
|
316
|
-
'id',
|
|
317
|
-
'name',
|
|
318
|
-
'description',
|
|
319
|
-
'active'
|
|
320
|
-
])
|
|
306
|
+
const targetFieldSet = new Set(['id', 'name', 'description', 'active'])
|
|
321
307
|
|
|
322
308
|
return exportTargets.map(checklist => {
|
|
323
309
|
let tempObj = {}
|
|
@@ -346,10 +332,9 @@ export class ChecklistListPage extends connect(store)(localize(i18next)(ScopedEl
|
|
|
346
332
|
title: i18next.t('title.import checklist')
|
|
347
333
|
}
|
|
348
334
|
)
|
|
349
|
-
|
|
335
|
+
|
|
350
336
|
popup.onclosed = () => {
|
|
351
337
|
this.grist.fetch()
|
|
352
338
|
}
|
|
353
339
|
}
|
|
354
340
|
}
|
|
355
|
-
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { css, html, LitElement } from 'lit'
|
|
2
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
3
|
+
import { BuildingLevel } from '../project-list'
|
|
4
|
+
|
|
5
|
+
@customElement('popup-plan-upload')
|
|
6
|
+
export class PopupPlanUpload extends LitElement {
|
|
7
|
+
static styles = [
|
|
8
|
+
css`
|
|
9
|
+
:host {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
background-color: #fff;
|
|
13
|
+
width: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
div[body] {
|
|
17
|
+
flex: 1;
|
|
18
|
+
|
|
19
|
+
div[input-container] {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
gap: 25px;
|
|
24
|
+
background-color: #f7f7f7;
|
|
25
|
+
padding: 35px 27px 27px 27px;
|
|
26
|
+
|
|
27
|
+
ox-input-file {
|
|
28
|
+
height: 100px;
|
|
29
|
+
width: 120px;
|
|
30
|
+
line-height: 100%;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
div[button-container] {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
margin-top: 20px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
`
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
@property({ type: Object }) private buildingLevel: BuildingLevel = {}
|
|
45
|
+
@property({ type: Number }) private selectedIdx: number | undefined
|
|
46
|
+
|
|
47
|
+
render() {
|
|
48
|
+
const noUploadStyle = '--file-uploader-icon-size: 0; --file-uploader-label-padding; 0;'
|
|
49
|
+
|
|
50
|
+
// 메인 도면 스타일
|
|
51
|
+
const { mainDrawing, mainDrawingThumbnail } = this.buildingLevel
|
|
52
|
+
const mainDrawingIcon = mainDrawing ? '' : 'upload'
|
|
53
|
+
const mainDrawingStyle = mainDrawing ? noUploadStyle : ''
|
|
54
|
+
const mainDrawingLabel = mainDrawingThumbnail ? ' ' : '업로드'
|
|
55
|
+
const mainDrawingDesc = mainDrawingThumbnail ? ' ' : '평면 파일'
|
|
56
|
+
const mainDrawingThumbnailStyle = mainDrawingThumbnail ? this._getThumbnailStyle(mainDrawingThumbnail) : ''
|
|
57
|
+
|
|
58
|
+
// 입면 도면 스타일
|
|
59
|
+
const { elevationDrawing, elevationDrawingThumbnail } = this.buildingLevel
|
|
60
|
+
const elevationDrawingIcon = elevationDrawing ? '' : 'upload'
|
|
61
|
+
const elevationDrawingLabel = elevationDrawingThumbnail ? ' ' : '업로드'
|
|
62
|
+
const elevationDrawingDesc = elevationDrawingThumbnail ? ' ' : '입면 파일'
|
|
63
|
+
const elevationDrawingStyle = elevationDrawing ? noUploadStyle : ''
|
|
64
|
+
const elevationDrawingThumbnailStyle = elevationDrawingThumbnail ? this._getThumbnailStyle(elevationDrawingThumbnail) : ''
|
|
65
|
+
|
|
66
|
+
// 철근배근도 도면 스타일
|
|
67
|
+
const { rebarDistributionDrawing, rebarDistributionDrawingThumbnail } = this.buildingLevel
|
|
68
|
+
const rebarDistributionDrawingIcon = rebarDistributionDrawing ? '' : 'upload'
|
|
69
|
+
const rebarDistributionDrawingStyle = rebarDistributionDrawing ? noUploadStyle : ''
|
|
70
|
+
const rebarDistributionDrawingLabel = rebarDistributionDrawingThumbnail ? ' ' : '업로드'
|
|
71
|
+
const rebarDistributionDrawingDesc = rebarDistributionDrawingThumbnail ? ' ' : '철근배근도 파일'
|
|
72
|
+
const rebarDistributionDrawingThumbnailStyle = rebarDistributionDrawingThumbnail
|
|
73
|
+
? this._getThumbnailStyle(rebarDistributionDrawingThumbnail)
|
|
74
|
+
: ''
|
|
75
|
+
|
|
76
|
+
return html`
|
|
77
|
+
<div body>
|
|
78
|
+
<div input-container>
|
|
79
|
+
<ox-input-file
|
|
80
|
+
name="mainDrawing"
|
|
81
|
+
.value=${mainDrawing || undefined}
|
|
82
|
+
icon=${mainDrawingIcon}
|
|
83
|
+
label=${mainDrawingLabel}
|
|
84
|
+
description=${mainDrawingDesc}
|
|
85
|
+
@change=${this._onChangeAttachment.bind(this)}
|
|
86
|
+
style="${mainDrawingStyle + mainDrawingThumbnailStyle}"
|
|
87
|
+
></ox-input-file>
|
|
88
|
+
|
|
89
|
+
<ox-input-file
|
|
90
|
+
name="elevationDrawing"
|
|
91
|
+
.value=${elevationDrawing || undefined}
|
|
92
|
+
icon=${elevationDrawingIcon}
|
|
93
|
+
label=${elevationDrawingLabel}
|
|
94
|
+
description=${elevationDrawingDesc}
|
|
95
|
+
@change=${this._onChangeAttachment.bind(this)}
|
|
96
|
+
style="${elevationDrawingStyle + elevationDrawingThumbnailStyle}"
|
|
97
|
+
></ox-input-file>
|
|
98
|
+
|
|
99
|
+
<ox-input-file
|
|
100
|
+
name="rebarDistributionDrawing"
|
|
101
|
+
.value=${rebarDistributionDrawing || undefined}
|
|
102
|
+
icon=${rebarDistributionDrawingIcon}
|
|
103
|
+
label=${rebarDistributionDrawingLabel}
|
|
104
|
+
description=${rebarDistributionDrawingDesc}
|
|
105
|
+
@change=${this._onChangeAttachment.bind(this)}
|
|
106
|
+
style="${rebarDistributionDrawingStyle + rebarDistributionDrawingThumbnailStyle}"
|
|
107
|
+
></ox-input-file>
|
|
108
|
+
</div>
|
|
109
|
+
|
|
110
|
+
<div button-container>
|
|
111
|
+
<md-outlined-button @click=${this._close}><md-icon slot="icon">cancel</md-icon>취소</md-outlined-button>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
`
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
private _close() {
|
|
118
|
+
history.back()
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// 이미지 업로드
|
|
122
|
+
async _onChangeAttachment(e: CustomEvent) {
|
|
123
|
+
const target = e.target as HTMLInputElement
|
|
124
|
+
const file = e.detail[0] || null
|
|
125
|
+
|
|
126
|
+
this.buildingLevel[target.name] = file
|
|
127
|
+
this.buildingLevel[`${target.name}Upload`] = file
|
|
128
|
+
|
|
129
|
+
this.buildingLevel = { ...this.buildingLevel }
|
|
130
|
+
|
|
131
|
+
const detail = { buildingLevel: this.buildingLevel, selectedIdx: this.selectedIdx }
|
|
132
|
+
this.dispatchEvent(new CustomEvent('file_change', { bubbles: false, detail: detail }))
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
private _getThumbnailStyle(path) {
|
|
136
|
+
return `background: url(${path}); background-size: cover; background-repeat: round; justify-content: flex-end;`
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { css, html, LitElement } from 'lit'
|
|
2
2
|
import { customElement, property, state } from 'lit/decorators.js'
|
|
3
3
|
import { client } from '@operato/graphql'
|
|
4
|
-
import { i18next, localize } from '@operato/i18n'
|
|
5
4
|
import { notify } from '@operato/layout'
|
|
6
5
|
import gql from 'graphql-tag'
|
|
7
6
|
import '@material/web/textfield/outlined-text-field.js'
|
|
8
7
|
import '@material/web/button/elevated-button.js'
|
|
9
8
|
|
|
10
|
-
@customElement('project-create
|
|
11
|
-
export class
|
|
9
|
+
@customElement('popup-project-create')
|
|
10
|
+
export class PopupProjectCreate extends LitElement {
|
|
12
11
|
static styles = [
|
|
13
12
|
css`
|
|
14
13
|
:host {
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
import '@material/web/button/elevated-button.js'
|
|
3
|
+
import '@material/web/textfield/outlined-text-field.js'
|
|
4
|
+
import '@material/web/button/outlined-button.js'
|
|
5
|
+
|
|
1
6
|
import { PageView } from '@operato/shell'
|
|
2
7
|
import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'
|
|
3
8
|
import { css, html } from 'lit'
|
|
4
9
|
import { customElement, state } from 'lit/decorators.js'
|
|
5
10
|
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
6
11
|
import { client } from '@operato/graphql'
|
|
7
|
-
import { notify } from '@operato/layout'
|
|
8
12
|
|
|
9
13
|
import gql from 'graphql-tag'
|
|
10
14
|
import { 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/outlined-button.js'
|
|
14
|
-
import './ox-progress-circle'
|
|
15
15
|
import _getWeather from '../lib/waether'
|
|
16
|
+
import '@operato/chart/ox-progress-circle.js'
|
|
16
17
|
|
|
17
18
|
export interface InspectionSummary {
|
|
18
19
|
request: number
|
|
@@ -201,7 +202,7 @@ export class ProjectDetail extends ScopedElementsMixin(PageView) {
|
|
|
201
202
|
}
|
|
202
203
|
div[inspection] {
|
|
203
204
|
display: grid;
|
|
204
|
-
grid-template-columns: 1.4fr 0.9fr 0.9fr 0.9fr
|
|
205
|
+
grid-template-columns: 1.4fr 0.9fr 0.9fr 0.9fr;
|
|
205
206
|
margin-top: 5px;
|
|
206
207
|
background: #f6f6f6;
|
|
207
208
|
border-radius: 7px;
|
|
@@ -322,6 +323,7 @@ export class ProjectDetail extends ScopedElementsMixin(PageView) {
|
|
|
322
323
|
buildings: []
|
|
323
324
|
}
|
|
324
325
|
}
|
|
326
|
+
|
|
325
327
|
@state() projectId: string = ''
|
|
326
328
|
@state() project: Project = { ...this.defaultProject }
|
|
327
329
|
@state() inspectionSummary: InspectionSummary = {
|
|
@@ -415,9 +417,7 @@ export class ProjectDetail extends ScopedElementsMixin(PageView) {
|
|
|
415
417
|
<div subject bold>개별 단지 상세정보 바로가기</div>
|
|
416
418
|
<div building-container>
|
|
417
419
|
${this.project.buildingComplex?.buildings?.map(building => {
|
|
418
|
-
return html`<md-outlined-button
|
|
419
|
-
href=${`building-complex-detail/${this.project.id}?buildingId=${building.id}`}
|
|
420
|
-
>
|
|
420
|
+
return html`<md-outlined-button href=${`building-complex-detail/${this.project.id}?buildingId=${building.id}`}>
|
|
421
421
|
${building.name}
|
|
422
422
|
</md-outlined-button>`
|
|
423
423
|
})}
|
|
@@ -605,8 +605,8 @@ export class ProjectDetail extends ScopedElementsMixin(PageView) {
|
|
|
605
605
|
|
|
606
606
|
if (response.errors) return
|
|
607
607
|
|
|
608
|
-
this.project = response.data?.project
|
|
609
|
-
this.inspectionSummary = response.data?.inspectionSummary
|
|
608
|
+
this.project = response.data?.project || {}
|
|
609
|
+
this.inspectionSummary = response.data?.inspectionSummary || {}
|
|
610
610
|
|
|
611
611
|
const { latitude, longitude } = this.project?.buildingComplex
|
|
612
612
|
if (latitude && longitude) {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
|
|
1
3
|
import { PageView } from '@operato/shell'
|
|
2
4
|
import { css, html } from 'lit'
|
|
3
5
|
import { customElement, state } from 'lit/decorators.js'
|
|
@@ -11,7 +13,7 @@ export enum ProjectStatus {
|
|
|
11
13
|
'PROCEEDING' = '10',
|
|
12
14
|
'COMPLICATED' = '20'
|
|
13
15
|
}
|
|
14
|
-
export enum
|
|
16
|
+
export enum InspectionStatus {
|
|
15
17
|
REQUEST = 'REQUEST',
|
|
16
18
|
PASS = 'PASS',
|
|
17
19
|
FAIL = 'FAIL'
|
|
@@ -67,7 +69,15 @@ export interface BuildingLevel {
|
|
|
67
69
|
id?: string
|
|
68
70
|
floor?: number
|
|
69
71
|
mainDrawing?: Attachment
|
|
72
|
+
mainDrawingImage?: string
|
|
73
|
+
mainDrawingThumbnail?: string
|
|
70
74
|
mainDrawingUpload?: FileUpload
|
|
75
|
+
elevationDrawing?: Attachment
|
|
76
|
+
elevationDrawingThumbnail?: string
|
|
77
|
+
elevationDrawingUpload?: FileUpload
|
|
78
|
+
rebarDistributionDrawing?: Attachment
|
|
79
|
+
rebarDistributionDrawingThumbnail?: string
|
|
80
|
+
rebarDistributionDrawingUpload?: FileUpload
|
|
71
81
|
buildingInspections?: BuildingInspection[]
|
|
72
82
|
}
|
|
73
83
|
|
|
@@ -75,8 +85,9 @@ export interface BuildingInspection {
|
|
|
75
85
|
id?: string
|
|
76
86
|
indexX?: number
|
|
77
87
|
indexY?: number
|
|
78
|
-
|
|
88
|
+
status?: InspectionStatus
|
|
79
89
|
detail?: string
|
|
90
|
+
attatchments?: Attachment[]
|
|
80
91
|
// buildingInspectionAttachments?: BuildingInspectionAttachment[]
|
|
81
92
|
}
|
|
82
93
|
|
|
@@ -253,14 +264,12 @@ export class ProjectListPage extends ScopedElementsMixin(PageView) {
|
|
|
253
264
|
|
|
254
265
|
<span project-state>
|
|
255
266
|
<div progress>
|
|
256
|
-
<md-linear-progress buffer="100" max="100" value=${project.totalProgress || 0}>
|
|
257
|
-
</md-linear-progress>
|
|
267
|
+
<md-linear-progress buffer="100" max="100" value=${project.totalProgress || 0}> </md-linear-progress>
|
|
258
268
|
<span>전체</span>
|
|
259
269
|
<span>${project.totalProgress || 0}%</span>
|
|
260
270
|
</div>
|
|
261
271
|
<div progress>
|
|
262
|
-
<md-linear-progress buffer="100" max="100" value=${project.weeklyProgress || 0}>
|
|
263
|
-
</md-linear-progress>
|
|
272
|
+
<md-linear-progress buffer="100" max="100" value=${project.weeklyProgress || 0}> </md-linear-progress>
|
|
264
273
|
<span>주간</span>
|
|
265
274
|
<span>${project.weeklyProgress || 0}%</span>
|
|
266
275
|
</div>
|
|
@@ -275,14 +284,12 @@ export class ProjectListPage extends ScopedElementsMixin(PageView) {
|
|
|
275
284
|
<span>${project.inspPassRate || 0}%</span>
|
|
276
285
|
</div>
|
|
277
286
|
<div progress>
|
|
278
|
-
<md-linear-progress buffer="100" max="100" value=${project.robotProgressRate || 0}>
|
|
279
|
-
</md-linear-progress>
|
|
287
|
+
<md-linear-progress buffer="100" max="100" value=${project.robotProgressRate || 0}> </md-linear-progress>
|
|
280
288
|
<span>Robot Progress</span>
|
|
281
289
|
<span>${project.robotProgressRate || 0}%</span>
|
|
282
290
|
</div>
|
|
283
291
|
<div progress>
|
|
284
|
-
<md-linear-progress buffer="100" max="100" value=${project.structuralSafetyRate || 0}>
|
|
285
|
-
</md-linear-progress>
|
|
292
|
+
<md-linear-progress buffer="100" max="100" value=${project.structuralSafetyRate || 0}> </md-linear-progress>
|
|
286
293
|
<span>Structural safety</span>
|
|
287
294
|
<span>${project.structuralSafetyRate || 0}%</span>
|
|
288
295
|
</div>
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
import '@material/web/button/elevated-button.js'
|
|
3
|
+
import '@material/web/textfield/outlined-text-field.js'
|
|
4
|
+
import '@material/web/button/filled-button.js'
|
|
5
|
+
import '@material/web/button/outlined-button.js'
|
|
6
|
+
|
|
1
7
|
import { PageView } from '@operato/shell'
|
|
2
8
|
import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'
|
|
3
9
|
import { css, html } from 'lit'
|
|
@@ -5,13 +11,11 @@ import { customElement, state } from 'lit/decorators.js'
|
|
|
5
11
|
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
6
12
|
import { client } from '@operato/graphql'
|
|
7
13
|
import { notify } from '@operato/layout'
|
|
14
|
+
import { openPopup } from '@operato/layout'
|
|
8
15
|
|
|
9
16
|
import gql from 'graphql-tag'
|
|
10
|
-
import { Building, Project } from './project-list'
|
|
11
|
-
import '
|
|
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'
|
|
17
|
+
import { Building, BuildingLevel, Project } from './project-list'
|
|
18
|
+
import './popup/popup-plan-upload'
|
|
15
19
|
|
|
16
20
|
@customElement('project-plan-management')
|
|
17
21
|
export class ProjectPlanManagement extends ScopedElementsMixin(PageView) {
|
|
@@ -45,6 +49,10 @@ export class ProjectPlanManagement extends ScopedElementsMixin(PageView) {
|
|
|
45
49
|
height: 100px;
|
|
46
50
|
}
|
|
47
51
|
|
|
52
|
+
*[bold] {
|
|
53
|
+
font-weight: bold;
|
|
54
|
+
}
|
|
55
|
+
|
|
48
56
|
div[header] {
|
|
49
57
|
display: flex;
|
|
50
58
|
margin: 0px 20px;
|
|
@@ -157,12 +165,29 @@ export class ProjectPlanManagement extends ScopedElementsMixin(PageView) {
|
|
|
157
165
|
margin-top: 10px;
|
|
158
166
|
|
|
159
167
|
& > span {
|
|
160
|
-
width: 150px;
|
|
161
168
|
display: inline-block;
|
|
162
169
|
text-align: center;
|
|
163
170
|
margin: 0px 10px 15px 0px;
|
|
171
|
+
cursor: pointer;
|
|
172
|
+
|
|
173
|
+
& > [name='building-plan'] {
|
|
174
|
+
width: 150px;
|
|
175
|
+
height: 100px;
|
|
176
|
+
display: flex;
|
|
177
|
+
flex-direction: column;
|
|
178
|
+
justify-content: center;
|
|
179
|
+
border: 1px solid #333;
|
|
180
|
+
box-shadow: 2px 2px 2px #0000001a;
|
|
181
|
+
align-items: center;
|
|
182
|
+
border-radius: 7px;
|
|
183
|
+
font-size: 13px;
|
|
184
|
+
|
|
185
|
+
md-icon {
|
|
186
|
+
margin-bottom: 6px;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
164
189
|
|
|
165
|
-
& > div {
|
|
190
|
+
& > div[floor-name] {
|
|
166
191
|
margin-top: 7px;
|
|
167
192
|
|
|
168
193
|
&[no-data] {
|
|
@@ -246,7 +271,7 @@ export class ProjectPlanManagement extends ScopedElementsMixin(PageView) {
|
|
|
246
271
|
label=" "
|
|
247
272
|
description="동 도면 업로드"
|
|
248
273
|
idx=${idx}
|
|
249
|
-
@change=${this.
|
|
274
|
+
@change=${this._onCreateAttachment.bind(this)}
|
|
250
275
|
></ox-input-file>
|
|
251
276
|
<div>${building.name}</div>
|
|
252
277
|
</span>
|
|
@@ -262,37 +287,40 @@ export class ProjectPlanManagement extends ScopedElementsMixin(PageView) {
|
|
|
262
287
|
${this.project.buildingComplex.buildings?.map((building, idx) => {
|
|
263
288
|
return this.project.buildingComplex?.buildings?.[this.selectedBuildingIdx]?.id === building.id
|
|
264
289
|
? html`
|
|
265
|
-
<md-filled-button @click=${() => this._onClickBuildingChange(idx)}>
|
|
266
|
-
${building.name}
|
|
267
|
-
</md-filled-button>
|
|
290
|
+
<md-filled-button @click=${() => this._onClickBuildingChange(idx)}> ${building.name} </md-filled-button>
|
|
268
291
|
`
|
|
269
292
|
: html`
|
|
270
|
-
<md-outlined-button @click=${() => this._onClickBuildingChange(idx)}>
|
|
271
|
-
${building.name}
|
|
272
|
-
</md-outlined-button>
|
|
293
|
+
<md-outlined-button @click=${() => this._onClickBuildingChange(idx)}> ${building.name} </md-outlined-button>
|
|
273
294
|
`
|
|
274
295
|
})}
|
|
275
296
|
</span>
|
|
276
297
|
</div>
|
|
277
298
|
|
|
278
299
|
<div floor-plan>
|
|
279
|
-
${this.project.buildingComplex?.buildings?.[this.selectedBuildingIdx]?.buildingLevels?.map(
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
300
|
+
${this.project.buildingComplex?.buildings?.[this.selectedBuildingIdx]?.buildingLevels?.map((buildingLevel, idx) => {
|
|
301
|
+
return buildingLevel.mainDrawingThumbnail
|
|
302
|
+
? html`
|
|
303
|
+
<span plan>
|
|
304
|
+
<img
|
|
305
|
+
name="building-plan"
|
|
306
|
+
.src=${buildingLevel.mainDrawingThumbnail}
|
|
307
|
+
idx=${idx}
|
|
308
|
+
@click=${this._onClickImage}
|
|
309
|
+
/>
|
|
310
|
+
<div floor-name>${buildingLevel.floor}층</div>
|
|
311
|
+
</span>
|
|
312
|
+
`
|
|
313
|
+
: html`
|
|
314
|
+
<span plan>
|
|
315
|
+
<a name="building-plan" idx=${idx} @click=${this._onClickImage}>
|
|
316
|
+
<md-icon slot="icon">image</md-icon>
|
|
317
|
+
<div bold>도면 파일</div>
|
|
318
|
+
<div>업로드</div>
|
|
319
|
+
</a>
|
|
320
|
+
<div floor-name no-data>${buildingLevel.floor}층</div>
|
|
321
|
+
</span>
|
|
322
|
+
`
|
|
323
|
+
})}
|
|
296
324
|
</div>
|
|
297
325
|
</div>
|
|
298
326
|
|
|
@@ -360,6 +388,17 @@ export class ProjectPlanManagement extends ScopedElementsMixin(PageView) {
|
|
|
360
388
|
id
|
|
361
389
|
name
|
|
362
390
|
}
|
|
391
|
+
elevationDrawing {
|
|
392
|
+
id
|
|
393
|
+
name
|
|
394
|
+
}
|
|
395
|
+
rebarDistributionDrawing {
|
|
396
|
+
id
|
|
397
|
+
name
|
|
398
|
+
}
|
|
399
|
+
mainDrawingThumbnail
|
|
400
|
+
elevationDrawingThumbnail
|
|
401
|
+
rebarDistributionDrawingThumbnail
|
|
363
402
|
}
|
|
364
403
|
}
|
|
365
404
|
}
|
|
@@ -372,7 +411,6 @@ export class ProjectPlanManagement extends ScopedElementsMixin(PageView) {
|
|
|
372
411
|
})
|
|
373
412
|
|
|
374
413
|
this.project = response.data?.project
|
|
375
|
-
this.selectedBuildingIdx = 0
|
|
376
414
|
|
|
377
415
|
console.log('init project : ', this.project)
|
|
378
416
|
}
|
|
@@ -385,10 +423,16 @@ export class ProjectPlanManagement extends ScopedElementsMixin(PageView) {
|
|
|
385
423
|
|
|
386
424
|
for (let levelKey in building.buildingLevels) {
|
|
387
425
|
delete this.project.buildingComplex.buildings[buildingKey].buildingLevels[levelKey].mainDrawing
|
|
426
|
+
delete this.project.buildingComplex.buildings[buildingKey].buildingLevels[levelKey].mainDrawingImage
|
|
427
|
+
delete this.project.buildingComplex.buildings[buildingKey].buildingLevels[levelKey].mainDrawingThumbnail
|
|
428
|
+
delete this.project.buildingComplex.buildings[buildingKey].buildingLevels[levelKey].elevationDrawing
|
|
429
|
+
delete this.project.buildingComplex.buildings[buildingKey].buildingLevels[levelKey].elevationDrawingThumbnail
|
|
430
|
+
delete this.project.buildingComplex.buildings[buildingKey].buildingLevels[levelKey].rebarDistributionDrawing
|
|
431
|
+
delete this.project.buildingComplex.buildings[buildingKey].buildingLevels[levelKey].rebarDistributionDrawingThumbnail
|
|
388
432
|
}
|
|
389
433
|
}
|
|
390
434
|
|
|
391
|
-
console.log('
|
|
435
|
+
console.log('upload project :', this.project)
|
|
392
436
|
|
|
393
437
|
const response = await client.mutate({
|
|
394
438
|
mutation: gql`
|
|
@@ -408,6 +452,9 @@ export class ProjectPlanManagement extends ScopedElementsMixin(PageView) {
|
|
|
408
452
|
|
|
409
453
|
if (!response.errors) {
|
|
410
454
|
notify({ message: '저장에 성공하였습니다.' })
|
|
455
|
+
|
|
456
|
+
// 데이터 다시 조회
|
|
457
|
+
this.initProject(this.project.id)
|
|
411
458
|
}
|
|
412
459
|
}
|
|
413
460
|
|
|
@@ -419,19 +466,50 @@ export class ProjectPlanManagement extends ScopedElementsMixin(PageView) {
|
|
|
419
466
|
}
|
|
420
467
|
|
|
421
468
|
// 이미지 업로드
|
|
422
|
-
async
|
|
469
|
+
async _onCreateAttachment(e: CustomEvent) {
|
|
423
470
|
const target = e.target as HTMLInputElement
|
|
424
471
|
const file = e.detail[0] || null
|
|
425
472
|
const idx = Number(target.getAttribute('idx')) || 0
|
|
426
473
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
}
|
|
474
|
+
this.project.buildingComplex!.buildings![idx].drawingUpload = file
|
|
475
|
+
|
|
476
|
+
// re rendering
|
|
477
|
+
this.project = { ...this.project }
|
|
432
478
|
}
|
|
433
479
|
|
|
434
480
|
_onClickBuildingChange(idx: number) {
|
|
435
481
|
this.selectedBuildingIdx = idx
|
|
436
482
|
}
|
|
483
|
+
|
|
484
|
+
_onClickImage(e) {
|
|
485
|
+
const target = e.currentTarget as HTMLInputElement
|
|
486
|
+
const idx = Number(target.getAttribute('idx')) || 0
|
|
487
|
+
const buildingLevel = this.project.buildingComplex!.buildings![this.selectedBuildingIdx].buildingLevels![idx]
|
|
488
|
+
const title = buildingLevel.floor?.toString() + '층' || ''
|
|
489
|
+
|
|
490
|
+
// 팝업 오픈
|
|
491
|
+
this._openPopup(title, buildingLevel, idx)
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
private _openPopup(title: string, buildingLevel: BuildingLevel, selectedIdx: number) {
|
|
495
|
+
openPopup(
|
|
496
|
+
html`<popup-plan-upload
|
|
497
|
+
.buildingLevel=${buildingLevel}
|
|
498
|
+
.selectedIdx=${selectedIdx}
|
|
499
|
+
@file_change=${this._onChangeAdditionalDrawing.bind(this)}
|
|
500
|
+
></popup-plan-upload>`,
|
|
501
|
+
{
|
|
502
|
+
backdrop: true,
|
|
503
|
+
size: 'medium',
|
|
504
|
+
title: `${title} 도면 관리`
|
|
505
|
+
}
|
|
506
|
+
)
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
private _onChangeAdditionalDrawing(e) {
|
|
510
|
+
const idx = e.detail?.selectedIdx || null
|
|
511
|
+
const buildingLevel: BuildingLevel = e.detail?.buildingLevel || {}
|
|
512
|
+
|
|
513
|
+
this.project.buildingComplex!.buildings![this.selectedBuildingIdx]!.buildingLevels![idx] = { ...buildingLevel }
|
|
514
|
+
}
|
|
437
515
|
}
|