cnhis-design-vue 2.1.143 → 2.1.145
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/CHANGELOG.md +41 -3
- package/es/age/index.js +2 -2
- package/es/big-table/index.js +26 -26
- package/es/button/index.js +445 -285
- package/es/button/style.css +1 -1
- package/es/captcha/index.js +3 -3
- package/es/card-reader-sdk/index.js +1 -1
- package/es/checkbox/index.js +1 -1
- package/es/color-picker/index.js +1 -1
- package/es/drag-layout/index.js +3 -3
- package/es/editor/index.js +1 -1
- package/es/ellipsis/index.js +1 -1
- package/es/fabric-chart/index.js +379 -186
- package/es/fabric-chart/style.css +1 -1
- package/es/form-table/index.js +20 -20
- package/es/full-calendar/index.js +4 -4
- package/es/index/index.js +1766 -953
- package/es/index/style.css +1 -1
- package/es/input/index.js +1 -1
- package/es/map/index.js +1 -1
- package/es/multi-chat/index.js +74 -58
- package/es/multi-chat/style.css +1 -1
- package/es/multi-chat-client/index.js +70 -54
- package/es/multi-chat-client/style.css +1 -1
- package/es/multi-chat-history/index.js +4 -4
- package/es/multi-chat-record/index.js +4 -4
- package/es/multi-chat-setting/index.js +64 -47
- package/es/multi-chat-setting/style.css +1 -1
- package/es/multi-chat-sip/index.js +1 -1
- package/es/radio/index.js +1 -1
- package/es/scale-container/index.js +1 -1
- package/es/scale-view/index.js +27 -27
- package/es/select/index.js +4 -4
- package/es/select-label/index.js +3 -3
- package/es/select-person/index.js +2 -2
- package/es/select-tag/index.js +4 -4
- package/es/shortcut-setter/index.js +2 -2
- package/es/slider-tree/index.js +1 -1
- package/es/table-filter/index.js +1100 -529
- package/es/table-filter/style.css +1 -1
- package/es/tag/index.js +1 -1
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +1926 -1139
- package/lib/cui.umd.js +1926 -1139
- package/lib/cui.umd.min.js +34 -34
- package/package.json +1 -1
- package/packages/button/src/ButtonPrint/index.vue +21 -13
- package/packages/button/src/ButtonPrint/new.vue +270 -291
- package/packages/button/src/ButtonPrint/old.vue +33 -4
- package/packages/fabric-chart/src/FabricChart.vue +10 -1
- package/packages/fabric-chart/src/fabric-chart/FabricCanvas.vue +0 -1
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +200 -89
- package/packages/fabric-chart/src/mixins/eventCommon.js +1 -1
- package/packages/fabric-chart/src/utils/index.js +8 -0
- package/packages/multi-chat/chat/client/clientChat.vue +14 -2
- package/packages/multi-chat/chat/index.vue +14 -2
- package/packages/multi-chat/setting/index.vue +13 -1
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +21 -71
- package/packages/table-filter/src/mixins/printNew.js +184 -0
|
@@ -1,136 +1,145 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="newprint-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<a-button-group>
|
|
6
|
-
<a-dropdown
|
|
7
|
-
v-for="outer in outerPrintItems"
|
|
8
|
-
:key="outer.key"
|
|
9
|
-
class="c-dropdown"
|
|
10
|
-
:trigger="dropOuter"
|
|
11
|
-
>
|
|
12
|
-
<a-button
|
|
13
|
-
:disabled="!printParams[outer.templateCode]"
|
|
14
|
-
:loading="outer.isLoading"
|
|
15
|
-
@click="handleOneTypePrint(outer.templateCode, outer.templateId, outer.key, true)"
|
|
16
|
-
>
|
|
17
|
-
{{ outer.label }}
|
|
18
|
-
<a-icon type="down" />
|
|
19
|
-
</a-button>
|
|
20
|
-
<template #overlay>
|
|
21
|
-
<a-menu>
|
|
22
|
-
<a-menu-item
|
|
23
|
-
v-for="operation in operations"
|
|
24
|
-
:key="operation.key"
|
|
25
|
-
@click="handleSelect(operation.key, outer)"
|
|
26
|
-
>
|
|
27
|
-
<span class="label" >{{ operation.label }}</span>
|
|
28
|
-
</a-menu-item>
|
|
29
|
-
</a-menu>
|
|
30
|
-
</template>
|
|
31
|
-
</a-dropdown>
|
|
32
|
-
</a-button-group>
|
|
33
|
-
|
|
34
|
-
<!-- 外显设置按钮 -->
|
|
2
|
+
<div class="newprint-button-outer" ref='newprintButtonOuterRef' v-clickoutside="handleAllClickOutside">
|
|
3
|
+
<!-- 外部按钮集合 -->
|
|
4
|
+
<a-button-group>
|
|
35
5
|
<a-dropdown
|
|
36
|
-
v-if="outerPrintItems.length > 0 && outerPrintItems.length == options.length && isShowOutSettingBtn"
|
|
37
|
-
overlayClassName="newprint-button-menu"
|
|
38
6
|
:getPopupContainer="getPopupContainerNode"
|
|
39
|
-
|
|
40
|
-
:
|
|
41
|
-
|
|
7
|
+
v-for="outer in outerPrintItems"
|
|
8
|
+
:key="outer.key"
|
|
9
|
+
class="c-dropdown"
|
|
10
|
+
:trigger="dropOuter"
|
|
42
11
|
>
|
|
43
|
-
<a-button
|
|
44
|
-
|
|
45
|
-
|
|
12
|
+
<a-button
|
|
13
|
+
class="operation-li"
|
|
14
|
+
style="display: flex;align-items: center;"
|
|
15
|
+
:disabled="!printParams[outer.templateCode]"
|
|
16
|
+
:loading="outer.isLoading"
|
|
17
|
+
@click="handleOneTypePrint(outer.templateCode, outer.templateId, outer.key, true)"
|
|
18
|
+
>
|
|
19
|
+
<a-icon type="printer" v-if="!outer.isLoading"/>
|
|
20
|
+
<span class="label" >{{ outer.label }}</span>
|
|
46
21
|
</a-button>
|
|
22
|
+
<template #overlay>
|
|
23
|
+
<a-menu>
|
|
24
|
+
<a-menu-item
|
|
25
|
+
class="operation-li"
|
|
26
|
+
v-for="operation in operations"
|
|
27
|
+
:key="operation.key"
|
|
28
|
+
@click="handleSelect(operation.key, outer)"
|
|
29
|
+
>
|
|
30
|
+
<span class="label" >{{ operation.label }}</span>
|
|
31
|
+
</a-menu-item>
|
|
32
|
+
</a-menu>
|
|
33
|
+
</template>
|
|
34
|
+
</a-dropdown>
|
|
35
|
+
</a-button-group>
|
|
36
|
+
|
|
37
|
+
<!-- 外显设置按钮 -->
|
|
38
|
+
<a-dropdown
|
|
39
|
+
v-if="outerPrintItems.length > 0 && outerPrintItems.length == options.length && isShowOutSettingBtn"
|
|
40
|
+
overlayClassName="newprint-button-menu"
|
|
41
|
+
:getPopupContainer="getPopupContainerNode"
|
|
42
|
+
id="dropdown-outer-setting-btn"
|
|
43
|
+
:visible="outSettingVisible"
|
|
44
|
+
:trigger="dropOperation"
|
|
45
|
+
>
|
|
46
|
+
<a-button @click="toggleSettingVisible('outSettingVisible')">
|
|
47
|
+
外显设置
|
|
48
|
+
<a-icon type="setting" />
|
|
49
|
+
</a-button>
|
|
50
|
+
<a-menu slot="overlay">
|
|
51
|
+
<a-menu-item
|
|
52
|
+
v-for="sItem in options"
|
|
53
|
+
:key="sItem.key"
|
|
54
|
+
class="dropdown-between operation-li"
|
|
55
|
+
>
|
|
56
|
+
<span class="label bold">{{ sItem.label }}</span>
|
|
57
|
+
<a-checkbox :checked="sItem.selected" @change="onSettingChange(sItem)">外显</a-checkbox>
|
|
58
|
+
</a-menu-item>
|
|
59
|
+
<a-menu-item class="print-divider"><a-divider /></a-menu-item>
|
|
60
|
+
<a-menu-item class="dropdown-between">
|
|
61
|
+
<a-button type="primary" size="small" @click="savePrintOutSetting('outSettingVisible')">保存</a-button>
|
|
62
|
+
<a-checkbox v-if="options && options.length > 1" :checked="isSelectedAll" @change="onSelectedAllChange">全选</a-checkbox>
|
|
63
|
+
</a-menu-item>
|
|
64
|
+
</a-menu>
|
|
65
|
+
</a-dropdown>
|
|
66
|
+
|
|
67
|
+
<!-- 打印全部按钮 -->
|
|
68
|
+
<a-button-group v-else>
|
|
69
|
+
<a-button style="display: flex;align-items: center;" :loading="this.spinning" @click.stop="printAllButtonClick">
|
|
70
|
+
<a-icon type="printer" v-if="!this.spinning"/>
|
|
71
|
+
{{ isShowPrintAllBtn ? '打印全部' : defaultFormatTitle ? defaultFormatTitle : btnText }}
|
|
72
|
+
</a-button>
|
|
73
|
+
<a-button
|
|
74
|
+
v-if="innerPrintItems.length == 0"
|
|
75
|
+
@click.stop="handleClickBtn"><a-icon type="down"/></a-button>
|
|
76
|
+
<a-dropdown v-else :visible="visible" :getPopupContainer="getPopupContainerNode" overlayClassName="newprint-button-menu" :trigger="dropOperation">
|
|
77
|
+
<a-button
|
|
78
|
+
@click.stop="handleClickBtn"><a-icon type="down"/></a-button>
|
|
47
79
|
<a-menu slot="overlay">
|
|
48
80
|
<a-menu-item
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
style="padding: 0 12px;"
|
|
81
|
+
class="dropdown-between operation-li"
|
|
82
|
+
v-for="option in innerPrintItems"
|
|
83
|
+
:key="option.key"
|
|
53
84
|
>
|
|
54
|
-
<span class="label bold"
|
|
55
|
-
<a-
|
|
85
|
+
<span class="label bold" :class="!printParams[option.templateCode] ? 'isDisabled' : ''" @click="handleOneTypePrint(option.templateCode, option.templateId, option.key, true)"><a-icon type="loading" v-if="option.isLoading" style="margin-right: 6px;"/>{{ option.label }} </span>
|
|
86
|
+
<a-dropdown :getPopupContainer="getPopupContainerNode" :trigger="dropOperation">
|
|
87
|
+
<!-- 点击唤起操作弹窗 -->
|
|
88
|
+
<span class="operation-icon" style="margin-left: 8px;"><a-icon type="right" /></span>
|
|
89
|
+
|
|
90
|
+
<a-menu slot="overlay">
|
|
91
|
+
<a-menu-item
|
|
92
|
+
class="operation-li"
|
|
93
|
+
v-for="operation in operations"
|
|
94
|
+
:key="operation.key"
|
|
95
|
+
@click="handleSelect(operation.key, option)"
|
|
96
|
+
>
|
|
97
|
+
<span class="label">{{ operation.label }}</span>
|
|
98
|
+
</a-menu-item>
|
|
99
|
+
</a-menu>
|
|
100
|
+
</a-dropdown>
|
|
56
101
|
</a-menu-item>
|
|
57
|
-
|
|
58
|
-
<a-menu-item class="
|
|
59
|
-
|
|
60
|
-
|
|
102
|
+
<!-- 分割线 -->
|
|
103
|
+
<a-menu-item v-if="isShowOutSettingBtn" class="print-divider"><a-divider /></a-menu-item>
|
|
104
|
+
<!-- 外显设置 -->
|
|
105
|
+
<a-menu-item class="operation-li" v-if="isShowOutSettingBtn">
|
|
106
|
+
<a-dropdown :visible="innerSettingVisible" :trigger="dropOperation" :getPopupContainer="getPopupContainerNode" overlayClassName="newprint-button-menu">
|
|
107
|
+
<div style="width: 100%;display: flex;justify-content: space-between;align-items: center;" @click="toggleSettingVisible('innerSettingVisible')">
|
|
108
|
+
<span class="label bold" style="margin-right: 12px;">外显设置 </span>
|
|
109
|
+
<a-icon type="setting" :class='outerPrintItems.length > 0 ? "hasOuterItem":""'/>
|
|
110
|
+
</div>
|
|
111
|
+
<a-menu slot="overlay">
|
|
112
|
+
<a-menu-item
|
|
113
|
+
class="dropdown-between operation-li"
|
|
114
|
+
v-for="sItem in options"
|
|
115
|
+
:key="sItem.key"
|
|
116
|
+
>
|
|
117
|
+
<span class="label bold"> {{ sItem.label }} </span>
|
|
118
|
+
<a-checkbox :checked="sItem.selected" @change="onSettingChange(sItem)">外显</a-checkbox>
|
|
119
|
+
</a-menu-item>
|
|
120
|
+
<!-- 分割线 -->
|
|
121
|
+
<a-menu-item class="print-divider"><a-divider /></a-menu-item>
|
|
122
|
+
<a-menu-item class="dropdown-between">
|
|
123
|
+
<a-button type="primary" size="small" @click="savePrintOutSetting('innerSettingVisible')">保存</a-button>
|
|
124
|
+
<a-checkbox v-if="options && options.length > 1" :checked="isSelectedAll" @change="onSelectedAllChange">全选</a-checkbox>
|
|
125
|
+
</a-menu-item>
|
|
126
|
+
</a-menu>
|
|
127
|
+
</a-dropdown>
|
|
61
128
|
</a-menu-item>
|
|
62
129
|
</a-menu>
|
|
63
130
|
</a-dropdown>
|
|
131
|
+
</a-button-group>
|
|
64
132
|
|
|
65
|
-
<!-- 打印全部按钮 -->
|
|
66
|
-
<a-button-group v-else>
|
|
67
|
-
<a-button :loading="this.spinning" @click.stop="printAllButtonClick">{{ isShowPrintAllBtn ? '打印全部' : btnText }}</a-button>
|
|
68
|
-
<a-dropdown :visible="visible" :getPopupContainer="getPopupContainerNode" overlayClassName="newprint-button-menu" :trigger="dropOperation">
|
|
69
|
-
<a-button
|
|
70
|
-
@click.stop="handleClickBtn"><a-icon type="down"/></a-button>
|
|
71
|
-
<a-menu slot="overlay">
|
|
72
|
-
<a-menu-item
|
|
73
|
-
class="dropdown-between"
|
|
74
|
-
v-for="option in innerPrintItems"
|
|
75
|
-
:key="option.key"
|
|
76
|
-
>
|
|
77
|
-
<span class="label bold" :class="!printParams[option.templateCode] ? 'isDisabled' : ''" @click="handleOneTypePrint(option.templateCode, option.templateId, option.key, true)"><a-icon type="loading" v-if="option.isLoading" style="margin-right: 6px;"/>{{ option.label }} </span>
|
|
78
|
-
<a-dropdown :trigger="dropOperation">
|
|
79
|
-
<a-button style="margin-left: 8px;" size="small"><a-icon type="right" /></a-button>
|
|
80
|
-
<a-menu slot="overlay">
|
|
81
|
-
<a-menu-item
|
|
82
|
-
v-for="operation in operations"
|
|
83
|
-
:key="operation.key"
|
|
84
|
-
@click="handleSelect(operation.key, option)"
|
|
85
|
-
>
|
|
86
|
-
<span class="label">{{ operation.label }}</span>
|
|
87
|
-
</a-menu-item>
|
|
88
|
-
</a-menu>
|
|
89
|
-
</a-dropdown>
|
|
90
|
-
</a-menu-item>
|
|
91
|
-
<!-- 分割线 -->
|
|
92
|
-
<a-menu-item v-if="isShowOutSettingBtn" class="print-divider"><a-divider /></a-menu-item>
|
|
93
|
-
<!-- 外显设置 -->
|
|
94
|
-
<a-menu-item v-if="isShowOutSettingBtn">
|
|
95
|
-
<a-dropdown :visible="innerSettingVisible" :trigger="dropOperation" :getPopupContainer="getPopupContainerNode" overlayClassName="newprint-button-menu">
|
|
96
|
-
<div style="width: 100%;display: flex;justify-content: space-between;align-items: center;" @click="showSettingVisible('innerSettingVisible')">
|
|
97
|
-
<span class="label bold">外显设置 </span>
|
|
98
|
-
<a-icon type="setting" />
|
|
99
|
-
</div>
|
|
100
|
-
<a-menu slot="overlay">
|
|
101
|
-
<a-menu-item
|
|
102
|
-
class="dropdown-between"
|
|
103
|
-
style="padding: 0 12px;"
|
|
104
|
-
v-for="sItem in options"
|
|
105
|
-
:key="sItem.key"
|
|
106
|
-
>
|
|
107
|
-
<span class="label bold"> {{ sItem.label }} </span>
|
|
108
|
-
<a-checkbox :checked="sItem.selected" @change="onSettingChange(sItem)">外显</a-checkbox>
|
|
109
|
-
</a-menu-item>
|
|
110
|
-
<!-- 分割线 -->
|
|
111
|
-
<a-menu-item class="print-divider"><a-divider /></a-menu-item>
|
|
112
|
-
<a-menu-item class="dropdown-between" style="padding: 0 12px;">
|
|
113
|
-
<a-button type="primary" @click="savePrintOutSetting('innerSettingVisible')">保存</a-button>
|
|
114
|
-
<a-checkbox v-if="options && options.length > 1" :checked="isSelectedAll" @change="onSelectedAllChange">全选</a-checkbox>
|
|
115
|
-
</a-menu-item>
|
|
116
|
-
</a-menu>
|
|
117
|
-
</a-dropdown>
|
|
118
|
-
</a-menu-item>
|
|
119
|
-
</a-menu>
|
|
120
|
-
</a-dropdown>
|
|
121
|
-
</a-button-group>
|
|
122
133
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
></IdentityVerification>
|
|
133
|
-
</div>
|
|
134
|
+
<IdentityVerification
|
|
135
|
+
:printConfig="printConfig"
|
|
136
|
+
:baseUrl="baseUrl"
|
|
137
|
+
:verifyUserUrl="verifyUserUrl"
|
|
138
|
+
:visible.sync="identityVerification.visible"
|
|
139
|
+
:identityVerificationTitle="identityVerificationTitle"
|
|
140
|
+
:authorizationKey="authorizationKey"
|
|
141
|
+
@success="verifiySuccess"
|
|
142
|
+
></IdentityVerification>
|
|
134
143
|
</div>
|
|
135
144
|
</template>
|
|
136
145
|
<script>
|
|
@@ -151,6 +160,8 @@ import axios from 'axios';
|
|
|
151
160
|
import moment from 'moment';
|
|
152
161
|
import vexutils from '@/utils/vexutils';
|
|
153
162
|
|
|
163
|
+
const downloadPdfCode = 'RY7.2.21.1.M2.G94181E';
|
|
164
|
+
const formatEditTextCode = 'RY7.2.21.1.M2.G33633A';
|
|
154
165
|
export default create({
|
|
155
166
|
name: 'button-print',
|
|
156
167
|
components: {
|
|
@@ -258,6 +269,11 @@ export default create({
|
|
|
258
269
|
getPrintParamsAfter: {
|
|
259
270
|
type: Function
|
|
260
271
|
},
|
|
272
|
+
// 隐藏默认按钮配置。printText: 直接打印;previewText: 打印预览;downloadPdf:下载pdf;formatEditText:格式编辑。示例:hideButtons = ['formatEditText']
|
|
273
|
+
hideButtons: {
|
|
274
|
+
type: Array,
|
|
275
|
+
default: () => []
|
|
276
|
+
},
|
|
261
277
|
// 新版打印配置(新)
|
|
262
278
|
newPrintSetting: {
|
|
263
279
|
type: Object,
|
|
@@ -273,6 +289,11 @@ export default create({
|
|
|
273
289
|
// 默认需要打印的格式(formatId)
|
|
274
290
|
defaultFormatId: ''
|
|
275
291
|
})
|
|
292
|
+
},
|
|
293
|
+
// 获取模板数据(新)
|
|
294
|
+
printFormatByNumberData: {
|
|
295
|
+
type: Object,
|
|
296
|
+
default: () => (null)
|
|
276
297
|
}
|
|
277
298
|
},
|
|
278
299
|
computed: {
|
|
@@ -307,11 +328,36 @@ export default create({
|
|
|
307
328
|
},
|
|
308
329
|
// 默认打印的formatId
|
|
309
330
|
defaultPrintFormatId() {
|
|
310
|
-
|
|
331
|
+
let dFormatId = this.newPrintSetting?.defaultFormatId || ''
|
|
332
|
+
// 如果在内显中没有找到对应项,则返回空
|
|
333
|
+
const isFindInnerItem = this.innerPrintItems.find(item => item.key == dFormatId)
|
|
334
|
+
if (!isFindInnerItem) {
|
|
335
|
+
dFormatId = '';
|
|
336
|
+
}
|
|
337
|
+
// 如果为空时,再去看当前下拉项中是否只有一项
|
|
338
|
+
if (!dFormatId) {
|
|
339
|
+
if (this.innerPrintItems.length == 1) {
|
|
340
|
+
return this.innerPrintItems[0]?.key;
|
|
341
|
+
}
|
|
342
|
+
return '';
|
|
343
|
+
}
|
|
344
|
+
return dFormatId;
|
|
311
345
|
},
|
|
312
346
|
isSelectedAll() {
|
|
313
347
|
return this.options.every(option => option.selected);
|
|
314
|
-
}
|
|
348
|
+
},
|
|
349
|
+
// 设置默认format的标题
|
|
350
|
+
defaultFormatTitle() {
|
|
351
|
+
const curFormat = this.innerPrintItems.find(option => option.key == this.defaultPrintFormatId);
|
|
352
|
+
if (curFormat) {
|
|
353
|
+
return `打印${curFormat.label}`;
|
|
354
|
+
}
|
|
355
|
+
// 如果innerPrintItems长度只有一项,则默认选中它
|
|
356
|
+
if (this.innerPrintItems.length == 1) {
|
|
357
|
+
return `打印${this.innerPrintItems[0].label}`;
|
|
358
|
+
}
|
|
359
|
+
return ''
|
|
360
|
+
},
|
|
315
361
|
},
|
|
316
362
|
data() {
|
|
317
363
|
return {
|
|
@@ -346,14 +392,14 @@ export default create({
|
|
|
346
392
|
options: [],
|
|
347
393
|
// 操作按钮集合
|
|
348
394
|
operations: [
|
|
349
|
-
{
|
|
350
|
-
label: this.pdfLoadText, // 下载pdf
|
|
351
|
-
key: 'downloadPdf'
|
|
352
|
-
},
|
|
353
395
|
{
|
|
354
396
|
label: this.previewText, // 打印预览
|
|
355
397
|
key: 'previewText'
|
|
356
398
|
},
|
|
399
|
+
{
|
|
400
|
+
label: this.pdfLoadText, // 下载pdf
|
|
401
|
+
key: 'downloadPdf'
|
|
402
|
+
},
|
|
357
403
|
{
|
|
358
404
|
label: this.formatEditText, // 格式编辑
|
|
359
405
|
key: 'formatEditText'
|
|
@@ -400,20 +446,20 @@ export default create({
|
|
|
400
446
|
}
|
|
401
447
|
},
|
|
402
448
|
newPrintSetting: {
|
|
403
|
-
deep: true,
|
|
404
449
|
immediate: true,
|
|
405
450
|
async handler(val) {
|
|
406
451
|
const keys = val?.outerPrintKeys || [];
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
452
|
+
const defFormatId = val?.defaultFormatId || '';
|
|
453
|
+
// if (keys.length > 0 || defFormatId) {}
|
|
454
|
+
// 解决innerPrintItems只有一项的时候也要默认选中的问题,初始化执行一次即可
|
|
455
|
+
await this.handleClickBtn(false, true);
|
|
410
456
|
}
|
|
411
457
|
}
|
|
412
458
|
},
|
|
413
459
|
methods: {
|
|
414
460
|
getPopupContainerNode() {
|
|
415
|
-
const node = document.getElementById('newprint-button-outer');
|
|
416
|
-
return
|
|
461
|
+
// const node = document.getElementById('newprint-button-outer');
|
|
462
|
+
return this.$refs.newprintButtonOuterRef;
|
|
417
463
|
},
|
|
418
464
|
// 重置所有的弹窗
|
|
419
465
|
handleAllClickOutside() {
|
|
@@ -476,8 +522,8 @@ export default create({
|
|
|
476
522
|
const printToParam = this.originParams[templateCode] || [];
|
|
477
523
|
this.handleClickPrint(tmpParam, templateCode, templateId, formatId, printToParam);
|
|
478
524
|
},
|
|
479
|
-
|
|
480
|
-
this[key] =
|
|
525
|
+
toggleSettingVisible(key) {
|
|
526
|
+
this[key] = !this[key];
|
|
481
527
|
},
|
|
482
528
|
// 修改设置
|
|
483
529
|
savePrintOutSetting(key) {
|
|
@@ -526,18 +572,18 @@ export default create({
|
|
|
526
572
|
}
|
|
527
573
|
this.$message.warning('重置打印机失败');
|
|
528
574
|
},
|
|
529
|
-
/*
|
|
530
|
-
async handleClickBtn(visible = true) {
|
|
575
|
+
/* visible为true时,展示下拉 */
|
|
576
|
+
async handleClickBtn(visible = true, isNoPopup = false) {
|
|
531
577
|
if (!this.visible) {
|
|
532
|
-
let result = await this.init();
|
|
578
|
+
let result = await this.init(isNoPopup);
|
|
533
579
|
if (!result) return false;
|
|
534
580
|
}
|
|
535
581
|
if (visible) {
|
|
536
582
|
this.visible = !this.visible;
|
|
537
583
|
}
|
|
538
584
|
},
|
|
539
|
-
/*
|
|
540
|
-
async init() {
|
|
585
|
+
/* isNoPopup:是否需要弹出获取打印格式失败,请联系管理员的提示 */
|
|
586
|
+
async init(isNoPopup = false) {
|
|
541
587
|
if (this.isInited) return true;
|
|
542
588
|
this.isInited = true;
|
|
543
589
|
|
|
@@ -558,109 +604,12 @@ export default create({
|
|
|
558
604
|
...config,
|
|
559
605
|
...cCofing
|
|
560
606
|
});
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
// {
|
|
568
|
-
// "number": "04-003-002.2.15",
|
|
569
|
-
// "authorizationKey": "-hQRma05xVDk8TgITIIlbZB0uQbdWbSnGaWZ0jquiPXro_TRORMrTnptz9_pcITa",
|
|
570
|
-
// "param": [
|
|
571
|
-
// {
|
|
572
|
-
// "type": "TEXT",
|
|
573
|
-
// "key": "vaf01",
|
|
574
|
-
// "required": false
|
|
575
|
-
// }
|
|
576
|
-
// ],
|
|
577
|
-
// "name": "检查申请单",
|
|
578
|
-
// "format": [
|
|
579
|
-
// {
|
|
580
|
-
// "number": "04-003-002.2.15",
|
|
581
|
-
// "defaultFlag": 0,
|
|
582
|
-
// "printType": 1,
|
|
583
|
-
// "rowNum": 10,
|
|
584
|
-
// "dataType": 2,
|
|
585
|
-
// "name": "检查申请单",
|
|
586
|
-
// "id": "1555397316323516416",
|
|
587
|
-
// "templateId": "1555397316298350592"
|
|
588
|
-
// }
|
|
589
|
-
// ],
|
|
590
|
-
// "id": "1555397316298350592",
|
|
591
|
-
// "datasetList": [
|
|
592
|
-
// {
|
|
593
|
-
// "name": "病人信息",
|
|
594
|
-
// "id": "1555397315836977152"
|
|
595
|
-
// },
|
|
596
|
-
// {
|
|
597
|
-
// "name": "病史信息",
|
|
598
|
-
// "id": "1555397316076052480"
|
|
599
|
-
// },
|
|
600
|
-
// {
|
|
601
|
-
// "name": "申请单信息",
|
|
602
|
-
// "id": "1610273175815266304"
|
|
603
|
-
// }
|
|
604
|
-
// ],
|
|
605
|
-
// "customizeDataset": [
|
|
606
|
-
|
|
607
|
-
// ]
|
|
608
|
-
// },
|
|
609
|
-
// // {
|
|
610
|
-
// // "number": "04-003-002.2.5",
|
|
611
|
-
// // "authorizationKey": "-hQRma05xVDk8TgITIIlbZB0uQbdWbSnGaWZ0jquiPXro_TRORMrTnptz9_pcITa",
|
|
612
|
-
// // "param": [
|
|
613
|
-
// // {
|
|
614
|
-
// // "type": "TEXT",
|
|
615
|
-
// // "key": "vaf01",
|
|
616
|
-
// // "required": true
|
|
617
|
-
// // },
|
|
618
|
-
// // {
|
|
619
|
-
// // "type": "TEXT",
|
|
620
|
-
// // "key": "vbi01",
|
|
621
|
-
// // "required": false
|
|
622
|
-
// // }
|
|
623
|
-
// // ],
|
|
624
|
-
// // "name": "注射单",
|
|
625
|
-
// // "format": [
|
|
626
|
-
// // {
|
|
627
|
-
// // "number": "04-003-002.2.5",
|
|
628
|
-
// // "defaultFlag": 1,
|
|
629
|
-
// // "printType": 1,
|
|
630
|
-
// // "rowNum": 2,
|
|
631
|
-
// // "dataType": 2,
|
|
632
|
-
// // "name": "注射单新",
|
|
633
|
-
// // "id": "1603271989354504192",
|
|
634
|
-
// // "templateId": "1549981374315700224"
|
|
635
|
-
// // },
|
|
636
|
-
// // {
|
|
637
|
-
// // "number": "04-003-002.2.5",
|
|
638
|
-
// // "defaultFlag": 0,
|
|
639
|
-
// // "printType": 1,
|
|
640
|
-
// // "rowNum": 10,
|
|
641
|
-
// // "dataType": 2,
|
|
642
|
-
// // "name": "注射单",
|
|
643
|
-
// // "id": "1555132544503980032",
|
|
644
|
-
// // "templateId": "1549981374315700224"
|
|
645
|
-
// // }
|
|
646
|
-
// // ],
|
|
647
|
-
// // "id": "1549981374315700224",
|
|
648
|
-
// // "datasetList": [
|
|
649
|
-
// // {
|
|
650
|
-
// // "name": "执行医嘱",
|
|
651
|
-
// // "id": "1610817743354798080"
|
|
652
|
-
// // }
|
|
653
|
-
// // ],
|
|
654
|
-
// // "customizeDataset": [
|
|
655
|
-
|
|
656
|
-
// // ]
|
|
657
|
-
// // }
|
|
658
|
-
// ],
|
|
659
|
-
// "total": 0,
|
|
660
|
-
// "recordsTotal": 0,
|
|
661
|
-
// "recordsFiltered": 0,
|
|
662
|
-
// "success": true
|
|
663
|
-
// };
|
|
607
|
+
let formatListResult = null;
|
|
608
|
+
if (this.printFormatByNumberData) {
|
|
609
|
+
formatListResult = this.printFormatByNumberData;
|
|
610
|
+
} else {
|
|
611
|
+
formatListResult = await this.queryFormatList();
|
|
612
|
+
}
|
|
664
613
|
|
|
665
614
|
// 获取模板参数接口
|
|
666
615
|
if (!formatListResult) {
|
|
@@ -668,12 +617,20 @@ export default create({
|
|
|
668
617
|
this.$message.error('获取模板参数失败,请联系管理员');
|
|
669
618
|
return false
|
|
670
619
|
}
|
|
620
|
+
|
|
621
|
+
if (!isNoPopup && (!formatListResult?.obj || formatListResult?.obj?.length == 0)) {
|
|
622
|
+
this.options = [];
|
|
623
|
+
this.$message.error(this.noformatTips || '获取打印格式失败,请联系管理员!');
|
|
624
|
+
return this.requestError();
|
|
625
|
+
}
|
|
626
|
+
|
|
671
627
|
if (this.versionType == 1 || this.versionType == 3) {
|
|
672
628
|
this.initHIS(formatListResult);
|
|
673
629
|
} else {
|
|
674
|
-
await this.initCRM(formatListResult);
|
|
630
|
+
await this.initCRM(formatListResult, isNoPopup);
|
|
675
631
|
}
|
|
676
632
|
|
|
633
|
+
this.isInited = false;
|
|
677
634
|
this.setLoaded();
|
|
678
635
|
|
|
679
636
|
return true;
|
|
@@ -704,16 +661,45 @@ export default create({
|
|
|
704
661
|
}
|
|
705
662
|
|
|
706
663
|
this.innerPrintItems = this.options.filter(option => !option.selected);
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
// 1、通过业务传入的参数hideButtons隐藏按钮
|
|
667
|
+
if (this.hideButtons.length > 0) {
|
|
668
|
+
this.operations = this.operations.filter(operation => !this.hideButtons.includes(operation.key));
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
// 2、通过全局缓存portal隐藏按钮
|
|
672
|
+
const portalStr = sessionStorage.getItem('portal');
|
|
673
|
+
if (portalStr) {
|
|
674
|
+
const portal = JSON.parse(portalStr);
|
|
675
|
+
const limitObj = portal?.user?.currentRoleResourceObj || {};
|
|
676
|
+
const limitList = Object.keys(limitObj);
|
|
677
|
+
console.log('limitList>>>', limitList);
|
|
678
|
+
|
|
679
|
+
// 下载pdf全局控制
|
|
680
|
+
if (!limitList.includes(downloadPdfCode)) {
|
|
681
|
+
this.operations = this.operations.filter(option => option.key != 'downloadPdf');
|
|
682
|
+
}
|
|
683
|
+
// 格式编辑按钮全局控制
|
|
684
|
+
if (!limitList.includes(formatEditTextCode)) {
|
|
685
|
+
this.operations = this.operations.filter(option => option.key != 'formatEditText');
|
|
686
|
+
}
|
|
687
|
+
}
|
|
707
688
|
},
|
|
708
689
|
initHIS(formatListResult) {
|
|
709
690
|
this.formatList = formatListResult ? formatListResult.list.filter(item => item.printmark == 1) : [];
|
|
710
691
|
this.currentFormatId = this.getDefaultFormatId(this.formatList, 'printmark');
|
|
711
692
|
this.templateParams = this.formatList[0] || {};
|
|
712
693
|
},
|
|
713
|
-
async initCRM(formatListResult) {
|
|
694
|
+
async initCRM(formatListResult, isNoPopup) {
|
|
714
695
|
this.formatList = formatListResult ? this.formatFormatList(formatListResult.obj) : [];
|
|
715
696
|
// this.currentFormatId = this.getDefaultFormatId(this.formatList, 'defaultFlag');
|
|
716
697
|
|
|
698
|
+
if (!isNoPopup && this.formatList.length == 0) {
|
|
699
|
+
this.options = [];
|
|
700
|
+
this.$message.error(this.noformatTips || '获取打印格式失败,请联系管理员!');
|
|
701
|
+
return this.requestError();
|
|
702
|
+
}
|
|
717
703
|
// if (!this.currentFormatId) {
|
|
718
704
|
// this.$message.error(this.noformatTips || '获取打印格式失败,请联系管理员!');
|
|
719
705
|
// return this.requestError();
|
|
@@ -722,6 +708,10 @@ export default create({
|
|
|
722
708
|
// this.requestError();
|
|
723
709
|
// return;
|
|
724
710
|
// }
|
|
711
|
+
// 如果第一遍已经请求到格式数据,则不需要再拼接数据(防止让已勾选的外显selected重置)
|
|
712
|
+
if (this.options.length > 0) {
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
725
715
|
this.setOptions();
|
|
726
716
|
|
|
727
717
|
// this.templateParams = await this.queryTemplateParams();
|
|
@@ -1357,30 +1347,45 @@ export default create({
|
|
|
1357
1347
|
</script>
|
|
1358
1348
|
|
|
1359
1349
|
<style lang="less" scoped>
|
|
1360
|
-
.dropdown-button {
|
|
1361
|
-
color: #212121;
|
|
1362
|
-
border-color: #d5d5d5 !important;
|
|
1363
|
-
margin-left: 8px;
|
|
1364
|
-
margin-bottom: 8px;
|
|
1365
|
-
/deep/ .svg-icon {
|
|
1366
|
-
margin-right: 4px;
|
|
1367
|
-
}
|
|
1368
|
-
&.ant-dropdown-trigger {
|
|
1369
|
-
i.anticon.anticon-down {
|
|
1370
|
-
color: #969696;
|
|
1371
|
-
font-size: 14px;
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
}
|
|
1375
|
-
</style>
|
|
1376
|
-
|
|
1377
|
-
<style lang="less">
|
|
1378
1350
|
.newprint-button-outer {
|
|
1379
|
-
display: flex;
|
|
1351
|
+
display: inline-flex;
|
|
1380
1352
|
align-items: center;
|
|
1353
|
+
.ant-btn-group{
|
|
1354
|
+
display: inline-flex;
|
|
1355
|
+
}
|
|
1381
1356
|
.ant-popover-inner-content{
|
|
1382
1357
|
padding: 0;
|
|
1383
1358
|
}
|
|
1359
|
+
.bold{
|
|
1360
|
+
font-weight: 700;
|
|
1361
|
+
}
|
|
1362
|
+
.hasOuterItem{
|
|
1363
|
+
color: rgba(37, 99, 244, 1);
|
|
1364
|
+
}
|
|
1365
|
+
.operation-icon{
|
|
1366
|
+
margin-left: 8px;
|
|
1367
|
+
width: 32px;
|
|
1368
|
+
height: 32px;
|
|
1369
|
+
display: flex;
|
|
1370
|
+
justify-content: center;
|
|
1371
|
+
align-items: center;
|
|
1372
|
+
opacity: 0;
|
|
1373
|
+
.anticon{
|
|
1374
|
+
margin-right: 0 !important;
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
.operation-li{
|
|
1378
|
+
&:hover{
|
|
1379
|
+
background: rgba(37, 99, 244, 0.10);
|
|
1380
|
+
.label, .anticon-right{
|
|
1381
|
+
color: rgba(37, 99, 244, 1);
|
|
1382
|
+
}
|
|
1383
|
+
.operation-icon{
|
|
1384
|
+
opacity: 1;
|
|
1385
|
+
background: rgba(37, 99, 244, 0.15);
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1384
1389
|
}
|
|
1385
1390
|
|
|
1386
1391
|
.newprint-button-menu{
|
|
@@ -1398,41 +1403,15 @@ export default create({
|
|
|
1398
1403
|
justify-content: space-between;
|
|
1399
1404
|
align-items: center;
|
|
1400
1405
|
padding: 0;
|
|
1406
|
+
margin: 0 6px;
|
|
1401
1407
|
.label{
|
|
1402
1408
|
flex: 1;
|
|
1403
|
-
padding: 5px 12px;
|
|
1409
|
+
padding: 5px 12px 5px 6px;
|
|
1404
1410
|
}
|
|
1405
1411
|
.ant-btn{
|
|
1406
|
-
margin: 5px 12px 5px
|
|
1412
|
+
margin: 5px 12px 5px 6px;
|
|
1407
1413
|
}
|
|
1408
1414
|
}
|
|
1409
1415
|
}
|
|
1410
1416
|
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
.rowFoldHideBtnList-dropdown {
|
|
1416
|
-
min-width: 150px !important;
|
|
1417
|
-
.ant-dropdown-menu {
|
|
1418
|
-
overflow-y: auto;
|
|
1419
|
-
max-height: 99vh;
|
|
1420
|
-
}
|
|
1421
|
-
.ant-dropdown-menu-item-group {
|
|
1422
|
-
.ant-dropdown-menu-item-group-title {
|
|
1423
|
-
display: none;
|
|
1424
|
-
}
|
|
1425
|
-
border-bottom: 1px solid #d5d5d5;
|
|
1426
|
-
&:last-child {
|
|
1427
|
-
border-color: transparent;
|
|
1428
|
-
}
|
|
1429
|
-
}
|
|
1430
|
-
.format-name .ant-dropdown-menu-submenu-title {
|
|
1431
|
-
font-weight: bold;
|
|
1432
|
-
color: #000;
|
|
1433
|
-
}
|
|
1434
|
-
.ant-dropdown-menu-item.active {
|
|
1435
|
-
color: #5585f5;
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
1417
|
</style>
|