xh-lab-rc 0.16.13 → 0.17.0
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/dist/LabDGTreeSelect/index.js +7 -6
- package/dist/LabDGTreeSelect/style.less +79 -77
- package/dist/LabFilePreview/index.d.ts +11 -0
- package/dist/LabFilePreview/index.js +290 -0
- package/dist/LabFilePreview/style.less +78 -0
- package/dist/LabGroupTree/index.d.ts +1 -1
- package/dist/LabGroupTree/index.js +26 -15
- package/dist/LabGroupTree/style.less +93 -104
- package/dist/LabGroupTree/typing.d.ts +1 -1
- package/dist/LabMultipleSelect/index.d.ts +18 -0
- package/dist/LabMultipleSelect/index.js +130 -0
- package/dist/LabMultipleSelect/style.less +27 -0
- package/dist/LabPdf/index.d.ts +8 -0
- package/dist/LabPdf/index.js +27 -0
- package/dist/LabPdf/style.less +10 -0
- package/dist/LabPdfPrint/index.d.ts +2 -2
- package/dist/LabPdfPrint/index.js +2 -2
- package/dist/LabPdfPrint/style.less +1 -1
- package/dist/LabPdfView/index.d.ts +1 -3
- package/dist/LabPdfView/index.js +35 -103
- package/dist/LabPdfViewMobile/index.d.ts +1 -3
- package/dist/LabPdfViewMobile/index.js +55 -99
- package/dist/LabPictureCarousel/index.d.ts +1 -0
- package/dist/LabPictureCarousel/index.js +59 -26
- package/dist/LabPictureCarousel/style.less +0 -4
- package/dist/components/Iconfont/iconfont.js +22 -23
- package/dist/components/Iconfont/index.js +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.js +6 -10
- package/dist/utils/utils.d.ts +9 -3
- package/dist/utils/utils.js +54 -3
- package/package.json +3 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
-
/*
|
|
3
|
-
* @Author: zy
|
|
4
|
-
* @Date: 2024-04-08 11:49:50
|
|
5
|
-
* @LastEditors:
|
|
6
|
-
* @LastEditTime:
|
|
7
|
-
* @Description: 科室/专业组树形下拉
|
|
2
|
+
/*
|
|
3
|
+
* @Author: zy
|
|
4
|
+
* @Date: 2024-04-08 11:49:50
|
|
5
|
+
* @LastEditors:
|
|
6
|
+
* @LastEditTime:
|
|
7
|
+
* @Description: 科室/专业组树形下拉
|
|
8
8
|
*/
|
|
9
9
|
import { Iconfont } from "../components";
|
|
10
10
|
import { TreeSelect } from 'antd';
|
|
@@ -111,6 +111,7 @@ var LabDGTreeSelect = function LabDGTreeSelect(_ref) {
|
|
|
111
111
|
onChange: handClear,
|
|
112
112
|
placeholder: placeholder,
|
|
113
113
|
treeNodeFilterProp: "title",
|
|
114
|
+
className: "lab-tree-select",
|
|
114
115
|
popupClassName: "lab-group-tree-select"
|
|
115
116
|
});
|
|
116
117
|
};
|
|
@@ -1,77 +1,79 @@
|
|
|
1
|
-
.lab-group-tree-select {
|
|
2
|
-
.ant-select-tree-list-holder-inner
|
|
3
|
-
.ant-select-tree-treenode
|
|
4
|
-
.ant-select-tree-node-content-wrapper {
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
width: 70%;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
border-radius: 0;
|
|
10
|
-
|
|
11
|
-
&:hover {
|
|
12
|
-
background: none;
|
|
13
|
-
|
|
14
|
-
.ant-select-tree-title {
|
|
15
|
-
background-color: #d0e4ff;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&.ant-select-tree-node-selected {
|
|
20
|
-
background: none;
|
|
21
|
-
|
|
22
|
-
.ant-select-tree-title {
|
|
23
|
-
background-color: #d0e4ff;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.ant-select-tree-iconEle {
|
|
28
|
-
display: flex;
|
|
29
|
-
align-items: center;
|
|
30
|
-
justify-content: center;
|
|
31
|
-
flex-shrink: 0;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.ant-select-tree-title {
|
|
35
|
-
padding: 0 4px;
|
|
36
|
-
color: #1a1b20;
|
|
37
|
-
font-size: 13px;
|
|
38
|
-
box-sizing: border-box;
|
|
39
|
-
white-space: nowrap !important;
|
|
40
|
-
overflow: hidden !important;
|
|
41
|
-
text-overflow: ellipsis !important;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.
|
|
47
|
-
height: 28px;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
1
|
+
.lab-group-tree-select {
|
|
2
|
+
.ant-select-tree-list-holder-inner
|
|
3
|
+
.ant-select-tree-treenode
|
|
4
|
+
.ant-select-tree-node-content-wrapper {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
width: 70%;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
border-radius: 0;
|
|
10
|
+
|
|
11
|
+
&:hover {
|
|
12
|
+
background: none;
|
|
13
|
+
|
|
14
|
+
.ant-select-tree-title {
|
|
15
|
+
background-color: #d0e4ff;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&.ant-select-tree-node-selected {
|
|
20
|
+
background: none;
|
|
21
|
+
|
|
22
|
+
.ant-select-tree-title {
|
|
23
|
+
background-color: #d0e4ff;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ant-select-tree-iconEle {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
flex-shrink: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.ant-select-tree-title {
|
|
35
|
+
padding: 0 4px;
|
|
36
|
+
color: #1a1b20;
|
|
37
|
+
font-size: 13px;
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
white-space: nowrap !important;
|
|
40
|
+
overflow: hidden !important;
|
|
41
|
+
text-overflow: ellipsis !important;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.lab-tree-select {
|
|
47
|
+
height: 28px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ant-select {
|
|
51
|
+
.ant-select-selector {
|
|
52
|
+
font-size: 13px;
|
|
53
|
+
border-radius: 2px;
|
|
54
|
+
|
|
55
|
+
.ant-select-selection-search {
|
|
56
|
+
inset-inline-start: 6px;
|
|
57
|
+
inset-inline-end: 26px;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ant-select-single:not(.ant-select-customize-input) {
|
|
63
|
+
.ant-select-selector {
|
|
64
|
+
padding: 0 6px;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.ant-select-dropdown {
|
|
69
|
+
border-radius: 2px;
|
|
70
|
+
|
|
71
|
+
.ant-select-tree .ant-select-tree-switcher {
|
|
72
|
+
border-radius: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ant-select-tree-switcher-icon {
|
|
76
|
+
color: #868b9c;
|
|
77
|
+
font-size: 12px;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import './style.less';
|
|
3
|
+
interface IndexProps {
|
|
4
|
+
imgList: any;
|
|
5
|
+
curImgIndex?: number;
|
|
6
|
+
fileField?: object;
|
|
7
|
+
isSwitchPreviw?: boolean;
|
|
8
|
+
getRotateAngle?: (Angle?: number, direction?: string) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const LabFilePreview: FC<IndexProps>;
|
|
11
|
+
export default LabFilePreview;
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
4
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
|
+
/*
|
|
6
|
+
* @Author: xqy
|
|
7
|
+
* @Date: 2024-04-10 11:04:12
|
|
8
|
+
* @LastEditors: xqy
|
|
9
|
+
* @LastEditTime: 2024-11-28 17:42:47
|
|
10
|
+
* @Description: 文件预览(支持pdf切换预览)
|
|
11
|
+
*/
|
|
12
|
+
import { LeftOutlined, RightOutlined, RotateLeftOutlined, RotateRightOutlined, ZoomInOutlined, ZoomOutOutlined } from '@ant-design/icons';
|
|
13
|
+
import { Divider } from 'antd';
|
|
14
|
+
import cn from 'classnames';
|
|
15
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
16
|
+
import { LabPdf } from "./..";
|
|
17
|
+
import "./style.less";
|
|
18
|
+
var LabFilePreview = function LabFilePreview(props) {
|
|
19
|
+
var _list$curIndex, _list$curIndex2, _list$curIndex3, _list$curIndex4;
|
|
20
|
+
var imgList = props.imgList,
|
|
21
|
+
_props$curImgIndex = props.curImgIndex,
|
|
22
|
+
curImgIndex = _props$curImgIndex === void 0 ? 0 : _props$curImgIndex,
|
|
23
|
+
_props$fileField = props.fileField,
|
|
24
|
+
fileField = _props$fileField === void 0 ? {
|
|
25
|
+
filePath: 'filePath',
|
|
26
|
+
fileName: 'fileName'
|
|
27
|
+
} : _props$fileField,
|
|
28
|
+
isSwitchPreviw = props.isSwitchPreviw,
|
|
29
|
+
getRotateAngle = props.getRotateAngle;
|
|
30
|
+
var _useState = useState(curImgIndex),
|
|
31
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
32
|
+
curIndex = _useState2[0],
|
|
33
|
+
setCurIndex = _useState2[1];
|
|
34
|
+
var _useState3 = useState(1),
|
|
35
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
36
|
+
scale = _useState4[0],
|
|
37
|
+
setScale = _useState4[1]; //初始缩放比例
|
|
38
|
+
var _useState5 = useState([]),
|
|
39
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
40
|
+
list = _useState6[0],
|
|
41
|
+
setList = _useState6[1]; //图片的数组
|
|
42
|
+
var _useState7 = useState(0),
|
|
43
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
44
|
+
rotatinNum = _useState8[0],
|
|
45
|
+
setRotatinNum = _useState8[1]; //旋转次数
|
|
46
|
+
var canvasRef = useRef(null);
|
|
47
|
+
|
|
48
|
+
//底部操作按钮
|
|
49
|
+
var _useState9 = useState([{
|
|
50
|
+
type: 'enlarge',
|
|
51
|
+
typeName: '放大(+)',
|
|
52
|
+
icon: /*#__PURE__*/React.createElement(ZoomInOutlined, {
|
|
53
|
+
className: "footer-icon"
|
|
54
|
+
}),
|
|
55
|
+
disabled: false,
|
|
56
|
+
disableName: '已是最大比例'
|
|
57
|
+
}, {
|
|
58
|
+
type: 'narrow',
|
|
59
|
+
typeName: '缩小(-)',
|
|
60
|
+
icon: /*#__PURE__*/React.createElement(ZoomOutOutlined, {
|
|
61
|
+
className: "footer-icon"
|
|
62
|
+
}),
|
|
63
|
+
disabled: false,
|
|
64
|
+
disableName: '已是最小比例'
|
|
65
|
+
}, {
|
|
66
|
+
type: 'turnLeft',
|
|
67
|
+
typeName: '向左旋转',
|
|
68
|
+
icon: /*#__PURE__*/React.createElement(RotateLeftOutlined, {
|
|
69
|
+
className: "footer-icon"
|
|
70
|
+
}),
|
|
71
|
+
disabled: false
|
|
72
|
+
}, {
|
|
73
|
+
type: 'turnRight',
|
|
74
|
+
typeName: '向右旋转',
|
|
75
|
+
icon: /*#__PURE__*/React.createElement(RotateRightOutlined, {
|
|
76
|
+
className: "footer-icon"
|
|
77
|
+
}),
|
|
78
|
+
disabled: false
|
|
79
|
+
}]),
|
|
80
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
81
|
+
footerBtns = _useState10[0],
|
|
82
|
+
setFooterBtns = _useState10[1];
|
|
83
|
+
|
|
84
|
+
/**鼠标滚轮实现图片的放大缩小 */
|
|
85
|
+
var handleWheel = function handleWheel(event) {
|
|
86
|
+
// event.preventDefault() //阻止默认的滚动行为,防止浏览器默认进行页面滚动
|
|
87
|
+
var scaleChange = event.deltaY > 0 ? -0.1 : 0.1;
|
|
88
|
+
//计算缩放比例,限制缩放比例在(0.5到4之间),防止过大或过小
|
|
89
|
+
var newScale = Math.min(Math.max(0.2, scale + scaleChange), 4);
|
|
90
|
+
//更新缩放的那一张比例
|
|
91
|
+
var updatedList = _toConsumableArray(list);
|
|
92
|
+
updatedList[curIndex].scale = newScale;
|
|
93
|
+
setList(updatedList);
|
|
94
|
+
setScale(newScale);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
//点击切换事件
|
|
98
|
+
var carouselClick = function carouselClick(type) {
|
|
99
|
+
setScale(1); //重置初始的缩放比例
|
|
100
|
+
setRotatinNum(0); //重置初始的缩放比例
|
|
101
|
+
if (type === 'lt') {
|
|
102
|
+
//向左切换
|
|
103
|
+
if (curIndex === 0) {
|
|
104
|
+
//当前的索引为0,获取最后一张图片
|
|
105
|
+
setCurIndex((list === null || list === void 0 ? void 0 : list.length) - 1);
|
|
106
|
+
return;
|
|
107
|
+
} else {
|
|
108
|
+
//获取上一张的图片
|
|
109
|
+
setCurIndex(curIndex - 1);
|
|
110
|
+
}
|
|
111
|
+
} else {
|
|
112
|
+
//向右切换
|
|
113
|
+
if (curIndex === (list === null || list === void 0 ? void 0 : list.length) - 1) {
|
|
114
|
+
//索引为最后一张,还切换就是切换到第一张
|
|
115
|
+
setCurIndex(0);
|
|
116
|
+
} else {
|
|
117
|
+
//获取下一张的图片
|
|
118
|
+
setCurIndex(curIndex + 1);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
//图片放大缩小
|
|
124
|
+
var toZoomInOut = function toZoomInOut(type) {
|
|
125
|
+
var ratios = type === 'enlarge' ? scale + 0.2 : scale - 0.2; //比例
|
|
126
|
+
var newScale = Math.min(Math.max(0.2, ratios), 4);
|
|
127
|
+
var updatedList = _toConsumableArray(list);
|
|
128
|
+
updatedList[curIndex].scale = newScale;
|
|
129
|
+
setList(updatedList);
|
|
130
|
+
setScale(newScale);
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
//左右旋转图片
|
|
134
|
+
var toTurnHandle = /*#__PURE__*/function () {
|
|
135
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(direction) {
|
|
136
|
+
var newRotateNum, updatedList;
|
|
137
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
138
|
+
while (1) switch (_context.prev = _context.next) {
|
|
139
|
+
case 0:
|
|
140
|
+
newRotateNum = rotatinNum;
|
|
141
|
+
if (direction === 'l') {
|
|
142
|
+
newRotateNum = rotatinNum - 1;
|
|
143
|
+
} else {
|
|
144
|
+
newRotateNum = rotatinNum + 1;
|
|
145
|
+
}
|
|
146
|
+
//更新缩放的那一张比例
|
|
147
|
+
updatedList = _toConsumableArray(list);
|
|
148
|
+
updatedList[curIndex].roteAngle = newRotateNum * 90;
|
|
149
|
+
setList(updatedList);
|
|
150
|
+
setRotatinNum(newRotateNum);
|
|
151
|
+
getRotateAngle === null || getRotateAngle === void 0 || getRotateAngle(newRotateNum * 90);
|
|
152
|
+
// //旋转之后,利用canvas生成新的图片(formData类型,供传参使用)
|
|
153
|
+
// if (isCanvasImg) {
|
|
154
|
+
// const newFiles = await labCanvasToFile(canvasRef, {
|
|
155
|
+
// ...list[curIndex],
|
|
156
|
+
// rotatinNum: newRotateNum,
|
|
157
|
+
// });
|
|
158
|
+
// getRotateImg?.(newFiles);
|
|
159
|
+
// }
|
|
160
|
+
case 7:
|
|
161
|
+
case "end":
|
|
162
|
+
return _context.stop();
|
|
163
|
+
}
|
|
164
|
+
}, _callee);
|
|
165
|
+
}));
|
|
166
|
+
return function toTurnHandle(_x) {
|
|
167
|
+
return _ref.apply(this, arguments);
|
|
168
|
+
};
|
|
169
|
+
}();
|
|
170
|
+
|
|
171
|
+
//底部按钮点击事件(enlarge - 放大,narrow - 缩小,turnLeft - 左转, turnRight - 右转)
|
|
172
|
+
var clickHandle = function clickHandle(type) {
|
|
173
|
+
switch (type) {
|
|
174
|
+
case 'enlarge':
|
|
175
|
+
toZoomInOut('enlarge');
|
|
176
|
+
break;
|
|
177
|
+
case 'narrow':
|
|
178
|
+
toZoomInOut('narrow');
|
|
179
|
+
break;
|
|
180
|
+
case 'turnLeft':
|
|
181
|
+
toTurnHandle('l');
|
|
182
|
+
break;
|
|
183
|
+
case 'turnRight':
|
|
184
|
+
toTurnHandle('r');
|
|
185
|
+
break;
|
|
186
|
+
default:
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
useEffect(function () {
|
|
191
|
+
if (Array.isArray(imgList) && imgList.length) {
|
|
192
|
+
var filePath = fileField.filePath,
|
|
193
|
+
fileName = fileField.fileName;
|
|
194
|
+
var arr = imgList.map(function (i) {
|
|
195
|
+
var _i$filePath, _i$filePath2;
|
|
196
|
+
var name = i[fileName] ? i[fileName] : (_i$filePath = i[filePath]) === null || _i$filePath === void 0 ? void 0 : _i$filePath.split('/').pop();
|
|
197
|
+
var type = (_i$filePath2 = i[filePath]) === null || _i$filePath2 === void 0 ? void 0 : _i$filePath2.substring(i[filePath].lastIndexOf('.') + 1);
|
|
198
|
+
return {
|
|
199
|
+
fileType: type === null || type === void 0 ? void 0 : type.toLowerCase(),
|
|
200
|
+
filePath: i[filePath] + '?v=' + Date.now(),
|
|
201
|
+
// 加时间戳:解决图片地址没改,造成浏览器缓存,图片不更新的问题。
|
|
202
|
+
fileName: name,
|
|
203
|
+
scale: 1,
|
|
204
|
+
roteAngle: 0
|
|
205
|
+
};
|
|
206
|
+
});
|
|
207
|
+
setList(arr);
|
|
208
|
+
}
|
|
209
|
+
}, [imgList]);
|
|
210
|
+
useEffect(function () {
|
|
211
|
+
setCurIndex(curImgIndex);
|
|
212
|
+
}, [curImgIndex]);
|
|
213
|
+
useEffect(function () {
|
|
214
|
+
var newBtns = _toConsumableArray(footerBtns);
|
|
215
|
+
if (scale <= 0.2) {
|
|
216
|
+
//最小的放大比例,缩小禁用
|
|
217
|
+
newBtns[1].disabled = true;
|
|
218
|
+
newBtns[0].disabled = false;
|
|
219
|
+
} else if (scale >= 4) {
|
|
220
|
+
//放大禁用
|
|
221
|
+
newBtns[1].disabled = false;
|
|
222
|
+
newBtns[0].disabled = true;
|
|
223
|
+
} else {
|
|
224
|
+
newBtns[1].disabled = false;
|
|
225
|
+
newBtns[0].disabled = false;
|
|
226
|
+
}
|
|
227
|
+
setFooterBtns(newBtns);
|
|
228
|
+
}, [scale]);
|
|
229
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
230
|
+
className: cn('file-preview')
|
|
231
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
232
|
+
className: "contentPart"
|
|
233
|
+
}, list[curIndex] && Object.keys(list[curIndex]).length && /*#__PURE__*/React.createElement("div", {
|
|
234
|
+
className: "contentDiv"
|
|
235
|
+
}, ((_list$curIndex = list[curIndex]) === null || _list$curIndex === void 0 ? void 0 : _list$curIndex.fileType) === 'pdf' ? /*#__PURE__*/React.createElement(LabPdf, {
|
|
236
|
+
src: list[curIndex].filePath
|
|
237
|
+
}) : /*#__PURE__*/React.createElement("img", {
|
|
238
|
+
style: {
|
|
239
|
+
maxWidth: '100%',
|
|
240
|
+
maxHeight: '100%',
|
|
241
|
+
transform: "rotate(".concat(list[curIndex].roteAngle, "deg) scale3d(").concat(list[curIndex].scale, ", ").concat(list[curIndex].scale, ", 1)"),
|
|
242
|
+
transition: 'transform 0.25s ease',
|
|
243
|
+
// 添加平滑的缩放过渡效果
|
|
244
|
+
cursor: 'grab'
|
|
245
|
+
},
|
|
246
|
+
src: (_list$curIndex2 = list[curIndex]) === null || _list$curIndex2 === void 0 ? void 0 : _list$curIndex2.filePath,
|
|
247
|
+
onWheel: handleWheel,
|
|
248
|
+
key: (_list$curIndex3 = list[curIndex]) === null || _list$curIndex3 === void 0 ? void 0 : _list$curIndex3.filePath
|
|
249
|
+
}))), ((_list$curIndex4 = list[curIndex]) === null || _list$curIndex4 === void 0 ? void 0 : _list$curIndex4.fileType) !== 'pdf' && /*#__PURE__*/React.createElement("div", {
|
|
250
|
+
className: "footer"
|
|
251
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
252
|
+
className: "operate-btn"
|
|
253
|
+
}, (imgList === null || imgList === void 0 ? void 0 : imgList.length) > 1 && isSwitchPreviw && /*#__PURE__*/React.createElement("div", {
|
|
254
|
+
className: "footer-page",
|
|
255
|
+
title: "\u4E0A\u4E00\u5F20"
|
|
256
|
+
}, /*#__PURE__*/React.createElement(LeftOutlined, {
|
|
257
|
+
className: "footer-icon",
|
|
258
|
+
onClick: function onClick() {
|
|
259
|
+
return carouselClick('lt');
|
|
260
|
+
}
|
|
261
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
262
|
+
className: "page-text"
|
|
263
|
+
}, curIndex + 1, "/", imgList === null || imgList === void 0 ? void 0 : imgList.length), /*#__PURE__*/React.createElement(RightOutlined, {
|
|
264
|
+
className: "footer-icon",
|
|
265
|
+
onClick: function onClick() {
|
|
266
|
+
return carouselClick('rt');
|
|
267
|
+
},
|
|
268
|
+
title: "\u4E0B\u4E00\u5F20"
|
|
269
|
+
})), (imgList === null || imgList === void 0 ? void 0 : imgList.length) > 1 && /*#__PURE__*/React.createElement(Divider, {
|
|
270
|
+
type: "vertical",
|
|
271
|
+
style: {
|
|
272
|
+
background: '#edf1f51a'
|
|
273
|
+
}
|
|
274
|
+
}), footerBtns.map(function (item) {
|
|
275
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
276
|
+
onClick: function onClick() {
|
|
277
|
+
return clickHandle(item.type);
|
|
278
|
+
},
|
|
279
|
+
key: item.type,
|
|
280
|
+
className: item.disabled ? 'disable-btn' : '',
|
|
281
|
+
title: item.disabled ? item.disableName : item.typeName
|
|
282
|
+
}, item.icon);
|
|
283
|
+
}))), /*#__PURE__*/React.createElement("canvas", {
|
|
284
|
+
ref: canvasRef,
|
|
285
|
+
style: {
|
|
286
|
+
display: 'none'
|
|
287
|
+
}
|
|
288
|
+
}));
|
|
289
|
+
};
|
|
290
|
+
export default LabFilePreview;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
.file-preview {
|
|
2
|
+
background-color: #0d0d0dcc;
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
margin: 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
position: relative;
|
|
8
|
+
|
|
9
|
+
.contentPart {
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
|
|
13
|
+
.contentDiv {
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
position: relative;
|
|
20
|
+
overflow: auto;
|
|
21
|
+
|
|
22
|
+
img {
|
|
23
|
+
height: 100vh;
|
|
24
|
+
position: absolute;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.pdfStyle {
|
|
28
|
+
width: 100vw;
|
|
29
|
+
height: 100vh;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.footer {
|
|
35
|
+
position: absolute;
|
|
36
|
+
bottom: 0;
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 48px;
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
background-color: rgb(21, 21, 21);
|
|
43
|
+
|
|
44
|
+
.operate-btn {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
color: #fff;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.footer-icon {
|
|
51
|
+
font-size: 18px;
|
|
52
|
+
color: #fff;
|
|
53
|
+
padding: 6px 12px;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.footer-page {
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
|
|
61
|
+
.page-text {
|
|
62
|
+
font-size: 14px;
|
|
63
|
+
padding: 0 12px;
|
|
64
|
+
margin: 0 8px;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.disable-btn {
|
|
69
|
+
.footer-icon {
|
|
70
|
+
color: #b6b9c4;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
::selection {
|
|
76
|
+
background: none;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './style.less';
|
|
3
3
|
import type { IGtreeProps } from './typing';
|
|
4
|
-
declare const LabGroupTree: ({ treeData, GBeforeIcon,
|
|
4
|
+
declare const LabGroupTree: ({ treeData, GBeforeIcon, showIcon, isShowNum, isCustomTree, treeProperties, onExpand, onSelect, childTitleNode, extraNodeProps, ...restProps }: IGtreeProps) => React.JSX.Element;
|
|
5
5
|
export default LabGroupTree;
|
|
@@ -3,15 +3,16 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
3
3
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
4
4
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
5
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
|
-
var _excluded = ["treeData", "GBeforeIcon", "
|
|
7
|
-
/*
|
|
8
|
-
* @Author: xqy
|
|
9
|
-
* @Date: 2024-03-18 16:23:10
|
|
10
|
-
* @LastEditors: xqy
|
|
11
|
-
* @LastEditTime: 2024-
|
|
12
|
-
* @Description:专业组树形
|
|
6
|
+
var _excluded = ["treeData", "GBeforeIcon", "showIcon", "isShowNum", "isCustomTree", "treeProperties", "onExpand", "onSelect", "childTitleNode", "extraNodeProps"];
|
|
7
|
+
/*
|
|
8
|
+
* @Author: xqy
|
|
9
|
+
* @Date: 2024-03-18 16:23:10
|
|
10
|
+
* @LastEditors: xqy
|
|
11
|
+
* @LastEditTime: 2024-11-22 16:11:10
|
|
12
|
+
* @Description:专业组树形
|
|
13
13
|
*/
|
|
14
14
|
import { Iconfont } from "../components";
|
|
15
|
+
import { MinusSquareOutlined, PlusSquareOutlined } from '@ant-design/icons';
|
|
15
16
|
import { Tree } from 'antd';
|
|
16
17
|
import React, { useMemo } from 'react';
|
|
17
18
|
import "./style.less";
|
|
@@ -20,11 +21,25 @@ var IconTypes = {
|
|
|
20
21
|
// 检验专业组
|
|
21
22
|
'2': 'icon-guan',
|
|
22
23
|
// 管理专业组
|
|
24
|
+
'3': 'icon-yuan',
|
|
25
|
+
// 院区
|
|
23
26
|
'4': 'icon-ke',
|
|
24
27
|
// 科室
|
|
25
28
|
'10': 'icon-lei',
|
|
26
29
|
// 公共分类
|
|
27
|
-
'11': 'icon-lei'
|
|
30
|
+
'11': 'icon-lei',
|
|
31
|
+
// 管理专业组级公共分类
|
|
32
|
+
'111': 'icon-ji',
|
|
33
|
+
// 机构实例
|
|
34
|
+
'112': 'icon-ji',
|
|
35
|
+
// 机构 (显示为'机构')
|
|
36
|
+
'113': 'icon-ke',
|
|
37
|
+
// 科室 (显示为'科室')
|
|
38
|
+
'114': 'icon-bei',
|
|
39
|
+
// 备案实验室
|
|
40
|
+
'121': 'icon-fen',
|
|
41
|
+
// 分类
|
|
42
|
+
'122': 'icon-lei' // 类型
|
|
28
43
|
};
|
|
29
44
|
var LabGroupTree = function LabGroupTree(_ref) {
|
|
30
45
|
var _ref$treeData = _ref.treeData,
|
|
@@ -39,12 +54,6 @@ var LabGroupTree = function LabGroupTree(_ref) {
|
|
|
39
54
|
}
|
|
40
55
|
});
|
|
41
56
|
} : _ref$GBeforeIcon,
|
|
42
|
-
_ref$showLine = _ref.showLine,
|
|
43
|
-
showLine = _ref$showLine === void 0 ? {
|
|
44
|
-
showLeafIcon: function showLeafIcon() {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
} : _ref$showLine,
|
|
48
57
|
_ref$showIcon = _ref.showIcon,
|
|
49
58
|
showIcon = _ref$showIcon === void 0 ? true : _ref$showIcon,
|
|
50
59
|
_ref$isShowNum = _ref.isShowNum,
|
|
@@ -182,7 +191,9 @@ var LabGroupTree = function LabGroupTree(_ref) {
|
|
|
182
191
|
width: '100%'
|
|
183
192
|
},
|
|
184
193
|
showIcon: showIcon,
|
|
185
|
-
|
|
194
|
+
switcherIcon: function switcherIcon(props) {
|
|
195
|
+
return props !== null && props !== void 0 && props.expanded ? /*#__PURE__*/React.createElement(MinusSquareOutlined, null) : /*#__PURE__*/React.createElement(PlusSquareOutlined, null);
|
|
196
|
+
},
|
|
186
197
|
titleRender: customTitle,
|
|
187
198
|
fieldNames: {
|
|
188
199
|
title: 'NAME',
|