cloud-web-corejs 1.0.129 → 1.0.130

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 (52) hide show
  1. package/package.json +1 -1
  2. package/src/components/VabUpload/view.vue +138 -55
  3. package/src/components/baseInputExport/mixins.js +1 -1
  4. package/src/components/errorMsg/mixins.js +1 -2
  5. package/src/components/excelImport/mixins.js +2 -1
  6. package/src/components/jsonImport/mixins.js +2 -1
  7. package/src/components/langImport/mixins.js +17 -16
  8. package/src/components/wf/content.vue +772 -411
  9. package/src/components/wf/mixins/wfFlowEleScriptDialog.js +3 -0
  10. package/src/components/wf/wf.js +1 -1
  11. package/src/components/wf/wfFlowEleScriptDialog.vue +89 -0
  12. package/src/components/xform/form-designer/designer.js +3 -2
  13. package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +3 -3
  14. package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +9 -9
  15. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +4 -1
  16. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +2 -1
  17. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +3 -1
  18. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +17 -4
  19. package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +4 -0
  20. package/src/components/xform/form-designer/form-widget/field-widget/oplog-widget.vue +185 -0
  21. package/src/components/xform/form-designer/form-widget/field-widget/print-button-widget.vue +1 -1
  22. package/src/components/xform/form-designer/form-widget/field-widget/print-detail-button-widget.vue +108 -0
  23. package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +145 -0
  24. package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +13 -4
  25. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload2-widget.vue +725 -0
  26. package/src/components/xform/form-designer/indexMixin.js +3 -2
  27. package/src/components/xform/form-designer/setting-panel/form-setting.vue +1 -1
  28. package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +376 -366
  29. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +0 -1
  30. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +372 -253
  31. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +9 -43
  32. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +7 -0
  33. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +8 -0
  34. package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +91 -0
  35. package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +37 -30
  36. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +62 -0
  37. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +19 -14
  38. package/src/components/xform/form-designer/setting-panel/property-editor/oplog-editor.vue +31 -0
  39. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +5 -1
  40. package/src/components/xform/form-designer/widget-panel/indexMixin.js +19 -19
  41. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +132 -0
  42. package/src/components/xform/form-render/container-item/containerItemMixin.js +12 -11
  43. package/src/components/xform/lang/zh-CN.js +3 -0
  44. package/src/components/xform/utils/util.js +1 -1451
  45. package/src/utils/request.js +1 -1
  46. package/src/utils/vab.js +1 -1
  47. package/src/views/user/notify_message/dialog.vue +24 -19
  48. package/src/views/user/outLink/form_view.vue +211 -211
  49. package/src/views/user/wf/wfReport/index.vue +448 -0
  50. package/src/views/user/wf/wf_manage/list.vue +344 -251
  51. package/src/views/user/wf/wf_transfer_setting/edit.vue +229 -0
  52. package/src/views/user/wf/wf_transfer_setting/list.vue +308 -0
