kfb-view 3.0.5 → 3.0.7

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.
@@ -39,11 +39,11 @@
39
39
  </select>
40
40
  </component>
41
41
  <component name="ChangeListManager">
42
- <list default="true" id="55024232-8108-4dc9-9bd3-0fd2aa2f34f8" name="Default Changelist" comment="build:3.0.1">
42
+ <list default="true" id="55024232-8108-4dc9-9bd3-0fd2aa2f34f8" name="Default Changelist" comment="">
43
43
  <change beforePath="$PROJECT_DIR$/config/webpack.dev.conf.js" beforeDir="false" afterPath="$PROJECT_DIR$/config/webpack.dev.conf.js" afterDir="false" />
44
44
  <change beforePath="$PROJECT_DIR$/example/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/example/index.js" afterDir="false" />
45
45
  <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
46
- <change beforePath="$PROJECT_DIR$/src/components/tailoring/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/tailoring/index.js" afterDir="false" />
46
+ <change beforePath="$PROJECT_DIR$/src/view.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/view.js" afterDir="false" />
47
47
  </list>
48
48
  <option name="SHOW_DIALOG" value="false" />
49
49
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -62,7 +62,7 @@
62
62
  <component name="Git.Settings">
63
63
  <option name="RECENT_BRANCH_BY_REPOSITORY">
64
64
  <map>
65
- <entry key="$PROJECT_DIR$" value="release/1.7.36" />
65
+ <entry key="$PROJECT_DIR$" value="release/2.4.2" />
66
66
  </map>
67
67
  </option>
68
68
  <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
@@ -70,6 +70,29 @@
70
70
  </component>
71
71
  <component name="GitToolBoxStore">
72
72
  <option name="projectConfigVersion" value="5" />
73
+ <option name="recentBranches">
74
+ <RecentBranches>
75
+ <option name="branchesForRepo">
76
+ <list>
77
+ <RecentBranchesForRepo>
78
+ <option name="branches">
79
+ <list>
80
+ <RecentBranch>
81
+ <option name="branchName" value="master" />
82
+ <option name="lastUsedInstant" value="1680964701" />
83
+ </RecentBranch>
84
+ <RecentBranch>
85
+ <option name="branchName" value="release/2.4.2" />
86
+ <option name="lastUsedInstant" value="1680859509" />
87
+ </RecentBranch>
88
+ </list>
89
+ </option>
90
+ <option name="repositoryRootUrl" value="file://$PROJECT_DIR$" />
91
+ </RecentBranchesForRepo>
92
+ </list>
93
+ </option>
94
+ </RecentBranches>
95
+ </option>
73
96
  </component>
74
97
  <component name="MarkdownSettingsMigration">
75
98
  <option name="stateVersion" value="1" />
@@ -114,7 +137,7 @@
114
137
  <recent name="$PROJECT_DIR$/src/tool" />
115
138
  </key>
116
139
  </component>
117
- <component name="RunManager" selected="npm.build:lib">
140
+ <component name="RunManager" selected="npm.server:hot">
118
141
  <configuration name="build:lib" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
119
142
  <package-json value="$PROJECT_DIR$/package.json" />
120
143
  <command value="run" />
@@ -177,11 +200,11 @@
177
200
  </list>
178
201
  <recent_temporary>
179
202
  <list>
180
- <item itemvalue="npm.build:lib" />
181
203
  <item itemvalue="npm.server:hot" />
182
- <item itemvalue="npm.server" />
183
204
  <item itemvalue="npm.clean:lib" />
205
+ <item itemvalue="npm.server" />
184
206
  <item itemvalue="npm.build:prod" />
207
+ <item itemvalue="npm.build:lib" />
185
208
  </list>
186
209
  </recent_temporary>
187
210
  </component>
@@ -421,35 +444,10 @@
421
444
  <workItem from="1680740253103" duration="572000" />
422
445
  <workItem from="1680746491709" duration="597000" />
423
446
  <workItem from="1680750141486" duration="416000" />
424
- <workItem from="1680834237716" duration="1402000" />
425
- </task>
426
- <task id="LOCAL-00078" summary="键盘事件更新,delete可删除曲线标注点,双击可添加曲线标注点">
427
- <created>1657607397044</created>
428
- <option name="number" value="00078" />
429
- <option name="presentableId" value="LOCAL-00078" />
430
- <option name="project" value="LOCAL" />
431
- <updated>1657607397044</updated>
432
- </task>
433
- <task id="LOCAL-00079" summary="2.20.0">
434
- <created>1657607434015</created>
435
- <option name="number" value="00079" />
436
- <option name="presentableId" value="LOCAL-00079" />
437
- <option name="project" value="LOCAL" />
438
- <updated>1657607434015</updated>
439
- </task>
440
- <task id="LOCAL-00080" summary="2.2.0">
441
- <created>1657607449348</created>
442
- <option name="number" value="00080" />
443
- <option name="presentableId" value="LOCAL-00080" />
444
- <option name="project" value="LOCAL" />
445
- <updated>1657607449348</updated>
446
- </task>
447
- <task id="LOCAL-00081" summary="加载速度优化">
448
- <created>1657612318446</created>
449
- <option name="number" value="00081" />
450
- <option name="presentableId" value="LOCAL-00081" />
451
- <option name="project" value="LOCAL" />
452
- <updated>1657612318447</updated>
447
+ <workItem from="1680834237716" duration="2982000" />
448
+ <workItem from="1680858434486" duration="1348000" />
449
+ <workItem from="1680861296669" duration="2435000" />
450
+ <workItem from="1681268502306" duration="3044000" />
453
451
  </task>
