eoss-ui 0.5.67 → 0.5.68

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.
@@ -2,11 +2,9 @@
2
2
  <div
3
3
  v-if="!code"
4
4
  class="es-login-screen"
5
- :style="{
6
- 'background-image': getImgUrl(loginBackgroundUrl)
7
- }"
5
+ :style="getBackground(loginBackgroundImg)"
8
6
  >
9
- <img v-if="loginLogoUrl" class="es-login-logo" :src="loginLogoUrl" />
7
+ <img v-if="loginLogoImg" class="es-login-logo" :src="loginLogoImg" />
10
8
  <slot></slot>
11
9
  <div
12
10
  class="es-login"
@@ -17,15 +15,10 @@
17
15
  :class="{ 'es-simple': mode == 'simple' }"
18
16
  :style="transform"
19
17
  >
20
- <img v-if="loginNameUrl" class="es-login-name" :src="loginNameUrl" />
21
- <div
22
- class="es-login-main"
23
- :style="{
24
- 'background-image': getImgUrl(loginImageUrl)
25
- }"
26
- >
27
- <div v-if="loginTitleUrl" class="es-login-title-image">
28
- <img class="es-login-title-img" :src="loginTitleUrl" />
18
+ <img v-if="loginNameImg" class="es-login-name" :src="loginNameImg" />
19
+ <div class="es-login-main" :style="getBackground(loginMainImg)">
20
+ <div v-if="loginTitleImg" class="es-login-title-image">
21
+ <img class="es-login-title-img" :src="loginTitleImg" />
29
22
  </div>
30
23
  <div
31
24
  v-if="switchs > 1"
@@ -50,7 +43,7 @@
50
43
  <div class="es-login-form-box">
51
44
  <template v-if="isShow(active) && (active == 0 || active == 12)">
52
45
  <el-form ref="login" class="es-login-form" :model="formData">
53
- <div class="es-login-title" v-if="!loginTitleUrl">
46
+ <div class="es-login-title" v-if="!loginTitleImg">
54
47
  <span class="es-login-title-content">{{ title }}</span>
55
48
  </div>
56
49
  <el-form-item
@@ -158,7 +151,7 @@
158
151
  v-if="isShow(active) && (active == 3 || active == 7 || active == 9)"
159
152
  >
160
153
  <div class="es-login-qrcode">
161
- <div class="es-login-title" v-if="!loginTitleUrl">
154
+ <div class="es-login-title" v-if="!loginTitleImg">
162
155
  <div class="es-login-title-content">
163
156
  {{ iconfonts[active].name }}
164
157
  </div>
@@ -206,7 +199,7 @@
206
199
  class="es-login-form es-login-verify"
207
200
  :model="formData"
208
201
  >
209
- <div class="es-login-title" v-if="!loginTitleUrl">
202
+ <div class="es-login-title" v-if="!loginTitleImg">
210
203
  <span class="es-login-title-content">{{
211
204
  iconfonts[active].name
212
205
  }}</span>
@@ -387,8 +380,8 @@ export default {
387
380
  return {};
388
381
  }
389
382
  },
390
- loginBackground: [String, Array],
391
- loginImage: [String, Array],
383
+ loginBackground: [String, Array, Object],
384
+ loginImage: [String, Array, Object],
392
385
  loginLogo: String,
393
386
  loginTitle: String,
394
387
  loginName: String,
@@ -602,23 +595,6 @@ export default {
602
595
  return window.location.href || window.href;
603
596
  }
604
597
  },
