cloud-web-corejs-haier 1.0.43 → 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 +8 -6
- 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
|
@@ -3,28 +3,46 @@
|
|
|
3
3
|
:visible="visible"
|
|
4
4
|
:maskClosable="false"
|
|
5
5
|
@cancel="hideModal"
|
|
6
|
-
:width="width+'mm'"
|
|
6
|
+
:width="width + 'mm'"
|
|
7
7
|
:append-to-body="true"
|
|
8
8
|
:modal-append-to-body="true"
|
|
9
9
|
custom-class="dialog-style dialog-printPreview"
|
|
10
10
|
top="20px"
|
|
11
11
|
v-el-dialog-center
|
|
12
12
|
v-el-drag-dialog
|
|
13
|
-
@close="hideModal"
|
|
13
|
+
@close="hideModal"
|
|
14
|
+
>
|
|
14
15
|
<div style="min-height: 100px" v-loading="spinning">
|
|
15
16
|
<div id="preview_content_design" ref="preview_content_design"></div>
|
|
16
17
|
</div>
|
|
17
18
|
<template slot="title">
|
|
18
19
|
<div>
|
|
19
20
|
<div class="name">打印预览</div>
|
|
20
|
-
<el-button
|
|
21
|
-
|
|
21
|
+
<el-button
|
|
22
|
+
:loading="waitShowPrinter"
|
|
23
|
+
type="primary"
|
|
24
|
+
class="button-sty"
|
|
25
|
+
icon="el-icon-printer"
|
|
26
|
+
@click.stop="print"
|
|
27
|
+
>打印
|
|
22
28
|
</el-button>
|
|
23
|
-
<el-button
|
|
29
|
+
<el-button
|
|
30
|
+
type="primary"
|
|
31
|
+
class="button-sty"
|
|
32
|
+
icon="el-icon-printer"
|
|
33
|
+
@click.stop="toPdf"
|
|
34
|
+
>pdf</el-button
|
|
35
|
+
>
|
|
24
36
|
</div>
|
|
25
37
|
</template>
|
|
26
38
|
<template slot="footer">
|
|
27
|
-
<el-button
|
|
39
|
+
<el-button
|
|
40
|
+
key="close"
|
|
41
|
+
type="info"
|
|
42
|
+
@click="hideModal"
|
|
43
|
+
class="button-sty"
|
|
44
|
+
icon="el-icon-close"
|
|
45
|
+
>
|
|
28
46
|
关闭
|
|
29
47
|
</el-button>
|
|
30
48
|
</template>
|
|
@@ -32,7 +50,7 @@
|
|
|
32
50
|
</template>
|
|
33
51
|
|
|
34
52
|
<script>
|
|
35
|
-
import {hiprint} from "../../../../components/hiprint";
|
|
53
|
+
import { hiprint } from "../../../../components/hiprint";
|
|
36
54
|
|
|
37
55
|
export default {
|
|
38
56
|
name: "printPreview",
|
|
@@ -47,84 +65,89 @@ export default {
|
|
|
47
65
|
// 模板
|
|
48
66
|
hiprintTemplate: {},
|
|
49
67
|
// 数据
|
|
50
|
-
printData: {}
|
|
51
|
-
}
|
|
68
|
+
printData: {},
|
|
69
|
+
};
|
|
52
70
|
},
|
|
53
71
|
computed: {},
|
|
54
72
|
watch: {},
|
|
55
|
-
created() {
|
|
56
|
-
},
|
|
57
|
-
mounted() {
|
|
58
|
-
},
|
|
73
|
+
created() {},
|
|
74
|
+
mounted() {},
|
|
59
75
|
methods: {
|
|
60
76
|
hideModal() {
|
|
61
|
-
this.visible = false
|
|
77
|
+
this.visible = false;
|
|
62
78
|
},
|
|
63
|
-
show(hiprintTemplate, printData, width =
|
|
64
|
-
this.visible = true
|
|
65
|
-
this.spinning = true
|
|
66
|
-
this.width = hiprintTemplate.editingPanel
|
|
67
|
-
|
|
68
|
-
|
|
79
|
+
show(hiprintTemplate, printData, width = "210") {
|
|
80
|
+
this.visible = true;
|
|
81
|
+
this.spinning = true;
|
|
82
|
+
this.width = hiprintTemplate.editingPanel
|
|
83
|
+
? hiprintTemplate.editingPanel.width
|
|
84
|
+
: width;
|
|
85
|
+
this.hiprintTemplate = hiprintTemplate;
|
|
86
|
+
this.printData = printData;
|
|
69
87
|
setTimeout(() => {
|
|
70
88
|
// eslint-disable-next-line no-undef
|
|
71
89
|
// $('#preview_content_design').html(hiprintTemplate.getHtml(printData))
|
|
72
|
-
$(this.$refs.preview_content_design).html(hiprintTemplate.getHtml(printData))
|
|
73
|
-
this.spinning = false
|
|
74
|
-
}, 500)
|
|
90
|
+
$(this.$refs.preview_content_design).html(hiprintTemplate.getHtml(printData));
|
|
91
|
+
this.spinning = false;
|
|
92
|
+
}, 500);
|
|
75
93
|
},
|
|
76
94
|
print() {
|
|
77
|
-
this.waitShowPrinter = true
|
|
78
|
-
this.hiprintTemplate.print(
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
95
|
+
this.waitShowPrinter = true;
|
|
96
|
+
this.hiprintTemplate.print(
|
|
97
|
+
this.printData,
|
|
98
|
+
{},
|
|
99
|
+
{
|
|
100
|
+
callback: () => {
|
|
101
|
+
console.log("callback");
|
|
102
|
+
this.waitShowPrinter = false;
|
|
103
|
+
},
|
|
82
104
|
}
|
|
83
|
-
|
|
105
|
+
);
|
|
84
106
|
},
|
|
85
107
|
toPdf() {
|
|
86
|
-
this.hiprintTemplate.toPdf({},
|
|
108
|
+
this.hiprintTemplate.toPdf({}, "打印预览");
|
|
87
109
|
},
|
|
88
|
-
open(printJson, printData, width =
|
|
110
|
+
open(printJson, printData, width = "210") {
|
|
89
111
|
let hiprintTemplate = new hiprint.PrintTemplate({
|
|
90
112
|
template: printJson,
|
|
91
113
|
// 自定义可选字体
|
|
92
114
|
// 或者使用 hiprintTemplate.setFontList([])
|
|
93
115
|
// 或元素中 options.fontList: []
|
|
94
116
|
fontList: [
|
|
95
|
-
{title:
|
|
96
|
-
{title:
|
|
97
|
-
{title:
|
|
98
|
-
{title:
|
|
99
|
-
{title:
|
|
100
|
-
{title:
|
|
101
|
-
{title:
|
|
117
|
+
{ title: "微软雅黑", value: "Microsoft YaHei" },
|
|
118
|
+
{ title: "黑体", value: "STHeitiSC-Light" },
|
|
119
|
+
{ title: "思源黑体", value: "SourceHanSansCN-Normal" },
|
|
120
|
+
{ title: "王羲之书法体", value: "王羲之书法体" },
|
|
121
|
+
{ title: "宋体", value: "SimSun" },
|
|
122
|
+
{ title: "华为楷体", value: "STKaiti" },
|
|
123
|
+
{ title: "cursive", value: "cursive" },
|
|
102
124
|
],
|
|
103
125
|
dataMode: 1, // 1:getJson 其他:getJsonTid 默认1
|
|
104
126
|
history: true, // 是否需要 撤销重做功能
|
|
105
127
|
});
|
|
106
|
-
this.visible = true
|
|
107
|
-
this.spinning = true
|
|
108
|
-
this.width = hiprintTemplate.editingPanel
|
|
109
|
-
|
|
110
|
-
|
|
128
|
+
this.visible = true;
|
|
129
|
+
this.spinning = true;
|
|
130
|
+
this.width = hiprintTemplate.editingPanel
|
|
131
|
+
? hiprintTemplate.editingPanel.width
|
|
132
|
+
: width;
|
|
133
|
+
this.hiprintTemplate = hiprintTemplate;
|
|
134
|
+
this.printData = printData;
|
|
111
135
|
setTimeout(() => {
|
|
112
136
|
// eslint-disable-next-line no-undef
|
|
113
137
|
// $('#preview_content_design').html(hiprintTemplate.getHtml(printData))
|
|
114
|
-
$(this.$refs.preview_content_design).html(hiprintTemplate.getHtml(printData))
|
|
115
|
-
this.spinning = false
|
|
116
|
-
}, 500)
|
|
138
|
+
$(this.$refs.preview_content_design).html(hiprintTemplate.getHtml(printData));
|
|
139
|
+
this.spinning = false;
|
|
140
|
+
}, 500);
|
|
117
141
|
},
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
142
|
+
},
|
|
143
|
+
};
|
|
121
144
|
</script>
|
|
122
|
-
<style lang="
|
|
123
|
-
|
|
145
|
+
<style lang="scss" scoped>
|
|
146
|
+
::v-deep .ant-modal-body {
|
|
124
147
|
padding: 0px;
|
|
125
148
|
}
|
|
126
149
|
|
|
127
|
-
|
|
150
|
+
::v-deep .ant-modal-content {
|
|
128
151
|
margin-bottom: 24px;
|
|
129
152
|
}
|
|
130
153
|
</style>
|
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span>
|
|
3
|
-
<el-button type="primary" class="button-sty" @click="show">
|
|
4
|
-
|
|
5
|
-
</el-button>
|
|
6
|
-
<el-dialog :visible="visible" :maskClosable="false"
|
|
7
|
-
@cancel="hideModal">
|
|
3
|
+
<el-button type="primary" class="button-sty" @click="show"> 查看模板json </el-button>
|
|
4
|
+
<el-dialog :visible="visible" :maskClosable="false" @cancel="hideModal">
|
|
8
5
|
<!-- <el-spin :spinning="spinning" style="min-height: 100px"> -->
|
|
9
|
-
|
|
6
|
+
<el-input type="textarea" :rows="2" style="width: 40vw" v-model:value="jsonOut" />
|
|
10
7
|
<!-- </el-spin> -->
|
|
11
8
|
<template slot="title">
|
|
12
9
|
<div>
|
|
13
10
|
<div style="margin-right: 20px">JSON</div>
|
|
14
|
-
<el-switch
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
<el-switch
|
|
12
|
+
active-text="tid模式"
|
|
13
|
+
inactive-text="默认"
|
|
14
|
+
v-model:checked="tidMode"
|
|
15
|
+
@change="onModeChange"
|
|
16
|
+
/>
|
|
17
|
+
<el-switch
|
|
18
|
+
active-text="美化"
|
|
19
|
+
inactive-text="压缩"
|
|
20
|
+
v-model:checked="beautify"
|
|
21
|
+
@change="onModeChange"
|
|
22
|
+
/>
|
|
18
23
|
</div>
|
|
19
24
|
</template>
|
|
20
25
|
<template slot="footer">
|
|
21
|
-
<el-button key="close" type="info" @click="hideModal">
|
|
22
|
-
关闭
|
|
23
|
-
</el-button>
|
|
26
|
+
<el-button key="close" type="info" @click="hideModal"> 关闭 </el-button>
|
|
24
27
|
</template>
|
|
25
28
|
</el-dialog>
|
|
26
29
|
</span>
|
|
@@ -32,7 +35,7 @@ export default {
|
|
|
32
35
|
props: {
|
|
33
36
|
template: {
|
|
34
37
|
type: Object,
|
|
35
|
-
}
|
|
38
|
+
},
|
|
36
39
|
},
|
|
37
40
|
data() {
|
|
38
41
|
return {
|
|
@@ -41,41 +44,38 @@ export default {
|
|
|
41
44
|
jsonOut: "",
|
|
42
45
|
tidMode: false,
|
|
43
46
|
beautify: false,
|
|
44
|
-
}
|
|
47
|
+
};
|
|
45
48
|
},
|
|
46
49
|
computed: {},
|
|
47
50
|
watch: {},
|
|
48
|
-
created() {
|
|
49
|
-
},
|
|
50
|
-
mounted() {
|
|
51
|
-
},
|
|
51
|
+
created() {},
|
|
52
|
+
mounted() {},
|
|
52
53
|
methods: {
|
|
53
54
|
hideModal() {
|
|
54
|
-
this.visible = false
|
|
55
|
+
this.visible = false;
|
|
55
56
|
},
|
|
56
57
|
show() {
|
|
57
|
-
this.visible = true
|
|
58
|
-
this.spinning = true
|
|
58
|
+
this.visible = true;
|
|
59
|
+
this.spinning = true;
|
|
59
60
|
setTimeout(() => {
|
|
60
61
|
let json = this.tidMode ? this.template.getJsonTid() : this.template.getJson();
|
|
61
62
|
let beautify = this.beautify ? 2 : 0;
|
|
62
63
|
this.jsonOut = JSON.stringify(json, null, beautify);
|
|
63
|
-
this.spinning = false
|
|
64
|
-
}, 500)
|
|
64
|
+
this.spinning = false;
|
|
65
|
+
}, 500);
|
|
65
66
|
},
|
|
66
67
|
onModeChange() {
|
|
67
68
|
this.show();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
72
|
</script>
|
|
73
|
-
<style lang="
|
|
74
|
-
|
|
73
|
+
<style lang="scss" scoped>
|
|
74
|
+
::v-deep .ant-modal-body {
|
|
75
75
|
padding: 0px;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
::v-deep .ant-modal-content {
|
|
79
79
|
margin-bottom: 24px;
|
|
80
80
|
}
|
|
81
81
|
</style>
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
:visible.sync="showDialog"
|
|
4
|
+
:fullscreen="true"
|
|
5
|
+
@close="close"
|
|
6
|
+
:appendToBody="true"
|
|
7
|
+
:modalAppendToBody="true"
|
|
8
|
+
:closeOnClickModal="false"
|
|
9
|
+
:modal="false"
|
|
10
|
+
:title="options.title || 'excel'"
|
|
11
|
+
custom-class="dialog-style list-dialog dialog-checkbox pd_0"
|
|
12
|
+
>
|
|
13
|
+
<div class="cont" id="containt" :class="{ nfootBtn: options.readonly }">
|
|
14
|
+
<luckysheet
|
|
15
|
+
ref="luckysheet"
|
|
16
|
+
:data="json"
|
|
17
|
+
v-if="showLuckysheet"
|
|
18
|
+
:options="options"
|
|
19
|
+
></luckysheet>
|
|
20
|
+
</div>
|
|
21
|
+
<span slot="footer" class="dialog-footer" v-if="!options.readonly">
|
|
22
|
+
<el-button type="primary" plain class="button-sty" @click="close">
|
|
23
|
+
<i class="el-icon-close el-icon"></i>
|
|
24
|
+
{{ $t2("取 消", "system.button.cancel2") }}
|
|
25
|
+
</el-button>
|
|
26
|
+
<el-button type="primary" @click="dialogSubmit" class="button-sty">
|
|
27
|
+
<i class="el-icon-check el-icon"></i>
|
|
28
|
+
{{ $t2("确 定", "system.button.confirm2") }}
|
|
29
|
+
</el-button>
|
|
30
|
+
</span>
|
|
31
|
+
</el-dialog>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
import luckysheet from "./view.vue";
|
|
36
|
+
import { fileToBase64, base64ToFile } from "./fileUtils.js";
|
|
37
|
+
import { saveAs } from "file-saver";
|
|
38
|
+
|
|
39
|
+
export default {
|
|
40
|
+
name: "luckysheetDialog",
|
|
41
|
+
components: { luckysheet },
|
|
42
|
+
props: {
|
|
43
|
+
visiable: Boolean,
|
|
44
|
+
options: {
|
|
45
|
+
type: Object,
|
|
46
|
+
default: () => {},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
mounted() {},
|
|
50
|
+
data() {
|
|
51
|
+
return {
|
|
52
|
+
showDialog: true,
|
|
53
|
+
json: [],
|
|
54
|
+
showLuckysheet: false,
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
computed: {},
|
|
58
|
+
created() {
|
|
59
|
+
this.init();
|
|
60
|
+
},
|
|
61
|
+
methods: {
|
|
62
|
+
init() {
|
|
63
|
+
if (this.options.data) {
|
|
64
|
+
try {
|
|
65
|
+
let data = JSON.parse(this.options.data);
|
|
66
|
+
if (Array.isArray(data)) {
|
|
67
|
+
this.json = data;
|
|
68
|
+
} else {
|
|
69
|
+
this.json = [];
|
|
70
|
+
}
|
|
71
|
+
} catch (error) {
|
|
72
|
+
this.json = [];
|
|
73
|
+
console.error(error);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
this.$nextTick(() => {
|
|
77
|
+
this.showLuckysheet = true;
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
close() {
|
|
81
|
+
this.$refs.luckysheet.exitEditMode();
|
|
82
|
+
this.showDialog = false;
|
|
83
|
+
this.$emit("update:visiable", false);
|
|
84
|
+
},
|
|
85
|
+
dialogSubmit() {
|
|
86
|
+
let luckysheetRef = this.$refs.luckysheet;
|
|
87
|
+
let value = luckysheetRef.getValue();
|
|
88
|
+
luckysheetRef.generateExcelFile((file) => {
|
|
89
|
+
fileToBase64(file)
|
|
90
|
+
.then((base64) => {
|
|
91
|
+
let response = {
|
|
92
|
+
data: JSON.stringify(value),
|
|
93
|
+
json: value,
|
|
94
|
+
file: file,
|
|
95
|
+
base64: base64,
|
|
96
|
+
// convertedFile: convertedFile // 添加转换后的file对象
|
|
97
|
+
};
|
|
98
|
+
let onConfirm = this.options.onConfirm;
|
|
99
|
+
if (onConfirm && typeof onConfirm === "function") {
|
|
100
|
+
let result = onConfirm(response, this.close);
|
|
101
|
+
if (result !== false) {
|
|
102
|
+
this.close();
|
|
103
|
+
}
|
|
104
|
+
} else {
|
|
105
|
+
this.close();
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
.catch((error) => {
|
|
109
|
+
console.error("文件转换失败:", error);
|
|
110
|
+
this.$message.error("文件处理失败");
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* 保留原有的fileToBase64Async方法以保持向后兼容
|
|
116
|
+
*/
|
|
117
|
+
fileToBase64Async(file) {
|
|
118
|
+
return fileToBase64(file);
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
</script>
|
|
123
|
+
|
|
124
|
+
<style lang="scss" scoped>
|
|
125
|
+
.list-dialog {
|
|
126
|
+
.el-dialog__body {
|
|
127
|
+
height: calc(100% - 42px);
|
|
128
|
+
.cont {
|
|
129
|
+
height: calc(100vh - 210px);
|
|
130
|
+
|
|
131
|
+
&.nfootBtn {
|
|
132
|
+
height: calc(100vh - 158px);
|
|
133
|
+
}
|
|
134
|
+
&#containt {
|
|
135
|
+
padding: 0;
|
|
136
|
+
::v-deep .grid-container {
|
|
137
|
+
outline: none;
|
|
138
|
+
&.detail-wrap .d-cont {
|
|
139
|
+
height: calc(100vh - 150px);
|
|
140
|
+
.title .field-wrapper {
|
|
141
|
+
display: inline-block !important;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&.is-fullscreen .el-dialog__body {
|
|
150
|
+
.cont {
|
|
151
|
+
height: calc(100vh - 110px);
|
|
152
|
+
|
|
153
|
+
&.nfootBtn {
|
|
154
|
+
height: calc(100vh - 58px);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
</style>
|