eoss-ui 0.4.97 → 0.4.99

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 (107) hide show
  1. package/lib/button-group.js +17 -17
  2. package/lib/button.js +17 -17
  3. package/lib/checkbox-group.js +17 -17
  4. package/lib/data-table-form.js +17 -17
  5. package/lib/data-table.js +17 -17
  6. package/lib/date-picker.js +17 -17
  7. package/lib/dialog.js +17 -17
  8. package/lib/eoss-ui.common.js +92 -58
  9. package/lib/flow-group.js +17 -17
  10. package/lib/flow-list.js +17 -17
  11. package/lib/flow.js +42 -22
  12. package/lib/form.js +17 -17
  13. package/lib/handle-user.js +17 -17
  14. package/lib/handler.js +17 -17
  15. package/lib/index.js +1 -1
  16. package/lib/input-number.js +17 -17
  17. package/lib/input.js +17 -17
  18. package/lib/login.js +17 -17
  19. package/lib/main.js +36 -33
  20. package/lib/nav.js +17 -17
  21. package/lib/page.js +17 -17
  22. package/lib/player.js +17 -17
  23. package/lib/qr-code.js +17 -17
  24. package/lib/radio-group.js +17 -17
  25. package/lib/retrial-auth.js +17 -17
  26. package/lib/select-ganged.js +17 -17
  27. package/lib/select.js +17 -17
  28. package/lib/selector-panel.js +17 -17
  29. package/lib/selector.js +17 -17
  30. package/lib/sizer.js +17 -17
  31. package/lib/steps.js +17 -17
  32. package/lib/switch.js +17 -17
  33. package/lib/table-form.js +17 -17
  34. package/lib/tabs.js +17 -17
  35. package/lib/tips.js +17 -17
  36. package/lib/tree-group.js +17 -17
  37. package/lib/tree.js +17 -17
  38. package/lib/upload.js +35 -24
  39. package/lib/utils/util.js +17 -17
  40. package/lib/wujie.js +17 -17
  41. package/lib/wxlogin.js +17 -17
  42. package/package.json +1 -1
  43. package/packages/flow/src/main.vue +20 -3
  44. package/packages/main/src/main.vue +17 -6
  45. package/packages/theme-chalk/gulpfile.js +25 -0
  46. package/packages/upload/src/main.vue +16 -6
  47. package/src/index.js +1 -1
  48. package/src/utils/util.js +17 -17
  49. package/CHANGELOG.md +0 -929
  50. package/packages/theme-chalk/lib/base.css +0 -1
  51. package/packages/theme-chalk/lib/button-group.css +0 -1
  52. package/packages/theme-chalk/lib/button.css +0 -0
  53. package/packages/theme-chalk/lib/card.css +0 -1
  54. package/packages/theme-chalk/lib/cascader.css +0 -0
  55. package/packages/theme-chalk/lib/checkbox-group.css +0 -1
  56. package/packages/theme-chalk/lib/clients.css +0 -1
  57. package/packages/theme-chalk/lib/data-table-form.css +0 -1
  58. package/packages/theme-chalk/lib/data-table.css +0 -1
  59. package/packages/theme-chalk/lib/date-picker.css +0 -1
  60. package/packages/theme-chalk/lib/dialog.css +0 -1
  61. package/packages/theme-chalk/lib/enterprise.css +0 -1
  62. package/packages/theme-chalk/lib/error-page.css +0 -1
  63. package/packages/theme-chalk/lib/flow-chart.css +0 -0
  64. package/packages/theme-chalk/lib/flow-group.css +0 -1
  65. package/packages/theme-chalk/lib/flow-list.css +0 -1
  66. package/packages/theme-chalk/lib/flow.css +0 -1
  67. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  68. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  69. package/packages/theme-chalk/lib/form.css +0 -1
  70. package/packages/theme-chalk/lib/handle-user.css +0 -1
  71. package/packages/theme-chalk/lib/handler.css +0 -1
  72. package/packages/theme-chalk/lib/icon.css +0 -1
  73. package/packages/theme-chalk/lib/icons.css +0 -1
  74. package/packages/theme-chalk/lib/index.css +0 -1
  75. package/packages/theme-chalk/lib/input-number.css +0 -0
  76. package/packages/theme-chalk/lib/input.css +0 -1
  77. package/packages/theme-chalk/lib/label.css +0 -1
  78. package/packages/theme-chalk/lib/layout.css +0 -1
  79. package/packages/theme-chalk/lib/login.css +0 -1
  80. package/packages/theme-chalk/lib/main.css +0 -1
  81. package/packages/theme-chalk/lib/mainComp.css +0 -0
  82. package/packages/theme-chalk/lib/menu.css +0 -1
  83. package/packages/theme-chalk/lib/nav.css +0 -1
  84. package/packages/theme-chalk/lib/notify.css +0 -0
  85. package/packages/theme-chalk/lib/page.css +0 -1
  86. package/packages/theme-chalk/lib/pagination.css +0 -1
  87. package/packages/theme-chalk/lib/player.css +0 -1
  88. package/packages/theme-chalk/lib/qr-code.css +0 -1
  89. package/packages/theme-chalk/lib/radio-group.css +0 -1
  90. package/packages/theme-chalk/lib/retrial-auth.css +0 -1
  91. package/packages/theme-chalk/lib/select-ganged.css +0 -1
  92. package/packages/theme-chalk/lib/select.css +0 -0
  93. package/packages/theme-chalk/lib/selector-panel.css +0 -1
  94. package/packages/theme-chalk/lib/selector.css +0 -1
  95. package/packages/theme-chalk/lib/sizer.css +0 -1
  96. package/packages/theme-chalk/lib/steps.css +0 -1
  97. package/packages/theme-chalk/lib/switch.css +0 -1
  98. package/packages/theme-chalk/lib/table-form.css +0 -0
  99. package/packages/theme-chalk/lib/tabs-panel.css +0 -0
  100. package/packages/theme-chalk/lib/tabs.css +0 -1
  101. package/packages/theme-chalk/lib/tips.css +0 -1
  102. package/packages/theme-chalk/lib/toolbar.css +0 -1
  103. package/packages/theme-chalk/lib/tree-group.css +0 -1
  104. package/packages/theme-chalk/lib/tree.css +0 -1
  105. package/packages/theme-chalk/lib/upload.css +0 -1
  106. package/packages/theme-chalk/lib/wujie.css +0 -0
  107. package/packages/theme-chalk/lib/wxlogin.css +0 -1
