cloud-web-corejs 1.1.0-dev.27 → 1.1.0-dev.28

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 (170) hide show
  1. package/package.json +4 -11
  2. package/src/components/table/index.js +3 -0
  3. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +18 -1
  4. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +33 -20
  5. package/src/components/xform/form-render/container-item/data-table-mixin.js +16 -8
  6. package/src/components/xform/form-render/container-item/list-h5-item.vue +92 -309
  7. package/src/components/xform/utils/util.js +20 -0
  8. package/src/views/demo/bizTab/bill/billConfig.js +41 -0
  9. package/src/views/demo/bizTab/bill/detail.vue +436 -0
  10. package/src/views/demo/bizTab/bill/list.vue +288 -0
  11. package/src/views/demo/bizTab/bill/productDialog.vue +176 -0
  12. package/src/views/demo/bizTab/simple/billApi.js +123 -0
  13. package/src/views/demo/bizTab/simple/detail.vue +407 -0
  14. package/src/views/demo/bizTab/simple/list.vue +217 -0
  15. package/src/views/demo/bizTab/standalone/index.vue +121 -0
  16. package/src/views/demo/bizTab/wf/billConfig.js +44 -0
  17. package/src/views/demo/bizTab/wf/detail.vue +661 -0
  18. package/src/views/demo/bizTab/wf/list.vue +242 -0
  19. package/src/app-bootstrap.js +0 -523
  20. package/src/boot-assets.legacy.js +0 -7
  21. package/src/boot-assets.next.js +0 -7
  22. package/src/core-resources/css/h5.scss +0 -548
  23. package/src/core-resources/css/iconfont.css +0 -1447
  24. package/src/core-resources/font/iconfont.ttf +0 -0
  25. package/src/core-resources/font/iconfont.woff +0 -0
  26. package/src/core-resources/font/iconfont.woff2 +0 -0
  27. package/src/core-resources/images/default-header.png +0 -0
  28. package/src/core-resources/images/ico-default_wenjian.svg +0 -1
  29. package/src/core-resources/images/ico-excel.svg +0 -1
  30. package/src/core-resources/images/ico-ftl.svg +0 -7
  31. package/src/core-resources/images/ico-html.svg +0 -1
  32. package/src/core-resources/images/ico-java.svg +0 -1
  33. package/src/core-resources/images/ico-music.svg +0 -1
  34. package/src/core-resources/images/ico-pdf.svg +0 -1
  35. package/src/core-resources/images/ico-photo.svg +0 -1
  36. package/src/core-resources/images/ico-ppt.svg +0 -1
  37. package/src/core-resources/images/ico-psd.svg +0 -1
  38. package/src/core-resources/images/ico-service.png +0 -0
  39. package/src/core-resources/images/ico-txt.svg +0 -1
  40. package/src/core-resources/images/ico-video.svg +0 -1
  41. package/src/core-resources/images/ico-vue.svg +0 -8
  42. package/src/core-resources/images/ico-wenjianjia.svg +0 -1
  43. package/src/core-resources/images/ico-wrod.svg +0 -1
  44. package/src/core-resources/images/ico-xml.svg +0 -1
  45. package/src/core-resources/images/ico-yasuobao.svg +0 -1
  46. package/src/core-resources/images/icon-error.png +0 -0
  47. package/src/core-resources/images/icon-tips.png +0 -0
  48. package/src/core-resources/images/nodata.png +0 -0
  49. package/src/core-resources/images/nodata2.png +0 -0
  50. package/src/core-resources/js/base/common.js +0 -110
  51. package/src/icons/index.js +0 -9
  52. package/src/icons/svg/404.svg +0 -1
  53. package/src/icons/svg/alert.svg +0 -1
  54. package/src/icons/svg/bug.svg +0 -1
  55. package/src/icons/svg/button.svg +0 -1
  56. package/src/icons/svg/card.svg +0 -1
  57. package/src/icons/svg/cascader-field.svg +0 -1
  58. package/src/icons/svg/census.svg +0 -1
  59. package/src/icons/svg/chart.svg +0 -1
  60. package/src/icons/svg/checkbox-field.svg +0 -1
  61. package/src/icons/svg/clipboard.svg +0 -1
  62. package/src/icons/svg/color-field.svg +0 -1
  63. package/src/icons/svg/component.svg +0 -1
  64. package/src/icons/svg/custom-component.svg +0 -1
  65. package/src/icons/svg/dashboard.svg +0 -1
  66. package/src/icons/svg/data-table.svg +0 -1
  67. package/src/icons/svg/date-field.svg +0 -1
  68. package/src/icons/svg/date-range-field.svg +0 -1
  69. package/src/icons/svg/descriptions.svg +0 -1
  70. package/src/icons/svg/divider.svg +0 -1
  71. package/src/icons/svg/document.svg +0 -1
  72. package/src/icons/svg/documentation.svg +0 -1
  73. package/src/icons/svg/drag.svg +0 -1
  74. package/src/icons/svg/echart-category.svg +0 -1
  75. package/src/icons/svg/echart-pie.svg +0 -1
  76. package/src/icons/svg/echart.svg +0 -1
  77. package/src/icons/svg/edit.svg +0 -1
  78. package/src/icons/svg/education.svg +0 -1
  79. package/src/icons/svg/email.svg +0 -1
  80. package/src/icons/svg/example.svg +0 -1
  81. package/src/icons/svg/excel.svg +0 -1
  82. package/src/icons/svg/exit-fullscreen.svg +0 -1
  83. package/src/icons/svg/eye-open.svg +0 -1
  84. package/src/icons/svg/eye.svg +0 -1
  85. package/src/icons/svg/file-upload-field.svg +0 -1
  86. package/src/icons/svg/form.svg +0 -1
  87. package/src/icons/svg/fullscreen.svg +0 -1
  88. package/src/icons/svg/github.svg +0 -1
  89. package/src/icons/svg/grid.svg +0 -1
  90. package/src/icons/svg/guide.svg +0 -1
  91. package/src/icons/svg/html-text.svg +0 -1
  92. package/src/icons/svg/ico-more.svg +0 -1
  93. package/src/icons/svg/ico-wenjianjia.svg +0 -1
  94. package/src/icons/svg/icon.svg +0 -1
  95. package/src/icons/svg/input-batch.svg +0 -1
  96. package/src/icons/svg/international.svg +0 -1
  97. package/src/icons/svg/language.svg +0 -1
  98. package/src/icons/svg/link.svg +0 -1
  99. package/src/icons/svg/list-export.svg +0 -1
  100. package/src/icons/svg/list.svg +0 -1
  101. package/src/icons/svg/lock.svg +0 -1
  102. package/src/icons/svg/message.svg +0 -1
  103. package/src/icons/svg/money.svg +0 -1
  104. package/src/icons/svg/nested.svg +0 -1
  105. package/src/icons/svg/news-list.svg +0 -1
  106. package/src/icons/svg/node-tree.svg +0 -1
  107. package/src/icons/svg/number-field.svg +0 -1
  108. package/src/icons/svg/password.svg +0 -1
  109. package/src/icons/svg/pdf.svg +0 -1
  110. package/src/icons/svg/people.svg +0 -1
  111. package/src/icons/svg/peoples.svg +0 -1
  112. package/src/icons/svg/picture-upload-field.svg +0 -1
  113. package/src/icons/svg/qq.svg +0 -1
  114. package/src/icons/svg/query.svg +0 -1
  115. package/src/icons/svg/radio-field.svg +0 -1
  116. package/src/icons/svg/rate-field.svg +0 -1
  117. package/src/icons/svg/redo.svg +0 -1
  118. package/src/icons/svg/rich-editor-field.svg +0 -1
  119. package/src/icons/svg/search.svg +0 -1
  120. package/src/icons/svg/searchbox.svg +0 -1
  121. package/src/icons/svg/section.svg +0 -1
  122. package/src/icons/svg/select-field.svg +0 -1
  123. package/src/icons/svg/shopping.svg +0 -1
  124. package/src/icons/svg/size.svg +0 -1
  125. package/src/icons/svg/skill.svg +0 -1
  126. package/src/icons/svg/slider-field.svg +0 -1
  127. package/src/icons/svg/slot-component.svg +0 -1
  128. package/src/icons/svg/slot-field.svg +0 -1
  129. package/src/icons/svg/star.svg +0 -1
  130. package/src/icons/svg/static-text.svg +0 -1
  131. package/src/icons/svg/status.svg +0 -1
  132. package/src/icons/svg/sub-form.svg +0 -1
  133. package/src/icons/svg/switch-field.svg +0 -1
  134. package/src/icons/svg/tab.svg +0 -1
  135. package/src/icons/svg/table.svg +0 -1
  136. package/src/icons/svg/text-field.svg +0 -1
  137. package/src/icons/svg/text.svg +0 -1
  138. package/src/icons/svg/textarea-field.svg +0 -1
  139. package/src/icons/svg/theme.svg +0 -1
  140. package/src/icons/svg/time-field.svg +0 -1
  141. package/src/icons/svg/time-range-field.svg +0 -1
  142. package/src/icons/svg/tips-text.svg +0 -1
  143. package/src/icons/svg/title-head.svg +0 -1
  144. package/src/icons/svg/tree-pane.svg +0 -1
  145. package/src/icons/svg/tree-table.svg +0 -1
  146. package/src/icons/svg/tree.svg +0 -1
  147. package/src/icons/svg/undo.svg +0 -1
  148. package/src/icons/svg/uploadbox.svg +0 -1
  149. package/src/icons/svg/user.svg +0 -1
  150. package/src/icons/svg/vf-box.svg +0 -1
  151. package/src/icons/svg/vf-dialog.svg +0 -1
  152. package/src/icons/svg/vf-drawer.svg +0 -1
  153. package/src/icons/svg/vue-sfc.svg +0 -1
  154. package/src/icons/svg/wechat.svg +0 -1
  155. package/src/icons/svg/zip.svg +0 -1
  156. package/src/index.next.js +0 -5
  157. package/src/styles/btn.scss +0 -104
  158. package/src/styles/element-ui.scss +0 -155
  159. package/src/styles/element-variables.scss +0 -31
  160. package/src/styles/global.scss +0 -115
  161. package/src/styles/index.scss +0 -200
  162. package/src/styles/menu-icons.scss +0 -75
  163. package/src/styles/mixin.scss +0 -72
  164. package/src/styles/nprogress.scss +0 -14
  165. package/src/styles/sidebar.scss +0 -281
  166. package/src/styles/split-handle.scss +0 -52
  167. package/src/styles/theme-variables.scss +0 -7
  168. package/src/styles/transition.scss +0 -48
  169. package/src/styles/utilities.scss +0 -137
  170. package/src/styles/variables.scss +0 -44
