jobdone-shared-files 0.0.1-beta.6 → 0.0.1-beta.60
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/ProjectManagement/projectNavbar.vue +144 -70
- package/README.md +77 -6
- package/common/directives/popovers.js +11 -0
- package/common/directives/tooltip.js +11 -0
- package/common/format.js +16 -2
- package/lightboxWithOverview.vue +132 -0
- package/package.json +4 -3
- package/style/scss/Common/Animation.scss +6 -0
- package/style/scss/Common/SelectableTable.scss +31 -0
- package/style/scss/Common/filepond.scss +28 -0
- package/style/scss/Common/thumbnail-group.scss +14 -0
- package/style/scss/Layout/LayoutBase.scss +25 -10
- package/style/scss/Layout/LayoutMobile.scss +203 -0
- package/style/scss/Layout/LayoutProject.scss +3 -5
- package/style/scss/Layout/LayoutTwoColumn.scss +3 -3
- package/style/scss/Settings/_Mixins.scss +1 -0
- package/style/scss/Settings/_MobileVariables.scss +12 -0
- package/style/scss/Settings/_basic-import.scss +3 -2
- package/style/scss/Settings/_bs-variables.scss +114 -74
- package/style/scss/Settings/_custom-variables.scss +4 -1
- package/tree.vue +17 -10
- package/treeItem.vue +1 -1
- package/vueLoadingOverlay.vue +10 -19
- package/style/scss/Bootstrap/_accordion.scss +0 -158
- package/style/scss/Bootstrap/_alert.scss +0 -68
- package/style/scss/Bootstrap/_badge.scss +0 -38
- package/style/scss/Bootstrap/_breadcrumb.scss +0 -40
- package/style/scss/Bootstrap/_button-group.scss +0 -142
- package/style/scss/Bootstrap/_buttons.scss +0 -207
- package/style/scss/Bootstrap/_card.scss +0 -238
- package/style/scss/Bootstrap/_carousel.scss +0 -238
- package/style/scss/Bootstrap/_close.scss +0 -61
- package/style/scss/Bootstrap/_containers.scss +0 -41
- package/style/scss/Bootstrap/_dropdown.scss +0 -250
- package/style/scss/Bootstrap/_forms.scss +0 -9
- package/style/scss/Bootstrap/_functions.scss +0 -302
- package/style/scss/Bootstrap/_grid.scss +0 -33
- package/style/scss/Bootstrap/_helpers.scss +0 -10
- package/style/scss/Bootstrap/_images.scss +0 -42
- package/style/scss/Bootstrap/_list-group.scss +0 -204
- package/style/scss/Bootstrap/_maps.scss +0 -121
- package/style/scss/Bootstrap/_mixins.scss +0 -42
- package/style/scss/Bootstrap/_modal.scss +0 -237
- package/style/scss/Bootstrap/_nav.scss +0 -172
- package/style/scss/Bootstrap/_navbar.scss +0 -286
- package/style/scss/Bootstrap/_offcanvas.scss +0 -146
- package/style/scss/Bootstrap/_pagination.scss +0 -109
- package/style/scss/Bootstrap/_placeholders.scss +0 -51
- package/style/scss/Bootstrap/_popover.scss +0 -196
- package/style/scss/Bootstrap/_progress.scss +0 -68
- package/style/scss/Bootstrap/_reboot.scss +0 -610
- package/style/scss/Bootstrap/_root.scss +0 -195
- package/style/scss/Bootstrap/_spinners.scss +0 -85
- package/style/scss/Bootstrap/_tables.scss +0 -164
- package/style/scss/Bootstrap/_toasts.scss +0 -73
- package/style/scss/Bootstrap/_tooltip.scss +0 -120
- package/style/scss/Bootstrap/_transitions.scss +0 -27
- package/style/scss/Bootstrap/_type.scss +0 -106
- package/style/scss/Bootstrap/_utilities.scss +0 -748
- package/style/scss/Bootstrap/_variables-dark.scss +0 -70
- package/style/scss/Bootstrap/_variables.scss +0 -1703
- package/style/scss/Bootstrap/bootstrap-grid.scss +0 -66
- package/style/scss/Bootstrap/bootstrap-reboot.scss +0 -10
- package/style/scss/Bootstrap/bootstrap-utilities.scss +0 -19
- package/style/scss/Bootstrap/bootstrap.scss +0 -52
- package/style/scss/Bootstrap/forms/_floating-labels.scss +0 -90
- package/style/scss/Bootstrap/forms/_form-check.scss +0 -188
- package/style/scss/Bootstrap/forms/_form-control.scss +0 -201
- package/style/scss/Bootstrap/forms/_form-range.scss +0 -91
- package/style/scss/Bootstrap/forms/_form-select.scss +0 -81
- package/style/scss/Bootstrap/forms/_form-text.scss +0 -11
- package/style/scss/Bootstrap/forms/_input-group.scss +0 -132
- package/style/scss/Bootstrap/forms/_labels.scss +0 -36
- package/style/scss/Bootstrap/forms/_validation.scss +0 -12
- package/style/scss/Bootstrap/helpers/_clearfix.scss +0 -3
- package/style/scss/Bootstrap/helpers/_color-bg.scss +0 -10
- package/style/scss/Bootstrap/helpers/_colored-links.scss +0 -12
- package/style/scss/Bootstrap/helpers/_position.scss +0 -36
- package/style/scss/Bootstrap/helpers/_ratio.scss +0 -26
- package/style/scss/Bootstrap/helpers/_stacks.scss +0 -15
- package/style/scss/Bootstrap/helpers/_stretched-link.scss +0 -15
- package/style/scss/Bootstrap/helpers/_text-truncation.scss +0 -7
- package/style/scss/Bootstrap/helpers/_visually-hidden.scss +0 -8
- package/style/scss/Bootstrap/helpers/_vr.scss +0 -8
- package/style/scss/Bootstrap/mixins/_alert.scss +0 -18
- package/style/scss/Bootstrap/mixins/_backdrop.scss +0 -14
- package/style/scss/Bootstrap/mixins/_banner.scss +0 -7
- package/style/scss/Bootstrap/mixins/_border-radius.scss +0 -78
- package/style/scss/Bootstrap/mixins/_box-shadow.scss +0 -18
- package/style/scss/Bootstrap/mixins/_breakpoints.scss +0 -127
- package/style/scss/Bootstrap/mixins/_buttons.scss +0 -70
- package/style/scss/Bootstrap/mixins/_caret.scss +0 -69
- package/style/scss/Bootstrap/mixins/_clearfix.scss +0 -9
- package/style/scss/Bootstrap/mixins/_color-mode.scss +0 -21
- package/style/scss/Bootstrap/mixins/_color-scheme.scss +0 -7
- package/style/scss/Bootstrap/mixins/_container.scss +0 -11
- package/style/scss/Bootstrap/mixins/_deprecate.scss +0 -10
- package/style/scss/Bootstrap/mixins/_forms.scss +0 -153
- package/style/scss/Bootstrap/mixins/_gradients.scss +0 -47
- package/style/scss/Bootstrap/mixins/_grid.scss +0 -151
- package/style/scss/Bootstrap/mixins/_image.scss +0 -16
- package/style/scss/Bootstrap/mixins/_list-group.scss +0 -27
- package/style/scss/Bootstrap/mixins/_lists.scss +0 -7
- package/style/scss/Bootstrap/mixins/_pagination.scss +0 -10
- package/style/scss/Bootstrap/mixins/_reset-text.scss +0 -17
- package/style/scss/Bootstrap/mixins/_resize.scss +0 -6
- package/style/scss/Bootstrap/mixins/_table-variants.scss +0 -24
- package/style/scss/Bootstrap/mixins/_text-truncate.scss +0 -8
- package/style/scss/Bootstrap/mixins/_transition.scss +0 -26
- package/style/scss/Bootstrap/mixins/_utilities.scss +0 -97
- package/style/scss/Bootstrap/mixins/_visually-hidden.scss +0 -29
- package/style/scss/Bootstrap/utilities/_api.scss +0 -47
- package/style/scss/Bootstrap/vendor/_rfs.scss +0 -354
|
@@ -1,53 +1,56 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="bg-gray-000 sticky-top">
|
|
2
|
+
<div class="bg-gray-000 sticky-top d-print-none">
|
|
3
3
|
<nav class="navbar navbar-main navbar-expand-lg border-bottoms py-0" data-bs-theme="dark">
|
|
4
|
-
<div class="
|
|
4
|
+
<div class="navbar-placeholder-content px-4 placeholder-glow">
|
|
5
|
+
<span class="placeholder w-1rem"></span>
|
|
6
|
+
<span class="placeholder w-20rem"></span>
|
|
7
|
+
<span class="placeholder w-5rem"></span>
|
|
8
|
+
<span class="placeholder w-5rem"></span>
|
|
9
|
+
<span class="placeholder w-5rem"></span>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="navbar-content opacity-0 d-flex align-items-center flex-fill w-100">
|
|
5
12
|
<div class="border-end">
|
|
6
|
-
<a :href="arrowBackLink" class="btn btn-normal btn-square"><span class="material-icons">arrow_back</span></a>
|
|
13
|
+
<a :href="arrowBackLink" class="btn btn-normal btn-square" title="離開專案"><span class="material-icons">arrow_back</span></a>
|
|
7
14
|
</div>
|
|
8
15
|
<span class="fs-6 mb-0 mx-4 text-nowrap text-project-title"><b>{{projectInfo.name}}</b></span>
|
|
9
16
|
<!--TODO: 解決 overflow scroll 與 dropdown 衝突-->
|
|
10
17
|
<div class="flex-grow-1 text-nowrap">
|
|
11
18
|
<div class="d-flex flex-grow-1 border-start">
|
|
12
19
|
<nav class="navbar-nav navbar-main navbar-line navbar-line-lg">
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
{{item.moduleName}}
|
|
17
|
-
</a>
|
|
18
|
-
<span class="dropdown-link dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" v-else>
|
|
19
|
-
<span class="material-icons icon-18 me-2" v-if="item.moduleIcon">{{item.moduleIcon}}</span>
|
|
20
|
-
{{item.moduleName}}
|
|
21
|
-
</span>
|
|
22
|
-
<ul class="dropdown-menu" v-if="item.moduleApps.length!==0">
|
|
23
|
-
<li><a class="dropdown-item" href="#" v-for="app in item.moduleApps">{{app.appName}}</a></li>
|
|
24
|
-
</ul>
|
|
25
|
-
</div> -->
|
|
26
|
-
<button type="button" class="nav-item navbar-line-item btn nav-link letter-spacing-1 border-0 active">
|
|
27
|
-
<a :href="'/ProjectManagement/ProjectInfo?id=' + projectInfo.id">
|
|
20
|
+
<div class="nav-item navbar-line-item btn nav-link border-0 dropdown"
|
|
21
|
+
:class="{'active':activeLinkType==0}">
|
|
22
|
+
<a class="dropdown-link" :href="finalRootDomain + '/ProjectManagement/ProjectInfo?id=' + projectId">
|
|
28
23
|
專案資訊
|
|
29
24
|
</a>
|
|
30
|
-
</
|
|
31
|
-
<div class="nav-item navbar-line-item btn nav-link border-0 dropdown"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
{{navLinkObj.
|
|
25
|
+
</div>
|
|
26
|
+
<div class="nav-item navbar-line-item btn nav-link border-0 dropdown"
|
|
27
|
+
:class="{'active':activeLinkType==1}">
|
|
28
|
+
<a :href="navLinkObj.url + projectId" class="dropdown-link" v-if="navLinkObj.selfIsApp">
|
|
29
|
+
<span class="material-icons icon-18 me-2">{{ navLinkObj.icon }}</span>
|
|
30
|
+
{{ navLinkObj.name }}
|
|
35
31
|
</a>
|
|
36
32
|
<span class="dropdown-link dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" v-else>
|
|
37
|
-
<span class="material-icons icon-18 me-2"
|
|
38
|
-
{{ navLinkObj.name}}
|
|
33
|
+
<span class="material-icons icon-18 me-2">{{ navLinkObj.icon }}</span>
|
|
34
|
+
{{ navLinkObj.name }}
|
|
39
35
|
</span>
|
|
40
36
|
<ul class="dropdown-menu" v-if="navLinkObj.apps.length > 0">
|
|
41
37
|
<li>
|
|
42
|
-
<a class="dropdown-item" :href="app.url + '?projectId=' +
|
|
38
|
+
<a class="dropdown-item" :href="app.url + '?projectId=' + projectId" v-for="(app, index) in navLinkObj.apps" :key="index">{{app.name}}</a>
|
|
43
39
|
</li>
|
|
44
40
|
</ul>
|
|
45
41
|
</div>
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
<div class="nav-item navbar-line-item btn nav-link border-0 dropdown"
|
|
43
|
+
:class="{'active':activeLinkType==2}">
|
|
44
|
+
<a href="#" class="dropdown-link">
|
|
45
|
+
<span class="material-icons icon-18 me-2">edit_document</span>
|
|
46
|
+
改善單
|
|
47
|
+
</a>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="nav-item navbar-line-item btn nav-link border-0 dropdown"
|
|
50
|
+
:class="{'active':activeLinkType==3}">
|
|
48
51
|
<a href="#" class="dropdown-link">
|
|
49
52
|
<span class="material-icons icon-18 me-2">rebase_edit</span>
|
|
50
|
-
|
|
53
|
+
派遣單
|
|
51
54
|
</a>
|
|
52
55
|
</div>
|
|
53
56
|
</nav>
|
|
@@ -55,59 +58,92 @@
|
|
|
55
58
|
</div>
|
|
56
59
|
</div>
|
|
57
60
|
</nav>
|
|
58
|
-
<div class="info-project
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
61
|
+
<div class="info-project bg-primary bg-opacity-25 border-top border-bottom border-primary border-opacity-25 py-2">
|
|
62
|
+
<div class="navbar-placeholder-content px-5 placeholder-glow">
|
|
63
|
+
<span class="placeholder placeholder-xs w-10rem ms-4"></span>
|
|
64
|
+
<span class="placeholder placeholder-xs w-12rem"></span>
|
|
65
|
+
<span class="placeholder placeholder-xs w-6rem"></span>
|
|
66
|
+
</div>
|
|
67
|
+
<div class="navbar-content opacity-0 d-flex align-items-center">
|
|
68
|
+
<small class="d-flex me-4" v-if="projectInfo.caseNo">
|
|
69
|
+
<b class="me-2">案號</b>
|
|
70
|
+
<span>{{projectInfo.caseNo}}</span>
|
|
71
|
+
</small>
|
|
72
|
+
<small class="d-flex me-4">
|
|
73
|
+
<b class="me-2">開工/完工日期</b>
|
|
74
|
+
<span>{{formatDate(projectInfo.beginDT)}} - {{formatDate(projectInfo.endDT)}}</span>
|
|
75
|
+
</small>
|
|
76
|
+
<small class="d-flex me-4">
|
|
77
|
+
<b class="me-2">核定工期</b>
|
|
78
|
+
<span>{{projectInfo.approvedWorkingPeriod}}天</span>
|
|
79
|
+
</small>
|
|
80
|
+
<small class="d-flex" v-if="projectInfo.extendToDT">
|
|
81
|
+
<b class="me-2">展延至</b>
|
|
82
|
+
<span>{{ formatDate(projectInfo.extendToDT) }}{{}} ({{projectInfo.extendDays}}天)</span>
|
|
83
|
+
</small>
|
|
84
|
+
<small class="d-flex ms-auto">
|
|
85
|
+
<slot></slot>
|
|
86
|
+
</small>
|
|
87
|
+
</div>
|
|
76
88
|
</div>
|
|
77
89
|
</div>
|
|
78
90
|
</template>
|
|
79
91
|
|
|
80
92
|
<script>
|
|
81
|
-
import { formatDate } from '
|
|
82
|
-
import { onMounted,
|
|
93
|
+
import { formatDate } from '../../../node_modules/jobdone-shared-files/common/format';
|
|
94
|
+
import { onMounted, ref } from 'vue';
|
|
83
95
|
import axios from 'axios';
|
|
84
96
|
|
|
85
97
|
export default {
|
|
86
98
|
props: {
|
|
99
|
+
rootDomain: {
|
|
100
|
+
type: String,
|
|
101
|
+
required: true
|
|
102
|
+
},
|
|
87
103
|
arrowBackLink: {
|
|
88
104
|
type: String,
|
|
89
105
|
required: true
|
|
90
106
|
},
|
|
91
|
-
|
|
92
|
-
type:
|
|
107
|
+
activeLinkType: {
|
|
108
|
+
type: Number,
|
|
109
|
+
required: true
|
|
110
|
+
},
|
|
111
|
+
projectId: {
|
|
112
|
+
type: String,
|
|
113
|
+
required: true
|
|
114
|
+
},
|
|
115
|
+
apiProjectInfo: {
|
|
116
|
+
type: String,
|
|
93
117
|
required: true
|
|
94
118
|
},
|
|
95
|
-
|
|
119
|
+
apiProjectApps: {
|
|
96
120
|
type: String,
|
|
97
121
|
required: true
|
|
98
122
|
}
|
|
99
|
-
// menuModules: {
|
|
100
|
-
// type: Array,
|
|
101
|
-
// default: function () {
|
|
102
|
-
// return [];
|
|
103
|
-
// }
|
|
104
|
-
// }
|
|
105
123
|
},
|
|
106
124
|
setup(props) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
125
|
+
|
|
126
|
+
const projectInfo = ref({
|
|
127
|
+
id: '',
|
|
128
|
+
orgnizationId: '',
|
|
129
|
+
moduleId: '',
|
|
130
|
+
caseNo: '',
|
|
131
|
+
buildingPermit: '',
|
|
132
|
+
name: '',
|
|
133
|
+
beginDT: '',
|
|
134
|
+
endDT: '',
|
|
135
|
+
approvedWorkingPeriod: '',
|
|
136
|
+
latitude: '',
|
|
137
|
+
longitude: '',
|
|
138
|
+
latitudeAndLongitude: '',
|
|
139
|
+
landSerialNo: '',
|
|
140
|
+
remark: '',
|
|
141
|
+
roleType: 1,
|
|
142
|
+
extendToDT: '',
|
|
143
|
+
extendDays: ''
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
const navLinkObj = ref({
|
|
111
147
|
apps: [],
|
|
112
148
|
icon: '',
|
|
113
149
|
name: '',
|
|
@@ -115,26 +151,63 @@
|
|
|
115
151
|
selfIsApp: false
|
|
116
152
|
});
|
|
117
153
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
154
|
+
const finalRootDomain = ref(props.rootDomain);
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
onMounted(async () => {
|
|
158
|
+
try {
|
|
159
|
+
if (finalRootDomain.value[finalRootDomain.value.length-1] == "/") {
|
|
160
|
+
finalRootDomain.value = finalRootDomain.value.slice(0, -1);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const data = await Promise.all([
|
|
164
|
+
axios.get(props.apiProjectInfo),
|
|
165
|
+
axios.get(props.apiProjectApps)
|
|
166
|
+
]);
|
|
167
|
+
Object.assign(projectInfo.value, data[0].data);
|
|
168
|
+
Object.assign(navLinkObj.value, data[1].data);
|
|
169
|
+
|
|
170
|
+
let navbarElements = document.getElementsByClassName('navbar-content');
|
|
171
|
+
Array.from(navbarElements).forEach(function(item){
|
|
172
|
+
item.classList.remove("opacity-0");
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
let placeholderElements = document.getElementsByClassName('navbar-placeholder-content');
|
|
176
|
+
Array.from(placeholderElements).forEach(function(item){
|
|
177
|
+
item.classList.add("opacity-0");
|
|
124
178
|
});
|
|
179
|
+
|
|
180
|
+
} catch (error) {
|
|
181
|
+
console.log(error);
|
|
182
|
+
}
|
|
125
183
|
});
|
|
126
184
|
|
|
127
185
|
|
|
128
186
|
return {
|
|
129
187
|
formatDate,
|
|
130
|
-
|
|
188
|
+
projectInfo,
|
|
189
|
+
navLinkObj,
|
|
190
|
+
finalRootDomain
|
|
131
191
|
}
|
|
132
192
|
}
|
|
133
193
|
}
|
|
134
194
|
</script>
|
|
135
195
|
|
|
136
196
|
<style scoped lang="scss">
|
|
137
|
-
@import "
|
|
197
|
+
@import "../../../node_modules/jobdone-shared-files/style/scss/Settings/basic-import";
|
|
198
|
+
|
|
199
|
+
.navbar-content{
|
|
200
|
+
transition: .5s;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.navbar-placeholder-content{
|
|
204
|
+
@include position-center();
|
|
205
|
+
display: flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
gap: 1rem;
|
|
208
|
+
mix-blend-mode: color-burn;
|
|
209
|
+
pointer-events: none;
|
|
210
|
+
}
|
|
138
211
|
|
|
139
212
|
.text-project-title {
|
|
140
213
|
color: lighten($primary, 8%);
|
|
@@ -162,6 +235,7 @@
|
|
|
162
235
|
}
|
|
163
236
|
|
|
164
237
|
.info-project {
|
|
238
|
+
position: relative;
|
|
165
239
|
padding-left: 5.25rem;
|
|
166
240
|
padding-right: 1rem;
|
|
167
241
|
}
|
package/README.md
CHANGED
|
@@ -2,16 +2,22 @@
|
|
|
2
2
|
如果要使用 vue 檔,需要直接引用 node_modules 裡的檔案,例如:
|
|
3
3
|
`import OOXX from '../../node_modules/jobdone-shared-files/OOXX.vue';`
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Vue Components
|
|
6
|
+
|
|
7
|
+
### paginate
|
|
6
8
|
可設定尺寸:`container-class`
|
|
7
9
|
- 小:`pagination-sm`
|
|
8
10
|
- 中:預設
|
|
9
11
|
- 大:`pagination-lg`
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
----
|
|
14
|
+
|
|
15
|
+
### tagEditor
|
|
12
16
|
標籤
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
----
|
|
19
|
+
|
|
20
|
+
### tree
|
|
15
21
|
尺寸:`size`
|
|
16
22
|
- 小: `sm`
|
|
17
23
|
- 中:預設
|
|
@@ -20,8 +26,73 @@
|
|
|
20
26
|
- 預設用在灰色背景上
|
|
21
27
|
- 用在白背景上:`white`
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
----
|
|
30
|
+
|
|
31
|
+
### vueLoadingOverlay
|
|
24
32
|
指定樣式的 vue-loading-overlay
|
|
25
33
|
|
|
26
|
-
|
|
27
|
-
|
|
34
|
+
用法說明 `("isLoading" => 自定義變數)` :
|
|
35
|
+
| 步驟 | 說明 | 範例 |
|
|
36
|
+
|------|-------------------|----------------------------------------------|
|
|
37
|
+
| 1. | npm install | `npm install vue-loading-overlay@^6.0` |
|
|
38
|
+
| 2. | 在js或.vue中import | `import Loading from "本檔案位置"` |
|
|
39
|
+
| 3. | 畫面中放上Component | `<Loading :is-active="isLoading"></Loading>` |
|
|
40
|
+
| 4. | loading 初始化 | `const isLoading = ref(false);` |
|
|
41
|
+
| 5. | 開啟loading | `isLoading.value = true;` |
|
|
42
|
+
| 6. | 關閉loading | `isLoading.value = false;` |
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
----
|
|
48
|
+
|
|
49
|
+
### ProjectManagement/projectNavbar
|
|
50
|
+
專案資訊 Navbar
|
|
51
|
+
|
|
52
|
+
需要傳入的值:
|
|
53
|
+
| 數值名稱 | 說明 | 必要 |
|
|
54
|
+
|------------------|-----------------------------------------------------------------|----|
|
|
55
|
+
| root-domain | 底層的 domain,傳入的值有無斜線皆可 | 是 |
|
|
56
|
+
| arrow-back-link | 離開專案的連結,一般來說是底層的 ProjectList | 是 |
|
|
57
|
+
| active-link-type | Navbar active 的種類 ( 0 = 專案資訊 / 1 = Module / 2 = 改善單 / 3 = 派遣單 ) | 是 |
|
|
58
|
+
| project-id | project id | 是 |
|
|
59
|
+
| api-project-apps | 取得 project module & menu | 是 |
|
|
60
|
+
| api-project-info | 取得 project 資訊 | 是 |
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
----
|
|
64
|
+
|
|
65
|
+
### lightboxWithOverview
|
|
66
|
+
有縮圖的圖片光箱
|
|
67
|
+
|
|
68
|
+
`<lightbox-with-overview :pictures-data="picturesData" ref="lightboxWithOverviewRef"></lightbox-with-overview>`
|
|
69
|
+
|
|
70
|
+
可傳入的值:
|
|
71
|
+
| 數值名稱 | 說明 | 必要 |
|
|
72
|
+
|------------------|-----------------------------------------------------------------|----|
|
|
73
|
+
| pictures-data | 格式為: `[{src: "", title: ""}]` | 是 |
|
|
74
|
+
| display-index | 預設 index 為 0 | 否 |
|
|
75
|
+
| preview-count | preview 的圖片陣列數量,預設為 5,可使用 `lightboxWithOverviewRef?.previewPictures` 與 `lightboxWithOverviewRef?.otherPictureCount` | 否 |
|
|
76
|
+
|
|
77
|
+
----
|
|
78
|
+
|
|
79
|
+
## SCSS
|
|
80
|
+
|
|
81
|
+
### Layout
|
|
82
|
+
| Layout 名稱 | 說明 | 在 jobdone-shared-files 內? |
|
|
83
|
+
|-------------------|-------------------------|-----------------------------|
|
|
84
|
+
| LayoutBase | 客製化的 Bootstrap (5.3.0) | 是 |
|
|
85
|
+
| LayoutProject | Project 使用的共用樣式,含開合雙欄樣式 | 是 |
|
|
86
|
+
| LayoutSinglePage | 單頁版面的樣式,如:登入、錯誤頁、條款等 | 是 |
|
|
87
|
+
| LayoutTwoColumn | 雙欄可開合樣式 | 是 |
|
|
88
|
+
| LayoutMobile | 針對 (底層) 手機的共用樣式 | 是 |
|
|
89
|
+
| LayoutDocs | 針對條文調整的樣式 | 否 |
|
|
90
|
+
| LayoutInnerColumn | 針對 Project 雙欄樣式內的雙欄樣式 | 否 |
|
|
91
|
+
| LayoutOutside | 針對 (底層) Project 外的共用樣式 | 否 |
|
|
92
|
+
|
|
93
|
+
### Common
|
|
94
|
+
|
|
95
|
+
- Animation:目前只有 Fade In keyframe
|
|
96
|
+
- SelectableTable:勾選 tr focus style
|
|
97
|
+
- thumbnail-group:方形大頭貼與小大頭貼相疊 style
|
|
98
|
+
- filepond:客製化 filepond 樣式
|
package/common/format.js
CHANGED
|
@@ -2,8 +2,22 @@ import dayjs from 'dayjs';
|
|
|
2
2
|
import { computed } from 'vue';
|
|
3
3
|
|
|
4
4
|
// 時間格式
|
|
5
|
-
export const formatDate = (value) =>
|
|
6
|
-
|
|
5
|
+
export const formatDate = (value) => {
|
|
6
|
+
if (value === null || !value) {
|
|
7
|
+
return value;
|
|
8
|
+
} else {
|
|
9
|
+
return dayjs(value).format('YYYY-MM-DD');
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const formatDT = (value) => {
|
|
14
|
+
if (value === null || !value) {
|
|
15
|
+
return value;
|
|
16
|
+
} else {
|
|
17
|
+
return dayjs(value).format('YYYY-MM-DD HH:mm:ss');
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
7
21
|
|
|
8
22
|
// 千分位格式
|
|
9
23
|
export const formatThousands = computed(() => {
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vue-easy-lightbox :visible="lightboxVisibleRef" :imgs="picturesData" :index="picturesIndexRef"
|
|
3
|
+
@hide="hideLightbox" @on-prev-click="picturesIndexRef--" @on-next-click="picturesIndexRef++"></vue-easy-lightbox>
|
|
4
|
+
<div class="lightbox-thumbnail-toolbar text-center overflow-hidden" v-if="lightboxVisibleRef">
|
|
5
|
+
<div class="text-nowrap overflow-x-auto pt-3 px-2 pb-1">
|
|
6
|
+
<div class="d-inline-block">
|
|
7
|
+
<div class="d-inline-block thumbnail-content rounded hover-border"
|
|
8
|
+
:class="{'active': index == picturesIndexRef}" :style="'background-image: url(' + item.src +');'"
|
|
9
|
+
@click="changePictureIndex(index)" v-for="(item, index) in picturesData"></div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import { ref, computed } from 'vue';
|
|
17
|
+
import VueEasyLightbox from 'vue-easy-lightbox';
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
props: {
|
|
21
|
+
previewCount: {
|
|
22
|
+
type: Number,
|
|
23
|
+
required: false,
|
|
24
|
+
default: 5
|
|
25
|
+
},
|
|
26
|
+
picturesData: {
|
|
27
|
+
type: Array,
|
|
28
|
+
required: true
|
|
29
|
+
},
|
|
30
|
+
displayIndex: {
|
|
31
|
+
type: Number,
|
|
32
|
+
required: false,
|
|
33
|
+
default: 0
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
components: {
|
|
37
|
+
VueEasyLightbox
|
|
38
|
+
},
|
|
39
|
+
setup(props) {
|
|
40
|
+
const previewPictures = computed(() => {
|
|
41
|
+
return props.picturesData.slice(0, props.previewCount)
|
|
42
|
+
});
|
|
43
|
+
const otherPictureCount = computed(() => {
|
|
44
|
+
var count = props.picturesData.length - props.previewCount;
|
|
45
|
+
return count < 0 ? 0 : count;
|
|
46
|
+
});
|
|
47
|
+
const lightboxVisibleRef = ref(false);
|
|
48
|
+
const picturesIndexRef = ref(props.displayIndex);
|
|
49
|
+
|
|
50
|
+
const changePictureIndex = (index) => {
|
|
51
|
+
picturesIndexRef.value = index;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const showLightbox = (index) => {
|
|
55
|
+
changePictureIndex(index);
|
|
56
|
+
lightboxVisibleRef.value = true;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const hideLightbox = () => {
|
|
60
|
+
lightboxVisibleRef.value = false;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return {
|
|
64
|
+
lightboxVisibleRef,
|
|
65
|
+
picturesIndexRef, changePictureIndex,
|
|
66
|
+
showLightbox, hideLightbox,
|
|
67
|
+
previewCount: props.previewCount,
|
|
68
|
+
previewPictures,
|
|
69
|
+
otherPictureCount
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
</script>
|
|
74
|
+
|
|
75
|
+
<style scoped lang="scss">
|
|
76
|
+
@import "./style/scss/Settings/basic-import";
|
|
77
|
+
.hover-border{
|
|
78
|
+
transition: $transition-base;
|
|
79
|
+
&:hover{
|
|
80
|
+
box-shadow: $focus-ring-box-shadow;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.vel-modal{
|
|
85
|
+
backdrop-filter: blur(2px);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.lightbox-thumbnail-toolbar .thumbnail-content{
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.lightbox-thumbnail-toolbar{
|
|
93
|
+
$padding-x: 10vw;
|
|
94
|
+
position: fixed;
|
|
95
|
+
top: 0;
|
|
96
|
+
left: $padding-x;
|
|
97
|
+
right: $padding-x;
|
|
98
|
+
margin: auto;
|
|
99
|
+
z-index: 10000;
|
|
100
|
+
animation: fadeIn .5s;
|
|
101
|
+
pointer-events: none;
|
|
102
|
+
.overflow-x-auto{
|
|
103
|
+
display: inline-block;
|
|
104
|
+
max-width: 100%;
|
|
105
|
+
pointer-events: auto;
|
|
106
|
+
}
|
|
107
|
+
.thumbnail-content{
|
|
108
|
+
--bs-border-color: rgba(0,0,0, 0.12);
|
|
109
|
+
@include solid-size(40px);
|
|
110
|
+
filter: brightness(0.5);
|
|
111
|
+
transition: $transition-base;
|
|
112
|
+
&:not(:last-child){
|
|
113
|
+
margin-right: 1rem;
|
|
114
|
+
}
|
|
115
|
+
&:hover{
|
|
116
|
+
filter: brightness(.8);
|
|
117
|
+
}
|
|
118
|
+
&.active{
|
|
119
|
+
filter: brightness(1);
|
|
120
|
+
}
|
|
121
|
+
&:hover, &.active{
|
|
122
|
+
--bs-border-color: rgba(255,255,255, 0.3);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
.hover-border:hover{
|
|
126
|
+
box-shadow: 0 0 $focus-ring-blur $focus-ring-width rgba(255,255,255, .25);
|
|
127
|
+
}
|
|
128
|
+
.overflow-x-auto{
|
|
129
|
+
--bs-emphasis-color-rgb: 255, 255, 255;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
</style>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jobdone-shared-files",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.60",
|
|
4
4
|
"description": "Shared JS and SCSS for Jobdone Enterprise.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"axios": "^1.2.2",
|
|
13
13
|
"vue": "^3.2.45",
|
|
14
14
|
"vue-loading-overlay": "^6.0.3",
|
|
15
|
-
"bootstrap": "^5.3.0
|
|
16
|
-
"dayjs": "^1.11.7"
|
|
15
|
+
"bootstrap": "^5.3.0",
|
|
16
|
+
"dayjs": "^1.11.7",
|
|
17
|
+
"vue-easy-lightbox": "^1.16.0"
|
|
17
18
|
}
|
|
18
19
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@import "../Settings/basic-import";
|
|
2
|
+
|
|
3
|
+
th.bg-secondary{
|
|
4
|
+
position: relative;
|
|
5
|
+
&:after{
|
|
6
|
+
content: "";
|
|
7
|
+
position: absolute;
|
|
8
|
+
left: 0;
|
|
9
|
+
bottom: -$border-width;
|
|
10
|
+
height: $border-width;
|
|
11
|
+
width: 100%;
|
|
12
|
+
background-color: $secondary;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.table{
|
|
17
|
+
background-color: $white;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
tr:has(input[type="checkbox"]:checked) > td:not([scope="col"]){
|
|
21
|
+
--bs-table-accent-bg: transparent;
|
|
22
|
+
--bs-table-bg: rgba(var(--bs-primary-rgb), .1);
|
|
23
|
+
color: var(--bs-table-hover-color);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.td-check, .td-avatar-sm{
|
|
27
|
+
width: 2rem;
|
|
28
|
+
}
|
|
29
|
+
.td-avatar-md{
|
|
30
|
+
width: 3rem;
|
|
31
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@import "../Settings/basic-import";
|
|
2
|
+
|
|
3
|
+
.can-click{
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.filepond--root.filepond--hopper {
|
|
8
|
+
border: 1px dashed var(--bs-gray-400);
|
|
9
|
+
border-radius: 0.5em;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.filepond--drop-label {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: stretch;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.filepond-label-box-cus {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
width: 100%;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.filepond--panel-root {
|
|
27
|
+
background-color: $blue-100 !important;
|
|
28
|
+
}
|