cloud-web-corejs-haier 1.0.42 → 1.0.44
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 +9 -7
- package/src/api/user.js +54 -46
- package/src/components/baseAlert/index.vue +57 -53
- package/src/components/baseInputExport/index.vue +3 -3
- package/src/components/baseTabs/mixins.js +12 -1
- package/src/components/errorMsg/index.vue +78 -78
- package/src/components/excelExport/button.vue +54 -45
- package/src/components/excelExport/exportFieldDialog.vue +3 -3
- package/src/components/excelExport/index.js +1 -43
- package/src/components/excelExport/index.vue +62 -34
- package/src/components/excelExport/mixins.js +74 -87
- package/src/components/excelImport/index.js +1 -62
- package/src/components/excelImport/mixins.js +1 -774
- package/src/components/fileLibrary/index.vue +113 -33
- package/src/components/fileLibrary/propertiesDialog.vue +6 -0
- package/src/components/hiprint/view/design/index.vue +139 -47
- package/src/components/hiprint/view/design/preview.vue +75 -52
- package/src/components/hiprint/view/json-view.vue +31 -31
- package/src/components/luckysheet/dialog.vue +159 -0
- package/src/components/luckysheet/export.js +595 -0
- package/src/components/luckysheet/fileUtils.js +147 -0
- package/src/components/luckysheet/index.js +69 -0
- package/src/components/luckysheet/templateJson.js +12078 -0
- package/src/components/luckysheet/view.vue +210 -0
- package/src/components/onlineTalk/index.vue +328 -6
- package/src/components/onlineTalk/talkUserDialog.vue +280 -0
- package/src/components/wf/addTaskUserdialog.vue +5 -5
- package/src/components/wf/content.vue +1244 -1169
- package/src/components/wf/mixins/setCandidateDialog.js +228 -2
- package/src/components/wf/mixins/setCandidateDialog2.js +115 -100
- package/src/components/wf/mixins/wfTaskUserRangeDialog.js +67 -1
- package/src/components/wf/setCandidateDialog.vue +5 -7
- package/src/components/wf/setCandidateDialog2.vue +14 -10
- package/src/components/wf/wf.js +527 -411
- package/src/components/wf/wfTaskUserRangeDialog.vue +1 -1
- package/src/components/wf/wfUtil.js +129 -91
- package/src/components/xform/form-designer/designer.js +1994 -9
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-widget.vue +10 -0
- package/src/components/xform/form-designer/form-widget/container-widget/detail-pane-widget.vue +3 -2
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +5 -1
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin - /345/211/257/346/234/254.js" +1639 -0
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1756 -2
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +1 -0
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-item-widget.vue +10 -1
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-widget.vue +170 -0
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1630 -1
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +153 -40
- package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +65 -46
- package/src/components/xform/form-designer/form-widget/field-widget/vue-page-widget.vue +231 -0
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +7 -4
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/edit-tree-button-group-config-dialog.vue +281 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +659 -221
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +133 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +14 -6
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vue-page/vue-page-editor.vue +48 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/labelIconClass-editor.vue +18 -17
- package/src/components/xform/form-designer/setting-panel/property-editor/labelIconPosition-editor.vue +26 -26
- package/src/components/xform/form-designer/setting-panel/property-editor/labelTooltip-editor.vue +67 -13
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +2 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/showViewButton-editor.vue +29 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +8 -6
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1 -0
- package/src/components/xform/form-render/container-item/data-table-mixin.js +20 -17
- package/src/components/xform/form-render/container-item/detail-item.vue +72 -48
- package/src/components/xform/form-render/container-item/sub-form-item.vue +10 -2
- package/src/components/xform/form-render/container-item/table2-item.vue +40 -10
- package/src/components/xform/form-render/indexMixin.js +3705 -1
- package/src/components/xform/icon-picker/icons.json +284 -0
- package/src/components/xform/icon-picker/index.vue +145 -0
- package/src/components/xform/lang/zh-CN.js +2 -1
- package/src/components/xform/mixins/defaultHandle.js +366 -2
- package/src/components/xform/utils/formula-util.js +3 -0
- package/src/components/xform/utils/sfc-generator.js +2 -2
- package/src/components/xform/utils/smart-vue-i18n/index.js +2 -1
- package/src/components/xform/utils/tableColumnHelper.js +54 -10
- package/src/components/xform/utils/util.js +1547 -1
- package/src/index.js +190 -211
- package/src/lang/locale/en/login.js +26 -19
- package/src/lang/locale/zh/login.js +25 -19
- package/src/layout/components/Sidebar/default.vue +252 -71
- package/src/layout/components/Sidebar/index.vue +6 -1
- package/src/layout/components/TagsView/index.vue +6 -0
- package/src/layout/components/langTool.vue +32 -29
- package/src/layout/defaultLayout.vue +16 -8
- package/src/layout/index.vue +5 -3
- package/src/permission.js +135 -1
- package/src/router/index.js +1 -4
- package/src/store/config/index.js +667 -1
- package/src/store/getters.js +2 -1
- package/src/store/modules/permission.js +332 -1
- package/src/store/modules/settings.js +26 -1
- package/src/store/modules/tagsView.js +190 -1
- package/src/store/modules/user.js +358 -1
- package/src/utils/aes.js +15 -1
- package/src/utils/auth.js +27 -1
- package/src/utils/componentDialog.js +217 -0
- package/src/utils/request.js +368 -1
- package/src/utils/vab.js +1256 -7
- package/src/views/bd/setting/bd_company_env/dialog.vue +174 -174
- package/src/views/bd/setting/bd_company_env/edit.vue +193 -193
- package/src/views/bd/setting/formVersion/button.vue +55 -0
- package/src/views/bd/setting/formVersion/compareBasicSection.vue +125 -0
- package/src/views/bd/setting/formVersion/compareCodeSection.vue +539 -0
- package/src/views/bd/setting/formVersion/compareContMixin.scss +65 -0
- package/src/views/bd/setting/formVersion/compareContent.vue +63 -0
- package/src/views/bd/setting/formVersion/compareDialog.vue +88 -0
- package/src/views/bd/setting/formVersion/compareMixin.js +93 -0
- package/src/views/bd/setting/formVersion/fieldCompare.vue +54 -0
- package/src/views/bd/setting/formVersion/formScriptCompareView.vue +94 -0
- package/src/views/bd/setting/formVersion/formTemplateCompareView.vue +74 -0
- package/src/views/bd/setting/formVersion/ftHistoryDialog.vue +491 -0
- package/src/views/bd/setting/formVersion/link.vue +58 -0
- package/src/views/bd/setting/formVersion/preformDialog.vue +87 -0
- package/src/views/bd/setting/formVersion/reverButton.vue +82 -0
- package/src/views/bd/setting/formVersion/tableDetailDiff.js +99 -0
- package/src/views/bd/setting/formVersion/tableModelCompareView.vue +514 -0
- package/src/views/bd/setting/formVersion/textDiff.js +102 -0
- package/src/views/bd/setting/form_import_log/edit.vue +6 -3
- package/src/views/bd/setting/form_import_log/list.vue +5 -0
- package/src/views/bd/setting/form_script/edit.vue +196 -83
- package/src/views/bd/setting/form_script/edit1.vue +410 -220
- package/src/views/bd/setting/form_script/form_list.vue +19 -0
- package/src/views/bd/setting/form_script/list.vue +95 -21
- package/src/views/bd/setting/form_script/list1.vue +24 -0
- package/src/views/bd/setting/form_script/mixins/dialog.js +2 -2
- package/src/views/bd/setting/form_script/mixins/edit.js +265 -207
- package/src/views/bd/setting/form_script/mixins/edit1.js +259 -201
- package/src/views/bd/setting/form_script/mixins/form_list.js +322 -296
- package/src/views/bd/setting/form_script/mixins/list.js +163 -95
- package/src/views/bd/setting/form_script/mixins/list1.js +244 -155
- package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +1 -1
- package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +1 -1
- package/src/views/bd/setting/form_template/edit.vue +355 -205
- package/src/views/bd/setting/form_template/formDesignerDialog.vue +171 -0
- package/src/views/bd/setting/form_template/list.vue +49 -74
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +3 -3
- package/src/views/bd/setting/form_template/mixins/edit.js +51 -8
- package/src/views/bd/setting/form_template/mixins/itemList.js +1 -1
- package/src/views/bd/setting/form_template/mixins/list.js +114 -82
- package/src/views/bd/setting/form_template/mixins/list2.js +3 -3
- package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +1 -1
- package/src/views/bd/setting/form_template/mixins/wf_list.js +3 -7
- package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +254 -254
- package/src/views/bd/setting/form_template/wf_list.vue +161 -127
- package/src/views/bd/setting/request_async_setting/edit.vue +320 -320
- package/src/views/bd/setting/request_setting/edit.vue +300 -300
- package/src/views/bd/setting/request_setting/list.vue +15 -25
- package/src/views/bd/setting/table_model/edit.vue +702 -498
- package/src/views/bd/setting/table_model/list.vue +28 -0
- package/src/views/bd/setting/table_model/mixins/dialog.js +1 -1
- package/src/views/bd/setting/table_model/mixins/edit copy.js +903 -0
- package/src/views/bd/setting/table_model/mixins/edit.js +228 -121
- package/src/views/bd/setting/table_model/mixins/list.js +55 -20
- package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +1 -1
- package/src/views/bd/setting/table_model/mixins/zdDialog.js +50 -46
- package/src/views/bd/setting/utils/index.js +15 -0
- package/src/views/user/api_request/list.vue +203 -203
- package/src/views/user/bill_setting/list.vue +345 -345
- package/src/views/user/code_rules/list.vue +204 -204
- package/src/views/user/common_attribute/list.vue +378 -378
- package/src/views/user/common_script/list.vue +341 -341
- package/src/views/user/company_info/dialog.vue +80 -49
- package/src/views/user/country/list.vue +197 -197
- package/src/views/user/extend_datasource/dialog.vue +0 -3
- package/src/views/user/extend_datasource/edit.vue +1 -2
- package/src/views/user/extend_datasource/list.vue +221 -224
- package/src/views/user/fieldTranslation/editDialog.vue +1 -1
- package/src/views/user/fieldTranslation/list.vue +473 -473
- package/src/views/user/field_values_invisible/list.vue +207 -207
- package/src/views/user/file_type/list.vue +271 -271
- package/src/views/user/file_view_area/list.vue +331 -331
- package/src/views/user/form/vform/designer.vue +303 -287
- package/src/views/user/form/vform/formFieldMapping.js +2 -3
- package/src/views/user/form/view/edit.vue +19 -1
- package/src/views/user/form/view/list.vue +59 -17
- package/src/views/user/groups/list.vue +158 -158
- package/src/views/user/home/default.vue +274 -182
- package/src/views/user/home/default2.vue +1148 -0
- package/src/views/user/home/index.vue +2 -1
- package/src/views/user/lang_tag/list.vue +170 -170
- package/src/views/user/language_setting/list.vue +208 -208
- package/src/views/user/ledger_library/list.vue +12 -10
- package/src/views/user/login/default.vue +1 -1
- package/src/views/user/login/indexMixin.js +204 -169
- package/src/views/user/menu/list.vue +575 -575
- package/src/views/user/notify_message/dialog.vue +7 -1
- package/src/views/user/notify_template/list.vue +192 -192
- package/src/views/user/notify_template/list2.vue +190 -190
- package/src/views/user/position/list.vue +188 -188
- package/src/views/user/project_tag/list.vue +175 -175
- package/src/views/user/push_setting/list.vue +236 -236
- package/src/views/user/request_setting/list.vue +248 -248
- package/src/views/user/role/list.vue +182 -182
- package/src/views/user/system_notice/infoDialog.vue +61 -2
- package/src/views/user/system_notice/list.vue +203 -203
- package/src/views/user/system_parameter/list.vue +141 -141
- package/src/views/user/user/edit.vue +45 -0
- package/src/views/user/user/form_list.vue +245 -245
- package/src/views/user/user/info.vue +253 -140
- package/src/views/user/user_log_classify/list.vue +197 -197
- package/src/views/user/wf/iframe/index.vue +46 -46
- package/src/views/user/wf/wfReport/index.vue +1 -1
- package/src/views/user/wf/wf_auto_submit_data/list.vue +659 -659
- package/src/views/user/wf/wf_diy_attribute/edit.vue +1 -1
- package/src/views/user/wf/wf_manage/list.vue +795 -795
- package/src/views/user/wf/wf_manage/wfContentDialog.vue +106 -106
- package/src/views/user/wf/wf_obj_config/dialog.vue +2 -2
- package/src/views/user/wf/wf_obj_config/edit.vue +1 -1
- package/src/views/user/wf/wf_obj_config/edit_form.vue +2 -2
- package/src/views/user/wf/wf_obj_config/itemEdit.vue +1 -1
- package/src/views/user/wf/wf_obj_config/itemEdit_form.vue +1 -1
- package/src/views/user/wf/wf_obj_config/itemOperateDialog.vue +4 -4
- package/src/views/user/wf/wf_obj_config/list.vue +28 -28
- package/src/views/user/wf/wf_obj_config/list_form.vue +5 -5
- package/src/views/user/wf/wf_obj_config/wfBizDataSettingDialog.vue +292 -292
- package/src/views/user/wf/wf_param/edit.vue +1 -1
- package/src/views/user/wf/wf_transfer_setting/edit.vue +1 -1
- package/src/views/user/wf/wf_transfer_setting/list.vue +321 -319
- package/src/views/user/wf/wf_work_calendar/components/calendar.vue +369 -367
- package/src/views/user/wf/wf_work_calendar/components/calendar2.vue +401 -399
- package/src/views/user/wf/wf_work_calendar/configDialog.vue +6 -6
- package/src/views/user/wf/wf_work_calendar/date.js +84 -83
- package/src/views/user/wf/wf_work_calendar/list.vue +6 -6
- package/src/views/user/workbench_menu/list.vue +555 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<static-content-wrapper
|
|
3
|
+
:designer="designer"
|
|
4
|
+
:field="field"
|
|
5
|
+
:design-state="designState"
|
|
6
|
+
:parent-widget="parentWidget"
|
|
7
|
+
:parent-list="parentList"
|
|
8
|
+
:index-of-parent-list="indexOfParentList"
|
|
9
|
+
:sub-form-row-index="subFormRowIndex"
|
|
10
|
+
:sub-form-col-index="subFormColIndex"
|
|
11
|
+
:sub-form-row-id="subFormRowId"
|
|
12
|
+
>
|
|
13
|
+
<div
|
|
14
|
+
v-if="designState"
|
|
15
|
+
class="designer-vue-page-container"
|
|
16
|
+
:style="containerStyle"
|
|
17
|
+
>
|
|
18
|
+
<div class="designer-vue-page-title">Vue页面</div>
|
|
19
|
+
<div class="designer-vue-page-path">
|
|
20
|
+
{{ componentPath || "请配置 Vue 页面路径" }}
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div v-else class="vue-page-container" :style="containerStyle">
|
|
24
|
+
<div v-if="!componentPath" class="vue-page-placeholder">
|
|
25
|
+
{{ $t1("请配置 Vue 页面路径") }}
|
|
26
|
+
</div>
|
|
27
|
+
<div v-else-if="loadError" class="vue-page-error">{{ loadError }}</div>
|
|
28
|
+
<div v-else-if="loading" class="vue-page-loading">
|
|
29
|
+
{{ $t1("页面加载中...") }}
|
|
30
|
+
</div>
|
|
31
|
+
<component
|
|
32
|
+
v-if="showComponent && dynamicComponent"
|
|
33
|
+
:is="dynamicComponent"
|
|
34
|
+
:key="componentRenderKey"
|
|
35
|
+
v-bind="componentProps"
|
|
36
|
+
visible-key="showComponent"
|
|
37
|
+
:parent-target="_self"
|
|
38
|
+
@reload="$reloadHandle"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</static-content-wrapper>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script>
|
|
45
|
+
import StaticContentWrapper from "./static-content-wrapper";
|
|
46
|
+
import emitter from "../../../utils/emitter";
|
|
47
|
+
import i18n from "../../../utils/i18n";
|
|
48
|
+
import fieldMixin from "./fieldMixin";
|
|
49
|
+
import { loadView } from "@base/store/modules/permission";
|
|
50
|
+
|
|
51
|
+
export default {
|
|
52
|
+
name: "vue-page-widget",
|
|
53
|
+
componentName: "FieldWidget",
|
|
54
|
+
mixins: [emitter, fieldMixin, i18n],
|
|
55
|
+
props: {
|
|
56
|
+
field: Object,
|
|
57
|
+
parentWidget: Object,
|
|
58
|
+
parentList: Array,
|
|
59
|
+
indexOfParentList: Number,
|
|
60
|
+
designer: Object,
|
|
61
|
+
designState: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: false,
|
|
64
|
+
},
|
|
65
|
+
subFormRowIndex: {
|
|
66
|
+
type: Number,
|
|
67
|
+
default: -1,
|
|
68
|
+
},
|
|
69
|
+
subFormColIndex: {
|
|
70
|
+
type: Number,
|
|
71
|
+
default: -1,
|
|
72
|
+
},
|
|
73
|
+
subFormRowId: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: "",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
components: {
|
|
79
|
+
StaticContentWrapper,
|
|
80
|
+
},
|
|
81
|
+
data() {
|
|
82
|
+
return {
|
|
83
|
+
showComponent: false,
|
|
84
|
+
dynamicComponent: null,
|
|
85
|
+
componentProps: {},
|
|
86
|
+
componentRenderKey: 0,
|
|
87
|
+
loading: false,
|
|
88
|
+
loadError: null,
|
|
89
|
+
};
|
|
90
|
+
},
|
|
91
|
+
computed: {
|
|
92
|
+
componentPath() {
|
|
93
|
+
return (this.field.options.componentPath || "").trim();
|
|
94
|
+
},
|
|
95
|
+
containerStyle() {
|
|
96
|
+
const height = (this.field.options.componentHeight || "").trim();
|
|
97
|
+
if (!height) {
|
|
98
|
+
return {};
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
height,
|
|
102
|
+
minHeight: height,
|
|
103
|
+
overflow: "auto",
|
|
104
|
+
};
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
created() {
|
|
108
|
+
this.registerToRefList();
|
|
109
|
+
this.initEventHandler();
|
|
110
|
+
this.handleOnCreated();
|
|
111
|
+
},
|
|
112
|
+
mounted() {
|
|
113
|
+
this.handleOnMounted();
|
|
114
|
+
},
|
|
115
|
+
beforeDestroy() {
|
|
116
|
+
this.unregisterFromRefList();
|
|
117
|
+
},
|
|
118
|
+
methods: {
|
|
119
|
+
normalizeComponentPath(path) {
|
|
120
|
+
return path.replace(/\.vue$/i, "");
|
|
121
|
+
},
|
|
122
|
+
resetComponentState() {
|
|
123
|
+
this.showComponent = false;
|
|
124
|
+
this.dynamicComponent = null;
|
|
125
|
+
this.componentProps = {};
|
|
126
|
+
this.loading = false;
|
|
127
|
+
this.loadError = null;
|
|
128
|
+
},
|
|
129
|
+
loadPage() {
|
|
130
|
+
if (this.designState) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const path = this.normalizeComponentPath(this.componentPath);
|
|
135
|
+
if (!path) {
|
|
136
|
+
this.resetComponentState();
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (this.dynamicComponent) {
|
|
141
|
+
this.updateComponentProps();
|
|
142
|
+
this.showComponent = true;
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
this.showComponent = false;
|
|
147
|
+
this.loadError = null;
|
|
148
|
+
this.loading = true;
|
|
149
|
+
|
|
150
|
+
try {
|
|
151
|
+
const loader = loadView(path);
|
|
152
|
+
loader((component) => {
|
|
153
|
+
if (path !== this.normalizeComponentPath(this.componentPath)) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
this.loading = false;
|
|
157
|
+
if (!component) {
|
|
158
|
+
this.loadError = this.$t1("页面组件未找到");
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
this.dynamicComponent = component.default || component;
|
|
162
|
+
this.componentRenderKey += 1;
|
|
163
|
+
this.updateComponentProps();
|
|
164
|
+
this.showComponent = true;
|
|
165
|
+
});
|
|
166
|
+
} catch (error) {
|
|
167
|
+
this.loading = false;
|
|
168
|
+
this.loadError = error.message || this.$t1("页面加载失败");
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
reloadPage() {
|
|
172
|
+
if (!this.dynamicComponent) {
|
|
173
|
+
this.loadPage();
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
this.$openEditView("showComponent");
|
|
177
|
+
},
|
|
178
|
+
updateComponentProps() {
|
|
179
|
+
if (this.designState || !this.dynamicComponent) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
let props = this.handleCustomEvent(this.field.options.componentConfig);
|
|
184
|
+
this.componentProps = props && typeof props === "object" ? props : {};
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
</script>
|
|
189
|
+
|
|
190
|
+
<style lang="scss" scoped>
|
|
191
|
+
@import "~@/styles/global.scss";
|
|
192
|
+
|
|
193
|
+
.designer-vue-page-container {
|
|
194
|
+
outline: 1px dashed #336699;
|
|
195
|
+
padding: 12px;
|
|
196
|
+
margin: 5px;
|
|
197
|
+
min-height: 120px;
|
|
198
|
+
background: #f8fbff;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.designer-vue-page-title {
|
|
202
|
+
font-size: 14px;
|
|
203
|
+
font-weight: 600;
|
|
204
|
+
color: #336699;
|
|
205
|
+
margin-bottom: 8px;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.designer-vue-page-path {
|
|
209
|
+
font-size: 12px;
|
|
210
|
+
color: #666;
|
|
211
|
+
word-break: break-all;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.vue-page-container {
|
|
215
|
+
width: 100%;
|
|
216
|
+
min-height: 120px;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.vue-page-placeholder,
|
|
220
|
+
.vue-page-loading,
|
|
221
|
+
.vue-page-error {
|
|
222
|
+
padding: 16px;
|
|
223
|
+
font-size: 13px;
|
|
224
|
+
color: #909399;
|
|
225
|
+
text-align: center;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.vue-page-error {
|
|
229
|
+
color: #f56c6c;
|
|
230
|
+
}
|
|
231
|
+
</style>
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
v-model="formConfig.addFormCode"
|
|
107
107
|
@clear="
|
|
108
108
|
formConfig.addFormCode = null;
|
|
109
|
-
formConfig.addFormName = null
|
|
109
|
+
formConfig.addFormName = null;
|
|
110
110
|
$forceUpdate();
|
|
111
111
|
"
|
|
112
112
|
v-el-readonly
|
|
@@ -227,6 +227,9 @@
|
|
|
227
227
|
<el-form-item :label="i18nt('启用其他标签页')">
|
|
228
228
|
<el-switch v-model="formConfig.otherTabEnabled"></el-switch>
|
|
229
229
|
</el-form-item>
|
|
230
|
+
<el-form-item :label="i18nt('隐藏常规标签')">
|
|
231
|
+
<el-switch v-model="formConfig.hideNormalTab"></el-switch>
|
|
232
|
+
</el-form-item>
|
|
230
233
|
<el-form-item :label="i18nt('其他标签页配置')"> </el-form-item>
|
|
231
234
|
<el-form-item label-width="0">
|
|
232
235
|
<div>
|
|
@@ -998,7 +1001,7 @@ $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_pr
|
|
|
998
1001
|
created() {
|
|
999
1002
|
//导入表单JSON后需要重新加载自定义CSS样式!!!
|
|
1000
1003
|
this.designer.handleEvent("form-json-imported", () => {
|
|
1001
|
-
this.formCssCode = this.formConfig.cssCode;
|
|
1004
|
+
this.formCssCode = this.formConfig.cssCode || "";
|
|
1002
1005
|
insertCustomCssToHead(this.formCssCcssCodeode);
|
|
1003
1006
|
this.extractCssClass();
|
|
1004
1007
|
this.designer.emitEvent("form-css-updated", deepClone(this.cssClassList));
|
|
@@ -1008,7 +1011,7 @@ $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_pr
|
|
|
1008
1011
|
/* SettingPanel和FormWidget为兄弟组件, 在FormWidget加载formConfig时,
|
|
1009
1012
|
此处SettingPanel可能无法获取到formConfig.cssCode, 故加个延时函数! */
|
|
1010
1013
|
setTimeout(() => {
|
|
1011
|
-
this.formCssCode = this.formConfig.cssCode;
|
|
1014
|
+
this.formCssCode = this.formConfig.cssCode || "";
|
|
1012
1015
|
insertCustomCssToHead(this.formCssCode);
|
|
1013
1016
|
this.extractCssClass();
|
|
1014
1017
|
this.designer.emitEvent("form-css-updated", deepClone(this.cssClassList));
|
|
@@ -1031,7 +1034,7 @@ $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_pr
|
|
|
1031
1034
|
|
|
1032
1035
|
extractCssClass() {
|
|
1033
1036
|
let regExp = /\..*{/g;
|
|
1034
|
-
let result = this.formCssCode.match(regExp);
|
|
1037
|
+
let result = this.formCssCode ? this.formCssCode.match(regExp) : [];
|
|
1035
1038
|
let cssNameArray = [];
|
|
1036
1039
|
|
|
1037
1040
|
if (!!result && result.length > 0) {
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
title="编辑行按钮组配置"
|
|
4
|
+
:visible.sync="dialogVisible"
|
|
5
|
+
custom-class="dialog-style list-dialog"
|
|
6
|
+
:show-close="true"
|
|
7
|
+
append-to-body
|
|
8
|
+
:close-on-click-modal="false"
|
|
9
|
+
:close-on-press-escape="false"
|
|
10
|
+
:destroy-on-close="true"
|
|
11
|
+
width="520px"
|
|
12
|
+
v-dialog-drag
|
|
13
|
+
@close="handleClose"
|
|
14
|
+
>
|
|
15
|
+
<div class="cont">
|
|
16
|
+
<el-form label-width="166px" class="edit-tree-button-group-form">
|
|
17
|
+
<el-form-item label="新增按钮唯一名称">
|
|
18
|
+
<el-input
|
|
19
|
+
v-model="row.rowAddAuthName"
|
|
20
|
+
class="all-width"
|
|
21
|
+
placeholder="留空则不校验权限"
|
|
22
|
+
clearable
|
|
23
|
+
>
|
|
24
|
+
<el-tooltip
|
|
25
|
+
slot="suffix"
|
|
26
|
+
:enterable="false"
|
|
27
|
+
effect="dark"
|
|
28
|
+
content="随机生成"
|
|
29
|
+
placement="top"
|
|
30
|
+
>
|
|
31
|
+
<i
|
|
32
|
+
class="el-input__icon el-icon-refresh-right"
|
|
33
|
+
@click="createRandomRowAddAuthName"
|
|
34
|
+
></i>
|
|
35
|
+
</el-tooltip>
|
|
36
|
+
</el-input>
|
|
37
|
+
</el-form-item>
|
|
38
|
+
<el-form-item label="新增按钮编码" v-if="rowAddAuthCode">
|
|
39
|
+
<div class="auth-code-text">
|
|
40
|
+
<el-tooltip effect="light" content="复制">
|
|
41
|
+
<a
|
|
42
|
+
class="a-link"
|
|
43
|
+
style="color: unset"
|
|
44
|
+
@click="copyAuthCode(rowAddAuthCode, $event)"
|
|
45
|
+
>
|
|
46
|
+
<span
|
|
47
|
+
><i
|
|
48
|
+
class="el-icon-copy-document"
|
|
49
|
+
style="margin-right: 2px"
|
|
50
|
+
></i
|
|
51
|
+
>{{ rowAddAuthCode }}</span
|
|
52
|
+
>
|
|
53
|
+
</a>
|
|
54
|
+
</el-tooltip>
|
|
55
|
+
</div>
|
|
56
|
+
</el-form-item>
|
|
57
|
+
<el-form-item label="编辑按钮唯一名称">
|
|
58
|
+
<el-input
|
|
59
|
+
v-model="row.rowEditAuthName"
|
|
60
|
+
class="all-width"
|
|
61
|
+
placeholder="留空则不校验权限"
|
|
62
|
+
clearable
|
|
63
|
+
>
|
|
64
|
+
<el-tooltip
|
|
65
|
+
slot="suffix"
|
|
66
|
+
:enterable="false"
|
|
67
|
+
effect="dark"
|
|
68
|
+
content="随机生成"
|
|
69
|
+
placement="top"
|
|
70
|
+
>
|
|
71
|
+
<i
|
|
72
|
+
class="el-input__icon el-icon-refresh-right"
|
|
73
|
+
@click="createRandomRowEditAuthName"
|
|
74
|
+
></i>
|
|
75
|
+
</el-tooltip>
|
|
76
|
+
</el-input>
|
|
77
|
+
</el-form-item>
|
|
78
|
+
<el-form-item label="编辑按钮编码" v-if="rowEditAuthCode">
|
|
79
|
+
<div class="auth-code-text">
|
|
80
|
+
<el-tooltip effect="light" content="复制">
|
|
81
|
+
<a
|
|
82
|
+
class="a-link"
|
|
83
|
+
style="color: unset"
|
|
84
|
+
@click="copyAuthCode(rowEditAuthCode, $event)"
|
|
85
|
+
>
|
|
86
|
+
<span
|
|
87
|
+
><i
|
|
88
|
+
class="el-icon-copy-document"
|
|
89
|
+
style="margin-right: 2px"
|
|
90
|
+
></i
|
|
91
|
+
>{{ rowEditAuthCode }}</span
|
|
92
|
+
>
|
|
93
|
+
</a>
|
|
94
|
+
</el-tooltip>
|
|
95
|
+
</div>
|
|
96
|
+
</el-form-item>
|
|
97
|
+
<el-form-item label="新增按钮显隐条件定义">
|
|
98
|
+
<a
|
|
99
|
+
href="javascript:void(0);"
|
|
100
|
+
class="a-link link-oneLind"
|
|
101
|
+
@click="editRowShowScript('rowAddShow')"
|
|
102
|
+
>
|
|
103
|
+
<span>{{ row.rowAddShow }}</span>
|
|
104
|
+
<i class="el-icon-edit"></i>
|
|
105
|
+
</a>
|
|
106
|
+
</el-form-item>
|
|
107
|
+
<el-form-item label="编辑按钮显隐条件定义">
|
|
108
|
+
<a
|
|
109
|
+
href="javascript:void(0);"
|
|
110
|
+
class="a-link link-oneLind"
|
|
111
|
+
@click="editRowShowScript('rowEditShow')"
|
|
112
|
+
>
|
|
113
|
+
<span>{{ row.rowEditShow }}</span>
|
|
114
|
+
<i class="el-icon-edit"></i>
|
|
115
|
+
</a>
|
|
116
|
+
</el-form-item>
|
|
117
|
+
</el-form>
|
|
118
|
+
</div>
|
|
119
|
+
<div slot="footer" class="dialog-footer">
|
|
120
|
+
<el-button class="button-sty" icon="el-icon-close" @click="handleClose">
|
|
121
|
+
{{ i18nt("designer.hint.cancel") }}
|
|
122
|
+
</el-button>
|
|
123
|
+
<el-button
|
|
124
|
+
type="primary"
|
|
125
|
+
class="button-sty"
|
|
126
|
+
icon="el-icon-check"
|
|
127
|
+
@click="handleConfirm"
|
|
128
|
+
>
|
|
129
|
+
{{ i18nt("designer.hint.confirm") }}
|
|
130
|
+
</el-button>
|
|
131
|
+
</div>
|
|
132
|
+
</el-dialog>
|
|
133
|
+
</template>
|
|
134
|
+
|
|
135
|
+
<script>
|
|
136
|
+
import i18n from "../../../../../../components/xform/utils/i18n";
|
|
137
|
+
import eventMixin from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
|
|
138
|
+
import { generateId } from "../../../../../../components/xform/utils/util";
|
|
139
|
+
import Clipboard from "clipboard";
|
|
140
|
+
|
|
141
|
+
export default {
|
|
142
|
+
name: "edit-tree-button-group-config-dialog",
|
|
143
|
+
mixins: [i18n, eventMixin],
|
|
144
|
+
props: {
|
|
145
|
+
visible: {
|
|
146
|
+
type: Boolean,
|
|
147
|
+
default: false,
|
|
148
|
+
},
|
|
149
|
+
row: {
|
|
150
|
+
type: Object,
|
|
151
|
+
required: true,
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
inject: ["getReportTemplate"],
|
|
155
|
+
data() {
|
|
156
|
+
return {
|
|
157
|
+
rowShowParams: ["dataId", "formCode", "tableParam"],
|
|
158
|
+
};
|
|
159
|
+
},
|
|
160
|
+
computed: {
|
|
161
|
+
dialogVisible: {
|
|
162
|
+
get() {
|
|
163
|
+
return this.visible;
|
|
164
|
+
},
|
|
165
|
+
set(val) {
|
|
166
|
+
this.$emit("update:visible", val);
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
reportTemplate() {
|
|
170
|
+
return this.getReportTemplate();
|
|
171
|
+
},
|
|
172
|
+
rowAddAuthName() {
|
|
173
|
+
return this.getRowAddAuthName();
|
|
174
|
+
},
|
|
175
|
+
rowEditAuthName() {
|
|
176
|
+
return this.getRowEditAuthName();
|
|
177
|
+
},
|
|
178
|
+
rowAddAuthCode() {
|
|
179
|
+
return this.getRowAuthCode(this.rowAddAuthName);
|
|
180
|
+
},
|
|
181
|
+
rowEditAuthCode() {
|
|
182
|
+
return this.getRowAuthCode(this.rowEditAuthName);
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
watch: {
|
|
186
|
+
visible(val) {
|
|
187
|
+
if (val) {
|
|
188
|
+
this.ensureRowAuthNames();
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
methods: {
|
|
193
|
+
getRowAddAuthName() {
|
|
194
|
+
return this.row.rowAddAuthName ?? this.row.treeRowAddName;
|
|
195
|
+
},
|
|
196
|
+
getRowEditAuthName() {
|
|
197
|
+
return this.row.rowEditAuthName ?? this.row.treeRowEditName;
|
|
198
|
+
},
|
|
199
|
+
getRowAuthCode(authName) {
|
|
200
|
+
if (!authName || !this.reportTemplate?.formCode) {
|
|
201
|
+
return "";
|
|
202
|
+
}
|
|
203
|
+
return this.reportTemplate.formCode + ":" + authName;
|
|
204
|
+
},
|
|
205
|
+
createRowAuthName(type) {
|
|
206
|
+
return `row${type}` + generateId();
|
|
207
|
+
},
|
|
208
|
+
ensureRowAuthNames() {
|
|
209
|
+
if (!this.getRowAddAuthName()) {
|
|
210
|
+
this.$set(this.row, "rowAddAuthName", this.createRowAuthName("Add"));
|
|
211
|
+
}
|
|
212
|
+
if (!this.getRowEditAuthName()) {
|
|
213
|
+
this.$set(this.row, "rowEditAuthName", this.createRowAuthName("Edit"));
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
createRandomRowAddAuthName() {
|
|
217
|
+
this.$set(this.row, "rowAddAuthName", this.createRowAuthName("Add"));
|
|
218
|
+
this.$message.success("生成成功");
|
|
219
|
+
},
|
|
220
|
+
createRandomRowEditAuthName() {
|
|
221
|
+
this.$set(this.row, "rowEditAuthName", this.createRowAuthName("Edit"));
|
|
222
|
+
this.$message.success("生成成功");
|
|
223
|
+
},
|
|
224
|
+
editRowShowScript(eventName) {
|
|
225
|
+
this.editEventHandler(eventName, this.rowShowParams, {
|
|
226
|
+
customCode: () => this.row[eventName] || "",
|
|
227
|
+
callback: (code) => {
|
|
228
|
+
this.$set(this.row, eventName, code);
|
|
229
|
+
},
|
|
230
|
+
});
|
|
231
|
+
},
|
|
232
|
+
copyAuthCode(content, clickEvent) {
|
|
233
|
+
const clipboard = new Clipboard(clickEvent.target, {
|
|
234
|
+
text: () => content,
|
|
235
|
+
});
|
|
236
|
+
clipboard.on("success", () => {
|
|
237
|
+
this.$message.success("复制成功");
|
|
238
|
+
clipboard.destroy();
|
|
239
|
+
});
|
|
240
|
+
clipboard.on("error", () => {
|
|
241
|
+
this.$message.error("复制失败");
|
|
242
|
+
clipboard.destroy();
|
|
243
|
+
});
|
|
244
|
+
clipboard.onClick(clickEvent);
|
|
245
|
+
},
|
|
246
|
+
handleClose() {
|
|
247
|
+
this.dialogVisible = false;
|
|
248
|
+
},
|
|
249
|
+
handleConfirm() {
|
|
250
|
+
this.$emit("confirm", this.getRowConfigSnapshot());
|
|
251
|
+
this.dialogVisible = false;
|
|
252
|
+
},
|
|
253
|
+
getRowConfigSnapshot() {
|
|
254
|
+
return {
|
|
255
|
+
rowAddAuthName: this.row.rowAddAuthName,
|
|
256
|
+
rowEditAuthName: this.row.rowEditAuthName,
|
|
257
|
+
rowAddShow: this.row.rowAddShow,
|
|
258
|
+
rowEditShow: this.row.rowEditShow,
|
|
259
|
+
};
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
</script>
|
|
264
|
+
|
|
265
|
+
<style scoped lang="scss">
|
|
266
|
+
.edit-tree-button-group-form {
|
|
267
|
+
::v-deep .el-form-item {
|
|
268
|
+
margin-bottom: 12px;
|
|
269
|
+
}
|
|
270
|
+
::v-deep .el-form-item__label {
|
|
271
|
+
line-height: 28px;
|
|
272
|
+
}
|
|
273
|
+
::v-deep .el-form-item__content {
|
|
274
|
+
line-height: 28px;
|
|
275
|
+
}
|
|
276
|
+
.auth-code-text {
|
|
277
|
+
word-break: break-all;
|
|
278
|
+
line-height: 1.5;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
</style>
|