package/package.json CHANGED
@@ -1,12 +1,10 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.1.0-dev.27",
4
+ "version": "1.1.0-dev.28",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "dev:micro": "vue-cli-service serve --port 17527",
8
- "check:package-resources": "node build/check-package-resources.js",
9
- "check:minimal-consumer": "node build/check-minimal-consumer-build.js",
10
8
  "lint": "eslint --ext .js,.vue src",
11
9
  "build:prod": "vue-cli-service build",
12
10
  "build:stage": "vue-cli-service build --mode staging",
@@ -15,7 +13,7 @@
15
13
  "new": "plop",
16
14
  "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
17
15
  "test:unit": "jest --clearCache && vue-cli-service test:unit",
18
- "test:ci": "npm run check:package-resources && npm run check:minimal-consumer && npm run lint && npm run test:unit",
16
+ "test:ci": "npm run lint && npm run test:unit",
19
17
  "updateCorejs": "npm install cloud-web-corejs --registry https://registry.npmjs.org",
20
18
  "publishDev": "npm publish --tag dev"
21
19
  },
@@ -177,6 +175,7 @@
177
175
  "src/components/bizTab",
178
176
  "src/api",
179
177
  "src/views/bd",
178
+ "src/views/demo",
180
179
  "src/views/support",
181
180
  "src/views/user",
