kfb-view 2.4.1 → 2.4.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.
@@ -39,9 +39,7 @@
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="截图区域范围数值保留2位小数">
43
- <change beforePath="$PROJECT_DIR$/config/webpack.dev.conf.js" beforeDir="false" afterPath="$PROJECT_DIR$/config/webpack.dev.conf.js" afterDir="false" />
44
- <change beforePath="$PROJECT_DIR$/example/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/example/index.js" afterDir="false" />
42
+ <list default="true" id="55024232-8108-4dc9-9bd3-0fd2aa2f34f8" name="Default Changelist" comment="">
45
43
  <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
46
44
  </list>
47
45
  <option name="SHOW_DIALOG" value="false" />
@@ -61,7 +59,7 @@
61
59
  <component name="Git.Settings">
62
60
  <option name="RECENT_BRANCH_BY_REPOSITORY">
63
61
  <map>
64
- <entry key="$PROJECT_DIR$" value="release/1.7.36" />
62
+ <entry key="$PROJECT_DIR$" value="master" />
65
63
  </map>
66
64
  </option>
67
65
  <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
@@ -69,6 +67,29 @@
69
67
  </component>
70
68
  <component name="GitToolBoxStore">
71
69
  <option name="projectConfigVersion" value="5" />
70
+ <option name="recentBranches">
71
+ <RecentBranches>
72
+ <option name="branchesForRepo">
73
+ <list>
74
+ <RecentBranchesForRepo>
75
+ <option name="branches">
76
+ <list>
77
+ <RecentBranch>
78
+ <option name="branchName" value="release/2.4.2" />
79
+ <option name="lastUsedInstant" value="1680859509" />
80
+ </RecentBranch>
81
+ <RecentBranch>
82
+ <option name="branchName" value="master" />
83
+ <option name="lastUsedInstant" value="1680859508" />
84
+ </RecentBranch>
85
+ </list>
86
+ </option>
87
+ <option name="repositoryRootUrl" value="file://$PROJECT_DIR$" />
88
+ </RecentBranchesForRepo>
89
+ </list>
90
+ </option>
91
+ </RecentBranches>
92
+ </option>
72
93
  </component>
73
94
  <component name="MarkdownSettingsMigration">
74
95
  <option name="stateVersion" value="1" />
@@ -78,31 +99,32 @@
78
99
  <option name="hideEmptyMiddlePackages" value="true" />
79
100
  <option name="showLibraryContents" value="true" />
80
101
  </component>
