xh-lab-rc 0.17.2 → 0.17.3
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.d.ts +2 -1
- package/dist/LabDGTreeSelect/index.js +4 -2
- package/dist/LabFilePreview/index.js +6 -6
- package/dist/LabGroupTree/index.js +6 -2
- package/dist/LabGroupTree/style.less +15 -14
- package/dist/LabGroupTree/typing.d.ts +1 -1
- package/dist/LabPdfView/index.js +1 -1
- package/dist/LabPdfViewMobile/index.js +1 -1
- package/dist/LabPictureCarousel/index.d.ts +1 -1
- package/dist/LabPictureCarousel/index.js +95 -21
- package/dist/LabPictureCarousel/style.less +10 -0
- package/dist/components/Iconfont/index.js +0 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/utils/utils.d.ts +2 -1
- package/dist/utils/utils.js +10 -1
- package/package.json +1 -1
|
@@ -9,6 +9,7 @@ interface ILabDGTreeSelectProps {
|
|
|
9
9
|
onSelect?: (value: any, node: any) => void;
|
|
10
10
|
selectDisabledProp?: string;
|
|
11
11
|
selectDisabledArr?: string[];
|
|
12
|
+
showAll?: boolean;
|
|
12
13
|
}
|
|
13
|
-
declare const LabDGTreeSelect: ({ defaultValue, placeholder, style, treeData, dropdownStyle, onSelect, selectDisabledProp, selectDisabledArr, }: ILabDGTreeSelectProps) => React.JSX.Element;
|
|
14
|
+
declare const LabDGTreeSelect: ({ defaultValue, placeholder, style, treeData, dropdownStyle, onSelect, selectDisabledProp, selectDisabledArr, showAll, }: ILabDGTreeSelectProps) => React.JSX.Element;
|
|
14
15
|
export default LabDGTreeSelect;
|
|
@@ -31,7 +31,9 @@ var LabDGTreeSelect = function LabDGTreeSelect(_ref) {
|
|
|
31
31
|
_ref$selectDisabledPr = _ref.selectDisabledProp,
|
|
32
32
|
selectDisabledProp = _ref$selectDisabledPr === void 0 ? 'NODE_TYPE' : _ref$selectDisabledPr,
|
|
33
33
|
_ref$selectDisabledAr = _ref.selectDisabledArr,
|
|
34
|
-
selectDisabledArr = _ref$selectDisabledAr === void 0 ? [] : _ref$selectDisabledAr
|
|
34
|
+
selectDisabledArr = _ref$selectDisabledAr === void 0 ? [] : _ref$selectDisabledAr,
|
|
35
|
+
_ref$showAll = _ref.showAll,
|
|
36
|
+
showAll = _ref$showAll === void 0 ? false : _ref$showAll;
|
|
35
37
|
var _useState = useState(defaultValue || undefined),
|
|
36
38
|
_useState2 = _slicedToArray(_useState, 2),
|
|
37
39
|
value = _useState2[0],
|
|
@@ -54,7 +56,7 @@ var LabDGTreeSelect = function LabDGTreeSelect(_ref) {
|
|
|
54
56
|
return data.map(function (item) {
|
|
55
57
|
// NODE_TYPE:'1'检验专业组,'2'管理专业组,'4'科室
|
|
56
58
|
// 如果子节点非科室、专业组,就清空
|
|
57
|
-
var clearChild = item.CHILDREN && item.CHILDREN.length > 0 && ['1', '2', '4'].indexOf(item.CHILDREN[0].NODE_TYPE) < 0;
|
|
59
|
+
var clearChild = !showAll && item.CHILDREN && item.CHILDREN.length > 0 && ['1', '2', '4'].indexOf(item.CHILDREN[0].NODE_TYPE) < 0;
|
|
58
60
|
var SOURCE_ID = item.SOURCE_ID,
|
|
59
61
|
NAME = item.NAME,
|
|
60
62
|
NODE_TYPE = item.NODE_TYPE,
|
|
@@ -6,7 +6,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
6
6
|
* @Author: xqy
|
|
7
7
|
* @Date: 2024-04-10 11:04:12
|
|
8
8
|
* @LastEditors: xqy
|
|
9
|
-
* @LastEditTime: 2024-
|
|
9
|
+
* @LastEditTime: 2024-12-24 10:50:48
|
|
10
10
|
* @Description: 文件预览(支持pdf切换预览)
|
|
11
11
|
*/
|
|
12
12
|
import { LeftOutlined, RightOutlined, RotateLeftOutlined, RotateRightOutlined, ZoomInOutlined, ZoomOutOutlined } from '@ant-design/icons';
|
|
@@ -98,7 +98,7 @@ var LabFilePreview = function LabFilePreview(props) {
|
|
|
98
98
|
var carouselClick = function carouselClick(type) {
|
|
99
99
|
setScale(1); //重置初始的缩放比例
|
|
100
100
|
setRotatinNum(0); //重置初始的缩放比例
|
|
101
|
-
if (type === '
|
|
101
|
+
if (type === 'l') {
|
|
102
102
|
//向左切换
|
|
103
103
|
if (curIndex === 0) {
|
|
104
104
|
//当前的索引为0,获取最后一张图片
|
|
@@ -148,7 +148,7 @@ var LabFilePreview = function LabFilePreview(props) {
|
|
|
148
148
|
updatedList[curIndex].roteAngle = newRotateNum * 90;
|
|
149
149
|
setList(updatedList);
|
|
150
150
|
setRotatinNum(newRotateNum);
|
|
151
|
-
getRotateAngle === null || getRotateAngle === void 0 || getRotateAngle(newRotateNum * 90);
|
|
151
|
+
getRotateAngle === null || getRotateAngle === void 0 || getRotateAngle(newRotateNum * 90, direction);
|
|
152
152
|
// //旋转之后,利用canvas生成新的图片(formData类型,供传参使用)
|
|
153
153
|
// if (isCanvasImg) {
|
|
154
154
|
// const newFiles = await labCanvasToFile(canvasRef, {
|
|
@@ -208,7 +208,7 @@ var LabFilePreview = function LabFilePreview(props) {
|
|
|
208
208
|
}
|
|
209
209
|
}, [imgList]);
|
|
210
210
|
useEffect(function () {
|
|
211
|
-
setCurIndex(curImgIndex);
|
|
211
|
+
setCurIndex(curImgIndex !== null && curImgIndex !== void 0 ? curImgIndex : 0);
|
|
212
212
|
}, [curImgIndex]);
|
|
213
213
|
useEffect(function () {
|
|
214
214
|
var newBtns = _toConsumableArray(footerBtns);
|
|
@@ -256,14 +256,14 @@ var LabFilePreview = function LabFilePreview(props) {
|
|
|
256
256
|
}, /*#__PURE__*/React.createElement(LeftOutlined, {
|
|
257
257
|
className: "footer-icon",
|
|
258
258
|
onClick: function onClick() {
|
|
259
|
-
return carouselClick('
|
|
259
|
+
return carouselClick('l');
|
|
260
260
|
}
|
|
261
261
|
}), /*#__PURE__*/React.createElement("span", {
|
|
262
262
|
className: "page-text"
|
|
263
263
|
}, curIndex + 1, "/", imgList === null || imgList === void 0 ? void 0 : imgList.length), /*#__PURE__*/React.createElement(RightOutlined, {
|
|
264
264
|
className: "footer-icon",
|
|
265
265
|
onClick: function onClick() {
|
|
266
|
-
return carouselClick('
|
|
266
|
+
return carouselClick('r');
|
|
267
267
|
},
|
|
268
268
|
title: "\u4E0B\u4E00\u5F20"
|
|
269
269
|
})), (imgList === null || imgList === void 0 ? void 0 : imgList.length) > 1 && /*#__PURE__*/React.createElement(Divider, {
|
|
@@ -8,7 +8,7 @@ var _excluded = ["treeData", "GBeforeIcon", "showIcon", "isShowNum", "isCustomTr
|
|
|
8
8
|
* @Author: xqy
|
|
9
9
|
* @Date: 2024-03-18 16:23:10
|
|
10
10
|
* @LastEditors: xqy
|
|
11
|
-
* @LastEditTime:
|
|
11
|
+
* @LastEditTime: 2025-01-11 10:08:02
|
|
12
12
|
* @Description:专业组树形
|
|
13
13
|
*/
|
|
14
14
|
import { Iconfont } from "../components";
|
|
@@ -64,7 +64,11 @@ var LabGroupTree = function LabGroupTree(_ref) {
|
|
|
64
64
|
className: "num"
|
|
65
65
|
}, NUM)))));
|
|
66
66
|
} else {
|
|
67
|
-
return childTitleNode === null || childTitleNode === void 0 ? void 0 : childTitleNode(nodeData)
|
|
67
|
+
return childTitleNode ? childTitleNode === null || childTitleNode === void 0 ? void 0 : childTitleNode(nodeData) : /*#__PURE__*/React.createElement("div", {
|
|
68
|
+
className: "tree-item-text tree-first"
|
|
69
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
70
|
+
className: "txt"
|
|
71
|
+
}, NAME));
|
|
68
72
|
}
|
|
69
73
|
};
|
|
70
74
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
width: 100%;
|
|
3
3
|
height: 100%;
|
|
4
4
|
background-color: #fff;
|
|
5
|
+
overflow-y: auto;
|
|
5
6
|
|
|
6
7
|
.tree-first {
|
|
7
8
|
width: calc(100% - 1rem);
|
|
@@ -22,23 +23,11 @@
|
|
|
22
23
|
font-size: 13px;
|
|
23
24
|
font-weight: normal;
|
|
24
25
|
overflow: hidden;
|
|
25
|
-
|
|
26
|
-
.txt {
|
|
27
|
-
width: 100%;
|
|
28
|
-
display: inline-block;
|
|
29
|
-
padding: 0 4px;
|
|
30
|
-
max-width: 85%;
|
|
31
|
-
height: 24px;
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
text-overflow: ellipsis;
|
|
34
|
-
white-space: nowrap;
|
|
35
|
-
box-sizing: border-box;
|
|
36
|
-
}
|
|
26
|
+
justify-content: space-between;
|
|
37
27
|
}
|
|
38
28
|
|
|
39
29
|
.sufix {
|
|
40
|
-
|
|
41
|
-
right: 0;
|
|
30
|
+
margin-right: 4px;
|
|
42
31
|
}
|
|
43
32
|
|
|
44
33
|
.num {
|
|
@@ -46,6 +35,18 @@
|
|
|
46
35
|
}
|
|
47
36
|
}
|
|
48
37
|
|
|
38
|
+
.txt {
|
|
39
|
+
width: 100%;
|
|
40
|
+
display: inline-block;
|
|
41
|
+
padding: 0 4px;
|
|
42
|
+
max-width: 85%;
|
|
43
|
+
height: 24px;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
text-overflow: ellipsis;
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
}
|
|
49
|
+
|
|
49
50
|
.ant-tree-title {
|
|
50
51
|
width: 100% !important;
|
|
51
52
|
}
|
|
@@ -15,7 +15,7 @@ export interface IGtreeProps {
|
|
|
15
15
|
showIcon?: boolean;
|
|
16
16
|
/**异步加载数据 */
|
|
17
17
|
loadData?: (node: any) => Promise<any>;
|
|
18
|
-
|
|
18
|
+
/**子节点标题自定义 */
|
|
19
19
|
childTitleNode?: (node: any) => React.ReactNode;
|
|
20
20
|
/**专业组前的图标*/
|
|
21
21
|
GBeforeIcon?: (type: string) => React.ReactNode;
|
package/dist/LabPdfView/index.js
CHANGED
|
@@ -61,7 +61,7 @@ var LabPdfView = function LabPdfView(_ref) {
|
|
|
61
61
|
}
|
|
62
62
|
// 加上书签id,和tree一致
|
|
63
63
|
function addItemId(t, j) {
|
|
64
|
-
t.forEach(function (e, i) {
|
|
64
|
+
t === null || t === void 0 || t.forEach(function (e, i) {
|
|
65
65
|
e.id = j + '-' + i;
|
|
66
66
|
if (e.items.length > 0) {
|
|
67
67
|
addItemId(e.items, e.id);
|
|
@@ -65,7 +65,7 @@ var LabPdfViewMobile = function LabPdfViewMobile(_ref) {
|
|
|
65
65
|
|
|
66
66
|
// 编排树形id
|
|
67
67
|
function addItemId(t, j) {
|
|
68
|
-
t.forEach(function (e, i) {
|
|
68
|
+
t === null || t === void 0 || t.forEach(function (e, i) {
|
|
69
69
|
e.id = j + '-' + i;
|
|
70
70
|
if (e.items.length > 0) {
|
|
71
71
|
addItemId(e.items, e.id);
|
|
@@ -7,7 +7,7 @@ interface IndexProps {
|
|
|
7
7
|
visible?: boolean;
|
|
8
8
|
isShowTitle?: boolean;
|
|
9
9
|
fileField?: object;
|
|
10
|
-
getRotateAngle?: (
|
|
10
|
+
getRotateAngle?: (direction?: string, curFile?: object) => void;
|
|
11
11
|
}
|
|
12
12
|
declare const LabPictureCarousel: FC<IndexProps>;
|
|
13
13
|
export default LabPictureCarousel;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
1
2
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
4
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
4
5
|
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-
|
|
10
|
-
* @Description:图片轮播切换组件(支持pdf切换预览)
|
|
6
|
+
/*
|
|
7
|
+
* @Author: xqy
|
|
8
|
+
* @Date: 2024-04-10 11:04:12
|
|
9
|
+
* @LastEditors: xqy
|
|
10
|
+
* @LastEditTime: 2024-12-30 10:58:58
|
|
11
|
+
* @Description:图片轮播切换组件(支持pdf切换预览)
|
|
11
12
|
*/
|
|
13
|
+
// import { throttle } from '@/utils/utils';
|
|
12
14
|
import { CloseOutlined, LeftOutlined, RightOutlined, RotateLeftOutlined, RotateRightOutlined, ZoomInOutlined, ZoomOutOutlined } from '@ant-design/icons';
|
|
13
15
|
import { Divider } from 'antd';
|
|
14
16
|
import cn from 'classnames';
|
|
@@ -49,10 +51,36 @@ var LabPictureCarousel = function LabPictureCarousel(props) {
|
|
|
49
51
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
50
52
|
rotatinNum = _useState10[0],
|
|
51
53
|
setRotatinNum = _useState10[1]; //旋转次数
|
|
54
|
+
var _useState11 = useState(false),
|
|
55
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
56
|
+
dragging = _useState12[0],
|
|
57
|
+
setDragging = _useState12[1]; //拖拽状态
|
|
58
|
+
var _useState13 = useState({
|
|
59
|
+
left: 'auto',
|
|
60
|
+
top: 'auto'
|
|
61
|
+
}),
|
|
62
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
63
|
+
position = _useState14[0],
|
|
64
|
+
setPosition = _useState14[1]; // 用于存储图片位置的状态
|
|
65
|
+
var _useState15 = useState({
|
|
66
|
+
left: 0,
|
|
67
|
+
top: 0
|
|
68
|
+
}),
|
|
69
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
70
|
+
initialPosition = _useState16[0],
|
|
71
|
+
setInitialPosition = _useState16[1]; //(被点击元素相对于页面偏移量))
|
|
72
|
+
var _useState17 = useState({
|
|
73
|
+
x: 0,
|
|
74
|
+
y: 0
|
|
75
|
+
}),
|
|
76
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
77
|
+
initialMousePosition = _useState18[0],
|
|
78
|
+
setInitialMousePosition = _useState18[1]; //鼠标按下的坐标
|
|
79
|
+
|
|
52
80
|
var canvasRef = useRef(null);
|
|
53
81
|
|
|
54
82
|
//底部操作按钮
|
|
55
|
-
var
|
|
83
|
+
var _useState19 = useState([{
|
|
56
84
|
type: 'enlarge',
|
|
57
85
|
typeName: '放大(+)',
|
|
58
86
|
icon: /*#__PURE__*/React.createElement(ZoomInOutlined, {
|
|
@@ -83,13 +111,12 @@ var LabPictureCarousel = function LabPictureCarousel(props) {
|
|
|
83
111
|
}),
|
|
84
112
|
disabled: false
|
|
85
113
|
}]),
|
|
86
|
-
|
|
87
|
-
footerBtns =
|
|
88
|
-
setFooterBtns =
|
|
114
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
115
|
+
footerBtns = _useState20[0],
|
|
116
|
+
setFooterBtns = _useState20[1];
|
|
89
117
|
|
|
90
118
|
/**鼠标滚轮实现图片的放大缩小 */
|
|
91
119
|
var handleWheel = function handleWheel(event) {
|
|
92
|
-
// event.preventDefault() //阻止默认的滚动行为,防止浏览器默认进行页面滚动
|
|
93
120
|
var scaleChange = event.deltaY > 0 ? -0.1 : 0.1;
|
|
94
121
|
//计算缩放比例,限制缩放比例在(0.5到4之间),防止过大或过小
|
|
95
122
|
var newScale = Math.min(Math.max(0.2, scale + scaleChange), 4);
|
|
@@ -169,7 +196,8 @@ var LabPictureCarousel = function LabPictureCarousel(props) {
|
|
|
169
196
|
updatedList[curIndex].roteAngle = newRotateNum * 90;
|
|
170
197
|
setList(updatedList);
|
|
171
198
|
setRotatinNum(newRotateNum);
|
|
172
|
-
|
|
199
|
+
console.log('updatedList', updatedList[curIndex], curIndex);
|
|
200
|
+
getRotateAngle === null || getRotateAngle === void 0 || getRotateAngle(direction, updatedList[curIndex]);
|
|
173
201
|
//旋转之后,利用canvas生成新的图片(formData类型,供传参使用)
|
|
174
202
|
// if (isCanvasImg) {
|
|
175
203
|
// const newFiles = await labCanvasToFile(canvasRef, {
|
|
@@ -178,7 +206,7 @@ var LabPictureCarousel = function LabPictureCarousel(props) {
|
|
|
178
206
|
// });
|
|
179
207
|
// getRotateImg?.(newFiles);
|
|
180
208
|
// }
|
|
181
|
-
case
|
|
209
|
+
case 8:
|
|
182
210
|
case "end":
|
|
183
211
|
return _context.stop();
|
|
184
212
|
}
|
|
@@ -189,6 +217,44 @@ var LabPictureCarousel = function LabPictureCarousel(props) {
|
|
|
189
217
|
};
|
|
190
218
|
}();
|
|
191
219
|
|
|
220
|
+
//图片拖拽(鼠标按下,开始拖拽)
|
|
221
|
+
var handleMouseDown = function handleMouseDown(event) {
|
|
222
|
+
event.preventDefault();
|
|
223
|
+
setDragging(true);
|
|
224
|
+
// 鼠标按下开始坐标
|
|
225
|
+
setInitialMousePosition({
|
|
226
|
+
x: event.clientX,
|
|
227
|
+
y: event.clientY
|
|
228
|
+
});
|
|
229
|
+
//被点击元素相对于页面的偏移量
|
|
230
|
+
setInitialPosition({
|
|
231
|
+
left: event.currentTarget.offsetLeft,
|
|
232
|
+
top: event.currentTarget.offsetTop
|
|
233
|
+
});
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
//图片拖拽(拖拽移动中)
|
|
237
|
+
var handleMouseMove = function handleMouseMove(event) {
|
|
238
|
+
if (dragging) {
|
|
239
|
+
//计算拖拽移动距离
|
|
240
|
+
var dx = event.clientX - initialMousePosition.x;
|
|
241
|
+
var dy = event.clientY - initialMousePosition.y;
|
|
242
|
+
setPosition({
|
|
243
|
+
left: "".concat(initialPosition.left + dx, "px"),
|
|
244
|
+
top: "".concat(initialPosition.top + dy, "px")
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
// 图片拖拽(鼠标松开,结束拖拽)
|
|
250
|
+
var handleMouseUp = function handleMouseUp() {
|
|
251
|
+
setDragging(false);
|
|
252
|
+
setPosition({
|
|
253
|
+
left: 'auto',
|
|
254
|
+
top: 'auto'
|
|
255
|
+
});
|
|
256
|
+
};
|
|
257
|
+
|
|
192
258
|
//底部按钮点击事件(enlarge - 放大,narrow - 缩小,turnLeft - 左转, turnRight - 右转)
|
|
193
259
|
var clickHandle = function clickHandle(type) {
|
|
194
260
|
switch (type) {
|
|
@@ -217,14 +283,14 @@ var LabPictureCarousel = function LabPictureCarousel(props) {
|
|
|
217
283
|
var _i$filePath, _i$filePath2;
|
|
218
284
|
var name = i[fileName] ? i[fileName] : (_i$filePath = i[filePath]) === null || _i$filePath === void 0 ? void 0 : _i$filePath.split('/').pop();
|
|
219
285
|
var type = (_i$filePath2 = i[filePath]) === null || _i$filePath2 === void 0 ? void 0 : _i$filePath2.substring(i[filePath].lastIndexOf('.') + 1);
|
|
220
|
-
return {
|
|
286
|
+
return _objectSpread(_objectSpread({}, i), {}, {
|
|
221
287
|
fileType: type === null || type === void 0 ? void 0 : type.toLowerCase(),
|
|
222
288
|
filePath: i[filePath] + '?v=' + Date.now(),
|
|
223
289
|
// 加时间戳:解决图片地址没改,造成浏览器缓存,图片不更新的问题。
|
|
224
290
|
fileName: name,
|
|
225
291
|
scale: 1,
|
|
226
292
|
roteAngle: 0
|
|
227
|
-
};
|
|
293
|
+
});
|
|
228
294
|
});
|
|
229
295
|
setList(arr);
|
|
230
296
|
|
|
@@ -285,19 +351,27 @@ var LabPictureCarousel = function LabPictureCarousel(props) {
|
|
|
285
351
|
className: cn('imgContainer', list[curIndex].fileType === 'pdf' && 'pdfStyle')
|
|
286
352
|
}, list[curIndex].fileType === 'pdf' ? /*#__PURE__*/React.createElement(LabPdf, {
|
|
287
353
|
src: list[curIndex].filePath
|
|
288
|
-
}) : /*#__PURE__*/React.createElement("
|
|
354
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
355
|
+
className: "img-part"
|
|
356
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
289
357
|
style: {
|
|
290
358
|
maxWidth: '100%',
|
|
291
359
|
maxHeight: '100%',
|
|
292
|
-
transform: "rotate(".concat(list[curIndex].roteAngle, "deg) scale3d(").concat(list[curIndex].scale, ", ").concat(list[curIndex].scale, ", 1)"),
|
|
293
|
-
transition: 'transform 0.
|
|
360
|
+
transform: "rotate(".concat(list[curIndex].roteAngle, "deg) \n scale3d(").concat(list[curIndex].scale, ", ").concat(list[curIndex].scale, ", 1)"),
|
|
361
|
+
transition: 'transform ease-in-out 0.2s',
|
|
294
362
|
// 添加平滑的缩放过渡效果
|
|
295
|
-
cursor: 'grab'
|
|
363
|
+
cursor: dragging ? 'grabbing' : 'grab',
|
|
364
|
+
position: 'absolute',
|
|
365
|
+
left: "".concat(position === null || position === void 0 ? void 0 : position.left),
|
|
366
|
+
top: "".concat(position === null || position === void 0 ? void 0 : position.top)
|
|
296
367
|
},
|
|
297
368
|
src: list[curIndex].filePath,
|
|
298
369
|
onWheel: handleWheel,
|
|
299
|
-
key: list[curIndex].filePath
|
|
300
|
-
|
|
370
|
+
key: list[curIndex].filePath,
|
|
371
|
+
onMouseDown: handleMouseDown,
|
|
372
|
+
onMouseMove: handleMouseMove,
|
|
373
|
+
onMouseUp: handleMouseUp
|
|
374
|
+
})))), list.length > 1 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
301
375
|
onClick: function onClick() {
|
|
302
376
|
return carouselClick('lt');
|
|
303
377
|
},
|
|
@@ -64,6 +64,16 @@
|
|
|
64
64
|
align-items: center;
|
|
65
65
|
justify-content: center;
|
|
66
66
|
height: 100%;
|
|
67
|
+
width: 100%;
|
|
68
|
+
|
|
69
|
+
.img-part {
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: 100%;
|
|
72
|
+
position: relative;
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
}
|
|
67
77
|
|
|
68
78
|
img {
|
|
69
79
|
height: 100vh;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: xqy
|
|
3
|
-
* @Date: 2024-04-01 14:07:41
|
|
4
|
-
* @LastEditors: xqy
|
|
5
|
-
* @LastEditTime: 2024-12-12 09:57:48
|
|
6
|
-
* @Description:
|
|
7
|
-
*/
|
|
8
1
|
import { createFromIconfontCN } from '@ant-design/icons';
|
|
9
2
|
var ICONFONT_URL = '//at.alicdn.com/t/c/font_4487114_sryj061ptfs.js';
|
|
10
3
|
// 生产环境使用本地的iconfont.js,开发环境使用线上环境以方便开发
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export { default as LabAltimeter } from './LabAltimeter';
|
|
2
2
|
export { default as LabDGTreeSelect } from './LabDGTreeSelect';
|
|
3
3
|
export { default as LabFilePreview } from './LabFilePreview';
|
|
4
|
-
export { default as LabGTreeSelect } from './LabGTreeSelect';
|
|
5
4
|
export { default as LabGroupTree } from './LabGroupTree';
|
|
6
5
|
export * from './LabGroupTree/typing';
|
|
6
|
+
export { default as LabGTreeSelect } from './LabGTreeSelect';
|
|
7
7
|
export { default as LabMultipleSelect } from './LabMultipleSelect';
|
|
8
|
-
export { default as LabPSwitchPreview } from './LabPSwitchPreview';
|
|
9
8
|
export { default as LabPdf } from './LabPdf';
|
|
10
9
|
export { default as LabPdfPrint } from './LabPdfPrint';
|
|
11
10
|
export { default as LabPdfView } from './LabPdfView';
|
|
12
11
|
export { default as LabPdfViewMobile } from './LabPdfViewMobile';
|
|
13
12
|
export { default as LabPictureCarousel } from './LabPictureCarousel';
|
|
13
|
+
export { default as LabPSwitchPreview } from './LabPSwitchPreview';
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export { default as LabAltimeter } from "./LabAltimeter";
|
|
2
2
|
export { default as LabDGTreeSelect } from "./LabDGTreeSelect";
|
|
3
3
|
export { default as LabFilePreview } from "./LabFilePreview";
|
|
4
|
-
export { default as LabGTreeSelect } from "./LabGTreeSelect";
|
|
5
4
|
export { default as LabGroupTree } from "./LabGroupTree";
|
|
6
5
|
export * from "./LabGroupTree/typing";
|
|
6
|
+
export { default as LabGTreeSelect } from "./LabGTreeSelect";
|
|
7
7
|
export { default as LabMultipleSelect } from "./LabMultipleSelect";
|
|
8
|
-
export { default as LabPSwitchPreview } from "./LabPSwitchPreview";
|
|
9
8
|
export { default as LabPdf } from "./LabPdf";
|
|
10
9
|
export { default as LabPdfPrint } from "./LabPdfPrint";
|
|
11
10
|
export { default as LabPdfView } from "./LabPdfView";
|
|
12
11
|
export { default as LabPdfViewMobile } from "./LabPdfViewMobile";
|
|
13
|
-
export { default as LabPictureCarousel } from "./LabPictureCarousel";
|
|
12
|
+
export { default as LabPictureCarousel } from "./LabPictureCarousel";
|
|
13
|
+
export { default as LabPSwitchPreview } from "./LabPSwitchPreview";
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -23,4 +23,5 @@ declare function stringToByte(str: any): any[];
|
|
|
23
23
|
* @param files //原图片信息
|
|
24
24
|
*/
|
|
25
25
|
declare const labCanvasToFile: (canvasRef: any, files: any) => Promise<unknown>;
|
|
26
|
-
|
|
26
|
+
declare const treeToArray: (tree: any) => any;
|
|
27
|
+
export { LabBase64ToFile, Uint8ArrayToString, byteToString, formatDate, labCanvasToFile, stringToByte, treeToArray, };
|
package/dist/utils/utils.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
+
var _excluded = ["CHILDREN"];
|
|
1
3
|
import { message } from 'antd';
|
|
2
4
|
|
|
3
5
|
/**
|
|
@@ -145,4 +147,11 @@ var labCanvasToFile = function labCanvasToFile(canvasRef, files) {
|
|
|
145
147
|
};
|
|
146
148
|
});
|
|
147
149
|
};
|
|
148
|
-
|
|
150
|
+
var treeToArray = function treeToArray(tree) {
|
|
151
|
+
return tree.reduce(function (res, item) {
|
|
152
|
+
var CHILDREN = item.CHILDREN,
|
|
153
|
+
i = _objectWithoutProperties(item, _excluded);
|
|
154
|
+
return res.concat(i, CHILDREN && CHILDREN.length ? treeToArray(CHILDREN) : []);
|
|
155
|
+
}, []);
|
|
156
|
+
};
|
|
157
|
+
export { LabBase64ToFile, Uint8ArrayToString, byteToString, formatDate, labCanvasToFile, stringToByte, treeToArray };
|