cloud-web-corejs 1.1.0-dev.5 → 1.1.0-dev.7
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/VabUpload/index.vue +1 -1
- package/src/components/VabUpload/view.vue +27 -26
- package/src/components/excelImport/index.vue +156 -156
- package/src/components/jsonImport/index.vue +1 -1
- package/src/components/langImport/index.vue +1 -1
- package/src/components/mobile/wf/addTaskUserdialog.vue +23 -3
- package/src/components/mobile/wf/content.vue +110 -67
- package/src/components/mobile/wf/deleteTaskUserDialog.vue +22 -3
- package/src/components/mobile/wf/selectUserDialog.vue +122 -0
- package/src/components/mobile/wf/setCandidateDialog.vue +25 -4
- package/src/components/mobile/wf/urgingDialog.vue +26 -3
- package/src/components/mobile/wf/wfModifyDialog.vue +4 -0
- package/src/components/obsUpload/index.vue +1 -1
- package/src/components/xform/form-designer/designer.js +36 -52
- package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +185 -185
- package/src/components/xform/form-designer/form-widget/field-widget/singleUpload-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +2 -2
- package/src/components/xform/form-designer/indexMixin.js +33 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +833 -860
- package/src/components/xform/form-designer/toolbar-panel/index.vue +874 -874
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +1 -0
- package/src/components/xform/form-designer/widget-panel/index.vue +11 -7
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +30 -6
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +53 -1
- package/src/components/xform/form-render/container-item/list-h5-item.vue +154 -27
- package/src/components/xform/form-render/indexMixin.js +23 -3
- package/src/components/xform/styles/h5.scss +774 -588
- package/src/directive/append-to-body/index.js +48 -0
- package/src/index.js +4 -0
- package/src/layout/components/Sidebar/default.vue +1655 -1655
- package/src/router/index.js +48 -48
- package/src/utils/assetUrl.js +19 -0
- package/src/utils/vab.js +1283 -1279
- package/src/views/bd/setting/form_template/edit.vue +378 -356
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +6 -0
- package/src/views/bd/setting/form_template/formTemplateType.js +43 -0
- package/src/views/bd/setting/form_template/list.vue +304 -303
- package/src/views/bd/setting/form_template/mixins/edit.js +344 -280
- package/src/views/bd/setting/form_template/mixins/list.js +748 -721
- package/src/views/user/file_view_ins/list.vue +970 -970
- package/src/views/user/form/vform/designer.vue +823 -821
- package/src/views/user/home/default.vue +1117 -1117
- package/src/views/user/home/index.vue +103 -103
- package/src/views/user/notify_message/dialog.vue +139 -139
- package/src/views/user/outLink/form_view.vue +202 -202
- package/src/views/user/outLink/index.vue +110 -110
- package/src/views/user/wf/iframe/index.vue +51 -51
- package/src/views/user/wf/iframe/index2.vue +64 -64
- package/src/views/user/wf/wf_manage/list2.vue +871 -871
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +134 -134
- package/src/views/user/wf/wf_obj_config/importItemDialog.vue +1 -1
|
@@ -111,7 +111,12 @@
|
|
|
111
111
|
<template
|
|
112
112
|
v-else-if="column.slots && column.slots.default == 'widget'"
|
|
113
113
|
>
|
|
114
|
+
<!-- 临时只读:只出选中文本;关掉 H5_TEMP_READ_ONLY 后仍走下面的控件 -->
|
|
115
|
+
<template v-if="getReadMode()">
|
|
116
|
+
{{ getColumnDisplayText(column, row, rowIndex) }}
|
|
117
|
+
</template>
|
|
114
118
|
<component
|
|
119
|
+
v-else
|
|
115
120
|
:is="getColumnWidgetName(column.params.widget)"
|
|
116
121
|
:field="column.params.widget"
|
|
117
122
|
:form-model="globalModel.formModel"
|
|
@@ -230,12 +235,90 @@
|
|
|
230
235
|
}}
|
|
231
236
|
</template>
|
|
232
237
|
|
|
233
|
-
<!--
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
<template v-else>
|
|
238
|
+
<!-- 临时只读:行上只出选中文本。控件/操作链接不能删,
|
|
239
|
+
关掉 H5_TEMP_READ_ONLY 后仍要能编辑。 -->
|
|
240
|
+
<template v-else-if="getReadMode()">
|
|
237
241
|
{{ getColumnDisplayText(column, row, rowIndex) }}
|
|
238
242
|
</template>
|
|
243
|
+
<template
|
|
244
|
+
v-else-if="
|
|
245
|
+
column.slots && column.slots.default == 'widget'
|
|
246
|
+
"
|
|
247
|
+
>
|
|
248
|
+
<component
|
|
249
|
+
:is="getColumnWidgetName(column.params.widget)"
|
|
250
|
+
:field="column.params.widget"
|
|
251
|
+
:form-model="globalModel.formModel"
|
|
252
|
+
:designer="null"
|
|
253
|
+
:key="rowIndex + '-' + columnIndex"
|
|
254
|
+
:parent-widget="widget"
|
|
255
|
+
:columnConfig="column.params.columnConfig"
|
|
256
|
+
:subFormRowIndex="rowIndex"
|
|
257
|
+
:formItemProp="
|
|
258
|
+
getColumnProp(widget, {
|
|
259
|
+
column: column,
|
|
260
|
+
rowIndex: rowIndex,
|
|
261
|
+
row: row,
|
|
262
|
+
items: fieldModel,
|
|
263
|
+
})
|
|
264
|
+
"
|
|
265
|
+
:tableParam="{
|
|
266
|
+
column: column,
|
|
267
|
+
rowIndex: rowIndex,
|
|
268
|
+
row: row,
|
|
269
|
+
items: fieldModel,
|
|
270
|
+
}"
|
|
271
|
+
></component>
|
|
272
|
+
</template>
|
|
273
|
+
<template
|
|
274
|
+
v-else-if="column.params.formatS == 'editDelete'"
|
|
275
|
+
>
|
|
276
|
+
<a
|
|
277
|
+
href="javascript:void(0);"
|
|
278
|
+
class="a-link"
|
|
279
|
+
@click="deleteRow(row, rowIndex)"
|
|
280
|
+
>
|
|
281
|
+
<el-tooltip
|
|
282
|
+
:enterable="false"
|
|
283
|
+
effect="dark"
|
|
284
|
+
content="删除"
|
|
285
|
+
placement="top"
|
|
286
|
+
popper-class="tooltip-skin"
|
|
287
|
+
>
|
|
288
|
+
<i class="el-icon-delete" />
|
|
289
|
+
</el-tooltip>
|
|
290
|
+
</a>
|
|
291
|
+
</template>
|
|
292
|
+
<template
|
|
293
|
+
v-else-if="column.params.formatS == 'editButton'"
|
|
294
|
+
>
|
|
295
|
+
<a
|
|
296
|
+
href="javascript:void(0);"
|
|
297
|
+
class="a-link"
|
|
298
|
+
@click.stop="openEditDialog(row)"
|
|
299
|
+
>
|
|
300
|
+
<el-tooltip
|
|
301
|
+
:enterable="false"
|
|
302
|
+
effect="dark"
|
|
303
|
+
content="查看"
|
|
304
|
+
placement="top"
|
|
305
|
+
popper-class="tooltip-skin"
|
|
306
|
+
>
|
|
307
|
+
<i class="el-icon-edit" />
|
|
308
|
+
</el-tooltip>
|
|
309
|
+
</a>
|
|
310
|
+
</template>
|
|
311
|
+
<template v-else>
|
|
312
|
+
{{
|
|
313
|
+
column.formatter({
|
|
314
|
+
cellValue: row[column.field],
|
|
315
|
+
column: column,
|
|
316
|
+
rowIndex: rowIndex,
|
|
317
|
+
row: row,
|
|
318
|
+
items: fieldModel,
|
|
319
|
+
})
|
|
320
|
+
}}
|
|
321
|
+
</template>
|
|
239
322
|
</dd>
|
|
240
323
|
</div>
|
|
241
324
|
</dl>
|
|
@@ -377,7 +460,8 @@
|
|
|
377
460
|
width="100%"
|
|
378
461
|
top="0px"
|
|
379
462
|
v-el-drag-dialog
|
|
380
|
-
v-el-dialog-center
|
|
463
|
+
v-el-dialog-center
|
|
464
|
+
:append-to-body ="true"
|
|
381
465
|
:destroy-on-close="true"
|
|
382
466
|
>
|
|
383
467
|
<div class="cont" style="height: calc(100vh - 73px)">
|
|
@@ -699,6 +783,7 @@ export default {
|
|
|
699
783
|
"globalModel",
|
|
700
784
|
"getFormConfig",
|
|
701
785
|
"getGlobalDsv",
|
|
786
|
+
"getReadMode",
|
|
702
787
|
],
|
|
703
788
|
data: function () {
|
|
704
789
|
let that = this;
|
|
@@ -1466,6 +1551,9 @@ export default {
|
|
|
1466
1551
|
return newData;
|
|
1467
1552
|
},
|
|
1468
1553
|
addTableData(rows, field) {
|
|
1554
|
+
if (this.getReadMode && this.getReadMode()) {
|
|
1555
|
+
return;
|
|
1556
|
+
}
|
|
1469
1557
|
let formDataModel = this.formModel;
|
|
1470
1558
|
let tableRows = this.fieldModel;
|
|
1471
1559
|
let fullData = this.fieldModel;
|
|
@@ -1500,30 +1588,33 @@ export default {
|
|
|
1500
1588
|
},
|
|
1501
1589
|
getColumnWidgetConfig(row) {
|
|
1502
1590
|
let formRef = this.getFormRef();
|
|
1503
|
-
let formatS = row.formatS;
|
|
1504
1591
|
let columnSelectedWidget = null;
|
|
1505
1592
|
let columnEditFields = null;
|
|
1506
|
-
|
|
1507
1593
|
let type = this.columnFormatMap[row.formatS];
|
|
1508
1594
|
|
|
1509
1595
|
if (type) {
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
)
|
|
1513
|
-
|
|
1514
|
-
let idVal = row.prop ? row.prop : type + tmpId;
|
|
1515
|
-
columnSelectedWidget.id = idVal;
|
|
1516
|
-
columnSelectedWidget.options.name = idVal;
|
|
1517
|
-
if (row.columnOption && Object.keys(row.columnOption).length) {
|
|
1518
|
-
row.columnOption.required = row.required || false;
|
|
1519
|
-
columnSelectedWidget.options = row.columnOption;
|
|
1596
|
+
// 格式化配置写在 row.widget(含 optionItems);老数据才落在 columnOption。
|
|
1597
|
+
// 不能每次从字段模板重建,否则下拉选项丢失,行上只能看到 value。
|
|
1598
|
+
if (row.widget && row.widget.type) {
|
|
1599
|
+
columnSelectedWidget = this.$baseLodash.cloneDeep(row.widget);
|
|
1520
1600
|
} else {
|
|
1521
|
-
columnSelectedWidget
|
|
1522
|
-
|
|
1601
|
+
columnSelectedWidget = this.$baseLodash.cloneDeep(
|
|
1602
|
+
formRef.getFieldWidgetByType(type)
|
|
1603
|
+
);
|
|
1604
|
+
let tmpId = generateId();
|
|
1605
|
+
let idVal = row.prop ? row.prop : type + tmpId;
|
|
1606
|
+
columnSelectedWidget.id = idVal;
|
|
1607
|
+
if (row.columnOption && Object.keys(row.columnOption).length) {
|
|
1608
|
+
columnSelectedWidget.options = row.columnOption;
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
if (!columnSelectedWidget.options) {
|
|
1612
|
+
columnSelectedWidget.options = {};
|
|
1523
1613
|
}
|
|
1524
1614
|
columnSelectedWidget.options.name = row.prop;
|
|
1525
1615
|
columnSelectedWidget.options.label = row.label;
|
|
1526
1616
|
columnSelectedWidget.options.labelHidden = true;
|
|
1617
|
+
columnSelectedWidget.options.required = row.required || false;
|
|
1527
1618
|
}
|
|
1528
1619
|
return { columnSelectedWidget, columnEditFields };
|
|
1529
1620
|
},
|
|
@@ -1631,18 +1722,17 @@ export default {
|
|
|
1631
1722
|
/**
|
|
1632
1723
|
* 明细行的显示文本。
|
|
1633
1724
|
*
|
|
1634
|
-
*
|
|
1635
|
-
* value 换成 label
|
|
1636
|
-
* 因为 formatterValue 只做日期与数字格式化,不查选项表。
|
|
1725
|
+
* H5 只读:行上不渲染下拉框,只出选中项文本。
|
|
1726
|
+
* 有选项的列必须自己把 value 换成 label,formatterValue 不做选项映射。
|
|
1637
1727
|
*/
|
|
1638
1728
|
getColumnDisplayText(column, row, rowIndex) {
|
|
1639
1729
|
let value = row[column.field];
|
|
1640
1730
|
let columnWidget = column.params ? column.params.widget : null;
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1731
|
+
if (columnWidget) {
|
|
1732
|
+
let mapped = this.getWidgetOptionLabel(columnWidget, value);
|
|
1733
|
+
if (mapped != null && mapped !== "") {
|
|
1734
|
+
return mapped;
|
|
1735
|
+
}
|
|
1646
1736
|
}
|
|
1647
1737
|
return column.formatter({
|
|
1648
1738
|
cellValue: value,
|
|
@@ -1652,6 +1742,43 @@ export default {
|
|
|
1652
1742
|
items: this.fieldModel,
|
|
1653
1743
|
});
|
|
1654
1744
|
},
|
|
1745
|
+
getOptionItemValueKey(widget) {
|
|
1746
|
+
let options = (widget && widget.options) || {};
|
|
1747
|
+
if (options.commonAttributeEnabled) {
|
|
1748
|
+
return options.valueKey || "sn";
|
|
1749
|
+
}
|
|
1750
|
+
return options.valueKey || "value";
|
|
1751
|
+
},
|
|
1752
|
+
getOptionItemLabelKey(widget) {
|
|
1753
|
+
let options = (widget && widget.options) || {};
|
|
1754
|
+
if (options.commonAttributeEnabled) {
|
|
1755
|
+
return options.labelKey || "value";
|
|
1756
|
+
}
|
|
1757
|
+
return options.labelKey || "label";
|
|
1758
|
+
},
|
|
1759
|
+
getWidgetOptionLabel(fieldWidget, fieldModel) {
|
|
1760
|
+
if (fieldModel === null || fieldModel === undefined || fieldModel === "") {
|
|
1761
|
+
return fieldModel;
|
|
1762
|
+
}
|
|
1763
|
+
let options = (fieldWidget && fieldWidget.options) || {};
|
|
1764
|
+
let optionList = options.optionItems || options.statusParam;
|
|
1765
|
+
if (!Array.isArray(optionList) || !optionList.length) {
|
|
1766
|
+
return null;
|
|
1767
|
+
}
|
|
1768
|
+
let labelField = this.getOptionItemLabelKey(fieldWidget);
|
|
1769
|
+
let valueField = this.getOptionItemValueKey(fieldWidget);
|
|
1770
|
+
let values = Array.isArray(fieldModel) ? fieldModel : [fieldModel];
|
|
1771
|
+
let labels = values.map((val) => {
|
|
1772
|
+
let item = optionList.find(
|
|
1773
|
+
(o) => o[valueField] === val || String(o[valueField]) === String(val)
|
|
1774
|
+
);
|
|
1775
|
+
if (!item) return null;
|
|
1776
|
+
let label = item[labelField];
|
|
1777
|
+
return this.$t1 ? this.$t1(label) : label;
|
|
1778
|
+
});
|
|
1779
|
+
let hit = labels.filter((x) => x != null && x !== "");
|
|
1780
|
+
return hit.length ? hit.join(",") : null;
|
|
1781
|
+
},
|
|
1655
1782
|
/**
|
|
1656
1783
|
* 行点击:
|
|
1657
1784
|
* - 查询选择场景(isQueryTable):点行是勾选,保持原行为;
|
|
@@ -69,6 +69,9 @@ import {
|
|
|
69
69
|
resolveTreeSubmitConfig,
|
|
70
70
|
} from "../utils/treeTableUtil";
|
|
71
71
|
|
|
72
|
+
/* 暂时:H5 运行时整表只读(设计器画布不受影响)。打开 H5 编辑时改 false 即可。 */
|
|
73
|
+
const H5_TEMP_READ_ONLY = true;
|
|
74
|
+
|
|
72
75
|
let modules = {};
|
|
73
76
|
const baseRefUtil = {
|
|
74
77
|
emitter,
|
|
@@ -184,7 +187,7 @@ modules = {
|
|
|
184
187
|
},
|
|
185
188
|
previewState: this.previewState,
|
|
186
189
|
getReadMode: function () {
|
|
187
|
-
return e.
|
|
190
|
+
return e.getReadMode();
|
|
188
191
|
},
|
|
189
192
|
getSubFormFieldFlag: function () {
|
|
190
193
|
return !1;
|
|
@@ -350,6 +353,15 @@ modules = {
|
|
|
350
353
|
: "";
|
|
351
354
|
},
|
|
352
355
|
|
|
356
|
+
/** 暂时:H5 版式强制只读 */
|
|
357
|
+
isH5TempReadOnly() {
|
|
358
|
+
return (
|
|
359
|
+
H5_TEMP_READ_ONLY &&
|
|
360
|
+
!!this.formConfig &&
|
|
361
|
+
this.formConfig.layoutType === "H5"
|
|
362
|
+
);
|
|
363
|
+
},
|
|
364
|
+
|
|
353
365
|
formModel() {
|
|
354
366
|
return this.formDataModel;
|
|
355
367
|
},
|
|
@@ -362,6 +374,7 @@ modules = {
|
|
|
362
374
|
this.currentFormData = this.formData;
|
|
363
375
|
|
|
364
376
|
this.initGlobalConfig(); //初始化全局配置
|
|
377
|
+
this.applyH5TempReadOnly();
|
|
365
378
|
this.buildFormModel(!this.formJsonObj ? null : this.formJsonObj.widgetList);
|
|
366
379
|
|
|
367
380
|
// this.handleOnCreated(),
|
|
@@ -2055,6 +2068,7 @@ modules = {
|
|
|
2055
2068
|
this.$set(this.formJsonObj, "formConfig", i.formConfig),
|
|
2056
2069
|
(this._provided.formConfig = i.formConfig),
|
|
2057
2070
|
this.$set(this.formJsonObj, "widgetList", i.widgetList),
|
|
2071
|
+
this.applyH5TempReadOnly(),
|
|
2058
2072
|
this.insertCustomStyleAndScriptNode(),
|
|
2059
2073
|
this.$nextTick(function () {
|
|
2060
2074
|
t.initFormObject(!1), t.handleOnMounted();
|
|
@@ -3598,10 +3612,16 @@ modules = {
|
|
|
3598
3612
|
setReadMode: function () {
|
|
3599
3613
|
let e =
|
|
3600
3614
|
!(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0];
|
|
3601
|
-
|
|
3615
|
+
/* H5 暂时只读:不允许关掉 */
|
|
3616
|
+
this.readModeFlag = this.isH5TempReadOnly ? true : e;
|
|
3602
3617
|
},
|
|
3603
3618
|
getReadMode: function () {
|
|
3604
|
-
return this.readModeFlag;
|
|
3619
|
+
return this.readModeFlag || this.isH5TempReadOnly;
|
|
3620
|
+
},
|
|
3621
|
+
applyH5TempReadOnly() {
|
|
3622
|
+
if (this.isH5TempReadOnly) {
|
|
3623
|
+
this.readModeFlag = true;
|
|
3624
|
+
}
|
|
3605
3625
|
},
|
|
3606
3626
|
getGlobalDsv: function () {
|
|
3607
3627
|
return this.globalDsv;
|