@dssp/supervision 1.0.0-alpha.5 → 1.0.0-alpha.7
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/dist-client/pages/building-inspection/building-inspection-list.js +2 -1
- package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
- package/dist-client/pages/building-inspection/inspection-create-popup.js +5 -4
- package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -1
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +6 -0
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +216 -42
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +1 -1
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +123 -15
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +1 -1
- package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.d.ts +15 -0
- package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js +430 -0
- package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js.map +1 -0
- package/dist-client/pages/checklist/checklist-view.js +5 -12
- package/dist-client/pages/checklist/checklist-view.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +1 -0
- package/dist-server/service/building-inspection/building-inspection-mutation.js +58 -0
- package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js
CHANGED
|
@@ -20,6 +20,9 @@ let GridInspectionCreatePopup = class GridInspectionCreatePopup extends LitEleme
|
|
|
20
20
|
this.buildings = [];
|
|
21
21
|
this.selectedBuilding = {};
|
|
22
22
|
this.selectedLevel = {};
|
|
23
|
+
this.constructionTypes = [];
|
|
24
|
+
this.selectedConstructionType = {};
|
|
25
|
+
this.selectedConstructionDetailType = {};
|
|
23
26
|
this.managers = [];
|
|
24
27
|
this.selectedManager = {};
|
|
25
28
|
this.checklistTemplates = [];
|
|
@@ -27,22 +30,53 @@ let GridInspectionCreatePopup = class GridInspectionCreatePopup extends LitEleme
|
|
|
27
30
|
this.activeTab = 'edit';
|
|
28
31
|
}
|
|
29
32
|
render() {
|
|
30
|
-
var _a, _b, _c, _d, _e;
|
|
33
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
31
34
|
return html `
|
|
32
35
|
<div body>
|
|
33
36
|
<div tab-container ?inactive=${this.activeTab !== 'edit'} edit>
|
|
34
37
|
<div detail>
|
|
35
38
|
<h3>세부 정보</h3>
|
|
36
39
|
|
|
40
|
+
<div data-row>
|
|
41
|
+
<label>공종</label>
|
|
42
|
+
<md-filled-select constructionType @change=${this._onSelectConstructionType}>
|
|
43
|
+
${(_a = this.constructionTypes) === null || _a === void 0 ? void 0 : _a.map(constructionType => {
|
|
44
|
+
var _a;
|
|
45
|
+
const selected = constructionType.id === ((_a = this.selectedConstructionType) === null || _a === void 0 ? void 0 : _a.id);
|
|
46
|
+
return html `<md-select-option ?selected=${selected} .value=${constructionType.id}>
|
|
47
|
+
<div slot="headline">${constructionType.name}</div>
|
|
48
|
+
</md-select-option>`;
|
|
49
|
+
})}
|
|
50
|
+
</md-filled-select>
|
|
51
|
+
|
|
52
|
+
<div partition></div>
|
|
53
|
+
|
|
54
|
+
<label>세부 공종</label>
|
|
55
|
+
<md-filled-select constructionDetailType @change=${this._onSelectConstructionDetailType}>
|
|
56
|
+
${(_c = (_b = this.selectedConstructionType) === null || _b === void 0 ? void 0 : _b.constructionDetailTypes) === null || _c === void 0 ? void 0 : _c.map(constructionDetailType => {
|
|
57
|
+
const selected = constructionDetailType.id === this.selectedConstructionDetailType.id;
|
|
58
|
+
return html `<md-select-option ?selected=${selected} .value=${constructionDetailType.id}>
|
|
59
|
+
<div slot="headline">${constructionDetailType.name}</div>
|
|
60
|
+
</md-select-option>`;
|
|
61
|
+
})}
|
|
62
|
+
</md-filled-select>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
37
65
|
<div data-row>
|
|
38
66
|
<label>동</label>
|
|
39
|
-
<md-filled-text-field building name="buildingName" type="text" .value=${((
|
|
67
|
+
<md-filled-text-field building name="buildingName" type="text" .value=${((_d = this.selectedBuilding) === null || _d === void 0 ? void 0 : _d.name) || ''} disabled>
|
|
40
68
|
</md-filled-text-field>
|
|
41
69
|
|
|
42
70
|
<div partition></div>
|
|
43
71
|
|
|
44
72
|
<label>층</label>
|
|
45
|
-
<md-filled-text-field
|
|
73
|
+
<md-filled-text-field
|
|
74
|
+
level
|
|
75
|
+
name="buildingLevelName"
|
|
76
|
+
type="text"
|
|
77
|
+
.value=${((_e = this.selectedLevel) === null || _e === void 0 ? void 0 : _e.floorDisplayName) || ''}
|
|
78
|
+
disabled
|
|
79
|
+
>
|
|
46
80
|
</md-filled-text-field>
|
|
47
81
|
</div>
|
|
48
82
|
</div>
|
|
@@ -55,7 +89,7 @@ let GridInspectionCreatePopup = class GridInspectionCreatePopup extends LitEleme
|
|
|
55
89
|
<md-filled-text-field
|
|
56
90
|
name="checklistName"
|
|
57
91
|
type="text"
|
|
58
|
-
.value=${((
|
|
92
|
+
.value=${((_f = this.checklist) === null || _f === void 0 ? void 0 : _f.name) || ''}
|
|
59
93
|
@input=${this._onInputChange}
|
|
60
94
|
>
|
|
61
95
|
</md-filled-text-field>
|
|
@@ -65,7 +99,7 @@ let GridInspectionCreatePopup = class GridInspectionCreatePopup extends LitEleme
|
|
|
65
99
|
<label>템플릿</label>
|
|
66
100
|
<md-filled-select checklistTemplate @change=${this._onSelectChecklistTemplate}>
|
|
67
101
|
<md-select-option></md-select-option>
|
|
68
|
-
${(
|
|
102
|
+
${(_g = this.checklistTemplates) === null || _g === void 0 ? void 0 : _g.map((checklistTemplate, idx) => {
|
|
69
103
|
return html ` <md-select-option .value=${checklistTemplate.id}>
|
|
70
104
|
<div slot="headline">${checklistTemplate.name}</div>
|
|
71
105
|
</md-select-option>`;
|
|
@@ -81,7 +115,7 @@ let GridInspectionCreatePopup = class GridInspectionCreatePopup extends LitEleme
|
|
|
81
115
|
<label>담당자</label>
|
|
82
116
|
<md-filled-select manager @change=${this._onSelectManager}>
|
|
83
117
|
<md-select-option></md-select-option>
|
|
84
|
-
${(
|
|
118
|
+
${(_h = this.managers) === null || _h === void 0 ? void 0 : _h.map((manager, idx) => {
|
|
85
119
|
return html ` <md-select-option .value=${manager.userId}>
|
|
86
120
|
<div slot="headline">${manager.name}</div>
|
|
87
121
|
</md-select-option>`;
|
|
@@ -123,7 +157,7 @@ let GridInspectionCreatePopup = class GridInspectionCreatePopup extends LitEleme
|
|
|
123
157
|
this.checklistView.style.transform = `scale(${ratio})`;
|
|
124
158
|
}
|
|
125
159
|
async firstUpdated() {
|
|
126
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
160
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
127
161
|
const response = await client.query({
|
|
128
162
|
query: gql `
|
|
129
163
|
query Project($id: String!) {
|
|
@@ -139,6 +173,13 @@ let GridInspectionCreatePopup = class GridInspectionCreatePopup extends LitEleme
|
|
|
139
173
|
}
|
|
140
174
|
}
|
|
141
175
|
|
|
176
|
+
constructionTypes {
|
|
177
|
+
items {
|
|
178
|
+
name
|
|
179
|
+
id
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
142
183
|
checklistTemplates {
|
|
143
184
|
items {
|
|
144
185
|
id
|
|
@@ -171,27 +212,35 @@ let GridInspectionCreatePopup = class GridInspectionCreatePopup extends LitEleme
|
|
|
171
212
|
return;
|
|
172
213
|
const project = (_a = response.data) === null || _a === void 0 ? void 0 : _a.project;
|
|
173
214
|
const checklistTemplates = ((_c = (_b = response.data) === null || _b === void 0 ? void 0 : _b.checklistTemplates) === null || _c === void 0 ? void 0 : _c.items) || [];
|
|
174
|
-
|
|
175
|
-
this.
|
|
215
|
+
const constructionTypes = ((_e = (_d = response.data) === null || _d === void 0 ? void 0 : _d.constructionTypes) === null || _e === void 0 ? void 0 : _e.items) || [];
|
|
216
|
+
this.managers = (_f = response.data) === null || _f === void 0 ? void 0 : _f.managers;
|
|
217
|
+
this.checklistDetailTypes = (_h = (_g = response.data.checklistTypes) === null || _g === void 0 ? void 0 : _g.items) === null || _h === void 0 ? void 0 : _h.map(v => {
|
|
176
218
|
return {
|
|
177
219
|
display: v.detailType,
|
|
178
220
|
value: v.id,
|
|
179
221
|
mainType: v.mainType
|
|
180
222
|
};
|
|
181
223
|
});
|
|
224
|
+
this.constructionTypes = [...constructionTypes];
|
|
182
225
|
this.checklistTemplates = [...checklistTemplates];
|
|
183
|
-
this.buildings = [...(((
|
|
226
|
+
this.buildings = [...(((_j = project === null || project === void 0 ? void 0 : project.buildingComplex) === null || _j === void 0 ? void 0 : _j.buildings) || [])];
|
|
184
227
|
// selectedBuildingId가 있으면 해당 빌딩 선택, 없으면 첫번째 빌딩 선택
|
|
185
228
|
this.selectedBuilding = this.buildings.find(building => building.id == this.selectedBuildingId);
|
|
186
229
|
this.selectedBuilding = await this._getBuilding(this.selectedBuilding.id);
|
|
230
|
+
this.selectedConstructionType = constructionTypes === null || constructionTypes === void 0 ? void 0 : constructionTypes[0];
|
|
187
231
|
// selectedBuildingLevelId가 있으면 선택된 층, 없으면 첫번째 층 선택
|
|
188
|
-
this.selectedLevel = (
|
|
232
|
+
this.selectedLevel = (_l = (_k = this.selectedBuilding) === null || _k === void 0 ? void 0 : _k.buildingLevels) === null || _l === void 0 ? void 0 : _l.find(level => level.id == this.selectedBuildingLevelId);
|
|
233
|
+
// 세부 공종 리스트 가져오기
|
|
234
|
+
this.selectedConstructionType = await this._getConstructionType(this.selectedConstructionType.id);
|
|
235
|
+
this.selectedConstructionDetailType = (_o = (_m = this.selectedConstructionType) === null || _m === void 0 ? void 0 : _m.constructionDetailTypes) === null || _o === void 0 ? void 0 : _o[0];
|
|
236
|
+
this.selectedConstructionType = await Object.assign({}, this.selectedConstructionType);
|
|
189
237
|
// 기본 값 셋팅 select
|
|
190
238
|
await this.htmlSelectChecklistTemplate.selectIndex(0);
|
|
239
|
+
await this.htmlSelectConstructionDetailType.selectIndex(0);
|
|
191
240
|
this.checklist = {
|
|
192
|
-
constructionType:
|
|
193
|
-
constructionDetailType:
|
|
194
|
-
location: `${((
|
|
241
|
+
constructionType: (_p = this.selectedConstructionType) === null || _p === void 0 ? void 0 : _p.name,
|
|
242
|
+
constructionDetailType: (_q = this.selectedConstructionDetailType) === null || _q === void 0 ? void 0 : _q.name,
|
|
243
|
+
location: `${((_r = this.selectedBuilding) === null || _r === void 0 ? void 0 : _r.name) || ''} ${this.selectedLevel.floorDisplayName || ''}층`,
|
|
195
244
|
documentNo: '0000-000-000000',
|
|
196
245
|
buildingInspection: {
|
|
197
246
|
status: BuildingInspectionStatus.WAIT
|
|
@@ -318,6 +367,7 @@ let GridInspectionCreatePopup = class GridInspectionCreatePopup extends LitEleme
|
|
|
318
367
|
buildingLevels {
|
|
319
368
|
id
|
|
320
369
|
floor
|
|
370
|
+
floorDisplayName
|
|
321
371
|
mainDrawing {
|
|
322
372
|
id
|
|
323
373
|
name
|
|
@@ -357,7 +407,9 @@ let GridInspectionCreatePopup = class GridInspectionCreatePopup extends LitEleme
|
|
|
357
407
|
patch.managerId = this.selectedManager.userId;
|
|
358
408
|
patch.checklist = {
|
|
359
409
|
name: this.checklist.name,
|
|
360
|
-
|
|
410
|
+
constructionType: this.htmlSelectConstructionType.displayText,
|
|
411
|
+
constructionDetailType: this.htmlSelectConstructionDetailType.displayText,
|
|
412
|
+
location: `${this.selectedBuilding.name} ${this.selectedLevel.floorDisplayName}층`,
|
|
361
413
|
inspectionParts: this.checklist.inspectionParts
|
|
362
414
|
};
|
|
363
415
|
patch.checklistItem = (_a = this.checklist.checklistItems) === null || _a === void 0 ? void 0 : _a.map(item => {
|
|
@@ -410,6 +462,42 @@ let GridInspectionCreatePopup = class GridInspectionCreatePopup extends LitEleme
|
|
|
410
462
|
this.checklist = Object.assign({}, this.checklist);
|
|
411
463
|
}, 100);
|
|
412
464
|
}
|
|
465
|
+
async _onSelectConstructionType(e) {
|
|
466
|
+
var _a, _b, _c, _d;
|
|
467
|
+
const constructionTypeId = e.target.value;
|
|
468
|
+
this.selectedConstructionType = await this._getConstructionType(constructionTypeId);
|
|
469
|
+
this.selectedConstructionDetailType = await Object.assign({}, (_b = (_a = this.selectedConstructionType) === null || _a === void 0 ? void 0 : _a.constructionDetailTypes) === null || _b === void 0 ? void 0 : _b[0]);
|
|
470
|
+
this.checklist = Object.assign(Object.assign({}, this.checklist), { constructionType: (_c = this.selectedConstructionType) === null || _c === void 0 ? void 0 : _c.name, constructionDetailType: (_d = this.selectedConstructionDetailType) === null || _d === void 0 ? void 0 : _d.name });
|
|
471
|
+
await this.htmlSelectConstructionDetailType.selectIndex(0);
|
|
472
|
+
}
|
|
473
|
+
_onSelectConstructionDetailType(e) {
|
|
474
|
+
var _a, _b, _c, _d;
|
|
475
|
+
const constructionDetailTypeId = e.target.value;
|
|
476
|
+
this.selectedConstructionDetailType = Object.assign({}, (((_b = (_a = this.selectedConstructionType) === null || _a === void 0 ? void 0 : _a.constructionDetailTypes) === null || _b === void 0 ? void 0 : _b.find(v => v.id == constructionDetailTypeId)) || {}));
|
|
477
|
+
this.checklist = Object.assign(Object.assign({}, this.checklist), { constructionType: (_c = this.selectedConstructionType) === null || _c === void 0 ? void 0 : _c.name, constructionDetailType: (_d = this.selectedConstructionDetailType) === null || _d === void 0 ? void 0 : _d.name });
|
|
478
|
+
}
|
|
479
|
+
async _getConstructionType(id = '') {
|
|
480
|
+
var _a;
|
|
481
|
+
const response = await client.query({
|
|
482
|
+
query: gql `
|
|
483
|
+
query ConstructionType($id: String!) {
|
|
484
|
+
constructionType(id: $id) {
|
|
485
|
+
id
|
|
486
|
+
name
|
|
487
|
+
description
|
|
488
|
+
constructionDetailTypes {
|
|
489
|
+
id
|
|
490
|
+
name
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
`,
|
|
495
|
+
variables: { id }
|
|
496
|
+
});
|
|
497
|
+
if (response.errors)
|
|
498
|
+
return;
|
|
499
|
+
return ((_a = response.data) === null || _a === void 0 ? void 0 : _a.constructionType) || {};
|
|
500
|
+
}
|
|
413
501
|
};
|
|
414
502
|
GridInspectionCreatePopup.styles = [
|
|
415
503
|
ButtonContainerStyles,
|
|
@@ -584,6 +672,18 @@ __decorate([
|
|
|
584
672
|
state(),
|
|
585
673
|
__metadata("design:type", Object)
|
|
586
674
|
], GridInspectionCreatePopup.prototype, "selectedLevel", void 0);
|
|
675
|
+
__decorate([
|
|
676
|
+
state(),
|
|
677
|
+
__metadata("design:type", Object)
|
|
678
|
+
], GridInspectionCreatePopup.prototype, "constructionTypes", void 0);
|
|
679
|
+
__decorate([
|
|
680
|
+
state(),
|
|
681
|
+
__metadata("design:type", Object)
|
|
682
|
+
], GridInspectionCreatePopup.prototype, "selectedConstructionType", void 0);
|
|
683
|
+
__decorate([
|
|
684
|
+
state(),
|
|
685
|
+
__metadata("design:type", Object)
|
|
686
|
+
], GridInspectionCreatePopup.prototype, "selectedConstructionDetailType", void 0);
|
|
587
687
|
__decorate([
|
|
588
688
|
state(),
|
|
589
689
|
__metadata("design:type", Object)
|
|
@@ -608,6 +708,14 @@ __decorate([
|
|
|
608
708
|
query('md-filled-select[checklistTemplate]'),
|
|
609
709
|
__metadata("design:type", Object)
|
|
610
710
|
], GridInspectionCreatePopup.prototype, "htmlSelectChecklistTemplate", void 0);
|
|
711
|
+
__decorate([
|
|
712
|
+
query('md-filled-select[constructionType]'),
|
|
713
|
+
__metadata("design:type", Object)
|
|
714
|
+
], GridInspectionCreatePopup.prototype, "htmlSelectConstructionType", void 0);
|
|
715
|
+
__decorate([
|
|
716
|
+
query('md-filled-select[constructionDetailType]'),
|
|
717
|
+
__metadata("design:type", Object)
|
|
718
|
+
], GridInspectionCreatePopup.prototype, "htmlSelectConstructionDetailType", void 0);
|
|
611
719
|
__decorate([
|
|
612
720
|
query('ox-grist'),
|
|
613
721
|
__metadata("design:type", DataGrist)
|
package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-inspection-create-popup.js","sourceRoot":"","sources":["../../../../client/pages/building-inspection-grid/component/grid-inspection-create-popup.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,iCAAiC,CAAA;AAExC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAA;AAIvH,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,UAAU;IAAlD;;QAyI8B,cAAS,GAAW,EAAE,CAAA;QACtB,wBAAmB,GAAW,EAAE,CAAA;QAChC,uBAAkB,GAAW,EAAE,CAAA;QAC/B,4BAAuB,GAAW,EAAE,CAAA;QACpC,SAAI,GAAW,EAAE,CAAA;QAEpC,cAAS,GAAQ,EAAE,CAAA;QACnB,qBAAgB,GAAQ,EAAE,CAAA;QAC1B,kBAAa,GAAQ,EAAE,CAAA;QAEvB,aAAQ,GAAQ,EAAE,CAAA;QAClB,oBAAe,GAAQ,EAAE,CAAA;QAEzB,uBAAkB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yBAAyB,CA8jB9B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist/ox-grist.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { DataGrist } from '@operato/data-grist/ox-grist.js'\nimport { client } from '@operato/graphql'\nimport { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'\nimport { notify } from '@operato/layout'\nimport { BuildingInspectionStatus, CHECKLIST_MAIN_TYPE_LIST } from '../../building-inspection/building-inspection-list'\nimport { ChecklistMode } from '../../checklist/checklist-view'\n\n@customElement('grid-inspection-create-popup')\nclass GridInspectionCreatePopup extends LitElement {\n static styles = [\n ButtonContainerStyles,\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n padding: 15px 20px;\n\n background-color: var(--md-sys-color-surface);\n }\n\n md-filled-select {\n width: auto;\n min-width: 150px;\n --md-filled-select-text-field-container-color: transparent;\n --md-filled-select-text-field-active-indicator-color: #999;\n --md-filled-select-text-field-input-text-size: 14px;\n --md-filled-select-text-field-input-text-weight: bold;\n --md-filled-select-text-field-input-text-line-height: 6px;\n }\n md-filled-select[level] {\n min-width: 110px;\n margin-left: 20px;\n }\n\n checklist-view {\n pointer-events: none;\n transform-origin: top left;\n }\n\n div[body] {\n height: 100%;\n overflow-y: auto;\n\n div[tab-container][inactive] {\n display: none !important;\n }\n\n div[edit] {\n width: 100%;\n\n div[detail] {\n margin-bottom: 30px;\n }\n\n h3 {\n position: relative;\n color: #0595e5;\n font-size: 17px;\n font-weight: 700;\n background-color: var(--md-sys-color-surface);\n margin-top: 0;\n margin-bottom: 5px;\n }\n\n div[data-row] {\n display: grid;\n grid-template-columns: 100px 1fr 0.3fr 100px 1fr;\n gap: 15px;\n margin-bottom: 11px;\n\n & > label {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n font-size: 15px;\n }\n\n div[inspection-parts] {\n display: block;\n margin-top: 7px;\n\n & > span {\n display: inline-block;\n margin-right: 5px;\n margin-bottom: 5px;\n\n & > md-checkbox {\n margin-top: 2px;\n }\n }\n }\n }\n }\n\n div[preview] {\n display: flex;\n overflow-y: auto;\n overflow-x: hidden;\n }\n }\n\n div[tabs] {\n display: flex;\n\n button {\n background-color: #fff;\n padding: 6px 14px;\n color: #999;\n border: solid 1px #999;\n border-top: none;\n border-radius: 0px 0px 8px 8px;\n margin-right: -2px;\n cursor: pointer;\n\n &[active] {\n color: var(--button-color, var(--md-sys-color-on-secondary-container));\n font-weight: 600;\n }\n }\n }\n\n div[button-container] {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n\n md-elevated-button[blue] {\n --md-elevated-button-container-color: #0595e5;\n\n --md-elevated-button-label-text-color: #fff;\n --md-elevated-button-hover-label-text-color: #fff;\n --md-elevated-button-pressed-label-text-color: #fff;\n --md-elevated-button-focus-label-text-color: #fff;\n --md-elevated-button-icon-color: #fff;\n --md-elevated-button-hover-icon-color: #fff;\n --md-elevated-button-pressed-icon-color: #fff;\n --md-elevated-button-focus-icon-color: #fff;\n }\n }\n `\n ]\n\n @property({ type: Object }) gristConfig: any\n @property({ type: Object }) checklistDetailTypes: any\n @property({ type: String }) projectId: string = ''\n @property({ type: String }) checklistTemplateId: string = ''\n @property({ type: String }) selectedBuildingId: string = ''\n @property({ type: String }) selectedBuildingLevelId: string = ''\n @property({ type: String }) cell: string = ''\n\n @state() buildings: any = []\n @state() selectedBuilding: any = {}\n @state() selectedLevel: any = {}\n\n @state() managers: any = []\n @state() selectedManager: any = {}\n\n @state() checklistTemplates: any = []\n @state() checklist: any = {}\n\n @state() activeTab: 'edit' | 'preview' = 'edit'\n\n @query('md-filled-select[checklistTemplate]') htmlSelectChecklistTemplate\n @query('ox-grist') grist!: DataGrist\n\n @query('div[preview]') checklistViewContainer!: HTMLDivElement\n @query('checklist-view') checklistView!: HTMLElement\n\n render() {\n return html`\n <div body>\n <div tab-container ?inactive=${this.activeTab !== 'edit'} edit>\n <div detail>\n <h3>세부 정보</h3>\n\n <div data-row>\n <label>동</label>\n <md-filled-text-field building name=\"buildingName\" type=\"text\" .value=${this.selectedBuilding?.name || ''} disabled>\n </md-filled-text-field>\n\n <div partition></div>\n\n <label>층</label>\n <md-filled-text-field level name=\"buildingLevelName\" type=\"text\" .value=${this.selectedLevel?.floor || ''} disabled>\n </md-filled-text-field>\n </div>\n </div>\n\n <div checklist>\n <h3>체크리스트</h3>\n\n <div data-row>\n <label>이름</label>\n <md-filled-text-field\n name=\"checklistName\"\n type=\"text\"\n .value=${this.checklist?.name || ''}\n @input=${this._onInputChange}\n >\n </md-filled-text-field>\n\n <div partition></div>\n\n <label>템플릿</label>\n <md-filled-select checklistTemplate @change=${this._onSelectChecklistTemplate}>\n <md-select-option></md-select-option>\n ${this.checklistTemplates?.map((checklistTemplate, idx) => {\n return html` <md-select-option .value=${checklistTemplate.id}>\n <div slot=\"headline\">${checklistTemplate.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n </div>\n\n <div manager>\n <h3>담당자</h3>\n\n <div data-row>\n <label>담당자</label>\n <md-filled-select manager @change=${this._onSelectManager}>\n <md-select-option></md-select-option>\n ${this.managers?.map((manager, idx) => {\n return html` <md-select-option .value=${manager.userId}>\n <div slot=\"headline\">${manager.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n </div>\n\n <ox-grist\n .mode=${'GRID'}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n @field-change=${this.onChangeGird}\n >\n </ox-grist>\n </div>\n\n <div tab-container ?inactive=${this.activeTab !== 'preview'} preview>\n <checklist-view .mode=${ChecklistMode.VIEWER} .checklist=${this.checklist}></checklist-view>\n </div>\n </div>\n\n <div tabs>\n <button ?active=${this.activeTab === 'edit'} @click=${() => (this.activeTab = 'edit')}>검측 요청 정보</button>\n <button ?active=${this.activeTab === 'preview'} @click=${() => (this.activeTab = 'preview')}>미리보기</button>\n </div>\n\n <div button-container>\n <md-elevated-button blue @click=${this._createInspection}>\n <md-icon slot=\"icon\">task</md-icon>검측 요청서 등록\n </md-elevated-button>\n <md-elevated-button @click=${this._close}> <md-icon slot=\"icon\">cancel</md-icon>취소</md-elevated-button>\n </div>\n `\n }\n\n updated() {\n const ratio = Math.round((this.checklistViewContainer?.offsetWidth / this.checklistView?.offsetWidth) * 100) / 100 || 1\n this.checklistView.style.transform = `scale(${ratio})`\n }\n\n async firstUpdated() {\n const response = await client.query({\n query: gql`\n query Project($id: String!) {\n project(id: $id) {\n id\n name\n buildingComplex {\n id\n buildings {\n id\n name\n }\n }\n }\n\n checklistTemplates {\n items {\n id\n name\n }\n }\n\n checklistTypes {\n items {\n id\n mainType\n detailType\n }\n }\n\n managers {\n id\n phone\n position\n userId\n name\n }\n }\n `,\n variables: {\n id: this.projectId\n }\n })\n\n if (response.errors) return\n\n const project = response.data?.project\n const checklistTemplates = response.data?.checklistTemplates?.items || []\n this.managers = response.data?.managers\n this.checklistDetailTypes = response.data.checklistTypes?.items?.map(v => {\n return {\n display: v.detailType,\n value: v.id,\n mainType: v.mainType\n }\n })\n\n this.checklistTemplates = [...checklistTemplates]\n this.buildings = [...(project?.buildingComplex?.buildings || [])]\n\n // selectedBuildingId가 있으면 해당 빌딩 선택, 없으면 첫번째 빌딩 선택\n this.selectedBuilding = this.buildings.find(building => building.id == this.selectedBuildingId)\n this.selectedBuilding = await this._getBuilding(this.selectedBuilding.id)\n\n // selectedBuildingLevelId가 있으면 선택된 층, 없으면 첫번째 층 선택\n this.selectedLevel = this.selectedBuilding?.buildingLevels?.find(level => level.id == this.selectedBuildingLevelId)\n\n // 기본 값 셋팅 select\n await this.htmlSelectChecklistTemplate.selectIndex(0)\n\n this.checklist = {\n constructionType: '',\n constructionDetailType: '',\n location: `${this.selectedBuilding?.name || ''} ${this.selectedLevel.floor || ''}층`,\n documentNo: '0000-000-000000',\n buildingInspection: {\n status: BuildingInspectionStatus.WAIT\n }\n }\n\n // 그리드 셋팅\n this.setGristConfig()\n }\n\n requestRefresh(buildingInspectionId: string = '') {\n this.dispatchEvent(new CustomEvent('requestRefresh', { detail: { buildingInspectionId } }))\n }\n\n private _close() {\n history.back()\n }\n\n setGristConfig() {\n this.gristConfig = {\n columns: [\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_upward',\n handlers: {\n click: 'move-up'\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_downward',\n handlers: {\n click: 'move-down'\n }\n },\n {\n type: 'select',\n name: 'mainType',\n header: '구분',\n record: {\n editable: true,\n options: [{ display: '', value: '' }].concat(\n Object.keys(CHECKLIST_MAIN_TYPE_LIST).map(key => ({ display: CHECKLIST_MAIN_TYPE_LIST[key], value: key }))\n )\n },\n width: 100\n },\n {\n type: 'select',\n name: 'detailType',\n header: '상세 구분',\n record: {\n editable: true,\n options: (columns, data, column) => [\n { display: '', value: '' },\n ...this.checklistDetailTypes.filter(v => v.mainType == column.mainType)\n ]\n },\n width: 200\n },\n {\n type: 'string',\n name: 'name',\n header: '검사 항목',\n record: {\n editable: true\n },\n width: 200\n },\n {\n type: 'string',\n name: 'inspctionCriteria',\n header: '검사 기준',\n record: {\n editable: true\n },\n width: 200\n }\n ],\n pagination: {\n infinite: true\n },\n sorters: [{ name: 'mainType' }, { name: 'sequence' }]\n }\n }\n\n async fetchHandler() {\n if (!this.checklistTemplateId) return []\n\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n checklistTemplateItems(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n sequence\n name\n inspctionCriteria\n mainType\n detailType\n }\n }\n }\n `,\n variables: {\n filters: {\n name: 'checklistTemplateId',\n value: this.checklistTemplateId,\n operator: 'eq'\n },\n sortings: [{ name: 'mainType' }, { name: 'sequence' }]\n }\n })\n\n // 체크리스트 아이템 데이터 갱신\n this.onChangeGird()\n\n return {\n records: response.data.checklistTemplateItems.items || []\n }\n }\n\n async _getBuilding(buildingId: string = '') {\n const response = await client.query({\n query: gql`\n query Building($id: String!) {\n building(id: $id) {\n id\n name\n buildingLevels {\n id\n floor\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n }\n }\n }\n `,\n variables: {\n id: buildingId\n }\n })\n\n if (response.errors) return\n\n return response.data?.building || {}\n }\n\n private _onSelectChecklistTemplate(e) {\n const checklistTemplateId = e.target.value\n\n // 체크 리스트 이름 셋팅\n this.checklist = { ...this.checklist, name: e.target.displayText }\n\n // 그리드 아이템 셋팅\n if (checklistTemplateId) {\n this.checklistTemplateId = checklistTemplateId\n this.grist.fetch()\n }\n }\n\n private _onSelectManager(e) {\n const managerId = e.target.value\n this.selectedManager = this.managers.find(manager => manager.userId == managerId)\n }\n\n async _createInspection() {\n let patch: any = {}\n\n patch.buildingLevelId = this.selectedLevel.id\n patch.managerId = this.selectedManager.userId\n patch.checklist = {\n name: this.checklist.name,\n location: `${this.selectedBuilding.name} ${this.selectedLevel.floor}층`,\n inspectionParts: this.checklist.inspectionParts\n }\n patch.checklistItem = this.checklist.checklistItems?.map(item => {\n return {\n name: item.name,\n mainType: item.mainType,\n detailType: item.detailType,\n inspctionCriteria: item.inspctionCriteria\n }\n })\n\n const [cellX, cellY] = this.cell.split(',')\n patch.cellX = Number(cellX)\n patch.cellY = Number(cellY)\n\n const response = await client.mutate({\n mutation: gql`\n mutation CreateBuildingInspection($patch: NewBuildingInspection!) {\n createBuildingInspection(patch: $patch) {\n id\n }\n }\n `,\n variables: {\n patch\n }\n })\n\n if (!response.errors) {\n notify({ message: '검측 요청서를 등록하였습니다.' })\n this.requestRefresh(response.data.createBuildingInspection.id)\n this._close()\n } else {\n notify({ message: response.errors?.[0]?.message || '검측 요청서 등록에 실패하였습니다.', level: 'error' })\n }\n }\n\n // Input 요소의 값이 변경될 때 호출되는 콜백 함수\n private _onInputChange(event: InputEvent) {\n const target = event.target as HTMLInputElement\n this[target.name] = target.value\n this.checklist = { ...this.checklist, name: target.value }\n }\n\n // 체크리스트 아이템 데이터 갱신\n private onChangeGird() {\n const checklistDetailTypes = Object.fromEntries(this.checklistDetailTypes.map(item => [item.value, item.display]))\n const grist = this.grist\n\n // grist field-change가 오는 시점이 데이터 변경 전이라 setTimeout으로 변경\n setTimeout(() => {\n this.checklist.checklistItems = grist.dirtyData.records.map((row, idx) => {\n return {\n ...row,\n detailType: checklistDetailTypes[row.detailType],\n sequence: idx\n }\n })\n this.checklist = { ...this.checklist }\n }, 100)\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"grid-inspection-create-popup.js","sourceRoot":"","sources":["../../../../client/pages/building-inspection-grid/component/grid-inspection-create-popup.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,iCAAiC,CAAA;AAExC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAA;AAIvH,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,UAAU;IAAlD;;QAyI8B,cAAS,GAAW,EAAE,CAAA;QACtB,wBAAmB,GAAW,EAAE,CAAA;QAChC,uBAAkB,GAAW,EAAE,CAAA;QAC/B,4BAAuB,GAAW,EAAE,CAAA;QACpC,SAAI,GAAW,EAAE,CAAA;QAEpC,cAAS,GAAQ,EAAE,CAAA;QACnB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gC;AAC/B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0EAAqC;AACpC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAAkB;AAEpC;IAAR,KAAK,EAAE;;4DAAoB;AACnB;IAAR,KAAK,EAAE;;mEAA2B;AAC1B;IAAR,KAAK,EAAE;;gEAAwB;AAEvB;IAAR,KAAK,EAAE;;oEAA4B;AAC3B;IAAR,KAAK,EAAE;;2EAAmC;AAClC;IAAR,KAAK,EAAE;;iFAAyC;AAExC;IAAR,KAAK,EAAE;;2DAAmB;AAClB;IAAR,KAAK,EAAE;;kEAA0B;AAEzB;IAAR,KAAK,EAAE;;qEAA6B;AAC5B;IAAR,KAAK,EAAE;;4DAAoB;AAEnB;IAAR,KAAK,EAAE;;4DAAuC;AAED;IAA7C,KAAK,CAAC,qCAAqC,CAAC;;8EAA4B;AAC5B;IAA5C,KAAK,CAAC,oCAAoC,CAAC;;6EAA2B;AACpB;IAAlD,KAAK,CAAC,0CAA0C,CAAC;;mFAAiC;AAChE;IAAlB,KAAK,CAAC,UAAU,CAAC;8BAAS,SAAS;wDAAA;AAEb;IAAtB,KAAK,CAAC,cAAc,CAAC;8BAA0B,cAAc;yEAAA;AACrC;IAAxB,KAAK,CAAC,gBAAgB,CAAC;8BAAiB,WAAW;gEAAA;AArKhD,yBAAyB;IAD9B,aAAa,CAAC,8BAA8B,CAAC;GACxC,yBAAyB,CAsqB9B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist/ox-grist.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { DataGrist } from '@operato/data-grist/ox-grist.js'\nimport { client } from '@operato/graphql'\nimport { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'\nimport { notify } from '@operato/layout'\nimport { BuildingInspectionStatus, CHECKLIST_MAIN_TYPE_LIST } from '../../building-inspection/building-inspection-list'\nimport { ChecklistMode } from '../../checklist/checklist-view'\n\n@customElement('grid-inspection-create-popup')\nclass GridInspectionCreatePopup extends LitElement {\n static styles = [\n ButtonContainerStyles,\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n padding: 15px 20px;\n\n background-color: var(--md-sys-color-surface);\n }\n\n md-filled-select {\n width: auto;\n min-width: 150px;\n --md-filled-select-text-field-container-color: transparent;\n --md-filled-select-text-field-active-indicator-color: #999;\n --md-filled-select-text-field-input-text-size: 14px;\n --md-filled-select-text-field-input-text-weight: bold;\n --md-filled-select-text-field-input-text-line-height: 6px;\n }\n md-filled-select[level] {\n min-width: 110px;\n margin-left: 20px;\n }\n\n checklist-view {\n pointer-events: none;\n transform-origin: top left;\n }\n\n div[body] {\n height: 100%;\n overflow-y: auto;\n\n div[tab-container][inactive] {\n display: none !important;\n }\n\n div[edit] {\n width: 100%;\n\n div[detail] {\n margin-bottom: 30px;\n }\n\n h3 {\n position: relative;\n color: #0595e5;\n font-size: 17px;\n font-weight: 700;\n background-color: var(--md-sys-color-surface);\n margin-top: 0;\n margin-bottom: 5px;\n }\n\n div[data-row] {\n display: grid;\n grid-template-columns: 100px 1fr 0.3fr 100px 1fr;\n gap: 15px;\n margin-bottom: 11px;\n\n & > label {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n font-size: 15px;\n }\n\n div[inspection-parts] {\n display: block;\n margin-top: 7px;\n\n & > span {\n display: inline-block;\n margin-right: 5px;\n margin-bottom: 5px;\n\n & > md-checkbox {\n margin-top: 2px;\n }\n }\n }\n }\n }\n\n div[preview] {\n display: flex;\n overflow-y: auto;\n overflow-x: hidden;\n }\n }\n\n div[tabs] {\n display: flex;\n\n button {\n background-color: #fff;\n padding: 6px 14px;\n color: #999;\n border: solid 1px #999;\n border-top: none;\n border-radius: 0px 0px 8px 8px;\n margin-right: -2px;\n cursor: pointer;\n\n &[active] {\n color: var(--button-color, var(--md-sys-color-on-secondary-container));\n font-weight: 600;\n }\n }\n }\n\n div[button-container] {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n\n md-elevated-button[blue] {\n --md-elevated-button-container-color: #0595e5;\n\n --md-elevated-button-label-text-color: #fff;\n --md-elevated-button-hover-label-text-color: #fff;\n --md-elevated-button-pressed-label-text-color: #fff;\n --md-elevated-button-focus-label-text-color: #fff;\n --md-elevated-button-icon-color: #fff;\n --md-elevated-button-hover-icon-color: #fff;\n --md-elevated-button-pressed-icon-color: #fff;\n --md-elevated-button-focus-icon-color: #fff;\n }\n }\n `\n ]\n\n @property({ type: Object }) gristConfig: any\n @property({ type: Object }) checklistDetailTypes: any\n @property({ type: String }) projectId: string = ''\n @property({ type: String }) checklistTemplateId: string = ''\n @property({ type: String }) selectedBuildingId: string = ''\n @property({ type: String }) selectedBuildingLevelId: string = ''\n @property({ type: String }) cell: string = ''\n\n @state() buildings: any = []\n @state() selectedBuilding: any = {}\n @state() selectedLevel: any = {}\n\n @state() constructionTypes: any = []\n @state() selectedConstructionType: any = {}\n @state() selectedConstructionDetailType: any = {}\n\n @state() managers: any = []\n @state() selectedManager: any = {}\n\n @state() checklistTemplates: any = []\n @state() checklist: any = {}\n\n @state() activeTab: 'edit' | 'preview' = 'edit'\n\n @query('md-filled-select[checklistTemplate]') htmlSelectChecklistTemplate\n @query('md-filled-select[constructionType]') htmlSelectConstructionType\n @query('md-filled-select[constructionDetailType]') htmlSelectConstructionDetailType\n @query('ox-grist') grist!: DataGrist\n\n @query('div[preview]') checklistViewContainer!: HTMLDivElement\n @query('checklist-view') checklistView!: HTMLElement\n\n render() {\n return html`\n <div body>\n <div tab-container ?inactive=${this.activeTab !== 'edit'} edit>\n <div detail>\n <h3>세부 정보</h3>\n\n <div data-row>\n <label>공종</label>\n <md-filled-select constructionType @change=${this._onSelectConstructionType}>\n ${this.constructionTypes?.map(constructionType => {\n const selected = constructionType.id === this.selectedConstructionType?.id\n return html`<md-select-option ?selected=${selected} .value=${constructionType.id}>\n <div slot=\"headline\">${constructionType.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n\n <div partition></div>\n\n <label>세부 공종</label>\n <md-filled-select constructionDetailType @change=${this._onSelectConstructionDetailType}>\n ${this.selectedConstructionType?.constructionDetailTypes?.map(constructionDetailType => {\n const selected = constructionDetailType.id === this.selectedConstructionDetailType.id\n return html`<md-select-option ?selected=${selected} .value=${constructionDetailType.id}>\n <div slot=\"headline\">${constructionDetailType.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n\n <div data-row>\n <label>동</label>\n <md-filled-text-field building name=\"buildingName\" type=\"text\" .value=${this.selectedBuilding?.name || ''} disabled>\n </md-filled-text-field>\n\n <div partition></div>\n\n <label>층</label>\n <md-filled-text-field\n level\n name=\"buildingLevelName\"\n type=\"text\"\n .value=${this.selectedLevel?.floorDisplayName || ''}\n disabled\n >\n </md-filled-text-field>\n </div>\n </div>\n\n <div checklist>\n <h3>체크리스트</h3>\n\n <div data-row>\n <label>이름</label>\n <md-filled-text-field\n name=\"checklistName\"\n type=\"text\"\n .value=${this.checklist?.name || ''}\n @input=${this._onInputChange}\n >\n </md-filled-text-field>\n\n <div partition></div>\n\n <label>템플릿</label>\n <md-filled-select checklistTemplate @change=${this._onSelectChecklistTemplate}>\n <md-select-option></md-select-option>\n ${this.checklistTemplates?.map((checklistTemplate, idx) => {\n return html` <md-select-option .value=${checklistTemplate.id}>\n <div slot=\"headline\">${checklistTemplate.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n </div>\n\n <div manager>\n <h3>담당자</h3>\n\n <div data-row>\n <label>담당자</label>\n <md-filled-select manager @change=${this._onSelectManager}>\n <md-select-option></md-select-option>\n ${this.managers?.map((manager, idx) => {\n return html` <md-select-option .value=${manager.userId}>\n <div slot=\"headline\">${manager.name}</div>\n </md-select-option>`\n })}\n </md-filled-select>\n </div>\n </div>\n\n <ox-grist\n .mode=${'GRID'}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n @field-change=${this.onChangeGird}\n >\n </ox-grist>\n </div>\n\n <div tab-container ?inactive=${this.activeTab !== 'preview'} preview>\n <checklist-view .mode=${ChecklistMode.VIEWER} .checklist=${this.checklist}></checklist-view>\n </div>\n </div>\n\n <div tabs>\n <button ?active=${this.activeTab === 'edit'} @click=${() => (this.activeTab = 'edit')}>검측 요청 정보</button>\n <button ?active=${this.activeTab === 'preview'} @click=${() => (this.activeTab = 'preview')}>미리보기</button>\n </div>\n\n <div button-container>\n <md-elevated-button blue @click=${this._createInspection}>\n <md-icon slot=\"icon\">task</md-icon>검측 요청서 등록\n </md-elevated-button>\n <md-elevated-button @click=${this._close}> <md-icon slot=\"icon\">cancel</md-icon>취소</md-elevated-button>\n </div>\n `\n }\n\n updated() {\n const ratio = Math.round((this.checklistViewContainer?.offsetWidth / this.checklistView?.offsetWidth) * 100) / 100 || 1\n this.checklistView.style.transform = `scale(${ratio})`\n }\n\n async firstUpdated() {\n const response = await client.query({\n query: gql`\n query Project($id: String!) {\n project(id: $id) {\n id\n name\n buildingComplex {\n id\n buildings {\n id\n name\n }\n }\n }\n\n constructionTypes {\n items {\n name\n id\n }\n }\n\n checklistTemplates {\n items {\n id\n name\n }\n }\n\n checklistTypes {\n items {\n id\n mainType\n detailType\n }\n }\n\n managers {\n id\n phone\n position\n userId\n name\n }\n }\n `,\n variables: {\n id: this.projectId\n }\n })\n\n if (response.errors) return\n\n const project = response.data?.project\n const checklistTemplates = response.data?.checklistTemplates?.items || []\n const constructionTypes = response.data?.constructionTypes?.items || []\n\n this.managers = response.data?.managers\n this.checklistDetailTypes = response.data.checklistTypes?.items?.map(v => {\n return {\n display: v.detailType,\n value: v.id,\n mainType: v.mainType\n }\n })\n\n this.constructionTypes = [...constructionTypes]\n this.checklistTemplates = [...checklistTemplates]\n this.buildings = [...(project?.buildingComplex?.buildings || [])]\n\n // selectedBuildingId가 있으면 해당 빌딩 선택, 없으면 첫번째 빌딩 선택\n this.selectedBuilding = this.buildings.find(building => building.id == this.selectedBuildingId)\n this.selectedBuilding = await this._getBuilding(this.selectedBuilding.id)\n this.selectedConstructionType = constructionTypes?.[0]\n\n // selectedBuildingLevelId가 있으면 선택된 층, 없으면 첫번째 층 선택\n this.selectedLevel = this.selectedBuilding?.buildingLevels?.find(level => level.id == this.selectedBuildingLevelId)\n\n // 세부 공종 리스트 가져오기\n this.selectedConstructionType = await this._getConstructionType(this.selectedConstructionType.id)\n this.selectedConstructionDetailType = this.selectedConstructionType?.constructionDetailTypes?.[0]\n this.selectedConstructionType = await { ...this.selectedConstructionType }\n\n // 기본 값 셋팅 select\n await this.htmlSelectChecklistTemplate.selectIndex(0)\n await this.htmlSelectConstructionDetailType.selectIndex(0)\n\n this.checklist = {\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name,\n location: `${this.selectedBuilding?.name || ''} ${this.selectedLevel.floorDisplayName || ''}층`,\n documentNo: '0000-000-000000',\n buildingInspection: {\n status: BuildingInspectionStatus.WAIT\n }\n }\n\n // 그리드 셋팅\n this.setGristConfig()\n }\n\n requestRefresh(buildingInspectionId: string = '') {\n this.dispatchEvent(new CustomEvent('requestRefresh', { detail: { buildingInspectionId } }))\n }\n\n private _close() {\n history.back()\n }\n\n setGristConfig() {\n this.gristConfig = {\n columns: [\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_upward',\n handlers: {\n click: 'move-up'\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_downward',\n handlers: {\n click: 'move-down'\n }\n },\n {\n type: 'select',\n name: 'mainType',\n header: '구분',\n record: {\n editable: true,\n options: [{ display: '', value: '' }].concat(\n Object.keys(CHECKLIST_MAIN_TYPE_LIST).map(key => ({ display: CHECKLIST_MAIN_TYPE_LIST[key], value: key }))\n )\n },\n width: 100\n },\n {\n type: 'select',\n name: 'detailType',\n header: '상세 구분',\n record: {\n editable: true,\n options: (columns, data, column) => [\n { display: '', value: '' },\n ...this.checklistDetailTypes.filter(v => v.mainType == column.mainType)\n ]\n },\n width: 200\n },\n {\n type: 'string',\n name: 'name',\n header: '검사 항목',\n record: {\n editable: true\n },\n width: 200\n },\n {\n type: 'string',\n name: 'inspctionCriteria',\n header: '검사 기준',\n record: {\n editable: true\n },\n width: 200\n }\n ],\n pagination: {\n infinite: true\n },\n sorters: [{ name: 'mainType' }, { name: 'sequence' }]\n }\n }\n\n async fetchHandler() {\n if (!this.checklistTemplateId) return []\n\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n checklistTemplateItems(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n sequence\n name\n inspctionCriteria\n mainType\n detailType\n }\n }\n }\n `,\n variables: {\n filters: {\n name: 'checklistTemplateId',\n value: this.checklistTemplateId,\n operator: 'eq'\n },\n sortings: [{ name: 'mainType' }, { name: 'sequence' }]\n }\n })\n\n // 체크리스트 아이템 데이터 갱신\n this.onChangeGird()\n\n return {\n records: response.data.checklistTemplateItems.items || []\n }\n }\n\n async _getBuilding(buildingId: string = '') {\n const response = await client.query({\n query: gql`\n query Building($id: String!) {\n building(id: $id) {\n id\n name\n buildingLevels {\n id\n floor\n floorDisplayName\n mainDrawing {\n id\n name\n fullpath\n }\n mainDrawingImage\n }\n }\n }\n `,\n variables: {\n id: buildingId\n }\n })\n\n if (response.errors) return\n\n return response.data?.building || {}\n }\n\n private _onSelectChecklistTemplate(e) {\n const checklistTemplateId = e.target.value\n\n // 체크 리스트 이름 셋팅\n this.checklist = { ...this.checklist, name: e.target.displayText }\n\n // 그리드 아이템 셋팅\n if (checklistTemplateId) {\n this.checklistTemplateId = checklistTemplateId\n this.grist.fetch()\n }\n }\n\n private _onSelectManager(e) {\n const managerId = e.target.value\n this.selectedManager = this.managers.find(manager => manager.userId == managerId)\n }\n\n async _createInspection() {\n let patch: any = {}\n\n patch.buildingLevelId = this.selectedLevel.id\n patch.managerId = this.selectedManager.userId\n patch.checklist = {\n name: this.checklist.name,\n constructionType: this.htmlSelectConstructionType.displayText,\n constructionDetailType: this.htmlSelectConstructionDetailType.displayText,\n location: `${this.selectedBuilding.name} ${this.selectedLevel.floorDisplayName}층`,\n inspectionParts: this.checklist.inspectionParts\n }\n patch.checklistItem = this.checklist.checklistItems?.map(item => {\n return {\n name: item.name,\n mainType: item.mainType,\n detailType: item.detailType,\n inspctionCriteria: item.inspctionCriteria\n }\n })\n\n const [cellX, cellY] = this.cell.split(',')\n patch.cellX = Number(cellX)\n patch.cellY = Number(cellY)\n\n const response = await client.mutate({\n mutation: gql`\n mutation CreateBuildingInspection($patch: NewBuildingInspection!) {\n createBuildingInspection(patch: $patch) {\n id\n }\n }\n `,\n variables: {\n patch\n }\n })\n\n if (!response.errors) {\n notify({ message: '검측 요청서를 등록하였습니다.' })\n this.requestRefresh(response.data.createBuildingInspection.id)\n this._close()\n } else {\n notify({ message: response.errors?.[0]?.message || '검측 요청서 등록에 실패하였습니다.', level: 'error' })\n }\n }\n\n // Input 요소의 값이 변경될 때 호출되는 콜백 함수\n private _onInputChange(event: InputEvent) {\n const target = event.target as HTMLInputElement\n this[target.name] = target.value\n this.checklist = { ...this.checklist, name: target.value }\n }\n\n // 체크리스트 아이템 데이터 갱신\n private onChangeGird() {\n const checklistDetailTypes = Object.fromEntries(this.checklistDetailTypes.map(item => [item.value, item.display]))\n const grist = this.grist\n\n // grist field-change가 오는 시점이 데이터 변경 전이라 setTimeout으로 변경\n setTimeout(() => {\n this.checklist.checklistItems = grist.dirtyData.records.map((row, idx) => {\n return {\n ...row,\n detailType: checklistDetailTypes[row.detailType],\n sequence: idx\n }\n })\n this.checklist = { ...this.checklist }\n }, 100)\n }\n\n private async _onSelectConstructionType(e) {\n const constructionTypeId = e.target.value\n this.selectedConstructionType = await this._getConstructionType(constructionTypeId)\n this.selectedConstructionDetailType = await { ...this.selectedConstructionType?.constructionDetailTypes?.[0] }\n this.checklist = {\n ...this.checklist,\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name\n }\n\n await this.htmlSelectConstructionDetailType.selectIndex(0)\n }\n\n private _onSelectConstructionDetailType(e) {\n const constructionDetailTypeId = e.target.value\n this.selectedConstructionDetailType = {\n ...(this.selectedConstructionType?.constructionDetailTypes?.find(v => v.id == constructionDetailTypeId) || {})\n }\n this.checklist = {\n ...this.checklist,\n constructionType: this.selectedConstructionType?.name,\n constructionDetailType: this.selectedConstructionDetailType?.name\n }\n }\n\n async _getConstructionType(id: string = '') {\n const response = await client.query({\n query: gql`\n query ConstructionType($id: String!) {\n constructionType(id: $id) {\n id\n name\n description\n constructionDetailTypes {\n id\n name\n }\n }\n }\n `,\n variables: { id }\n })\n\n if (response.errors) return\n\n return response.data?.constructionType || {}\n }\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class PlanPreviewPopup extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult[];
|
|
4
|
+
buildingLevelId: string;
|
|
5
|
+
private buildingLevel;
|
|
6
|
+
connectedCallback(): Promise<void>;
|
|
7
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
8
|
+
private _loadBuildingLevel;
|
|
9
|
+
private _openPreview;
|
|
10
|
+
private _openImagePreview;
|
|
11
|
+
private _openPdfPreview;
|
|
12
|
+
private _openGenericPreview;
|
|
13
|
+
private _close;
|
|
14
|
+
private _initImageZoom;
|
|
15
|
+
}
|