cloud-web-corejs 1.0.280 → 1.1.0-dev.4

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 (159) hide show
  1. package/package.json +6 -2
  2. package/src/components/VabUpload/image-viewer.vue +442 -442
  3. package/src/components/VabUpload/index.vue +44 -2
  4. package/src/components/VabUpload/mixins.js +174 -34
  5. package/src/components/VabUpload/previewGroup.js +128 -0
  6. package/src/components/VabUpload/view.vue +247 -209
  7. package/src/components/baseTabs/mixins.js +181 -181
  8. package/src/components/bizTab/BizBillActions.vue +129 -0
  9. package/src/components/bizTab/BizTabListPage.vue +391 -0
  10. package/src/components/bizTab/README.md +378 -0
  11. package/src/components/bizTab/billTableUtil.js +48 -0
  12. package/src/components/bizTab/billValidators.js +136 -0
  13. package/src/components/bizTab/bizBillDetailMixin.js +705 -0
  14. package/src/components/bizTab/index.js +24 -0
  15. package/src/components/excelExport/exportFieldDialog.vue +23 -12
  16. package/src/components/excelExport/exportItemConfigUtil.js +30 -0
  17. package/src/components/excelExport/mixins.js +3 -3
  18. package/src/components/mobile/statusTag/mixins.js +1 -61
  19. package/src/components/mobile/wf/content.vue +1662 -1556
  20. package/src/components/mobile/wf/mixins/wfModifyDialogMixin.js +8 -6
  21. package/src/components/table/config.js +78 -78
  22. package/src/components/table/index.js +1276 -1276
  23. package/src/components/table/plugins/cell-area/index.js +1055 -0
  24. package/src/components/table/plugins/cell-area/index.scss +77 -0
  25. package/src/components/table/plugins/cell-area/util.js +224 -0
  26. package/src/components/table/tableForm.vue +330 -330
  27. package/src/components/table/tableFormMixin.js +318 -318
  28. package/src/components/table/vxeFilter/index.js +163 -163
  29. package/src/components/table/vxeFilter/mixin.js +316 -316
  30. package/src/components/wf/content.vue +1188 -1188
  31. package/src/components/wf/wf.js +40 -20
  32. package/src/components/wf/wfActionDropdown.vue +1 -1
  33. package/src/components/wf/wfActionItems.js +1 -1
  34. package/src/components/xform/docs/2026-08 xform H5 P0 /345/256/236/347/216/260/350/247/204/346/240/274.md" +528 -0
  35. package/src/components/xform/docs/2026-08 xform H5 P1 /345/256/236/347/216/260/350/247/204/346/240/274.md" +412 -0
  36. package/src/components/xform/docs/2026-08 xform H5 P2 /345/256/236/347/216/260/350/247/204/346/240/274.md" +287 -0
  37. package/src/components/xform/docs/2026-08 xform /347/247/273/345/212/250/347/253/257/345/270/203/345/261/200/345/257/271/351/275/220 bill_setting /346/226/271/346/241/210.md" +400 -0
  38. package/src/components/xform/form-designer/designer.js +15 -0
  39. package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +269 -269
  40. package/src/components/xform/form-designer/form-widget/container-widget/detail-temp-widget.vue +132 -0
  41. package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +250 -250
  42. package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +319 -320
  43. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +365 -365
  44. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +554 -555
  45. package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +409 -409
  46. package/src/components/xform/form-designer/form-widget/field-widget/a-link-widget.vue +150 -132
  47. package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +114 -114
  48. package/src/components/xform/form-designer/form-widget/field-widget/date-widget.vue +154 -154
  49. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +47 -1
  50. package/src/components/xform/form-designer/form-widget/field-widget/mixins/date-limit-mixin.js +178 -178
  51. package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +77 -77
  52. package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +6 -0
  53. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +139 -139
  54. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +106 -106
  55. package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +134 -134
  56. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +1 -0
  57. package/src/components/xform/form-designer/setting-panel/form-setting.vue +39 -39
  58. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +10 -10
  59. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +438 -432
  60. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +2103 -2103
  61. package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-temp-edito.vue +90 -0
  62. package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +82 -82
  63. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +19 -5
  64. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +8 -8
  65. package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +137 -137
  66. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
  67. package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +43 -43
  68. package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +43 -43
  69. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +96 -96
  70. package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +51 -0
  71. package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +42 -42
  72. package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +43 -43
  73. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +158 -158
  74. package/src/components/xform/form-designer/setting-panel/property-editor/h5Span-editor.vue +51 -0
  75. package/src/components/xform/form-designer/setting-panel/property-editor/itemStyle-editor.vue +39 -0
  76. package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +188 -188
  77. package/src/components/xform/form-designer/setting-panel/property-editor/styleTempClass-editor.vue +51 -0
  78. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +347 -347
  79. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +4 -0
  80. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +59 -3
  81. package/src/components/xform/form-render/container-item/data-table-mixin.js +151 -93
  82. package/src/components/xform/form-render/container-item/detail-h5-item.vue +183 -32
  83. package/src/components/xform/form-render/container-item/detail-temp-item.vue +110 -0
  84. package/src/components/xform/form-render/container-item/h5-card-pane-item.vue +160 -140
  85. package/src/components/xform/form-render/container-item/list-h5-item.vue +1688 -1700
  86. package/src/components/xform/form-render/index.vue +153 -147
  87. package/src/components/xform/form-render/indexMixin.js +12 -0
  88. package/src/components/xform/lang/en-US.js +10 -0
  89. package/src/components/xform/lang/zh-CN.js +12 -0
  90. package/src/components/xform/mixins/defaultHandle.js +707 -707
  91. package/src/components/xform/styles/h5.scss +1992 -0
  92. package/src/components/xform/utils/textMaskUtil.js +182 -179
  93. package/src/components/xform/utils/treeTableUtil.js +1292 -1265
  94. package/src/components/xform/utils/util.js +56 -11
  95. package/src/index.js +9 -4
  96. package/src/layout/components/extractedCode/viewDialog.vue +7 -7
  97. package/src/router/index.js +21 -0
  98. package/src/router/modules/customer.js +71 -14
  99. package/src/store/modules/permission.js +17 -18
  100. package/src/utils/pdfUtil.js +429 -429
  101. package/src/utils/resolveViewComponent.js +142 -16
  102. package/src/views/bd/project/branch/bd_branch/edit.vue +145 -0
  103. package/src/views/bd/project/branch/bd_branch/list.vue +72 -0
  104. package/src/views/bd/project/branch/bd_branch/menuKindDialog.vue +106 -0
  105. package/src/views/bd/project/branch/bd_branch/mixins/edit.js +189 -0
  106. package/src/views/bd/project/branch/bd_branch/mixins/list.js +124 -0
  107. package/src/views/bd/project/branch/bd_branch/mixins/menuKindDialog.js +85 -0
  108. package/src/views/bd/project/branch/form_script/list.vue +31 -0
  109. package/src/views/bd/project/branch/form_template/list.vue +30 -0
  110. package/src/views/bd/project/branch/menu_kind/list.vue +31 -0
  111. package/src/views/bd/project/common/form_script/list.vue +16 -0
  112. package/src/views/bd/project/common/form_template/list.vue +15 -0
  113. package/src/views/bd/project/common/menu_kind/list.vue +15 -0
  114. package/src/views/bd/project/core/branchContext.js +100 -0
  115. package/src/views/bd/project/core/branchPage.js +78 -0
  116. package/src/views/bd/project/core/branchPageWrap.vue +225 -0
  117. package/src/views/bd/project/core/branchScope.js +44 -0
  118. package/src/views/bd/project/core/branchSearchPage.js +285 -0
  119. package/src/views/bd/project/core/branchSelect.vue +85 -0
  120. package/src/views/bd/project/core/branchTreeBar.vue +81 -0
  121. package/src/views/bd/project/core/httpBranchPatch.js +58 -0
  122. package/src/views/bd/project/datatable/menu_kind/list.vue +15 -0
  123. package/src/views/bd/project/datatable/table_model/list.vue +15 -0
  124. package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
  125. package/src/views/bd/setting/table_model/edit.vue +1066 -1066
  126. package/src/views/bd/setting/table_model/mixins/edit.js +1455 -1455
  127. package/src/views/bd/setting/table_model/mixins/zdDialog.js +148 -148
  128. package/src/views/demo/bizTab/bill/billConfig.js +41 -0
  129. package/src/views/demo/bizTab/bill/detail.vue +436 -0
  130. package/src/views/demo/bizTab/bill/list.vue +288 -0
  131. package/src/views/demo/bizTab/bill/productDialog.vue +176 -0
  132. package/src/views/demo/bizTab/simple/billApi.js +123 -0
  133. package/src/views/demo/bizTab/simple/detail.vue +407 -0
  134. package/src/views/demo/bizTab/simple/list.vue +217 -0
  135. package/src/views/demo/bizTab/standalone/index.vue +121 -0
  136. package/src/views/demo/bizTab/wf/billConfig.js +44 -0
  137. package/src/views/demo/bizTab/wf/detail.vue +661 -0
  138. package/src/views/demo/bizTab/wf/list.vue +242 -0
  139. package/src/views/support/form-dialog-demo/demoPickerDialog.vue +72 -0
  140. package/src/views/support/form-dialog-demo/index.vue +537 -0
  141. package/src/views/user/file_view_ins/list.vue +3 -3
  142. package/src/views/user/home/index.vue +8 -6
  143. package/src/views/user/home/wjl/content.vue +1569 -0
  144. package/src/views/user/notify_message/dialog.vue +7 -5
  145. package/src/views/user/outLink/cc_form_view.vue +188 -0
  146. package/src/views/user/outLink/form_view.vue +2 -2
  147. package/src/views/user/outLink/index.vue +4 -4
  148. package/src/views/user/outLink/view.vue +3 -3
  149. package/src/views/user/role/edit.vue +632 -632
  150. package/src/views/user/role/list.vue +260 -260
  151. package/src/views/user/wf/iframe/index.vue +3 -3
  152. package/src/views/user/wf/iframe/index2.vue +3 -3
  153. package/src/views/user/wf/wf_manage/list.vue +1112 -1116
  154. package/src/views/user/wf/wf_manage/list2.vue +9 -13
  155. package/src/views/user/wf/wf_manage/wfContentDialog.vue +8 -5
  156. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +0 -106
  157. package/src/components/xform/form-designer/form-widget/field-widget/tableexportbuttonwidget.vue +0 -99
  158. package/src/components/xform/form-render/container-item/list-h5-item2.vue +0 -1340
  159. package/src/utils/wf.js +0 -766
