cnhis-design-vue 0.2.17-beta → 0.2.21-beta
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/es/age/index.js +2 -2
- package/es/big-table/index.js +402 -178
- package/es/big-table/style.css +1 -1
- package/es/button/index.js +2299 -1517
- package/es/button/style.css +1 -1
- package/es/captcha/index.js +3 -3
- 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/fabric-chart/index.js +9 -9
- package/es/index/index.js +4007 -2563
- 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 +602 -199
- package/es/multi-chat/style.css +1 -1
- package/es/multi-chat-client/index.js +516 -141
- 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 +328 -77
- 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-view/index.js +436 -362
- package/es/scale-view/style.css +1 -1
- package/es/select/index.js +3 -3
- package/es/select-label/index.js +312 -289
- package/es/select-label/style.css +1 -1
- package/es/select-person/index.js +2 -2
- package/es/table-filter/index.js +2546 -1697
- package/es/table-filter/style.css +1 -1
- package/es/tag/index.js +1 -1
- package/es/utils/UniRTCv2.js +586 -0
- package/es/verification-code/index.js +2 -2
- package/package.json +2 -2
- package/packages/big-table/src/BigTable.vue +72 -16
- package/packages/big-table/src/assets/style/table-base.less +10 -0
- package/packages/big-table/src/components/TextOverTooltip.vue +24 -11
- package/packages/big-table/src/utils/batchEditing.js +1 -1
- package/packages/big-table/src/utils/bigTableProps.js +2 -1
- package/packages/button/src/ButtonPrint/index.vue +65 -21
- package/packages/button/src/ButtonPrint/js/print.es.min.js +1 -2
- package/packages/multi-chat/chat/audio.vue +22 -0
- package/packages/multi-chat/chat/calling.vue +6 -0
- package/packages/multi-chat/chat/chatFooter.vue +43 -3
- package/packages/multi-chat/chat/client/clientChat.vue +13 -1
- package/packages/multi-chat/chat/index.vue +17 -4
- package/packages/multi-chat/chat/mixins/uniRTCAPI.js +77 -0
- package/packages/multi-chat/chat/multiVideo.vue +14 -0
- package/packages/multi-chat/chat/scrollList.vue +7 -1
- package/packages/multi-chat/chat/video.vue +4 -0
- package/packages/multi-chat/components/user-status.vue +50 -45
- package/packages/multi-chat/setting/baseInfo/index.vue +3 -3
- package/packages/multi-chat/setting/configuration/index.vue +38 -1
- package/packages/multi-chat/store/actions.js +76 -0
- package/packages/multi-chat/store/getters.js +9 -0
- package/packages/multi-chat/store/mutation.js +9 -0
- package/packages/multi-chat/store/state.js +4 -1
- package/packages/scale-view/answerParse.vue +27 -14
- package/packages/scale-view/scaleView.vue +51 -10
- package/packages/select-label/label-classify.vue +16 -8
- package/packages/select-label/labelFormContent.vue +137 -75
- package/packages/select-label/select-label.vue +56 -17
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +100 -17
- package/packages/table-filter/src/classification/Classification-com.vue +49 -59
- package/packages/table-filter/src/components/search-modal/set-classification.vue +4 -1
- package/packages/table-filter/src/components/table-modal/TableModal.vue +10 -0
- package/packages/table-filter/src/quick-search/QuickSearch.vue +37 -23
- package/src/utils/UniRTCv2.js +561 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
class="big-table"
|
|
4
4
|
:class="{
|
|
5
5
|
mt: visibleCheckAllWrap || visibleTreeCheck || hasRefresh,
|
|
6
|
-
'expand-padding':
|
|
6
|
+
'expand-padding': !isNestTable
|
|
7
7
|
}"
|
|
8
8
|
:style="{ height: tableHeight }"
|
|
9
9
|
>
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
<script>
|
|
148
148
|
import Vue from 'vue';
|
|
149
149
|
import TextOverTooltip from './components/TextOverTooltip.vue';
|
|
150
|
-
import { Icon, Tooltip, Progress, Switch, Popover, Button, Dropdown, Menu, Checkbox, Input } from 'ant-design-vue';
|
|
150
|
+
import { Icon, Tooltip, Progress, Switch, Popover, Button, Dropdown, Menu, Checkbox, Input, Popconfirm } from 'ant-design-vue';
|
|
151
151
|
import format from './utils/format';
|
|
152
152
|
import { parseDurationValue, parseCombinationValue, formatFieldText, imgs2imgArr } from './utils/tableParse';
|
|
153
153
|
import passwordCom from './components/password-com.vue';
|
|
@@ -167,6 +167,7 @@ import EditForm from './components/edit-form/EditForm.vue';
|
|
|
167
167
|
|
|
168
168
|
import nestTable from './utils/nestTable';
|
|
169
169
|
import bigTableProps from './utils/bigTableProps';
|
|
170
|
+
import SvgIcon from '@/component/svg/index.vue';
|
|
170
171
|
|
|
171
172
|
let addInlineEditPrimaryKey = '';
|
|
172
173
|
export default create({
|
|
@@ -182,9 +183,11 @@ export default create({
|
|
|
182
183
|
[Switch.name]: Switch,
|
|
183
184
|
[Popover.name]: Popover,
|
|
184
185
|
[Dropdown.name]: Dropdown,
|
|
186
|
+
[Popconfirm.name]: Popconfirm,
|
|
185
187
|
[Menu.name]: Menu,
|
|
186
188
|
[Grid.name]: Grid,
|
|
187
|
-
[VideoList.name]: VideoList
|
|
189
|
+
[VideoList.name]: VideoList,
|
|
190
|
+
SvgIcon
|
|
188
191
|
},
|
|
189
192
|
mixins: [format, batchEditing, nestTable],
|
|
190
193
|
props: Object.assign({}, bigTableProps),
|
|
@@ -347,6 +350,13 @@ export default create({
|
|
|
347
350
|
}
|
|
348
351
|
let startIndex = (this.pageVO.pageIndex - 1) * this.pageVO.pageSize;
|
|
349
352
|
return { startIndex: startIndex < 0 ? 0 : startIndex };
|
|
353
|
+
},
|
|
354
|
+
isScanMultiTable() {
|
|
355
|
+
return this.columnConfig?.isScanMultiTable
|
|
356
|
+
},
|
|
357
|
+
tableNoSetting(){
|
|
358
|
+
let { noSetting } = this.getOtherConfigInit() || {};
|
|
359
|
+
return noSetting || this.showSettings?.hideSettingBtn == 1;
|
|
350
360
|
}
|
|
351
361
|
},
|
|
352
362
|
watch: {
|
|
@@ -468,6 +478,10 @@ export default create({
|
|
|
468
478
|
}
|
|
469
479
|
},
|
|
470
480
|
methods: {
|
|
481
|
+
customerInit(){
|
|
482
|
+
this.loadColumn(this.columnConfig);
|
|
483
|
+
this.loadData(this.data);
|
|
484
|
+
},
|
|
471
485
|
setTalbeScrollTo() {
|
|
472
486
|
let table = this.$refs.xGrid;
|
|
473
487
|
if (!table) return;
|
|
@@ -1289,8 +1303,9 @@ export default create({
|
|
|
1289
1303
|
* sortable: 是否允许列排序
|
|
1290
1304
|
*/
|
|
1291
1305
|
// 配置列表
|
|
1292
|
-
let { selectType
|
|
1293
|
-
let {
|
|
1306
|
+
let { selectType } = this.getOtherConfigInit() || {};
|
|
1307
|
+
let { tableNoSetting } = this;
|
|
1308
|
+
let { isBatchSelect, fieldList, showButtonTop, isScanMultiTable } = map;
|
|
1294
1309
|
if (selectType) {
|
|
1295
1310
|
// 有设置 selectType 强制可选。
|
|
1296
1311
|
isBatchSelect = 1;
|
|
@@ -1313,7 +1328,20 @@ export default create({
|
|
|
1313
1328
|
);
|
|
1314
1329
|
}
|
|
1315
1330
|
};
|
|
1316
|
-
|
|
1331
|
+
let checkVisible = isBatchSelect == 1 && !this.isNestTable && !isScanMultiTable || false;
|
|
1332
|
+
let columns = [
|
|
1333
|
+
{
|
|
1334
|
+
fixed: 'left',
|
|
1335
|
+
align: 'center',
|
|
1336
|
+
visible: isScanMultiTable || false,
|
|
1337
|
+
width: '50',
|
|
1338
|
+
slots: {
|
|
1339
|
+
header: () => {
|
|
1340
|
+
return "操作";
|
|
1341
|
+
},
|
|
1342
|
+
default: this.scanMultiOperate
|
|
1343
|
+
}
|
|
1344
|
+
},
|
|
1317
1345
|
{
|
|
1318
1346
|
type: 'seq',
|
|
1319
1347
|
fixed: this.isNestTable ? '' : 'left',
|
|
@@ -1323,7 +1351,7 @@ export default create({
|
|
|
1323
1351
|
showOverflow: true,
|
|
1324
1352
|
slots: {
|
|
1325
1353
|
header: () => {
|
|
1326
|
-
return [
|
|
1354
|
+
return [tableNoSetting ? null : <a-icon class="setting" type="setting" onClick={() => this.showDrawer()} />];
|
|
1327
1355
|
}
|
|
1328
1356
|
}
|
|
1329
1357
|
},
|
|
@@ -1331,7 +1359,7 @@ export default create({
|
|
|
1331
1359
|
type: selectType,
|
|
1332
1360
|
fixed: this.isNestTable ? '' : 'left',
|
|
1333
1361
|
align: 'center',
|
|
1334
|
-
visible:
|
|
1362
|
+
visible: checkVisible,
|
|
1335
1363
|
resizable: false,
|
|
1336
1364
|
width: checkMinWidth,
|
|
1337
1365
|
// slots: selectType === 'checkbox' ? checkboxSlot : null,
|
|
@@ -1360,6 +1388,14 @@ export default create({
|
|
|
1360
1388
|
let treeNode = this.isNestTable ? false : this.isTree != 0 ? index === 0 : false;
|
|
1361
1389
|
let type = index === 0 && this.showNestTable ? 'expand' : '';
|
|
1362
1390
|
|
|
1391
|
+
// 扫码打开的table只展示
|
|
1392
|
+
if(isScanMultiTable) {
|
|
1393
|
+
fixed = "";
|
|
1394
|
+
sortable = false;
|
|
1395
|
+
treeNode = false;
|
|
1396
|
+
type = "";
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1363
1399
|
const col = Object.assign(item, {
|
|
1364
1400
|
visible: item.columnName == 'operatorColumn' ? showButtonTop == 0 : item.isShow == 1,
|
|
1365
1401
|
field: item.columnName,
|
|
@@ -1384,7 +1420,7 @@ export default create({
|
|
|
1384
1420
|
editRender: this.generateEditRender(item)
|
|
1385
1421
|
});
|
|
1386
1422
|
|
|
1387
|
-
if (filterField && !this.isNestTable) {
|
|
1423
|
+
if (filterField && !this.isNestTable && !isScanMultiTable) {
|
|
1388
1424
|
this.$set(
|
|
1389
1425
|
this.filterFields,
|
|
1390
1426
|
item.columnName,
|
|
@@ -1407,7 +1443,10 @@ export default create({
|
|
|
1407
1443
|
col.slots.header = this.toolTipTitle(item);
|
|
1408
1444
|
}
|
|
1409
1445
|
|
|
1410
|
-
|
|
1446
|
+
|
|
1447
|
+
if (!isScanMultiTable) {
|
|
1448
|
+
col.slots.footer = 'tooltip_footer';
|
|
1449
|
+
}
|
|
1411
1450
|
|
|
1412
1451
|
// 主表设置expand
|
|
1413
1452
|
if (this.showNestTable && this.isTree == 0 && this.curNestColumnConfig?.isTree == 0) {
|
|
@@ -1691,7 +1730,7 @@ export default create({
|
|
|
1691
1730
|
if (this.tableOptions?.dataSourceType == 'guage') {
|
|
1692
1731
|
tooltipTitle = item.alias || item.title;
|
|
1693
1732
|
}
|
|
1694
|
-
if (name && name !== tooltipTitle) {
|
|
1733
|
+
if (name&& tooltipTitle && name !== tooltipTitle) {
|
|
1695
1734
|
isAlias = !!tooltipTitle;
|
|
1696
1735
|
}
|
|
1697
1736
|
if (type === 'format') return <text-over-tooltip refName={'item-' + item[this.handleRowId]} tooltipTitle={tooltipTitle} content={name} isAlias={isAlias} />;
|
|
@@ -1971,6 +2010,23 @@ export default create({
|
|
|
1971
2010
|
field.indeterminate = !!len && len !== field.setting.showSetting.length;
|
|
1972
2011
|
field.searchFilterText = '';
|
|
1973
2012
|
},
|
|
2013
|
+
scanMultiOperate(params){
|
|
2014
|
+
return [
|
|
2015
|
+
<a-popconfirm ok-text={'确认'} cancel-text={'取消'} title={'是否确认删除?'} on-confirm={() =>this.confirmScanMulti(params)}>
|
|
2016
|
+
<svg-icon class="scan-multi-delete" iconClass="shanchu" />
|
|
2017
|
+
</a-popconfirm>
|
|
2018
|
+
]
|
|
2019
|
+
},
|
|
2020
|
+
/**
|
|
2021
|
+
* 删除选中scan数据
|
|
2022
|
+
*/
|
|
2023
|
+
confirmScanMulti(params){
|
|
2024
|
+
let{row, $rowIndex} = params || {}
|
|
2025
|
+
if(!row) return;
|
|
2026
|
+
this.$emit("scanMultiRemove", $rowIndex, params)
|
|
2027
|
+
let vxeTable = this.$refs.xGrid;
|
|
2028
|
+
vxeTable.remove(row);
|
|
2029
|
+
},
|
|
1974
2030
|
// 表格渲染逻辑
|
|
1975
2031
|
formatter(params, col) {
|
|
1976
2032
|
let { row, column, $rowIndex } = params;
|
|
@@ -2065,7 +2121,7 @@ export default create({
|
|
|
2065
2121
|
];
|
|
2066
2122
|
}
|
|
2067
2123
|
|
|
2068
|
-
if (this.isLink(own, row)) {
|
|
2124
|
+
if (this.isLink(own, row) && !this.isScanMultiTable) {
|
|
2069
2125
|
if (own.btnLinkSwitch) {
|
|
2070
2126
|
let disabled = false;
|
|
2071
2127
|
let curBtn = row.btnList?.find(v => v.name == own.columnName);
|
|
@@ -2093,6 +2149,7 @@ export default create({
|
|
|
2093
2149
|
if (!imageArr || !imageArr.length) return curSrc;
|
|
2094
2150
|
let matchItem = imageArr.find(item => item.type === type);
|
|
2095
2151
|
if (!matchItem) return curSrc;
|
|
2152
|
+
if(matchItem.suffix) return curSrc + matchItem.suffix
|
|
2096
2153
|
let h = matchItem.h;
|
|
2097
2154
|
let w = matchItem.w;
|
|
2098
2155
|
if (matchItem.h === 'adaptive' && matchItem.w != 'adaptive') {
|
|
@@ -2225,14 +2282,14 @@ export default create({
|
|
|
2225
2282
|
},
|
|
2226
2283
|
// 行双击
|
|
2227
2284
|
rowdblclick({ row, column }) {
|
|
2228
|
-
if (this.isInlineOperating) return false;
|
|
2285
|
+
if (this.isScanMultiTable || this.isInlineOperating) return false;
|
|
2229
2286
|
if (vexutils.has(row, GROUP_TITLE_KEY)) return false;
|
|
2230
2287
|
this.$emit('setNestTableClick', this.isNestTable);
|
|
2231
2288
|
this.$emit('rowdblclick', row, column, true, true);
|
|
2232
2289
|
},
|
|
2233
2290
|
// 行单击
|
|
2234
2291
|
handlerClickRow(data) {
|
|
2235
|
-
if (this.isInlineOperating) return false;
|
|
2292
|
+
if (this.isScanMultiTable || this.isInlineOperating) return false;
|
|
2236
2293
|
if (vexutils.has(data?.row, GROUP_TITLE_KEY)) return false;
|
|
2237
2294
|
if (this.isTriggerSelectionChange && this.isTree == 0) return false;
|
|
2238
2295
|
let table = this.$refs.xGrid;
|
|
@@ -2242,7 +2299,7 @@ export default create({
|
|
|
2242
2299
|
let { row, $event = {}, $rowIndex } = data;
|
|
2243
2300
|
// 点击主表格展开行按钮 不需要触发选中行
|
|
2244
2301
|
let { className } = $event.target || {};
|
|
2245
|
-
if (className && className.includes('vxe-table--expand-btn')) return;
|
|
2302
|
+
if (className && vexutils.isString(className) && className.includes('vxe-table--expand-btn')) return;
|
|
2246
2303
|
|
|
2247
2304
|
// 记录上次点击table信息 用于清除
|
|
2248
2305
|
this.isAboutNestTable && this.$emit('setNestLastClickTable', table, this.isNestTable, row[this.handleRowId], row);
|
|
@@ -2812,7 +2869,6 @@ export default create({
|
|
|
2812
2869
|
const config = tableOptions?.config || {};
|
|
2813
2870
|
return config || undefined;
|
|
2814
2871
|
},
|
|
2815
|
-
|
|
2816
2872
|
// 单选
|
|
2817
2873
|
radioOnChange(rowData = {}) {
|
|
2818
2874
|
let { data, row, $rowIndex } = rowData;
|
|
@@ -17,6 +17,7 @@ body {
|
|
|
17
17
|
img {
|
|
18
18
|
max-height: 100%;
|
|
19
19
|
object-fit: contain;
|
|
20
|
+
cursor: pointer;
|
|
20
21
|
}
|
|
21
22
|
&.img-circle {
|
|
22
23
|
img {
|
|
@@ -179,11 +180,16 @@ body {
|
|
|
179
180
|
height: 100%;
|
|
180
181
|
}
|
|
181
182
|
|
|
183
|
+
.scan-multi-delete {
|
|
184
|
+
color: #F06F64;
|
|
185
|
+
}
|
|
186
|
+
|
|
182
187
|
.vxe-table--header {
|
|
183
188
|
background-color: #f2f2f2;
|
|
184
189
|
.vxe-header--column .vxe-cell--title {
|
|
185
190
|
height: 100%;
|
|
186
191
|
line-height: unset;
|
|
192
|
+
width: 100%;
|
|
187
193
|
}
|
|
188
194
|
}
|
|
189
195
|
.vxe-table--footer-wrapper.body--wrapper,
|
|
@@ -214,6 +220,10 @@ body {
|
|
|
214
220
|
/deep/ .filter-box {
|
|
215
221
|
display: flex;
|
|
216
222
|
align-items: center;
|
|
223
|
+
width: 100%;
|
|
224
|
+
.text-over-tooltip-components {
|
|
225
|
+
max-width: calc(100% - 20px);
|
|
226
|
+
}
|
|
217
227
|
.vxe-filter--btn {
|
|
218
228
|
border-top-color: #c0c4cc;
|
|
219
229
|
border-right-color: #c0c4cc;
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="text-over-tooltip-components">
|
|
3
|
-
<a-tooltip
|
|
4
|
-
|
|
3
|
+
<a-tooltip
|
|
4
|
+
:effect="effect"
|
|
5
|
+
:visible="isDisabledTooltip"
|
|
6
|
+
:title="curContent"
|
|
7
|
+
:placement="placement"
|
|
8
|
+
>
|
|
9
|
+
<div
|
|
10
|
+
class="ellipsis"
|
|
11
|
+
:class="className"
|
|
12
|
+
@mouseover="onMouseOver(refName)"
|
|
13
|
+
@mouseout="onMouseOut"
|
|
14
|
+
>
|
|
5
15
|
<i :ref="refName">
|
|
6
16
|
<slot></slot>
|
|
7
17
|
<i>{{ content }}</i>
|
|
@@ -12,10 +22,10 @@
|
|
|
12
22
|
</template>
|
|
13
23
|
|
|
14
24
|
<script>
|
|
15
|
-
import { Tooltip } from
|
|
25
|
+
import { Tooltip } from "ant-design-vue";
|
|
16
26
|
import vexutils from '@/utils/vexutils';
|
|
17
27
|
export default {
|
|
18
|
-
name:
|
|
28
|
+
name: "TextOverTooltip",
|
|
19
29
|
components: {
|
|
20
30
|
[Tooltip.name]: Tooltip
|
|
21
31
|
},
|
|
@@ -30,27 +40,27 @@ export default {
|
|
|
30
40
|
effect: {
|
|
31
41
|
type: String,
|
|
32
42
|
default: () => {
|
|
33
|
-
return
|
|
43
|
+
return "dark";
|
|
34
44
|
}
|
|
35
45
|
},
|
|
36
46
|
// Tooltip 的出现位置top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end
|
|
37
47
|
placement: {
|
|
38
48
|
type: String,
|
|
39
49
|
default: () => {
|
|
40
|
-
return
|
|
50
|
+
return "top";
|
|
41
51
|
}
|
|
42
52
|
},
|
|
43
|
-
tooltipTitle: { type: [Number, String], default:
|
|
53
|
+
tooltipTitle: { type: [Number, String], default: "" },
|
|
44
54
|
isAlias: Boolean
|
|
45
55
|
},
|
|
46
56
|
data() {
|
|
47
57
|
return {
|
|
48
|
-
isDisabledTooltip:
|
|
58
|
+
isDisabledTooltip: false // 是否需要禁止提示
|
|
49
59
|
};
|
|
50
60
|
},
|
|
51
61
|
computed: {
|
|
52
62
|
curContent() {
|
|
53
|
-
let res = this.tooltipTitle || this.content ||
|
|
63
|
+
let res = this.tooltipTitle || this.content || "";
|
|
54
64
|
if (vexutils.isNumber(res)) {
|
|
55
65
|
return res.toString();
|
|
56
66
|
}
|
|
@@ -67,7 +77,10 @@ export default {
|
|
|
67
77
|
let parentWidth = this.$refs[str].parentNode.offsetWidth;
|
|
68
78
|
let contentWidth = this.$refs[str].offsetWidth;
|
|
69
79
|
// 判断是否禁用tooltip功能
|
|
70
|
-
this.isDisabledTooltip = contentWidth
|
|
80
|
+
this.isDisabledTooltip = contentWidth > parentWidth;
|
|
81
|
+
},
|
|
82
|
+
onMouseOut() {
|
|
83
|
+
this.isDisabledTooltip = false;
|
|
71
84
|
}
|
|
72
85
|
}
|
|
73
86
|
};
|
|
@@ -76,7 +89,7 @@ export default {
|
|
|
76
89
|
<style lang="less" scoped>
|
|
77
90
|
.text-over-tooltip-components {
|
|
78
91
|
display: inline-block;
|
|
79
|
-
max-width:
|
|
92
|
+
max-width: 98%;
|
|
80
93
|
/* 文字超出宽度显示省略号 单行 */
|
|
81
94
|
.ellipsis {
|
|
82
95
|
font-size: 14px;
|
|
@@ -296,7 +296,7 @@ export default {
|
|
|
296
296
|
* @returns
|
|
297
297
|
*/
|
|
298
298
|
showEditForm(row, column, $rowIndex) {
|
|
299
|
-
if (!this.isMatchComponent || this.isNestTable) return false;
|
|
299
|
+
if (!this.isMatchComponent || this.isNestTable || this.isScanMultiTable) return false;
|
|
300
300
|
if (this.isBatchEditing || this.isInlineEditing || this.isInlineAdding) {
|
|
301
301
|
let matchObj = this.editColumnMap[column.property];
|
|
302
302
|
if (!matchObj || !matchObj.matchItem || !matchObj.fieldItem) return false;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
</a-menu>
|
|
21
21
|
<slot name="button" :handleClickPrintBtn="handleClickBtn" :printSpinning="spinning" :printbtnText="btnText" :printVisible="visible">
|
|
22
22
|
<a-button class="dropdown-button" style="margin: 0 8px 8px 0" @click.stop="handleClickBtn">
|
|
23
|
-
<a-icon v-if="spinning" type="loading" style="line-height: 10px
|
|
23
|
+
<a-icon v-if="spinning" type="loading" style="line-height: 10px" />
|
|
24
24
|
{{ btnText }}
|
|
25
25
|
<a-icon type="down" />
|
|
26
26
|
</a-button>
|
|
@@ -49,7 +49,6 @@ let httpFn = null;
|
|
|
49
49
|
import Print from './js/print.es.min';
|
|
50
50
|
import IdentityVerification from './components/IdentityVerification';
|
|
51
51
|
import Clickoutside from '@/utils/clickoutside';
|
|
52
|
-
import HisPrint from './mixin/his-print.js';
|
|
53
52
|
import Vue from 'vue';
|
|
54
53
|
import { Button, Dropdown, Menu, Icon } from 'ant-design-vue';
|
|
55
54
|
import create from '@/core/create';
|
|
@@ -62,7 +61,6 @@ export default create({
|
|
|
62
61
|
components: {
|
|
63
62
|
IdentityVerification
|
|
64
63
|
},
|
|
65
|
-
mixins: [HisPrint],
|
|
66
64
|
directives: { Clickoutside },
|
|
67
65
|
props: {
|
|
68
66
|
baseUrl: {
|
|
@@ -102,6 +100,9 @@ export default create({
|
|
|
102
100
|
params: {
|
|
103
101
|
type: Array
|
|
104
102
|
},
|
|
103
|
+
hisParams: {
|
|
104
|
+
type: Object
|
|
105
|
+
},
|
|
105
106
|
/* */
|
|
106
107
|
prevFn: {
|
|
107
108
|
type: Function,
|
|
@@ -164,10 +165,7 @@ export default create({
|
|
|
164
165
|
};
|
|
165
166
|
},
|
|
166
167
|
beforeCreate() {
|
|
167
|
-
Vue.use(Button)
|
|
168
|
-
.use(Dropdown)
|
|
169
|
-
.use(Menu)
|
|
170
|
-
.use(Icon);
|
|
168
|
+
Vue.use(Button).use(Dropdown).use(Menu).use(Icon);
|
|
171
169
|
},
|
|
172
170
|
mounted() {
|
|
173
171
|
this.isInited = false;
|
|
@@ -222,8 +220,7 @@ export default create({
|
|
|
222
220
|
httpFn = axios.create({
|
|
223
221
|
...config
|
|
224
222
|
});
|
|
225
|
-
|
|
226
|
-
let formatListResult = await this.queryFormatList();
|
|
223
|
+
const formatListResult = await this.queryFormatList();
|
|
227
224
|
if (this.versionType == 1) {
|
|
228
225
|
this.initHIS(formatListResult);
|
|
229
226
|
} else {
|
|
@@ -247,7 +244,6 @@ export default create({
|
|
|
247
244
|
this.$message.error('获取打印格式失败,请联系管理员!');
|
|
248
245
|
return this.requestError();
|
|
249
246
|
}
|
|
250
|
-
|
|
251
247
|
if (!this.currentFormatId) {
|
|
252
248
|
this.requestError();
|
|
253
249
|
return;
|
|
@@ -297,7 +293,6 @@ export default create({
|
|
|
297
293
|
const { templateNumber, authorizationKey, baseUrl, getPrintFormatByNumberUrl, versionType } = this;
|
|
298
294
|
const suffix = versionType == 1 ? `jsessionids=${vexutils.cookie.get('jsessionids') || '31e5fc0e-955f-4c89-9679-39c43d0171321636163291241'}` : `authorizationKey=${authorizationKey}`;
|
|
299
295
|
const url = `${baseUrl}${getPrintFormatByNumberUrl}?number=${templateNumber}&${suffix}`;
|
|
300
|
-
|
|
301
296
|
return httpFn
|
|
302
297
|
.get(url)
|
|
303
298
|
.then(async ({ data }) => {
|
|
@@ -439,7 +434,6 @@ export default create({
|
|
|
439
434
|
},
|
|
440
435
|
handleClickPrint(e) {
|
|
441
436
|
e.domEvent.stopPropagation();
|
|
442
|
-
|
|
443
437
|
let len = this.printParams.length;
|
|
444
438
|
const callLocalServicesSuccessCb = async data => {
|
|
445
439
|
try {
|
|
@@ -458,13 +452,29 @@ export default create({
|
|
|
458
452
|
})
|
|
459
453
|
.then(() => {
|
|
460
454
|
if (this.versionType == 1) {
|
|
461
|
-
this.
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
455
|
+
if (this.strategy === 'MULTI') {
|
|
456
|
+
for (let i = 0; i < this.params.length; i++) {
|
|
457
|
+
const params = this.getHisParams(i);
|
|
458
|
+
printInstance
|
|
459
|
+
.handleHisPrint(7, params)
|
|
460
|
+
.then(res => {
|
|
461
|
+
console.log(res, '777777777777');
|
|
462
|
+
})
|
|
463
|
+
.catch(error => {
|
|
464
|
+
console.log(error, 'error777');
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
} else {
|
|
468
|
+
const params = this.getOnceHisParams();
|
|
469
|
+
printInstance
|
|
470
|
+
.handleHisPrint(7, params)
|
|
471
|
+
.then(res => {
|
|
472
|
+
console.log(res, '777777777777');
|
|
473
|
+
})
|
|
474
|
+
.catch(error => {
|
|
475
|
+
console.log(error, 'error777');
|
|
476
|
+
});
|
|
477
|
+
}
|
|
468
478
|
} else {
|
|
469
479
|
if (this.strategy === 'MULTI') {
|
|
470
480
|
// 循环多条
|
|
@@ -497,6 +507,36 @@ export default create({
|
|
|
497
507
|
this.visible = false;
|
|
498
508
|
});
|
|
499
509
|
},
|
|
510
|
+
getHisParams(index = 0) {
|
|
511
|
+
const { templateParams, hisParams, params } = this;
|
|
512
|
+
const { reportid = '280' } = hisParams;
|
|
513
|
+
const { id, name } = templateParams;
|
|
514
|
+
return {
|
|
515
|
+
reportid,
|
|
516
|
+
formatid: id,
|
|
517
|
+
formatname: name,
|
|
518
|
+
param: params[index]
|
|
519
|
+
};
|
|
520
|
+
},
|
|
521
|
+
getOnceHisParams() {
|
|
522
|
+
const { templateParams, hisParams, params } = this;
|
|
523
|
+
const { reportid = '280' } = hisParams;
|
|
524
|
+
const { id, name } = templateParams;
|
|
525
|
+
const obj = {}
|
|
526
|
+
Object.keys(params[0]).forEach(v => {
|
|
527
|
+
obj[v] = [];
|
|
528
|
+
params.forEach(k => {
|
|
529
|
+
obj[v].push(k[v]);
|
|
530
|
+
});
|
|
531
|
+
obj[v] = obj[v].join(',');
|
|
532
|
+
});
|
|
533
|
+
return {
|
|
534
|
+
reportid,
|
|
535
|
+
formatid: id,
|
|
536
|
+
formatname: name,
|
|
537
|
+
param: obj
|
|
538
|
+
};
|
|
539
|
+
},
|
|
500
540
|
async handleClickPreview(e) {
|
|
501
541
|
e.domEvent.stopPropagation();
|
|
502
542
|
|
|
@@ -507,7 +547,9 @@ export default create({
|
|
|
507
547
|
})
|
|
508
548
|
.then(() => {
|
|
509
549
|
if (this.versionType == 1) {
|
|
510
|
-
this.
|
|
550
|
+
const params = this.strategy === 'MULTI' ? this.getHisParams() : this.getOnceHisParams();
|
|
551
|
+
printInstance
|
|
552
|
+
.handleHisPrint(8, params)
|
|
511
553
|
.then(res => {
|
|
512
554
|
console.log(res, 88888888);
|
|
513
555
|
})
|
|
@@ -544,7 +586,9 @@ export default create({
|
|
|
544
586
|
})
|
|
545
587
|
.then(() => {
|
|
546
588
|
if (this.versionType == 1) {
|
|
547
|
-
this.
|
|
589
|
+
const params = this.strategy === 'MULTI' ? this.getHisParams() : this.getOnceHisParams();
|
|
590
|
+
printInstance
|
|
591
|
+
.handleHisPrint(9, params)
|
|
548
592
|
.then(res => {
|
|
549
593
|
console.log(res, 999999);
|
|
550
594
|
})
|