@@ -35,16 +35,18 @@ export default {
35
35
  data() {
36
36
  return {
37
37
  showWfDialog2: false,
38
- wfUrl2: '',
38
+ wfUrl2: "",
39
39
  showWfContent: true,
40
40
  wfContent: null,
41
- wfDataId: '',
41
+ wfDataId: "",
42
42
  param: {},
43
43
  };
44
44
  },
45
45
  methods: {
46
46
  getUrlParam(url) {
47
- var reg = /([^?&=]+)=([^?&=]+)/g, obj = {}, str = url;
47
+ var reg = /([^?&=]+)=([^?&=]+)/g,
48
+ obj = {},
49
+ str = url;
48
50
  url.replace(reg, function () {
49
51
  obj[arguments[1]] = arguments[2];
50
52
  });
@@ -58,9 +60,9 @@ export default {
58
60
  data: [row.id],
59
61
  isLoading: true,
60
62
  loadingTarget: document.body,
61
- success: res => {
63
+ success: (res) => {
62
64
  callback && callback();
63
- }
65
+ },
64
66
  });
65
67
  } else {
66
68
  callback && callback();
@@ -72,38 +74,41 @@ export default {
72
74
  let wfUrl = turl.split("?")[0];
73
75
  let param = this.getUrlParam(turl);
74
76
  let wfDataId = param.dataId;
77
+ if (!wfDataId) {
78
+ wfDataId = 0;
79
+ } else if (!isNaN(wfDataId)) {
80
+ wfDataId = Number(wfDataId);
81
+ }
75
82
 
76
- if (wfUrl == 'form') {
83
+ if (wfUrl == "form") {
77
84
  this.param = Object.assign(param, {
78
85
  formCode: param.objTypeCode.substr(9),
79
- dataId: wfDataId
86
+ dataId: wfDataId,
80
87
  });
81
- let url = '/user/form/vform/render.vue';
82
- this.wfContent = require('@base/views' + url).default;
88
+ let url = "/user/form/vform/render.vue";
89
+ this.wfContent = require("@base/views" + url).default;
83
90
  } else {
84
91
  this.param = Object.assign(param, {
85
- _dataId: wfDataId
92
+ _dataId: wfDataId,
86
93
  });
87
- let url = wfUrl + '.vue';
94
+ let url = wfUrl + ".vue";
88
95
  let id = wfDataId;
89
- this.wfDataId = !id || typeof id == 'object' ? 0 : id;
96
+ this.wfDataId = !id || typeof id == "object" ? 0 : id;
90
97
  // this.showWfDialog = true;
91
98
  this.showWfContent = true;
92
- this.wfContent = require('@/views' + url).default;
93
-
94
-
99
+ this.wfContent = require("@/views" + url).default;
95
100
  }
96
101
  this.showWfDialog2 = true;
97
102
 
98
103
  callback && callback();
99
- })
100
- }
101
- }
104
+ });
105
+ },
106
+ },
102
107
  };
103
108
  </script>
104
109
 
105
110
  <style scoped>
106
111
  .designer-dialog.indexUse #containt .detail-wrap .d-cont {
107
- height: calc(100vh - 82px)
112
+ height: calc(100vh - 82px);
108
113
  }
109
114
  </style>
