@operato/dataset 1.0.0-beta.9 → 1.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/CHANGELOG.md +403 -0
- package/dist/src/grist-editor/ox-grist-editor-data-item-spec.js +1 -1
- package/dist/src/grist-editor/ox-grist-editor-data-item-spec.js.map +1 -1
- package/dist/src/grist-editor/ox-popup-data-item-spec.js +3 -2
- package/dist/src/grist-editor/ox-popup-data-item-spec.js.map +1 -1
- package/dist/src/index.d.ts +1 -5
- package/dist/src/index.js +1 -5
- package/dist/src/index.js.map +1 -1
- package/dist/src/ox-data-entry-form.js +24 -4
- package/dist/src/ox-data-entry-form.js.map +1 -1
- package/dist/src/ox-data-item-spec.d.ts +2 -2
- package/dist/src/ox-data-item-spec.js +71 -14
- package/dist/src/ox-data-item-spec.js.map +1 -1
- package/dist/src/ox-data-ooc-view.js +73 -14
- package/dist/src/ox-data-ooc-view.js.map +1 -1
- package/dist/src/ox-data-sample-view.d.ts +1 -3
- package/dist/src/ox-data-sample-view.js +40 -38
- package/dist/src/ox-data-sample-view.js.map +1 -1
- package/dist/src/types.d.ts +25 -6
- package/dist/src/types.js.map +1 -1
- package/dist/src/usecase/ccp/index.d.ts +1 -0
- package/dist/src/usecase/ccp/index.js +8 -0
- package/dist/src/usecase/ccp/index.js.map +1 -0
- package/dist/src/usecase/ccp/ox-data-use-case-ccp.d.ts +7 -0
- package/dist/src/usecase/ccp/ox-data-use-case-ccp.js +102 -0
- package/dist/src/usecase/ccp/ox-data-use-case-ccp.js.map +1 -0
- package/dist/src/usecase/ccp/ox-input-ccp-limits.d.ts +44 -0
- package/dist/src/usecase/ccp/ox-input-ccp-limits.js +171 -0
- package/dist/src/usecase/ccp/ox-input-ccp-limits.js.map +1 -0
- package/dist/src/usecase/ccp/ox-property-editor-ccp-limits.d.ts +5 -0
- package/dist/src/usecase/ccp/ox-property-editor-ccp-limits.js +24 -0
- package/dist/src/usecase/ccp/ox-property-editor-ccp-limits.js.map +1 -0
- package/dist/src/{ox-data-use-case.d.ts → usecase/ox-data-use-case.d.ts} +5 -5
- package/dist/src/{ox-data-use-case.js → usecase/ox-data-use-case.js} +22 -34
- package/dist/src/usecase/ox-data-use-case.js.map +1 -0
- package/dist/src/usecase/qc/index.d.ts +1 -0
- package/dist/src/usecase/qc/index.js +8 -0
- package/dist/src/usecase/qc/index.js.map +1 -0
- package/dist/src/usecase/qc/ox-data-use-case-qc.d.ts +7 -0
- package/dist/src/usecase/qc/ox-data-use-case-qc.js +55 -0
- package/dist/src/usecase/qc/ox-data-use-case-qc.js.map +1 -0
- package/dist/src/usecase/qc/ox-input-qc-limits.d.ts +44 -0
- package/dist/src/usecase/qc/ox-input-qc-limits.js +171 -0
- package/dist/src/usecase/qc/ox-input-qc-limits.js.map +1 -0
- package/dist/src/usecase/qc/ox-property-editor-qc-limits.d.ts +5 -0
- package/dist/src/usecase/qc/ox-property-editor-qc-limits.js +24 -0
- package/dist/src/usecase/qc/ox-property-editor-qc-limits.js.map +1 -0
- package/dist/stories/ox-data-entry-form.stories.d.ts +19 -0
- package/dist/stories/ox-data-entry-form.stories.js +152 -0
- package/dist/stories/ox-data-entry-form.stories.js.map +1 -0
- package/dist/stories/ox-data-item-spec.stories.d.ts +26 -0
- package/dist/stories/ox-data-item-spec.stories.js +102 -0
- package/dist/stories/ox-data-item-spec.stories.js.map +1 -0
- package/dist/stories/ox-data-ooc-view.stories.d.ts +19 -0
- package/dist/stories/ox-data-ooc-view.stories.js +242 -0
- package/dist/stories/ox-data-ooc-view.stories.js.map +1 -0
- package/dist/stories/ox-data-sample-view.stories.d.ts +19 -0
- package/dist/stories/ox-data-sample-view.stories.js +213 -0
- package/dist/stories/ox-data-sample-view.stories.js.map +1 -0
- package/dist/stories/ox-grist-editor-data-item-spec.stories.d.ts +27 -0
- package/dist/stories/ox-grist-editor-data-item-spec.stories.js +389 -0
- package/dist/stories/ox-grist-editor-data-item-spec.stories.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +67 -18
- package/src/grist-editor/ox-grist-editor-data-item-spec.ts +1 -1
- package/src/grist-editor/ox-popup-data-item-spec.ts +3 -2
- package/src/index.ts +1 -5
- package/src/ox-data-entry-form.ts +24 -4
- package/src/ox-data-item-spec.ts +73 -16
- package/src/ox-data-ooc-view.ts +73 -14
- package/src/ox-data-sample-view.ts +43 -39
- package/src/types.ts +31 -6
- package/src/usecase/ccp/index.ts +10 -0
- package/src/usecase/ccp/ox-data-use-case-ccp.ts +147 -0
- package/src/usecase/ccp/ox-input-ccp-limits.ts +161 -0
- package/src/usecase/ccp/ox-property-editor-ccp-limits.ts +23 -0
- package/src/{ox-data-use-case.ts → usecase/ox-data-use-case.ts} +27 -41
- package/src/usecase/qc/index.ts +10 -0
- package/src/usecase/qc/ox-data-use-case-qc.ts +72 -0
- package/src/usecase/qc/ox-input-qc-limits.ts +161 -0
- package/src/usecase/qc/ox-property-editor-qc-limits.ts +23 -0
- package/stories/ox-data-entry-form.stories.ts +165 -0
- package/stories/ox-data-item-spec.stories.ts +121 -0
- package/stories/ox-data-ooc-view.stories.ts +256 -0
- package/stories/ox-data-sample-view.stories.ts +227 -0
- package/stories/ox-grist-editor-data-item-spec.stories.ts +409 -0
- package/translations/en.json +26 -8
- package/translations/ko.json +25 -7
- package/translations/ms.json +26 -8
- package/translations/zh.json +25 -7
- package/demo/index.html +0 -28
- package/demo/ox-data-entry-form.html +0 -118
- package/demo/ox-data-item-spec.html +0 -152
- package/demo/ox-data-ooc-view.html +0 -185
- package/demo/ox-data-sample-view.html +0 -150
- package/demo/ox-grist-editor-data-item-spec.html +0 -476
- package/dist/src/ox-data-use-case.js.map +0 -1
package/translations/zh.json
CHANGED
|
@@ -3,24 +3,28 @@
|
|
|
3
3
|
"button.reviewed": "reviewed",
|
|
4
4
|
"field.appliance": "appliance",
|
|
5
5
|
"field.collected_at": "collected at",
|
|
6
|
+
"field.collected-at": "collected at",
|
|
7
|
+
"field.corrected-at": "corrected at",
|
|
8
|
+
"field.corrective action": "corrective action",
|
|
6
9
|
"field.corrective-action": "corrective action",
|
|
7
10
|
"field.corrector": "corrector",
|
|
8
|
-
"field.
|
|
9
|
-
"field.data": "data",
|
|
11
|
+
"field.critical control point": "critical control point",
|
|
10
12
|
"field.data-sample": "data sample",
|
|
11
13
|
"field.data-set": "data set",
|
|
14
|
+
"field.data": "data",
|
|
12
15
|
"field.device-id": "device id",
|
|
13
16
|
"field.entry-role": "entry role",
|
|
14
17
|
"field.entry-type": "entry type",
|
|
15
18
|
"field.entry-view": "entry view",
|
|
16
19
|
"field.hidden": "hidden",
|
|
20
|
+
"field.item": "item",
|
|
17
21
|
"field.latest-collected-at": "latest collected at",
|
|
18
22
|
"field.monitor-type": "monitor type",
|
|
19
23
|
"field.monitor-view": "monitor view",
|
|
20
24
|
"field.netmask": "network mask",
|
|
21
25
|
"field.next-schedule": "next schedule",
|
|
22
|
-
"field.oos": "out of critical limit",
|
|
23
26
|
"field.ooc": "out of control limit",
|
|
27
|
+
"field.oos": "out of critical limit",
|
|
24
28
|
"field.options": "options",
|
|
25
29
|
"field.partition-keys": "partition keys",
|
|
26
30
|
"field.prev-schedule": "previous schedule",
|
|
@@ -38,19 +42,33 @@
|
|
|
38
42
|
"field.use-case": "use case",
|
|
39
43
|
"field.work-date": "work date",
|
|
40
44
|
"field.work-shift": "work shift",
|
|
45
|
+
"label.acceptables": "acceptables",
|
|
46
|
+
"label.critical-limits": "critical limits",
|
|
47
|
+
"label.maximum value": "maximum value",
|
|
48
|
+
"label.minimum value": "minimum value",
|
|
49
|
+
"label.pass-limits": "pass limits",
|
|
50
|
+
"label.target-limits": "target limits",
|
|
41
51
|
"text.automatically collected": "automatically collected",
|
|
42
|
-
"text.
|
|
52
|
+
"text.control limit": "control limit",
|
|
43
53
|
"text.data ooc updated successfully": "a data ooc updated successfully",
|
|
54
|
+
"text.data sample created successfully": "a data sample created successfully",
|
|
44
55
|
"text.manually collected": "manually collected",
|
|
56
|
+
"text.maximum value": "maximum value",
|
|
57
|
+
"text.measurement": "measurement",
|
|
58
|
+
"text.minimum value": "minimum value",
|
|
59
|
+
"text.observation": "observation",
|
|
60
|
+
"text.operating limit": "operating limit",
|
|
61
|
+
"text.target limit": "target limit",
|
|
45
62
|
"title.data-entry-form": "data entry form",
|
|
46
63
|
"title.data-item list": "data item list",
|
|
47
64
|
"title.data-monitor-view": "data monitor view",
|
|
48
|
-
"title.data-report-view": "data report view",
|
|
49
65
|
"title.data-ooc list": "data OOC list",
|
|
50
66
|
"title.data-ooc view": "data OOC view",
|
|
67
|
+
"title.data-report-view": "data report view",
|
|
51
68
|
"title.data-sample list": "data sample list",
|
|
52
69
|
"title.data-sample view": "data sample view",
|
|
53
70
|
"title.data-sensor list": "data sensor list",
|
|
54
71
|
"title.data-set list": "data set list",
|
|
55
|
-
"title.edit code": "edit code"
|
|
56
|
-
|
|
72
|
+
"title.edit code": "edit code",
|
|
73
|
+
"title.history": "history"
|
|
74
|
+
}
|
package/demo/index.html
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en-GB">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1" />
|
|
6
|
-
<style>
|
|
7
|
-
body {
|
|
8
|
-
--ox-checkbox-size: 12px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
a {
|
|
12
|
-
display: block;
|
|
13
|
-
}
|
|
14
|
-
</style>
|
|
15
|
-
|
|
16
|
-
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet" />
|
|
17
|
-
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
|
18
|
-
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
19
|
-
<link href="/themes/form-theme.css" rel="stylesheet" />
|
|
20
|
-
</head>
|
|
21
|
-
<body>
|
|
22
|
-
<a href="./ox-data-entry-form.html">ox-data-entry-form</a>
|
|
23
|
-
<a href="./ox-data-sample-view.html">ox-data-sample-view</a>
|
|
24
|
-
<a href="./ox-data-ooc-view.html">ox-data-ooc-view</a>
|
|
25
|
-
<a href="./ox-data-item-spec.html">ox-data-item-spec</a>
|
|
26
|
-
<a href="./ox-grist-editor-data-item-spec.html">ox-grist-editor-data-item-spec</a>
|
|
27
|
-
</body>
|
|
28
|
-
</html>
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en-GB">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1" />
|
|
6
|
-
<style>
|
|
7
|
-
body {
|
|
8
|
-
--ox-checkbox-size: 12px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
#demo {
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet" />
|
|
15
|
-
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
|
16
|
-
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
17
|
-
<link href="/themes/form-theme.css" rel="stylesheet" />
|
|
18
|
-
</head>
|
|
19
|
-
<body>
|
|
20
|
-
<div id="demo"></div>
|
|
21
|
-
|
|
22
|
-
<script type="module">
|
|
23
|
-
import { html, render } from 'lit'
|
|
24
|
-
import '../dist/src/ox-data-entry-form.js'
|
|
25
|
-
|
|
26
|
-
const parent = document.querySelector('#demo')
|
|
27
|
-
const dataSet = {
|
|
28
|
-
name: 'sample',
|
|
29
|
-
description: 'sample description',
|
|
30
|
-
dataItems: [
|
|
31
|
-
{
|
|
32
|
-
name: '창고 온도',
|
|
33
|
-
description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
|
|
34
|
-
sequence: 1,
|
|
35
|
-
tag: 'temp',
|
|
36
|
-
type: 'number',
|
|
37
|
-
quota: 1,
|
|
38
|
-
active: true,
|
|
39
|
-
unit: '℃'
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: '창고 습도',
|
|
43
|
-
description: '창고 습도는 30% 이하로 유지되어야 합니다.',
|
|
44
|
-
sequence: 2,
|
|
45
|
-
tag: 'humid',
|
|
46
|
-
type: 'number',
|
|
47
|
-
quota: 5,
|
|
48
|
-
active: true,
|
|
49
|
-
unit: '%'
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
name: '육안 검사',
|
|
53
|
-
description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.',
|
|
54
|
-
sequence: 3,
|
|
55
|
-
tag: 'inspection',
|
|
56
|
-
type: 'boolean',
|
|
57
|
-
quota: 3,
|
|
58
|
-
active: true
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
name: '품평',
|
|
62
|
-
description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
|
|
63
|
-
sequence: 4,
|
|
64
|
-
tag: 'evaluation',
|
|
65
|
-
type: 'select',
|
|
66
|
-
options: {
|
|
67
|
-
options: [
|
|
68
|
-
{ text: '최우수', value: '최우수' },
|
|
69
|
-
{ text: '우수', value: '우수' },
|
|
70
|
-
{ text: '보통', value: '보통' },
|
|
71
|
-
{ text: '미달', value: '미달' }
|
|
72
|
-
]
|
|
73
|
-
},
|
|
74
|
-
quota: 3,
|
|
75
|
-
active: true
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
name: '코멘트',
|
|
79
|
-
description: '특이사항을 기록함.',
|
|
80
|
-
sequence: 4,
|
|
81
|
-
tag: 'comment',
|
|
82
|
-
type: 'string',
|
|
83
|
-
quota: 1,
|
|
84
|
-
active: true
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
name: '첨부파일',
|
|
88
|
-
description: '참조 첨부 파일.',
|
|
89
|
-
sequence: 4,
|
|
90
|
-
tag: 'attachment',
|
|
91
|
-
type: 'file',
|
|
92
|
-
quota: 1,
|
|
93
|
-
active: true
|
|
94
|
-
}
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
var value = {
|
|
99
|
-
temp: 1000,
|
|
100
|
-
humid: [20, 23, 21, 26, 27],
|
|
101
|
-
inspection: [true, false, true],
|
|
102
|
-
evaluation: ['최우수', '보통', '우수']
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
render(
|
|
106
|
-
html`<ox-data-entry-form
|
|
107
|
-
.dataSet=${dataSet}
|
|
108
|
-
.value=${value}
|
|
109
|
-
@change=${e => {
|
|
110
|
-
value = e.detail
|
|
111
|
-
console.log('change', value)
|
|
112
|
-
}}
|
|
113
|
-
></ox-data-entry-form>`,
|
|
114
|
-
parent
|
|
115
|
-
)
|
|
116
|
-
</script>
|
|
117
|
-
</body>
|
|
118
|
-
</html>
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en-GB">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1" />
|
|
6
|
-
<style>
|
|
7
|
-
body {
|
|
8
|
-
--ox-checkbox-size: 12px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
#demo {
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet" />
|
|
15
|
-
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
|
16
|
-
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
17
|
-
<link href="/themes/form-theme.css" rel="stylesheet" />
|
|
18
|
-
</head>
|
|
19
|
-
<body>
|
|
20
|
-
<div id="demo"></div>
|
|
21
|
-
|
|
22
|
-
<script type="module">
|
|
23
|
-
import { html, render } from 'lit'
|
|
24
|
-
|
|
25
|
-
import '@operato/property-editor/ox-property-editor-checkbox.js'
|
|
26
|
-
import '@operato/property-editor/ox-property-editor-number.js'
|
|
27
|
-
import '@operato/property-editor/ox-property-editor-string.js'
|
|
28
|
-
|
|
29
|
-
import '@operato/property-editor/ox-properties-dynamic-view.js'
|
|
30
|
-
|
|
31
|
-
import { OxPropertyEditor } from '@operato/property-editor'
|
|
32
|
-
|
|
33
|
-
OxPropertyEditor.register({
|
|
34
|
-
number: 'ox-property-editor-number',
|
|
35
|
-
string: 'ox-property-editor-string',
|
|
36
|
-
boolean: 'ox-property-editor-checkbox'
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
import { OxDataUseCase } from '../dist/src/ox-data-use-case.js'
|
|
40
|
-
import '../dist/src/ox-data-item-spec.js'
|
|
41
|
-
|
|
42
|
-
const parent = document.querySelector('#demo')
|
|
43
|
-
|
|
44
|
-
const ccpUseCase = {
|
|
45
|
-
getSpecification: dataItem => {
|
|
46
|
-
return {
|
|
47
|
-
name: 'ccp',
|
|
48
|
-
description: 'ccp specs',
|
|
49
|
-
specs: [
|
|
50
|
-
{
|
|
51
|
-
type: 'number',
|
|
52
|
-
label: 'critical limits',
|
|
53
|
-
name: 'criticalLimits',
|
|
54
|
-
property: dataItem
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
type: 'string',
|
|
58
|
-
label: 'target limits',
|
|
59
|
-
name: 'targetLimits',
|
|
60
|
-
property: dataItem
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const qcUseCase = {
|
|
68
|
-
getSpecification: dataItem => {
|
|
69
|
-
return {
|
|
70
|
-
name: 'qc',
|
|
71
|
-
description: 'qc specs',
|
|
72
|
-
specs: [
|
|
73
|
-
{
|
|
74
|
-
type: 'number',
|
|
75
|
-
label: 'critical limits',
|
|
76
|
-
name: 'criticalLimits',
|
|
77
|
-
property: dataItem
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
type: 'boolean',
|
|
81
|
-
label: 'target limits',
|
|
82
|
-
name: 'targetLimits',
|
|
83
|
-
property: dataItem
|
|
84
|
-
}
|
|
85
|
-
]
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
OxDataUseCase.registerUseCase('ccp', ccpUseCase)
|
|
91
|
-
OxDataUseCase.registerUseCase('qc', qcUseCase)
|
|
92
|
-
|
|
93
|
-
const dataItemA = {
|
|
94
|
-
name: '창고 온도',
|
|
95
|
-
description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
|
|
96
|
-
sequence: 1,
|
|
97
|
-
tag: 'temp',
|
|
98
|
-
unit: '℃',
|
|
99
|
-
type: 'number',
|
|
100
|
-
quota: 1
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
const dataItemB = {
|
|
104
|
-
name: '품평',
|
|
105
|
-
description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
|
|
106
|
-
sequence: 4,
|
|
107
|
-
tag: 'evaluation',
|
|
108
|
-
type: 'select',
|
|
109
|
-
options: {
|
|
110
|
-
options: [
|
|
111
|
-
{ text: '최우수', value: '최우수' },
|
|
112
|
-
{ text: '우수', value: '우수' },
|
|
113
|
-
{ text: '보통', value: '보통' },
|
|
114
|
-
{ text: '미달', value: '미달' }
|
|
115
|
-
]
|
|
116
|
-
},
|
|
117
|
-
quota: 3
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
const dataItemC = {
|
|
121
|
-
name: '코멘트',
|
|
122
|
-
description: '특이사항을 기록함.',
|
|
123
|
-
sequence: 4,
|
|
124
|
-
tag: 'comment',
|
|
125
|
-
type: 'string',
|
|
126
|
-
quota: 1
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
var specA = {
|
|
130
|
-
ccp: { criticalLimits: 1000, targetLimits: true },
|
|
131
|
-
qc: { criticalLimits: 400, targetLimits: false }
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
var specB = {
|
|
135
|
-
ccp: { accpetables: ['최우수', '우수'] },
|
|
136
|
-
qc: { accpetables: ['최우수', '우수'] }
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
render(
|
|
140
|
-
html`<ox-data-item-spec
|
|
141
|
-
.dataItem=${dataItemA}
|
|
142
|
-
.value=${specA}
|
|
143
|
-
@change=${e => {
|
|
144
|
-
specA = e.detail
|
|
145
|
-
console.log('change', specA)
|
|
146
|
-
}}
|
|
147
|
-
></ox-data-item-spec>`,
|
|
148
|
-
parent
|
|
149
|
-
)
|
|
150
|
-
</script>
|
|
151
|
-
</body>
|
|
152
|
-
</html>
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en-GB">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1" />
|
|
6
|
-
<style>
|
|
7
|
-
body {
|
|
8
|
-
--ox-checkbox-size: 12px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
#demo {
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet" />
|
|
15
|
-
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet" />
|
|
16
|
-
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
17
|
-
<link href="/themes/form-theme.css" rel="stylesheet" />
|
|
18
|
-
</head>
|
|
19
|
-
<body>
|
|
20
|
-
<div id="demo"></div>
|
|
21
|
-
|
|
22
|
-
<script type="module">
|
|
23
|
-
import { html, render } from 'lit'
|
|
24
|
-
import '@operato/ccp'
|
|
25
|
-
import '@operato/qc'
|
|
26
|
-
|
|
27
|
-
const parent = document.querySelector('#demo')
|
|
28
|
-
const dataSet = {
|
|
29
|
-
name: 'sample',
|
|
30
|
-
description: 'sample description',
|
|
31
|
-
useCase: 'CCP',
|
|
32
|
-
dataItems: [
|
|
33
|
-
{
|
|
34
|
-
name: '창고 온도',
|
|
35
|
-
description: '창고 온도는 섭씨 0도 이하로 유지되어야 합니다.',
|
|
36
|
-
sequence: 1,
|
|
37
|
-
tag: 'temp',
|
|
38
|
-
type: 'number',
|
|
39
|
-
quota: 1,
|
|
40
|
-
active: true,
|
|
41
|
-
unit: '℃',
|
|
42
|
-
spec: {
|
|
43
|
-
CCP: {
|
|
44
|
-
criticalLimits: {
|
|
45
|
-
minimum: 100,
|
|
46
|
-
maximum: 200
|
|
47
|
-
},
|
|
48
|
-
targetLimits: {
|
|
49
|
-
minimum: 120,
|
|
50
|
-
maximum: 180
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
name: '창고 습도',
|
|
57
|
-
description: '창고 습도는 30% 이하로 유지되어야 합니다.',
|
|
58
|
-
sequence: 2,
|
|
59
|
-
tag: 'humid',
|
|
60
|
-
type: 'number',
|
|
61
|
-
quota: 5,
|
|
62
|
-
active: true,
|
|
63
|
-
unit: '%',
|
|
64
|
-
spec: {
|
|
65
|
-
CCP: {
|
|
66
|
-
criticalLimits: {
|
|
67
|
-
minimum: 10,
|
|
68
|
-
maximum: 50
|
|
69
|
-
},
|
|
70
|
-
targetLimits: {
|
|
71
|
-
minimum: 20,
|
|
72
|
-
maximum: 40
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
name: '육안 검사',
|
|
79
|
-
description: '육안 검사는 포장전 30분 내로 실행되어야 합니다.',
|
|
80
|
-
sequence: 3,
|
|
81
|
-
tag: 'inspection',
|
|
82
|
-
type: 'boolean',
|
|
83
|
-
quota: 3,
|
|
84
|
-
active: true
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
name: '품평',
|
|
88
|
-
description: '품평은 최우수/우수/보통/미달을 포함하여 간단히 평가.',
|
|
89
|
-
sequence: 4,
|
|
90
|
-
tag: 'evaluation',
|
|
91
|
-
type: 'select',
|
|
92
|
-
options: {
|
|
93
|
-
options: [
|
|
94
|
-
{ text: '최우수', value: '최우수' },
|
|
95
|
-
{ text: '우수', value: '우수' },
|
|
96
|
-
{ text: '보통', value: '보통' },
|
|
97
|
-
{ text: '미달', value: '미달' }
|
|
98
|
-
]
|
|
99
|
-
},
|
|
100
|
-
quota: 3,
|
|
101
|
-
active: true,
|
|
102
|
-
spec: {
|
|
103
|
-
CCP: {
|
|
104
|
-
criticalLimits: {
|
|
105
|
-
acceptables: ['최우수', '우수', '보통']
|
|
106
|
-
},
|
|
107
|
-
targetLimits: {
|
|
108
|
-
acceptables: ['최우수', '우수']
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
name: '코멘트',
|
|
115
|
-
description: '특이사항을 기록함.',
|
|
116
|
-
sequence: 4,
|
|
117
|
-
tag: 'comment',
|
|
118
|
-
type: 'string',
|
|
119
|
-
quota: 1,
|
|
120
|
-
active: true
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
name: '첨부파일',
|
|
124
|
-
description: '참조 첨부 파일.',
|
|
125
|
-
sequence: 4,
|
|
126
|
-
tag: 'attachment',
|
|
127
|
-
type: 'file',
|
|
128
|
-
quota: 1,
|
|
129
|
-
active: true
|
|
130
|
-
}
|
|
131
|
-
]
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
var dataOoc = {
|
|
135
|
-
name: 'Data Sample Name',
|
|
136
|
-
description: 'Data Sample이 어쩌구 저쩌구 그래서 중요합니다. 당연히 그래야죠.',
|
|
137
|
-
useCase: 'CCP',
|
|
138
|
-
state: 'CORRECTED',
|
|
139
|
-
data: {
|
|
140
|
-
temp: [1000],
|
|
141
|
-
humid: [20, 23, 21, 26, 27],
|
|
142
|
-
inspection: [true, false, true],
|
|
143
|
-
evaluation: ['최우수', '보통', '우수']
|
|
144
|
-
},
|
|
145
|
-
collectedAt: Date.now(),
|
|
146
|
-
history: [
|
|
147
|
-
{
|
|
148
|
-
user: {
|
|
149
|
-
id: 0,
|
|
150
|
-
name: 'shnam'
|
|
151
|
-
},
|
|
152
|
-
state: 'CREATED',
|
|
153
|
-
timestamp: Date.now()
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
user: {
|
|
157
|
-
id: 0,
|
|
158
|
-
name: 'shnam'
|
|
159
|
-
},
|
|
160
|
-
state: 'REVIEWED',
|
|
161
|
-
comment: '금일 생산한 제품은 전량 폐기합니다',
|
|
162
|
-
timestamp: Date.now()
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
user: {
|
|
166
|
-
id: 0,
|
|
167
|
-
name: 'shnam'
|
|
168
|
-
},
|
|
169
|
-
state: 'CORRECTED',
|
|
170
|
-
timestamp: Date.now()
|
|
171
|
-
}
|
|
172
|
-
]
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
render(
|
|
176
|
-
html`<ox-data-ooc-view
|
|
177
|
-
.dataSet=${dataSet}
|
|
178
|
-
.dataOoc=${dataOoc}
|
|
179
|
-
@change=${e => console.log(e.detail)}
|
|
180
|
-
></ox-data-ooc-view>`,
|
|
181
|
-
parent
|
|
182
|
-
)
|
|
183
|
-
</script>
|
|
184
|
-
</body>
|
|
185
|
-
</html>
|