182
181
  "src/views/mobile/user",
@@ -184,9 +183,7 @@
184
183
  "src/mixins",
185
184
  "src/directive",
186
185
  "src/store",
187
- "src/core-resources",
188
- "src/styles",
189
- "src/icons",
186
+ "src/resources/js",
190
187
  "src/lang/index.js",
191
188
  "src/lang/locale/en/login.js",
192
189
  "src/lang/locale/zh/login.js",
@@ -195,10 +192,6 @@
195
192
  "src/router",
196
193
  "src/permission.js",
197
194
  "src/index.js",
198
- "src/index.next.js",
199
- "src/boot-assets.legacy.js",
200
- "src/boot-assets.next.js",
201
- "src/app-bootstrap.js",
202
195
  "src/public-path.js",
203
196
  "src/microRouter",
204
197
  "src/App.vue"
@@ -890,6 +890,9 @@ function initOption(opts) {
890
890
  result = configUtil.extendDeeply(defaultOptions, config);
891
891
  applyTableFeatureDisabled(result, that);
892
892
 
893
+ if (!result.pagerConfig) {
894
+ return result;
895
+ }
893
896
  let pageSize = result.pagerConfig.pageSize;
894
897
  let pageSizes = result.pagerConfig.pageSizes;
895
898
  if (pageSizes && !pageSizes.includes(pageSize)) {
@@ -51,7 +51,10 @@
51
51
  <el-switch v-model="isShowQueryButton"></el-switch>
52
52
  </el-form-item>
53
53
  <el-form-item :label="i18nt('designer.setting.showPagination')">
54
- <el-switch v-model="optionModel.showPagination"></el-switch>
54
+ <el-switch
55
+ v-model="optionModel.showPagination"
56
+ :disabled="isPagedReturnType"
57
+ ></el-switch>
55
58
  </el-form-item>
56
59
  <el-form-item :label="i18nt('是否显示表尾统计行')">
57
60
  <el-switch v-model="optionModel.showGridFooter"></el-switch>
@@ -719,6 +722,7 @@ import Draggable from "vuedraggable";
719
722
  import {
720
723
  deepClone,
721
724
  generateId,
725
+ isPagedCollectionReturnType,
722
726
  } from "../../../../../../components/xform/utils/util";
723
727
  import Sortable from "sortablejs";
724
728
  import requestaccessDialog from "../../../../../../views/user/form/report_requestaccess/dialog.vue";
@@ -1065,6 +1069,19 @@ export default {
1065
1069
  dynamicSchemaConvertDisplay() {
1066
1070
  return this.optionModel.dynamicSchemaConvert || "";
1067
1071
  },
1072
+ isPagedReturnType() {
1073
+ return isPagedCollectionReturnType(this.optionModel.accessReturnType);
1074
+ },
1075
+ },
1076
+ watch: {
1077
+ "optionModel.accessReturnType": {
1078
+ immediate: true,
1079
+ handler(val) {
1080
+ if (isPagedCollectionReturnType(val)) {
1081
+ this.optionModel.showPagination = true;
1082
+ }
1083
+ },
1084
+ },
1068
1085
  },
1069
1086
  mounted: function () {
1070
1087
  const preloadColumnDialog = () => {
@@ -59,10 +59,11 @@
59
59
  <el-input v-model="scope.row.prop"></el-input>
60
60
  </template>
61
61
  </el-table-column>
62
- <!-- 「列宽」已移除:H5 明细卡片是 dl/dt/dd 排版,不读列宽 —— 它当年是从数据表格
63
- 那套列配置沿用过来的,运行期只被塞进一个拼错的键(witdh)、无人读取。
64
- 列在卡片里占整行还是半行,由下面的「H5列宽」控制。
65
- 存量模板里残留的 width 值不用清,读不到就是了。 -->
62
+ <el-table-column :label="i18nt('designer.setting.columnWidth')" width="100" prop="width">
63
+ <template slot-scope="scope">
64
+ <el-input v-model="scope.row.width"></el-input>
65
+ </template>
66
+ </el-table-column>
66
67
  <el-table-column :label="i18nt('designer.setting.visibleColumn')" width="70" prop="show">
67
68
  <template slot-scope="scope">
68
69
  <el-switch v-model="scope.row.show"></el-switch>
@@ -78,21 +79,6 @@
78
79
  <el-switch v-model="scope.row.showForRow"></el-switch>
79
80
  </template>
80
81
  </el-table-column>
81
- <!-- H5 明细卡片里这个字段占整行还是半行(半行=一行两个)。
82
- 不配即整行,运行期判等只认 'half'(存量列读到 undefined 就是整行),
83
- 不能写成 !== 'full'。样式见 xform/styles/h5.scss 块 I2。
84
- ★ 用 :value + $set 而不是 v-model:h5Span 是后加的键,存量列上没有,
85
- Vue 2 只给赋值那一刻已存在的属性装 getter/setter,直接 v-model
86
- 新增属性追踪不到,选完不回显。 -->
87
- <el-table-column label="H5列宽" width="110" prop="h5Span">
88
- <template slot-scope="scope">
89
- <el-select :value="scope.row.h5Span" clearable placeholder="整行"
90
- @input="v => $set(scope.row, 'h5Span', v)">
91
- <el-option value="full" label="整行"></el-option>
92
- <el-option value="half" label="半行(一行两个)"></el-option>
93
- </el-select>
94
- </template>
95
- </el-table-column>
96
82
  <el-table-column :label="i18nt('designer.setting.formatOfColumn')" width="200" prop="formatS">
97
83
  <template slot-scope="scope">
98
84
  <el-select v-model="scope.row.formatS" @change="changeFormatS(scope.row)" clearable>
@@ -455,11 +441,38 @@ export default {
455
441
  },
456
442
  {
457
443
  label: 'edit Format',
458
- /* H5 暂时只读:编辑格式只留下拉框,其余先不下发 */
459
444
  options: [
445
+ {
446
+ value: 'editInput',
447
+ label: '文本输入框'
448
+ },
449
+ {
450
+ value: 'editNumber',
451
+ label: '数字输入框'
452
+ },
453
+ {
454
+ value: 'editDate',
455
+ label: '日期输入框'
456
+ },
460
457
  {
461
458
  value: 'editSelect',
462
459
  label: '下拉框'
460
+ },
461
+ {
462
+ value: 'editSearch',
463
+ label: '搜索框'
464
+ },
465
+ {
466
+ value: 'editDelete',
467
+ label: '删除按钮'
468
+ },
469
+ {
470
+ value: 'editButton',
471
+ label: '查看按钮'
472
+ },
473
+ {
474
+ value: 'button',
475
+ label: '按钮'
463
476
  }
464
477
  ]
465
478
  },
@@ -21,6 +21,8 @@ import {
21
21
  traverseAllWidgetsNew,
22
22
  isAttachmentWidgetType,
23
23
  isVabsearchMultiWidget,
24
+ isPagedCollectionReturnType,
25
+ shouldShowDataTablePagination,
24
26
  XFORM_ROW_CLEAN_FIELDS,
25
27
  } from "../../../../components/xform/utils/util";
26
28
  import {
@@ -266,6 +268,12 @@ modules = {
266
268
  let formRef = this.getFormRef();
267
269
  return formRef.dataId;
268
270
  },
271
+ /**
272
+ * 分页集合数据必须显示分页,否则查询结果按 records/total 解析会报错。
273
+ */
274
+ isPaginationVisible() {
275
+ return shouldShowDataTablePagination(this.widget.options);
276
+ },
269
277
  },
270
278
  created: function () {
271
279
  if (!this.formModel[this.fieldKeyName])
@@ -2697,7 +2705,9 @@ modules = {
2697
2705
  let tableRef = this.getTableRef();
2698
2706
  let formDataModel = this.getFormRef().formDataModel;
2699
2707
  let isQueryTable = this.widget.options.isQueryTable || false;
2700
- let isDataPage = this.widget.options.accessReturnType === "2";
2708
+ let isDataPage = isPagedCollectionReturnType(
2709
+ this.widget.options.accessReturnType
2710
+ );
2701
2711
  let reportTemplate = this.getFormRef().reportTemplate;
2702
2712
  let formCode = reportTemplate.formCode;
2703
2713
  let dataId = this.formDataId;
@@ -2719,7 +2729,7 @@ modules = {
2719
2729
  paramFun = () => {
2720
2730
  let conditions = this.getSearchCondition();
2721
2731
  let $grid = this.getGridTable();
2722
- if (this.widget.options.showPagination) {
2732
+ if (this.isPaginationVisible) {
2723
2733
  let proxyInfo = $grid.getProxyInfo();
2724
2734
  let searchCount = true;
2725
2735
  let isQueryAllPage = getTableStateValue($grid, "isQueryAllPage");
@@ -3166,9 +3176,7 @@ modules = {
3166
3176
  config: {
3167
3177
  height: height,
3168
3178
  showFooter,
3169
- pagerConfig: this.widget.options.showPagination
3170
- ? pagerConfig
3171
- : false,
3179
+ pagerConfig: this.isPaginationVisible ? pagerConfig : false,
3172
3180
  treeConfig,
3173
3181
  rowConfig,
3174
3182
  headerCellStyle,
@@ -3799,10 +3807,10 @@ modules = {
3799
3807
  getScriptCode() {
3800
3808
  let accessReturnType = this.widget.options.accessReturnType;
3801
3809
  let defaultScriptCode = "getList";
3802
- if (accessReturnType === "1") {
3803
- defaultScriptCode = "getList";
3804
- } else if (accessReturnType === "2") {
3810
+ if (isPagedCollectionReturnType(accessReturnType)) {
3805
3811
  defaultScriptCode = "getPage";
3812
+ } else if (String(accessReturnType) === "1") {
3813
+ defaultScriptCode = "getList";
3806
3814
  }
3807
3815
  let scriptCode = this.widget.options.formScriptCode || defaultScriptCode;
3808
3816
  return scriptCode;