n20-common-lib 1.1.10
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/README.md +24 -0
- package/package.json +120 -0
- package/src/assets/css/_coreLib.scss +26 -0
- package/src/assets/css/cl-approve-card.scss +66 -0
- package/src/assets/css/cl-drag-list.scss +22 -0
- package/src/assets/css/cl-empty.scss +10 -0
- package/src/assets/css/cl-expandable.scss +31 -0
- package/src/assets/css/cl-file-upload-table.scss +11 -0
- package/src/assets/css/cl-filter.scss +20 -0
- package/src/assets/css/cl-foldedpanel.scss +35 -0
- package/src/assets/css/cl-footer-box.scss +8 -0
- package/src/assets/css/cl-form-item.scss +281 -0
- package/src/assets/css/cl-more-tab.scss +98 -0
- package/src/assets/css/cl-nav-menu.scss +5 -0
- package/src/assets/css/cl-pagination.scss +71 -0
- package/src/assets/css/cl-secondary-tab.scss +30 -0
- package/src/assets/css/cl-sifting.scss +51 -0
- package/src/assets/css/cl-statis.scss +14 -0
- package/src/assets/css/cl-step.scss +164 -0
- package/src/assets/css/cl-suspend.scss +25 -0
- package/src/assets/css/cl-tertiary-tab.scss +37 -0
- package/src/assets/css/cl-upload.scss +41 -0
- package/src/assets/css/cl-worn-pagination.scss +50 -0
- package/src/assets/css/element-variables.scss +1053 -0
- package/src/assets/css/element.dev.scss +5 -0
- package/src/assets/css/font-icon.scss +22 -0
- package/src/assets/css/index.dev.scss +3 -0
- package/src/assets/css/index.scss +8 -0
- package/src/assets/css/normalize.scss +243 -0
- package/src/assets/css/rootvar.scss +66 -0
- package/src/assets/css/title-pop.scss +4 -0
- package/src/assets/getJsonc.js +51 -0
- package/src/assets/postMessage.js +2 -0
- package/src/assets/postMessageC.js +37 -0
- package/src/components/ApproveCard/index.vue +83 -0
- package/src/components/DatePicker/index.vue +22 -0
- package/src/components/Dialog/index.vue +115 -0
- package/src/components/DragList/index.vue +64 -0
- package/src/components/Empty/img/404.png +0 -0
- package/src/components/Empty/img/abnormal.svg +109 -0
- package/src/components/Empty/img/dispose.svg +72 -0
- package/src/components/Empty/img/empty.svg +58 -0
- package/src/components/Empty/img/general.svg +59 -0
- package/src/components/Empty/img/lock.svg +58 -0
- package/src/components/Empty/img/network.svg +60 -0
- package/src/components/Empty/img/relevant.svg +69 -0
- package/src/components/Empty/img/search.svg +73 -0
- package/src/components/Empty/index.vue +92 -0
- package/src/components/Expandable/index.vue +47 -0
- package/src/components/FileUploadTable/index.vue +456 -0
- package/src/components/Filters/index.vue +77 -0
- package/src/components/FoldedPanel/index.vue +64 -0
- package/src/components/FooterBox/index.vue +18 -0
- package/src/components/InputNumber/index.vue +126 -0
- package/src/components/MoreTab/index.vue +232 -0
- package/src/components/NavMenu/index.vue +90 -0
- package/src/components/Pagination/index.vue +126 -0
- package/src/components/SecondaryTab/index.vue +75 -0
- package/src/components/Select/index.vue +51 -0
- package/src/components/Sifting/index.vue +97 -0
- package/src/components/Statis/index.vue +55 -0
- package/src/components/Step/index.vue +65 -0
- package/src/components/Suspend/index.vue +63 -0
- package/src/components/Suspend/suspensionBtn.png +0 -0
- package/src/components/TertiaryTab/index.vue +49 -0
- package/src/components/TimePicker/index.vue +22 -0
- package/src/components/Upload/index.vue +237 -0
- package/src/components/WornPagination/index.vue +202 -0
- package/src/directives/VMove/index.js +42 -0
- package/src/directives/VTitle/index.js +55 -0
- package/src/directives/VTitle/tooltip.vue +21 -0
- package/src/directives/vDrag/index.js +72 -0
- package/src/index.js +111 -0
- package/src/utils/auth.js +41 -0
- package/src/utils/axios.js +180 -0
- package/src/utils/print.js +156 -0
- package/src/utils/pushLink.js +5 -0
- package/style/css/normalize.scss +243 -0
- package/style/fonts/element-icons.535877f5.woff +0 -0
- package/style/fonts/element-icons.732389de.ttf +0 -0
- package/style/index.css +3 -0
- package/style/index.css.map +1 -0
- package/style/index.umd.min.js +2 -0
- package/style/index.umd.min.js.map +1 -0
- package/style/server-config.jsonc +212 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@import url('//at.alicdn.com/t/font_2782772_v2yjhk8rgm7.css');
|
|
2
|
+
|
|
3
|
+
.cl-icon- {
|
|
4
|
+
font-family: 'core-lib-iconfont' !important;
|
|
5
|
+
font-style: normal;
|
|
6
|
+
font-weight: normal;
|
|
7
|
+
font-variant: normal;
|
|
8
|
+
text-transform: none;
|
|
9
|
+
line-height: 1;
|
|
10
|
+
vertical-align: baseline;
|
|
11
|
+
display: inline-block;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
}
|
|
15
|
+
[class^='cl-icon-'],
|
|
16
|
+
[class*=' cl-icon-'] {
|
|
17
|
+
@extend .cl-icon-;
|
|
18
|
+
}
|
|
19
|
+
.el-icon-date:before {
|
|
20
|
+
@extend .cl-icon-;
|
|
21
|
+
content: '\e602';
|
|
22
|
+
}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
$--font-size-base: 14px !default;
|
|
2
|
+
$--border-color-base: #dcdfe6 !default;
|
|
3
|
+
|
|
4
|
+
body {
|
|
5
|
+
font-size: $--font-size-base;
|
|
6
|
+
}
|
|
7
|
+
li {
|
|
8
|
+
list-style: none;
|
|
9
|
+
}
|
|
10
|
+
iframe {
|
|
11
|
+
border: 0;
|
|
12
|
+
outline: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* 菜单滚动条 */
|
|
16
|
+
::-webkit-scrollbar {
|
|
17
|
+
width: 6px;
|
|
18
|
+
height: 8px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
::-webkit-scrollbar-track,
|
|
22
|
+
::-webkit-scrollbar-corner {
|
|
23
|
+
background: transparent;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
::-webkit-scrollbar-thumb {
|
|
27
|
+
border-radius: 5px;
|
|
28
|
+
width: 6px;
|
|
29
|
+
background-color: #d3d9e6;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
::-webkit-scrollbar-track-piece {
|
|
33
|
+
width: 6px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@mixin set-pm($m, $p) {
|
|
37
|
+
.p-a#{$m} {
|
|
38
|
+
padding: $p;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.p-t#{$m} {
|
|
42
|
+
padding-top: $p;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.p-b#{$m} {
|
|
46
|
+
padding-bottom: $p;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.p-l#{$m} {
|
|
50
|
+
padding-left: $p;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.p-r#{$m} {
|
|
54
|
+
padding-right: $p;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.m-a#{$m} {
|
|
58
|
+
margin: $p;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.m-t#{$m} {
|
|
62
|
+
margin-top: $p;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.m-b#{$m} {
|
|
66
|
+
margin-bottom: $p;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.m-l#{$m} {
|
|
70
|
+
margin-left: $p;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.m-r#{$m} {
|
|
74
|
+
margin-right: $p;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* 内外边距 */
|
|
79
|
+
@include set-pm('', 16px !important);
|
|
80
|
+
@include set-pm('-xl', 32px !important);
|
|
81
|
+
@include set-pm('-lg', 24px !important);
|
|
82
|
+
@include set-pm('-m', 16px !important);
|
|
83
|
+
@include set-pm('-s', 8px !important);
|
|
84
|
+
@include set-pm('-0', 0 !important);
|
|
85
|
+
|
|
86
|
+
/* 浮动布局 */
|
|
87
|
+
.left,
|
|
88
|
+
.float-left {
|
|
89
|
+
float: left;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.right,
|
|
93
|
+
.float-right {
|
|
94
|
+
float: right;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.overflow {
|
|
98
|
+
height: auto;
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.overflow-clear {
|
|
103
|
+
&:after {
|
|
104
|
+
content: '';
|
|
105
|
+
display: block;
|
|
106
|
+
clear: both;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* 行内块元素水平垂直对齐方式 */
|
|
111
|
+
.b-center {
|
|
112
|
+
text-align: center;
|
|
113
|
+
& > * {
|
|
114
|
+
display: inline-block;
|
|
115
|
+
vertical-align: bottom;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.b-vertical {
|
|
120
|
+
font-size: 0;
|
|
121
|
+
& > * {
|
|
122
|
+
vertical-align: middle;
|
|
123
|
+
display: inline-block;
|
|
124
|
+
font-size: 14px;
|
|
125
|
+
}
|
|
126
|
+
&:before {
|
|
127
|
+
content: '';
|
|
128
|
+
vertical-align: middle;
|
|
129
|
+
display: inline-block;
|
|
130
|
+
width: 0px;
|
|
131
|
+
height: 100%;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* 文字居中 */
|
|
136
|
+
.text {
|
|
137
|
+
&-c {
|
|
138
|
+
text-align: center !important;
|
|
139
|
+
}
|
|
140
|
+
&-l {
|
|
141
|
+
text-align: left !important;
|
|
142
|
+
}
|
|
143
|
+
&-r {
|
|
144
|
+
text-align: right !important;
|
|
145
|
+
}
|
|
146
|
+
&-lr {
|
|
147
|
+
text-align: justify;
|
|
148
|
+
text-justify: inter-word;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* 弹性盒模型 */
|
|
153
|
+
.flex {
|
|
154
|
+
&-box {
|
|
155
|
+
display: flex;
|
|
156
|
+
}
|
|
157
|
+
&-column {
|
|
158
|
+
display: flex;
|
|
159
|
+
flex-direction: column;
|
|
160
|
+
}
|
|
161
|
+
> * {
|
|
162
|
+
flex: none;
|
|
163
|
+
}
|
|
164
|
+
&-v {
|
|
165
|
+
align-items: center;
|
|
166
|
+
}
|
|
167
|
+
&-l {
|
|
168
|
+
justify-content: flex-start;
|
|
169
|
+
}
|
|
170
|
+
&-r {
|
|
171
|
+
justify-content: flex-start;
|
|
172
|
+
}
|
|
173
|
+
&-c {
|
|
174
|
+
justify-content: center;
|
|
175
|
+
}
|
|
176
|
+
&-lr {
|
|
177
|
+
justify-content: space-between;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.flex-item {
|
|
182
|
+
flex: auto;
|
|
183
|
+
}
|
|
184
|
+
@for $n from 0 to 10 {
|
|
185
|
+
.flex-#{$n} {
|
|
186
|
+
flex: $n $n auto;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* 旋转图标90度 */
|
|
191
|
+
.rotate90 {
|
|
192
|
+
display: inline-block;
|
|
193
|
+
transform: rotate(90deg);
|
|
194
|
+
cursor: pointer;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* 清除背景色 */
|
|
198
|
+
.bg {
|
|
199
|
+
&-none {
|
|
200
|
+
background: none !important;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* 边框 */
|
|
205
|
+
.bd {
|
|
206
|
+
&-none {
|
|
207
|
+
border: none !important;
|
|
208
|
+
}
|
|
209
|
+
&-a {
|
|
210
|
+
border: 1px solid $--border-color-base;
|
|
211
|
+
}
|
|
212
|
+
&-t {
|
|
213
|
+
border-top: 1px solid $--border-color-base;
|
|
214
|
+
}
|
|
215
|
+
&-l {
|
|
216
|
+
border-left: 1px solid $--border-color-base;
|
|
217
|
+
}
|
|
218
|
+
&-r {
|
|
219
|
+
border-right: 1px solid $--border-color-base;
|
|
220
|
+
}
|
|
221
|
+
&-b {
|
|
222
|
+
border-bottom: 1px solid $--border-color-base;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* 设置弹窗内容区内边距 */
|
|
227
|
+
.el-dialog__wrapper {
|
|
228
|
+
&.p-a-0 {
|
|
229
|
+
.el-dialog__body {
|
|
230
|
+
padding: 0;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
&.p-t-0 {
|
|
234
|
+
.el-dialog__body {
|
|
235
|
+
padding-top: 0;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
&.p-b-0 {
|
|
239
|
+
.el-dialog__body {
|
|
240
|
+
padding-bottom: 0;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@import './element-variables.scss';
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
// Color
|
|
5
|
+
--color-primary: #{$--color-primary};
|
|
6
|
+
--color-white: #{$--color-white};
|
|
7
|
+
--color-black: #{$--color-black};
|
|
8
|
+
--color-primary-light-1: #{$--color-primary-light-1};
|
|
9
|
+
--color-primary-light-2: #{$--color-primary-light-2};
|
|
10
|
+
--color-primary-light-3: #{$--color-primary-light-3};
|
|
11
|
+
--color-primary-light-4: #{$--color-primary-light-4};
|
|
12
|
+
--color-primary-light-5: #{$--color-primary-light-5};
|
|
13
|
+
--color-primary-light-6: #{$--color-primary-light-6};
|
|
14
|
+
--color-primary-light-7: #{$--color-primary-light-7};
|
|
15
|
+
--color-primary-light-8: #{$--color-primary-light-8};
|
|
16
|
+
--color-primary-light-9: #{$--color-primary-light-9};
|
|
17
|
+
--color-success: #{$--color-success};
|
|
18
|
+
--color-warning: #{$--color-warning};
|
|
19
|
+
--color-danger: #{$--color-danger};
|
|
20
|
+
--color-info: #{$--color-info};
|
|
21
|
+
--color-success-light: #{$--color-success-light};
|
|
22
|
+
--color-warning-light: #{$--color-warning-light};
|
|
23
|
+
--color-danger-light: #{$--color-danger-light};
|
|
24
|
+
--color-info-light: #{$--color-info-light};
|
|
25
|
+
--color-success-lighter: #{$--color-success-lighter};
|
|
26
|
+
--color-warning-lighter: #{$--color-warning-lighter};
|
|
27
|
+
--color-danger-lighter: #{$--color-danger-lighter};
|
|
28
|
+
--color-info-lighter: #{$--color-info-lighter};
|
|
29
|
+
// Text
|
|
30
|
+
--color-text-primary: #{$--color-text-primary};
|
|
31
|
+
--color-text-regular: #{$--color-text-regular};
|
|
32
|
+
--color-text-secondary: #{$--color-text-secondary};
|
|
33
|
+
--color-text-placeholder: #{$--color-text-placeholder};
|
|
34
|
+
// Border
|
|
35
|
+
--border-color-base: #{$--border-color-base};
|
|
36
|
+
--border-color-light: #{$--border-color-light};
|
|
37
|
+
--border-color-lighter: #{$--border-color-lighter};
|
|
38
|
+
--border-color-extra-light: #{$--border-color-extra-light};
|
|
39
|
+
// Background
|
|
40
|
+
--background-color-base: #{$--background-color-base};
|
|
41
|
+
// Link
|
|
42
|
+
--link-color: #{$--link-color};
|
|
43
|
+
--link-hover-color: #{$--link-hover-color};
|
|
44
|
+
// fontSize
|
|
45
|
+
--font-size-extra-large: #{$--font-size-extra-large};
|
|
46
|
+
--font-size-large: #{$--font-size-large};
|
|
47
|
+
--font-size-medium: #{$--font-size-medium};
|
|
48
|
+
--font-size-base: #{$--font-size-base};
|
|
49
|
+
--font-size-small: #{$--font-size-small};
|
|
50
|
+
--font-size-extra-small: #{$--font-size-extra-small};
|
|
51
|
+
// fontWeight
|
|
52
|
+
--font-weight-primary: #{$--font-weight-primary};
|
|
53
|
+
--font-weight-secondary: #{$--font-weight-secondary};
|
|
54
|
+
// fontLineHeight
|
|
55
|
+
--font-line-height-primary: #{$--font-line-height-primary};
|
|
56
|
+
--font-line-height-secondary: #{$--font-line-height-secondary};
|
|
57
|
+
--font-color-disabled-base: #{$--font-color-disabled-base};
|
|
58
|
+
// Size
|
|
59
|
+
--size-base: #{$--size-base};
|
|
60
|
+
--font-weight-primary: #{$--font-weight-primary};
|
|
61
|
+
// Icon
|
|
62
|
+
--font-weight-primary: #{$--font-weight-primary};
|
|
63
|
+
--font-weight-primary: #{$--font-weight-primary};
|
|
64
|
+
// Radius
|
|
65
|
+
--border-radius-base: #{$--border-radius-base};
|
|
66
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* 引入不被打包的配置文件 */
|
|
2
|
+
import stripJsonc from 'strip-json-comments'
|
|
3
|
+
/* 前缀,针对乾坤做了处理 */
|
|
4
|
+
const prefix = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || process.env.BASE_URL || '/'
|
|
5
|
+
/* 前端(内存)缓存 */
|
|
6
|
+
const jsoncs = {}
|
|
7
|
+
|
|
8
|
+
export default function getJsonc(url, sync) {
|
|
9
|
+
const _url = /^\/[^/]/.test(url) ? prefix + url.replace(/^\//, '') : url
|
|
10
|
+
if (sync) {
|
|
11
|
+
if (jsoncs[url + '?sync']) {
|
|
12
|
+
return jsoncs[url + '?sync']
|
|
13
|
+
} else {
|
|
14
|
+
const oAjax = new XMLHttpRequest()
|
|
15
|
+
oAjax.open('GET', _url, false)
|
|
16
|
+
oAjax.send()
|
|
17
|
+
if (oAjax.readyState === 4 && oAjax.status === 200) {
|
|
18
|
+
try {
|
|
19
|
+
const _data = JSON.parse(stripJsonc(oAjax.responseText))
|
|
20
|
+
jsoncs[url + '?sync'] = _data
|
|
21
|
+
jsoncs[url] = Promise.resolve(_data)
|
|
22
|
+
} catch (error) {
|
|
23
|
+
throw { error: url + ' illegal file', content: oAjax.responseText }
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return jsoncs[url + '?sync']
|
|
27
|
+
}
|
|
28
|
+
} else {
|
|
29
|
+
if (jsoncs[url]) {
|
|
30
|
+
return jsoncs[url]
|
|
31
|
+
} else {
|
|
32
|
+
const oAjax = new XMLHttpRequest()
|
|
33
|
+
oAjax.open('GET', _url, true)
|
|
34
|
+
oAjax.send()
|
|
35
|
+
jsoncs[url] = new Promise((resolve, reject) => {
|
|
36
|
+
oAjax.onreadystatechange = () => {
|
|
37
|
+
if (oAjax.readyState === 4 && oAjax.status === 200) {
|
|
38
|
+
try {
|
|
39
|
+
const _data = JSON.parse(stripJsonc(oAjax.responseText))
|
|
40
|
+
jsoncs[url + '?sync'] = _data
|
|
41
|
+
resolve(_data)
|
|
42
|
+
} catch (error) {
|
|
43
|
+
throw { error: url + ' illegal file', content: oAjax.responseText }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
return jsoncs[url]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export default class MessagePro {
|
|
2
|
+
constructor(appName) {
|
|
3
|
+
this.appName = appName
|
|
4
|
+
this.messageFns = []
|
|
5
|
+
|
|
6
|
+
window.addEventListener(
|
|
7
|
+
'message',
|
|
8
|
+
(ev) => {
|
|
9
|
+
if (ev.origin !== window.origin) return
|
|
10
|
+
const { targetName, originName } = ev.data
|
|
11
|
+
if (targetName === this.appName || (targetName === '*' && originName !== this.appName)) {
|
|
12
|
+
this.messageFns.forEach((fn) => fn(ev))
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
false
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
on(fn) {
|
|
19
|
+
if (fn) {
|
|
20
|
+
let _i = this.messageFns.indexOf(fn)
|
|
21
|
+
_i === -1 && this.messageFns.push(fn)
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
off(fn) {
|
|
25
|
+
if (fn) {
|
|
26
|
+
let _i = this.messageFns.indexOf(fn)
|
|
27
|
+
_i !== -1 && this.messageFns.splice(_i, 1)
|
|
28
|
+
} else {
|
|
29
|
+
this.messageFns = []
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
emit(data, targetOrigin, targetName) {
|
|
33
|
+
let target = targetOrigin || window.origin
|
|
34
|
+
let _data = Object.assign({}, data, { targetName, originName: this.appName })
|
|
35
|
+
window.postMessage(_data, target)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* author: zhengwei
|
|
3
|
+
* time: 2021-9-2
|
|
4
|
+
*/
|
|
5
|
+
<template>
|
|
6
|
+
<el-card v-if="isClose" class="cl-approve-card">
|
|
7
|
+
<div slot="header">
|
|
8
|
+
<span>审批记录</span>
|
|
9
|
+
<i
|
|
10
|
+
v-if="close"
|
|
11
|
+
class="el-icon-close"
|
|
12
|
+
style="float: right; padding: 3px 0"
|
|
13
|
+
@click="isClose = !isClose"
|
|
14
|
+
></i>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="cl-approve-list">
|
|
17
|
+
<div
|
|
18
|
+
v-for="(item, index) in approvalData"
|
|
19
|
+
:key="index"
|
|
20
|
+
class="cl-approve-item"
|
|
21
|
+
>
|
|
22
|
+
<div class="cl-approve-item-exist">
|
|
23
|
+
<div class="cl-approve-item-time">{{ item.endTime }}</div>
|
|
24
|
+
<div
|
|
25
|
+
class="cl-approve-item-origin"
|
|
26
|
+
:class="{
|
|
27
|
+
'cl-approve-origin-bgc': item.result === 1,
|
|
28
|
+
'cl-approve-origin-bgc-no': item.result === 2
|
|
29
|
+
}"
|
|
30
|
+
></div>
|
|
31
|
+
<span class="cl-approve-icon cl-icon-user"></span>
|
|
32
|
+
<span v-if="typeof item.assignee === 'string'">{{
|
|
33
|
+
item.assignee
|
|
34
|
+
}}</span>
|
|
35
|
+
<span v-else @click="isShow = !isShow">
|
|
36
|
+
<span v-if="isShow">{{ item.assignee[0] + '...' }}</span>
|
|
37
|
+
<span v-else>
|
|
38
|
+
<span v-for="(val, index) in item.assignee" :key="index">
|
|
39
|
+
<span style="margin: 5px 0">{{ val }}</span>
|
|
40
|
+
</span>
|
|
41
|
+
</span>
|
|
42
|
+
</span>
|
|
43
|
+
<span
|
|
44
|
+
v-if="item.optResult"
|
|
45
|
+
class="cl-approve-node box-nav"
|
|
46
|
+
:class="{ 'cl-approve-origin-color-no': item.result === 2 }"
|
|
47
|
+
>{{ item.optResult }}</span
|
|
48
|
+
>
|
|
49
|
+
<span v-if="item.suggestion" class="cl-approve-node"
|
|
50
|
+
>审批意见:{{ item.suggestion }}</span
|
|
51
|
+
>
|
|
52
|
+
</div>
|
|
53
|
+
<div
|
|
54
|
+
v-if="approvalData.length !== index + 1"
|
|
55
|
+
class="cl-approve-connect"
|
|
56
|
+
:style="item.endTime ? 'background:#1677FF' : ''"
|
|
57
|
+
></div>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</el-card>
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
<script>
|
|
64
|
+
export default {
|
|
65
|
+
name: 'ApproveCard',
|
|
66
|
+
props: {
|
|
67
|
+
approvalData: {
|
|
68
|
+
type: Array,
|
|
69
|
+
default: () => []
|
|
70
|
+
},
|
|
71
|
+
close: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: true
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
data() {
|
|
77
|
+
return {
|
|
78
|
+
isShow: true,
|
|
79
|
+
isClose: true
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
</script>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-date-picker
|
|
3
|
+
ref="date-picker"
|
|
4
|
+
:class="{ 'has-value': value }"
|
|
5
|
+
v-bind="$attrs"
|
|
6
|
+
:value="value"
|
|
7
|
+
xxxx
|
|
8
|
+
v-on="$listeners"
|
|
9
|
+
/>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
export default {
|
|
14
|
+
name: 'DatePicker',
|
|
15
|
+
props: {
|
|
16
|
+
// eslint-disable-next-line vue/require-prop-types
|
|
17
|
+
value: {
|
|
18
|
+
default: undefined
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
:title="title"
|
|
4
|
+
:visible.sync="dialogVisible"
|
|
5
|
+
:width="width"
|
|
6
|
+
:modal="modal"
|
|
7
|
+
:top="top"
|
|
8
|
+
:fullscreen="fullscreen"
|
|
9
|
+
:modal-append-to-body="modalAppendToBody"
|
|
10
|
+
:append-to-body="appendToBody"
|
|
11
|
+
:lock-scroll="lockScroll"
|
|
12
|
+
:close-on-click-modal="closeOnClickModal"
|
|
13
|
+
:close-on-press-escape="closeOnPressEscape"
|
|
14
|
+
:before-close="beforeClose"
|
|
15
|
+
:custom-class="customClass"
|
|
16
|
+
:show-close="showClose"
|
|
17
|
+
:center="center"
|
|
18
|
+
:destroy-on-close="destroyOnClose"
|
|
19
|
+
@open="open"
|
|
20
|
+
@opened="opened"
|
|
21
|
+
@close="close"
|
|
22
|
+
@closed="closed"
|
|
23
|
+
>
|
|
24
|
+
<slot></slot>
|
|
25
|
+
<span slot="footer" class="dialog-footer">
|
|
26
|
+
<slot name="footerBtn"></slot>
|
|
27
|
+
</span>
|
|
28
|
+
</el-dialog>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
export default {
|
|
33
|
+
name: 'Dialog',
|
|
34
|
+
props: {
|
|
35
|
+
title: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: ''
|
|
38
|
+
},
|
|
39
|
+
width: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: '30%'
|
|
42
|
+
},
|
|
43
|
+
top: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: '15vh'
|
|
46
|
+
},
|
|
47
|
+
fullscreen: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false
|
|
50
|
+
},
|
|
51
|
+
dialogVisible: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: false
|
|
54
|
+
},
|
|
55
|
+
appendToBody: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: false
|
|
58
|
+
},
|
|
59
|
+
modalAppendToBody: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: true
|
|
62
|
+
},
|
|
63
|
+
lockScroll: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: true
|
|
66
|
+
},
|
|
67
|
+
modal: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: true
|
|
70
|
+
},
|
|
71
|
+
closeOnClickModal: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: false
|
|
74
|
+
},
|
|
75
|
+
beforeClose: {
|
|
76
|
+
type: Function,
|
|
77
|
+
default: () => {}
|
|
78
|
+
},
|
|
79
|
+
customClass: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: ''
|
|
82
|
+
},
|
|
83
|
+
closeOnPressEscape: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: true
|
|
86
|
+
},
|
|
87
|
+
showClose: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: true
|
|
90
|
+
},
|
|
91
|
+
center: {
|
|
92
|
+
type: Boolean,
|
|
93
|
+
default: false
|
|
94
|
+
},
|
|
95
|
+
destroyOnClose: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
default: false
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
methods: {
|
|
101
|
+
open() {
|
|
102
|
+
this.$emit('open')
|
|
103
|
+
},
|
|
104
|
+
opened() {
|
|
105
|
+
this.$emit('opened')
|
|
106
|
+
},
|
|
107
|
+
close() {
|
|
108
|
+
this.$emit('close')
|
|
109
|
+
},
|
|
110
|
+
closed() {
|
|
111
|
+
this.$emit('closed')
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
</script>
|