cloud-web-corejs 1.0.54-dev.195 → 1.0.54-dev.197

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.
Files changed (27) hide show
  1. package/package.json +1 -1
  2. package/src/components/excelExport/mixins.js +3 -1
  3. package/src/components/table/index.js +3 -3
  4. package/src/components/table/index2.js +1371 -0
  5. package/src/components/table/util/index.js +328 -0
  6. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +4 -0
  7. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +7 -2
  8. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +8 -2
  9. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +6 -0
  10. package/src/layout/components/AppMain.vue +5 -1
  11. package/src/layout/components/watermark/index.vue +77 -0
  12. package/src/views/bd/setting/bd_attach_setting/edit.vue +7 -7
  13. package/src/views/bd/setting/bd_attach_setting/list.vue +28 -55
  14. package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +4 -5
  15. package/src/views/bd/setting/bd_attach_setting/mixins/list.js +219 -1
  16. package/src/views/bd/setting/form_script/edit.vue +2 -2
  17. package/src/views/bd/setting/form_script/edit1.vue +2 -2
  18. package/src/views/bd/setting/form_script/form_list.vue +1 -1
  19. package/src/views/bd/setting/form_script/mixins/form_list.js +283 -1
  20. package/src/views/bd/setting/form_script/mixins/list.js +191 -1
  21. package/src/views/bd/setting/form_script/mixins/list1.js +347 -1
  22. package/src/views/bd/setting/form_template/edit.vue +2 -2
  23. package/src/views/bd/setting/form_template/mixins/list.js +600 -1
  24. package/src/views/bd/setting/table_model/mixins/list.js +365 -1
  25. package/src/views/user/login/default.vue +11 -1
  26. package/src/views/user/login/indexMixin.js +90 -1
  27. package/src/views/user/project_tag/list.vue +9 -4
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="login-container" :class="backgroundClass" ref="login-container" v-show="showContent">
3
3
  <div class="login-main" style="height: auto;">
4
- <el-tabs v-model="activeName">
4
+ <el-tabs v-model="activeName" @tab-click="changeTab">
5
5
  <el-tab-pane label="账号登录" name="first">
6
6
  <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="box-form login" autocomplete="on"
7
7
  label-position="left">
@@ -56,6 +56,11 @@
56
56
  <el-button :loading="loading" type="primary" @click.prevent.stop="handleLogin" class="btn">登录</el-button>
57
57
  </el-form>
58
58
  </el-tab-pane>
59
+ <el-tab-pane label="二维码登录" name="third">
60
+ <div class="qr" style="height: 305px">
61
+ <img class="qr__img" :src="qrBase64" style="left: 20%;position: absolute;" v-if="activeName==='third'"/>
62
+ </div>
63
+ </el-tab-pane>
59
64
  </el-tabs>
60
65
  </div>
61
66
  <div class="tc copyright">
@@ -69,6 +74,7 @@
69
74
 
70
75
  <script>
71
76
  import mixin from "./indexMixin";
77
+ import QRcode from 'qrcode'
72
78
 
73
79
  export default {
74
80
  name: 'Login',
@@ -128,4 +134,8 @@ export default {
128
134
  color: #8a8686;
129
135
  }
130
136
  }
137
+
138
+ ::v-deep .login-main .el-tabs__header .el-tabs__nav .el-tabs__item {
139
+ width: 33%;
140
+ }
131
141
  </style>
@@ -1,5 +1,6 @@
1
1
  import {encode} from "js-base64";
2
2
  import settingConfig from "@/settings";
3
+ import QRcode from "qrcode";
3
4
 
4
5
  function getUrlParams(url) {
5
6
  let result = {};
@@ -54,7 +55,13 @@ export default {
54
55
  },
55
56
  activeName: "first",
56
57
  searchParam: {},
57
- showContent: true
58
+ showContent: true,
59
+
60
+ qrTimer1: null,
61
+ qrTimer2: null,
62
+ qrContent: null,
63
+ qrCodeFlag: 0,
64
+ qrBase64: ""
58
65
  };
59
66
  },
60
67
  watch: {
@@ -69,6 +76,9 @@ export default {
69
76
  immediate: true
70
77
  }
71
78
  },