package/lib/upload.js CHANGED
@@ -1939,29 +1939,29 @@ var isLogined = function isLogined(_ref8) {
1939
1939
  loginPage = _ref8.loginPage,
1940
1940
  redirect = _ref8.redirect;
1941
1941
 
1942
- var logined = getStorage('logined');
1943
1942
  if (cookie === undefined) {
1944
1943
  cookie = getParams({ name: 'cookie' });
1945
1944
  }
1946
- // eslint-disable-next-line eqeqeq
1947
- if (logined || cookie == true || cookie == 1) {
1948
- if (loginPage) {
1949
- sessionStorage.setItem('loginPage', loginPage);
1950
- if (!startWith(loginPage, ['http', '/'], true)) {
1951
- var pathname = win.top.location.pathname;
1952
- if (pathname !== '/') {
1953
- pathname = pathname.split('/');
1954
- pathname.splice(pathname.length - 1);
1955
- pathname = pathname.join('/');
1956
- loginPage = pathname + '/' + loginPage.replace('./', '');
1957
- } else {
1958
- loginPage = pathname + loginPage.replace('./', '');
1959
- }
1945
+ if (loginPage) {
1946
+ sessionStorage.setItem('loginPage', loginPage);
1947
+ if (!startWith(loginPage, ['http', '/'], true)) {
1948
+ var pathname = win.top.location.pathname;
1949
+ if (pathname !== '/') {
1950
+ pathname = pathname.split('/');
1951
+ pathname.splice(pathname.length - 1);
1952
+ pathname = pathname.join('/');
1953
+ loginPage = pathname + '/' + loginPage.replace('./', '');
1954
+ } else {
1955
+ loginPage = pathname + loginPage.replace('./', '');
1960
1956
  }
1961
1957
  }
1962
- next();
1958
+ }
1959
+ var token = getStorage('token') || getStorage('Authorization');
1960
+ var logined = getStorage('logined');
1961
+ // eslint-disable-next-line eqeqeq
1962
+ if (token || logined || cookie == true || cookie == 1) {
1963
+ next && next();
1963
1964
  } else {
1964
- var token = getStorage('token') || getStorage('Authorization');
1965
1965
  if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1966
1966
  ajax({
1967
1967
  method: 'post',
@@ -3431,8 +3431,8 @@ function normalizeComponent(
3431
3431
  // ESM COMPAT FLAG
3432
3432
  __webpack_require__.r(__webpack_exports__);
3433
3433
 
3434
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=74d3e866&
3435
- var mainvue_type_template_id_74d3e866_render = function () {
3434
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/upload/src/main.vue?vue&type=template&id=079ba0f8&
3435
+ var mainvue_type_template_id_079ba0f8_render = function () {
3436
3436
  var _vm = this
3437
3437
  var _h = _vm.$createElement
3438
3438
  var _c = _vm._self._c || _h
@@ -3812,10 +3812,10 @@ var mainvue_type_template_id_74d3e866_render = function () {
3812
3812
  : _vm._e()
3813
3813
  }
3814
3814
  var staticRenderFns = []
3815
- mainvue_type_template_id_74d3e866_render._withStripped = true
3815
+ mainvue_type_template_id_079ba0f8_render._withStripped = true
3816
3816
 
3817
3817
 
3818
- // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=74d3e866&
3818
+ // CONCATENATED MODULE: ./packages/upload/src/main.vue?vue&type=template&id=079ba0f8&
3819
3819
 
3820
3820
  // EXTERNAL MODULE: ./src/config/api.js
3821
3821
  var api = __webpack_require__(1);
@@ -4513,7 +4513,9 @@ var _props;
4513
4513
  return item;
4514
4514
  }).join(',');
4515
4515
  }
4516
- _this2.kkfileview = res.results.kkViewRootPath ? res.results.kkViewRootPath : null;
4516
+ if (res.results.kkViewRootPath) {
4517
+ _this2.kkfileview = res.results.kkViewRootPath;
4518
+ }
4517
4519
  _this2.fileSize = res.results.limitFileSize ? res.results.limitFileSize : 0;
4518
4520
  _this2.fileTotalSize = res.results.limitTotalSize;
4519
4521
  store["a" /* default */].set(_this2.code, {
@@ -4574,7 +4576,16 @@ var _props;
4574
4576
  this.$refs.upload.submit();
4575
4577
  },
4576
4578
  openKkfileview: function openKkfileview(file) {
4577
- var url = encodeURIComponent(external_js_base64_["Base64"].encode((typeof this.download === 'string' ? this.download : api["q" /* downloadByAdjunctId */]) + ('?adjunctId=' + (file.adjunctId || file.response.adjunctId) + '&fullfilename=' + file.originalName)));
4579
+ var host = util["a" /* default */].win.top.location.origin;
4580
+ if (this.host) {
4581
+ if (util["a" /* default */].startWith(this.host, 'http')) {
4582
+ host = this.host;
4583
+ } else {
4584
+ host += this.host;
4585
+ }
4586
+ }
4587
+ console.log(host);
4588
+ var url = encodeURIComponent(external_js_base64_["Base64"].encode(host + (typeof this.download === 'string' ? this.download : api["q" /* downloadByAdjunctId */]) + ('?adjunctId=' + (file.adjunctId || file.response.adjunctId) + '&fullfilename=' + file.originalName)));
4578
4589
  util["a" /* default */].win.top.open(this.kkfileview + '?url=' + url);
4579
4590
  },
4580
4591
  handlePreview: function handlePreview(res) {
@@ -4903,7 +4914,7 @@ var componentNormalizer = __webpack_require__(3);
4903
4914
 
4904
4915
  var component = Object(componentNormalizer["a" /* default */])(
4905
4916
  src_mainvue_type_script_lang_js_,
4906
- mainvue_type_template_id_74d3e866_render,
4917
+ mainvue_type_template_id_079ba0f8_render,
4907
4918
  staticRenderFns,
4908
4919
  false,
4909
4920
  null,
package/lib/utils/util.js CHANGED
@@ -1854,29 +1854,29 @@ var isLogined = function isLogined(_ref8) {
1854
1854
  loginPage = _ref8.loginPage,
1855
1855
  redirect = _ref8.redirect;
1856
1856
 
1857
- var logined = getStorage('logined');
1858
1857
  if (cookie === undefined) {
1859
1858
  cookie = getParams({ name: 'cookie' });
1860
1859
  }
1861
- // eslint-disable-next-line eqeqeq
1862
- if (logined || cookie == true || cookie == 1) {
1863
- if (loginPage) {
1864
- sessionStorage.setItem('loginPage', loginPage);
1865
- if (!startWith(loginPage, ['http', '/'], true)) {
1866
- var pathname = win.top.location.pathname;
1867
- if (pathname !== '/') {
1868
- pathname = pathname.split('/');
1869
- pathname.splice(pathname.length - 1);
1870
- pathname = pathname.join('/');
1871
- loginPage = pathname + '/' + loginPage.replace('./', '');
1872
- } else {
1873
- loginPage = pathname + loginPage.replace('./', '');
1874
- }
1860
+ if (loginPage) {
1861
+ sessionStorage.setItem('loginPage', loginPage);
1862
+ if (!startWith(loginPage, ['http', '/'], true)) {
1863
+ var pathname = win.top.location.pathname;
1864
+ if (pathname !== '/') {
1865
+ pathname = pathname.split('/');
1866
+ pathname.splice(pathname.length - 1);
1867
+ pathname = pathname.join('/');
1868
+ loginPage = pathname + '/' + loginPage.replace('./', '');
1869
+ } else {
1870
+ loginPage = pathname + loginPage.replace('./', '');
1875
1871
  }
1876
1872
  }
1877
- next();
1873
+ }
1874
+ var token = getStorage('token') || getStorage('Authorization');
1875
+ var logined = getStorage('logined');
1876
+ // eslint-disable-next-line eqeqeq
1877
+ if (token || logined || cookie == true || cookie == 1) {
1878
+ next && next();
1878
1879
  } else {
1879
- var token = getStorage('token') || getStorage('Authorization');
1880
1880
  if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1881
1881
  ajax({
1882
1882
  method: 'post',
package/lib/wujie.js CHANGED
@@ -1939,29 +1939,29 @@ var isLogined = function isLogined(_ref8) {
1939
1939
  loginPage = _ref8.loginPage,
1940
1940
  redirect = _ref8.redirect;
1941
1941
 
1942
- var logined = getStorage('logined');
1943
1942
  if (cookie === undefined) {
1944
1943
  cookie = getParams({ name: 'cookie' });
1945
1944
  }
1946
- // eslint-disable-next-line eqeqeq
1947
- if (logined || cookie == true || cookie == 1) {
1948
- if (loginPage) {
1949
- sessionStorage.setItem('loginPage', loginPage);
1950
- if (!startWith(loginPage, ['http', '/'], true)) {
1951
- var pathname = win.top.location.pathname;
1952
- if (pathname !== '/') {
1953
- pathname = pathname.split('/');
1954
- pathname.splice(pathname.length - 1);
1955
- pathname = pathname.join('/');
1956
- loginPage = pathname + '/' + loginPage.replace('./', '');
1957
- } else {
1958
- loginPage = pathname + loginPage.replace('./', '');
1959
- }
1945
+ if (loginPage) {
1946
+ sessionStorage.setItem('loginPage', loginPage);
1947
+ if (!startWith(loginPage, ['http', '/'], true)) {
1948
+ var pathname = win.top.location.pathname;
1949
+ if (pathname !== '/') {
1950
+ pathname = pathname.split('/');
1951
+ pathname.splice(pathname.length - 1);
1952
+ pathname = pathname.join('/');
1953
+ loginPage = pathname + '/' + loginPage.replace('./', '');
1954
+ } else {
1955
+ loginPage = pathname + loginPage.replace('./', '');
1960
1956
  }
1961
1957
  }
1962
- next();
1958
+ }
1959
+ var token = getStorage('token') || getStorage('Authorization');
1960
+ var logined = getStorage('logined');
1961
+ // eslint-disable-next-line eqeqeq
1962
+ if (token || logined || cookie == true || cookie == 1) {
1963
+ next && next();
1963
1964
  } else {
1964
- var token = getStorage('token') || getStorage('Authorization');
1965
1965
  if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1966
1966
  ajax({
1967
1967
  method: 'post',
package/lib/wxlogin.js CHANGED
@@ -1939,29 +1939,29 @@ var isLogined = function isLogined(_ref8) {
1939
1939
  loginPage = _ref8.loginPage,
1940
1940
  redirect = _ref8.redirect;
1941
1941
 
1942
- var logined = getStorage('logined');
1943
1942
  if (cookie === undefined) {
1944
1943
  cookie = getParams({ name: 'cookie' });
1945
1944
  }
1946
- // eslint-disable-next-line eqeqeq
1947
- if (logined || cookie == true || cookie == 1) {
1948
- if (loginPage) {
1949
- sessionStorage.setItem('loginPage', loginPage);
1950
- if (!startWith(loginPage, ['http', '/'], true)) {
1951
- var pathname = win.top.location.pathname;
1952
- if (pathname !== '/') {
1953
- pathname = pathname.split('/');
1954
- pathname.splice(pathname.length - 1);
1955
- pathname = pathname.join('/');
1956
- loginPage = pathname + '/' + loginPage.replace('./', '');
1957
- } else {
1958
- loginPage = pathname + loginPage.replace('./', '');
1959
- }
1945
+ if (loginPage) {
1946
+ sessionStorage.setItem('loginPage', loginPage);
1947
+ if (!startWith(loginPage, ['http', '/'], true)) {
1948
+ var pathname = win.top.location.pathname;
1949
+ if (pathname !== '/') {
1950
+ pathname = pathname.split('/');
1951
+ pathname.splice(pathname.length - 1);
1952
+ pathname = pathname.join('/');
1953
+ loginPage = pathname + '/' + loginPage.replace('./', '');
1954
+ } else {
1955
+ loginPage = pathname + loginPage.replace('./', '');
1960
1956
  }
1961
1957
  }
1962
- next();
1958
+ }
1959
+ var token = getStorage('token') || getStorage('Authorization');
1960
+ var logined = getStorage('logined');
1961
+ // eslint-disable-next-line eqeqeq
1962
+ if (token || logined || cookie == true || cookie == 1) {
1963
+ next && next();
1963
1964
  } else {
1964
- var token = getStorage('token') || getStorage('Authorization');
1965
1965
  if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
1966
1966
  ajax({
1967
1967
  method: 'post',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eoss-ui",
3
- "version": "0.4.97",
3
+ "version": "0.4.99",
4
4
  "description": "eoss内部业务组件",
5
5
  "main": "lib/eoss-ui.common.js",
6
6
  "files": [
@@ -514,7 +514,9 @@
514
514
  <div class="btn" @click="taskReadBtn">分阅</div>
515
515
  </el-dropdown-item>
516
516
  <el-dropdown-item v-if="rejectObj.fun">
517
- <div style="color: red" @click="rejectBtn">驳回</div>
517
+ <div style="color: red" @click="rejectBtn">
518
+ {{ rejectObj.value }}
519
+ </div>
518
520
  </el-dropdown-item>
519
521
  </el-dropdown-menu>
520
522
  </el-dropdown>
@@ -739,6 +741,7 @@ export default {
739
741
  flowDisabled: false,
740
742
  activeNames: '',
741
743
  isEndUserTask: true,
744
+ isForceDisplayDefaultOptionForPrefix: false,
742
745
  selectUserList: [],
743
746
  selectNextCurrentOrgObjList: [],
744
747
  flowMultiple: true,
@@ -2017,6 +2020,16 @@ export default {
2017
2020
  } else if (this.nodeInfos.length > 0) {
2018
2021
  this.nextNode.nextNodeId = this.nodeInfos[0].nodeId;
2019
2022
  }
2023
+ this.isForceDisplayDefaultOptionForPrefix =
2024
+ nodeInfoMap.nodeExtAttr.isForceDisplayDefaultOptionForPrefix ==
2025
+ 1;
2026
+ if (nodeInfoMap.nodeExtAttr.submitText) {
2027
+ this.btnList.map((x) => {
2028
+ if (x.event === 'sub') {
2029
+ x.text = nodeInfoMap.nodeExtAttr.submitText;
2030
+ }
2031
+ });
2032
+ }
2020
2033
  }
2021
2034
  this.choiceOrgId = choiceOrgId;
2022
2035
  this.choiceDeptId = choiceDeptId;
@@ -2081,7 +2094,7 @@ export default {
2081
2094
  if (!this.isOpinionRequired) {
2082
2095
  this.isOpinionRequired = 0;
2083
2096
  }
2084
- opinion && (this.value = opinion);
2097
+ // opinion && (this.value = opinion);
2085
2098
  this.nextNode.notificationMsg = defaultNotificationMessage;
2086
2099
  this.moreList = [];
2087
2100
  if (taskButtonList && taskButtonList.length != 0) {
@@ -2382,7 +2395,11 @@ export default {
2382
2395
  let params = {
2383
2396
  ...this.nextNode,
2384
2397
  pendingId: this.pendingId,
2385
- opinion: this.value,
2398
+ opinion:
2399
+ this.isForceDisplayDefaultOptionForPrefix &&
2400
+ !this.value.startsWith(this.nodeDefaultSubmitOpinion)
2401
+ ? this.nodeDefaultSubmitOpinion + this.value
2402
+ : this.value,
2386
2403
  userId: util.getStorage('userId'),
2387
2404
  nextUserId: this.multiple
2388
2405
  ? nextUserId.join(',')
@@ -622,12 +622,19 @@ export default {
622
622
  };
623
623
  },
624
624
  created() {
625
+ let params = util.getParams() || {};
626
+ if (Object.prototype.hasOwnProperty.call(params, 'history')) {
627
+ this.history =
628
+ params.history == true ||
629
+ params.history == 'true' ||
630
+ params.history == 1;
631
+ }
625
632
  this.homePage =
626
633
  typeof this.loadHomePage === 'string' ? this.loadHomePage : '';
627
- this.isHeader = util.getParams('header');
634
+ this.isHeader = params.header;
628
635
  let sysLogoIco = sessionStorage.getItem('sysLogoIco');
629
636
  sysLogoIco && util.setFavicon(sysLogoIco);
630
- this.isLogin();
637
+ this.isLogin(params);
631
638
  },
632
639
  mounted() {
633
640
  util.win.reLogin = this.handleReLogin;
@@ -642,8 +649,7 @@ export default {
642
649
  util.win.windowOpen = this.openPage;
643
650
  },
644
651
  methods: {
645
- async isLogin() {
646
- const query = util.getParams();
652
+ async isLogin(query) {
647
653
  const token =
648
654
  util.getStorage('token') || util.getStorage('Authorization');
649
655
 
@@ -663,6 +669,7 @@ export default {
663
669
  }
664
670
  if (
665
671
  !token &&
672
+ query &&
666
673
  Object.prototype.hasOwnProperty.call(query, 'serverId') &&
667
674
  Object.prototype.hasOwnProperty.call(query, 'authType')
668
675
  ) {
@@ -1369,7 +1376,11 @@ export default {
1369
1376
  this.setTips(item);
1370
1377
  });
1371
1378
  } else {
1372
- if (Object.prototype.hasOwnProperty.call(obj, 'tips') && obj.tips) {
1379
+ if (
1380
+ obj &&
1381
+ Object.prototype.hasOwnProperty.call(obj, 'tips') &&
1382
+ obj.tips
1383
+ ) {
1373
1384
  this.$set(obj, 'tips', false);
1374
1385
  delete obj.tips;
1375
1386
  }
@@ -1694,7 +1705,7 @@ export default {
1694
1705
  if (res.path !== '/' && pathname == path) {
1695
1706
  return pathname;
1696
1707
  }
1697
- if (Object.prototype.hasOwnProperty.call(res, 'children')) {
1708
+ if (res && Object.prototype.hasOwnProperty.call(res, 'children')) {
1698
1709
  let path = this.hasRouter(res.children, url);
1699
1710
  if (path) {
1700
1711
  return path;
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ const { series, src, dest } = require('gulp');
4
+ const sass = require('gulp-sass');
5
+ const autoprefixer = require('gulp-autoprefixer');
6
+ const cssmin = require('gulp-cssmin');
7
+
8
+ function compile() {
9
+ return src('./src/*.scss')
10
+ .pipe(sass.sync())
11
+ .pipe(autoprefixer({
12
+ overrideBrowserslist: ['ie > 9', 'last 2 versions'],
13
+ cascade: false
14
+ }))
15
+ .pipe(cssmin())
16
+ .pipe(dest('./lib'));
17
+ }
18
+
19
+ function copyfont() {
20
+ return src('./src/fonts/**')
21
+ .pipe(cssmin())
22
+ .pipe(dest('./lib/fonts'));
23
+ }
24
+
25
+ exports.build = series(compile, copyfont);
@@ -723,9 +723,9 @@ export default {
723
723
  })
724
724
  .join(',');
725
725
  }
726
- this.kkfileview = res.results.kkViewRootPath
727
- ? res.results.kkViewRootPath
728
- : null;
726
+ if (res.results.kkViewRootPath) {
727
+ this.kkfileview = res.results.kkViewRootPath;
728
+ }
729
729
  this.fileSize = res.results.limitFileSize
730
730
  ? res.results.limitFileSize
731
731
  : 0;
@@ -802,11 +802,21 @@ export default {
802
802
  this.$refs.upload.submit();
803
803
  },
804
804
  openKkfileview(file) {
805
+ let host = util.win.top.location.origin;
806
+ if (this.host) {
807
+ if (util.startWith(this.host, 'http')) {
808
+ host = this.host;
809
+ } else {
810
+ host += this.host;
811
+ }
812
+ }
813
+ console.log(host);
805
814
  let url = encodeURIComponent(
806
815
  Base64.encode(
807
- (typeof this.download === 'string'
808
- ? this.download
809
- : downloadByAdjunctId) +
816
+ host +
817
+ (typeof this.download === 'string'
818
+ ? this.download
819
+ : downloadByAdjunctId) +
810
820
  `?adjunctId=${
811
821
  file.adjunctId || file.response.adjunctId
812
822
  }&fullfilename=${file.originalName}`
package/src/index.js CHANGED
@@ -117,7 +117,7 @@ if (typeof window !== 'undefined' && window.Vue) {
117
117
  }
118
118
 
119
119
  export default {
120
- version: '0.4.97',
120
+ version: '0.4.99',
121
121
  install,
122
122
  Button,
123
123
  ButtonGroup,
package/src/utils/util.js CHANGED
@@ -1875,29 +1875,29 @@ const isLogined = function ({
1875
1875
  loginPage,
1876
1876
  redirect
1877
1877
  }) {
1878
- const logined = getStorage('logined');
1879
1878
  if (cookie === undefined) {
1880
1879
  cookie = getParams({ name: 'cookie' });
1881
1880
  }
1882
- // eslint-disable-next-line eqeqeq
1883
- if (logined || cookie == true || cookie == 1) {
1884
- if (loginPage) {
1885
- sessionStorage.setItem('loginPage', loginPage);
1886
- if (!startWith(loginPage, ['http', '/'], true)) {
1887
- let pathname = win.top.location.pathname;
1888
- if (pathname !== '/') {
1889
- pathname = pathname.split('/');
1890
- pathname.splice(pathname.length - 1);
1891
- pathname = pathname.join('/');
1892
- loginPage = pathname + '/' + loginPage.replace('./', '');
1893
- } else {
1894
- loginPage = pathname + loginPage.replace('./', '');
1895
- }
1881
+ if (loginPage) {
1882
+ sessionStorage.setItem('loginPage', loginPage);
1883
+ if (!startWith(loginPage, ['http', '/'], true)) {
1884
+ let pathname = win.top.location.pathname;
1885
+ if (pathname !== '/') {
1886
+ pathname = pathname.split('/');
1887
+ pathname.splice(pathname.length - 1);
1888
+ pathname = pathname.join('/');
1889
+ loginPage = pathname + '/' + loginPage.replace('./', '');
1890
+ } else {
1891
+ loginPage = pathname + loginPage.replace('./', '');
1896
1892
  }
1897
1893
  }
1898
- next();
1894
+ }
1895
+ const token = getStorage('token') || getStorage('Authorization');
1896
+ const logined = getStorage('logined');
1897
+ // eslint-disable-next-line eqeqeq
1898
+ if (token || logined || cookie == true || cookie == 1) {
1899
+ next && next();
1899
1900
  } else {
1900
- const token = getStorage('token') || getStorage('Authorization');
1901
1901
  if (
1902
1902
  !token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') &&
1903
1903
  Object.prototype.hasOwnProperty.call(to.query, 'authType')