cloud-web-corejs 1.0.54-dev.790 → 1.0.54-dev.792
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/table/tableForm.vue +4 -2
- package/src/components/wf/content.vue +2 -2
- package/src/components/wf/content2.vue +4 -2
- package/src/components/wf/wf.js +18 -0
- package/src/components/xform/form-designer/designer.js +15 -11
- package/src/components/xform/form-designer/form-widget/container-widget/detail-plain-widget.vue +76 -0
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js +92 -0
- package/src/components/xform/form-designer/form-widget/field-widget/time-widget.vue +44 -5
- package/src/components/xform/form-designer/indexMixin.js +1 -0
- package/src/components/xform/form-designer/setting-panel/form-dynamicField-setting.vue +1 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-plain/detail-plain-editor.vue +75 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +23 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-timeLimit-editor.vue +56 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +2 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +26 -0
- package/src/components/xform/form-render/container-item/detail-plain-item.vue +92 -0
- package/src/components/xform/form-render/indexMixin.js +3 -1
- package/src/components/xform/lang/zh-CN.js +1 -0
- package/src/components/xform/utils/util.js +1 -1
- package/src/index.js +10 -7
- package/src/store/config/index.js +0 -1
- package/src/views/bd/project/branch/form_script/list.vue +12 -3
- package/src/views/bd/project/branch/form_template/list.vue +12 -3
- package/src/views/bd/project/branch/menu_kind/list.vue +13 -3
- package/src/views/bd/project/core/branchPage.js +5 -5
- package/src/views/bd/project/core/branchPageWrap.vue +16 -7
- package/src/views/bd/project/core/branchSearchPage.js +285 -0
- package/src/views/bd/project/core/branchSelect.vue +1 -22
- package/src/views/bd/project/core/branchTreeBar.vue +81 -0
- package/src/views/bd/setting/formVersion/button.vue +5 -0
- package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +21 -12
- package/src/views/bd/setting/formVersion/link.vue +5 -0
- package/src/views/bd/setting/form_script/edit.vue +1 -0
- package/src/views/bd/setting/form_script/edit1.vue +1 -0
- package/src/views/bd/setting/form_script/form_list.vue +1 -0
- package/src/views/bd/setting/form_script/list.vue +1 -0
- package/src/views/bd/setting/form_script/list1.vue +2 -0
- package/src/views/bd/setting/form_template/edit.vue +1 -0
- package/src/views/bd/setting/form_template/list.vue +2 -0
- package/src/views/bd/setting/table_model/edit.vue +1 -0
- package/src/views/bd/setting/table_model/list.vue +1 -0
- package/src/views/user/wf/wfReport/index.vue +24 -1
package/package.json
CHANGED
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
:disabled="form1Field.disabled===true"></base-input-numbuer>
|
|
47
47
|
</template>
|
|
48
48
|
<template v-else-if="form1Field.type =='select'">
|
|
49
|
-
<el-select :key="form1Field.field" v-model="formData[form1Field.field]" size="mini"
|
|
49
|
+
<el-select :key="form1Field.field" v-model="formData[form1Field.field]" size="mini"
|
|
50
|
+
:clearable="form1Field.clearable !== false"
|
|
50
51
|
:multiple="!!form1Field.multiple"
|
|
51
52
|
:collapse-tags="!!form1Field.multiple" :disabled="form1Field.disabled===true">
|
|
52
53
|
<el-option v-for="(item,index1) in form1Field.itemOption" :value="item.value" :label="item.label"
|
|
@@ -137,7 +138,8 @@
|
|
|
137
138
|
:disabled="form1Field.disabled===true"></base-input-numbuer>
|
|
138
139
|
</template>
|
|
139
140
|
<template v-else-if="form1Field.type =='select'">
|
|
140
|
-
<el-select v-model="advancedFormData[form1Field.field]" size="mini"
|
|
141
|
+
<el-select v-model="advancedFormData[form1Field.field]" size="mini"
|
|
142
|
+
:clearable="form1Field.clearable !== false"
|
|
141
143
|
:multiple="!!form1Field.multiple"
|
|
142
144
|
:collapse-tags="!!form1Field.multiple" :disabled="form1Field.disabled===true">
|
|
143
145
|
<el-option v-for="(item,index1) in form1Field.itemOption" :value="item.value" :label="item.label"
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
type="primary"
|
|
59
59
|
class="button-sty"
|
|
60
60
|
@click="openAddIncreaseSign"
|
|
61
|
-
v-show="wfInfo.toAddIncreaseSign"
|
|
61
|
+
v-show="increaseSignEnabled && wfInfo.toAddIncreaseSign"
|
|
62
62
|
icon="el-icon-plus"
|
|
63
63
|
>{{ $t2("加签", "components.wf.addIncreaseSign") }}
|
|
64
64
|
</el-button>
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
type="primary"
|
|
67
67
|
class="button-sty"
|
|
68
68
|
@click="openDeleteTaskUserDialog"
|
|
69
|
-
v-show="wfInfo.toDeleteIncreaseSign"
|
|
69
|
+
v-show="increaseSignEnabled && wfInfo.toDeleteIncreaseSign"
|
|
70
70
|
icon="el-icon-delete"
|
|
71
71
|
>{{ $t2("减签", "components.wf.deleteIncreaseSign") }}
|
|
72
72
|
</el-button>
|
|
@@ -38,10 +38,12 @@
|
|
|
38
38
|
@click="openUrgingDialog(null)" v-show="wfInfo.toInterrupt">催办
|
|
39
39
|
</el-button>
|
|
40
40
|
<el-button type="primary" class="btn" :class="{on:operateType == 'addIncreaseSign'}"
|
|
41
|
-
@click="openAddIncreaseSign('addIncreaseSign')"
|
|
41
|
+
@click="openAddIncreaseSign('addIncreaseSign')"
|
|
42
|
+
v-show="increaseSignEnabled && wfInfo.toAddIncreaseSign">加签
|
|
42
43
|
</el-button>
|
|
43
44
|
<el-button type="primary" class="btn" :class="{on:operateType == 'deleteIncreaseSign'}"
|
|
44
|
-
@click="openDeleteTaskUserDialog(null)"
|
|
45
|
+
@click="openDeleteTaskUserDialog(null)"
|
|
46
|
+
v-show="increaseSignEnabled && wfInfo.toDeleteIncreaseSign">
|
|
45
47
|
减签
|
|
46
48
|
</el-button>
|
|
47
49
|
<el-button type="primary" class="btn" :class="{on:operateType == 'setCandidate'}"
|
package/src/components/wf/wf.js
CHANGED
|
@@ -387,6 +387,8 @@ wfContentMixin = {
|
|
|
387
387
|
|
|
388
388
|
addOpinionEnabled: false,
|
|
389
389
|
modifyCurrentCandidateEnabled: false,
|
|
390
|
+
//加签、减签,默认开启
|
|
391
|
+
increaseSignEnabled: true,
|
|
390
392
|
|
|
391
393
|
//修改脚本
|
|
392
394
|
showWfFlowEleScriptDialog: false
|
|
@@ -442,6 +444,19 @@ wfContentMixin = {
|
|
|
442
444
|
},
|
|
443
445
|
});
|
|
444
446
|
},
|
|
447
|
+
|
|
448
|
+
initWfParam17(){
|
|
449
|
+
//初始化加签、减签权限,未配置时默认开启
|
|
450
|
+
let that = getTarget(this);
|
|
451
|
+
return that.$http({
|
|
452
|
+
url: USER_PREFIX + "/wf_diy_attribute/getValue",
|
|
453
|
+
method: `post`,
|
|
454
|
+
data: {attributeKey: "param17"},
|
|
455
|
+
success: (res) => {
|
|
456
|
+
this.increaseSignEnabled = res?.objx !== false;
|
|
457
|
+
},
|
|
458
|
+
});
|
|
459
|
+
},
|
|
445
460
|
getViewParam(key){
|
|
446
461
|
let that = this.viewTarget;
|
|
447
462
|
let value = that[key] || that.$attrs[key];
|
|
@@ -554,6 +569,9 @@ wfContentMixin = {
|
|
|
554
569
|
//初始化修改当前候选人权限
|
|
555
570
|
this.initWfParam14();
|
|
556
571
|
|
|
572
|
+
//初始化加签、减签权限
|
|
573
|
+
this.initWfParam17();
|
|
574
|
+
|
|
557
575
|
}
|
|
558
576
|
});
|
|
559
577
|
},
|
|
@@ -203,6 +203,7 @@ let chartContainers = [],
|
|
|
203
203
|
"vf-box": "widgetList",
|
|
204
204
|
card: "widgetList",
|
|
205
205
|
detail: "panes",
|
|
206
|
+
"detail-plain": "panes",
|
|
206
207
|
"detail-pane": "widgetList",
|
|
207
208
|
"detail-h5": "panes",
|
|
208
209
|
"h5-card": "panes",
|
|
@@ -1404,19 +1405,22 @@ let chartContainers = [],
|
|
|
1404
1405
|
newCon.options.name +
|
|
1405
1406
|
"').openEditDialog();";
|
|
1406
1407
|
newCon.buttons.push(add_button);
|
|
1407
|
-
} else if (newCon.type === "detail") {
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1408
|
+
} else if (newCon.type === "detail" || newCon.type === "detail-plain") {
|
|
1409
|
+
/* detail-plain 无标题栏,不预置标题栏按钮;其余 panes 结构与 detail 一致 */
|
|
1410
|
+
if (newCon.type === "detail") {
|
|
1411
|
+
let buttonCon1 = this.copyNewFieldWidget(
|
|
1412
|
+
this.getFieldWidgetByType("reset_button")
|
|
1413
|
+
);
|
|
1414
|
+
// buttonCon1.options.label = "重置";
|
|
1412
1415
|
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1416
|
+
let buttonCon2 = this.copyNewFieldWidget(
|
|
1417
|
+
this.getFieldWidgetByType("save_button")
|
|
1418
|
+
);
|
|
1419
|
+
buttonCon2.options.label = "保存";
|
|
1417
1420
|
|
|
1418
|
-
|
|
1419
|
-
|
|
1421
|
+
newCon.widgetList.push(buttonCon1);
|
|
1422
|
+
newCon.widgetList.push(buttonCon2);
|
|
1423
|
+
}
|
|
1420
1424
|
|
|
1421
1425
|
let newCol = baseRefUtil.deepClone(
|
|
1422
1426
|
this.getContainerByType("detail-pane")
|
package/src/components/xform/form-designer/form-widget/container-widget/detail-plain-widget.vue
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
/**
|
|
3
|
+
* 简洁详情模块(detail-plain)设计态:无标题栏、无按钮拖放区,仅 panes(详情tab)。
|
|
4
|
+
*/
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<container-wrapper :designer="designer" :widget="widget" :parent-widget="parentWidget" :parent-list="parentList"
|
|
9
|
+
:index-of-parent-list="indexOfParentList" :class="widget.options.isFullscreen ? 'full-height':''">
|
|
10
|
+
<div class="detail-wrap grid-container" :key="widget.id"
|
|
11
|
+
:class="{'selected': selected}" @click.stop="selectWidget(widget)">
|
|
12
|
+
<baseTabs style="height: auto;" :showNav="!widget.options.hideNav">
|
|
13
|
+
<detail-pane-widget v-for="(paneWidget, index) in widget.panes" :key="index" :widget="paneWidget"
|
|
14
|
+
:designer="designer" :parent-list="widget.panes"
|
|
15
|
+
:index-of-parent-list="index" :parent-widget="widget"
|
|
16
|
+
:col-height="widget.options.colHeight" tabRef="baseTabRef"
|
|
17
|
+
:tabPaneGrade="2"></detail-pane-widget>
|
|
18
|
+
</baseTabs>
|
|
19
|
+
</div>
|
|
20
|
+
</container-wrapper>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
import i18n from "../../../../../components/xform/utils/i18n"
|
|
25
|
+
import detailPaneWidget from "../../../../../components/xform/form-designer/form-widget/container-widget/detail-pane-widget"
|
|
26
|
+
import containerMixin from "../../../../../components/xform/form-designer/form-widget/container-widget/containerMixin"
|
|
27
|
+
import ContainerWrapper from "../../../../../components/xform/form-designer/form-widget/container-widget/container-wrapper"
|
|
28
|
+
import refMixinDesign from "../../../../../components/xform/form-designer/refMixinDesign"
|
|
29
|
+
import FieldComponents from "../../../../../components/xform/form-designer/form-widget/field-widget";
|
|
30
|
+
|
|
31
|
+
export default {
|
|
32
|
+
name: "detail-plain-widget",
|
|
33
|
+
componentName: 'ContainerWidget',
|
|
34
|
+
mixins: [i18n, containerMixin, refMixinDesign],
|
|
35
|
+
inject: ['refList'],
|
|
36
|
+
components: {
|
|
37
|
+
ContainerWrapper,
|
|
38
|
+
detailPaneWidget,
|
|
39
|
+
...FieldComponents,
|
|
40
|
+
},
|
|
41
|
+
props: {
|
|
42
|
+
widget: Object,
|
|
43
|
+
parentWidget: Object,
|
|
44
|
+
parentList: Array,
|
|
45
|
+
indexOfParentList: Number,
|
|
46
|
+
designer: Object,
|
|
47
|
+
},
|
|
48
|
+
computed: {
|
|
49
|
+
selected() {
|
|
50
|
+
return this.widget.id === this.designer.selectedId
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
customClass() {
|
|
54
|
+
return this.widget.options.customClass || ''
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
created() {
|
|
58
|
+
this.initRefList()
|
|
59
|
+
},
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<style lang="scss" scoped>
|
|
64
|
+
.grid-container {
|
|
65
|
+
min-height: 50px;
|
|
66
|
+
outline: 1px dashed #336699;
|
|
67
|
+
> div{height:100%;}
|
|
68
|
+
.form-widget-list {
|
|
69
|
+
height: 100%;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.grid-container.selected, .grid-cell.selected {
|
|
74
|
+
outline: 2px solid $--color-primary !important;
|
|
75
|
+
}
|
|
76
|
+
</style>
|
package/src/components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* 时间组件的最小时间、默认值支持配置为「当前时间」,此处统一解析 */
|
|
2
|
+
export const TIME_VALUE_TYPE_NOW = "now";
|
|
3
|
+
|
|
4
|
+
const MAX_TIME_VALUE = "23:59:59";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
methods: {
|
|
8
|
+
getTimeLimitOptions() {
|
|
9
|
+
return this.field.options || {};
|
|
10
|
+
},
|
|
11
|
+
isNowTimeValueType(valueType) {
|
|
12
|
+
return valueType === TIME_VALUE_TYPE_NOW;
|
|
13
|
+
},
|
|
14
|
+
getNowTimeValue() {
|
|
15
|
+
const now = new Date();
|
|
16
|
+
const pad = (val) => (val < 10 ? "0" + val : String(val));
|
|
17
|
+
return `${pad(now.getHours())}:${pad(now.getMinutes())}:${pad(
|
|
18
|
+
now.getSeconds()
|
|
19
|
+
)}`;
|
|
20
|
+
},
|
|
21
|
+
normalizeTimeValue(val) {
|
|
22
|
+
if (val === null || val === undefined || val === "") {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
const matched = /^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/.exec(String(val).trim());
|
|
26
|
+
if (!matched) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
const hour = Number(matched[1]);
|
|
30
|
+
const minute = Number(matched[2]);
|
|
31
|
+
const second = Number(matched[3] || 0);
|
|
32
|
+
if (hour > 23 || minute > 59 || second > 59) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
const pad = (v) => (v < 10 ? "0" + v : String(v));
|
|
36
|
+
return `${pad(hour)}:${pad(minute)}:${pad(second)}`;
|
|
37
|
+
},
|
|
38
|
+
parseTimeLimitValue(val) {
|
|
39
|
+
const normalized = this.normalizeTimeValue(val);
|
|
40
|
+
if (normalized === null) {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
const parts = normalized.split(":");
|
|
44
|
+
return Number(parts[0]) * 3600 + Number(parts[1]) * 60 + Number(parts[2]);
|
|
45
|
+
},
|
|
46
|
+
/* 最小时间:固定时间或当前时间 */
|
|
47
|
+
getTimeLimitMinValue() {
|
|
48
|
+
const options = this.getTimeLimitOptions();
|
|
49
|
+
if (this.isNowTimeValueType(options.minTimeType)) {
|
|
50
|
+
return this.getNowTimeValue();
|
|
51
|
+
}
|
|
52
|
+
return this.normalizeTimeValue(options.minTime);
|
|
53
|
+
},
|
|
54
|
+
initTimeLimitPickerOptions() {
|
|
55
|
+
const pickerOptions = { ...(this.pickerOptions || {}) };
|
|
56
|
+
const minTime = this.getTimeLimitMinValue();
|
|
57
|
+
if (minTime === null) {
|
|
58
|
+
delete pickerOptions.selectableRange;
|
|
59
|
+
} else {
|
|
60
|
+
pickerOptions.selectableRange = `${minTime} - ${MAX_TIME_VALUE}`;
|
|
61
|
+
}
|
|
62
|
+
this.pickerOptions = pickerOptions;
|
|
63
|
+
},
|
|
64
|
+
isTimeLimitViolated(value) {
|
|
65
|
+
const currentTime = this.parseTimeLimitValue(value);
|
|
66
|
+
if (currentTime === null) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
const minTime = this.parseTimeLimitValue(this.getTimeLimitMinValue());
|
|
70
|
+
return minTime !== null && currentTime < minTime;
|
|
71
|
+
},
|
|
72
|
+
getTimeLimitViolationMessage() {
|
|
73
|
+
return `时间不能小于${this.getTimeLimitMinValue()}`;
|
|
74
|
+
},
|
|
75
|
+
/* 默认值配置为「当前时间」时,临时替换 defaultValue 后再走通用的取值逻辑 */
|
|
76
|
+
initTimeFieldModel() {
|
|
77
|
+
const options = this.getTimeLimitOptions();
|
|
78
|
+
if (!this.isNowTimeValueType(options.defaultValueType)) {
|
|
79
|
+
this.initFieldModel();
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const rawDefaultValue = options.defaultValue;
|
|
84
|
+
options.defaultValue = this.getNowTimeValue();
|
|
85
|
+
try {
|
|
86
|
+
this.initFieldModel();
|
|
87
|
+
} finally {
|
|
88
|
+
options.defaultValue = rawDefaultValue;
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
};
|
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
:clearable="field.options.clearable" :editable="field.options.editable"
|
|
9
9
|
:format="field.options.format" value-format="HH:mm:ss"
|
|
10
10
|
:placeholder="getI18nLabel(field.options.placeholder || '选择时间')"
|
|
11
|
-
|
|
12
|
-
@
|
|
11
|
+
:picker-options="pickerOptions"
|
|
12
|
+
@focus="handleTimeFocusEvent" @blur="handleBlurCustomEvent"
|
|
13
|
+
@change="handleTimeChangeEvent">
|
|
13
14
|
</el-time-picker>
|
|
14
15
|
</form-item-wrapper>
|
|
15
16
|
</template>
|
|
@@ -19,12 +20,13 @@
|
|
|
19
20
|
import emitter from '../../../../../components/xform/utils/emitter'
|
|
20
21
|
import i18n from "../../../../../components/xform/utils/i18n";
|
|
21
22
|
import fieldMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin";
|
|
23
|
+
import timeLimitMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/mixins/time-limit-mixin";
|
|
22
24
|
import utcTransformMixin from "../../../../../components/xform/form-designer/form-widget/field-widget/mixins/utc-transform-mixin";
|
|
23
25
|
|
|
24
26
|
export default {
|
|
25
27
|
name: "time-widget",
|
|
26
28
|
componentName: 'FieldWidget', //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
|
27
|
-
mixins: [emitter, fieldMixin, i18n, utcTransformMixin],
|
|
29
|
+
mixins: [emitter, fieldMixin, i18n, timeLimitMixin, utcTransformMixin],
|
|
28
30
|
props: {
|
|
29
31
|
field: Object,
|
|
30
32
|
parentWidget: Object,
|
|
@@ -60,10 +62,19 @@
|
|
|
60
62
|
oldFieldValue: null, //field组件change之前的值
|
|
61
63
|
fieldModel: null,
|
|
62
64
|
rules: [],
|
|
65
|
+
pickerOptions: {},
|
|
63
66
|
}
|
|
64
67
|
},
|
|
65
68
|
computed: {
|
|
66
69
|
|
|
70
|
+
},
|
|
71
|
+
watch: {
|
|
72
|
+
"field.options.minTime"() {
|
|
73
|
+
this.initTimeLimitPickerOptions()
|
|
74
|
+
},
|
|
75
|
+
"field.options.minTimeType"() {
|
|
76
|
+
this.initTimeLimitPickerOptions()
|
|
77
|
+
},
|
|
67
78
|
},
|
|
68
79
|
beforeCreate() {
|
|
69
80
|
/* 这里不能访问方法和属性!! */
|
|
@@ -72,12 +83,13 @@
|
|
|
72
83
|
created() {
|
|
73
84
|
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
|
74
85
|
需要在父组件created中初始化!! */
|
|
75
|
-
this.
|
|
86
|
+
this.initTimeFieldModel()
|
|
76
87
|
this.registerToRefList()
|
|
77
88
|
this.initEventHandler()
|
|
78
89
|
this.buildFieldRules()
|
|
79
90
|
|
|
80
91
|
this.handleOnCreated()
|
|
92
|
+
this.initTimeLimitPickerOptions()
|
|
81
93
|
},
|
|
82
94
|
|
|
83
95
|
mounted() {
|
|
@@ -89,7 +101,34 @@
|
|
|
89
101
|
},
|
|
90
102
|
|
|
91
103
|
methods: {
|
|
92
|
-
|
|
104
|
+
handleTimeFocusEvent(event) {
|
|
105
|
+
/* 最小时间为「当前时间」时,每次展开面板都需按当前时刻重新计算 */
|
|
106
|
+
if (this.isNowTimeValueType(this.field.options.minTimeType)) {
|
|
107
|
+
this.initTimeLimitPickerOptions()
|
|
108
|
+
}
|
|
109
|
+
this.handleFocusCustomEvent(event)
|
|
110
|
+
},
|
|
111
|
+
handleTimeChangeEvent(value) {
|
|
112
|
+
if (this.isTimeLimitViolated(value)) {
|
|
113
|
+
this.$message.warning(this.getTimeLimitViolationMessage())
|
|
114
|
+
this.fieldModel = this.oldFieldValue
|
|
115
|
+
return
|
|
116
|
+
}
|
|
117
|
+
this.handleChangeEvent(value)
|
|
118
|
+
},
|
|
119
|
+
setNow() {
|
|
120
|
+
this.setValue(this.getNowTimeValue())
|
|
121
|
+
},
|
|
122
|
+
refreshDefaultValue() {
|
|
123
|
+
if (this.designState !== true) {
|
|
124
|
+
return
|
|
125
|
+
}
|
|
126
|
+
if (this.isNowTimeValueType(this.field.options.defaultValueType)) {
|
|
127
|
+
this.fieldModel = this.getNowTimeValue()
|
|
128
|
+
} else if (this.field.options.defaultValue !== undefined) {
|
|
129
|
+
this.fieldModel = this.field.options.defaultValue
|
|
130
|
+
}
|
|
131
|
+
},
|
|
93
132
|
}
|
|
94
133
|
}
|
|
95
134
|
</script>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-form-item label-width="0">
|
|
4
|
+
<el-divider class="custom-divider">{{ i18nt('designer.setting.columnSetting') }}</el-divider>
|
|
5
|
+
</el-form-item>
|
|
6
|
+
<el-form-item :label="i18nt('隐藏导航')">
|
|
7
|
+
<el-switch v-model="optionModel.hideNav"></el-switch>
|
|
8
|
+
<span style="margin-left: 8px; color: #999; font-size: 12px">
|
|
9
|
+
简洁详情默认隐藏模块导航
|
|
10
|
+
</span>
|
|
11
|
+
</el-form-item>
|
|
12
|
+
<el-form-item :label="i18nt('designer.setting.colsOfGrid')"></el-form-item>
|
|
13
|
+
<el-form-item label-width="0">
|
|
14
|
+
<draggable tag="ul" class="draggable-box" :list="selectedWidget.panes"
|
|
15
|
+
v-bind="{ group: 'optionsGroup', ghostClass: 'ghost', handle: '.drag-option' }">
|
|
16
|
+
<li v-for="(colItem, colIdx) in selectedWidget.panes" :key="colIdx" class="col-item">
|
|
17
|
+
<i class="el-icon-s-operation drag-option"></i>
|
|
18
|
+
<el-input v-model="colItem.options.label" class="cell-span-input"></el-input>
|
|
19
|
+
<el-button circle plain size="mini" type="danger" @click="deleteCol(selectedWidget, colIdx)"
|
|
20
|
+
icon="el-icon-minus" class="col-delete-button" style="position: unset;"></el-button>
|
|
21
|
+
</li>
|
|
22
|
+
</draggable>
|
|
23
|
+
<div>
|
|
24
|
+
<el-button type="text" @click="addNewCol(selectedWidget)" icon="el-icon-circle-plus-outline" class="add-option">
|
|
25
|
+
{{ i18nt('designer.setting.addColumn') }}
|
|
26
|
+
</el-button>
|
|
27
|
+
</div>
|
|
28
|
+
</el-form-item>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script>
|
|
33
|
+
import Draggable from 'vuedraggable';
|
|
34
|
+
import i18n from "../../../../../../components/xform/utils/i18n"
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
name: "detail-plain-editor",
|
|
38
|
+
mixins: [i18n],
|
|
39
|
+
components: {
|
|
40
|
+
Draggable,
|
|
41
|
+
},
|
|
42
|
+
props: {
|
|
43
|
+
designer: Object,
|
|
44
|
+
selectedWidget: Object,
|
|
45
|
+
optionModel: Object,
|
|
46
|
+
},
|
|
47
|
+
methods: {
|
|
48
|
+
deleteCol(curGrid, colIdx) {
|
|
49
|
+
this.designer.deletePaneOfDetail(curGrid, colIdx)
|
|
50
|
+
this.designer.emitHistoryChange()
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
addNewCol(curGrid) {
|
|
54
|
+
this.designer.addNewPaneOfDetail(curGrid)
|
|
55
|
+
this.designer.emitHistoryChange()
|
|
56
|
+
},
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<style lang="scss" scoped>
|
|
62
|
+
li.col-item {
|
|
63
|
+
list-style: none;
|
|
64
|
+
|
|
65
|
+
span.col-span-title {
|
|
66
|
+
display: inline-block;
|
|
67
|
+
font-size: 13px;
|
|
68
|
+
width: 120px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.col-delete-button {
|
|
72
|
+
margin-left: 6px;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
</style>
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-form-item :label="i18nt('designer.setting.defaultValue')">
|
|
3
|
-
<el-
|
|
4
|
-
|
|
3
|
+
<el-radio-group v-model="defaultValueType" size="mini">
|
|
4
|
+
<el-radio-button label="">固定时间</el-radio-button>
|
|
5
|
+
<el-radio-button label="now">当前时间</el-radio-button>
|
|
6
|
+
</el-radio-group>
|
|
7
|
+
<el-time-picker v-if="defaultValueType !== 'now'" v-model="optionModel.defaultValue"
|
|
8
|
+
@change="emitDefaultValueChange"
|
|
9
|
+
:format="optionModel.format" value-format="HH:mm:ss"
|
|
10
|
+
style="width: 100%; margin-top: 5px">
|
|
5
11
|
</el-time-picker>
|
|
6
12
|
</el-form-item>
|
|
7
13
|
</template>
|
|
@@ -18,6 +24,21 @@
|
|
|
18
24
|
selectedWidget: Object,
|
|
19
25
|
optionModel: Object,
|
|
20
26
|
},
|
|
27
|
+
computed: {
|
|
28
|
+
/* 老表单的options可能没有defaultValueType属性,用$set赋值保证响应式 */
|
|
29
|
+
defaultValueType: {
|
|
30
|
+
get() {
|
|
31
|
+
return this.optionModel.defaultValueType || ''
|
|
32
|
+
},
|
|
33
|
+
set(value) {
|
|
34
|
+
this.$set(this.optionModel, 'defaultValueType', value)
|
|
35
|
+
if (value === 'now') {
|
|
36
|
+
this.$set(this.optionModel, 'defaultValue', null)
|
|
37
|
+
}
|
|
38
|
+
this.emitDefaultValueChange()
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
21
42
|
}
|
|
22
43
|
</script>
|
|
23
44
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-form-item label="最小时间">
|
|
4
|
+
<el-radio-group v-model="minTimeType" size="mini">
|
|
5
|
+
<el-radio-button label="">固定时间</el-radio-button>
|
|
6
|
+
<el-radio-button label="now">当前时间</el-radio-button>
|
|
7
|
+
</el-radio-group>
|
|
8
|
+
<el-time-picker v-if="minTimeType !== 'now'" v-model="minTime"
|
|
9
|
+
:format="optionModel.format" value-format="HH:mm:ss"
|
|
10
|
+
style="width: 100%; margin-top: 5px"
|
|
11
|
+
clearable placeholder="留空则不限制">
|
|
12
|
+
</el-time-picker>
|
|
13
|
+
</el-form-item>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import i18n from "../../../../../../components/xform/utils/i18n"
|
|
19
|
+
import propertyMixin from "../../../../../../components/xform/form-designer/setting-panel/property-editor/propertyMixin"
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
name: "time-timeLimit-editor",
|
|
23
|
+
mixins: [i18n, propertyMixin],
|
|
24
|
+
props: {
|
|
25
|
+
designer: Object,
|
|
26
|
+
selectedWidget: Object,
|
|
27
|
+
optionModel: Object,
|
|
28
|
+
},
|
|
29
|
+
computed: {
|
|
30
|
+
/* 老表单的options可能没有这些属性,统一用$set赋值,保证响应式 */
|
|
31
|
+
minTimeType: {
|
|
32
|
+
get() {
|
|
33
|
+
return this.optionModel.minTimeType || ''
|
|
34
|
+
},
|
|
35
|
+
set(value) {
|
|
36
|
+
this.$set(this.optionModel, 'minTimeType', value)
|
|
37
|
+
if (value === 'now') {
|
|
38
|
+
this.$set(this.optionModel, 'minTime', null)
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
minTime: {
|
|
43
|
+
get() {
|
|
44
|
+
return this.optionModel.minTime || null
|
|
45
|
+
},
|
|
46
|
+
set(value) {
|
|
47
|
+
this.$set(this.optionModel, 'minTime', value || null)
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
}
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<style scoped>
|
|
55
|
+
|
|
56
|
+
</style>
|
|
@@ -44,6 +44,7 @@ const COMMON_PROPERTIES = {
|
|
|
44
44
|
format: "format-editor",
|
|
45
45
|
valueFormat: "valueFormat-editor",
|
|
46
46
|
dateLimit: "dateLimit-editor",
|
|
47
|
+
timeLimit: "timeLimit-editor",
|
|
47
48
|
utcTransformEnabled: "utcTransformEnabled-editor",
|
|
48
49
|
defaultTime: "defaultTime-editor",
|
|
49
50
|
filterable: "filterable-editor",
|
|
@@ -106,6 +107,7 @@ const COMMON_PROPERTIES = {
|
|
|
106
107
|
pull: "pull-editor",
|
|
107
108
|
height: "height-editor",
|
|
108
109
|
detailContainer: "detail-editor",
|
|
110
|
+
detailPlainContainer: "detail-plain-editor",
|
|
109
111
|
detailPaneContainer: "detail-pane-editor",
|
|
110
112
|
vabSearchField: "vabSearchField-editor",
|
|
111
113
|
fullWidth: "table-fullWidth-editor",
|
|
@@ -453,6 +453,27 @@ export const containers = [
|
|
|
453
453
|
onMounted: "",
|
|
454
454
|
},
|
|
455
455
|
},
|
|
456
|
+
{
|
|
457
|
+
/* 简洁详情:与 detail 同构,去标题栏(标题/按钮区),模块导航默认关闭 */
|
|
458
|
+
type: "detail-plain",
|
|
459
|
+
category: "container",
|
|
460
|
+
icon: "form",
|
|
461
|
+
commonFlag: !0,
|
|
462
|
+
layoutType: "PC",
|
|
463
|
+
panes: [],
|
|
464
|
+
widgetList: [],
|
|
465
|
+
options: {
|
|
466
|
+
name: "",
|
|
467
|
+
hidden: !1,
|
|
468
|
+
label: "单据详情",
|
|
469
|
+
detailPlainContainer: true,
|
|
470
|
+
hideNav: true,
|
|
471
|
+
// colHeight: null,
|
|
472
|
+
customClass: "",
|
|
473
|
+
onCreated: "",
|
|
474
|
+
onMounted: "",
|
|
475
|
+
},
|
|
476
|
+
},
|
|
456
477
|
{
|
|
457
478
|
type: "detail-pane",
|
|
458
479
|
category: "container",
|
|
@@ -1601,6 +1622,7 @@ export const basicFields = [
|
|
|
1601
1622
|
formField: "",
|
|
1602
1623
|
labelAlign: "",
|
|
1603
1624
|
defaultValue: null,
|
|
1625
|
+
defaultValueType: "", //默认值类型:空为固定时间,now为当前时间
|
|
1604
1626
|
placeholder: "",
|
|
1605
1627
|
columnWidth: "200px",
|
|
1606
1628
|
size: "",
|
|
@@ -1612,6 +1634,9 @@ export const basicFields = [
|
|
|
1612
1634
|
clearable: !0,
|
|
1613
1635
|
editable: !0,
|
|
1614
1636
|
format: "HH:mm:ss",
|
|
1637
|
+
timeLimit: null,
|
|
1638
|
+
minTime: null,
|
|
1639
|
+
minTimeType: "", //最小时间类型:空为固定时间,now为当前时间
|
|
1615
1640
|
utcTransformEnabled: !1,
|
|
1616
1641
|
required: !1,
|
|
1617
1642
|
requiredHint: "",
|
|
@@ -4437,6 +4462,7 @@ export const widgetPanelOrder = {
|
|
|
4437
4462
|
"data-table",
|
|
4438
4463
|
"table-column",
|
|
4439
4464
|
"detail",
|
|
4465
|
+
"detail-plain",
|
|
4440
4466
|
"detail-pane",
|
|
4441
4467
|
"tree-pane",
|
|
4442
4468
|
"tree",
|