81
- <component name="PropertiesComponent"><![CDATA[{
82
- "keyToString": {
83
- "DefaultHtmlFileTemplate": "HTML File",
84
- "Project.color": "4c401d",
85
- "WebServerToolWindowFactoryState": "false",
86
- "dart.analysis.tool.window.visible": "false",
87
- "last_opened_file_path": "/home/fanqifeng/WebstormProjects/kfb-view",
88
- "node.js.detected.package.eslint": "true",
89
- "node.js.detected.package.tslint": "true",
90
- "node.js.selected.package.eslint": "(autodetect)",
91
- "node.js.selected.package.tslint": "(autodetect)",
92
- "nodejs_interpreter_path": "/home/fanqifeng/.nvm/versions/node/v10.15.1/bin/node",
93
- "nodejs_package_manager_path": "npm",
94
- "settings.editor.selected.configurable": "settings.nodejs",
95
- "ts.external.directory.path": "/opt/WebStorm/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external",
96
- "vue.rearranger.settings.migration": "true"
102
+ <component name="PropertiesComponent">{
103
+ &quot;keyToString&quot;: {
104
+ &quot;DefaultHtmlFileTemplate&quot;: &quot;HTML File&quot;,
105
+ &quot;Project.color&quot;: &quot;4c401d&quot;,
106
+ &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
107
+ &quot;dart.analysis.tool.window.visible&quot;: &quot;false&quot;,
108
+ &quot;git-widget-placeholder&quot;: &quot;release/2.4.2&quot;,
109
+ &quot;last_opened_file_path&quot;: &quot;/home/fanqifeng/WebstormProjects/kfb-view&quot;,
110
+ &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
111
+ &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
112
+ &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
113
+ &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
114
+ &quot;nodejs_interpreter_path&quot;: &quot;/home/fanqifeng/.nvm/versions/node/v10.15.1/bin/node&quot;,
115
+ &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
116
+ &quot;settings.editor.selected.configurable&quot;: &quot;settings.nodejs&quot;,
117
+ &quot;ts.external.directory.path&quot;: &quot;/opt/WebStorm/plugins/javascript-impl/jsLanguageServicesImpl/external&quot;,
118
+ &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
97
119
  }
98
- }]]></component>
120
+ }</component>
99
121
  <component name="RecentsManager">
100
122
  <key name="CopyFile.RECENT_KEYS">
123
+ <recent name="$PROJECT_DIR$/src/plugin/openseadragon" />
101
124
  <recent name="$PROJECT_DIR$/example" />
102
125
  <recent name="$PROJECT_DIR$/src/image" />
103
126
  <recent name="$PROJECT_DIR$/src/plugin" />
104
127
  <recent name="$PROJECT_DIR$/src/components/cache" />
105
- <recent name="$PROJECT_DIR$/src/components/rotation" />
106
128
  </key>
107
129
  <key name="MoveFile.RECENT_KEYS">
108
130
  <recent name="$PROJECT_DIR$/src/components/grid" />
@@ -389,91 +411,39 @@
389
411
  <workItem from="1671501857160" duration="90000" />
390
412
  <workItem from="1671751607914" duration="9693000" />
391
413
  <workItem from="1671762555964" duration="1197000" />
392
- <workItem from="1675327241367" duration="367000" />
393
- </task>
394
- <task id="LOCAL-00070" summary="标注时增加右键拖动视野">
395
- <created>1657537220254</created>
396
- <option name="number" value="00070" />
397
- <option name="presentableId" value="LOCAL-00070" />
398
- <option name="project" value="LOCAL" />
399
- <updated>1657537220255</updated>
400
- </task>
401
- <task id="LOCAL-00071" summary="曲线绘制中,按删除键,删除上一个标注点">
402
- <created>1657538768786</created>
403
- <option name="number" value="00071" />
404
- <option name="presentableId" value="LOCAL-00071" />
405
- <option name="project" value="LOCAL" />
406
- <updated>1657538768786</updated>
407
- </task>
408
- <task id="LOCAL-00072" summary="优化点击操作">
409
- <created>1657539785588</created>
410
- <option name="number" value="00072" />
411
- <option name="presentableId" value="LOCAL-00072" />
412
- <option name="project" value="LOCAL" />
413
- <updated>1657539785589</updated>
414
- </task>
415
- <task id="LOCAL-00073" summary="enableDbClickClose">
416
- <created>1657539900044</created>
417
- <option name="number" value="00073" />
418
- <option name="presentableId" value="LOCAL-00073" />
419
- <option name="project" value="LOCAL" />
420
- <updated>1657539900044</updated>
421
- </task>
422
- <task id="LOCAL-00074" summary="2.1.20">
423
- <created>1657539914133</created>
424
- <option name="number" value="00074" />
425
- <option name="presentableId" value="LOCAL-00074" />
426
- <option name="project" value="LOCAL" />
427
- <updated>1657539914133</updated>
428
- </task>
429
- <task id="LOCAL-00075" summary="view.js">
430
- <created>1657540107150</created>
431
- <option name="number" value="00075" />
432
- <option name="presentableId" value="LOCAL-00075" />
433
- <option name="project" value="LOCAL" />
434
- <updated>1657540107150</updated>
435
- </task>
436
- <task id="LOCAL-00076" summary="优化选中点">
437
- <created>1657588323251</created>
438
- <option name="number" value="00076" />
439
- <option name="presentableId" value="LOCAL-00076" />
440
- <option name="project" value="LOCAL" />
441
- <updated>1657588323252</updated>
442
- </task>
443
- <task id="LOCAL-00077" summary="优化标注图形显示,一次最多绘制5000个点,超过的标注延迟加载">
444
- <created>1657592781786</created>
445
- <option name="number" value="00077" />
446
- <option name="presentableId" value="LOCAL-00077" />
447
- <option name="project" value="LOCAL" />
448
- <updated>1657592781786</updated>
449
- </task>
450
- <task id="LOCAL-00078" summary="键盘事件更新,delete可删除曲线标注点,双击可添加曲线标注点">
451
- <created>1657607397044</created>
452
- <option name="number" value="00078" />
453
- <option name="presentableId" value="LOCAL-00078" />
454
- <option name="project" value="LOCAL" />
455
- <updated>1657607397044</updated>
456
- </task>
457
- <task id="LOCAL-00079" summary="2.20.0">
458
- <created>1657607434015</created>
459
- <option name="number" value="00079" />
460
- <option name="presentableId" value="LOCAL-00079" />
461
- <option name="project" value="LOCAL" />
462
- <updated>1657607434015</updated>
463
- </task>
464
- <task id="LOCAL-00080" summary="2.2.0">
465
- <created>1657607449348</created>
466
- <option name="number" value="00080" />
467
- <option name="presentableId" value="LOCAL-00080" />
468
- <option name="project" value="LOCAL" />
469
- <updated>1657607449348</updated>
470
- </task>
471
- <task id="LOCAL-00081" summary="加载速度优化">
472
- <created>1657612318446</created>
473
- <option name="number" value="00081" />
474
- <option name="presentableId" value="LOCAL-00081" />
475
- <option name="project" value="LOCAL" />
476
- <updated>1657612318447</updated>
414
+ <workItem from="1675327241367" duration="1458000" />
415
+ <workItem from="1675384282016" duration="594000" />
416
+ <workItem from="1675385204348" duration="1462000" />
417
+ <workItem from="1675843622628" duration="4524000" />
418
+ <workItem from="1675848342418" duration="2364000" />
419
+ <workItem from="1675902452322" duration="1711000" />
420
+ <workItem from="1675909040416" duration="1850000" />
421
+ <workItem from="1675923421168" duration="14000" />
422
+ <workItem from="1676430334861" duration="2002000" />
423
+ <workItem from="1676507825692" duration="1801000" />
424
+ <workItem from="1676515560281" duration="597000" />
425
+ <workItem from="1676530835986" duration="1197000" />
426
+ <workItem from="1676621760411" duration="596000" />
427
+ <workItem from="1676679228746" duration="561000" />
428
+ <workItem from="1676680577748" duration="1197000" />
429
+ <workItem from="1676690227544" duration="597000" />
430
+ <workItem from="1676722969064" duration="565000" />
431
+ <workItem from="1678926296962" duration="2385000" />
432
+ <workItem from="1679708561519" duration="550000" />
433
+ <workItem from="1679728741473" duration="161000" />
434
+ <workItem from="1680268962874" duration="1136000" />
435
+ <workItem from="1680271989452" duration="591000" />
436
+ <workItem from="1680437372638" duration="2994000" />
437
+ <workItem from="1680440411212" duration="49000" />
438
+ <workItem from="1680526343598" duration="1856000" />
439
+ <workItem from="1680595613024" duration="557000" />
440
+ <workItem from="1680596301151" duration="1804000" />
441
+ <workItem from="1680740253103" duration="572000" />
442
+ <workItem from="1680746491709" duration="597000" />
443
+ <workItem from="1680750141486" duration="416000" />
444
+ <workItem from="1680834237716" duration="2982000" />
445
+ <workItem from="1680858434486" duration="1348000" />
446
+ <workItem from="1680861296669" duration="54000" />
477
447
  </task>
478
448
  <task id="LOCAL-00082" summary="2.2.1">
479
449
  <created>1657612343466</created>
@@ -734,7 +704,91 @@
734
704
  <option name="project" value="LOCAL" />
735
705
  <updated>1675327595052</updated>
736
706
  </task>
737
- <option name="localTasksCounter" value="119" />
707
+ <task id="LOCAL-00119" summary="2.4.1">
708
+ <created>1675327616880</created>
709
+ <option name="number" value="00119" />
710
+ <option name="presentableId" value="LOCAL-00119" />
711
+ <option name="project" value="LOCAL" />
712
+ <updated>1675327616880</updated>
713
+ </task>
714
+ <task id="LOCAL-00120" summary="升级openseadragon插件">
715
+ <created>1675919992646</created>
716
+ <option name="number" value="00120" />
717
+ <option name="presentableId" value="LOCAL-00120" />
718
+ <option name="project" value="LOCAL" />
719
+ <updated>1675919992646</updated>
720
+ </task>
721
+ <task id="LOCAL-00121" summary="feat:增加停止绘画事件">
722
+ <created>1678929016258</created>
723
+ <option name="number" value="00121" />
724
+ <option name="presentableId" value="LOCAL-00121" />
725
+ <option name="project" value="LOCAL" />
726
+ <updated>1678929016258</updated>
727
+ </task>
728
+ <task id="LOCAL-00122" summary="feat:截图生成的图片保留标注信息">
729
+ <created>1678929084617</created>
730
+ <option name="number" value="00122" />
731
+ <option name="presentableId" value="LOCAL-00122" />
732
+ <option name="project" value="LOCAL" />
733
+ <updated>1678929084617</updated>
734
+ </task>
735
+ <task id="LOCAL-00123" summary="build:3.0.1">
736
+ <created>1678929156803</created>
737
+ <option name="number" value="00123" />
738
+ <option name="presentableId" value="LOCAL-00123" />
739
+ <option name="project" value="LOCAL" />
740
+ <updated>1678929156803</updated>
741
+ </task>
742
+ <task id="LOCAL-00124" summary="build:3.0.2 截图图片格式自定义">
743
+ <created>1680269167145</created>
744
+ <option name="number" value="00124" />
745
+ <option name="presentableId" value="LOCAL-00124" />
746
+ <option name="project" value="LOCAL" />
747
+ <updated>1680269167145</updated>
748
+ </task>
749
+ <task id="LOCAL-00125" summary="build:3.0.3 截图支持设置分辨率,质量,格式">
750
+ <created>1680440104839</created>
751
+ <option name="number" value="00125" />
752
+ <option name="presentableId" value="LOCAL-00125" />
753
+ <option name="project" value="LOCAL" />
754
+ <updated>1680440104840</updated>
755
+ </task>
756
+ <task id="LOCAL-00126" summary="build:3.0.3导航图宽高限制">
757
+ <created>1680528157819</created>
758
+ <option name="number" value="00126" />
759
+ <option name="presentableId" value="LOCAL-00126" />
760
+ <option name="project" value="LOCAL" />
761
+ <updated>1680528157819</updated>
762
+ </task>
763
+ <task id="LOCAL-00127" summary="build:3.0.5 截图记录位置信息">
764
+ <created>1680847205108</created>
765
+ <option name="number" value="00127" />
766
+ <option name="presentableId" value="LOCAL-00127" />
767
+ <option name="project" value="LOCAL" />
768
+ <updated>1680847205108</updated>
769
+ </task>
770
+ <task id="LOCAL-00128" summary="build:3.0.6 修复填充图形绘制时显示异常">
771
+ <created>1680859251199</created>
772
+ <option name="number" value="00128" />
773
+ <option name="presentableId" value="LOCAL-00128" />
774
+ <option name="project" value="LOCAL" />
775
+ <updated>1680859251199</updated>
776
+ </task>
777
+ <task id="LOCAL-00129" summary="build:3.0.6 填充图形绘制时,内容偏移">
778
+ <created>1680859385125</created>
779
+ <option name="number" value="00129" />
780
+ <option name="presentableId" value="LOCAL-00129" />
781
+ <option name="project" value="LOCAL" />
782
+ <updated>1680859385125</updated>
783
+ </task>
784
+ <task id="LOCAL-00130" summary="build:2.4.2, 填充图形绘制时偏移">
785
+ <created>1680859536589</created>
786
+ <option name="number" value="00130" />
787
+ <option name="presentableId" value="LOCAL-00130" />
788
+ <option name="project" value="LOCAL" />
789
+ <updated>1680859536589</updated>
790
+ </task>
791
+ <option name="localTasksCounter" value="131" />
738
792
  <servers />
739
793
  </component>
740
794
  <component name="TypeScriptGeneratedFilesManager">
@@ -747,6 +801,7 @@
747
801
  <option value="Default.Author" />
748
802
  <option value="Default.Date" />
749
803
  <option value="Default.Subject" />
804
+ <option value="Space.CommitStatus" />
750
805
  </list>
751
806
  </option>
752
807
  </component>
@@ -761,7 +816,7 @@
761
816
  <entry key="branch">
762
817
  <value>
763
818
  <list>
764
- <option value="master" />
819
+ <option value="release/2.4.2" />
765
820
  </list>
766
821
  </value>
767
822
  </entry>
@@ -776,18 +831,6 @@
776
831
  <component name="VcsManagerConfiguration">
777
832
  <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
778
833
  <option name="LOCAL_CHANGES_DETAILS_PREVIEW_SHOWN" value="false" />
779
- <MESSAGE value="2.2.5" />
780
- <MESSAGE value="2.2.8" />
781
- <MESSAGE value="优化标注信息显示" />
782
- <MESSAGE value="标注事件回调" />
783
- <MESSAGE value="defaultShow" />
784
- <MESSAGE value="2.2.9" />
785
- <MESSAGE value="矩形框的选中点变成线" />
786
- <MESSAGE value="2.3.0" />
787
- <MESSAGE value="矩形移动点默认隐藏,悬浮显示" />
788
- <MESSAGE value="label.model.js" />
789
- <MESSAGE value="解决反向绘制时,标注信息显示错误" />
790
- <MESSAGE value="2.3.1" />
791
834
  <MESSAGE value="优化渲染速度" />
792
835
  <MESSAGE value="2.3.2" />
793
836
  <MESSAGE value="优化速度" />
@@ -801,7 +844,19 @@
801
844
  <MESSAGE value="2.4.0,绘制标注优化,一次只绘制2000个,分批绘制" />
802
845
  <MESSAGE value="截图区域范围数值保留2位小数" />
803
846
  <MESSAGE value="标注位置跳转增加参数,是否显示跳转动画" />
804
- <option name="LAST_COMMIT_MESSAGE" value="标注位置跳转增加参数,是否显示跳转动画" />
847
+ <MESSAGE value="2.4.1" />
848
+ <MESSAGE value="升级openseadragon插件" />
849
+ <MESSAGE value="feat:增加停止绘画事件" />
850
+ <MESSAGE value="feat:截图生成的图片保留标注信息" />
851
+ <MESSAGE value="build:3.0.1" />
852
+ <MESSAGE value="build:3.0.2 截图图片格式自定义" />
853
+ <MESSAGE value="build:3.0.3 截图支持设置分辨率,质量,格式" />
854
+ <MESSAGE value="build:3.0.3导航图宽高限制" />
855
+ <MESSAGE value="build:3.0.5 截图记录位置信息" />
856
+ <MESSAGE value="build:3.0.6 修复填充图形绘制时显示异常" />
857
+ <MESSAGE value="build:3.0.6 填充图形绘制时,内容偏移" />
858
+ <MESSAGE value="build:2.4.2, 填充图形绘制时偏移" />
859
+ <option name="LAST_COMMIT_MESSAGE" value="build:2.4.2, 填充图形绘制时偏移" />
805
860
  <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
806
861
  </component>
807
862
  <component name="XSLT-Support.FileAssociations.UIState">
@@ -66,8 +66,7 @@ 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',
package/example/index.js CHANGED
@@ -25,12 +25,12 @@ 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 = '/uploads/TCT/已入库/ningbo_pathology_center/neg/labeling/WS/T2018-46374_ThinPrep_2018-08-31_WS.kfb';
29
29
 
30
30
  const instance = axios.create({
31
31
  baseURL: '/api',
32
32
  timeout: 1000,
33
- headers: {'Authorization': 'bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjIyL2FwaS9hdXRoL2xvZ2luIiwiaWF0IjoxNjY3NjE2OTIyLCJleHAiOjE2Njc2NTUzMjIsIm5iZiI6MTY2NzYxNjkyMiwianRpIjoiMDl4SEZMdlpHUlliVExlQyIsInN1YiI6MjcsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.buNwEIsNSqo1-wH8zEaRyjauIVKOXmjJfjaa1-g9l_k'},
33
+ headers: {'Authorization': 'bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vMTkyLjE2OC4xLjE2L2FwaS9hdXRoL2xvZ2luIiwiaWF0IjoxNjY2OTI2ODk1LCJleHAiOjE2NjY5NjUyOTUsIm5iZiI6MTY2NjkyNjg5NSwianRpIjoieU5mT3NXMmVraWs0RTUxayIsInN1YiI6MSwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.2T7Xkx-5BhtR1HOc5FLbJIzDmgaq2bbCuXJoowUX0IE'},
34
34
  });
35
35
 
36
36
  let cacheImage = {};
@@ -76,7 +76,7 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
76
76
  },