454
452
  <task id="LOCAL-00082" summary="2.2.1">
455
453
  <created>1657612343466</created>
@@ -766,7 +764,35 @@
766
764
  <option name="project" value="LOCAL" />
767
765
  <updated>1680528157819</updated>
768
766
  </task>
769
- <option name="localTasksCounter" value="127" />
767
+ <task id="LOCAL-00127" summary="build:3.0.5 截图记录位置信息">
768
+ <created>1680847205108</created>
769
+ <option name="number" value="00127" />
770
+ <option name="presentableId" value="LOCAL-00127" />
771
+ <option name="project" value="LOCAL" />
772
+ <updated>1680847205108</updated>
773
+ </task>
774
+ <task id="LOCAL-00128" summary="build:3.0.6 修复填充图形绘制时显示异常">
775
+ <created>1680859251199</created>
776
+ <option name="number" value="00128" />
777
+ <option name="presentableId" value="LOCAL-00128" />
778
+ <option name="project" value="LOCAL" />
779
+ <updated>1680859251199</updated>
780
+ </task>
781
+ <task id="LOCAL-00129" summary="build:3.0.6 填充图形绘制时,内容偏移">
782
+ <created>1680859385125</created>
783
+ <option name="number" value="00129" />
784
+ <option name="presentableId" value="LOCAL-00129" />
785
+ <option name="project" value="LOCAL" />
786
+ <updated>1680859385125</updated>
787
+ </task>
788
+ <task id="LOCAL-00130" summary="build:2.4.2, 填充图形绘制时偏移">
789
+ <created>1680859536589</created>
790
+ <option name="number" value="00130" />
791
+ <option name="presentableId" value="LOCAL-00130" />
792
+ <option name="project" value="LOCAL" />
793
+ <updated>1680859536589</updated>
794
+ </task>
795
+ <option name="localTasksCounter" value="131" />
770
796
  <servers />
771
797
  </component>
772
798
  <component name="TypeScriptGeneratedFilesManager">
@@ -794,7 +820,7 @@
794
820
  <entry key="branch">
795
821
  <value>
796
822
  <list>
797
- <option value="master" />
823
+ <option value="release/2.4.2" />
798
824
  </list>
799
825
  </value>
800
826
  </entry>
@@ -809,10 +835,6 @@
809
835
  <component name="VcsManagerConfiguration">
810
836
  <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
811
837
  <option name="LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN" value="false" />
812
- <MESSAGE value="矩形移动点默认隐藏,悬浮显示" />
813
- <MESSAGE value="label.model.js" />
814
- <MESSAGE value="解决反向绘制时,标注信息显示错误" />
815
- <MESSAGE value="2.3.1" />
816
838
  <MESSAGE value="优化渲染速度" />
817
839
  <MESSAGE value="2.3.2" />
818
840
  <MESSAGE value="优化速度" />
@@ -834,7 +856,11 @@
834
856
  <MESSAGE value="build:3.0.2 截图图片格式自定义" />
835
857
  <MESSAGE value="build:3.0.3 截图支持设置分辨率,质量,格式" />
836
858
  <MESSAGE value="build:3.0.3导航图宽高限制" />
837
- <option name="LAST_COMMIT_MESSAGE" value="build:3.0.3导航图宽高限制" />
859
+ <MESSAGE value="build:3.0.5 截图记录位置信息" />
860
+ <MESSAGE value="build:3.0.6 修复填充图形绘制时显示异常" />
861
+ <MESSAGE value="build:3.0.6 填充图形绘制时,内容偏移" />
862
+ <MESSAGE value="build:2.4.2, 填充图形绘制时偏移" />
863
+ <option name="LAST_COMMIT_MESSAGE" value="build:2.4.2, 填充图形绘制时偏移" />
838
864
  <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
839
865
  </component>
840
866
  <component name="XSLT-Support.FileAssociations.UIState">
@@ -3,7 +3,7 @@ const webpackMerge = require('webpack-merge');
3
3
  const baseWebpackConfig = require('./webpack.base.conf');
4
4
  const METADATA = webpackMerge(baseWebpackConfig().metadata, {
5
5
  host: '0.0.0.0',
6
- port: 3101,
6
+ port: 3001,
7
7
  });
8
8
 
