cloud-web-corejs 1.0.54-dev.555 → 1.0.54-dev.557
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -3
- package/src/components/baseAlert/mixins.js +1 -61
- package/src/components/baseInputExport/mixins.js +1 -391
- package/src/components/errorMsg/mixins.js +1 -96
- package/src/components/excelImport/mixins.js +1 -774
- package/src/components/fileLibrary/index.vue +15 -17
- 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 +1 -12
- package/src/components/luckysheet/export.js +1 -591
- package/src/components/luckysheet/fileUtils.js +1 -147
- package/src/components/luckysheet/index.js +1 -72
- package/src/components/luckysheet/view.vue +0 -92
- package/src/components/oplogTable/mixins.js +1 -80
- package/src/components/table/index.js +1 -1044
- package/src/components/wf/wf.js +1 -2156
- package/src/components/wf/wfUtil.js +1 -279
- package/src/components/xform/form-designer/form-widget/components/gantt/index.vue +1 -1
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1 -1752
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1 -1630
- package/src/components/xform/form-designer/form-widget/field-widget/gantt-widget.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/exportItemColumns-dialog.vue +1 -1
- package/src/components/xform/form-render/container-item/data-table-mixin.js +1 -3043
- package/src/components/xform/form-render/container-item/table2-item.vue +12 -4
- package/src/components/xform/form-render/indexMixin.js +1 -3677
- package/src/mixins/tableTree/index.js +1 -196
- package/src/router/modules/customer.js +7 -7
- package/src/store/modules/permission.js +2 -2
- package/src/views/bd/setting/bd_attach_setting/mixins/list.js +1 -239
- package/src/views/bd/setting/form_script/mixins/dialog.js +1 -130
- package/src/views/bd/setting/form_script/mixins/edit.js +2 -199
- package/src/views/bd/setting/form_script/mixins/edit1.js +2 -193
- package/src/views/bd/setting/form_script/mixins/list.js +1 -236
- package/src/views/bd/setting/form_script/mixins/list1.js +1 -410
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +1 -278
- package/src/views/bd/setting/form_template/mixins/edit.js +1 -225
- package/src/views/bd/setting/form_template/mixins/list.js +1 -665
- package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +1 -187
- package/src/views/bd/setting/menu_kind/mixins/authDialog.js +1 -294
- package/src/views/bd/setting/menu_kind/mixins/list.js +1 -201
- package/src/views/bd/setting/table_model/mixins/edit.js +1 -1189
- package/src/views/bd/setting/table_model/mixins/list.js +1 -427
- package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +1 -195
- package/src/views/user/ledger_library/list.vue +12 -10
- package/src/views/user/position/list.vue +68 -124
- package/src/components/luckysheet/README.md +0 -329
- package/src/components/luckysheet/colorTest.js +0 -54
- package/src/components/luckysheet/exportExample.js +0 -182
- package/src/components/luckysheet/fileConversionExample.js +0 -127
- package/src/components/luckysheet/testExport.js +0 -57
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin - /345/211/257/346/234/254.js" +0 -1639
- package/src/components/xform/utils/formula-util copy 2.js +0 -945
- package/src/components/xform/utils/formula-util copy.js +0 -856
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
icon="el-icon-edit-outline"
|
|
32
32
|
class="btn"
|
|
33
33
|
@click="editFileCategory()"
|
|
34
|
-
:disabled="currentFileCategory
|
|
34
|
+
:disabled="currentFileCategory === null || !currentFileCategory.id"
|
|
35
35
|
v-if="fileObjAuth.editAuth"
|
|
36
36
|
>
|
|
37
37
|
{{ $t2("编辑", "components.fileLibrary.editCategory") }}
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
icon="iconfont icon-icmenu2"
|
|
304
304
|
@click="changeShowType()"
|
|
305
305
|
class="button-sty icon-btn"
|
|
306
|
-
v-show="showType
|
|
306
|
+
v-show="showType === 1"
|
|
307
307
|
>{{ $t2("列表", "components.fileLibrary.tableList") }}
|
|
308
308
|
</el-button>
|
|
309
309
|
<el-button
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
icon="el-icon-menu"
|
|
313
313
|
@click="changeShowType()"
|
|
314
314
|
class="button-sty icon-btn"
|
|
315
|
-
v-show="showType
|
|
315
|
+
v-show="showType === 2"
|
|
316
316
|
>{{ $t2("图示", "components.fileLibrary.imageList") }}
|
|
317
317
|
</el-button>
|
|
318
318
|
</div>
|
|
@@ -321,7 +321,7 @@
|
|
|
321
321
|
<div
|
|
322
322
|
class="containter1"
|
|
323
323
|
ref="containter1"
|
|
324
|
-
v-show="showType
|
|
324
|
+
v-show="showType === 1"
|
|
325
325
|
style="overflow: auto"
|
|
326
326
|
>
|
|
327
327
|
<div class="annex-piclist">
|
|
@@ -458,7 +458,7 @@
|
|
|
458
458
|
</div> -->
|
|
459
459
|
<div
|
|
460
460
|
class="status s-1"
|
|
461
|
-
v-if="!attachment.dirs && attachment.status
|
|
461
|
+
v-if="!attachment.dirs && attachment.status === 1"
|
|
462
462
|
></div>
|
|
463
463
|
<div
|
|
464
464
|
class="img"
|
|
@@ -535,7 +535,7 @@
|
|
|
535
535
|
</div>
|
|
536
536
|
<div class="annex-grid-height">
|
|
537
537
|
<vxe-grid
|
|
538
|
-
v-show="showType
|
|
538
|
+
v-show="showType === 2"
|
|
539
539
|
ref="table-m1"
|
|
540
540
|
v-bind="vxeOption"
|
|
541
541
|
:data="page.records"
|
|
@@ -574,7 +574,7 @@
|
|
|
574
574
|
<a
|
|
575
575
|
href="javascript:void(0);"
|
|
576
576
|
class="a-link"
|
|
577
|
-
v-if="isEdit && fileObjAuth.editAuth
|
|
577
|
+
v-if="isEdit && fileObjAuth.editAuth === 1"
|
|
578
578
|
@click="openPropertiesDialog(row)"
|
|
579
579
|
>
|
|
580
580
|
<el-tooltip
|
|
@@ -590,7 +590,7 @@
|
|
|
590
590
|
<a
|
|
591
591
|
href="javascript:void(0);"
|
|
592
592
|
class="a-link"
|
|
593
|
-
v-if="fileObjAuth.downloadAuth
|
|
593
|
+
v-if="fileObjAuth.downloadAuth === 1"
|
|
594
594
|
@click="downloadSingerFile(row)"
|
|
595
595
|
>
|
|
596
596
|
<el-tooltip
|
|
@@ -606,7 +606,7 @@
|
|
|
606
606
|
<a
|
|
607
607
|
href="javascript:void(0);"
|
|
608
608
|
class="a-link"
|
|
609
|
-
v-if="fileObjAuth.shareAuth
|
|
609
|
+
v-if="fileObjAuth.shareAuth === 1"
|
|
610
610
|
@click="openShareDialog(row)"
|
|
611
611
|
>
|
|
612
612
|
<el-tooltip
|
|
@@ -622,7 +622,7 @@
|
|
|
622
622
|
<a
|
|
623
623
|
href="javascript:void(0);"
|
|
624
624
|
class="a-link"
|
|
625
|
-
v-if="isEdit && row.status != 1 && fileObjAuth.replaceAuth
|
|
625
|
+
v-if="isEdit && row.status != 1 && fileObjAuth.replaceAuth === 1"
|
|
626
626
|
@click="replaceFile(row, rowIndex, items)"
|
|
627
627
|
>
|
|
628
628
|
<el-tooltip
|
|
@@ -638,7 +638,7 @@
|
|
|
638
638
|
<a
|
|
639
639
|
href="javascript:void(0);"
|
|
640
640
|
class="a-link"
|
|
641
|
-
v-if="isEdit && row.status != 1 && fileObjAuth.historyAuth
|
|
641
|
+
v-if="isEdit && row.status != 1 && fileObjAuth.historyAuth === 1"
|
|
642
642
|
@click="openFileHistoryDialog(row)"
|
|
643
643
|
>
|
|
644
644
|
<el-tooltip
|
|
@@ -654,7 +654,7 @@
|
|
|
654
654
|
<a
|
|
655
655
|
href="javascript:void(0);"
|
|
656
656
|
class="a-link"
|
|
657
|
-
v-if="isEdit && row.status != 1 && fileObjAuth.deleteAuth
|
|
657
|
+
v-if="isEdit && row.status != 1 && fileObjAuth.deleteAuth === 1"
|
|
658
658
|
@click="deleteAttach(row)"
|
|
659
659
|
>
|
|
660
660
|
<el-tooltip
|
|
@@ -672,7 +672,7 @@
|
|
|
672
672
|
<a
|
|
673
673
|
href="javascript:void(0);"
|
|
674
674
|
class="a-link"
|
|
675
|
-
v-if="isEdit && isCategoryEdit && fileObjAuth.editAuth
|
|
675
|
+
v-if="isEdit && isCategoryEdit && fileObjAuth.editAuth === 1"
|
|
676
676
|
@click="editFileCategory(row)"
|
|
677
677
|
>
|
|
678
678
|
<el-tooltip
|
|
@@ -688,7 +688,7 @@
|
|
|
688
688
|
<a
|
|
689
689
|
href="javascript:void(0);"
|
|
690
690
|
class="a-link"
|
|
691
|
-
v-if="isEdit && isCategoryEdit && fileObjAuth.deleteDirAuth
|
|
691
|
+
v-if="isEdit && isCategoryEdit && fileObjAuth.deleteDirAuth === 1"
|
|
692
692
|
@click="deleteAttach(row)"
|
|
693
693
|
>
|
|
694
694
|
<el-tooltip
|
|
@@ -776,9 +776,7 @@
|
|
|
776
776
|
>
|
|
777
777
|
<el-input v-model="editCategory.fileName" clearable class="all-width" />
|
|
778
778
|
</el-form-item>
|
|
779
|
-
<el-form-item
|
|
780
|
-
:label="$t1('关联编码')"
|
|
781
|
-
>
|
|
779
|
+
<el-form-item :label="$t1('关联编码')">
|
|
782
780
|
<el-input v-model="editCategory.relationCode" clearable class="all-width" />
|
|
783
781
|
</el-form-item>
|
|
784
782
|
</el-form>
|
|
@@ -1,61 +1,130 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-card>
|
|
3
|
-
<div style="display: flex;flex-direction: column" class="print-oper">
|
|
3
|
+
<div style="display: flex; flex-direction: column" class="print-oper">
|
|
4
4
|
<div>
|
|
5
5
|
<el-button-group>
|
|
6
|
-
<template v-for="(value,type) in paperTypes">
|
|
7
|
-
<el-button
|
|
8
|
-
|
|
6
|
+
<template v-for="(value, type) in paperTypes">
|
|
7
|
+
<el-button
|
|
8
|
+
size="mini"
|
|
9
|
+
:type="curPaperType === type ? 'primary' : ' '"
|
|
10
|
+
@click="setPaper(type, value)"
|
|
11
|
+
:key="type"
|
|
12
|
+
>
|
|
9
13
|
{{ type }}
|
|
10
14
|
</el-button>
|
|
11
15
|
</template>
|
|
12
|
-
<el-popover
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
<el-popover
|
|
17
|
+
v-model="paperPopVisible"
|
|
18
|
+
title="设置纸张宽高(mm)"
|
|
19
|
+
trigger="click"
|
|
20
|
+
width="256"
|
|
21
|
+
>
|
|
22
|
+
<base-input-number
|
|
23
|
+
v-model="paperWidth"
|
|
24
|
+
style="width: 100px !important; text-align: center"
|
|
25
|
+
placeholder="宽(mm)"
|
|
26
|
+
/>
|
|
27
|
+
<el-input
|
|
28
|
+
style="
|
|
29
|
+
width: 30px !important;
|
|
30
|
+
border-left: 0;
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
backgroundcolor: #fff;
|
|
33
|
+
"
|
|
34
|
+
placeholder="~"
|
|
35
|
+
disabled
|
|
36
|
+
/>
|
|
37
|
+
<base-input-number
|
|
38
|
+
v-model="paperHeight"
|
|
39
|
+
style="width: 100px !important; text-align: center; border-left: 0"
|
|
40
|
+
placeholder="高(mm)"
|
|
41
|
+
/>
|
|
42
|
+
<el-button
|
|
43
|
+
type="primary"
|
|
44
|
+
class="button-sty"
|
|
45
|
+
style="width: 100%; margin-top: 8px"
|
|
46
|
+
@click="otherPaper"
|
|
47
|
+
>确定
|
|
20
48
|
</el-button>
|
|
21
|
-
<el-button
|
|
49
|
+
<el-button
|
|
50
|
+
size="mini"
|
|
51
|
+
:type="'other' === curPaperType ? 'primary' : ''"
|
|
52
|
+
slot="reference"
|
|
53
|
+
class="button-sty"
|
|
54
|
+
>
|
|
22
55
|
自定义纸张
|
|
23
56
|
</el-button>
|
|
24
57
|
</el-popover>
|
|
25
58
|
</el-button-group>
|
|
26
|
-
<el-button
|
|
59
|
+
<el-button
|
|
60
|
+
class="button-zoom"
|
|
61
|
+
icon="el-icon-zoom-out"
|
|
62
|
+
@click="changeScale(false)"
|
|
63
|
+
></el-button>
|
|
27
64
|
<el-input-number
|
|
28
65
|
:value="scaleValue"
|
|
29
66
|
:min="scaleMin"
|
|
30
67
|
:max="scaleMax"
|
|
31
68
|
:step="0.1"
|
|
32
69
|
disabled
|
|
33
|
-
style="width: 70px
|
|
70
|
+
style="width: 70px"
|
|
34
71
|
class="noButton"
|
|
35
|
-
:formatter="value => `${(value * 100).toFixed(0)}%`"
|
|
36
|
-
:parser="value => value.replace('%', '')"
|
|
72
|
+
:formatter="(value) => `${(value * 100).toFixed(0)}%`"
|
|
73
|
+
:parser="(value) => value.replace('%', '')"
|
|
37
74
|
/>
|
|
38
|
-
<el-button
|
|
39
|
-
|
|
75
|
+
<el-button
|
|
76
|
+
class="button-zoom"
|
|
77
|
+
icon="el-icon-zoom-in"
|
|
78
|
+
@click="changeScale(true)"
|
|
79
|
+
></el-button>
|
|
80
|
+
<el-button
|
|
81
|
+
type="primary"
|
|
82
|
+
class="button-sty"
|
|
83
|
+
icon="el-icon-refresh-right"
|
|
84
|
+
@click="rotatePaper()"
|
|
85
|
+
plain
|
|
86
|
+
>旋转
|
|
40
87
|
</el-button>
|
|
41
|
-
<el-button type="warning" class="button-sty" icon="el-icon-view" @click="preView"
|
|
42
|
-
|
|
43
|
-
width="180"
|
|
44
|
-
v-model="visible"
|
|
45
|
-
@confirm="clearPaper"
|
|
88
|
+
<el-button type="warning" class="button-sty" icon="el-icon-view" @click="preView"
|
|
89
|
+
>预览</el-button
|
|
46
90
|
>
|
|
91
|
+
<el-popover width="180" v-model="visible" @confirm="clearPaper">
|
|
47
92
|
<p><i class="el-icon-warning-outline f-red"></i> 是否确认清空??</p>
|
|
48
93
|
<div style="text-align: right; margin: 0">
|
|
49
94
|
<el-button size="mini" type="text" @click="visible = false">取消</el-button>
|
|
50
|
-
<el-button
|
|
95
|
+
<el-button
|
|
96
|
+
type="primary"
|
|
97
|
+
size="mini"
|
|
98
|
+
@click="
|
|
99
|
+
clearPaper();
|
|
100
|
+
visible = false;
|
|
101
|
+
"
|
|
102
|
+
>确定清空</el-button
|
|
103
|
+
>
|
|
51
104
|
</div>
|
|
52
|
-
<el-button
|
|
105
|
+
<el-button
|
|
106
|
+
type="danger"
|
|
107
|
+
class="button-sty"
|
|
108
|
+
icon="el-icon-close"
|
|
109
|
+
slot="reference"
|
|
110
|
+
style="margin: 0 10px"
|
|
111
|
+
>
|
|
53
112
|
清空
|
|
54
113
|
</el-button>
|
|
55
114
|
</el-popover>
|
|
56
|
-
<el-button
|
|
115
|
+
<el-button
|
|
116
|
+
type="primary"
|
|
117
|
+
class="button-sty"
|
|
118
|
+
icon="el-icon-download"
|
|
119
|
+
@click="importDefaultTemplate1"
|
|
120
|
+
>导入默认模板1
|
|
57
121
|
</el-button>
|
|
58
|
-
<el-button
|
|
122
|
+
<el-button
|
|
123
|
+
type="primary"
|
|
124
|
+
class="button-sty"
|
|
125
|
+
icon="el-icon-download"
|
|
126
|
+
@click="importDefaultTemplate2"
|
|
127
|
+
>导入默认模板2
|
|
59
128
|
</el-button>
|
|
60
129
|
<div class="hiprint-printPagination"></div>
|
|
61
130
|
<!-- <el-radio-group size="mini">
|
|
@@ -151,7 +220,10 @@
|
|
|
151
220
|
<el-col :span="8" class="drag_item_box">
|
|
152
221
|
<div>
|
|
153
222
|
<a class="ep-draggable-item" tid="defaultModule.text" style>
|
|
154
|
-
<span
|
|
223
|
+
<span
|
|
224
|
+
class="glyphicon glyphicon-text-width"
|
|
225
|
+
aria-hidden="true"
|
|
226
|
+
></span>
|
|
155
227
|
<p class="glyphicon-class">文本</p>
|
|
156
228
|
</a>
|
|
157
229
|
</div>
|
|
@@ -167,7 +239,10 @@
|
|
|
167
239
|
<el-col :span="8" class="drag_item_box">
|
|
168
240
|
<div>
|
|
169
241
|
<a class="ep-draggable-item" tid="defaultModule.longText">
|
|
170
|
-
<span
|
|
242
|
+
<span
|
|
243
|
+
class="glyphicon glyphicon-subscript"
|
|
244
|
+
aria-hidden="true"
|
|
245
|
+
></span>
|
|
171
246
|
<p class="glyphicon-class">长文</p>
|
|
172
247
|
</a>
|
|
173
248
|
</div>
|
|
@@ -199,7 +274,10 @@
|
|
|
199
274
|
<el-col :span="8" class="drag_item_box">
|
|
200
275
|
<div>
|
|
201
276
|
<a class="ep-draggable-item" tid="defaultModule.customText" style>
|
|
202
|
-
<span
|
|
277
|
+
<span
|
|
278
|
+
class="glyphicon glyphicon-text-width"
|
|
279
|
+
aria-hidden="true"
|
|
280
|
+
></span>
|
|
203
281
|
<p class="glyphicon-class">自定义</p>
|
|
204
282
|
</a>
|
|
205
283
|
</div>
|
|
@@ -208,7 +286,10 @@
|
|
|
208
286
|
<el-col :span="8" class="drag_item_box">
|
|
209
287
|
<div>
|
|
210
288
|
<a class="ep-draggable-item" tid="defaultModule.barcode" style>
|
|
211
|
-
<span
|
|
289
|
+
<span
|
|
290
|
+
class="glyphicon iconfont icon-bar-code-full"
|
|
291
|
+
aria-hidden="true"
|
|
292
|
+
></span>
|
|
212
293
|
<p class="glyphicon-class">条形码</p>
|
|
213
294
|
</a>
|
|
214
295
|
</div>
|
|
@@ -216,19 +297,24 @@
|
|
|
216
297
|
<el-col :span="8" class="drag_item_box">
|
|
217
298
|
<div>
|
|
218
299
|
<a class="ep-draggable-item" tid="defaultModule.qrcode" style>
|
|
219
|
-
<span
|
|
300
|
+
<span
|
|
301
|
+
class="glyphicon iconfont icon-erweima"
|
|
302
|
+
aria-hidden="true"
|
|
303
|
+
></span>
|
|
220
304
|
<p class="glyphicon-class">二维码</p>
|
|
221
305
|
</a>
|
|
222
306
|
</div>
|
|
223
307
|
</el-col>
|
|
224
|
-
|
|
225
308
|
</el-row>
|
|
226
309
|
<el-row class="drag_item_title">辅助</el-row>
|
|
227
310
|
<el-row>
|
|
228
311
|
<el-col :span="8" class="drag_item_box">
|
|
229
312
|
<div>
|
|
230
313
|
<a class="ep-draggable-item" tid="defaultModule.hline" style>
|
|
231
|
-
<span
|
|
314
|
+
<span
|
|
315
|
+
class="glyphicon glyphicon-resize-horizontal"
|
|
316
|
+
aria-hidden="true"
|
|
317
|
+
></span>
|
|
232
318
|
<p class="glyphicon-class">横线</p>
|
|
233
319
|
</a>
|
|
234
320
|
</div>
|
|
@@ -236,7 +322,10 @@
|
|
|
236
322
|
<el-col :span="8" class="drag_item_box">
|
|
237
323
|
<div>
|
|
238
324
|
<a class="ep-draggable-item" tid="defaultModule.vline" style>
|
|
239
|
-
<span
|
|
325
|
+
<span
|
|
326
|
+
class="glyphicon glyphicon-resize-vertical"
|
|
327
|
+
aria-hidden="true"
|
|
328
|
+
></span>
|
|
240
329
|
<p class="glyphicon-class">竖线</p>
|
|
241
330
|
</a>
|
|
242
331
|
</div>
|
|
@@ -244,7 +333,10 @@
|
|
|
244
333
|
<el-col :span="8" class="drag_item_box">
|
|
245
334
|
<div>
|
|
246
335
|
<a class="ep-draggable-item" tid="defaultModule.rect">
|
|
247
|
-
<span
|
|
336
|
+
<span
|
|
337
|
+
class="glyphicon glyphicon-unchecked"
|
|
338
|
+
aria-hidden="true"
|
|
339
|
+
></span>
|
|
248
340
|
<p class="glyphicon-class">矩形</p>
|
|
249
341
|
</a>
|
|
250
342
|
</div>
|
|
@@ -276,19 +368,19 @@
|
|
|
276
368
|
</el-col>
|
|
277
369
|
</el-row>
|
|
278
370
|
<!-- 预览 -->
|
|
279
|
-
<print-preview ref="preView"/>
|
|
371
|
+
<print-preview ref="preView" />
|
|
280
372
|
</el-card>
|
|
281
373
|
</template>
|
|
282
374
|
|
|
283
375
|
<script>
|
|
284
|
-
import mixins from
|
|
376
|
+
import mixins from "./mixins.js";
|
|
285
377
|
export default {
|
|
286
378
|
name: "printDesign",
|
|
287
|
-
mixins: [mixins]
|
|
288
|
-
}
|
|
379
|
+
mixins: [mixins],
|
|
380
|
+
};
|
|
289
381
|
</script>
|
|
290
382
|
<style src="../../css/bootstrap.min.css" scoped></style>
|
|
291
|
-
<style lang="
|
|
383
|
+
<style lang="scss" scoped>
|
|
292
384
|
// 拖拽
|
|
293
385
|
.drag_item_box {
|
|
294
386
|
height: 100%;
|
|
@@ -305,29 +397,29 @@ export default {
|
|
|
305
397
|
}
|
|
306
398
|
|
|
307
399
|
// 默认图片
|
|
308
|
-
|
|
400
|
+
::v-deep .hiprint-printElement-image-content {
|
|
309
401
|
img {
|
|
310
402
|
content: url("~@/assets/logo.png");
|
|
311
403
|
}
|
|
312
404
|
}
|
|
313
405
|
|
|
314
406
|
// 辅助线样式
|
|
315
|
-
|
|
407
|
+
::v-deep .toplineOfPosition {
|
|
316
408
|
border: 0;
|
|
317
409
|
border-top: 1px dashed purple;
|
|
318
410
|
}
|
|
319
411
|
|
|
320
|
-
|
|
412
|
+
::v-deep .bottomlineOfPosition {
|
|
321
413
|
border: 0;
|
|
322
414
|
border-top: 1px dashed purple;
|
|
323
415
|
}
|
|
324
416
|
|
|
325
|
-
|
|
417
|
+
::v-deep .leftlineOfPosition {
|
|
326
418
|
border: 0;
|
|
327
419
|
border-left: 1px dashed purple;
|
|
328
420
|
}
|
|
329
421
|
|
|
330
|
-
|
|
422
|
+
::v-deep .rightlineOfPosition {
|
|
331
423
|
border: 0;
|
|
332
424
|
border-left: 1px dashed purple;
|
|
333
425
|
}
|
|
@@ -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>
|