77
77
  pxConversion: {
78
78
  unit: 'um',
79
- imageCapRes: data.imageCapRes || 1,
79
+ imageCapRes: data.imageCapRes,
80
80
  },
81
81
  grid: {
82
82
  show: false,
@@ -273,7 +273,7 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
273
273
  kv.viewer.addHandler('zoom', (res) => {
274
274
  const zoom = kv.viewer.viewport.viewportToImageZoom(res.zoom) *
275
275
  kv.$options.scale;
276
- // console.log(zoom.toFixed(2) / 1);
276
+ console.log(zoom.toFixed(2) / 1);
277
277
  });
278
278
  console.log(kv);
279
279
  let list = [];
@@ -304,6 +304,7 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
304
304
  kv.board.startDraw({
305
305
  tool: KfbView.marks.RECTANGLE,
306
306
  isROI: false,
307
+ once: true,
307
308
  measure: true,
308
309
  });
309
310
  };
@@ -372,9 +373,9 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
372
373
  console.log(e);
373
374
  });*/
374
375
  kv.$on(KfbView.events.EVENT_END_PAINTING, (e) => {
375
- console.time('appendLabelList');
376
- kv.appendLabelList([e.detail]);
377
- console.timeEnd('appendLabelList');
376
+ console.log(e.detail);
377
+ list.push(e.detail);
378
+ kv.initLabelList(list);
378
379
  // kv.board.endDraw();
379
380
  });
