cloud-web-corejs 1.0.18 → 1.0.19

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 (186) hide show
  1. package/package.json +2 -1
  2. package/src/components/jsonImport/index.js +3 -1
  3. package/src/components/jsonImport/mixins.js +16 -16
  4. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1 -1
  5. package/src/layout/components/Sidebar/default.vue +10 -4
  6. package/src/router/modules/customer.js +8 -8
  7. package/src/utils/aes.js +1 -0
  8. package/src/views/bd/setting/bd_attach_setting/dialog.vue +4 -4
  9. package/src/views/bd/setting/bd_attach_setting/edit.vue +3 -3
  10. package/src/views/bd/setting/bd_attach_setting/list.vue +3 -3
  11. package/src/views/bd/setting/form_script/dialog.vue +14 -12
  12. package/src/views/bd/setting/form_script/edit.vue +5 -4
  13. package/src/views/bd/setting/form_script/edit1.vue +3 -3
  14. package/src/views/bd/setting/form_script/form_list.vue +3 -3
  15. package/src/views/bd/setting/form_script/list.vue +4 -4
  16. package/src/views/bd/setting/form_script/list1.vue +4 -4
  17. package/src/views/bd/setting/form_script/list2.vue +1 -1
  18. package/src/views/bd/setting/form_template/dialog.vue +24 -17
  19. package/src/views/bd/setting/form_template/edit.vue +3 -3
  20. package/src/views/bd/setting/form_template/editWfObjConfigDialog.vue +1 -1
  21. package/src/views/bd/setting/form_template/ftHistoryDialog.vue +5 -5
  22. package/src/views/bd/setting/form_template/itemEdit.vue +3 -3
  23. package/src/views/bd/setting/form_template/itemList.vue +3 -3
  24. package/src/views/bd/setting/form_template/list.vue +4 -4
  25. package/src/views/bd/setting/form_template/preformDialog.vue +2 -2
  26. package/src/views/bd/setting/menu_kind/authDialog.vue +2 -2
  27. package/src/views/bd/setting/menu_kind/dialog.vue +23 -16
  28. package/src/views/bd/setting/menu_kind/list.vue +3 -3
  29. package/src/views/bd/setting/table_model/dialog.vue +4 -4
  30. package/src/views/bd/setting/table_model/edit.vue +1123 -1123
  31. package/src/views/bd/setting/table_model/list.vue +4 -4
  32. package/src/views/bd/setting/table_model/zdDialog.vue +4 -4
  33. package/src/views/mobile/user/area/dialog.vue +3 -2
  34. package/src/views/mobile/user/user/dialog.vue +3 -2
  35. package/src/views/support/export_template/edit.vue +4 -4
  36. package/src/views/support/export_template/list.vue +12 -12
  37. package/src/views/user/access_log/edit.vue +2 -2
  38. package/src/views/user/access_log/list.vue +8 -8
  39. package/src/views/user/access_log/statistics_list.vue +16 -11
  40. package/src/views/user/api_request/edit.vue +7 -4
  41. package/src/views/user/api_request/list.vue +7 -5
  42. package/src/views/user/area/dialog.vue +4 -4
  43. package/src/views/user/area_attribute/configDialog.vue +319 -319
  44. package/src/views/user/area_attribute/edit.vue +2 -2
  45. package/src/views/user/area_attribute/list.vue +1 -1
  46. package/src/views/user/attachment/uploadDialog.vue +11 -11
  47. package/src/views/user/bill_setting/edit.vue +6 -5
  48. package/src/views/user/bill_setting/h5_ModifyDialog.vue +5 -3
  49. package/src/views/user/bill_setting/h5_view.vue +4 -4
  50. package/src/views/user/bill_setting/itemViewDialog.vue +1 -1
  51. package/src/views/user/bill_setting/list.vue +5 -4
  52. package/src/views/user/bill_setting/queryDialog.vue +3 -3
  53. package/src/views/user/bill_setting/render.vue +6 -6
  54. package/src/views/user/bill_setting/template2.json +44 -11
  55. package/src/views/user/bill_setting/userDialog.vue +4 -4
  56. package/src/views/user/code_rules/edit.vue +3 -3
  57. package/src/views/user/code_rules/list.vue +3 -3
  58. package/src/views/user/commMenu/index.vue +2 -2
  59. package/src/views/user/common_attribute/edit.vue +3 -3
  60. package/src/views/user/common_attribute/itemEdit.vue +3 -3
  61. package/src/views/user/common_attribute/list.vue +3 -3
  62. package/src/views/user/common_script/edit.vue +5 -4
  63. package/src/views/user/common_script/list.vue +14 -13
  64. package/src/views/user/company_info/dialog.vue +138 -131
  65. package/src/views/user/company_info/edit.vue +2 -2
  66. package/src/views/user/company_info/view.vue +1 -1
  67. package/src/views/user/country/dialog.vue +6 -6
  68. package/src/views/user/country/edit.vue +8 -7
  69. package/src/views/user/country/list.vue +170 -160
  70. package/src/views/user/data_type_setting/dialog.vue +10 -7
  71. package/src/views/user/data_type_setting/editDialog.vue +12 -11
  72. package/src/views/user/ea/eagroup/eaobj_list.vue +331 -310
  73. package/src/views/user/ea/eagroup/edit.vue +492 -475
  74. package/src/views/user/ea/eaobj/edit.vue +153 -148
  75. package/src/views/user/ea/eaobj/list.vue +147 -135
  76. package/src/views/user/error-page/401.vue +42 -34
  77. package/src/views/user/error-page/404.vue +19 -3
  78. package/src/views/user/extend_datasource/dialog.vue +124 -116
  79. package/src/views/user/extend_datasource/edit.vue +5 -4
  80. package/src/views/user/extend_datasource/list.vue +3 -3
  81. package/src/views/user/fieldTranslation/editDialog.vue +2 -2
  82. package/src/views/user/fieldTranslation/list.vue +4 -3
  83. package/src/views/user/field_values_invisible/edit.vue +85 -83
  84. package/src/views/user/field_values_invisible/list.vue +32 -21
  85. package/src/views/user/file_type/edit.vue +3 -3
  86. package/src/views/user/file_type/list.vue +7 -4
  87. package/src/views/user/file_type/userEdit.vue +188 -188
  88. package/src/views/user/file_view_area/edit.vue +3 -3
  89. package/src/views/user/file_view_area/itemEdit.vue +168 -165
  90. package/src/views/user/file_view_area/list.vue +3 -3
  91. package/src/views/user/file_view_ins/list.vue +55 -36
  92. package/src/views/user/file_view_ins/propertiesDialog.vue +218 -218
  93. package/src/views/user/form/form_ins_list/edit.vue +421 -421
  94. package/src/views/user/form/form_template/dialog.vue +24 -17
  95. package/src/views/user/form/form_template/edit.vue +7 -4
  96. package/src/views/user/form/form_template/itemEdit.vue +3 -3
  97. package/src/views/user/form/form_template/itemList.vue +3 -3
  98. package/src/views/user/form/form_template/list.vue +5 -4
  99. package/src/views/user/form/form_template_field/dialog.vue +11 -8
  100. package/src/views/user/form/form_type/dialog.vue +134 -127
  101. package/src/views/user/form/form_type/edit.vue +4 -4
  102. package/src/views/user/form/form_type/editDialog.vue +10 -9
  103. package/src/views/user/form/form_type/list.vue +128 -118
  104. package/src/views/user/form/report_requestaccess/dialog.vue +106 -99
  105. package/src/views/user/form/report_requestaccess/edit.vue +272 -234
  106. package/src/views/user/form/report_requestaccess/list.vue +29 -18
  107. package/src/views/user/form/vform/designer.vue +164 -164
  108. package/src/views/user/form/vform/formFieldMapping.js +151 -169
  109. package/src/views/user/form/vform/out_render.vue +3 -2
  110. package/src/views/user/form/vform/render.vue +2 -2
  111. package/src/views/user/form/view/edit.vue +7 -7
  112. package/src/views/user/form/view/list.vue +2 -2
  113. package/src/views/user/home/distributor.vue +374 -118
  114. package/src/views/user/home/index.vue +1 -1
  115. package/src/views/user/language_setting/edit.vue +167 -166
  116. package/src/views/user/language_setting/list.vue +3 -3
  117. package/src/views/user/ledger_library/list.vue +2 -2
  118. package/src/views/user/ledger_library/private_list.vue +3 -3
  119. package/src/views/user/login/auth-redirect.vue +1 -1
  120. package/src/views/user/login/index.vue +1 -1
  121. package/src/views/user/login/indexMixin.js +4 -1
  122. package/src/views/user/menu/list.vue +3 -3
  123. package/src/views/user/mobile_menu/list.vue +2 -2
  124. package/src/views/user/notify_message/dialog.vue +8 -6
  125. package/src/views/user/notify_message/list.vue +4 -3
  126. package/src/views/user/notify_template/edit.vue +185 -185
  127. package/src/views/user/notify_template/list.vue +4 -4
  128. package/src/views/user/oplog/edit.vue +108 -103
  129. package/src/views/user/oplog/list.vue +3 -3
  130. package/src/views/user/outLink/form_view.vue +144 -143
  131. package/src/views/user/outLink/index.vue +7 -5
  132. package/src/views/user/outLink/view.vue +119 -117
  133. package/src/views/user/position/dialog.vue +145 -138
  134. package/src/views/user/position/edit.vue +4 -4
  135. package/src/views/user/position/list.vue +170 -160
  136. package/src/views/user/project_tag/dialog.vue +5 -5
  137. package/src/views/user/project_tag/edit.vue +3 -3
  138. package/src/views/user/project_tag/list.vue +3 -3
  139. package/src/views/user/push_setting/edit.vue +7 -4
  140. package/src/views/user/push_setting/list.vue +44 -34
  141. package/src/views/user/redirect/index.vue +4 -4
  142. package/src/views/user/role/dialog.vue +10 -7
  143. package/src/views/user/role/edit.vue +427 -427
  144. package/src/views/user/role/list.vue +125 -114
  145. package/src/views/user/sale_org/dialog.vue +3 -3
  146. package/src/views/user/sale_org/list.vue +11 -11
  147. package/src/views/user/sale_org/moveDialog.vue +2 -2
  148. package/src/views/user/sale_org_net/list.vue +9 -9
  149. package/src/views/user/system_notice/edit.vue +184 -184
  150. package/src/views/user/system_notice/list.vue +156 -145
  151. package/src/views/user/system_parameter/edit.vue +140 -137
  152. package/src/views/user/system_parameter/list.vue +131 -120
  153. package/src/views/user/user/dialog.vue +31 -24
  154. package/src/views/user/user/edit.vue +1021 -1019
  155. package/src/views/user/user/form_edit.vue +481 -483
  156. package/src/views/user/user/form_list.vue +5 -5
  157. package/src/views/user/user/info.vue +271 -256
  158. package/src/views/user/user/infoContent.vue +12 -11
  159. package/src/views/user/user/infoEdit.vue +111 -92
  160. package/src/views/user/user/inner_list.vue +1 -1
  161. package/src/views/user/user/list.vue +55 -50
  162. package/src/views/user/user/list2.vue +1 -1
  163. package/src/views/user/user/modifyPasswordDialog.vue +3 -3
  164. package/src/views/user/user/out_list.vue +1 -1
  165. package/src/views/user/wf/formCustDialog/list.vue +13 -15
  166. package/src/views/user/wf/iframe/index.vue +12 -12
  167. package/src/views/user/wf/iframe/index2.vue +2 -2
  168. package/src/views/user/wf/wf_auto_submit_data/edit.vue +1 -1
  169. package/src/views/user/wf/wf_auto_submit_data/edith.vue +1 -1
  170. package/src/views/user/wf/wf_auto_submit_data/list.vue +8 -6
  171. package/src/views/user/wf/wf_diy_attribute/edit.vue +5 -5
  172. package/src/views/user/wf/wf_manage/list.vue +5 -4
  173. package/src/views/user/wf/wf_obj_config/activiti_wf.vue +11 -10
  174. package/src/views/user/wf/wf_obj_config/dialog.vue +10 -7
  175. package/src/views/user/wf/wf_obj_config/edit.vue +7 -4
  176. package/src/views/user/wf/wf_obj_config/edit_form.vue +70 -63
  177. package/src/views/user/wf/wf_obj_config/itemEdit.vue +3 -3
  178. package/src/views/user/wf/wf_obj_config/itemEdit_form.vue +3 -3
  179. package/src/views/user/wf/wf_obj_config/list.vue +4 -4
  180. package/src/views/user/wf/wf_obj_config/list_form.vue +22 -22
  181. package/src/views/user/wf/wf_param/edit.vue +4 -4
  182. package/src/views/user/wf/wf_work_calendar/components/calendar.vue +27 -13
  183. package/src/views/user/wf/wf_work_calendar/components/calendar2.vue +25 -10
  184. package/src/views/user/wf/wf_work_calendar/configDialog.vue +8 -5
  185. package/src/views/user/wf/wf_work_calendar/date.js +10 -10
  186. package/src/views/user/wf/wf_work_calendar/list.vue +9 -4