@@ -18,9 +18,20 @@
18
18
  * 因此无需注册表——归属靠访问路径结构 + 本应用 appCode 比较即可;独立运行 /
19
19
  * 主应用态(appCode 为空、无 /micro/ 前缀)会自动退化为与历史一致的本地解析。
20
20
  *
21
- * webpack 硬约束:@base/views 与 @/views 两条动态 require 必须保留字面前缀,
21
+ * webpack 硬约束:@base/views 与 @/views 两条动态 import 必须保留字面前缀,
22
22
  * 不可把前缀变量化,否则 webpack 无法收集 context。包被消费时 @base 指向包内
23
23
  * views、@/ 指向消费应用 views——这正是 base / localPrivate 的语义来源。
24
+ *
25
+ * 2026-08 改造:这两条从同步 require 改为 import()(mode:"lazy")。原先同步 context
26
+ * 把两仓 2300+ 个视图全部焊进入口 chunk——app.js 20MB、全站只有 53 个 chunk,
27
+ * 路由里的 () => import(...) 全部作废。三条不变量:
28
+ * ① 本文件是两仓中**唯一**允许书写「视图路径拼接 import」的地方。ContextModule 的
29
+ * 同一性由 mode/regExp/include/exclude/chunkName/namespaceObject 共同决定,别处再写
30
+ * 一条(magic comment 不一致、或写在 CJS 模块里)就会分叉出第二条 context,
31
+ * 同一批视图产出约 2300 个重复 chunk。其余调用点一律走 loadViewComponentAsync。
32
+ * ② 每条 context root 全有全无:任何一处残留的同步 require("@/views" + x) 都会让
33
+ * 整条 root 退回 mode:"sync" 并重新焊回入口包,且无报错无日志。
34
+ * ③ resolveViewPath 保持纯同步——tests/unit/utils/resolveViewComponent.spec.js 只测它。
24
35
  */