380
381
  kv.$on(KfbView.events.EVENT_DELETE_LABEL, (e) => {
@@ -412,111 +413,67 @@ instance.get(`/process/info?file=${fileName}`).then(({data}) => {
412
413
  }, 6000);
413
414
  }, 6000);
414
415
 
415
- initLabels();
416
+ // initLabels();
416
417
 
417
418
  function initLabels() {
418
419
  const labels = [];
419
- const colors = ['#027AFF', '#f56c6c', '#11ff6c', '#f56cff', '#11ffff'];
420
- for (let i = 0; i < 10000; i++) {
420
+ const colors = ['#027AFF', '#f56c6c'];
421
+ for (let i = 0; i < 50000; i++) {
421
422
  const point = {
422
423
  x: Math.random() * data.width,
423
424
  y: Math.random() * data.height,
424
425
  };
425
- const point1 = {
426
- x: point.x + Math.random() * 1000,
427
- y: point.y + Math.random() * 1000,
428
- };
429
426
  const label = {
430
427
  // fillStyle: 'rgba(2, 122, 255, 1)',
431
- lineWidth: 2,
432
- points: [point, point1],
428
+ lineWidth: 6,
429
+ points: [point, point],
433
430
  scale: 0.1,
434
- strokeStyle: colors[(Math.random() * colors.length) >> 0],
435
- tool: 'Rectangle',
436
- move: true,
437
- resize: true,
431
+ strokeStyle: Math.random() > .5 ? colors[0] : colors[1],
432
+ tool: 'Dot',
433
+ move: false,
438
434
  };
439
435
  labels.push(label);
440
436
  }
441
437
  kv.initLabelList(labels);
442
438
  }
443
439
 
444
- /*
445
- instance.get(
446
- `/image_annotation?file=${fileName}&slide_label_id=38749&user_id=27`).
447
- then(({data}) => {
448
- data = data.data;
449
- const labelRegionList = [];
450
- (data || []).filter(item => item.id && item.region.width > 0).
451
- forEach(item => {
452
- const subClass = item.sub_class || item.subClass;
453
- const is_ai = !!item.score || subClass === 'ROI' && !item.user_name; // 通过分数来判断是否是AI识别标注
454
- const r = {
455
- ...item,
456
- tool: (item.type || item.tool) === 'Spline' ?
457
- 'Polygon' :
458
- (item.type || item.tool),
459
- strokeStyle: item.strokeStyle || `#${item.color.toString(16).
460
- slice(2)}${item.color.toString(16).slice(0, 2)}`,
461
- measure: true,
462
- sub_class: subClass,
463
- isROI: subClass === 'ROI',
464
- isClose: item.isClose || item.is_close,
465
- lineWidth: item.lineWidth || item.width,
466
- text: item.text || item.description,
467
- is_ai,
468
- ai_sub_class: is_ai ? (item.ai_sub_class ?? item.sub_class) : '',
469
- ai_points: is_ai ? (item.ai_points ?? item.points) : '',
470
- ai_region: is_ai ? (item.ai_region ?? item.region) : '',
471
- };
472
- r.content = (kv.area.getMeasureContent(r)?.texts || []).slice(1, -1);
473
- labelRegionList.push({
474
- ...r,
475
- });
440
+ instance.get(
441
+ `/image_annotation?file=${fileName}&slide_label_id=48010&user_id=1`).
442
+ then(({data}) => {
443
+ data = data.data;
444
+ const labelRegionList = [];
445
+ (data || []).filter(item => item.id && item.region.width > 0).
446
+ forEach(item => {
447
+ const subClass = item.sub_class || item.subClass;
448
+ const is_ai = !!item.score || subClass === 'ROI' && !item.user_name; // 通过分数来判断是否是AI识别标注
449
+ const r = {
450
+ ...item,
451
+ tool: (item.type || item.tool) === 'Spline' ?
452
+ 'Polygon' :
453
+ (item.type || item.tool),
454
+ strokeStyle: `#${item.color.toString(16).
455
+ slice(2)}${item.color.toString(16).slice(0, 2)}`,
456
+ measure: true,
457
+ sub_class: subClass,
458
+ isROI: subClass === 'ROI',
459
+ isClose: item.isClose || item.is_close,
460
+ lineWidth: item.lineWidth || item.width,
461
+ text: item.text || item.description,
462
+ is_ai,
463
+ ai_sub_class: is_ai ? (item.ai_sub_class ?? item.sub_class) : '',
464
+ ai_points: is_ai ? (item.ai_points ?? item.points) : '',
465
+ ai_region: is_ai ? (item.ai_region ?? item.region) : '',
466
+ };
467
+ r.content = (kv.area.getMeasureContent(r)?.texts || []).slice(1, -1);
468
+ labelRegionList.push({
469
+ ...r,
476
470
  });
477
- console.time('initLabelList');
478
- kv.initLabelList(labelRegionList.filter(({deleted_at}) => !deleted_at));
479
- console.timeEnd('initLabelList');
480
- });
481
- document.querySelector('#reDraw').addEventListener('click', () => {
482
- instance.get(
483
- `/image_annotation?file=${fileName}&slide_label_id=38749&user_id=27`).
484
- then(({data}) => {
485
- data = data.data;
486
- const labelRegionList = [];
487
- (data || []).filter(item => item.id && item.region.width > 0).
488
- forEach(item => {
489
- const subClass = item.sub_class || item.subClass;
490
- const is_ai = !!item.score || subClass === 'ROI' && !item.user_name; // 通过分数来判断是否是AI识别标注
491
- const r = {
492
- ...item,
493
- tool: (item.type || item.tool) === 'Spline' ?
494
- 'Polygon' :
495
- (item.type || item.tool),
496
- strokeStyle: item.strokeStyle || `#${item.color.toString(16).
497
- slice(2)}${item.color.toString(16).slice(0, 2)}`,
498
- measure: true,
499
- sub_class: subClass,
500
- isROI: subClass === 'ROI',
501
- isClose: item.isClose || item.is_close,
502
- lineWidth: item.lineWidth || item.width,
503
- text: item.text || item.description,
504
- is_ai,
505
- ai_sub_class: is_ai ? (item.ai_sub_class ?? item.sub_class) : '',
506
- ai_points: is_ai ? (item.ai_points ?? item.points) : '',
507
- ai_region: is_ai ? (item.ai_region ?? item.region) : '',
508
- };
509
- r.content = (kv.area.getMeasureContent(r)?.texts || []).slice(1,
510
- -1);
511
- labelRegionList.push({
512
- ...r,
513
- });
514
- });
515
- console.time('initLabelList');
516
- kv.initLabelList(labelRegionList.filter(({deleted_at}) => !deleted_at));
517
- console.timeEnd('initLabelList');
518
471
  });
519
- });*/
472
+ kv.initLabelList(labelRegionList.filter(({deleted_at}) => !deleted_at));
473
+ });
474
+ document.querySelector('#reDraw').addEventListener('click', () => {
475
+ initLabels();
476
+ });
520
477
  });
521
478
 
522
479
  /**