jobdone-shared-files 0.0.1-beta.7 → 0.0.1-beta.71
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 +183 -71
- package/README.md +76 -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 +90 -14
- 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 +5 -1
- package/tree.vue +17 -10
- package/treeItem.vue +1 -1
- package/vueLoadingOverlay.vue +13 -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,73 @@
|
|
|
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
|
+
家當表單
|
|
54
|
+
</a>
|
|
55
|
+
</div>
|
|
56
|
+
</nav>
|
|
57
|
+
<nav class="navbar-nav navbar-main navbar-line navbar-line-lg ms-auto">
|
|
58
|
+
<div class="nav-item navbar-line-item btn nav-link border-0 dropdown"
|
|
59
|
+
:class="{'active':activeLinkType==0}">
|
|
60
|
+
<a class="dropdown-link" :href="finalRootDomain + 'Profile'">
|
|
61
|
+
<div class="thumbnail-content thumbnail-32 rounded-circle me-1" :style="'background-image: url(' + userInfo.picture + ');'"></div>
|
|
62
|
+
<span class="text-user-name text-overflow">{{userInfo.displayName}}</span>
|
|
63
|
+
<small class="ms-1">
|
|
64
|
+
(<span class="text-user-name text-overflow">{{userInfo.lastName}} {{userInfo.firstName}}</span>)
|
|
65
|
+
</small>
|
|
66
|
+
</a>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="nav-item navbar-line-item btn nav-link border-0 dropdown">
|
|
69
|
+
<a class="dropdown-link" :href="finalRootDomain + logOutUrl">
|
|
70
|
+
登出
|
|
51
71
|
</a>
|
|
52
72
|
</div>
|
|
53
73
|
</nav>
|
|
@@ -55,59 +75,100 @@
|
|
|
55
75
|
</div>
|
|
56
76
|
</div>
|
|
57
77
|
</nav>
|
|
58
|
-
<div class="info-project
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
<div class="info-project bg-primary bg-opacity-25 border-top border-bottom border-primary border-opacity-25 py-2">
|
|
79
|
+
<div class="navbar-placeholder-content px-5 placeholder-glow">
|
|
80
|
+
<span class="placeholder placeholder-xs w-10rem ms-4"></span>
|
|
81
|
+
<span class="placeholder placeholder-xs w-12rem"></span>
|
|
82
|
+
<span class="placeholder placeholder-xs w-6rem"></span>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="navbar-content opacity-0 d-flex align-items-center">
|
|
85
|
+
<small class="d-flex me-4" v-if="projectInfo.caseNo">
|
|
86
|
+
<b class="me-2">案號</b>
|
|
87
|
+
<span>{{projectInfo.caseNo}}</span>
|
|
88
|
+
</small>
|
|
89
|
+
<small class="d-flex me-4">
|
|
90
|
+
<b class="me-2">開工/完工日期</b>
|
|
91
|
+
<span>{{formatDate(projectInfo.beginDT)}} - {{formatDate(projectInfo.endDT)}}</span>
|
|
92
|
+
</small>
|
|
93
|
+
<small class="d-flex me-4">
|
|
94
|
+
<b class="me-2">核定工期</b>
|
|
95
|
+
<span>{{projectInfo.approvedWorkingPeriod}}天</span>
|
|
96
|
+
</small>
|
|
97
|
+
<small class="d-flex" v-if="projectInfo.extendToDT">
|
|
98
|
+
<b class="me-2">展延至</b>
|
|
99
|
+
<span>{{ formatDate(projectInfo.extendToDT) }}{{}} ({{projectInfo.extendDays}}天)</span>
|
|
100
|
+
</small>
|
|
101
|
+
<small class="d-flex ms-auto">
|
|
102
|
+
<slot></slot>
|
|
103
|
+
</small>
|
|
104
|
+
</div>
|
|
76
105
|
</div>
|
|
77
106
|
</div>
|
|
78
107
|
</template>
|
|
79
108
|
|
|
80
109
|
<script>
|
|
81
|
-
import { formatDate } from '
|
|
82
|
-
import { onMounted,
|
|
110
|
+
import { formatDate } from '../../../node_modules/jobdone-shared-files/common/format';
|
|
111
|
+
import { onMounted, ref } from 'vue';
|
|
83
112
|
import axios from 'axios';
|
|
84
113
|
|
|
85
114
|
export default {
|
|
86
115
|
props: {
|
|
116
|
+
rootDomain: {
|
|
117
|
+
type: String,
|
|
118
|
+
required: true
|
|
119
|
+
},
|
|
87
120
|
arrowBackLink: {
|
|
88
121
|
type: String,
|
|
89
122
|
required: true
|
|
90
123
|
},
|
|
91
|
-
|
|
92
|
-
type:
|
|
124
|
+
activeLinkType: {
|
|
125
|
+
type: Number,
|
|
126
|
+
required: true
|
|
127
|
+
},
|
|
128
|
+
projectId: {
|
|
129
|
+
type: String,
|
|
93
130
|
required: true
|
|
94
131
|
},
|
|
95
|
-
|
|
132
|
+
apiProjectInfo: {
|
|
133
|
+
type: String,
|
|
134
|
+
required: true
|
|
135
|
+
},
|
|
136
|
+
apiProjectApps: {
|
|
137
|
+
type: String,
|
|
138
|
+
required: true
|
|
139
|
+
},
|
|
140
|
+
apiCurrentUser: {
|
|
141
|
+
type: String,
|
|
142
|
+
required: true
|
|
143
|
+
},
|
|
144
|
+
logOutUrl: {
|
|
96
145
|
type: String,
|
|
97
146
|
required: true
|
|
98
147
|
}
|
|
99
|
-
// menuModules: {
|
|
100
|
-
// type: Array,
|
|
101
|
-
// default: function () {
|
|
102
|
-
// return [];
|
|
103
|
-
// }
|
|
104
|
-
// }
|
|
105
148
|
},
|
|
106
149
|
setup(props) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
150
|
+
|
|
151
|
+
const projectInfo = ref({
|
|
152
|
+
id: '',
|
|
153
|
+
orgnizationId: '',
|
|
154
|
+
moduleId: '',
|
|
155
|
+
caseNo: '',
|
|
156
|
+
buildingPermit: '',
|
|
157
|
+
name: '',
|
|
158
|
+
beginDT: '',
|
|
159
|
+
endDT: '',
|
|
160
|
+
approvedWorkingPeriod: '',
|
|
161
|
+
latitude: '',
|
|
162
|
+
longitude: '',
|
|
163
|
+
latitudeAndLongitude: '',
|
|
164
|
+
landSerialNo: '',
|
|
165
|
+
remark: '',
|
|
166
|
+
roleType: 1,
|
|
167
|
+
extendToDT: '',
|
|
168
|
+
extendDays: ''
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
const navLinkObj = ref({
|
|
111
172
|
apps: [],
|
|
112
173
|
icon: '',
|
|
113
174
|
name: '',
|
|
@@ -115,29 +176,75 @@
|
|
|
115
176
|
selfIsApp: false
|
|
116
177
|
});
|
|
117
178
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
179
|
+
const userInfo = ref({
|
|
180
|
+
displayName: '',
|
|
181
|
+
lastName: '',
|
|
182
|
+
firstName: '',
|
|
183
|
+
picture: ''
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
const finalRootDomain = ref(props.rootDomain);
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
onMounted(async () => {
|
|
190
|
+
try {
|
|
191
|
+
if (finalRootDomain.value[finalRootDomain.value.length-1] == "/") {
|
|
192
|
+
finalRootDomain.value = finalRootDomain.value.slice(0, -1);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
const data = await Promise.all([
|
|
196
|
+
axios.get(props.apiProjectInfo),
|
|
197
|
+
axios.get(props.apiProjectApps),
|
|
198
|
+
axios.get(props.apiCurrentUser)
|
|
199
|
+
]);
|
|
200
|
+
Object.assign(projectInfo.value, data[0].data);
|
|
201
|
+
Object.assign(navLinkObj.value, data[1].data);
|
|
202
|
+
Object.assign(userInfo.value, data[2].data);
|
|
203
|
+
|
|
204
|
+
let navbarElements = document.getElementsByClassName('navbar-content');
|
|
205
|
+
Array.from(navbarElements).forEach(function(item){
|
|
206
|
+
item.classList.remove("opacity-0");
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
let placeholderElements = document.getElementsByClassName('navbar-placeholder-content');
|
|
210
|
+
Array.from(placeholderElements).forEach(function(item){
|
|
211
|
+
item.classList.add("opacity-0");
|
|
124
212
|
});
|
|
213
|
+
|
|
214
|
+
} catch (error) {
|
|
215
|
+
console.log(error);
|
|
216
|
+
}
|
|
125
217
|
});
|
|
126
218
|
|
|
127
219
|
|
|
128
220
|
return {
|
|
129
221
|
formatDate,
|
|
130
|
-
|
|
222
|
+
projectInfo,
|
|
223
|
+
navLinkObj,
|
|
224
|
+
finalRootDomain
|
|
131
225
|
}
|
|
132
226
|
}
|
|
133
227
|
}
|
|
134
228
|
</script>
|
|
135
229
|
|
|
136
230
|
<style scoped lang="scss">
|
|
137
|
-
@import "
|
|
231
|
+
@import "../../../node_modules/jobdone-shared-files/style/scss/Settings/basic-import";
|
|
232
|
+
|
|
233
|
+
.navbar-content{
|
|
234
|
+
transition: .5s;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.navbar-placeholder-content{
|
|
238
|
+
@include position-center();
|
|
239
|
+
display: flex;
|
|
240
|
+
align-items: center;
|
|
241
|
+
gap: 1rem;
|
|
242
|
+
mix-blend-mode: color-burn;
|
|
243
|
+
pointer-events: none;
|
|
244
|
+
}
|
|
138
245
|
|
|
139
246
|
.text-project-title {
|
|
140
|
-
color:
|
|
247
|
+
color: var(--dark-theme-primary);
|
|
141
248
|
}
|
|
142
249
|
|
|
143
250
|
.navbar[data-bs-theme="dark"] {
|
|
@@ -162,7 +269,12 @@
|
|
|
162
269
|
}
|
|
163
270
|
|
|
164
271
|
.info-project {
|
|
272
|
+
position: relative;
|
|
165
273
|
padding-left: 5.25rem;
|
|
166
274
|
padding-right: 1rem;
|
|
167
275
|
}
|
|
276
|
+
|
|
277
|
+
.text-user-name{
|
|
278
|
+
max-width: 5.5rem;
|
|
279
|
+
}
|
|
168
280
|
</style>
|
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,72 @@
|
|
|
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. | 在js或.vue中import | `import Loading from "../../node_modules/jobdone-shared-files/vueLoadingOverlay.vue";` |
|
|
38
|
+
| 2. | 畫面中放上Component | `<Loading :is-active="isLoading"></Loading>` |
|
|
39
|
+
| 3. | loading 初始化 | `const isLoading = ref(false);` |
|
|
40
|
+
| 4. | 開啟loading | `isLoading.value = true;` |
|
|
41
|
+
| 5. | 關閉loading | `isLoading.value = false;` |
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
----
|
|
47
|
+
|
|
48
|
+
### ProjectManagement/projectNavbar
|
|
49
|
+
專案資訊 Navbar
|
|
50
|
+
|
|
51
|
+
需要傳入的值:
|
|
52
|
+
| 數值名稱 | 說明 | 必要 |
|
|
53
|
+
|------------------|-----------------------------------------------------------------|----|
|
|
54
|
+
| root-domain | 底層的 domain,傳入的值有無斜線皆可 | 是 |
|
|
55
|
+
| arrow-back-link | 離開專案的連結,一般來說是底層的 ProjectList | 是 |
|
|
56
|
+
| active-link-type | Navbar active 的種類 ( 0 = 專案資訊 / 1 = Module / 2 = 改善單 / 3 = 家當表單 ) | 是 |
|
|
57
|
+
| project-id | project id | 是 |
|
|
58
|
+
| api-project-apps | 取得 project module & menu | 是 |
|
|
59
|
+
| api-project-info | 取得 project 資訊 | 是 |
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
----
|
|
63
|
+
|
|
64
|
+
### lightboxWithOverview
|
|
65
|
+
有縮圖的圖片光箱
|
|
66
|
+
|
|
67
|
+
`<lightbox-with-overview :pictures-data="picturesData" ref="lightboxWithOverviewRef"></lightbox-with-overview>`
|
|
68
|
+
|
|
69
|
+
可傳入的值:
|
|
70
|
+
| 數值名稱 | 說明 | 必要 |
|
|
71
|
+
|------------------|-----------------------------------------------------------------|----|
|
|
72
|
+
| pictures-data | 格式為: `[{src: "", title: ""}]` | 是 |
|
|
73
|
+
| display-index | 預設 index 為 0 | 否 |
|
|
74
|
+
| preview-count | preview 的圖片陣列數量,預設為 5,可使用 `lightboxWithOverviewRef?.previewPictures` 與 `lightboxWithOverviewRef?.otherPictureCount` | 否 |
|
|
75
|
+
|
|
76
|
+
----
|
|
77
|
+
|
|
78
|
+
## SCSS
|
|
79
|
+
|
|
80
|
+
### Layout
|
|
81
|
+
| Layout 名稱 | 說明 | 在 jobdone-shared-files 內? |
|
|
82
|
+
|-------------------|-------------------------|-----------------------------|
|
|
83
|
+
| LayoutBase | 客製化的 Bootstrap (5.3.0) | 是 |
|
|
84
|
+
| LayoutProject | Project 使用的共用樣式,含開合雙欄樣式 | 是 |
|
|
85
|
+
| LayoutSinglePage | 單頁版面的樣式,如:登入、錯誤頁、條款等 | 是 |
|
|
86
|
+
| LayoutTwoColumn | 雙欄可開合樣式 | 是 |
|
|
87
|
+
| LayoutMobile | 針對 (底層) 手機的共用樣式 | 是 |
|
|
88
|
+
| LayoutDocs | 針對條文調整的樣式 | 否 |
|
|
89
|
+
| LayoutInnerColumn | 針對 Project 雙欄樣式內的雙欄樣式 | 否 |
|
|
90
|
+
| LayoutOutside | 針對 (底層) Project 外的共用樣式 | 否 |
|
|
91
|
+
|
|
92
|
+
### Common
|
|
93
|
+
|
|
94
|
+
- Animation:目前只有 Fade In keyframe
|
|
95
|
+
- SelectableTable:勾選 tr focus style
|
|
96
|
+
- thumbnail-group:方形大頭貼與小大頭貼相疊 style
|
|
97
|
+
- 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: var(--backdrop-blur);
|
|
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.71",
|
|
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
|
}
|