@@ -1,211 +1,211 @@
1
- <template>
2
- <div :id="$route.query.isMobile!=='true'?'containt':''">
3
- <component v-if="showWfContent && wfContent" :is="wfContent" visible-key="showWfContent" :outParam.sync="outParam"
4
- :_dataId.sync="dataId" :defaultShowWfContent="defaultShowWfContent" :_isOutLink="true"
5
- :parent-target="_self"
6
- @reload="$reloadHandle" v-bind="queryParam"></component>
7
- </div>
8
- </template>
9
-
10
- <script>
11
- import indexUtil from "@base/utils/index.js"
12
- import {
13
- setReportGlobalParam
14
- } from "@base/components/xform/utils/util";
15
-
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
- }
44
- },
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
- }
64
-
65
- delete queryParam.urlmobile;
66
- delete queryParam.url;
67
-
68
- if (purl.indexOf('.html') >= 0) {
69
- let eUrl = purl;
70
- let pstr = Object.keys(queryParam).map(key => {
71
- return key + "=" + queryParam[key]
72
- }).join("&")
73
-
74
- if (pstr) {
75
- if (purl.indexOf('.html?') >= 0) {
76
- eUrl = eUrl + '&' + pstr
77
- } else {
78
- eUrl = eUrl + '?' + pstr
79
- }
80
- }
81
-
82
- location.href = eUrl;
83
- return
84
- }
85
-
86
- delete queryParam.dataId;
87
- delete queryParam.showWfContent;
88
- delete queryParam.access_token;
89
- delete queryParam.tp;
90
- delete queryParam.thirdparty_info;
91
- delete queryParam.i18nLang;
92
-
93
- let url = purl + '.vue';
94
- this.queryParam = queryParam;
95
- this.showWfContent = true;
96
- // this.wfContent = require('@/views' + url).default;
97
- let t = "@base/views";
98
- let urlArr = [
99
- '/user/bill_setting/h5_view.vue',
100
- '/user/form/view/list.vue',
101
- '/user/form/view/edit.vue'
102
- ]
103
- this.initUserInfo(() => {
104
- this.initI18n();
105
- if (urlArr.includes(url)) {
106
- this.wfContent = require('@base/views' + url).default;
107
- } else if (url.startsWith(t)) {
108
- let path = url.slice(t.length);
109
- this.wfContent = require('@base/views' + path).default;
110
- } else {
111
- this.wfContent = require('@/views' + url).default;
112
- }
113
- })
114
- },
115
- initUserInfo(callback) {
116
- this.$store
117
- .dispatch('user/getInfo2')
118
- .then(() => {
119
- callback && callback();
120
- });
121
- },
122
- getI18nLang() {
123
- let i18nLang = this.$route.query.i18nLang || "zh";
124
- return i18nLang;
125
- },
126
- async initI18n() {
127
- let lang = this.getI18nLang();
128
- this.$i18n.locale = lang // 设置给本地的i18n插件
129
- localStorage.setItem("i18n-lang", lang);
130
- await indexUtil.initI18nMessage("business", lang, true);
131
- },
132
- login() {
133
- let token = this.$route.query.access_token;
134
- let url = this.$route.query.url;
135
- let hasToken = this.$route.query.hasToken;
136
- let tp = this.$route.query.tp || this.$route.query.thirdparty_info;
137
- if (url) {
138
- if (token) {
139
- this.initByToken(token);
140
- } else if (tp) {
141
- this.thirdpartyLogin(tp);
142
- } else if (hasToken == "true") {
143
- this.$nextTick(() => {
144
- this.initData();
145
- });
146
- }
147
- this.initGlobalReqData();
148
- }
149
- },
150
- initByToken(token) {
151
- if (!token) return;
152
- this.$store
153
- .dispatch('user/addToken', {
154
- token
155
- })
156
- .then(() => {
157
- this.$nextTick(() => {
158
- this.initData();
159
- });
160
- });
161
- },
162
- thirdpartyLogin(tp) {
163
- let lang = this.getI18nLang();
164
- this.$http({
165
- url: USER_PREFIX + `/thirdparty_auth/login`,
166
- method: `post`,
167
- data: {
168
- tp: tp,
169
- language: lang
170
- },
171
- isLoading: true,
172
- modalStrictly: true,
173
- useToken: false,
174
- success: res => {
175
- let thirdpartyToken = res.objx;
176
- this.initByToken(thirdpartyToken);
177
- }
178
- });
179
- },
180
- handlePopState(event) {
181
- // 阻止回退
182
- history.go(1);
183
- }
184
- }
185
- };
186
- </script>
187
-
188
- <style lang="scss" scoped>
189
- ::v-deep .tab-box > .el-tabs__content {
190
-
191
- .designer-view {
192
- height: calc(100vh - 33px)
193
- }
194
-
195
- .grid-height,
196
- .designer-view .el-form.render-form {
197
- height: calc(100vh - 41px)
198
- }
199
- }
200
-
201
- ::v-deep #containt .detail-wrap {
202
- .d-header {
203
- margin: -8px -12px 0;
204
- }
205
-
206
- .d-cont {
207
- margin: 0 -12px;
208
- height: calc(100vh - 73px)
209
- }
210
- }
211
- </style>
1
+ <template>
2
+ <div :id="$route.query.isMobile!=='true'?'containt':''">
3
+ <component v-if="showWfContent && wfContent" :is="wfContent" visible-key="showWfContent" :outParam.sync="outParam"
4
+ :_dataId.sync="dataId" :defaultShowWfContent="defaultShowWfContent" :_isOutLink="true"
5
+ :parent-target="_self"
6
+ @reload="$reloadHandle" v-bind="queryParam"></component>
7
+ </div>
8
+ </template>
9
+
10
+ <script>
11
+ import indexUtil from "@base/utils/index.js"
12
+ import {
13
+ setReportGlobalParam
14
+ } from "@base/components/xform/utils/util";
15
+
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
+ }
44
+ },
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
+ }
64
+
65
+ delete queryParam.urlmobile;
66
+ delete queryParam.url;
67
+
68
+ if (purl.indexOf('.html') >= 0) {
69
+ let eUrl = purl;
70
+ let pstr = Object.keys(queryParam).map(key => {
71
+ return key + "=" + queryParam[key]
72
+ }).join("&")
73
+
74
+ if (pstr) {
75
+ if (purl.indexOf('.html?') >= 0) {
76
+ eUrl = eUrl + '&' + pstr
77
+ } else {
78
+ eUrl = eUrl + '?' + pstr
79
+ }
80
+ }
81
+
82
+ location.href = eUrl;
83
+ return
84
+ }
85
+
86
+ delete queryParam.dataId;
87
+ delete queryParam.showWfContent;
88
+ delete queryParam.access_token;
89
+ delete queryParam.tp;
90
+ delete queryParam.thirdparty_info;
91
+ delete queryParam.i18nLang;
92
+
93
+ let url = purl + '.vue';
94
+ this.queryParam = queryParam;
95
+ this.showWfContent = true;
96
+ // this.wfContent = require('@/views' + url).default;
97
+ let t = "@base/views";
98
+ let urlArr = [
99
+ '/user/bill_setting/h5_view.vue',
100
+ '/user/form/view/list.vue',
101
+ '/user/form/view/edit.vue'
102
+ ]
103
+ this.initUserInfo(() => {
104
+ this.initI18n();
105
+ if (urlArr.includes(url)) {
106
+ this.wfContent = require('@base/views' + url).default;
107
+ } else if (url.startsWith(t)) {
108
+ let path = url.slice(t.length);
109
+ this.wfContent = require('@base/views' + path).default;
110
+ } else {
111
+ this.wfContent = require('@/views' + url).default;
112
+ }
113
+ })
114
+ },
115
+ initUserInfo(callback) {
116
+ this.$store
117
+ .dispatch('user/getInfo2')
118
+ .then(() => {
119
+ callback && callback();
120
+ });
121
+ },
122
+ getI18nLang() {
123
+ let i18nLang = this.$route.query.i18nLang || "zh";
124
+ return i18nLang;
125
+ },
126
+ async initI18n() {
127
+ let lang = this.getI18nLang();
128
+ this.$i18n.locale = lang // 设置给本地的i18n插件
129
+ localStorage.setItem("i18n-lang", lang);
130
+ await indexUtil.initI18nMessage("business", lang, true);
131
+ },
132
+ login() {
133
+ let token = this.$route.query.access_token;
134
+ let url = this.$route.query.url;
135
+ let hasToken = this.$route.query.hasToken;
136
+ let tp = this.$route.query.tp || this.$route.query.thirdparty_info;
137
+ if (url) {
138
+ if (token) {
139
+ this.initByToken(token);
140
+ } else if (tp) {
141
+ this.thirdpartyLogin(tp);
142
+ } else if (hasToken == "true") {
143
+ this.$nextTick(() => {
144
+ this.initData();
145
+ });
146
+ }
147
+ this.initGlobalReqData();
148
+ }
149
+ },
150
+ initByToken(token) {
151
+ if (!token) return;
152
+ this.$store
153
+ .dispatch('user/addToken', {
154
+ token
155
+ })
156
+ .then(() => {
157
+ this.$nextTick(() => {
158
+ this.initData();
159
+ });
160
+ });
161
+ },
162
+ thirdpartyLogin(tp) {
163
+ let lang = this.getI18nLang();
164
+ this.$http({
165
+ url: USER_PREFIX + `/thirdparty_auth/login`,
166
+ method: `post`,
167
+ data: {
168
+ tp: tp,
169
+ language: lang
170
+ },
171
+ isLoading: true,
172
+ modalStrictly: true,
173
+ useToken: false,
174
+ success: res => {
175
+ let thirdpartyToken = res.objx;
176
+ this.initByToken(thirdpartyToken);
177
+ }
178
+ });
179
+ },
180
+ handlePopState(event) {
181
+ // 阻止回退
182
+ history.go(1);
183
+ }
184
+ }
185
+ };
186
+ </script>
187
+
188
+ <style lang="scss" scoped>
189
+ ::v-deep .tab-box > .el-tabs__content {
190
+
191
+ .designer-view {
192
+ height: calc(100vh - 33px)
193
+ }
194
+
195
+ .grid-height,
196
+ .designer-view .el-form.render-form {
197
+ height: calc(100vh - 41px)
198
+ }
199
+ }
200
+
201
+ ::v-deep #containt .detail-wrap {
202
+ .d-header {
203
+ margin: -8px -12px 0;
204
+ }
205
+
206
+ .d-cont {
207
+ margin: 0 -12px;
208
+ height: calc(100vh - 73px)
209
+ }
210
+ }
211
+ </style>