cloud-web-corejs 1.0.54-dev.798 → 1.0.54-dev.799
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 +3 -1
- package/src/components/baseTabs/mixins.js +11 -12
- package/src/components/bizTab/BizBillActions.vue +129 -0
- package/src/components/bizTab/BizTabListPage.vue +391 -0
- package/src/components/bizTab/README.md +378 -0
- package/src/components/bizTab/billTableUtil.js +48 -0
- package/src/components/bizTab/billValidators.js +136 -0
- package/src/components/bizTab/bizBillDetailMixin.js +687 -0
- package/src/components/bizTab/index.js +24 -0
- package/src/components/excelExport/exportFieldDialog.vue +373 -367
- package/src/components/excelExport/exportType.js +49 -0
- package/src/components/excelExport/mixins.js +1153 -1144
- package/src/components/vb-tabs/x-tabs.vue +167 -143
- package/src/components/wf/wfUtil.js +327 -292
- package/src/components/xform/form-designer/designer.js +56 -8
- package/src/components/xform/form-designer/form-widget/container-widget/detail-widget.vue +59 -5
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +60 -8
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +8 -2
- package/src/components/xform/form-designer/form-widget/field-widget/select-export-item-button-widget.vue +120 -92
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +63 -94
- package/src/components/xform/form-designer/index.vue +0 -1
- package/src/components/xform/form-designer/setting-panel/dataSource-setting.vue +397 -397
- package/src/components/xform/form-designer/setting-panel/form-dynamicField-setting.vue +602 -602
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +13 -13
- package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +585 -585
- package/src/components/xform/form-designer/setting-panel/property-editor/a-link-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/a-text-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/alignType-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/censusClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/colorClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/commonAttributeEnabled-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +1154 -1154
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +96 -80
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail-plain/detail-plain-editor.vue +75 -75
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/colHeight-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid/gutter-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-height-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-offset-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-pull-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-push-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-grid-col/grid-col-span-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/container-h5-card/h5-card-editor.vue +124 -124
- package/src/components/xform/form-designer/setting-panel/property-editor/container-panel/height-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-panel/width-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tab-customClass-editor.vue +119 -119
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tab/tabClass-editor.vue +45 -45
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +344 -344
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table-cell/cellHeight-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-table-cell/cellWidth-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tree/tree-customClass-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/container-tree-pane/tree-pane-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/cancelButtonLabel-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/okButtonLabel-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/title-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-vf-dialog/width-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/containerClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/customClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/descriptionsItems-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/downloadButtonFlag-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/dsName-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/echartHeight-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/endPlaceholder-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-accessUrl/accessUrl-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaDataType-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaMinLevel-editor.vue +50 -50
- package/src/components/xform/form-designer/setting-panel/property-editor/field-area-select/areaName-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-autocomplete/autocomplete-vabSearchName-editor.vue +7 -7
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/addTableData-event-editor.vue +84 -84
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/button-type-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/clickBindEvent-editor.vue +97 -97
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/form-host-event-editor.vue +188 -188
- package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +237 -237
- package/src/components/xform/form-designer/setting-panel/property-editor/field-common/keyName-editor.vue +74 -67
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-dateLimit-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-format-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-type-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date/date-valueFormat-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-format-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-type-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-valueFormat-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-divider/contentPosition-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-menu-editor.vue +59 -59
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +11 -11
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +10 -10
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +12 -12
- package/src/components/xform/form-designer/setting-panel/property-editor/field-file-upload/file-upload-fileTypes-editor.vue +44 -44
- package/src/components/xform/form-designer/setting-panel/property-editor/field-html-text/htmlContent-editor.vue +29 -29
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +6 -6
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/field-number/controlsPosition-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-picture-upload/picture-upload-fileTypes-editor.vue +44 -44
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-button-editor.vue +115 -115
- package/src/components/xform/form-designer/setting-panel/property-editor/field-print-button/print-detail-button-editor.vue +115 -115
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/highThreshold-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/lowThreshold-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-rate/rate-max-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-script/script-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/field-script-input/script-input-editor.vue +4 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/fontSize-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-static-text/textContent-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/activeText-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/inactiveText-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-switch/switchWidth-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-button-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/select-export-item-button-editor.vue +74 -71
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-format-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time/time-timeLimit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-defaultValue-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-time-range/time-range-format-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchField-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchName-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload2/field-vabUpload2-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vue-page/vue-page-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/fileMaxSize-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/fileTypesSelect.vue +176 -176
- package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +2 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/formatType-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/formula-editor.vue +972 -972
- package/src/components/xform/form-designer/setting-panel/property-editor/iconClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/label-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelAlign-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelColor-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/labelWidth-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/limit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/max-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/maxLength-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/min-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/minLength-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +178 -178
- package/src/components/xform/form-designer/setting-panel/property-editor/oplog-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/placeholder-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/precision-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +6 -6
- package/src/components/xform/form-designer/setting-panel/property-editor/requiredHint-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/rows-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/space-editor-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/startPlaceholder-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/step-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/styleTableClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/styleTitClass-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/tempStorage-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/type-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/uploadTip-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/uploadURL-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/urlValueEnabled-editor.vue +91 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/validation-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/validationHint-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/widgetWidth-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/widget-panel/index.vue +3 -1
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +55 -13
- package/src/components/xform/form-render/container-item/data-table-mixin copy.js +5910 -0
- package/src/components/xform/form-render/container-item/data-table-mixin.js +59 -13
- package/src/components/xform/form-render/container-item/detail-item.vue +52 -11
- package/src/components/xform/form-render/container-item/tab-item.vue +6 -2
- package/src/components/xform/form-render/indexMixin.js +56 -16
- package/src/components/xform/lang/zh-CN.js +2 -1
- package/src/components/xform/utils/attachmentValueUtil.js +239 -0
- package/src/components/xform/utils/util.js +27 -0
- package/src/mixins/wf/index.js +40 -38
- package/src/router/modules/customer.js +50 -0
- package/src/store/config/index.js +46 -0
- package/src/utils/scrollUtil.js +25 -0
- package/src/views/demo/bizTab/bill/billConfig.js +41 -0
- package/src/views/demo/bizTab/bill/detail.vue +436 -0
- package/src/views/demo/bizTab/bill/list.vue +288 -0
- package/src/views/demo/bizTab/bill/productDialog.vue +176 -0
- package/src/views/demo/bizTab/simple/billApi.js +123 -0
- package/src/views/demo/bizTab/simple/detail.vue +407 -0
- package/src/views/demo/bizTab/simple/list.vue +217 -0
- package/src/views/demo/bizTab/standalone/index.vue +121 -0
- package/src/views/demo/bizTab/wf/billConfig.js +44 -0
- package/src/views/demo/bizTab/wf/detail.vue +661 -0
- package/src/views/demo/bizTab/wf/list.vue +242 -0
- package/src/views/user/outLink/cc_form_view.vue +185 -0
|
@@ -1,585 +1,585 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="option-items-pane">
|
|
3
|
-
<el-form-item label="选项值类型">
|
|
4
|
-
<el-radio-group
|
|
5
|
-
v-model="optionModel.optionItemValueType"
|
|
6
|
-
@change="changeValueType"
|
|
7
|
-
>
|
|
8
|
-
<el-radio :label="0">文本</el-radio>
|
|
9
|
-
<el-radio :label="1">数值</el-radio>
|
|
10
|
-
<el-radio :label="2">布尔值</el-radio>
|
|
11
|
-
</el-radio-group>
|
|
12
|
-
</el-form-item>
|
|
13
|
-
|
|
14
|
-
<el-form-item label="默认值">
|
|
15
|
-
<template
|
|
16
|
-
v-if="
|
|
17
|
-
selectedWidget.type === 'checkbox' ||
|
|
18
|
-
(selectedWidget.type === 'select' && selectedWidget.options.multiple)
|
|
19
|
-
"
|
|
20
|
-
>
|
|
21
|
-
<a
|
|
22
|
-
href="javascript:void(0);"
|
|
23
|
-
class="a-link link-oneLind"
|
|
24
|
-
@click="openTableDataEdit()"
|
|
25
|
-
>
|
|
26
|
-
<span>{{ getDefaultValue() }}</span>
|
|
27
|
-
<i class="el-icon-edit"></i>
|
|
28
|
-
</a>
|
|
29
|
-
</template>
|
|
30
|
-
<template v-else>
|
|
31
|
-
<el-input
|
|
32
|
-
v-model="optionModel.defaultValue"
|
|
33
|
-
size="mini"
|
|
34
|
-
style="width: 100px"
|
|
35
|
-
v-if="!optionModel.optionItemValueType"
|
|
36
|
-
></el-input>
|
|
37
|
-
<base-input-number
|
|
38
|
-
v-model="optionModel.defaultValue"
|
|
39
|
-
size="mini"
|
|
40
|
-
style="width: 100%"
|
|
41
|
-
v-if="optionModel.optionItemValueType == 1"
|
|
42
|
-
/>
|
|
43
|
-
<el-select
|
|
44
|
-
v-model="optionModel.defaultValue"
|
|
45
|
-
style="width: 100%"
|
|
46
|
-
v-if="optionModel.optionItemValueType === 2"
|
|
47
|
-
clearable
|
|
48
|
-
@clear="optionModel.defaultValue = null"
|
|
49
|
-
>
|
|
50
|
-
<el-option :value="true" label="true"></el-option>
|
|
51
|
-
<el-option :value="false" label="false"></el-option>
|
|
52
|
-
</el-select>
|
|
53
|
-
</template>
|
|
54
|
-
</el-form-item>
|
|
55
|
-
<el-form-item :label="i18nt('显示字段')">
|
|
56
|
-
<el-input
|
|
57
|
-
type="text"
|
|
58
|
-
v-model="optionModel.labelKey"
|
|
59
|
-
placeholder="默认label"
|
|
60
|
-
:disabled="
|
|
61
|
-
optionModel.commonAttributeEnabled || !optionModel.formScriptEnabled
|
|
62
|
-
"
|
|
63
|
-
></el-input>
|
|
64
|
-
</el-form-item>
|
|
65
|
-
<el-form-item :label="i18nt('关联字段')">
|
|
66
|
-
<el-input
|
|
67
|
-
type="text"
|
|
68
|
-
v-model="optionModel.valueKey"
|
|
69
|
-
placeholder="默认value"
|
|
70
|
-
:disabled="
|
|
71
|
-
optionModel.commonAttributeEnabled || !optionModel.formScriptEnabled
|
|
72
|
-
"
|
|
73
|
-
></el-input>
|
|
74
|
-
</el-form-item>
|
|
75
|
-
<el-form-item
|
|
76
|
-
v-if="hasConfig('childrenKey')"
|
|
77
|
-
:label="i18nt('designer.setting.childrenKeyName')"
|
|
78
|
-
>
|
|
79
|
-
<el-input v-model="optionModel.childrenKey"></el-input>
|
|
80
|
-
</el-form-item>
|
|
81
|
-
<template
|
|
82
|
-
v-if="
|
|
83
|
-
!optionModel.commonAttributeEnabled && !optionModel.formScriptEnabled
|
|
84
|
-
"
|
|
85
|
-
>
|
|
86
|
-
<el-radio-group
|
|
87
|
-
v-if="
|
|
88
|
-
selectedWidget.type === 'radio' ||
|
|
89
|
-
(selectedWidget.type === 'select' && !selectedWidget.options.multiple)
|
|
90
|
-
"
|
|
91
|
-
v-model="optionModel.defaultValue"
|
|
92
|
-
@change="emitDefaultValueChange"
|
|
93
|
-
>
|
|
94
|
-
<draggable
|
|
95
|
-
tag="ul"
|
|
96
|
-
class="draggable-box"
|
|
97
|
-
:list="optionModel.optionItems"
|
|
98
|
-
v-bind="{
|
|
99
|
-
group: 'optionsGroup',
|
|
100
|
-
ghostClass: 'ghost',
|
|
101
|
-
handle: '.drag-option',
|
|
102
|
-
}"
|
|
103
|
-
>
|
|
104
|
-
<li v-for="(option, idx) in optionModel.optionItems" :key="idx">
|
|
105
|
-
<el-radio :label="option.value">
|
|
106
|
-
<el-input
|
|
107
|
-
v-model="option.value"
|
|
108
|
-
size="mini"
|
|
109
|
-
style="width: 100px"
|
|
110
|
-
v-if="!optionModel.optionItemValueType"
|
|
111
|
-
></el-input>
|
|
112
|
-
<base-input-number
|
|
113
|
-
v-model="option.value"
|
|
114
|
-
size="mini"
|
|
115
|
-
style="width: 100px"
|
|
116
|
-
v-if="optionModel.optionItemValueType == 1"
|
|
117
|
-
/>
|
|
118
|
-
<!-- <el-input v-model="option.value" size="mini" style="width: 100px" v-if="optionModel.optionItemValueType===2" disabled></el-input>-->
|
|
119
|
-
<el-select
|
|
120
|
-
v-model="option.value"
|
|
121
|
-
style="width: 100px"
|
|
122
|
-
v-if="optionModel.optionItemValueType === 2"
|
|
123
|
-
>
|
|
124
|
-
<el-option :value="true" label="true"></el-option>
|
|
125
|
-
<el-option :value="false" label="false"></el-option>
|
|
126
|
-
</el-select>
|
|
127
|
-
<el-input
|
|
128
|
-
v-model="option.label"
|
|
129
|
-
size="mini"
|
|
130
|
-
style="width: 100px"
|
|
131
|
-
></el-input>
|
|
132
|
-
<i class="el-icon-s-operation drag-option"></i>
|
|
133
|
-
<el-button
|
|
134
|
-
circle
|
|
135
|
-
plain
|
|
136
|
-
size="mini"
|
|
137
|
-
type="danger"
|
|
138
|
-
@click="deleteOption(option, idx)"
|
|
139
|
-
icon="el-icon-minus"
|
|
140
|
-
class="col-delete-button"
|
|
141
|
-
></el-button>
|
|
142
|
-
</el-radio>
|
|
143
|
-
</li>
|
|
144
|
-
</draggable>
|
|
145
|
-
</el-radio-group>
|
|
146
|
-
<el-checkbox-group
|
|
147
|
-
v-else-if="
|
|
148
|
-
selectedWidget.type === 'checkbox' ||
|
|
149
|
-
(selectedWidget.type === 'select' && selectedWidget.options.multiple)
|
|
150
|
-
"
|
|
151
|
-
v-model="optionModel.defaultValue"
|
|
152
|
-
@change="emitDefaultValueChange"
|
|
153
|
-
>
|
|
154
|
-
<draggable
|
|
155
|
-
tag="ul"
|
|
156
|
-
class="draggable-box"
|
|
157
|
-
:list="optionModel.optionItems"
|
|
158
|
-
v-bind="{
|
|
159
|
-
group: 'optionsGroup',
|
|
160
|
-
ghostClass: 'ghost',
|
|
161
|
-
handle: '.drag-option',
|
|
162
|
-
}"
|
|
163
|
-
>
|
|
164
|
-
<li v-for="(option, idx) in optionModel.optionItems" :key="idx">
|
|
165
|
-
<el-checkbox :label="option.value">
|
|
166
|
-
<el-input
|
|
167
|
-
v-model="option.value"
|
|
168
|
-
size="mini"
|
|
169
|
-
style="width: 100px"
|
|
170
|
-
v-if="!optionModel.optionItemValueType"
|
|
171
|
-
></el-input>
|
|
172
|
-
<base-input-number
|
|
173
|
-
v-model="option.value"
|
|
174
|
-
size="mini"
|
|
175
|
-
style="width: 100px"
|
|
176
|
-
v-if="optionModel.optionItemValueType == 1"
|
|
177
|
-
/>
|
|
178
|
-
<el-input
|
|
179
|
-
v-model="option.value"
|
|
180
|
-
size="mini"
|
|
181
|
-
style="width: 100px"
|
|
182
|
-
v-if="optionModel.optionItemValueType === 2"
|
|
183
|
-
disabled
|
|
184
|
-
></el-input>
|
|
185
|
-
<el-input
|
|
186
|
-
v-model="option.label"
|
|
187
|
-
size="mini"
|
|
188
|
-
style="width: 100px"
|
|
189
|
-
></el-input>
|
|
190
|
-
<i class="el-icon-s-operation drag-option"></i>
|
|
191
|
-
<el-button
|
|
192
|
-
circle
|
|
193
|
-
plain
|
|
194
|
-
size="mini"
|
|
195
|
-
type="danger"
|
|
196
|
-
@click="deleteOption(option, idx)"
|
|
197
|
-
icon="el-icon-minus"
|
|
198
|
-
class="col-delete-button"
|
|
199
|
-
></el-button>
|
|
200
|
-
</el-checkbox>
|
|
201
|
-
</li>
|
|
202
|
-
</draggable>
|
|
203
|
-
</el-checkbox-group>
|
|
204
|
-
<el-cascader
|
|
205
|
-
v-else-if="selectedWidget.type === 'cascader'"
|
|
206
|
-
v-model="optionModel.defaultValue"
|
|
207
|
-
:options="optionModel.optionItems"
|
|
208
|
-
@change="emitDefaultValueChange"
|
|
209
|
-
:placeholder="i18nt('render.hint.selectPlaceholder')"
|
|
210
|
-
style="width: 100%"
|
|
211
|
-
>
|
|
212
|
-
</el-cascader>
|
|
213
|
-
<div v-if="selectedWidget.type === 'cascader'">
|
|
214
|
-
<el-button type="text" @click="importCascaderOptions">{{
|
|
215
|
-
i18nt("designer.setting.importOptions")
|
|
216
|
-
}}</el-button>
|
|
217
|
-
<el-button type="text" @click="resetDefault">{{
|
|
218
|
-
i18nt("designer.setting.resetDefault")
|
|
219
|
-
}}</el-button>
|
|
220
|
-
</div>
|
|
221
|
-
|
|
222
|
-
<div
|
|
223
|
-
v-if="
|
|
224
|
-
selectedWidget.type === 'radio' ||
|
|
225
|
-
selectedWidget.type === 'checkbox' ||
|
|
226
|
-
selectedWidget.type === 'select'
|
|
227
|
-
"
|
|
228
|
-
>
|
|
229
|
-
<el-button type="text" @click="addOption">{{
|
|
230
|
-
i18nt("designer.setting.addOption")
|
|
231
|
-
}}</el-button>
|
|
232
|
-
<el-button
|
|
233
|
-
type="text"
|
|
234
|
-
@click="importOptions"
|
|
235
|
-
v-if="optionModel.optionItemValueType !== 2"
|
|
236
|
-
>{{ i18nt("designer.setting.importOptions") }}</el-button
|
|
237
|
-
>
|
|
238
|
-
<el-button type="text" @click="resetDefault">{{
|
|
239
|
-
i18nt("designer.setting.resetDefault")
|
|
240
|
-
}}</el-button>
|
|
241
|
-
</div>
|
|
242
|
-
</template>
|
|
243
|
-
|
|
244
|
-
<el-dialog
|
|
245
|
-
:title="i18nt('designer.setting.importOptions')"
|
|
246
|
-
:visible.sync="showImportDialogFlag"
|
|
247
|
-
v-if="showImportDialogFlag"
|
|
248
|
-
:show-close="true"
|
|
249
|
-
class="small-padding-dialog"
|
|
250
|
-
:close-on-click-modal="false"
|
|
251
|
-
:close-on-press-escape="false"
|
|
252
|
-
:destroy-on-close="true"
|
|
253
|
-
:append-to-body="true"
|
|
254
|
-
:modal-append-to-body="true"
|
|
255
|
-
>
|
|
256
|
-
<el-form-item
|
|
257
|
-
><el-input type="textarea" rows="10" v-model="optionLines"></el-input
|
|
258
|
-
></el-form-item>
|
|
259
|
-
<div slot="footer" class="dialog-footer">
|
|
260
|
-
<el-button size="large" type="primary" @click="saveOptions">{{
|
|
261
|
-
i18nt("designer.hint.confirm")
|
|
262
|
-
}}</el-button>
|
|
263
|
-
<el-button size="large" type="" @click="showImportDialogFlag = false">{{
|
|
264
|
-
i18nt("designer.hint.cancel")
|
|
265
|
-
}}</el-button>
|
|
266
|
-
</div>
|
|
267
|
-
</el-dialog>
|
|
268
|
-
|
|
269
|
-
<el-dialog
|
|
270
|
-
:title="i18nt('designer.setting.importOptions')"
|
|
271
|
-
:visible.sync="showImportCascaderDialogFlag"
|
|
272
|
-
v-if="showImportCascaderDialogFlag"
|
|
273
|
-
:show-close="true"
|
|
274
|
-
class="small-padding-dialog"
|
|
275
|
-
append-to-body
|
|
276
|
-
:close-on-click-modal="false"
|
|
277
|
-
:close-on-press-escape="false"
|
|
278
|
-
:destroy-on-close="true"
|
|
279
|
-
>
|
|
280
|
-
<code-editor
|
|
281
|
-
v-model="cascaderOptions"
|
|
282
|
-
mode="json"
|
|
283
|
-
:readonly="false"
|
|
284
|
-
></code-editor>
|
|
285
|
-
<div slot="footer" class="dialog-footer">
|
|
286
|
-
<el-button size="large" type="primary" @click="saveCascaderOptions">{{
|
|
287
|
-
i18nt("designer.hint.confirm")
|
|
288
|
-
}}</el-button>
|
|
289
|
-
<el-button
|
|
290
|
-
size="large"
|
|
291
|
-
type=""
|
|
292
|
-
@click="showImportCascaderDialogFlag = false"
|
|
293
|
-
>{{ i18nt("designer.hint.cancel") }}</el-button
|
|
294
|
-
>
|
|
295
|
-
</div>
|
|
296
|
-
</el-dialog>
|
|
297
|
-
|
|
298
|
-
<el-dialog
|
|
299
|
-
v-if="dataDialogVisible"
|
|
300
|
-
custom-class="dialog-style list-dialog"
|
|
301
|
-
:title="i18nt('默认值编辑')"
|
|
302
|
-
:visible.sync="dataDialogVisible"
|
|
303
|
-
:show-close="!0"
|
|
304
|
-
append-to-body=""
|
|
305
|
-
:close-on-click-modal="!1"
|
|
306
|
-
:close-on-press-escape="!1"
|
|
307
|
-
:destroy-on-close="!0"
|
|
308
|
-
width="75%"
|
|
309
|
-
v-dialog-drag
|
|
310
|
-
>
|
|
311
|
-
<template slot="footer">
|
|
312
|
-
<div class="dialog-footer">
|
|
313
|
-
<el-button
|
|
314
|
-
type=""
|
|
315
|
-
@click="dataDialogVisible = !1"
|
|
316
|
-
class="button-sty"
|
|
317
|
-
icon="el-icon-close"
|
|
318
|
-
>
|
|
319
|
-
{{ i18nt("designer.hint.cancel") }}
|
|
320
|
-
</el-button>
|
|
321
|
-
<el-button
|
|
322
|
-
type="primary"
|
|
323
|
-
@click="saveTableData"
|
|
324
|
-
class="button-sty"
|
|
325
|
-
icon="el-icon-check"
|
|
326
|
-
>
|
|
327
|
-
{{ i18nt("designer.hint.confirm") }}
|
|
328
|
-
</el-button>
|
|
329
|
-
</div>
|
|
330
|
-
</template>
|
|
331
|
-
<code-editor
|
|
332
|
-
mode="json"
|
|
333
|
-
:readonly="!1"
|
|
334
|
-
v-model="tableDataOptions"
|
|
335
|
-
></code-editor>
|
|
336
|
-
</el-dialog>
|
|
337
|
-
</div>
|
|
338
|
-
</template>
|
|
339
|
-
|
|
340
|
-
<script>
|
|
341
|
-
import Draggable from "vuedraggable";
|
|
342
|
-
import i18n from "../../../../components/xform/utils/i18n";
|
|
343
|
-
import propertyMixin from "../../../../components/xform/form-designer/setting-panel/property-editor/propertyMixin";
|
|
344
|
-
|
|
345
|
-
export default {
|
|
346
|
-
name: "OptionItemsSetting",
|
|
347
|
-
componentName: "PropertyEditor",
|
|
348
|
-
mixins: [i18n, propertyMixin],
|
|
349
|
-
components: {
|
|
350
|
-
Draggable,
|
|
351
|
-
},
|
|
352
|
-
props: {
|
|
353
|
-
designer: Object,
|
|
354
|
-
selectedWidget: Object,
|
|
355
|
-
},
|
|
356
|
-
data() {
|
|
357
|
-
return {
|
|
358
|
-
showImportDialogFlag: false,
|
|
359
|
-
optionLines: "",
|
|
360
|
-
|
|
361
|
-
cascaderOptions: "",
|
|
362
|
-
showImportCascaderDialogFlag: false,
|
|
363
|
-
|
|
364
|
-
//separator: '||',
|
|
365
|
-
separator: ",",
|
|
366
|
-
dataDialogVisible: false,
|
|
367
|
-
tableDataOptions: [],
|
|
368
|
-
};
|
|
369
|
-
},
|
|
370
|
-
computed: {
|
|
371
|
-
optionModel() {
|
|
372
|
-
return this.selectedWidget.options;
|
|
373
|
-
},
|
|
374
|
-
},
|
|
375
|
-
watch: {
|
|
376
|
-
"selectedWidget.options": {
|
|
377
|
-
deep: true,
|
|
378
|
-
handler(val) {
|
|
379
|
-
//console.log('888888', 'Options change!')
|
|
380
|
-
},
|
|
381
|
-
},
|
|
382
|
-
},
|
|
383
|
-
created() {
|
|
384
|
-
if (!this.optionModel.hasOwnProperty("optionItemValueType")) {
|
|
385
|
-
this.optionModel.optionItemValueType = 0;
|
|
386
|
-
}
|
|
387
|
-
if (this.optionModel.optionItemValueType == 1) {
|
|
388
|
-
if (
|
|
389
|
-
this.optionModel.defaultValue === null ||
|
|
390
|
-
this.optionModel.defaultValue === ""
|
|
391
|
-
) {
|
|
392
|
-
this.optionModel.defaultValue = undefined;
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
},
|
|
396
|
-
methods: {
|
|
397
|
-
emitDefaultValueChange() {
|
|
398
|
-
if (!!this.designer && !!this.designer.formWidget) {
|
|
399
|
-
let fieldWidget = this.designer.formWidget.getWidgetRef(
|
|
400
|
-
this.selectedWidget.options.name
|
|
401
|
-
);
|
|
402
|
-
if (!!fieldWidget && !!fieldWidget.refreshDefaultValue) {
|
|
403
|
-
fieldWidget.refreshDefaultValue();
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
},
|
|
407
|
-
|
|
408
|
-
deleteOption(option, index) {
|
|
409
|
-
this.optionModel.optionItems.splice(index, 1);
|
|
410
|
-
},
|
|
411
|
-
|
|
412
|
-
addOption() {
|
|
413
|
-
let optionItemValueType = this.optionModel.optionItemValueType;
|
|
414
|
-
let newValue = this.optionModel.optionItems.length + 1;
|
|
415
|
-
if (!optionItemValueType) {
|
|
416
|
-
newValue = newValue + "";
|
|
417
|
-
} else if (optionItemValueType == 2) {
|
|
418
|
-
newValue = true;
|
|
419
|
-
}
|
|
420
|
-
this.optionModel.optionItems.push({
|
|
421
|
-
value: newValue,
|
|
422
|
-
label: "new option",
|
|
423
|
-
});
|
|
424
|
-
},
|
|
425
|
-
|
|
426
|
-
importOptions() {
|
|
427
|
-
this.optionLines = "";
|
|
428
|
-
if (this.optionModel.optionItems.length > 0) {
|
|
429
|
-
this.optionModel.optionItems.forEach((opt) => {
|
|
430
|
-
if (opt.value === opt.label) {
|
|
431
|
-
this.optionLines += opt.value + "\n";
|
|
432
|
-
} else {
|
|
433
|
-
this.optionLines += opt.value + this.separator + opt.label + "\n";
|
|
434
|
-
}
|
|
435
|
-
});
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
this.showImportDialogFlag = true;
|
|
439
|
-
},
|
|
440
|
-
|
|
441
|
-
saveOptions() {
|
|
442
|
-
let lineArray = this.optionLines.split("\n");
|
|
443
|
-
//console.log('test', lineArray)
|
|
444
|
-
if (lineArray.length > 0) {
|
|
445
|
-
let isNumericOptionItemValue =
|
|
446
|
-
this.optionModel.optionItemValueType === 1;
|
|
447
|
-
this.optionModel.optionItems = [];
|
|
448
|
-
lineArray.forEach((optLine) => {
|
|
449
|
-
if (!!optLine && !!optLine.trim()) {
|
|
450
|
-
if (optLine.indexOf(this.separator) !== -1) {
|
|
451
|
-
let valueStr = optLine.split(this.separator)[0];
|
|
452
|
-
let value = isNumericOptionItemValue
|
|
453
|
-
? Number(valueStr)
|
|
454
|
-
: valueStr;
|
|
455
|
-
this.optionModel.optionItems.push({
|
|
456
|
-
value: value,
|
|
457
|
-
label: optLine.split(this.separator)[1],
|
|
458
|
-
});
|
|
459
|
-
} else {
|
|
460
|
-
let value = isNumericOptionItemValue ? Number(optLine) : optLine;
|
|
461
|
-
this.optionModel.optionItems.push({
|
|
462
|
-
value: value,
|
|
463
|
-
label: optLine,
|
|
464
|
-
});
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
});
|
|
468
|
-
} else {
|
|
469
|
-
this.optionModel.optionItems = [];
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
this.showImportDialogFlag = false;
|
|
473
|
-
},
|
|
474
|
-
|
|
475
|
-
resetDefault() {
|
|
476
|
-
if (
|
|
477
|
-
this.selectedWidget.type === "checkbox" ||
|
|
478
|
-
(this.selectedWidget.type === "select" &&
|
|
479
|
-
this.selectedWidget.options.multiple)
|
|
480
|
-
) {
|
|
481
|
-
this.optionModel.defaultValue = [];
|
|
482
|
-
} else {
|
|
483
|
-
this.optionModel.defaultValue = undefined;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
this.emitDefaultValueChange();
|
|
487
|
-
},
|
|
488
|
-
|
|
489
|
-
importCascaderOptions() {
|
|
490
|
-
this.cascaderOptions = JSON.stringify(
|
|
491
|
-
this.optionModel.optionItems,
|
|
492
|
-
null,
|
|
493
|
-
" "
|
|
494
|
-
);
|
|
495
|
-
this.showImportCascaderDialogFlag = true;
|
|
496
|
-
},
|
|
497
|
-
|
|
498
|
-
saveCascaderOptions() {
|
|
499
|
-
try {
|
|
500
|
-
let newOptions = JSON.parse(this.cascaderOptions);
|
|
501
|
-
this.optionModel.optionItems = newOptions;
|
|
502
|
-
//TODO: 是否需要重置选项默认值??
|
|
503
|
-
|
|
504
|
-
this.showImportCascaderDialogFlag = false;
|
|
505
|
-
} catch (ex) {
|
|
506
|
-
this.$message.error(
|
|
507
|
-
this.i18nt("designer.hint.invalidOptionsData") + ex.message
|
|
508
|
-
);
|
|
509
|
-
}
|
|
510
|
-
},
|
|
511
|
-
changeValueType(val) {
|
|
512
|
-
let optionItems = this.optionModel.optionItems;
|
|
513
|
-
// this.optionModel.defaultValue = undefined;
|
|
514
|
-
this.resetDefault();
|
|
515
|
-
this.optionModel.optionItems.length = 0;
|
|
516
|
-
if (val == 2) {
|
|
517
|
-
optionItems.push({
|
|
518
|
-
label: "是",
|
|
519
|
-
value: true,
|
|
520
|
-
});
|
|
521
|
-
optionItems.push({
|
|
522
|
-
label: "否",
|
|
523
|
-
value: false,
|
|
524
|
-
});
|
|
525
|
-
} else {
|
|
526
|
-
this.addOption();
|
|
527
|
-
}
|
|
528
|
-
this.$forceUpdate();
|
|
529
|
-
this.emitDefaultValueChange();
|
|
530
|
-
},
|
|
531
|
-
|
|
532
|
-
openTableDataEdit: function () {
|
|
533
|
-
(this.dataDialogVisible = !0),
|
|
534
|
-
(this.tableDataOptions = JSON.stringify(
|
|
535
|
-
this.optionModel.defaultValue,
|
|
536
|
-
null,
|
|
537
|
-
" "
|
|
538
|
-
));
|
|
539
|
-
},
|
|
540
|
-
saveTableData: function () {
|
|
541
|
-
try {
|
|
542
|
-
(this.optionModel.defaultValue = JSON.parse(this.tableDataOptions)),
|
|
543
|
-
(this.dataDialogVisible = !1);
|
|
544
|
-
} catch (e) {
|
|
545
|
-
this.$message.error(
|
|
546
|
-
this.i18nt("designer.hint.invalidOptionsData") + e.message
|
|
547
|
-
);
|
|
548
|
-
}
|
|
549
|
-
},
|
|
550
|
-
getDefaultValue() {
|
|
551
|
-
let result = this.optionModel.defaultValue;
|
|
552
|
-
if (result) {
|
|
553
|
-
if (Array.isArray(result)) {
|
|
554
|
-
result = result.join(",");
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
return result;
|
|
558
|
-
},
|
|
559
|
-
},
|
|
560
|
-
};
|
|
561
|
-
</script>
|
|
562
|
-
|
|
563
|
-
<style lang="scss" scoped>
|
|
564
|
-
.option-items-pane ul {
|
|
565
|
-
padding-inline-start: 6px;
|
|
566
|
-
padding-left: 6px; /* 重置IE11默认样式 */
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
li.ghost {
|
|
570
|
-
background: #fff;
|
|
571
|
-
border: 2px dotted $--color-primary;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
.drag-option {
|
|
575
|
-
cursor: move;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
.small-padding-dialog ::v-deep .el-dialog__body {
|
|
579
|
-
padding: 10px 15px;
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
.dialog-footer .el-button {
|
|
583
|
-
width: 100px;
|
|
584
|
-
}
|
|
585
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="option-items-pane">
|
|
3
|
+
<el-form-item label="选项值类型">
|
|
4
|
+
<el-radio-group
|
|
5
|
+
v-model="optionModel.optionItemValueType"
|
|
6
|
+
@change="changeValueType"
|
|
7
|
+
>
|
|
8
|
+
<el-radio :label="0">文本</el-radio>
|
|
9
|
+
<el-radio :label="1">数值</el-radio>
|
|
10
|
+
<el-radio :label="2">布尔值</el-radio>
|
|
11
|
+
</el-radio-group>
|
|
12
|
+
</el-form-item>
|
|
13
|
+
|
|
14
|
+
<el-form-item class="form-item-label-top" label="默认值">
|
|
15
|
+
<template
|
|
16
|
+
v-if="
|
|
17
|
+
selectedWidget.type === 'checkbox' ||
|
|
18
|
+
(selectedWidget.type === 'select' && selectedWidget.options.multiple)
|
|
19
|
+
"
|
|
20
|
+
>
|
|
21
|
+
<a
|
|
22
|
+
href="javascript:void(0);"
|
|
23
|
+
class="a-link link-oneLind"
|
|
24
|
+
@click="openTableDataEdit()"
|
|
25
|
+
>
|
|
26
|
+
<span>{{ getDefaultValue() }}</span>
|
|
27
|
+
<i class="el-icon-edit"></i>
|
|
28
|
+
</a>
|
|
29
|
+
</template>
|
|
30
|
+
<template v-else>
|
|
31
|
+
<el-input
|
|
32
|
+
v-model="optionModel.defaultValue"
|
|
33
|
+
size="mini"
|
|
34
|
+
style="width: 100px"
|
|
35
|
+
v-if="!optionModel.optionItemValueType"
|
|
36
|
+
></el-input>
|
|
37
|
+
<base-input-number
|
|
38
|
+
v-model="optionModel.defaultValue"
|
|
39
|
+
size="mini"
|
|
40
|
+
style="width: 100%"
|
|
41
|
+
v-if="optionModel.optionItemValueType == 1"
|
|
42
|
+
/>
|
|
43
|
+
<el-select
|
|
44
|
+
v-model="optionModel.defaultValue"
|
|
45
|
+
style="width: 100%"
|
|
46
|
+
v-if="optionModel.optionItemValueType === 2"
|
|
47
|
+
clearable
|
|
48
|
+
@clear="optionModel.defaultValue = null"
|
|
49
|
+
>
|
|
50
|
+
<el-option :value="true" label="true"></el-option>
|
|
51
|
+
<el-option :value="false" label="false"></el-option>
|
|
52
|
+
</el-select>
|
|
53
|
+
</template>
|
|
54
|
+
</el-form-item>
|
|
55
|
+
<el-form-item class="form-item-label-top" :label="i18nt('显示字段')">
|
|
56
|
+
<el-input
|
|
57
|
+
type="text"
|
|
58
|
+
v-model="optionModel.labelKey"
|
|
59
|
+
placeholder="默认label"
|
|
60
|
+
:disabled="
|
|
61
|
+
optionModel.commonAttributeEnabled || !optionModel.formScriptEnabled
|
|
62
|
+
"
|
|
63
|
+
></el-input>
|
|
64
|
+
</el-form-item>
|
|
65
|
+
<el-form-item class="form-item-label-top" :label="i18nt('关联字段')">
|
|
66
|
+
<el-input
|
|
67
|
+
type="text"
|
|
68
|
+
v-model="optionModel.valueKey"
|
|
69
|
+
placeholder="默认value"
|
|
70
|
+
:disabled="
|
|
71
|
+
optionModel.commonAttributeEnabled || !optionModel.formScriptEnabled
|
|
72
|
+
"
|
|
73
|
+
></el-input>
|
|
74
|
+
</el-form-item>
|
|
75
|
+
<el-form-item class="form-item-label-top"
|
|
76
|
+
v-if="hasConfig('childrenKey')"
|
|
77
|
+
:label="i18nt('designer.setting.childrenKeyName')"
|
|
78
|
+
>
|
|
79
|
+
<el-input v-model="optionModel.childrenKey"></el-input>
|
|
80
|
+
</el-form-item>
|
|
81
|
+
<template
|
|
82
|
+
v-if="
|
|
83
|
+
!optionModel.commonAttributeEnabled && !optionModel.formScriptEnabled
|
|
84
|
+
"
|
|
85
|
+
>
|
|
86
|
+
<el-radio-group
|
|
87
|
+
v-if="
|
|
88
|
+
selectedWidget.type === 'radio' ||
|
|
89
|
+
(selectedWidget.type === 'select' && !selectedWidget.options.multiple)
|
|
90
|
+
"
|
|
91
|
+
v-model="optionModel.defaultValue"
|
|
92
|
+
@change="emitDefaultValueChange"
|
|
93
|
+
>
|
|
94
|
+
<draggable
|
|
95
|
+
tag="ul"
|
|
96
|
+
class="draggable-box"
|
|
97
|
+
:list="optionModel.optionItems"
|
|
98
|
+
v-bind="{
|
|
99
|
+
group: 'optionsGroup',
|
|
100
|
+
ghostClass: 'ghost',
|
|
101
|
+
handle: '.drag-option',
|
|
102
|
+
}"
|
|
103
|
+
>
|
|
104
|
+
<li v-for="(option, idx) in optionModel.optionItems" :key="idx">
|
|
105
|
+
<el-radio :label="option.value">
|
|
106
|
+
<el-input
|
|
107
|
+
v-model="option.value"
|
|
108
|
+
size="mini"
|
|
109
|
+
style="width: 100px"
|
|
110
|
+
v-if="!optionModel.optionItemValueType"
|
|
111
|
+
></el-input>
|
|
112
|
+
<base-input-number
|
|
113
|
+
v-model="option.value"
|
|
114
|
+
size="mini"
|
|
115
|
+
style="width: 100px"
|
|
116
|
+
v-if="optionModel.optionItemValueType == 1"
|
|
117
|
+
/>
|
|
118
|
+
<!-- <el-input v-model="option.value" size="mini" style="width: 100px" v-if="optionModel.optionItemValueType===2" disabled></el-input>-->
|
|
119
|
+
<el-select
|
|
120
|
+
v-model="option.value"
|
|
121
|
+
style="width: 100px"
|
|
122
|
+
v-if="optionModel.optionItemValueType === 2"
|
|
123
|
+
>
|
|
124
|
+
<el-option :value="true" label="true"></el-option>
|
|
125
|
+
<el-option :value="false" label="false"></el-option>
|
|
126
|
+
</el-select>
|
|
127
|
+
<el-input
|
|
128
|
+
v-model="option.label"
|
|
129
|
+
size="mini"
|
|
130
|
+
style="width: 100px"
|
|
131
|
+
></el-input>
|
|
132
|
+
<i class="el-icon-s-operation drag-option"></i>
|
|
133
|
+
<el-button
|
|
134
|
+
circle
|
|
135
|
+
plain
|
|
136
|
+
size="mini"
|
|
137
|
+
type="danger"
|
|
138
|
+
@click="deleteOption(option, idx)"
|
|
139
|
+
icon="el-icon-minus"
|
|
140
|
+
class="col-delete-button"
|
|
141
|
+
></el-button>
|
|
142
|
+
</el-radio>
|
|
143
|
+
</li>
|
|
144
|
+
</draggable>
|
|
145
|
+
</el-radio-group>
|
|
146
|
+
<el-checkbox-group
|
|
147
|
+
v-else-if="
|
|
148
|
+
selectedWidget.type === 'checkbox' ||
|
|
149
|
+
(selectedWidget.type === 'select' && selectedWidget.options.multiple)
|
|
150
|
+
"
|
|
151
|
+
v-model="optionModel.defaultValue"
|
|
152
|
+
@change="emitDefaultValueChange"
|
|
153
|
+
>
|
|
154
|
+
<draggable
|
|
155
|
+
tag="ul"
|
|
156
|
+
class="draggable-box"
|
|
157
|
+
:list="optionModel.optionItems"
|
|
158
|
+
v-bind="{
|
|
159
|
+
group: 'optionsGroup',
|
|
160
|
+
ghostClass: 'ghost',
|
|
161
|
+
handle: '.drag-option',
|
|
162
|
+
}"
|
|
163
|
+
>
|
|
164
|
+
<li v-for="(option, idx) in optionModel.optionItems" :key="idx">
|
|
165
|
+
<el-checkbox :label="option.value">
|
|
166
|
+
<el-input
|
|
167
|
+
v-model="option.value"
|
|
168
|
+
size="mini"
|
|
169
|
+
style="width: 100px"
|
|
170
|
+
v-if="!optionModel.optionItemValueType"
|
|
171
|
+
></el-input>
|
|
172
|
+
<base-input-number
|
|
173
|
+
v-model="option.value"
|
|
174
|
+
size="mini"
|
|
175
|
+
style="width: 100px"
|
|
176
|
+
v-if="optionModel.optionItemValueType == 1"
|
|
177
|
+
/>
|
|
178
|
+
<el-input
|
|
179
|
+
v-model="option.value"
|
|
180
|
+
size="mini"
|
|
181
|
+
style="width: 100px"
|
|
182
|
+
v-if="optionModel.optionItemValueType === 2"
|
|
183
|
+
disabled
|
|
184
|
+
></el-input>
|
|
185
|
+
<el-input
|
|
186
|
+
v-model="option.label"
|
|
187
|
+
size="mini"
|
|
188
|
+
style="width: 100px"
|
|
189
|
+
></el-input>
|
|
190
|
+
<i class="el-icon-s-operation drag-option"></i>
|
|
191
|
+
<el-button
|
|
192
|
+
circle
|
|
193
|
+
plain
|
|
194
|
+
size="mini"
|
|
195
|
+
type="danger"
|
|
196
|
+
@click="deleteOption(option, idx)"
|
|
197
|
+
icon="el-icon-minus"
|
|
198
|
+
class="col-delete-button"
|
|
199
|
+
></el-button>
|
|
200
|
+
</el-checkbox>
|
|
201
|
+
</li>
|
|
202
|
+
</draggable>
|
|
203
|
+
</el-checkbox-group>
|
|
204
|
+
<el-cascader
|
|
205
|
+
v-else-if="selectedWidget.type === 'cascader'"
|
|
206
|
+
v-model="optionModel.defaultValue"
|
|
207
|
+
:options="optionModel.optionItems"
|
|
208
|
+
@change="emitDefaultValueChange"
|
|
209
|
+
:placeholder="i18nt('render.hint.selectPlaceholder')"
|
|
210
|
+
style="width: 100%"
|
|
211
|
+
>
|
|
212
|
+
</el-cascader>
|
|
213
|
+
<div v-if="selectedWidget.type === 'cascader'">
|
|
214
|
+
<el-button type="text" @click="importCascaderOptions">{{
|
|
215
|
+
i18nt("designer.setting.importOptions")
|
|
216
|
+
}}</el-button>
|
|
217
|
+
<el-button type="text" @click="resetDefault">{{
|
|
218
|
+
i18nt("designer.setting.resetDefault")
|
|
219
|
+
}}</el-button>
|
|
220
|
+
</div>
|
|
221
|
+
|
|
222
|
+
<div
|
|
223
|
+
v-if="
|
|
224
|
+
selectedWidget.type === 'radio' ||
|
|
225
|
+
selectedWidget.type === 'checkbox' ||
|
|
226
|
+
selectedWidget.type === 'select'
|
|
227
|
+
"
|
|
228
|
+
>
|
|
229
|
+
<el-button type="text" @click="addOption">{{
|
|
230
|
+
i18nt("designer.setting.addOption")
|
|
231
|
+
}}</el-button>
|
|
232
|
+
<el-button
|
|
233
|
+
type="text"
|
|
234
|
+
@click="importOptions"
|
|
235
|
+
v-if="optionModel.optionItemValueType !== 2"
|
|
236
|
+
>{{ i18nt("designer.setting.importOptions") }}</el-button
|
|
237
|
+
>
|
|
238
|
+
<el-button type="text" @click="resetDefault">{{
|
|
239
|
+
i18nt("designer.setting.resetDefault")
|
|
240
|
+
}}</el-button>
|
|
241
|
+
</div>
|
|
242
|
+
</template>
|
|
243
|
+
|
|
244
|
+
<el-dialog
|
|
245
|
+
:title="i18nt('designer.setting.importOptions')"
|
|
246
|
+
:visible.sync="showImportDialogFlag"
|
|
247
|
+
v-if="showImportDialogFlag"
|
|
248
|
+
:show-close="true"
|
|
249
|
+
class="small-padding-dialog"
|
|
250
|
+
:close-on-click-modal="false"
|
|
251
|
+
:close-on-press-escape="false"
|
|
252
|
+
:destroy-on-close="true"
|
|
253
|
+
:append-to-body="true"
|
|
254
|
+
:modal-append-to-body="true"
|
|
255
|
+
>
|
|
256
|
+
<el-form-item
|
|
257
|
+
><el-input type="textarea" rows="10" v-model="optionLines"></el-input
|
|
258
|
+
></el-form-item>
|
|
259
|
+
<div slot="footer" class="dialog-footer">
|
|
260
|
+
<el-button size="large" type="primary" @click="saveOptions">{{
|
|
261
|
+
i18nt("designer.hint.confirm")
|
|
262
|
+
}}</el-button>
|
|
263
|
+
<el-button size="large" type="" @click="showImportDialogFlag = false">{{
|
|
264
|
+
i18nt("designer.hint.cancel")
|
|
265
|
+
}}</el-button>
|
|
266
|
+
</div>
|
|
267
|
+
</el-dialog>
|
|
268
|
+
|
|
269
|
+
<el-dialog
|
|
270
|
+
:title="i18nt('designer.setting.importOptions')"
|
|
271
|
+
:visible.sync="showImportCascaderDialogFlag"
|
|
272
|
+
v-if="showImportCascaderDialogFlag"
|
|
273
|
+
:show-close="true"
|
|
274
|
+
class="small-padding-dialog"
|
|
275
|
+
append-to-body
|
|
276
|
+
:close-on-click-modal="false"
|
|
277
|
+
:close-on-press-escape="false"
|
|
278
|
+
:destroy-on-close="true"
|
|
279
|
+
>
|
|
280
|
+
<code-editor
|
|
281
|
+
v-model="cascaderOptions"
|
|
282
|
+
mode="json"
|
|
283
|
+
:readonly="false"
|
|
284
|
+
></code-editor>
|
|
285
|
+
<div slot="footer" class="dialog-footer">
|
|
286
|
+
<el-button size="large" type="primary" @click="saveCascaderOptions">{{
|
|
287
|
+
i18nt("designer.hint.confirm")
|
|
288
|
+
}}</el-button>
|
|
289
|
+
<el-button
|
|
290
|
+
size="large"
|
|
291
|
+
type=""
|
|
292
|
+
@click="showImportCascaderDialogFlag = false"
|
|
293
|
+
>{{ i18nt("designer.hint.cancel") }}</el-button
|
|
294
|
+
>
|
|
295
|
+
</div>
|
|
296
|
+
</el-dialog>
|
|
297
|
+
|
|
298
|
+
<el-dialog
|
|
299
|
+
v-if="dataDialogVisible"
|
|
300
|
+
custom-class="dialog-style list-dialog"
|
|
301
|
+
:title="i18nt('默认值编辑')"
|
|
302
|
+
:visible.sync="dataDialogVisible"
|
|
303
|
+
:show-close="!0"
|
|
304
|
+
append-to-body=""
|
|
305
|
+
:close-on-click-modal="!1"
|
|
306
|
+
:close-on-press-escape="!1"
|
|
307
|
+
:destroy-on-close="!0"
|
|
308
|
+
width="75%"
|
|
309
|
+
v-dialog-drag
|
|
310
|
+
>
|
|
311
|
+
<template slot="footer">
|
|
312
|
+
<div class="dialog-footer">
|
|
313
|
+
<el-button
|
|
314
|
+
type=""
|
|
315
|
+
@click="dataDialogVisible = !1"
|
|
316
|
+
class="button-sty"
|
|
317
|
+
icon="el-icon-close"
|
|
318
|
+
>
|
|
319
|
+
{{ i18nt("designer.hint.cancel") }}
|
|
320
|
+
</el-button>
|
|
321
|
+
<el-button
|
|
322
|
+
type="primary"
|
|
323
|
+
@click="saveTableData"
|
|
324
|
+
class="button-sty"
|
|
325
|
+
icon="el-icon-check"
|
|
326
|
+
>
|
|
327
|
+
{{ i18nt("designer.hint.confirm") }}
|
|
328
|
+
</el-button>
|
|
329
|
+
</div>
|
|
330
|
+
</template>
|
|
331
|
+
<code-editor
|
|
332
|
+
mode="json"
|
|
333
|
+
:readonly="!1"
|
|
334
|
+
v-model="tableDataOptions"
|
|
335
|
+
></code-editor>
|
|
336
|
+
</el-dialog>
|
|
337
|
+
</div>
|
|
338
|
+
</template>
|
|
339
|
+
|
|
340
|
+
<script>
|
|
341
|
+
import Draggable from "vuedraggable";
|
|
342
|
+
import i18n from "../../../../components/xform/utils/i18n";
|
|
343
|
+
import propertyMixin from "../../../../components/xform/form-designer/setting-panel/property-editor/propertyMixin";
|
|
344
|
+
|
|
345
|
+
export default {
|
|
346
|
+
name: "OptionItemsSetting",
|
|
347
|
+
componentName: "PropertyEditor",
|
|
348
|
+
mixins: [i18n, propertyMixin],
|
|
349
|
+
components: {
|
|
350
|
+
Draggable,
|
|
351
|
+
},
|
|
352
|
+
props: {
|
|
353
|
+
designer: Object,
|
|
354
|
+
selectedWidget: Object,
|
|
355
|
+
},
|
|
356
|
+
data() {
|
|
357
|
+
return {
|
|
358
|
+
showImportDialogFlag: false,
|
|
359
|
+
optionLines: "",
|
|
360
|
+
|
|
361
|
+
cascaderOptions: "",
|
|
362
|
+
showImportCascaderDialogFlag: false,
|
|
363
|
+
|
|
364
|
+
//separator: '||',
|
|
365
|
+
separator: ",",
|
|
366
|
+
dataDialogVisible: false,
|
|
367
|
+
tableDataOptions: [],
|
|
368
|
+
};
|
|
369
|
+
},
|
|
370
|
+
computed: {
|
|
371
|
+
optionModel() {
|
|
372
|
+
return this.selectedWidget.options;
|
|
373
|
+
},
|
|
374
|
+
},
|
|
375
|
+
watch: {
|
|
376
|
+
"selectedWidget.options": {
|
|
377
|
+
deep: true,
|
|
378
|
+
handler(val) {
|
|
379
|
+
//console.log('888888', 'Options change!')
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
},
|
|
383
|
+
created() {
|
|
384
|
+
if (!this.optionModel.hasOwnProperty("optionItemValueType")) {
|
|
385
|
+
this.optionModel.optionItemValueType = 0;
|
|
386
|
+
}
|
|
387
|
+
if (this.optionModel.optionItemValueType == 1) {
|
|
388
|
+
if (
|
|
389
|
+
this.optionModel.defaultValue === null ||
|
|
390
|
+
this.optionModel.defaultValue === ""
|
|
391
|
+
) {
|
|
392
|
+
this.optionModel.defaultValue = undefined;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
methods: {
|
|
397
|
+
emitDefaultValueChange() {
|
|
398
|
+
if (!!this.designer && !!this.designer.formWidget) {
|
|
399
|
+
let fieldWidget = this.designer.formWidget.getWidgetRef(
|
|
400
|
+
this.selectedWidget.options.name
|
|
401
|
+
);
|
|
402
|
+
if (!!fieldWidget && !!fieldWidget.refreshDefaultValue) {
|
|
403
|
+
fieldWidget.refreshDefaultValue();
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
|
|
408
|
+
deleteOption(option, index) {
|
|
409
|
+
this.optionModel.optionItems.splice(index, 1);
|
|
410
|
+
},
|
|
411
|
+
|
|
412
|
+
addOption() {
|
|
413
|
+
let optionItemValueType = this.optionModel.optionItemValueType;
|
|
414
|
+
let newValue = this.optionModel.optionItems.length + 1;
|
|
415
|
+
if (!optionItemValueType) {
|
|
416
|
+
newValue = newValue + "";
|
|
417
|
+
} else if (optionItemValueType == 2) {
|
|
418
|
+
newValue = true;
|
|
419
|
+
}
|
|
420
|
+
this.optionModel.optionItems.push({
|
|
421
|
+
value: newValue,
|
|
422
|
+
label: "new option",
|
|
423
|
+
});
|
|
424
|
+
},
|
|
425
|
+
|
|
426
|
+
importOptions() {
|
|
427
|
+
this.optionLines = "";
|
|
428
|
+
if (this.optionModel.optionItems.length > 0) {
|
|
429
|
+
this.optionModel.optionItems.forEach((opt) => {
|
|
430
|
+
if (opt.value === opt.label) {
|
|
431
|
+
this.optionLines += opt.value + "\n";
|
|
432
|
+
} else {
|
|
433
|
+
this.optionLines += opt.value + this.separator + opt.label + "\n";
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
this.showImportDialogFlag = true;
|
|
439
|
+
},
|
|
440
|
+
|
|
441
|
+
saveOptions() {
|
|
442
|
+
let lineArray = this.optionLines.split("\n");
|
|
443
|
+
//console.log('test', lineArray)
|
|
444
|
+
if (lineArray.length > 0) {
|
|
445
|
+
let isNumericOptionItemValue =
|
|
446
|
+
this.optionModel.optionItemValueType === 1;
|
|
447
|
+
this.optionModel.optionItems = [];
|
|
448
|
+
lineArray.forEach((optLine) => {
|
|
449
|
+
if (!!optLine && !!optLine.trim()) {
|
|
450
|
+
if (optLine.indexOf(this.separator) !== -1) {
|
|
451
|
+
let valueStr = optLine.split(this.separator)[0];
|
|
452
|
+
let value = isNumericOptionItemValue
|
|
453
|
+
? Number(valueStr)
|
|
454
|
+
: valueStr;
|
|
455
|
+
this.optionModel.optionItems.push({
|
|
456
|
+
value: value,
|
|
457
|
+
label: optLine.split(this.separator)[1],
|
|
458
|
+
});
|
|
459
|
+
} else {
|
|
460
|
+
let value = isNumericOptionItemValue ? Number(optLine) : optLine;
|
|
461
|
+
this.optionModel.optionItems.push({
|
|
462
|
+
value: value,
|
|
463
|
+
label: optLine,
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
} else {
|
|
469
|
+
this.optionModel.optionItems = [];
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
this.showImportDialogFlag = false;
|
|
473
|
+
},
|
|
474
|
+
|
|
475
|
+
resetDefault() {
|
|
476
|
+
if (
|
|
477
|
+
this.selectedWidget.type === "checkbox" ||
|
|
478
|
+
(this.selectedWidget.type === "select" &&
|
|
479
|
+
this.selectedWidget.options.multiple)
|
|
480
|
+
) {
|
|
481
|
+
this.optionModel.defaultValue = [];
|
|
482
|
+
} else {
|
|
483
|
+
this.optionModel.defaultValue = undefined;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
this.emitDefaultValueChange();
|
|
487
|
+
},
|
|
488
|
+
|
|
489
|
+
importCascaderOptions() {
|
|
490
|
+
this.cascaderOptions = JSON.stringify(
|
|
491
|
+
this.optionModel.optionItems,
|
|
492
|
+
null,
|
|
493
|
+
" "
|
|
494
|
+
);
|
|
495
|
+
this.showImportCascaderDialogFlag = true;
|
|
496
|
+
},
|
|
497
|
+
|
|
498
|
+
saveCascaderOptions() {
|
|
499
|
+
try {
|
|
500
|
+
let newOptions = JSON.parse(this.cascaderOptions);
|
|
501
|
+
this.optionModel.optionItems = newOptions;
|
|
502
|
+
//TODO: 是否需要重置选项默认值??
|
|
503
|
+
|
|
504
|
+
this.showImportCascaderDialogFlag = false;
|
|
505
|
+
} catch (ex) {
|
|
506
|
+
this.$message.error(
|
|
507
|
+
this.i18nt("designer.hint.invalidOptionsData") + ex.message
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
changeValueType(val) {
|
|
512
|
+
let optionItems = this.optionModel.optionItems;
|
|
513
|
+
// this.optionModel.defaultValue = undefined;
|
|
514
|
+
this.resetDefault();
|
|
515
|
+
this.optionModel.optionItems.length = 0;
|
|
516
|
+
if (val == 2) {
|
|
517
|
+
optionItems.push({
|
|
518
|
+
label: "是",
|
|
519
|
+
value: true,
|
|
520
|
+
});
|
|
521
|
+
optionItems.push({
|
|
522
|
+
label: "否",
|
|
523
|
+
value: false,
|
|
524
|
+
});
|
|
525
|
+
} else {
|
|
526
|
+
this.addOption();
|
|
527
|
+
}
|
|
528
|
+
this.$forceUpdate();
|
|
529
|
+
this.emitDefaultValueChange();
|
|
530
|
+
},
|
|
531
|
+
|
|
532
|
+
openTableDataEdit: function () {
|
|
533
|
+
(this.dataDialogVisible = !0),
|
|
534
|
+
(this.tableDataOptions = JSON.stringify(
|
|
535
|
+
this.optionModel.defaultValue,
|
|
536
|
+
null,
|
|
537
|
+
" "
|
|
538
|
+
));
|
|
539
|
+
},
|
|
540
|
+
saveTableData: function () {
|
|
541
|
+
try {
|
|
542
|
+
(this.optionModel.defaultValue = JSON.parse(this.tableDataOptions)),
|
|
543
|
+
(this.dataDialogVisible = !1);
|
|
544
|
+
} catch (e) {
|
|
545
|
+
this.$message.error(
|
|
546
|
+
this.i18nt("designer.hint.invalidOptionsData") + e.message
|
|
547
|
+
);
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
getDefaultValue() {
|
|
551
|
+
let result = this.optionModel.defaultValue;
|
|
552
|
+
if (result) {
|
|
553
|
+
if (Array.isArray(result)) {
|
|
554
|
+
result = result.join(",");
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
return result;
|
|
558
|
+
},
|
|
559
|
+
},
|
|
560
|
+
};
|
|
561
|
+
</script>
|
|
562
|
+
|
|
563
|
+
<style lang="scss" scoped>
|
|
564
|
+
.option-items-pane ul {
|
|
565
|
+
padding-inline-start: 6px;
|
|
566
|
+
padding-left: 6px; /* 重置IE11默认样式 */
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
li.ghost {
|
|
570
|
+
background: #fff;
|
|
571
|
+
border: 2px dotted $--color-primary;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
.drag-option {
|
|
575
|
+
cursor: move;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.small-padding-dialog ::v-deep .el-dialog__body {
|
|
579
|
+
padding: 10px 15px;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.dialog-footer .el-button {
|
|
583
|
+
width: 100px;
|
|
584
|
+
}
|
|
585
|
+
</style>
|