605
- loginBackgroundUrl() {
606
- return this.loginBackground
607
- ? this.loginBackground
608
- : this.loginBackgroundImg;
609
- },
610
- loginImageUrl() {
611
- return this.loginImage ? this.loginImage : this.loginMainImg;
612
- },
613
- loginNameUrl() {
614
- return this.loginNameImg ? this.loginNameImg : this.loginName;
615
- },
616
- loginTitleUrl() {
617
- return this.loginTitleImg ? this.loginTitleImg : this.loginTitle;
618
- },
619
- loginLogoUrl() {
620
- return this.loginLogoImg ? this.loginLogoImg : this.loginLogo;
621
- },
622
598
  warnInfo() {
623
599
  return this.warning === false
624
600
  ? false
@@ -736,11 +712,11 @@ export default {
736
712
  data() {
737
713
  return {
738
714
  align: this.position,
739
- loginBackgroundImg: null,
740
- loginMainImg: null,
741
- loginNameImg: null,
742
- loginTitleImg: null,
743
- loginLogoImg: null,
715
+ loginBackgroundImg: this.loginBackground,
716
+ loginMainImg: this.loginImage,
717
+ loginNameImg: this.loginName,
718
+ loginTitleImg: this.loginTitle,
719
+ loginLogoImg: this.loginLogo,
744
720
  loginModel: this.type,
745
721
  passModifyModel: null,
746
722
  active: 0,
@@ -844,21 +820,36 @@ export default {
844
820
  }
845
821
  });
846
822
  },
847
- getImgUrl(urls) {
848
- let url = '';
849
- if (!urls || !urls.length) {
850
- return url;
823
+ getBackground(res) {
824
+ let style = {};
825
+ if (!res || (Array.isArray(res) && !res.length)) {
826
+ return style;
851
827
  }
852
- if (Array.isArray(urls)) {
853
- url = urls
854
- .map((item) => {
855
- return `url(${item})`;
856
- })
857
- .join(',');
828
+ if (Array.isArray(res)) {
829
+ let url = [];
830
+ let image = [];
831
+ res.forEach((item) => {
832
+ if (item.indexOf('url(') > -1) {
833
+ url.push(item);
834
+ } else {
835
+ image.push(`url(${item})`);
836
+ }
837
+ });
838
+ if (url.length == res.length) {
839
+ style = { background: url.join(',') };
840
+ } else if (image.length == res.length) {
841
+ style = { 'background-image': image.join(',') };
842
+ } else {
843
+ console.error('设置的样式不一致!');
844
+ }
845
+ } else if (util.isObject(res)) {
846
+ style = res;
847
+ } else if (res.indexOf('url(') > -1) {
848
+ style = { background: res };
858
849
  } else {
859
- url = `url(${urls})`;
850
+ style = { 'background-image': `url(${res})` };
860
851
  }
861
- return url;
852
+ return style;
862
853
  },
863
854
  getRemember(user) {
864
855
  let values = localStorage.getItem('unpd');
@@ -1023,10 +1014,12 @@ export default {
1023
1014
  if (res.loginModel) {
1024
1015
  this.loginModel = res.loginModel;
1025
1016
  }
1026
- this.loginBackgroundImg = res.loginBackgroundUrl
1027
- ? res.loginBackgroundUrl.split(',')
1028
- : null;
1029
- this.loginLogoImg = res.loginLogoUrl ? res.loginLogoUrl : null;
1017
+ if (res.loginBackgroundUrl) {
1018
+ this.loginBackgroundImg = res.loginBackgroundUrl.split(',');
1019
+ }
1020
+ if (res.loginLogoUrl) {
1021
+ this.loginLogoImg = res.loginLogoUrl;
1022
+ }
1030
1023
  res.loginPage && sessionStorage.setItem('loginPage', res.loginPage);
1031
1024
  if (res.subsystemExtend && Object.keys(res.subsystemExtend).length) {
1032
1025
  this.icpInfo = res.subsystemExtend;
@@ -1,11 +1,12 @@
1
1
  <template>
2
2
  <div
3
+ v-if="isRender"
3
4
  class="es-selector"
4
5
  ref="esSelector"
5
6
  :class="{ 'es-pointer': !readonly && !filterable }"
6
7
  v-clickoutside="handleClose"
7
8
  >
8
- <el-button v-if="button" v-bind="button" @click.stop="openDialog"
9
+ <el-button v-if="button" v-bind="button" @click="openDialog"
9
10
  ><slot>选择</slot></el-button
10
11
  >
11
12
  <template v-else>
@@ -105,7 +106,6 @@
105
106
  readonly
106
107
  :name="name"
107
108
  type="text"
108
- wqwq
109
109
  v-show="false"
110
110
  ></el-input>
111
111
  </template>
@@ -188,6 +188,7 @@
188
188
  class="es-selector-dialog"
189
189
  >
190
190
  <es-selector-panel
191
+ v-if="isReset"
191
192
  v-model="selected"
192
193
  v-bind="$attrs"
193
194
  :multiple="multiple"
@@ -329,6 +330,13 @@ export default {
329
330
  emptySerach: {
330
331
  type: Boolean,
331
332
  default: false
333
+ },
334
+ reset: Boolean,
335
+ useCaseCode: String,
336
+ businessData: [String, Array, Object],
337
+ inputHeight: {
338
+ type: Number,
339
+ default: 40
332
340
  }
333
341
  },
334
342
  data() {
@@ -348,6 +356,16 @@ export default {
348
356
  };
349
357
  },
350
358
  computed: {
359
+ isRender() {
360
+ let useCaseCodes = util.getStorage('useCaseCodes');
361
+ if (useCaseCodes && this.useCaseCode) {
362
+ return useCaseCodes.indexOf(this.useCaseCode) > -1;
363
+ }
364
+ return true;
365
+ },
366
+ isReset() {
367
+ return this.reset ? this.visible : true;
368
+ },
351
369
  _elFormItemSize() {
352
370
  return (this.elFormItem || {}).elFormItemSize;
353
371
  },
@@ -413,7 +431,11 @@ export default {
413
431
  selected: {
414
432
  deep: true,
415
433
  handler(val) {
416
- this.$emit('change', Array.isArray(val) ? val : [val]);
434
+ this.$emit(
435
+ 'change',
436
+ Array.isArray(val) ? val : [val],
437
+ this.businessData
438
+ );
417
439
  if (this.multiple) {
418
440
  this.resetInputHeight();
419
441
  }
@@ -551,10 +573,11 @@ export default {
551
573
  this.visible = false;
552
574
  if (util.isObject(res)) {
553
575
  this.$emit('input', [res]);
576
+ this.$emit('confirm', [res], this.businessData);
554
577
  } else {
555
578
  this.$emit('input', res);
579
+ this.$emit('confirm', res, this.businessData);
556
580
  }
557
- this.$emit('confirm', res);
558
581
  let inputChildNodes = this.$refs.reference
559
582
  ? this.$refs.reference.$el.childNodes
560
583
  : null;
@@ -565,6 +588,9 @@ export default {
565
588
  input.focus();
566
589
  input.blur();
567
590
  }
591
+ if (this.reset) {
592
+ this.selected = [];
593
+ }
568
594
  },
569
595
  handleClear() {
570
596
  this.$emit('input', []);
@@ -584,7 +610,7 @@ export default {
584
610
  if (this.collapseTags) return;
585
611
  this.$nextTick(() => {
586
612
  if (!this.$refs.reference) return;
587
- const sizeInMap = this.initialInputHeight || 40;
613
+ const sizeInMap = this.inputHeight;
588
614
  let height = '';
589
615
  if (this.selected !== undefined && this.selected.length === 0) {
590
616
  height = sizeInMap + 'px';
@@ -1 +1 @@
1
- @charset "UTF-8";.el-button-group>.es-selector,.el-button-group>.es-upload{float:left}.el-button-group>.es-selector:first-child>.el-button,.el-button-group>.es-upload:first-child>.el-upload--handle>.el-upload>.el-button{border-top-right-radius:0;border-bottom-right-radius:0}.el-button-group>.es-selector:not(:first-child):not(:last-child)>.el-button,.el-button-group>.es-upload:not(:first-child):not(:last-child)>.el-upload--handle>.el-upload>.el-button{border-radius:0}.el-button-group>.es-selector:last-child>.el-button,.el-button-group>.es-upload:last-child>.el-upload--handle>.el-upload>.el-button{border-top-left-radius:0;border-bottom-left-radius:0}.el-button-group>.es-selector:not(:last-child)>.el-button,.el-button-group>.es-upload:not(:last-child)>.el-upload--handle>.el-upload>.el-button{margin-right:-1px}.es-button-group{display:-webkit-box;display:-ms-flexbox;display:flex}.es-button-group>.el-dropdown>.el-button{border-color:#d9d9d9}.el-button-group>.el-button+.es-button,.el-button-group>.es-button+.el-button,.el-button-group>.es-button+.es-button{margin-left:0}.el-button-group>.es-selector:first-child>.el-button.el-button--danger,.el-button-group>.es-selector:first-child>.el-button.el-button--info,.el-button-group>.es-selector:first-child>.el-button.el-button--primary,.el-button-group>.es-selector:first-child>.el-button.el-button--success,.el-button-group>.es-selector:first-child>.el-button.el-button--warning{border-right-color:rgba(255,255,255,.5)}.el-button-group>.es-selector:not(:first-child):not(:last-child)>.el-button.el-button--danger,.el-button-group>.es-selector:not(:first-child):not(:last-child)>.el-button.el-button--info,.el-button-group>.es-selector:not(:first-child):not(:last-child)>.el-button.el-button--primary,.el-button-group>.es-selector:not(:first-child):not(:last-child)>.el-button.el-button--success,.el-button-group>.es-selector:not(:first-child):not(:last-child)>.el-button.el-button--warning{border-left-color:rgba(255,255,255,.5);border-right-color:rgba(255,255,255,.5)}.el-button-group>.es-selector:last-child>.el-button.el-button--danger,.el-button-group>.es-selector:last-child>.el-button.el-button--info,.el-button-group>.es-selector:last-child>.el-button.el-button--primary,.el-button-group>.es-selector:last-child>.el-button.el-button--success,.el-button-group>.es-selector:last-child>.el-button.el-button--warning{border-left-color:rgba(255,255,255,.5)}.el-button-group>.es-upload:first-child>.el-upload--handle>.el-upload>.el-button.el-button--danger,.el-button-group>.es-upload:first-child>.el-upload--handle>.el-upload>.el-button.el-button--info,.el-button-group>.es-upload:first-child>.el-upload--handle>.el-upload>.el-button.el-button--primary,.el-button-group>.es-upload:first-child>.el-upload--handle>.el-upload>.el-button.el-button--success,.el-button-group>.es-upload:first-child>.el-upload--handle>.el-upload>.el-button.el-button--warning{border-right-color:rgba(255,255,255,.5)}.el-button-group>.es-upload:not(:first-child):not(:last-child)>.el-upload--handle>.el-upload>.el-button.el-button--danger,.el-button-group>.es-upload:not(:first-child):not(:last-child)>.el-upload--handle>.el-upload>.el-button.el-button--info,.el-button-group>.es-upload:not(:first-child):not(:last-child)>.el-upload--handle>.el-upload>.el-button.el-button--primary,.el-button-group>.es-upload:not(:first-child):not(:last-child)>.el-upload--handle>.el-upload>.el-button.el-button--success,.el-button-group>.es-upload:not(:first-child):not(:last-child)>.el-upload--handle>.el-upload>.el-button.el-button--warning{border-left-color:rgba(255,255,255,.5);border-right-color:rgba(255,255,255,.5)}.el-button-group>.es-upload:last-child>.el-upload--handle>.el-upload>.el-button.el-button--danger,.el-button-group>.es-upload:last-child>.el-upload--handle>.el-upload>.el-button.el-button--info,.el-button-group>.es-upload:last-child>.el-upload--handle>.el-upload>.el-button.el-button--primary,.el-button-group>.es-upload:last-child>.el-upload--handle>.el-upload>.el-button.el-button--success,.el-button-group>.es-upload:last-child>.el-upload--handle>.el-upload>.el-button.el-button--warning{border-left-color:rgba(255,255,255,.5)}
1
+ @charset "UTF-8";.el-button-group>.es-selector,.el-button-group>.es-upload{float:left}.el-button-group>.es-selector:first-child>.el-button,.el-button-group>.es-upload:first-child>.el-upload--handle>.el-upload>.el-button{border-top-right-radius:0;border-bottom-right-radius:0}.el-button-group>.es-selector:not(:first-child):not(:last-child)>.el-button,.el-button-group>.es-upload:not(:first-child):not(:last-child)>.el-upload--handle>.el-upload>.el-button{border-radius:0}.el-button-group>.es-selector:last-child>.el-button,.el-button-group>.es-upload:last-child>.el-upload--handle>.el-upload>.el-button{border-top-left-radius:0;border-bottom-left-radius:0}.el-button-group>.es-selector:not(:last-child)>.el-button,.el-button-group>.es-upload:not(:last-child)>.el-upload--handle>.el-upload>.el-button{margin-right:-1px}.es-button-group{display:-webkit-box;display:-ms-flexbox;display:flex}.es-button-group>.el-dropdown>.el-button{border-color:#d9d9d9}.el-button-group>.el-button+.es-button,.el-button-group>.es-button+.el-button,.el-button-group>.es-button+.es-button{margin-left:0}.el-button-group>.es-selector:first-child>.el-button.el-button--danger,.el-button-group>.es-selector:first-child>.el-button.el-button--info,.el-button-group>.es-selector:first-child>.el-button.el-button--primary,.el-button-group>.es-selector:first-child>.el-button.el-button--success,.el-button-group>.es-selector:first-child>.el-button.el-button--warning{border-right-color:rgba(255,255,255,.5)}.el-button-group>.es-selector:not(:first-child):not(:last-child)>.el-button.el-button--danger,.el-button-group>.es-selector:not(:first-child):not(:last-child)>.el-button.el-button--info,.el-button-group>.es-selector:not(:first-child):not(:last-child)>.el-button.el-button--primary,.el-button-group>.es-selector:not(:first-child):not(:last-child)>.el-button.el-button--success,.el-button-group>.es-selector:not(:first-child):not(:last-child)>.el-button.el-button--warning{border-left-color:rgba(255,255,255,.5);border-right-color:rgba(255,255,255,.5)}.el-button-group>.es-selector:last-child>.el-button.el-button--danger,.el-button-group>.es-selector:last-child>.el-button.el-button--info,.el-button-group>.es-selector:last-child>.el-button.el-button--primary,.el-button-group>.es-selector:last-child>.el-button.el-button--success,.el-button-group>.es-selector:last-child>.el-button.el-button--warning{border-left-color:rgba(255,255,255,.5)}.el-button-group>.es-upload:first-child>.el-upload--handle>.el-upload>.el-button.el-button--danger,.el-button-group>.es-upload:first-child>.el-upload--handle>.el-upload>.el-button.el-button--info,.el-button-group>.es-upload:first-child>.el-upload--handle>.el-upload>.el-button.el-button--primary,.el-button-group>.es-upload:first-child>.el-upload--handle>.el-upload>.el-button.el-button--success,.el-button-group>.es-upload:first-child>.el-upload--handle>.el-upload>.el-button.el-button--warning{border-right-color:rgba(255,255,255,.5)}.el-button-group>.es-upload:not(:first-child):not(:last-child)>.el-upload--handle>.el-upload>.el-button.el-button--danger,.el-button-group>.es-upload:not(:first-child):not(:last-child)>.el-upload--handle>.el-upload>.el-button.el-button--info,.el-button-group>.es-upload:not(:first-child):not(:last-child)>.el-upload--handle>.el-upload>.el-button.el-button--primary,.el-button-group>.es-upload:not(:first-child):not(:last-child)>.el-upload--handle>.el-upload>.el-button.el-button--success,.el-button-group>.es-upload:not(:first-child):not(:last-child)>.el-upload--handle>.el-upload>.el-button.el-button--warning{border-left-color:rgba(255,255,255,.5);border-right-color:rgba(255,255,255,.5)}.el-button-group>.es-upload:last-child>.el-upload--handle>.el-upload>.el-button.el-button--danger,.el-button-group>.es-upload:last-child>.el-upload--handle>.el-upload>.el-button.el-button--info,.el-button-group>.es-upload:last-child>.el-upload--handle>.el-upload>.el-button.el-button--primary,.el-button-group>.es-upload:last-child>.el-upload--handle>.el-upload>.el-button.el-button--success,.el-button-group>.es-upload:last-child>.el-upload--handle>.el-upload>.el-button.el-button--warning{border-left-color:rgba(255,255,255,.5)}.es-dropdown-padding{padding:0}.es-dropdown-selector>.el-button,.es-dropdown-upload>.el-upload--handle>.el-upload>.el-button{display:block;width:100%;text-align:left;padding:6px 20px;line-height:24px;font-size:14px;border:0}.es-dropdown-upload>.el-upload--handle,.es-dropdown-upload>.el-upload--handle>.el-upload{display:block}.es-dropdown-upload>.el-upload--handle>.el-upload>.el-button{color:rgba(0,0,0,.75)}.es-dropdown-upload>.el-upload--handle>.el-upload>.el-button:hover{color:#69c0ff}.es-dropdown-selector>.el-button{color:rgba(0,0,0,.75)}.es-dropdown-selector>.el-button:hover{color:#69c0ff}