79
+ beforeDestroy() {
80
+ this.clearQrLoginTimer();
81
+ },
72
82
  created() {
73
83
  this.init();
74
84
  },
@@ -110,6 +120,7 @@ export default {
110
120
  if (e.keyCode == 13 && e.target.nodeName != 'INPUT') {
111
121
  let closeBtn = document.querySelector('.el-dialog__close');
112
122
  closeBtn && closeBtn.click();
123
+ if (this.activeName == "third") return
113
124
  this.handleLogin();
114
125
  }
115
126
  },
@@ -420,6 +431,84 @@ export default {
420
431
  });
421
432
  }
422
433
  });
434
+ },
435
+
436
+ /**二维码登录begin*/
437
+ guid() {
438
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (t) {
439
+ var e = 16 * Math.random() | 0;
440
+ return ("x" == t ? e : 3 & e | 8).toString(16);
441
+ });
442
+ },
443
+ initQR() {
444
+ this.qrCodeFlag = 0;
445
+ let option = {width: 300, height: 300};
446
+ this.qrContent = this.guid();
447
+ this.createQR(this.qrContent, option).then(url => {
448
+ this.qrBase64 = url
449
+ this.qrCodeFlag = 1;
450
+ })
451
+ },
452
+ // 生成二维码
453
+ createQR(content, options) {
454
+ return new Promise((resolve, reject) => {
455
+ QRcode.toDataURL(content, options).then(url => {
456
+ resolve(url)
457
+ })
458
+ })
459
+ },
460
+ changeTab() {
461
+ // this.initQR();
462
+ // return
463
+ if (this.activeName == "third") {
464
+ this.createQrLoginTimer();
465
+ } else {
466
+ this.clearQrLoginTimer();
467
+ }
468
+ },
469
+ clearQrLoginTimer() {
470
+ if (this.qrTimer1) {
471
+ clearInterval(this.qrTimer1)
472
+ this.qrTimer1 = null;
473
+ }
474
+ if (this.qrTimer2) {
475
+ clearInterval(this.qrTimer2)
476
+ this.qrTimer2 = null;
477
+ }
478
+ },
479
+ createQrLoginTimer() {
480
+ this.qrTimer1 = setInterval(() => {
481
+ this.checkQrLoginStatus();
482
+ }, 3000)
483
+ this.qrTimer2 = setInterval(() => {
484
+ this.initQR()
485
+ }, 30000)
486
+ this.initQR();
487
+ },
488
+ checkQrLoginStatus() {
489
+ if (this.qrCodeFlag !== 1) return
490
+ this.$http({
491
+ url: USER_PREFIX + '/auth/login',
492
+ method: `post`,
493
+ data: {as: this.qrContent},
494
+ // isLoading: true,
495
+ failMsg: false,
496
+ success: res => {
497
+ let token = res.objx;
498
+ if (token) {
499
+ console.log("token", token)
500
+ this.$store.dispatch('user/addToken', {token}).then(res => {
501
+ localStorage.removeItem('currentMenuId');
502
+ this.rememberPassword();
503
+ this.loading = false;
504
+ window.removeEventListener('keydown', this.keyDown, false);
505
+ this.handleRedirectUrl();
506
+ });
507
+ }
508
+ }
509
+ });
423
510
  }
511
+ /**二维码登录end*/
512
+
424
513
  }
425
514
  }
@@ -114,13 +114,13 @@ export default {
114
114
  width: 250
115
115
  },
116
116
  {
117
- field: 'createDate',
118
- title: this.$t1('创建时间'),
117
+ field: '_createBy',
118
+ title: this.$t1('创建人'),
119
119
  width: 150
120
120
  },
121
121
  {
122
- field: '_createBy',
123
- title: this.$t1('创建人'),
122
+ field: 'createDate',
123
+ title: this.$t1('创建时间'),
124
124
  width: 150
125
125
  },
126
126
  {
@@ -128,6 +128,11 @@ export default {
128
128
  title: this.$t1('更新人'),
129
129
  width: 150
130
130
  },
131
+ {
132
+ field: 'modifyDate',
133
+ title: this.$t1('更新时间'),
134
+ width: 150
135
+ },
131
136
  {
132
137
  width: 47,
133
138
  fixed: 'right',