@@ -1,169 +1,170 @@
1
1
  <template>
2
2
  <div :id="$route.query.isMobile!=='true'?'containt':''">
3
3
  <component v-if="showWfContent && wfContent" :is="wfContent" visible-key="showWfContent" :outParam.sync="outParam"
4
- :_dataId.sync="dataId" :defaultShowWfContent="defaultShowWfContent" :_isOutLink="true" :parent-target="_self"
5
- @reload="$reloadHandle" v-bind="queryParam"></component>
4
+ :_dataId.sync="dataId" :defaultShowWfContent="defaultShowWfContent" :_isOutLink="true"
5
+ :parent-target="_self"
6
+ @reload="$reloadHandle" v-bind="queryParam"></component>
6
7
  </div>
7
8
  </template>
8
9
 
9
10
  <script>
10
- import indexUtil from "@base/utils/index.js"
11
- import {
12
- setReportGlobalParam
13
- } from "@base/components/xform/utils/util";
11
+ import indexUtil from "@base/utils/index.js"
12
+ import {
13
+ setReportGlobalParam
14
+ } from "@base/components/xform/utils/util";
14
15
 
15
- export default {
16
- data() {
17
- return {
18
- reportCode: null,
19
- showWfContent: true,
20
- wfContent: null,
21
- outParam: null,
22
- dataId: null,
23
- defaultShowWfContent: null,
24
- queryParam: {}
25
- };
26
- },
27
- created() {
28
- this.login();
29
- },
30
- mounted() {
31
- history.pushState(null, null, document.URL);
32
- window.addEventListener('popstate', this.handlePopState); // 在Vue组件的mounted钩子中添加事件监听
33
- },
34
- beforeDestroy() {
35
- window.removeEventListener('popstate', this.handlePopState); // 在beforeDestroy钩子中移除事件监听
16
+ export default {
17
+ data() {
18
+ return {
19
+ reportCode: null,
20
+ showWfContent: true,
21
+ wfContent: null,
22
+ outParam: null,
23
+ dataId: null,
24
+ defaultShowWfContent: null,
25
+ queryParam: {}
26
+ };
27
+ },
28
+ created() {
29
+ this.login();
30
+ },
31
+ mounted() {
32
+ history.pushState(null, null, document.URL);
33
+ window.addEventListener('popstate', this.handlePopState); // 在Vue组件的mounted钩子中添加事件监听
34
+ },
35
+ beforeDestroy() {
36
+ window.removeEventListener('popstate', this.handlePopState); // 在beforeDestroy钩子中移除事件监听
37
+ },
38
+ methods: {
39
+ initGlobalReqData() {
40
+ let fd = this.$route.query.fd;
41
+ if (fd) {
42
+ setReportGlobalParam(fd);
43
+ }
36
44
  },
37
- methods: {
38
- initGlobalReqData() {
39
- let fd = this.$route.query.fd;
40
- if (fd) {
41
- setReportGlobalParam(fd);
42
- }
43
- },
44
- async initData() {
45
- const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
46
- let queryParam = this.$baseLodash.cloneDeep(this.$route.query);
47
- let murl = this.$route.query.urlmobile;
48
- let purl = murl && isMobile ? murl : this.$route.query.url;
49
- let dataId = this.$route.query.dataId;
50
- if (purl == '/index') {
51
- location.hash = '/home';
52
- location.reload();
53
- return;
54
- }
55
- /*let param = this.$route.query.param;
56
- if (param) {
57
- this.outParam = JSON.parse(param)
58
- }*/
59
- this.dataId = dataId;
60
- if (this.$route.query.showWfContent == 'true') {
61
- this.defaultShowWfContent = true;
62
- }
45
+ async initData() {
46
+ const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
47
+ let queryParam = this.$baseLodash.cloneDeep(this.$route.query);
48
+ let murl = this.$route.query.urlmobile;
49
+ let purl = murl && isMobile ? murl : this.$route.query.url;
50
+ let dataId = this.$route.query.dataId;
51
+ if (purl == '/index') {
52
+ location.hash = '/home';
53
+ location.reload();
54
+ return;
55
+ }
56
+ /*let param = this.$route.query.param;
57
+ if (param) {
58
+ this.outParam = JSON.parse(param)
59
+ }*/
60
+ this.dataId = dataId;
61
+ if (this.$route.query.showWfContent == 'true') {
62
+ this.defaultShowWfContent = true;
63
+ }
63
64
 
64
- delete queryParam.urlmobile;
65
- delete queryParam.url;
66
- delete queryParam.dataId;
67
- delete queryParam.showWfContent;
68
- delete queryParam.access_token;
69
- delete queryParam.tp;
70
- delete queryParam.thirdparty_info;
71
- delete queryParam.i18nLang;
65
+ delete queryParam.urlmobile;
66
+ delete queryParam.url;
67
+ delete queryParam.dataId;
68
+ delete queryParam.showWfContent;
69
+ delete queryParam.access_token;
70
+ delete queryParam.tp;
71
+ delete queryParam.thirdparty_info;
72
+ delete queryParam.i18nLang;
72
73
 
73
- let url = purl + '.vue';
74
- this.queryParam = queryParam;
75
- this.showWfContent = true;
76
- await this.initI18n();
77
- this.wfContent = require('@/views' + url).default;
74
+ let url = purl + '.vue';
75
+ this.queryParam = queryParam;
76
+ this.showWfContent = true;
77
+ await this.initI18n();
78
+ this.wfContent = require('@/views' + url).default;
78
79
 
79
- },
80
- getI18nLang() {
81
- let i18nLang = this.$route.query.i18nLang || "zh";
82
- return i18nLang;
83
- },
84
- initI18n() {
85
- let lang = this.getI18nLang();
86
- this.$i18n.locale = lang // 设置给本地的i18n插件
87
- localStorage.setItem("i18n-lang", lang);
88
- return indexUtil.initI18nMessage("business", lang, true);
89
- },
90
- login() {
91
- let token = this.$route.query.access_token;
92
- let url = this.$route.query.url;
93
- let hasToken = this.$route.query.hasToken;
94
- let tp = this.$route.query.tp || this.$route.query.thirdparty_info;
95
- if (url) {
96
- if (token) {
97
- this.initByToken(token);
98
- } else if (tp) {
99
- this.thirdpartyLogin(tp);
100
- } else if (hasToken == "true") {
101
- this.$nextTick(() => {
102
- this.initData();
103
- });
104
- }
105
- this.initGlobalReqData();
80
+ },
81
+ getI18nLang() {
82
+ let i18nLang = this.$route.query.i18nLang || "zh";
83
+ return i18nLang;
84
+ },
85
+ initI18n() {
86
+ let lang = this.getI18nLang();
87
+ this.$i18n.locale = lang // 设置给本地的i18n插件
88
+ localStorage.setItem("i18n-lang", lang);
89
+ return indexUtil.initI18nMessage("business", lang, true);
90
+ },
91
+ login() {
92
+ let token = this.$route.query.access_token;
93
+ let url = this.$route.query.url;
94
+ let hasToken = this.$route.query.hasToken;
95
+ let tp = this.$route.query.tp || this.$route.query.thirdparty_info;
96
+ if (url) {
97
+ if (token) {
98
+ this.initByToken(token);
99
+ } else if (tp) {
100
+ this.thirdpartyLogin(tp);
101
+ } else if (hasToken == "true") {
102
+ this.$nextTick(() => {
103
+ this.initData();
104
+ });
106
105
  }
107
- },
108
- initByToken(token) {
109
- if (!token) return;
110
- this.$store
111
- .dispatch('user/addToken', {
112
- token
113
- })
114
- .then(() => {
115
- this.$nextTick(() => {
116
- this.initData();
117
- });
106
+ this.initGlobalReqData();
107
+ }
108
+ },
109
+ initByToken(token) {
110
+ if (!token) return;
111
+ this.$store
112
+ .dispatch('user/addToken', {
113
+ token
114
+ })
115
+ .then(() => {
116
+ this.$nextTick(() => {
117
+ this.initData();
118
118
  });
119
- },
120
- thirdpartyLogin(tp) {
121
- let lang = this.getI18nLang();
122
- this.$http({
123
- url: USER_PREFIX + `/thirdparty_auth/login`,
124
- method: `post`,
125
- data: {
126
- tp: tp,
127
- language: lang
128
- },
129
- isLoading: true,
130
- modalStrictly: true,
131
- useToken: false,
132
- success: res => {
133
- let thirdpartyToken = res.objx;
134
- this.initByToken(thirdpartyToken);
135
- }
136
119
  });
137
- },
138
- handlePopState(event) {
139
- // 阻止回退
140
- history.go(1);
141
- }
120
+ },
121
+ thirdpartyLogin(tp) {
122
+ let lang = this.getI18nLang();
123
+ this.$http({
124
+ url: USER_PREFIX + `/thirdparty_auth/login`,
125
+ method: `post`,
126
+ data: {
127
+ tp: tp,
128
+ language: lang
129
+ },
130
+ isLoading: true,
131
+ modalStrictly: true,
132
+ useToken: false,
133
+ success: res => {
134
+ let thirdpartyToken = res.objx;
135
+ this.initByToken(thirdpartyToken);
136
+ }
137
+ });
138
+ },
139
+ handlePopState(event) {
140
+ // 阻止回退
141
+ history.go(1);
142
142
  }
143
- };
143
+ }
144
+ };
144
145
  </script>
145
146
 
146
147
  <style lang="scss" scoped>
147
- ::v-deep .tab-box>.el-tabs__content {
148
+ ::v-deep .tab-box > .el-tabs__content {
148
149
 
149
- .designer-view {
150
- height: calc(100vh - 33px)
151
- }
150
+ .designer-view {
151
+ height: calc(100vh - 33px)
152
+ }
152
153
 
153
- .grid-height,
154
- .designer-view .el-form.render-form {
155
- height: calc(100vh - 41px)
156
- }
154
+ .grid-height,
155
+ .designer-view .el-form.render-form {
156
+ height: calc(100vh - 41px)
157
157
  }
158
+ }
158
159
 
159
- ::v-deep #containt .detail-wrap {
160
- .d-header {
161
- margin: -8px -12px 0;
162
- }
160
+ ::v-deep #containt .detail-wrap {
161
+ .d-header {
162
+ margin: -8px -12px 0;
163
+ }
163
164
 
164
- .d-cont {
165
- margin: 0 -12px;
166
- height: calc(100vh - 73px)
167
- }
165
+ .d-cont {
166
+ margin: 0 -12px;
167
+ height: calc(100vh - 73px)
168
168
  }
169
+ }
169
170
  </style>
@@ -1,6 +1,8 @@
1
1
  <template>
2
2
  <div>
3
- <div id="containt" style="margin-bottom: -4px;" v-if="type==1"><iframe v-if="url" :src="url" style="width: 100%;height:calc(100vh - 40px)" ></iframe></div>
3
+ <div id="containt" style="margin-bottom: -4px;" v-if="type==1">
4
+ <iframe v-if="url" :src="url" style="width: 100%;height:calc(100vh - 40px)"></iframe>
5
+ </div>
4
6
  <component :is="content" v-if="type==2"></component>
5
7
  </div>
6
8
  </template>
@@ -11,17 +13,17 @@ export default {
11
13
  data() {
12
14
  return {
13
15
  url: null,
14
- content:null,
15
- type:0
16
+ content: null,
17
+ type: 0
16
18
  };
17
19
  },
18
20
  mounted() {
19
21
  let url = this.$route.query.url;
20
22
  let route = this.$route.query.route;
21
- if(route){
23
+ if (route) {
22
24
  this.content = require('@/views' + route).default;
23
25
  this.type = 2;
24
- }else{
26
+ } else {
25
27
  if (url.indexOf('dw=true') >= 0) {
26
28
  this.$http({
27
29
  url: USER_PREFIX + `/dw_auth/getDwAsc`,
@@ -1,134 +1,136 @@
1
1
  <template>
2
2
  <div :id="$route.query.isMobile!=='true'?'containt':''">
3
3
  <component v-if="showWfContent && wfContent" :is="wfContent" visible-key="showWfContent" :outParam.sync="outParam"
4
- :_dataId.sync="dataId" :defaultShowWfContent="defaultShowWfContent" :_isOutLink="true" :parent-target="_self"
5
- @reload="$reloadHandle" v-bind="queryParam"></component>
4
+ :_dataId.sync="dataId" :defaultShowWfContent="defaultShowWfContent" :_isOutLink="true"
5
+ :parent-target="_self"
6
+ @reload="$reloadHandle" v-bind="queryParam"></component>
6
7
  </div>
7
8
  </template>
8
9
 
9
10
  <script>
10
- import indexUtil from "@base/utils/index.js"
11
- export default {
12
- data() {
13
- return {
14
- reportCode: null,
15
- showWfContent: true,
16
- wfContent: null,
17
- outParam: null,
18
- dataId: null,
19
- defaultShowWfContent: null,
20
- queryParam: {}
21
- };
22
- },
23
- created() {
24
- this.login();
25
- },
26
- mounted() {
27
- history.pushState(null, null, document.URL);
28
- window.addEventListener('popstate', this.handlePopState); // 在Vue组件的mounted钩子中添加事件监听
29
- },
30
- beforeDestroy() {
31
- window.removeEventListener('popstate', this.handlePopState); // 在beforeDestroy钩子中移除事件监听
32
- },
33
- methods: {
34
- initData() {
35
- const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
36
- let queryParam = this.$baseLodash.cloneDeep(this.$route.query);
37
- let murl = this.$route.query.urlmobile;
38
- let purl = murl && isMobile ? murl : this.$route.query.url;
39
- let dataId = this.$route.query.dataId;
40
- if (purl == '/index') {
41
- location.hash = '/home';
42
- location.reload();
43
- return;
44
- }
45
- let param = this.$route.query.param;
46
- if (param) {
47
- this.outParam = JSON.parse(param)
48
- }
49
- this.dataId = dataId;
50
- if (this.$route.query.showWfContent == 'true') {
51
- this.defaultShowWfContent = true;
52
- }
11
+ import indexUtil from "@base/utils/index.js"
12
+
13
+ export default {
14
+ data() {
15
+ return {
16
+ reportCode: null,
17
+ showWfContent: true,
18
+ wfContent: null,
19
+ outParam: null,
20
+ dataId: null,
21
+ defaultShowWfContent: null,
22
+ queryParam: {}
23
+ };
24
+ },
25
+ created() {
26
+ this.login();
27
+ },
28
+ mounted() {
29
+ history.pushState(null, null, document.URL);
30
+ window.addEventListener('popstate', this.handlePopState); // 在Vue组件的mounted钩子中添加事件监听
31
+ },
32
+ beforeDestroy() {
33
+ window.removeEventListener('popstate', this.handlePopState); // 在beforeDestroy钩子中移除事件监听
34
+ },
35
+ methods: {
36
+ initData() {
37
+ const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
38
+ let queryParam = this.$baseLodash.cloneDeep(this.$route.query);
39
+ let murl = this.$route.query.urlmobile;
40
+ let purl = murl && isMobile ? murl : this.$route.query.url;
41
+ let dataId = this.$route.query.dataId;
42
+ if (purl == '/index') {
43
+ location.hash = '/home';
44
+ location.reload();
45
+ return;
46
+ }
47
+ let param = this.$route.query.param;
48
+ if (param) {
49
+ this.outParam = JSON.parse(param)
50
+ }
51
+ this.dataId = dataId;
52
+ if (this.$route.query.showWfContent == 'true') {
53
+ this.defaultShowWfContent = true;
54
+ }
53
55
 
54
- delete queryParam.urlmobile;
55
- delete queryParam.url;
56
- delete queryParam.dataId;
57
- delete queryParam.showWfContent;
58
- delete queryParam.access_token;
59
- delete queryParam.tp;
60
- delete queryParam.thirdparty_info;
61
- delete queryParam.i18nLang;
56
+ delete queryParam.urlmobile;
57
+ delete queryParam.url;
58
+ delete queryParam.dataId;
59
+ delete queryParam.showWfContent;
60
+ delete queryParam.access_token;
61
+ delete queryParam.tp;
62
+ delete queryParam.thirdparty_info;
63
+ delete queryParam.i18nLang;
62
64
 
63
- let url = purl + '.vue';
64
- this.queryParam = queryParam;
65
- this.showWfContent = true;
66
- this.wfContent = require('@/views' + url).default;
67
- this.initI18n();
65
+ let url = purl + '.vue';
66
+ this.queryParam = queryParam;
67
+ this.showWfContent = true;
68
+ this.wfContent = require('@/views' + url).default;
69
+ this.initI18n();
68
70
 
69
- },
70
- getI18nLang() {
71
- let i18nLang = this.$route.query.i18nLang || "zh";
72
- return i18nLang;
73
- },
74
- initI18n() {
75
- let lang = this.getI18nLang();
76
- this.$i18n.locale = lang // 设置给本地的i18n插件
77
- localStorage.setItem("i18n-lang", lang);
78
- indexUtil.initI18nMessage("business", lang, true);
79
- },
80
- login() {
81
- let token = this.$route.query.access_token;
82
- let url = this.$route.query.url;
83
- let hasToken = this.$route.query.hasToken;
84
- let thirdparty_info = this.$route.query.tp || this.$route.query.thirdparty_info;
85
- if (url) {
86
- if (token) {
87
- this.initByToken(token);
88
- } else if (thirdparty_info) {
89
- this.thirdpartyLogin(thirdparty_info);
90
- } else if (hasToken == "true") {
91
- this.$nextTick(() => {
92
- this.initData();
93
- });
94
- }
71
+ },
72
+ getI18nLang() {
73
+ let i18nLang = this.$route.query.i18nLang || "zh";
74
+ return i18nLang;
75
+ },
76
+ initI18n() {
77
+ let lang = this.getI18nLang();
78
+ this.$i18n.locale = lang // 设置给本地的i18n插件
79
+ localStorage.setItem("i18n-lang", lang);
80
+ indexUtil.initI18nMessage("business", lang, true);
81
+ },
82
+ login() {
83
+ let token = this.$route.query.access_token;
84
+ let url = this.$route.query.url;
85
+ let hasToken = this.$route.query.hasToken;
86
+ let thirdparty_info = this.$route.query.tp || this.$route.query.thirdparty_info;
87
+ if (url) {
88
+ if (token) {
89
+ this.initByToken(token);
90
+ } else if (thirdparty_info) {
91
+ this.thirdpartyLogin(thirdparty_info);
92
+ } else if (hasToken == "true") {
93
+ this.$nextTick(() => {
94
+ this.initData();
95
+ });
95
96
  }
96
- },
97
- initByToken(token) {
98
- if (!token) return;
99
- this.$store
100
- .dispatch('user/addToken', {
101
- token
102
- })
103
- .then(() => {
104
- this.$nextTick(() => {
105
- this.initData();
106
- });
97
+ }
98
+ },
99
+ initByToken(token) {
100
+ if (!token) return;
101
+ this.$store
102
+ .dispatch('user/addToken', {
103
+ token
104
+ })
105
+ .then(() => {
106
+ this.$nextTick(() => {
107
+ this.initData();
107
108
  });
108
- },
109
- thirdpartyLogin(thirdparty_info) {
110
- let lang = this.getI18nLang();
111
- this.$http({
112
- url: USER_PREFIX + `/thirdparty_auth/login`,
113
- method: `post`,
114
- data: {
115
- tp: thirdparty_info,
116
- language: lang
117
- },
118
- isLoading: true,
119
- modalStrictly: true,
120
- success: res => {
121
- let thirdpartyToken = res.objx;
122
- this.initByToken(thirdpartyToken);
123
- }
124
109
  });
125
- },
126
- handlePopState(event) {
127
- // 阻止回退
128
- history.go(1);
129
- }
110
+ },
111
+ thirdpartyLogin(thirdparty_info) {
112
+ let lang = this.getI18nLang();
113
+ this.$http({
114
+ url: USER_PREFIX + `/thirdparty_auth/login`,
115
+ method: `post`,
116
+ data: {
117
+ tp: thirdparty_info,
118
+ language: lang
119
+ },
120
+ isLoading: true,
121
+ modalStrictly: true,
122
+ success: res => {
123
+ let thirdpartyToken = res.objx;
124
+ this.initByToken(thirdpartyToken);
125
+ }
126
+ });
127
+ },
128
+ handlePopState(event) {
129
+ // 阻止回退
130
+ history.go(1);
130
131
  }
131
- };
132
+ }
133
+ };
132
134
  </script>
133
135
 
134
136
  <style></style>