cloud-web-corejs 1.1.0-dev.22 → 1.1.0-dev.23
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.
- package/package.json +1 -1
- package/src/components/bizTab/BizTabListPage.vue +66 -33
- package/src/components/bizTab/README.md +3 -1
- package/src/components/mobile/wf/content.vue +27 -3
- package/src/components/table/index.js +5 -2
- package/src/components/table/plugins/cell-area/index.js +10 -3
- package/src/components/wf/wfStartDialog.vue +1 -0
- package/src/components/wf/wfUtil.js +47 -29
- package/src/components/wf/wfVisibility.js +6 -0
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +7 -0
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +3 -1
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +25 -1
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +14 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +318 -12
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +23 -7
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +48 -0
- package/src/components/xform/form-render/container-item/data-table-item.vue +8 -6
- package/src/components/xform/form-render/container-item/data-table-mixin.js +584 -24
- package/src/components/xform/form-render/container-item/detail-h5-item.vue +26 -16
- package/src/components/xform/form-render/container-item/detail-item.vue +350 -446
- package/src/components/xform/form-render/fieldControlMixin.js +2 -0
- package/src/components/xform/form-render/indexMixin.js +25 -15
- package/src/components/xform/mixins/businessLock.js +59 -0
- package/src/components/xform/mixins/wfStart.js +103 -0
- package/src/components/xform/mixins/wfVisibility.js +33 -0
- package/src/components/xform/styles/h5.scss +6 -1
- package/src/components/xform/utils/util.js +2 -0
- package/src/views/user/home/index.vue +1 -1
- package/src/views/user/home/net/distributor.vue +1015 -0
- package/src/views/user/home/net/index.vue +61 -0
|
@@ -123,7 +123,9 @@ import containerItemMixin from "./containerItemMixin"
|
|
|
123
123
|
import FieldComponents from '../../../../components/xform/form-designer/form-widget/field-widget/index'
|
|
124
124
|
|
|
125
125
|
|
|
126
|
-
import {getVisibleWfActionItems} from '../../../../components/wf/wfActionItems'
|
|
126
|
+
import {getVisibleWfActionItems} from '../../../../components/wf/wfActionItems'
|
|
127
|
+
import { isWfInfoHidden } from '@base/components/wf/wfVisibility'
|
|
128
|
+
import wfStartMixin from '@base/components/xform/mixins/wfStart'
|
|
127
129
|
|
|
128
130
|
/* H5 底栏只放这四个审批动作,其余(催办/加签/减签/沟通/修改候选人/撤回…)不进底栏。
|
|
129
131
|
★ 这里的书写序就是底栏的显示序:通过 → 驳回 → 中断 → 转办。 */
|
|
@@ -139,7 +141,7 @@ const H5_BOTTOM_MAX_BUTTONS = 3;
|
|
|
139
141
|
export default {
|
|
140
142
|
name: "detail-h5-item",
|
|
141
143
|
componentName: 'ContainerItem',
|
|
142
|
-
mixins: [emitter, i18n, refMixin, containerItemMixin],
|
|
144
|
+
mixins: [emitter, i18n, refMixin, containerItemMixin, wfStartMixin],
|
|
143
145
|
components: {
|
|
144
146
|
ContainerItemWrapper,
|
|
145
147
|
...FieldComponents,
|
|
@@ -155,7 +157,8 @@ export default {
|
|
|
155
157
|
inject: ['refList', 'sfRefList', 'globalModel', 'previewState'],
|
|
156
158
|
created() {
|
|
157
159
|
this.initRefList()
|
|
158
|
-
this.handleOnCreated();
|
|
160
|
+
this.handleOnCreated();
|
|
161
|
+
this.initWfStartSettings();
|
|
159
162
|
},
|
|
160
163
|
mounted() {
|
|
161
164
|
this.handleOnMounted();
|
|
@@ -175,10 +178,8 @@ export default {
|
|
|
175
178
|
* (wfStartOption / wfStartCtx / wfParam / hasWf),入参也在那边算好
|
|
176
179
|
* (objId = dataId、wfCode = reportTemplate.objTypeCode,见 indexMixin:1394)。
|
|
177
180
|
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
* 早于流程就绪时求得的空值缓存住。监听 hasWf 也不行 —— 单据没启动流程时
|
|
181
|
-
* 它是 false 赋 false,watcher 根本不触发。
|
|
181
|
+
* 用方法统一 PC/H5 的实时取值口径。wfStartOption / wfStartCtx 已在 form-render
|
|
182
|
+
* 的 data 中声明,未启动流程时即使 hasWf 仍为 false,参数就绪也会触发重渲染。
|
|
182
183
|
*
|
|
183
184
|
* 注意:容器 options 上那个 wfEnabled 是旧路径的开关,与表单设置里的
|
|
184
185
|
* formConfig.wfEnabled 不是一回事,这里一律以表单实例的状态为准。
|
|
@@ -198,7 +199,7 @@ export default {
|
|
|
198
199
|
},
|
|
199
200
|
/**
|
|
200
201
|
* 映射成移动版 content.vue 要的 wfOption。
|
|
201
|
-
* 结果缓存在非响应式实例属性上:模板里调用的方法每次渲染都会执行,
|
|
202
|
+
* 结果缓存在非响应式实例属性上:模板里调用的方法每次渲染都会执行,
|
|
202
203
|
* 每次返回新对象会让子组件 props 无谓变化;而在渲染期写 data 会触发重渲染循环。
|
|
203
204
|
*/
|
|
204
205
|
getWfOption() {
|
|
@@ -221,7 +222,9 @@ export default {
|
|
|
221
222
|
/* 流程面板:已启动流程且非预览态才渲染 */
|
|
222
223
|
showWfPanel() {
|
|
223
224
|
let ws = this.wfStart();
|
|
224
|
-
|
|
225
|
+
const formRef = this.getFormRef && this.getFormRef();
|
|
226
|
+
return !this.previewState && !!ws && ws.hasWf
|
|
227
|
+
&& !isWfInfoHidden(formRef, ws.option) && !isWfInfoHidden(ws.ctx);
|
|
225
228
|
},
|
|
226
229
|
/* 宿主通过 $attrs 传「进来就展开流程区」,与 PC 版 wfUtil 同口径 */
|
|
227
230
|
getDefaultShowWfContent() {
|
|
@@ -229,9 +232,15 @@ export default {
|
|
|
229
232
|
let target = ws && ws.ctx;
|
|
230
233
|
return !!(target && target.$attrs && target.$attrs.defaultShowWfContent);
|
|
231
234
|
},
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
+
wfStartButtons() {
|
|
236
|
+
if (!this.showWfStartBtn()) return [];
|
|
237
|
+
return [{
|
|
238
|
+
__builtin: 'wfStart',
|
|
239
|
+
label: this.wfStartButtonName,
|
|
240
|
+
type: 'success',
|
|
241
|
+
onClick: () => this.startWf(),
|
|
242
|
+
}];
|
|
243
|
+
},
|
|
235
244
|
/**
|
|
236
245
|
* 审批动作按钮(通过/驳回/中断/转办)。
|
|
237
246
|
*
|
|
@@ -242,8 +251,9 @@ export default {
|
|
|
242
251
|
* run 则要真实的面板实例,点击时才从 $refs 取 —— 那时面板一定已经渲染好了。
|
|
243
252
|
* 面板内那一排同名按钮由 :hideActions="true" 藏掉,不会出现两份。
|
|
244
253
|
*/
|
|
245
|
-
wfActionButtons() {
|
|
246
|
-
|
|
254
|
+
wfActionButtons() {
|
|
255
|
+
if (!this.showWfPanel()) return [];
|
|
256
|
+
let ws = this.wfStart();
|
|
247
257
|
if (!ws || !ws.hasWf || this.previewState) return []
|
|
248
258
|
// 只用 wfInfo 算显隐,不依赖面板实例(它可能还没渲染)
|
|
249
259
|
let items = getVisibleWfActionItems({ wfInfo: ws.wfInfo });
|
|
@@ -270,7 +280,7 @@ export default {
|
|
|
270
280
|
}));
|
|
271
281
|
},
|
|
272
282
|
/**
|
|
273
|
-
*
|
|
283
|
+
* 底栏按钮:审批动作在前(审批中的单据以审批为主),然后是流程启动,
|
|
274
284
|
* 最后是业务按钮。hidden 的业务按钮先剔除,否则「更多」里会留空条目
|
|
275
285
|
* (static-content-wrapper 内部只是 v-show 隐藏,el-dropdown-item 仍占一行)。
|
|
276
286
|
*/
|
|
@@ -278,7 +288,7 @@ export default {
|
|
|
278
288
|
let widgetButtons = (this.widget.widgetList || []).filter(
|
|
279
289
|
(w) => !w.options || !w.options.hidden
|
|
280
290
|
);
|
|
281
|
-
return this.wfActionButtons().concat(widgetButtons);
|
|
291
|
+
return this.wfActionButtons().concat(this.wfStartButtons(), widgetButtons);
|
|
282
292
|
},
|
|
283
293
|
/**
|
|
284
294
|
* 底栏要不要出。与 visibleButtons/overflowButtons 同源(都走 bottomButtons),
|