9
9
  process.env.NODE_ENV = process.env.NODE_ENV ?
@@ -66,11 +66,11 @@ module.exports = function() {
66
66
  // target: 'http://gastric.label.hzztai.com/',
67
67
  // target: 'http://192.168.1.91:7007',
68
68
  // target: 'http://192.168.1.91',
69
- target: 'http://192.168.1.22',
70
- // target: 'https://vai.hzztai.com',
69
+ // target: 'http://192.168.1.16',
71
70
  // target: 'https://tct.hzztai.com',
72
71
  // target: 'https://pis-ningbo.hzztai.com',
73
72
  // target: 'https://pis-test.hzztai.com',
73
+ target: 'https://telepathology.adicon.com.cn',
74
74
  secure: false,
75
75
  changeOrigin: true,
76
76
  },
package/example/index.js CHANGED
@@ -25,7 +25,7 @@ deleteEmptyImg.src = deleteEmptySvg;
25
25
  const hasAuditImg = new Image();
26
26
  hasAuditImg.src = hasAuditSvg;
27
27
 
28
- const fileName = 'uploads/TCT/已入库/guangzhou_fuer_hospital/pos/labeling/LSIL/MY22004_other_2022-08-22_LSIL_切片2.kfb';
28
+ const fileName = '/data/ftp/950/22/slides/B20230069032023-03-12_16_41_56.kfb';
29
29
 
30
30
  const instance = axios.create({
31
31
  baseURL: '/api',
@@ -48,7 +48,7 @@ const debounce = (func, delay) => {
48
48
  };
49
49
  };
50
50
 
51
- instance.get(`/process/info?file=${fileName}`).then(({data}) => {
51
+ instance.get(`/common/kfb/info?file=${fileName}`).then(({data}) => {
52
52
  let params = {};
53
53
  params.file = fileName;
54
54
  data = data.data;
@@ -69,18 +69,15 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
69
69
  bottom: 10,
70
70
  },
71
71
  navigator: {
72
- thumbnail: `/api/process/getImage?file=${fileName}&type=thumbnail`,
73
- style: 'left: 0;bottom: 0',
74
- width: 300,
75
- height: 300,
72
+ disabled: false,
73
+ style: 'right: 0;top: 0',
74
+ thumbnail: `/api/slide/getImage?file=${fileName}&type=thumbnail`,
75
+ scale: data.scanScale,
76
76
  },
77
77
  pxConversion: {
78
78
  unit: 'um',
79
79
  imageCapRes: data.imageCapRes || 1,
80
80
  },
81
- tailoring: {
82
- suffix: 'png',
83
- },
84
81
  grid: {
85
82
  show: false,
86
83
  ruler: false,
@@ -399,24 +396,16 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
399
396
  });
400
397
  const {width, height} = kv.$options;
401
398
  kv.$on(KfbView.events.EVENT_TAILORING_SCREENSHOT, (e) => {
402
- const blob = dataURLtoBlob(e.detail);
403
- if (window.ClipboardItem && navigator?.clipboard) {
404
- navigator.clipboard.write([
405
- new window.ClipboardItem({
406
- [blob.type]: blob,
407
- }),
408
- ]);
409
- }
399
+ console.log(e.detail);
410
400
  });
411
-
412
- kv.tailoring.init(
413
- {
414
- left: 0,
415
- top: 0,
416
- height: 900,
417
- width: 1600,
418
- color: '#F00',
419
- });
401
+ /* kv.tailoring.init(
402
+ {
403
+ left: width / 2 - 100,
404
+ top: height / 2 - 100,
405
+ height: 200,
406
+ width: 200,
407
+ color: '#F00',
408
+ });*/
420
409
  setTimeout(() => {
421
410
  // kv.destroy();
422
411
  setTimeout(() => {
@@ -461,15 +450,6 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
461
450
  document.querySelector('#g').value = 0;
462
451
  document.querySelector('#b').value = 0;
463
452
  kv.viewer.forceRedraw();
464
- /* const { width, height } = kv.$options;
465
- kv.tailoring.init(
466
- {
467
- left: width / 2 - 100,
468
- top: height / 2 - 100,
469
- height: 200,
470
- width: 200,
471
- color: '#ff0000',
472
- });*/
473
453
  });
474
454
 
475
455
  /*
@@ -550,18 +530,6 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
550
530
  });*/
551
531
  });
552
532
 
553
- function dataURLtoBlob(dataurl) {
554
- const arr = dataurl.split(',');
555
- const mime = arr[0].match(/:(.*?);/)[1];
556
- const bstr = atob(arr[1]);
557
- let n = bstr.length;
558
- const u8arr = new Uint8Array(n);
559
- while (n--) {
560
- u8arr[n] = bstr.charCodeAt(n);
561
- }
562
- return new Blob([u8arr], {type: mime});
563
- }
564
-
565
533
  /**
566
534
  * 解析参数,生成对应的请求参数字符串
567
535
  * @param {Object} data