25
36
  import {
26
37
  getOwnerSegment,
@@ -136,14 +147,101 @@ export function resolveViewPath(rawUrl, options = {}) {
136
147
  return { kind: "localPrivate", base: false, rel: ensureVue(ensureLeadingSlash(path)) };
137
148
  }
138
149
 
139
- // ——— 以下为 require 落地层(依赖 webpack context,不进纯函数单测) ———
150
+ // ——— 以下为 import 落地层(依赖 webpack context,不进纯函数单测) ———
151
+
152
+ // 见文件头不变量 ①:全仓只有这两行可以写视图路径拼接 import,magic comment 必须一致。
153
+ //
154
+ // ⚠ dev 与 prod 必须分两条路径写,原因见下:
155
+ //
156
+ // dev 的 babel.config.js 启用了 babel-plugin-dynamic-import-node。它对**任何**
157
+ // import(非常量) 都会转成(lib/index.js: builders.dynamic):
158
+ // Promise.resolve(`${表达式}`).then(s => require(s))
159
+ // require 拿到的是变量 s,字面前缀彻底消失 —— webpack 的 splitContextFromPrefix
160
+ // 建不出 views context,退化成运行时 require。写成模板字面量也没用:
161
+ // `@base/views${rel}` 含插值,同样走 builders.dynamic(只有无插值的常量才走 static)。
162
+ // 症状是 dev 下所有菜单报 "Cannot find module '@base/views/xxx.vue'",
163
+ // **签名是报错里带完整请求串而不是 ./views/... 这种 context 相对键**——
164
+ // 带相对键说明 context 建对了只是缺文件,带完整串说明 context 压根没建出来。
165
+ // 生产构建不过这个插件,所以这个坑**只坏 dev、产物完全正常**,体积数字全绿,极易漏测。
166
+ //
167
+ // 因此 dev 分支保留同步 require(webpack 在解析期就消除 if(false) 死分支,
168
+ // 生产端不会因这一行建出 mode:"sync" 的 ContextModule —— 已用构建数字实测:
169
+ // 加这个分支前后 chunk 数与 app.js 字节数完全一致)。
170
+ // dev 侧行为与改造前一模一样:同步 context、HMR 速度不变,收益也测不出来
171
+ // (量化只能用 build:prod)。try/catch 是为了把同步抛错转成 reject,
172
+ // 好让下面 importViewCandidates 的候选链在 dev 下同样生效。
173
+ //
174
+ // 见文件头不变量 ①:全仓只有这两个函数可以写视图路径拼接的 import / require。
175
+ function importBaseView(rel) {
176
+ if (process.env.NODE_ENV === "development") {
177
+ try {
178
+ return Promise.resolve(require("@base/views" + rel));
179
+ } catch (e) {
180
+ return Promise.reject(e);
181
+ }
182
+ }
183
+ return import(/* webpackInclude: /\.vue$/ */ `@base/views${rel}`);
184
+ }
185
+
186
+ function importAppView(rel) {
187
+ if (process.env.NODE_ENV === "development") {
188
+ try {
189
+ return Promise.resolve(require("@/views" + rel));
190
+ } catch (e) {
191
+ return Promise.reject(e);
192
+ }
193
+ }
194
+ return import(/* webpackInclude: /\.vue$/ */ `@/views${rel}`);
195
+ }
196
+
197
+ /** 已解析视图的 Promise 缓存:同一详情页重复打开不重复拉 chunk */
198
+ const viewModuleCache = new Map();
199
+
200
+ /**
201
+ * 候选链:先带 .vue(与旧同步 require 行为完全一致),命中不了再试去后缀。
202
+ * 去后缀这条覆盖 b/index.vue 的目录式写法——loadViewComponent 自己走 ensureVue 永远
203
+ * 命中不了,但 store/modules/permission.js 的菜单 url 会(它原先把裸 url 直接丢给
204
+ * context,靠 RequireContextPlugin 生成的无后缀候选键命中)。顺序不能反:a/b.vue 与
205
+ * a/b/index.vue 并存时无后缀键有歧义,带后缀那条才是确定的。
206
+ */
207
+ function importViewCandidates(base, rel) {
208
+ const load = base ? importBaseView : importAppView;
209
+ const bare = rel.replace(/\.vue$/i, "");
210
+ return load(rel).catch((e) =>
211
+ bare === rel ? Promise.reject(e) : load(bare).catch(() => Promise.reject(e))
212
+ );
213
+ }
140
214
 
141
- function requireBaseView(rel) {
142
- return require("@base/views" + rel);
215
+ function getViewModule(base, rel) {
216
+ const key = (base ? "@base" : "@") + rel;
217
+ let p = viewModuleCache.get(key);
218
+ if (!p) {
219
+ p = importViewCandidates(base, rel).catch((e) => {
220
+ // 失败不缓存,允许用户重试后重新拉取
221
+ // (同 components/micro-view-host/index.vue 的 registryCache 处理)
222
+ viewModuleCache.delete(key);
223
+ return Promise.reject(e);
224
+ });
225
+ viewModuleCache.set(key, p);
226
+ }
227
+ return p;
143
228
  }
144
229
 
145
- function requireAppView(rel) {
146
- return require("@/views" + rel);
230
+ /**
231
+ * 区分「真缺文件」与「chunk 加载失败」。
232
+ * 视图改按需加载后多出一类以前不可能发生的故障:chunk 404(发版后旧标签页哈希失效)、
233
+ * 超时、或被网关截断(截断表现为 chunk 内 SyntaxError,不是网络错误)。这类错误若沿用
234
+ * webpack 的 "Cannot find module" 文案会把排查引向「菜单配错路径」的错误方向,故在此改写
235
+ * 提示语;原始错误挂 .cause 供排查,.viewChunkLoadFailed 供调用方判定是否值得提示刷新。
236
+ */
237
+ function normalizeViewError(e) {
238
+ if (e && e.code === "MODULE_NOT_FOUND") return e;
239
+ const err = new Error(
240
+ "页面资源加载失败,请刷新重试(" + ((e && e.message) || e) + ")"
241
+ );
242
+ err.cause = e;
243
+ err.viewChunkLoadFailed = true;
244
+ return err;
147
245
  }
148
246
 
149
247
  /**
@@ -171,13 +269,16 @@ function getRendererAppCode() {
171
269
  /**
172
270
  * 解析并加载详情页组件。resolveViewPath 的运行时外壳。
173
271
  *
272
+ * 异步:必须 await 之后再置显隐标志 / 调 $openEditView,否则弹窗会先开出空壳
273
+ * ($openEditView 是 200ms 定时放行,冷启动拉 chunk 常超过它)。
274
+ *
174
275
  * @param {string} rawUrl 同 resolveViewPath
175
276
  * @param {object} [options] 同 resolveViewPath;appCode 缺省时从 store 读取
176
- * @returns {object} resolveViewPath 的结果,附加 component 字段:
177
- * - base / localPrivate:component 为组件对象(require 失败或缺文件时为 null,附 error)
277
+ * @returns {Promise<object>} resolveViewPath 的结果,附加 component 字段:
278
+ * - base / localPrivate:component 为组件对象(缺文件或 chunk 加载失败时为 null,附 error)
178
279
  * - remote / empty / unknown:component 为 null,由调用方决定后续(装载子应用 / 兜底提示)
179
280
  */
180
- export function loadViewComponent(rawUrl, options = {}) {
281
+ export async function loadViewComponentAsync(rawUrl, options = {}) {
181
282
  const opts = Object.assign({}, options);
182
283
  if (opts.appCode == null) opts.appCode = getRendererAppCode();
183
284
 
@@ -186,18 +287,43 @@ export function loadViewComponent(rawUrl, options = {}) {
186
287
  return Object.assign({ component: null }, result);
187
288
  }
188
289
  try {
189
- const mod = result.base ? requireBaseView(result.rel) : requireAppView(result.rel);
290
+ const mod = await getViewModule(result.base, result.rel);
190
291
  return Object.assign({ component: mod && mod.default }, result);
191
292
  } catch (e) {
192
- return Object.assign({ component: null, error: e }, result);
293
+ return Object.assign({ component: null, error: normalizeViewError(e) }, result);
193
294
  }
194
295
  }
195
296
 
196
297
  /**
197
- * 兼容旧签名的便捷封装:直接返回组件对象(或 null)。
198
- * 供 components/wf/wf.js、mobile wfModifyDialogMixin.js 的 requireView 平滑替换——
199
- * 它们历史上返回 require(...).default。remote / 缺文件时返回 null(不再抛错崩溃)。
298
+ * 便捷封装:直接拿组件对象(或 null)。
299
+ * 供 components/wf/wf.js、mobile wfModifyDialogMixin.js 的 requireView 使用。
300
+ * remote / 缺文件 / chunk 加载失败时返回 null(不抛错崩溃)。
301
+ */
302
+ export function requireViewAsync(rawUrl, options = {}) {
303
+ return loadViewComponentAsync(rawUrl, options).then((r) => r.component);
304
+ }
305
+
306
+ /**
307
+ * 旧同步 API 的迁移桩。
308
+ *
309
+ * 不能保留一份「能用的同步实现」:它的本体就是同步 require(expr),留着就会把
310
+ * mode:"sync" 的 ContextModule 复活,消费方的入口包原样退回 20MB(见文件头不变量 ②)。
311
+ * 也不能沿用原名改成返回 Promise——未迁移的调用方读 res.component 会静默拿到 undefined,
312
+ * 渲染成一片空白且无任何报错。故改名 + 旧名抛错:把「静默错渲染」换成可 grep 的堆栈。
200
313
  */
201
- export function requireViewCompat(rawUrl, options = {}) {
202
- return loadViewComponent(rawUrl, options).component;
314
+ const ASYNC_MIGRATION_MSG =
315
+ "loadViewComponent / requireViewCompat 已改为异步。"
316
+ + "请改用 loadViewComponentAsync(url, opts) -> Promise<{component,...}> "
317
+ + "或 requireViewAsync(url, opts) -> Promise<Component|null>,并在调用处 await——"
318
+ + "务必 await 之后再置显隐标志 / 调 $openEditView,否则弹窗会先开出空壳。"
319
+ + "同时把本仓所有 require(\"@/views\" + x) / require(\"@base/views\" + x) 一并改掉:"
320
+ + "只要残留一处,该条 context 就退回 mode:\"sync\",整棵 views 重新焊回入口包(全有全无)。"
321
+ + "见 cloud-web-corejs CHANGELOG 1.1.0。";
322
+
323
+ export function loadViewComponent() {
324
+ throw new TypeError("[resolveViewComponent] " + ASYNC_MIGRATION_MSG);
325
+ }
326
+
327
+ export function requireViewCompat() {
328
+ throw new TypeError("[resolveViewComponent] " + ASYNC_MIGRATION_MSG);
203
329
  }
@@ -0,0 +1,145 @@
1
+ <template>
2
+ <div class="detail-wrap">
3
+ <el-form ref="editForm" :model="bdBranch">
4
+ <div class="d-header clearfix">
5
+ <div class="fl">
6
+ <i class="el-icon-info" />
7
+ {{ dataId ? $t1("查看分支定义") : $t1("新增分支定义") }}
8
+ </div>
9
+ <div class="fr">
10
+ <el-button
11
+ type="primary"
12
+ plain
13
+ class="button-sty"
14
+ @click="$baseReload()"
15
+ icon="el-icon-refresh-right"
16
+ >
17
+ {{ $t1("重置") }}
18
+ </el-button>
19
+ <el-button
20
+ type="primary"
21
+ class="button-sty"
22
+ icon="el-icon-check"
23
+ @click="saveData"
24
+ >{{ $t1("保存") }}
25
+ </el-button>
26
+ </div>
27
+ </div>
28
+ <div class="d-cont">
29
+ <div class="d-item">
30
+ <div class="title first">
31
+ <b>{{ $t1("基本信息") }}</b>
32
+ </div>
33
+ <table class="table-detail">
34
+ <tbody>
35
+ <tr>
36
+ <th>
37
+ <em class="f-red">*</em>
38
+ {{ $t1("分支编码") }}
39
+ </th>
40
+ <td>
41
+ <el-form-item prop="branchCode" :rules="branchCodeRules">
42
+ <el-input
43
+ type="text"
44
+ autocomplete="off"
45
+ v-model="bdBranch.branchCode"
46
+ :disabled="isEdit"
47
+ clearable
48
+ />
49
+ </el-form-item>
50
+ </td>
51
+ <th>
52
+ <em class="f-red">*</em>
53
+ {{ $t1("分支名称") }}
54
+ </th>
55
+ <td>
56
+ <el-form-item prop="branchName" :rules="branchNameRules">
57
+ <el-input
58
+ type="text"
59
+ autocomplete="off"
60
+ v-model="bdBranch.branchName"
61
+ clearable
62
+ />
63
+ </el-form-item>
64
+ </td>
65
+ <th>{{ $t1("是否启用") }}</th>
66
+ <td>
67
+ <el-switch v-model="bdBranch.enabled"></el-switch>
68
+ </td>
69
+ </tr>
70
+ <tr>
71
+ <th>{{ $t1("备注") }}</th>
72
+ <td colspan="5">
73
+ <el-input
74
+ type="textarea"
75
+ :rows="2"
76
+ :placeholder="$t1('请输入内容')"
77
+ size="small"
78
+ v-model="bdBranch.remark"
79
+ clearable
80
+ ></el-input>
81
+ </td>
82
+ </tr>
83
+ <tr>
84
+ <th>{{ $t1("创建人") }}</th>
85
+ <td>{{ bdBranch.createBy }}</td>
86
+ <th>{{ $t1("创建时间") }}</th>
87
+ <td>{{ bdBranch.createDate }}</td>
88
+ <th>{{ $t1("更新人") }}</th>
89
+ <td>{{ bdBranch.modifyBy }}</td>
90
+ </tr>
91
+ </tbody>
92
+ </table>
93
+ </div>
94
+ <div class="d-item">
95
+ <div class="title">
96
+ <b>{{ $t1("分支菜单类型") }}</b>
97
+ </div>
98
+ <div class="grid-height" style="height: 320px">
99
+ <vxe-grid
100
+ ref="table-menuKind"
101
+ :data="menuKindRows"
102
+ v-bind="menuKindOption"
103
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
104
+ @custom="$vxeTableUtil.customHandle"
105
+ >
106
+ <template #form>
107
+ <div class="clearfix screen-btns">
108
+ <div class="fl">
109
+ <vxe-button
110
+ status="primary"
111
+ class="button-sty"
112
+ icon="el-icon-plus"
113
+ @click="openMenuKindDialog"
114
+ >
115
+ {{ $t1("选择分类") }}
116
+ </vxe-button>
117
+ <span class="tips">{{
118
+ $t1("注:只能选择「分类-通用」的一级分类")
119
+ }}</span>
120
+ </div>
121
+ </div>
122
+ </template>
123
+ </vxe-grid>
124
+ </div>
125
+ </div>
126
+ </div>
127
+ </el-form>
128
+ <menuKindDialog
129
+ v-if="showMenuKindDialog"
130
+ :visiable.sync="showMenuKindDialog"
131
+ :rows="checkedMenuKindRows"
132
+ multi="true"
133
+ @confirm="confirmMenuKindDialog"
134
+ ></menuKindDialog>
135
+ </div>
136
+ </template>
137
+
138
+ <script>
139
+ import mixin from "./mixins/edit";
140
+
141
+ export default {
142
+ name: "bdBranchEdit",
143
+ mixins: [mixin],
144
+ };
145
+ </script>
@@ -0,0 +1,72 @@
1
+ <template>
2
+ <div id="containt">
3
+ <el-tabs v-model="activeName" class="tab-box">
4
+ <el-tab-pane :label="$t1('常规')" name="first">
5
+ <editView
6
+ v-if="showEdit"
7
+ visible-key="showEdit"
8
+ :_dataId.sync="dataId"
9
+ :parent-target="_self"
10
+ @reload="$reloadHandle"
11
+ ></editView>
12
+ </el-tab-pane>
13
+ <el-tab-pane :label="$t1('列表')" name="second">
14
+ <div class="grid-height">
15
+ <vxe-grid
16
+ ref="table-m1"
17
+ v-bind="vxeOption"
18
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
19
+ @custom="$vxeTableUtil.customHandle"
20
+ >
21
+ <template #form>
22
+ <tableForm
23
+ :formData.sync="formData"
24
+ @searchEvent="searchEvent"
25
+ @resetEvent="resetEvent"
26
+ >
27
+ <template #buttonLeft>
28
+ <vxe-button
29
+ status="primary"
30
+ class="button-sty"
31
+ icon="el-icon-plus"
32
+ @click="openEditDialog"
33
+ >
34
+ {{ $t1("新增") }}
35
+ </vxe-button>
36
+ </template>
37
+ <template #buttonRight>
38
+ <vxe-button
39
+ icon="el-icon-brush"
40
+ class="button-sty"
41
+ @click="resetEvent"
42
+ type="text"
43
+ status="primary"
44
+ plain
45
+ >{{ $t1("刷新") }}
46
+ </vxe-button>
47
+ <vxe-button
48
+ status="warning"
49
+ icon="el-icon-search"
50
+ class="button-sty"
51
+ @click="searchEvent"
52
+ >
53
+ {{ $t1("搜索") }}
54
+ </vxe-button>
55
+ </template>
56
+ </tableForm>
57
+ </template>
58
+ </vxe-grid>
59
+ </div>
60
+ </el-tab-pane>
61
+ </el-tabs>
62
+ </div>
63
+ </template>
64
+
65
+ <script>
66
+ import mixin from "./mixins/list";
67
+
68
+ export default {
69
+ name: "bd_branch:list",
70
+ mixins: [mixin],
71
+ };
72
+ </script>
@@ -0,0 +1,106 @@
1
+ <template>
2
+ <el-dialog
3
+ :title="$t1('分类-通用一级分类')"
4
+ :append-to-body="true"
5
+ :modal-append-to-body="true"
6
+ :close-on-click-modal="falseValue"
7
+ :visible.sync="showDialog"
8
+ :modal="falseValue"
9
+ custom-class="dialog-style list-dialog dialog-checkbox pd_0"
10
+ width="1000px"
11
+ @close="dialogClose"
12
+ v-el-drag-dialog
13
+ v-el-dialog-center
14
+ >
15
+ <div class="cont" style="height: 450px">
16
+ <vxe-grid
17
+ class="is-pointer"
18
+ ref="table-m1"
19
+ v-bind="vxeOption"
20
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
21
+ @custom="$vxeTableUtil.customHandle"
22
+ @checkbox-change="addDataTable"
23
+ @checkbox-all="checkAll"
24
+ @cell-dblclick="checkWithSubmit"
25
+ >
26
+ <template #form>
27
+ <div class="clearfix screen-btns">
28
+ <div class="fr">
29
+ <vxe-button
30
+ icon="el-icon-brush"
31
+ class="button-sty"
32
+ @click="resetEvent"
33
+ type="text"
34
+ status="primary"
35
+ plain
36
+ >{{ $t1("刷新") }}
37
+ </vxe-button>
38
+ <vxe-button
39
+ status="warning"
40
+ icon="el-icon-search"
41
+ class="button-sty"
42
+ @click="searchEvent"
43
+ >
44
+ {{ $t1("搜索") }}
45
+ </vxe-button>
46
+ </div>
47
+ </div>
48
+ <vxe-form
49
+ class="screen-box"
50
+ title-width="92px"
51
+ title-align="right"
52
+ :data="formData"
53
+ @submit="searchEvent"
54
+ @reset="resetEvent"
55
+ >
56
+ <vxe-form-item :title="$t1('表单分类名称') + ':'" field="name">
57
+ <template v-slot>
58
+ <el-input v-model="formData.name" size="small" clearable />
59
+ </template>
60
+ </vxe-form-item>
61
+ <vxe-button type="submit" @click="searchEvent" v-show="false"></vxe-button>
62
+ </vxe-form>
63
+ </template>
64
+ </vxe-grid>
65
+ </div>
66
+ <label id="labBtn" class="transverse">
67
+ <div class="icon">
68
+ <i class="el-icon-more"></i>
69
+ <i class="el-icon-more"></i>
70
+ </div>
71
+ </label>
72
+ <div class="multipleChoice">
73
+ <el-tooltip
74
+ :enterable="false"
75
+ effect="dark"
76
+ :content="$t1('全部删除')"
77
+ placement="top"
78
+ ><a class="allDel icon-quanbushanchu" @click="clearChecked()"></a
79
+ ></el-tooltip>
80
+ <div class="list">
81
+ <div class="item" v-for="(checkRow, index) in checkRows" :key="index">
82
+ <p>{{ checkRow.name }}</p>
83
+ <a class="el-icon-close" @click="clearTable1Select(index)"></a>
84
+ </div>
85
+ </div>
86
+ </div>
87
+ <span slot="footer" class="dialog-footer">
88
+ <el-button type="primary" plain class="button-sty" @click="dialogClose">
89
+ <i class="el-icon-close el-icon"></i>
90
+ {{ $t1("取 消") }}
91
+ </el-button>
92
+ <el-button type="primary" @click="dialogPrimary" class="button-sty">
93
+ <i class="el-icon-check el-icon"></i>
94
+ {{ $t1("确 定") }}
95
+ </el-button>
96
+ </span>
97
+ </el-dialog>
98
+ </template>
99
+
100
+ <script>
101
+ import mixin from "./mixins/menuKindDialog";
102
+
103
+ export default {
104
+ mixins: [mixin],
105
+ };
106
+ </script>