eoss-ui 0.4.57 → 0.4.59
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 +929 -0
- package/lib/button-group.js +19 -5
- package/lib/button.js +19 -5
- package/lib/checkbox-group.js +19 -5
- package/lib/clients.js +95 -4
- package/lib/data-table-form.js +19 -5
- package/lib/data-table.js +24 -11
- package/lib/date-picker.js +19 -5
- package/lib/dialog.js +19 -5
- package/lib/eoss-ui.common.js +1361 -1074
- package/lib/flow-group.js +928 -860
- package/lib/flow-list.js +19 -5
- package/lib/flow.js +32 -16
- package/lib/form.js +19 -5
- package/lib/handle-user.js +19 -5
- package/lib/handler.js +38 -15
- package/lib/index.js +1 -1
- package/lib/input-number.js +19 -5
- package/lib/input.js +31 -10
- package/lib/login.js +102 -33
- package/lib/main.js +71 -36
- package/lib/mainComp.js +19 -5
- package/lib/nav.js +19 -5
- package/lib/page.js +19 -5
- package/lib/player.js +19 -5
- package/lib/qr-code.js +19 -5
- package/lib/radio-group.js +19 -5
- package/lib/retrial-auth.js +24 -9
- package/lib/select-ganged.js +19 -5
- package/lib/select.js +19 -5
- package/lib/selector-panel.js +19 -5
- package/lib/selector.js +19 -5
- package/lib/sizer.js +19 -5
- package/lib/steps.js +19 -5
- package/lib/switch.js +19 -5
- package/lib/table-form.js +26 -11
- package/lib/tabs.js +19 -5
- package/lib/theme-chalk/clients.css +1 -1
- package/lib/theme-chalk/flow-group.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/theme-chalk/login.css +1 -1
- package/lib/theme-chalk/upload.css +1 -1
- package/lib/tips.js +19 -5
- package/lib/toolbar.js +0 -1
- package/lib/tree-group.js +19 -5
- package/lib/tree.js +19 -5
- package/lib/upload.js +110 -62
- package/lib/utils/util.js +19 -5
- package/lib/wujie.js +19 -5
- package/lib/wxlogin.js +19 -5
- package/package.json +2 -2
- package/packages/clients/src/main.vue +60 -2
- package/packages/data-table/src/main.vue +0 -1
- package/packages/flow/src/main.vue +1 -0
- package/packages/flow/src/startTaskRead.vue +2 -2
- package/packages/flow-group/src/main.vue +284 -265
- package/packages/form/src/table.vue +3 -2
- package/packages/handler/src/main.vue +20 -10
- package/packages/input/src/main.vue +7 -2
- package/packages/login/src/main.vue +77 -27
- package/packages/main/src/main.vue +28 -16
- package/packages/main/src/userinfo.vue +20 -9
- package/packages/retrial-auth/src/main.vue +3 -2
- package/packages/theme-chalk/lib/clients.css +1 -1
- package/packages/theme-chalk/lib/flow-group.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/lib/login.css +1 -1
- package/packages/theme-chalk/lib/upload.css +1 -1
- package/packages/theme-chalk/src/clients.scss +8 -0
- package/packages/theme-chalk/src/flow-group.scss +9 -3
- package/packages/theme-chalk/src/login.scss +3 -0
- package/packages/theme-chalk/src/upload.scss +50 -26
- package/packages/toolbar/src/main.vue +0 -1
- package/packages/upload/src/main.vue +56 -37
- package/src/index.js +1 -1
- package/src/utils/util.js +21 -10
|
@@ -11,11 +11,12 @@
|
|
|
11
11
|
:show-file-list="showList"
|
|
12
12
|
:file-list="lists"
|
|
13
13
|
:result-file="resultFile"
|
|
14
|
-
:disabled="isDisabled"
|
|
14
|
+
:disabled="isDisabled || isReadonly"
|
|
15
|
+
:readonly="isReadonly"
|
|
15
16
|
:class="[
|
|
16
17
|
{
|
|
17
18
|
'es-avatar-uploader': portrait,
|
|
18
|
-
'es-upload-readonly':
|
|
19
|
+
'es-upload-readonly': isReadonly
|
|
19
20
|
},
|
|
20
21
|
'es-upload-' + listType
|
|
21
22
|
]"
|
|
@@ -76,14 +77,15 @@
|
|
|
76
77
|
<i
|
|
77
78
|
v-else
|
|
78
79
|
class="avatar-uploader-icon"
|
|
79
|
-
:class="{ 'el-icon-plus': !isDisabled }"
|
|
80
|
+
:class="{ 'el-icon-plus': !isReadonly, 'is-disabled': isDisabled }"
|
|
80
81
|
:style="{ width: width, height: height, lineHeight: height }"
|
|
81
82
|
></i>
|
|
82
83
|
</template>
|
|
83
84
|
<template v-else>
|
|
84
|
-
<template v-if="!
|
|
85
|
+
<template v-if="!isReadonly">
|
|
85
86
|
<i
|
|
86
87
|
class="el-icon-plus es-uploader-icon"
|
|
88
|
+
:class="{ 'is-disabled': isDisabled }"
|
|
87
89
|
v-if="selectType === 'icon-plus'"
|
|
88
90
|
></i>
|
|
89
91
|
<el-button
|
|
@@ -92,6 +94,7 @@
|
|
|
92
94
|
:class="icon"
|
|
93
95
|
:type="selectType"
|
|
94
96
|
:size="btnSize"
|
|
97
|
+
:disabled="isDisabled"
|
|
95
98
|
>{{
|
|
96
99
|
text ? text : autoUpload ? '点击上传' : '选择文件'
|
|
97
100
|
}}</el-button
|
|
@@ -101,6 +104,7 @@
|
|
|
101
104
|
v-if="!autoUpload"
|
|
102
105
|
:type="uploadType"
|
|
103
106
|
:size="btnSize"
|
|
107
|
+
:disabled="isDisabled"
|
|
104
108
|
@click.stop="handleUpload"
|
|
105
109
|
>
|
|
106
110
|
上传文件
|
|
@@ -142,8 +146,15 @@
|
|
|
142
146
|
<div v-if="tips" class="el-upload__tip">{{ tips }}</div>
|
|
143
147
|
</slot>
|
|
144
148
|
</template>
|
|
145
|
-
|
|
146
|
-
|
|
149
|
+
<el-image-viewer
|
|
150
|
+
slot="dialog"
|
|
151
|
+
v-if="previewScale && showImg"
|
|
152
|
+
:z-index="9999"
|
|
153
|
+
:initial-index="0"
|
|
154
|
+
:url-list="[imgUrl]"
|
|
155
|
+
:on-close="closeViewer"
|
|
156
|
+
></el-image-viewer>
|
|
157
|
+
<es-dialog v-else :title="title" :visible.sync="showImg" slot="dialog">
|
|
147
158
|
<div
|
|
148
159
|
v-loading="imgChange"
|
|
149
160
|
element-loading-background="rgba(0, 0, 0, 0.8)"
|
|
@@ -393,6 +404,10 @@ export default {
|
|
|
393
404
|
default() {
|
|
394
405
|
return {};
|
|
395
406
|
}
|
|
407
|
+
},
|
|
408
|
+
previewScale: {
|
|
409
|
+
type: Boolean,
|
|
410
|
+
default: true
|
|
396
411
|
}
|
|
397
412
|
},
|
|
398
413
|
data() {
|
|
@@ -500,11 +515,10 @@ export default {
|
|
|
500
515
|
return false;
|
|
501
516
|
},
|
|
502
517
|
isDisabled() {
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
}
|
|
518
|
+
return this.disabled || (this.elForm || {}).disabled;
|
|
519
|
+
},
|
|
520
|
+
isReadonly() {
|
|
521
|
+
return this.readonly || (this.elForm || {}).readonly;
|
|
508
522
|
},
|
|
509
523
|
isRemove() {
|
|
510
524
|
if (this.remove || this.deleted) {
|
|
@@ -513,7 +527,7 @@ export default {
|
|
|
513
527
|
return false;
|
|
514
528
|
},
|
|
515
529
|
isSort() {
|
|
516
|
-
return this.dragSort && !this.isDisabled;
|
|
530
|
+
return this.dragSort && !this.isDisabled && this.isReadonly;
|
|
517
531
|
},
|
|
518
532
|
datas() {
|
|
519
533
|
if (this.data) {
|
|
@@ -806,11 +820,12 @@ export default {
|
|
|
806
820
|
suffix.includes('gif') ||
|
|
807
821
|
suffix.includes('png')
|
|
808
822
|
) {
|
|
809
|
-
this.imgUrl =
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
823
|
+
this.imgUrl = res.url
|
|
824
|
+
? res.url
|
|
825
|
+
: this.host +
|
|
826
|
+
(url ? url : this.previewAdjunct) +
|
|
827
|
+
'?adjunctId=' +
|
|
828
|
+
file.adjunctId;
|
|
814
829
|
this.title = file.originalName;
|
|
815
830
|
this.showImg = true;
|
|
816
831
|
this.$nextTick(() => {
|
|
@@ -840,32 +855,36 @@ export default {
|
|
|
840
855
|
}
|
|
841
856
|
}
|
|
842
857
|
},
|
|
858
|
+
closeViewer() {
|
|
859
|
+
this.showImg = false;
|
|
860
|
+
},
|
|
843
861
|
loadImage() {
|
|
844
|
-
this.$refs.showImg
|
|
845
|
-
this.
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
+
this.$refs.showImg &&
|
|
863
|
+
(this.$refs.showImg.onload = () => {
|
|
864
|
+
this.imgChange = false;
|
|
865
|
+
let w = this.$refs.showImg.naturalWidth;
|
|
866
|
+
let h = this.$refs.showImg.naturalHeight;
|
|
867
|
+
let pw = this.$refs.showImg.parentNode.offsetWidth;
|
|
868
|
+
let ph = this.$refs.showImg.parentNode.offsetHeight;
|
|
869
|
+
if (w / h > pw / ph) {
|
|
870
|
+
this.styles = { 'max-width': '100%' };
|
|
871
|
+
} else {
|
|
872
|
+
this.styles = { 'max-height': '100%' };
|
|
873
|
+
}
|
|
874
|
+
if (w < pw) {
|
|
875
|
+
this.styles.width = w + 'px';
|
|
876
|
+
}
|
|
877
|
+
if (h < ph) {
|
|
878
|
+
this.styles.height = h + 'px';
|
|
879
|
+
}
|
|
880
|
+
});
|
|
862
881
|
},
|
|
863
882
|
isLt(file) {
|
|
864
883
|
let flag = false;
|
|
865
884
|
let flieArr = file.name.split('.');
|
|
866
|
-
let suffix = '.' + flieArr[flieArr.length - 1];
|
|
885
|
+
let suffix = '.' + flieArr[flieArr.length - 1].toLowerCase();
|
|
867
886
|
if (this.accepts) {
|
|
868
|
-
let accepts = this.accepts.split(',');
|
|
887
|
+
let accepts = this.accepts.toLowerCase().split(',');
|
|
869
888
|
flag = accepts.includes(suffix);
|
|
870
889
|
if (!flag) {
|
|
871
890
|
this.$message.error(`文件类型错误,请上传${this.accepts}类型文件!`);
|
package/src/index.js
CHANGED
package/src/utils/util.js
CHANGED
|
@@ -201,26 +201,36 @@ const ajax = function ({
|
|
|
201
201
|
.then(() => {
|
|
202
202
|
const loginPage = getStorage('login') || getStorage('loginPage');
|
|
203
203
|
if (loginPage) {
|
|
204
|
-
|
|
205
|
-
|
|
204
|
+
let src;
|
|
205
|
+
if (!startWith(loginPage, ['http', '/'])) {
|
|
206
|
+
let pathname = win.top.location.pathname;
|
|
207
|
+
if (pathname !== '/') {
|
|
208
|
+
pathname = pathname.split('/');
|
|
209
|
+
pathname.splice(pathname.length - 1);
|
|
210
|
+
pathname = pathname.join('/');
|
|
211
|
+
}
|
|
212
|
+
src = pathname + loginPage.replace('./', '');
|
|
213
|
+
} else {
|
|
214
|
+
src = loginPage;
|
|
215
|
+
}
|
|
216
|
+
win.top.location.href = src;
|
|
217
|
+
} else if (
|
|
218
|
+
win.top.location.href.indexOf('main.html') > -1
|
|
219
|
+
) {
|
|
206
220
|
win.top.location.href = './login.html';
|
|
207
221
|
} else {
|
|
208
222
|
const hash = win.top.location.hash;
|
|
209
|
-
if (
|
|
210
|
-
hash ||
|
|
211
|
-
(win.top.location.indexOf('model=') &&
|
|
212
|
-
win.top.location.indexOf('view=') &&
|
|
213
|
-
win.top.location.indexOf('render.html'))
|
|
214
|
-
) {
|
|
223
|
+
if (hash) {
|
|
215
224
|
const len = win.top.location.href.indexOf(hash);
|
|
216
|
-
|
|
217
|
-
|
|
225
|
+
win.top.location.href =
|
|
226
|
+
win.location.href.slice(0, len) + '#/login';
|
|
218
227
|
} else {
|
|
219
228
|
win.top.location.href = '/login.html';
|
|
220
229
|
}
|
|
221
230
|
}
|
|
222
231
|
})
|
|
223
232
|
.catch(e => {
|
|
233
|
+
sessionStorage.removeItem('remind');
|
|
224
234
|
});
|
|
225
235
|
}, 1000));
|
|
226
236
|
}
|
|
@@ -239,6 +249,7 @@ const ajax = function ({
|
|
|
239
249
|
return h('es-retrial-auth', {
|
|
240
250
|
ref: 'auth',
|
|
241
251
|
props: {
|
|
252
|
+
reload: response.data.results.reload || response.data.results.refresh,
|
|
242
253
|
group: response.data.results.retrialAuthGroupIds,
|
|
243
254
|
type: response.data.results.retrialAuthType,
|
|
244
255
|
msgBox: msgBox
|