Compare commits
624 Commits
v1.5.3
...
988317d0cd
| Author | SHA1 | Date | |
|---|---|---|---|
| 988317d0cd | |||
| a7c7c3dfc5 | |||
| 17d6e233c8 | |||
| c9a754a85f | |||
| a1addde722 | |||
| 001faf1f79 | |||
| 8d26368bcb | |||
| 3c8ea04457 | |||
| 112c78a832 | |||
| 590949e207 | |||
| 8a47f23fe7 | |||
| 2093308763 | |||
| 8fae8528c6 | |||
| 3d5229d3c0 | |||
| 386db94fdb | |||
| f80bd64ede | |||
| 339be24cc3 | |||
| d30953bb98 | |||
| dc60a1ca4a | |||
| 2d673a414b | |||
| 06c56889d0 | |||
| 68179f4214 | |||
| 2b5ee56e6b | |||
| 3d2f6d0c7e | |||
| 9752fd6946 | |||
| 0dcee2c84b | |||
| 43f49a36c0 | |||
| 16d5299ce0 | |||
| 16485f0c56 | |||
| 692fd7bc97 | |||
| f17f1d6a6b | |||
| b74337f2f0 | |||
| 37e65339f3 | |||
| b4d4fffd71 | |||
| f175838052 | |||
| 80aa18eff2 | |||
| 966e90498d | |||
| ca1b95201c | |||
| f2e6ecce8e | |||
| 3b06046c69 | |||
| d67bc1e02d | |||
| 3c35d2656d | |||
| d6048e4cdd | |||
| d80fdb36e1 | |||
| 40642a4fe6 | |||
| e550e5e31c | |||
| 5bf4c3cf5d | |||
| d86eee6825 | |||
| 76a70e819d | |||
| a512ed551b | |||
| c5383dd11d | |||
| 23378a663b | |||
| 693e240578 | |||
| 0144ae91e8 | |||
| 449e999d43 | |||
| c77ca02cbc | |||
| 8300cbaccf | |||
| 14b0a45817 | |||
| b3ba7e7e40 | |||
| c348260b45 | |||
| 4fbd4e28fe | |||
| d7b11c02e5 | |||
| d0281abfee | |||
| 2c268cbd4f | |||
| 857abb2c0d | |||
| 371a3acff2 | |||
| 3dddbafd04 | |||
| 86dde0a9e8 | |||
| aee2a78205 | |||
| 4733c0fd8f | |||
| 54b3e0399c | |||
| 8f6434f123 | |||
| c25183073a | |||
| 904a764ea5 | |||
| 248f40b5be | |||
| c50c6c7bc7 | |||
| 1ef8eed500 | |||
| 9310337f16 | |||
| 37529cef33 | |||
| 42ed756c4e | |||
| 97d786684b | |||
| 17f0a5d977 | |||
| 75a063acd9 | |||
| 5df08f52fc | |||
| 3a5de3fadf | |||
| be32fd8e15 | |||
| 8047ba7f5f | |||
| fbbd4ff805 | |||
| 25d8ee6bc5 | |||
| 0f29a2971c | |||
| 2b71341d4c | |||
| fa395f54b2 | |||
| 70d9623c63 | |||
| 82447c58de | |||
| 672cb9b2a2 | |||
| b06dcdc98f | |||
| b1096a8aa9 | |||
| 66a1654bfe | |||
| 986bce36e6 | |||
| e845fdaad4 | |||
| b762d3d0dd | |||
| dfb9392cda | |||
| 86c05070b3 | |||
| b8478e6451 | |||
| 4552caf82f | |||
| 9e83d51037 | |||
| dd0cd1ec64 | |||
| db5e5da06a | |||
| e6bd4576e6 | |||
| 8abcfcbe1a | |||
| 9653e4478b | |||
| 9402501c0b | |||
| d5c0e15f46 | |||
| 860d932a5d | |||
| 0e485a8984 | |||
| 95998f0dea | |||
| 8c7c82cf5e | |||
| bf701bf3d8 | |||
| 2ce7454b47 | |||
| ce079f923a | |||
| 60d3b25041 | |||
| 3d171caf1b | |||
| 472599c663 | |||
| 3a659cd9bc | |||
| ed7d2502d1 | |||
| 689c149a3a | |||
| 5b3ae0c076 | |||
| 4eba3b2cb3 | |||
| e2ebedb9e9 | |||
| 77c3f0244e | |||
| 3fc7d70b3f | |||
| c2aa83f4b8 | |||
| 7c77a42e90 | |||
| 08b8f8d107 | |||
| 1fca941f64 | |||
| d06afd42af | |||
| cbee69b4c0 | |||
| 39c4a13f5e | |||
| 7fed65dbe3 | |||
| 15cad74264 | |||
| b1c8f02271 | |||
| b95cc82997 | |||
| 59c342ccd1 | |||
| eba09135eb | |||
| 4f4934523f | |||
| 99bb929123 | |||
| 1538690604 | |||
| bfb1c03c63 | |||
| e05986ac9f | |||
| 4988155499 | |||
| e024c6c0b1 | |||
| aa526aad8c | |||
| 84bc101065 | |||
| adf6bdc44a | |||
| ec7851eb9d | |||
| 8831847850 | |||
| fa137ac535 | |||
| 1209a3962b | |||
| ccf3b823d8 | |||
| e043e85630 | |||
| 342c9325bf | |||
| 249448b15e | |||
| 4569f16050 | |||
| 07b2341f93 | |||
| e47c75937c | |||
| f39050e220 | |||
| f31e23d314 | |||
| 8b12d6a576 | |||
| 605bf04e43 | |||
| f380028c22 | |||
| 9a040024d9 | |||
| 04f68d8733 | |||
| b62a36b63a | |||
| 3dfe5b57a1 | |||
| 6a3068f942 | |||
| f58fa6011b | |||
| d42252ea78 | |||
| 6bf4a1b70d | |||
| 5bed446055 | |||
| 5d8c389090 | |||
| 5bfc4a9a82 | |||
| cb00ec7ac2 | |||
| dc5c1720c7 | |||
| 73a4135fd6 | |||
| f2af36b89a | |||
| 4f0f124378 | |||
| c618738725 | |||
| 1274af3e48 | |||
| b7a19c2581 | |||
| 842e959e2d | |||
| 0590742dac | |||
| f6b90c4c05 | |||
| e52378d5d4 | |||
| f52b2f151b | |||
| 9bb856b50a | |||
| 780c49959e | |||
| a470d961df | |||
| 84b1a2a4fa | |||
| e2026177a1 | |||
| c114903dba | |||
| 915c7c88fb | |||
| 64bd3033b5 | |||
| c1fbbc524f | |||
| 6f86700dbc | |||
| 85ed9fd9b7 | |||
| 002cd19053 | |||
| e24b1cc722 | |||
| 205b420074 | |||
| d42e446953 | |||
| 3be34d89ca | |||
| 67b04c2a51 | |||
| 65acb7ea05 | |||
| d25fd68db7 | |||
| 433064c353 | |||
| 0e766300f0 | |||
| 581980f111 | |||
| 7aaede5503 | |||
| ff7305c3a0 | |||
| 6f03bbe14c | |||
| 6b645d3161 | |||
| 4db4aed4dd | |||
| b368df6bfb | |||
| 7aa21c5ca1 | |||
| 45c4bc3b3a | |||
| 5de6a69bc8 | |||
| 324bc1a536 | |||
| 2628d2ec5f | |||
| 9d8bd9c910 | |||
| 615c91b197 | |||
| a7c0ae6d7a | |||
| 400b13e7a6 | |||
| a14f144066 | |||
| 655753d1c6 | |||
| 64e936ad6d | |||
| 6712cad721 | |||
| fed2c1a842 | |||
| 2303c04857 | |||
| beeadfbdeb | |||
| b866ffdd49 | |||
| 8ad50b5618 | |||
| e517556808 | |||
| 1a8653b47e | |||
| bfe86e6868 | |||
| f0eda2bc66 | |||
| 8f274aad89 | |||
| 709063a26e | |||
| 9e786c53b8 | |||
| 37520fccb6 | |||
| f3b36b9127 | |||
| 870354b4b2 | |||
| f838df51a5 | |||
| 0a6a98c33c | |||
| 28c357a702 | |||
| 02af3d9b55 | |||
| 29be0d6035 | |||
| 05cd1c4075 | |||
| d52663da40 | |||
| 4b8ba07123 | |||
| 3204d1d305 | |||
| fa2519cba4 | |||
| 85c4cf89f6 | |||
| 302cad8b57 | |||
| 45f392492d | |||
| c64e555238 | |||
| 46e7939088 | |||
| aafbfd075d | |||
| b6433ea4a8 | |||
| f5c4b49e6f | |||
| e961829ef1 | |||
| 2c7e304820 | |||
| 129349f489 | |||
| 38a1bae8ab | |||
| 4d2e9531ec | |||
| e903c239b4 | |||
| 630e551750 | |||
| dbdbed3556 | |||
| aaf9decc49 | |||
| 2d93a1a5ac | |||
| d05b97c4f3 | |||
| 0494d567db | |||
| 3f863bc426 | |||
| 6eb971e263 | |||
| ba3cae7a40 | |||
| 64a5a7f89c | |||
| c90e423268 | |||
| d1bf7f1088 | |||
| a2f6bbf27b | |||
| 1f2bc4d494 | |||
| de1ffc02a4 | |||
| fa7b51060b | |||
| 37a58ca649 | |||
| 4e2fecc999 | |||
| 9c36c7975c | |||
| 3f80df204c | |||
| 09ed271199 | |||
| 5c7c2d6ef6 | |||
| 77aa182e2f | |||
| 1f64d87342 | |||
| e5cb28b00d | |||
| 7701442560 | |||
| a6f76c840d | |||
| f2bff5deb5 | |||
| b6101a00fa | |||
| 0f44ac3ddb | |||
| 5d8c0f99b9 | |||
| 4d97b9992c | |||
| 8ad3eee2c2 | |||
| a549341d3b | |||
| 7d634fb2e5 | |||
| cde5846fd6 | |||
| 327be0f7da | |||
| 16d44ee8bb | |||
| 585add442e | |||
| fedead8eab | |||
| 4a83adb4e9 | |||
| f5408141f3 | |||
| 66260c5012 | |||
| 392ca13c16 | |||
| 58f8586232 | |||
| 8c8ffa5ea5 | |||
| b47a1e5311 | |||
| 8257793b4f | |||
| 953fe1cf22 | |||
| f6c1891780 | |||
| cd581041b9 | |||
| b0ce6e0cb8 | |||
| 7db22356d7 | |||
| 2cbc1125ae | |||
| 068f705841 | |||
| ab0c3d41de | |||
| 0189f6e989 | |||
| 743a704204 | |||
| a84084a15f | |||
| fe7d4f7877 | |||
| 141dd32009 | |||
| 94268942d1 | |||
| 5c43369335 | |||
| c6df434fa4 | |||
| ca79de57d2 | |||
| f092d410b9 | |||
| 49f693c244 | |||
| 8bd46c150b | |||
| 08710d78d1 | |||
| 0432d73dc3 | |||
| 67d995d180 | |||
| de313e9b52 | |||
| b0efb9066d | |||
| 3304a5d8d2 | |||
| 4c37ebef3e | |||
| 0e71a32c58 | |||
| 38f5b52938 | |||
| 9700bd4c31 | |||
| 06e86994ea | |||
| c00200c6ad | |||
| 02df28b2fa | |||
| 9f124da272 | |||
| e4b366c86a | |||
| 741086f92f | |||
| 4184293636 | |||
| a01ee34f12 | |||
| c55459d32f | |||
| a85cf70df8 | |||
| 738d46d225 | |||
| 4ad5462801 | |||
| fad91756b6 | |||
| 0a4c502628 | |||
| f1b0852b51 | |||
| 5e514a48dc | |||
| e77a015f6e | |||
| ec0a793090 | |||
| 7f462a8b18 | |||
| 2e56e069d2 | |||
| e26d40f885 | |||
| 6e72825dff | |||
| a3c5a23e1e | |||
| 0a53860620 | |||
| 07fe167eac | |||
| 2a00dda5f4 | |||
| a185f4755a | |||
| 0aacbf49d9 | |||
| 10e1c92e73 | |||
| 385afa93f0 | |||
| e955f4973c | |||
| 0b49bd8dab | |||
| 3820146acb | |||
| e98e826328 | |||
| 86557af12f | |||
| 581ed42ab6 | |||
| ba17dd4148 | |||
| 1ce67efa9b | |||
| 7e21325fa1 | |||
| 44f6b11d50 | |||
| 6e88d2cae2 | |||
| 62f5f5ac38 | |||
| ddb5254716 | |||
| fcc4820087 | |||
| a3c7e76267 | |||
| c6b38ea528 | |||
| 8b1679dfc5 | |||
| 8597e0a7e8 | |||
| f96f8bca91 | |||
| f8837d8cef | |||
| be3719c0d2 | |||
| 51e0322f6d | |||
| 7c379c9566 | |||
| 38b9e092a4 | |||
| 23c0e4e675 | |||
| 0aaa38e751 | |||
| ce1bd2df25 | |||
| d0641cdfc9 | |||
| ea413ffe0b | |||
| f87935f6f5 | |||
| 32274c4a37 | |||
| 132af31c1b | |||
| f8c28fc66d | |||
| 3819f5af0b | |||
| 46bc955e76 | |||
| 802870f3b4 | |||
| 8a46adf96f | |||
| 57f470e219 | |||
| 14cc8ad5f5 | |||
| 43bdf0cc19 | |||
| 049d8dc430 | |||
| e0ccfe8da7 | |||
| c5758b17df | |||
| e485b73e1b | |||
| 91c78127f2 | |||
| bbfd119d08 | |||
| 32de7c4f18 | |||
| b76303c63d | |||
| 96cb8a478c | |||
| c13fe6b521 | |||
| fc6d0c7b35 | |||
| 0ba8739cb5 | |||
| aeeb4b05f5 | |||
| 8ee3847791 | |||
| c9e99339d5 | |||
| df304d8f07 | |||
| 404d18faa5 | |||
| e593aedd46 | |||
| c6c9142934 | |||
| 65e4bf94ad | |||
| 14ad1ae156 | |||
| ddd35f4ff8 | |||
| 275501db20 | |||
| e81b7897e7 | |||
| ab65a9f1c7 | |||
| 7f8d08032c | |||
| c3955dc017 | |||
| 4b6c589881 | |||
| 73a6935fb8 | |||
| ec96011d4b | |||
| c01c69a9fe | |||
| 750c465b18 | |||
| d1f90a2525 | |||
| 4212eb0f52 | |||
| d37c44a268 | |||
| 4c0b219b47 | |||
| db4632fb9b | |||
| 42c1b56dda | |||
| d56b904141 | |||
| 1eae9eda28 | |||
| aa5f5f9bc6 | |||
| 8fc6bdb437 | |||
| a7ce5526fd | |||
| fbb41e3fd9 | |||
| 7311252d3c | |||
| b43202076c | |||
| 2e11c881f5 | |||
| 4b9118839f | |||
| 535d30b6df | |||
| a533bb680b | |||
| be14515286 | |||
| 84a8f6ec75 | |||
| d274c774ba | |||
| a7a034014d | |||
| e16a02eaff | |||
| 22193bb291 | |||
| ca98bc278c | |||
| 03cf2def1b | |||
| 847845a6c4 | |||
| f5ec5505d4 | |||
| 53a9b3882d | |||
| 671be02d13 | |||
| e1b6bec85b | |||
| 8b6714806e | |||
| 16581bd7b9 | |||
| d1956e3077 | |||
| 9486054a19 | |||
| cd3f36756d | |||
| 057d23d34b | |||
| bea2d448ea | |||
| b9b62334c4 | |||
| 8cf5a1a524 | |||
| 47fc6c5ef0 | |||
| fd70c3ee2c | |||
| de638b1436 | |||
| ca18abe26e | |||
| 02a5f30224 | |||
| 8933a398d7 | |||
| a71c6e92dc | |||
| 80c0bfb694 | |||
| 426faba24c | |||
| a0eaf2f64a | |||
| c6cc83aeec | |||
| 46f66ce2d2 | |||
| 35846365a4 | |||
| 90e33e1b97 | |||
| 9b6f8717c3 | |||
| 65da9636a2 | |||
| 9a1b28e08c | |||
| 94ca89db27 | |||
| b786c5e656 | |||
| f32abfe230 | |||
| 3f5092bcbb | |||
| f0e6c5b9de | |||
| 0a880af52f | |||
| 089d8668f2 | |||
| a1dab30d37 | |||
| 32a7e42c51 | |||
| 16b6f5f8b1 | |||
| 1a69bd9003 | |||
| b37e351491 | |||
| c74806a367 | |||
| b637fc5856 | |||
| de18b8e6e3 | |||
| 31d3a17b80 | |||
| a0bbb7b64c | |||
| a8bebaba49 | |||
| 403008c25f | |||
| 52ed67850d | |||
| dfd0b1a767 | |||
| ced87c29c9 | |||
| 5e14615176 | |||
| 65b9cff361 | |||
| 862dcb1b3d | |||
| 3a02e9a596 | |||
| af586a1187 | |||
| 39a0c8163f | |||
| da0dabecca | |||
| 75efdcf0f7 | |||
| bc674ec334 | |||
| 663c78ef51 | |||
| 3ae982d422 | |||
| b8b876c0c9 | |||
| 978aacf085 | |||
| 24e7b30b7e | |||
| ba1ba68c78 | |||
| e51e7d0e66 | |||
| 7f36aa5a05 | |||
| 67ceadcc9c | |||
| e45903d55e | |||
| 02e82bba33 | |||
| 3d3e6a3db0 | |||
| 6e2b7cb76a | |||
| ca2ed72a6f | |||
| c2e2f65434 | |||
| d2fc9ad981 | |||
| c2083e9c9c | |||
| d118f6461f | |||
| 13d968c5b9 | |||
| 65f0af06ad | |||
| 49a93d0188 | |||
| de832afac8 | |||
| c4381a0eb2 | |||
| 17c796bd53 | |||
| 9ce1e569eb | |||
| 8b48f5fe2e | |||
| 98af1e7540 | |||
| ed027781c4 | |||
| dd20a93523 | |||
| ba5e9f82b7 | |||
| 5af5954f2a | |||
| 9e1dbda53c | |||
| 3aa521229f | |||
| cd1735eae8 | |||
| 29dfe79acd | |||
| 885af6d195 | |||
| 98fe1f0365 | |||
| 74e86cbdbe | |||
| 6b06d2a5f0 | |||
| 6250e957f0 | |||
| 9cb9478848 | |||
| bd9ecf13e9 | |||
| fe67ef0189 | |||
| 7283c5a5a1 | |||
| 4d224c115d | |||
| b717530ae3 | |||
| 66e5380fce | |||
| 9f73ae7e31 | |||
| 8876d24054 | |||
| d5084e411b | |||
| cf7c7cbbc1 | |||
| ac272d1e94 | |||
| 6a59ed80e2 | |||
| d0cefb09df | |||
| 4c241b9acd | |||
| e265b0c2af | |||
| 2f549846ba | |||
| d9f10055aa | |||
| 19c2c4eecb | |||
| b3bff41d35 | |||
| 0eb1289cf0 | |||
| 5048f040cc | |||
| 62d7315401 | |||
| 13b083d2df | |||
| 712d2cc89b | |||
| 9795f89ce9 | |||
| 4eb9c2ff85 | |||
| d5f1ecbb04 | |||
| a53fc5478b | |||
| 3ab5c46455 | |||
| c37332e8e2 | |||
| 79cc39918e | |||
| ccac950bcf | |||
| e0b095ebc9 | |||
| 898f6ed8f7 | |||
| ced1be74b3 | |||
| e6926382fd | |||
| 59f27b9d35 | |||
| 12449e0ca0 | |||
| 3b745051eb | |||
| 81c21c995d | |||
| a2ffa87056 |
@@ -2,7 +2,7 @@
|
||||
ENV = 'usa'
|
||||
NODE_ENV = 'usa'
|
||||
# base public path
|
||||
VUE_APP_BASE_PATH = 'https://ei-code-prod.s3.amazonaws.com/2024-07-12/'
|
||||
VUE_APP_BASE_PATH = 'https://ei-code-prod.s3.amazonaws.com/2024-07-30/'
|
||||
|
||||
# 是否开启登陆限制 true:是 false:否
|
||||
VUE_APP_LOGIN_FOR_PERMISSION = true
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
ENV = 'usa'
|
||||
NODE_ENV = 'usa'
|
||||
# base public path
|
||||
VUE_APP_BASE_PATH = 'https://ei-med-s3-code.s3.amazonaws.com/2024-07-11/'
|
||||
VUE_APP_BASE_PATH = 'https://ei-med-s3-code.s3.amazonaws.com/2024-07-30/'
|
||||
|
||||
# 是否开启登陆限制 true:是 false:否
|
||||
VUE_APP_LOGIN_FOR_PERMISSION = true
|
||||
|
||||
+33
-1
@@ -1,6 +1,6 @@
|
||||
kind: pipeline
|
||||
type: ssh
|
||||
name: ssh-linux-test-irc-publish
|
||||
name: ssh-linux-uat-irc-publish
|
||||
|
||||
platform:
|
||||
os: Linux
|
||||
@@ -24,6 +24,38 @@ steps:
|
||||
trigger:
|
||||
branch:
|
||||
- uat
|
||||
|
||||
---
|
||||
|
||||
kind: pipeline
|
||||
type: ssh
|
||||
name: ssh-linux-test-irc-publish
|
||||
|
||||
platform:
|
||||
os: Linux
|
||||
arch: 386
|
||||
|
||||
clone:
|
||||
disable: true #禁用默认克隆
|
||||
|
||||
server:
|
||||
host: 106.14.89.110
|
||||
user: root
|
||||
password:
|
||||
from_secret: local_pwd
|
||||
|
||||
steps:
|
||||
- name: publish-test-irc-vue
|
||||
commands:
|
||||
- echo start publish test-irc-vue
|
||||
- cd /opt/1panel/hang/vue/test-irc
|
||||
- sh test-irc.sh v${DRONE_BUILD_NUMBER}
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Generated
+226
-181
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "EICS",
|
||||
"version": "1.0.0",
|
||||
"version": "1.3.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -19,7 +19,6 @@
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/@ampproject/remapping/-/remapping-2.2.1.tgz",
|
||||
"integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@jridgewell/gen-mapping": "^0.3.0",
|
||||
"@jridgewell/trace-mapping": "^0.3.9"
|
||||
@@ -29,7 +28,6 @@
|
||||
"version": "7.23.5",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.23.5.tgz",
|
||||
"integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/highlight": "^7.23.4",
|
||||
"chalk": "^2.4.2"
|
||||
@@ -38,14 +36,12 @@
|
||||
"@babel/compat-data": {
|
||||
"version": "7.23.5",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/compat-data/-/compat-data-7.23.5.tgz",
|
||||
"integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw=="
|
||||
},
|
||||
"@babel/core": {
|
||||
"version": "7.23.6",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/core/-/core-7.23.6.tgz",
|
||||
"integrity": "sha512-FxpRyGjrMJXh7X3wGLGhNDCRiwpWEF74sKjTLDJSG5Kyvow3QZaG0Adbqzi9ZrVjTWpsX+2cxWXD71NMg93kdw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@ampproject/remapping": "^2.2.0",
|
||||
"@babel/code-frame": "^7.23.5",
|
||||
@@ -67,14 +63,34 @@
|
||||
"json5": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz",
|
||||
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="
|
||||
},
|
||||
"semver": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"@babel/eslint-parser": {
|
||||
"version": "7.24.8",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/eslint-parser/-/eslint-parser-7.24.8.tgz",
|
||||
"integrity": "sha512-nYAikI4XTGokU2QX7Jx+v4rxZKhKivaQaREZjuW3mrJrbdWJ5yUfohnoUULge+zEEaKjPYNxhoRgUKktjXtbwA==",
|
||||
"requires": {
|
||||
"@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1",
|
||||
"eslint-visitor-keys": "^2.1.0",
|
||||
"semver": "^6.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"eslint-visitor-keys": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz",
|
||||
"integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw=="
|
||||
},
|
||||
"semver": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -82,7 +98,6 @@
|
||||
"version": "7.23.6",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/generator/-/generator-7.23.6.tgz",
|
||||
"integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/types": "^7.23.6",
|
||||
"@jridgewell/gen-mapping": "^0.3.2",
|
||||
@@ -112,7 +127,6 @@
|
||||
"version": "7.23.6",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz",
|
||||
"integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/compat-data": "^7.23.5",
|
||||
"@babel/helper-validator-option": "^7.23.5",
|
||||
@@ -125,7 +139,6 @@
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz",
|
||||
"integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"yallist": "^3.0.2"
|
||||
}
|
||||
@@ -133,14 +146,12 @@
|
||||
"semver": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="
|
||||
},
|
||||
"yallist": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz",
|
||||
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
|
||||
"dev": true
|
||||
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -204,14 +215,12 @@
|
||||
"@babel/helper-environment-visitor": {
|
||||
"version": "7.22.20",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz",
|
||||
"integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA=="
|
||||
},
|
||||
"@babel/helper-function-name": {
|
||||
"version": "7.23.0",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz",
|
||||
"integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/template": "^7.22.15",
|
||||
"@babel/types": "^7.23.0"
|
||||
@@ -221,7 +230,6 @@
|
||||
"version": "7.22.5",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz",
|
||||
"integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/types": "^7.22.5"
|
||||
}
|
||||
@@ -239,7 +247,6 @@
|
||||
"version": "7.22.15",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz",
|
||||
"integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/types": "^7.22.15"
|
||||
}
|
||||
@@ -248,7 +255,6 @@
|
||||
"version": "7.23.3",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz",
|
||||
"integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-environment-visitor": "^7.22.20",
|
||||
"@babel/helper-module-imports": "^7.22.15",
|
||||
@@ -298,7 +304,6 @@
|
||||
"version": "7.22.5",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz",
|
||||
"integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/types": "^7.22.5"
|
||||
}
|
||||
@@ -316,7 +321,6 @@
|
||||
"version": "7.22.6",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz",
|
||||
"integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/types": "^7.22.5"
|
||||
}
|
||||
@@ -324,20 +328,17 @@
|
||||
"@babel/helper-string-parser": {
|
||||
"version": "7.23.4",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz",
|
||||
"integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ=="
|
||||
},
|
||||
"@babel/helper-validator-identifier": {
|
||||
"version": "7.22.20",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
|
||||
"integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
|
||||
"dev": true
|
||||
"integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A=="
|
||||
},
|
||||
"@babel/helper-validator-option": {
|
||||
"version": "7.23.5",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz",
|
||||
"integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw=="
|
||||
},
|
||||
"@babel/helper-wrap-function": {
|
||||
"version": "7.22.20",
|
||||
@@ -354,7 +355,6 @@
|
||||
"version": "7.23.6",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/helpers/-/helpers-7.23.6.tgz",
|
||||
"integrity": "sha512-wCfsbN4nBidDRhpDhvcKlzHWCTlgJYUUdSJfzXb2NuBssDSIjc3xcb+znA7l+zYsFljAcGM0aFkN40cR3lXiGA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/template": "^7.22.15",
|
||||
"@babel/traverse": "^7.23.6",
|
||||
@@ -365,7 +365,6 @@
|
||||
"version": "7.23.4",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/highlight/-/highlight-7.23.4.tgz",
|
||||
"integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "^7.22.20",
|
||||
"chalk": "^2.4.2",
|
||||
@@ -375,8 +374,7 @@
|
||||
"js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1326,7 +1324,6 @@
|
||||
"version": "7.22.15",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/template/-/template-7.22.15.tgz",
|
||||
"integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.22.13",
|
||||
"@babel/parser": "^7.22.15",
|
||||
@@ -1337,7 +1334,6 @@
|
||||
"version": "7.23.6",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/traverse/-/traverse-7.23.6.tgz",
|
||||
"integrity": "sha512-czastdK1e8YByZqezMPFiZ8ahwVMh/ESl9vPgvgdB9AmFMGP5jfpFax74AQgl5zj4XHzqeYAg2l8PuUeRS1MgQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.23.5",
|
||||
"@babel/generator": "^7.23.6",
|
||||
@@ -1354,8 +1350,7 @@
|
||||
"globals": {
|
||||
"version": "11.12.0",
|
||||
"resolved": "https://registry.npmmirror.com/globals/-/globals-11.12.0.tgz",
|
||||
"integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1363,7 +1358,6 @@
|
||||
"version": "7.23.6",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.23.6.tgz",
|
||||
"integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-string-parser": "^7.23.4",
|
||||
"@babel/helper-validator-identifier": "^7.22.20",
|
||||
@@ -1373,8 +1367,7 @@
|
||||
"to-fast-properties": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
|
||||
"integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==",
|
||||
"dev": true
|
||||
"integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog=="
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1581,11 +1574,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"@istanbuljs/schema": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmmirror.com/@istanbuljs/schema/-/schema-0.1.3.tgz",
|
||||
"integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA=="
|
||||
},
|
||||
"@jridgewell/gen-mapping": {
|
||||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
|
||||
"integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@jridgewell/set-array": "^1.0.1",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.10",
|
||||
@@ -1595,31 +1592,61 @@
|
||||
"@jridgewell/resolve-uri": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
|
||||
"integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA=="
|
||||
},
|
||||
"@jridgewell/set-array": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/@jridgewell/set-array/-/set-array-1.1.2.tgz",
|
||||
"integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw=="
|
||||
},
|
||||
"@jridgewell/sourcemap-codec": {
|
||||
"version": "1.4.15",
|
||||
"resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
|
||||
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
|
||||
},
|
||||
"@jridgewell/trace-mapping": {
|
||||
"version": "0.3.20",
|
||||
"resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
|
||||
"integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@jridgewell/resolve-uri": "^3.1.0",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.14"
|
||||
}
|
||||
},
|
||||
"@jsdevtools/coverage-istanbul-loader": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmmirror.com/@jsdevtools/coverage-istanbul-loader/-/coverage-istanbul-loader-3.0.5.tgz",
|
||||
"integrity": "sha512-EUCPEkaRPvmHjWAAZkWMT7JDzpw7FKB00WTISaiXsbNOd5hCHg77XLA8sLYLFDo1zepYLo2w7GstN8YBqRXZfA==",
|
||||
"requires": {
|
||||
"convert-source-map": "^1.7.0",
|
||||
"istanbul-lib-instrument": "^4.0.3",
|
||||
"loader-utils": "^2.0.0",
|
||||
"merge-source-map": "^1.1.0",
|
||||
"schema-utils": "^2.7.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"convert-source-map": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmmirror.com/convert-source-map/-/convert-source-map-1.9.0.tgz",
|
||||
"integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A=="
|
||||
},
|
||||
"json5": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmmirror.com/json5/-/json5-2.2.3.tgz",
|
||||
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg=="
|
||||
},
|
||||
"loader-utils": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz",
|
||||
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
|
||||
"requires": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^3.0.0",
|
||||
"json5": "^2.1.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@kitware/vtk.js": {
|
||||
"version": "27.3.1",
|
||||
"resolved": "https://registry.npmmirror.com/@kitware/vtk.js/-/vtk.js-27.3.1.tgz",
|
||||
@@ -1718,6 +1745,25 @@
|
||||
"glob-to-regexp": "^0.3.0"
|
||||
}
|
||||
},
|
||||
"@nicolo-ribaudo/eslint-scope-5-internals": {
|
||||
"version": "5.1.1-v1",
|
||||
"resolved": "https://registry.npmmirror.com/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz",
|
||||
"integrity": "sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==",
|
||||
"requires": {
|
||||
"eslint-scope": "5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"eslint-scope": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-5.1.1.tgz",
|
||||
"integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
|
||||
"requires": {
|
||||
"esrecurse": "^4.3.0",
|
||||
"estraverse": "^4.1.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@node-ipc/js-queue": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/@node-ipc/js-queue/-/js-queue-2.0.3.tgz",
|
||||
@@ -3084,7 +3130,6 @@
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"bindings": "^1.5.0",
|
||||
"nan": "^2.12.1"
|
||||
}
|
||||
},
|
||||
@@ -4332,6 +4377,26 @@
|
||||
"zip-stream": "^4.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"compress-commons": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/compress-commons/-/compress-commons-4.1.2.tgz",
|
||||
"integrity": "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==",
|
||||
"requires": {
|
||||
"buffer-crc32": "^0.2.13",
|
||||
"crc32-stream": "^4.0.2",
|
||||
"normalize-path": "^3.0.0",
|
||||
"readable-stream": "^3.6.0"
|
||||
}
|
||||
},
|
||||
"crc32-stream": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/crc32-stream/-/crc32-stream-4.0.3.tgz",
|
||||
"integrity": "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw==",
|
||||
"requires": {
|
||||
"crc-32": "^1.2.0",
|
||||
"readable-stream": "^3.4.0"
|
||||
}
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz",
|
||||
@@ -4341,6 +4406,35 @@
|
||||
"string_decoder": "^1.1.1",
|
||||
"util-deprecate": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"zip-stream": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/zip-stream/-/zip-stream-4.1.1.tgz",
|
||||
"integrity": "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==",
|
||||
"requires": {
|
||||
"archiver-utils": "^3.0.4",
|
||||
"compress-commons": "^4.1.2",
|
||||
"readable-stream": "^3.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"archiver-utils": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmmirror.com/archiver-utils/-/archiver-utils-3.0.4.tgz",
|
||||
"integrity": "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw==",
|
||||
"requires": {
|
||||
"glob": "^7.2.3",
|
||||
"graceful-fs": "^4.2.0",
|
||||
"lazystream": "^1.0.0",
|
||||
"lodash.defaults": "^4.2.0",
|
||||
"lodash.difference": "^4.5.0",
|
||||
"lodash.flatten": "^4.4.0",
|
||||
"lodash.isplainobject": "^4.0.6",
|
||||
"lodash.union": "^4.6.0",
|
||||
"normalize-path": "^3.0.0",
|
||||
"readable-stream": "^3.6.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -5086,16 +5180,6 @@
|
||||
"resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA=="
|
||||
},
|
||||
"bindings": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmmirror.com/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
},
|
||||
"bl": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/bl/-/bl-4.1.0.tgz",
|
||||
@@ -5379,7 +5463,6 @@
|
||||
"version": "4.22.2",
|
||||
"resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.22.2.tgz",
|
||||
"integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"caniuse-lite": "^1.0.30001565",
|
||||
"electron-to-chromium": "^1.4.601",
|
||||
@@ -5659,8 +5742,7 @@
|
||||
"caniuse-lite": {
|
||||
"version": "1.0.30001568",
|
||||
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001568.tgz",
|
||||
"integrity": "sha512-vSUkH84HontZJ88MiNrOau1EBrCqEQYgkC5gIySiDlpsm8sGVrhU7Kx4V6h0tnqaHzIHZv08HlJIwPbL4XL9+A==",
|
||||
"dev": true
|
||||
"integrity": "sha512-vSUkH84HontZJ88MiNrOau1EBrCqEQYgkC5gIySiDlpsm8sGVrhU7Kx4V6h0tnqaHzIHZv08HlJIwPbL4XL9+A=="
|
||||
},
|
||||
"case-sensitive-paths-webpack-plugin": {
|
||||
"version": "2.4.0",
|
||||
@@ -6252,29 +6334,6 @@
|
||||
"integrity": "sha512-T0+barUSQRTUQASh8bx02dl+DhF54GtIDY13Y3m9oWTklKbb3Wv974meRpeZ3lp1JpLVECWWNHC4vaG2XHXouQ==",
|
||||
"dev": true
|
||||
},
|
||||
"compress-commons": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/compress-commons/-/compress-commons-4.1.2.tgz",
|
||||
"integrity": "sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==",
|
||||
"requires": {
|
||||
"buffer-crc32": "^0.2.13",
|
||||
"crc32-stream": "^4.0.2",
|
||||
"normalize-path": "^3.0.0",
|
||||
"readable-stream": "^3.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"readable-stream": {
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz",
|
||||
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
"util-deprecate": "^1.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"compressible": {
|
||||
"version": "2.0.18",
|
||||
"resolved": "https://registry.npmmirror.com/compressible/-/compressible-2.0.18.tgz",
|
||||
@@ -6444,8 +6503,7 @@
|
||||
"convert-source-map": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/convert-source-map/-/convert-source-map-2.0.0.tgz",
|
||||
"integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg=="
|
||||
},
|
||||
"cookie": {
|
||||
"version": "0.5.0",
|
||||
@@ -6555,12 +6613,32 @@
|
||||
}
|
||||
},
|
||||
"cornerstone-wado-image-loader": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmmirror.com/cornerstone-wado-image-loader/-/cornerstone-wado-image-loader-3.3.2.tgz",
|
||||
"integrity": "sha512-Yy0DtfSMlflMS5RMQhX9YnXiYYkZz99nnXG2qtBRvzvSdwqiElIpE13sKw0Ohi4mqNwrWRx0xt8utk0HKnAXyw==",
|
||||
"version": "4.13.2",
|
||||
"resolved": "https://registry.npmmirror.com/cornerstone-wado-image-loader/-/cornerstone-wado-image-loader-4.13.2.tgz",
|
||||
"integrity": "sha512-NGqH44bY1VMY8OYuVykkLriNtZQrmoZU/S6f/1t1xX3rMc+WUMNN+yi4Nu3jp6nckLdH/bVGiigoJXrp0dTrAg==",
|
||||
"requires": {
|
||||
"dicom-parser": "^1.8.3",
|
||||
"pako": "^1.0.10"
|
||||
"@babel/eslint-parser": "^7.19.1",
|
||||
"@cornerstonejs/codec-charls": "^1.2.3",
|
||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjph": "^2.4.2",
|
||||
"coverage-istanbul-loader": "^3.0.5",
|
||||
"date-format": "^4.0.14",
|
||||
"dicom-parser": "^1.8.9",
|
||||
"pako": "^2.0.4",
|
||||
"uuid": "^9.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"pako": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/pako/-/pako-2.1.0.tgz",
|
||||
"integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug=="
|
||||
},
|
||||
"uuid": {
|
||||
"version": "9.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/uuid/-/uuid-9.0.1.tgz",
|
||||
"integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"cosmiconfig": {
|
||||
@@ -6587,32 +6665,19 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"coverage-istanbul-loader": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmmirror.com/coverage-istanbul-loader/-/coverage-istanbul-loader-3.0.5.tgz",
|
||||
"integrity": "sha512-xsw2phF0VNqUPk47V/vHXkdcTyl0tkMSmaZfLrTOhoPhPMXFelNju7utl5s7I93KXzipqDEK0YwofQSSflPz8A==",
|
||||
"requires": {
|
||||
"@jsdevtools/coverage-istanbul-loader": "3.0.5"
|
||||
}
|
||||
},
|
||||
"crc-32": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmmirror.com/crc-32/-/crc-32-1.2.2.tgz",
|
||||
"integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ=="
|
||||
},
|
||||
"crc32-stream": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/crc32-stream/-/crc32-stream-4.0.3.tgz",
|
||||
"integrity": "sha512-NT7w2JVU7DFroFdYkeq8cywxrgjPHWkdX1wjpRQXPX5Asews3tA+Ght6lddQO5Mkumffp3X7GEqku3epj2toIw==",
|
||||
"requires": {
|
||||
"crc-32": "^1.2.0",
|
||||
"readable-stream": "^3.4.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"readable-stream": {
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz",
|
||||
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
"util-deprecate": "^1.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"create-ecdh": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmmirror.com/create-ecdh/-/create-ecdh-4.0.4.tgz",
|
||||
@@ -7101,6 +7166,11 @@
|
||||
"resolved": "https://registry.npmmirror.com/date-fns/-/date-fns-1.30.1.tgz",
|
||||
"integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw=="
|
||||
},
|
||||
"date-format": {
|
||||
"version": "4.0.14",
|
||||
"resolved": "https://registry.npmmirror.com/date-format/-/date-format-4.0.14.tgz",
|
||||
"integrity": "sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg=="
|
||||
},
|
||||
"dateformat": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/dateformat/-/dateformat-2.2.0.tgz",
|
||||
@@ -7613,8 +7683,7 @@
|
||||
"electron-to-chromium": {
|
||||
"version": "1.4.611",
|
||||
"resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.4.611.tgz",
|
||||
"integrity": "sha512-ZtRpDxrjHapOwxtv+nuth5ByB8clyn8crVynmRNGO3wG3LOp8RTcyZDqwaI6Ng6y8FCK2hVZmJoqwCskKbNMaw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-ZtRpDxrjHapOwxtv+nuth5ByB8clyn8crVynmRNGO3wG3LOp8RTcyZDqwaI6Ng6y8FCK2hVZmJoqwCskKbNMaw=="
|
||||
},
|
||||
"elegant-spinner": {
|
||||
"version": "1.0.1",
|
||||
@@ -7821,8 +7890,7 @@
|
||||
"escalade": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.1.1.tgz",
|
||||
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw=="
|
||||
},
|
||||
"escape-html": {
|
||||
"version": "1.0.3",
|
||||
@@ -8085,7 +8153,6 @@
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/esrecurse/-/esrecurse-4.3.0.tgz",
|
||||
"integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"estraverse": "^5.2.0"
|
||||
},
|
||||
@@ -8093,16 +8160,14 @@
|
||||
"estraverse": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz",
|
||||
"integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"estraverse": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-4.3.0.tgz",
|
||||
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw=="
|
||||
},
|
||||
"esutils": {
|
||||
"version": "2.0.3",
|
||||
@@ -8542,13 +8607,6 @@
|
||||
"resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz",
|
||||
"integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
|
||||
},
|
||||
"file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"filesize": {
|
||||
"version": "3.6.1",
|
||||
"resolved": "https://registry.npmmirror.com/filesize/-/filesize-3.6.1.tgz",
|
||||
@@ -8878,8 +8936,7 @@
|
||||
"gensync": {
|
||||
"version": "1.0.0-beta.2",
|
||||
"resolved": "https://registry.npmmirror.com/gensync/-/gensync-1.0.0-beta.2.tgz",
|
||||
"integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="
|
||||
},
|
||||
"get-caller-file": {
|
||||
"version": "2.0.5",
|
||||
@@ -10467,6 +10524,29 @@
|
||||
"resolved": "https://registry.npmmirror.com/isstream/-/isstream-0.1.2.tgz",
|
||||
"integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g=="
|
||||
},
|
||||
"istanbul-lib-coverage": {
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmmirror.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz",
|
||||
"integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg=="
|
||||
},
|
||||
"istanbul-lib-instrument": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz",
|
||||
"integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==",
|
||||
"requires": {
|
||||
"@babel/core": "^7.7.5",
|
||||
"@istanbuljs/schema": "^0.1.2",
|
||||
"istanbul-lib-coverage": "^3.0.0",
|
||||
"semver": "^6.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"javascript-stringify": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/javascript-stringify/-/javascript-stringify-2.1.0.tgz",
|
||||
@@ -10518,8 +10598,7 @@
|
||||
"jsesc": {
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://registry.npmmirror.com/jsesc/-/jsesc-2.5.2.tgz",
|
||||
"integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA=="
|
||||
},
|
||||
"json-parse-better-errors": {
|
||||
"version": "1.0.2",
|
||||
@@ -11197,7 +11276,6 @@
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/merge-source-map/-/merge-source-map-1.1.0.tgz",
|
||||
"integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"source-map": "^0.6.1"
|
||||
},
|
||||
@@ -11205,8 +11283,7 @@
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"dev": true
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -11922,8 +11999,7 @@
|
||||
"node-releases": {
|
||||
"version": "2.0.14",
|
||||
"resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.14.tgz",
|
||||
"integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw=="
|
||||
},
|
||||
"node-sass": {
|
||||
"version": "4.14.1",
|
||||
@@ -14223,6 +14299,11 @@
|
||||
"integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==",
|
||||
"dev": true
|
||||
},
|
||||
"qrcodejs2": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/qrcodejs2/-/qrcodejs2-0.0.2.tgz",
|
||||
"integrity": "sha512-+Y4HA+cb6qUzdgvI3KML8GYpMFwB24dFwzMkS/yXq6hwtUGNUnZQdUnksrV1XGMc2mid5ROw5SAuY9XhI3ValA=="
|
||||
},
|
||||
"qs": {
|
||||
"version": "6.11.2",
|
||||
"resolved": "https://registry.npmmirror.com/qs/-/qs-6.11.2.tgz",
|
||||
@@ -15841,6 +15922,11 @@
|
||||
"resolved": "https://registry.npmmirror.com/stream-wormhole/-/stream-wormhole-1.1.0.tgz",
|
||||
"integrity": "sha512-gHFfL3px0Kctd6Po0M8TzEvt3De/xu6cnRrjlfYNhwbhLPLwigI2t1nc6jrzNuaYg5C4YF78PPFuQPzRiqn9ew=="
|
||||
},
|
||||
"streamsaver": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmmirror.com/streamsaver/-/streamsaver-2.0.6.tgz",
|
||||
"integrity": "sha512-LK4e7TfCV8HzuM0PKXuVUfKyCB1FtT9L0EGxsFk5Up8njj0bXK8pJM9+Wq2Nya7/jslmCQwRK39LFm55h7NBTw=="
|
||||
},
|
||||
"strict-uri-encode": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
|
||||
@@ -17160,7 +17246,6 @@
|
||||
"version": "1.0.13",
|
||||
"resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz",
|
||||
"integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"escalade": "^3.1.1",
|
||||
"picocolors": "^1.0.0"
|
||||
@@ -17767,7 +17852,6 @@
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"bindings": "^1.5.0",
|
||||
"nan": "^2.12.1"
|
||||
}
|
||||
},
|
||||
@@ -18898,45 +18982,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"zip-stream": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/zip-stream/-/zip-stream-4.1.1.tgz",
|
||||
"integrity": "sha512-9qv4rlDiopXg4E69k+vMHjNN63YFMe9sZMrdlvKnCjlCRWeCBswPPMPUfx+ipsAWq1LXHe70RcbaHdJJpS6hyQ==",
|
||||
"requires": {
|
||||
"archiver-utils": "^3.0.4",
|
||||
"compress-commons": "^4.1.2",
|
||||
"readable-stream": "^3.6.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"archiver-utils": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmmirror.com/archiver-utils/-/archiver-utils-3.0.4.tgz",
|
||||
"integrity": "sha512-KVgf4XQVrTjhyWmx6cte4RxonPLR9onExufI1jhvw/MQ4BB6IsZD5gT8Lq+u/+pRkWna/6JoHpiQioaqFP5Rzw==",
|
||||
"requires": {
|
||||
"glob": "^7.2.3",
|
||||
"graceful-fs": "^4.2.0",
|
||||
"lazystream": "^1.0.0",
|
||||
"lodash.defaults": "^4.2.0",
|
||||
"lodash.difference": "^4.5.0",
|
||||
"lodash.flatten": "^4.4.0",
|
||||
"lodash.isplainobject": "^4.0.6",
|
||||
"lodash.union": "^4.6.0",
|
||||
"normalize-path": "^3.0.0",
|
||||
"readable-stream": "^3.6.0"
|
||||
}
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz",
|
||||
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
"util-deprecate": "^1.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"zrender": {
|
||||
"version": "4.3.2",
|
||||
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-4.3.2.tgz",
|
||||
|
||||
+9
-4
@@ -27,11 +27,13 @@
|
||||
"axios": "0.18.1",
|
||||
"babel-eslint": "7.2.3",
|
||||
"copy-webpack-plugin": "^4.5.2",
|
||||
"@aws-sdk/client-s3": "^3.370.0",
|
||||
"core-js": "^3.8.3",
|
||||
"cornerstone-core": "^2.3.0",
|
||||
"cornerstone-math": "^0.1.8",
|
||||
"cornerstone-tools": "^6.0.8",
|
||||
"cornerstone-wado-image-loader": "^3.1.2",
|
||||
"cornerstone-core": "^2.6.1",
|
||||
"cornerstone-math": "^0.1.10",
|
||||
"cornerstone-tools": "^6.0.10",
|
||||
"cornerstone-wado-image-loader": "^4.13.2",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dcmjs": "^0.29.8",
|
||||
"dicom-parser": "^1.8.9",
|
||||
"dicomedit": "^0.1.0",
|
||||
@@ -42,6 +44,7 @@
|
||||
"hammerjs": "^2.0.8",
|
||||
"html2canvas": "^1.4.1",
|
||||
"js-md5": "^0.7.3",
|
||||
"jsencrypt": "^3.3.2",
|
||||
"jszip": "^3.7.1",
|
||||
"moment": "^2.27.0",
|
||||
"node-polyfill-webpack-plugin": "^2.0.1",
|
||||
@@ -51,9 +54,11 @@
|
||||
"path-to-regexp": "2.4.0",
|
||||
"pdfobject": "^2.2.8",
|
||||
"popper.js": "^1.16.1",
|
||||
"qrcodejs2": "0.0.2",
|
||||
"sass-loader": "^8.0.0",
|
||||
"screenfull": "^4.2.0",
|
||||
"sortablejs": "^1.15.0",
|
||||
"streamsaver": "^2.0.6",
|
||||
"v-viewer": "^1.6.4",
|
||||
"vcrontab": "^0.3.5",
|
||||
"vue": "^2.6.11",
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
<!--
|
||||
mitm.html is the lite "man in the middle"
|
||||
|
||||
This is only meant to signal the opener's messageChannel to
|
||||
the service worker - when that is done this mitm can be closed
|
||||
but it's better to keep it alive since this also stops the sw
|
||||
from restarting
|
||||
|
||||
The service worker is capable of intercepting all request and fork their
|
||||
own "fake" response - wish we are going to craft
|
||||
when the worker then receives a stream then the worker will tell the opener
|
||||
to open up a link that will start the download
|
||||
-->
|
||||
<script>
|
||||
// This will prevent the sw from restarting
|
||||
let keepAlive = () => {
|
||||
keepAlive = () => {}
|
||||
var ping = location.href.substr(0, location.href.lastIndexOf('/')) + '/ping'
|
||||
var interval = setInterval(() => {
|
||||
if (sw) {
|
||||
sw.postMessage('ping')
|
||||
} else {
|
||||
fetch(ping).then(res => res.text(!res.ok && clearInterval(interval)))
|
||||
}
|
||||
}, 10000)
|
||||
}
|
||||
|
||||
// message event is the first thing we need to setup a listner for
|
||||
// don't want the opener to do a random timeout - instead they can listen for
|
||||
// the ready event
|
||||
// but since we need to wait for the Service Worker registration, we store the
|
||||
// message for later
|
||||
let messages = []
|
||||
window.onmessage = evt => messages.push(evt)
|
||||
|
||||
let sw = null
|
||||
let scope = ''
|
||||
|
||||
function registerWorker() {
|
||||
return navigator.serviceWorker.getRegistration('./').then(swReg => {
|
||||
return swReg || navigator.serviceWorker.register('sw.js', { scope: './' })
|
||||
}).then(swReg => {
|
||||
const swRegTmp = swReg.installing || swReg.waiting
|
||||
|
||||
scope = swReg.scope
|
||||
|
||||
return (sw = swReg.active) || new Promise(resolve => {
|
||||
swRegTmp.addEventListener('statechange', fn = () => {
|
||||
if (swRegTmp.state === 'activated') {
|
||||
swRegTmp.removeEventListener('statechange', fn)
|
||||
sw = swReg.active
|
||||
resolve()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// Now that we have the Service Worker registered we can process messages
|
||||
function onMessage (event) {
|
||||
let { data, ports, origin } = event
|
||||
|
||||
// It's important to have a messageChannel, don't want to interfere
|
||||
// with other simultaneous downloads
|
||||
if (!ports || !ports.length) {
|
||||
throw new TypeError("[StreamSaver] You didn't send a messageChannel")
|
||||
}
|
||||
|
||||
if (typeof data !== 'object') {
|
||||
throw new TypeError("[StreamSaver] You didn't send a object")
|
||||
}
|
||||
|
||||
// the default public service worker for StreamSaver is shared among others.
|
||||
// so all download links needs to be prefixed to avoid any other conflict
|
||||
data.origin = origin
|
||||
|
||||
// if we ever (in some feature versoin of streamsaver) would like to
|
||||
// redirect back to the page of who initiated a http request
|
||||
data.referrer = data.referrer || document.referrer || origin
|
||||
|
||||
// pass along version for possible backwards compatibility in sw.js
|
||||
data.streamSaverVersion = new URLSearchParams(location.search).get('version')
|
||||
|
||||
if (data.streamSaverVersion === '1.2.0') {
|
||||
console.warn('[StreamSaver] please update streamsaver')
|
||||
}
|
||||
|
||||
/** @since v2.0.0 */
|
||||
if (!data.headers) {
|
||||
console.warn("[StreamSaver] pass `data.headers` that you would like to pass along to the service worker\nit should be a 2D array or a key/val object that fetch's Headers api accepts")
|
||||
} else {
|
||||
// test if it's correct
|
||||
// should thorw a typeError if not
|
||||
new Headers(data.headers)
|
||||
}
|
||||
|
||||
/** @since v2.0.0 */
|
||||
if (typeof data.filename === 'string') {
|
||||
console.warn("[StreamSaver] You shouldn't send `data.filename` anymore. It should be included in the Content-Disposition header option")
|
||||
// Do what File constructor do with fileNames
|
||||
data.filename = data.filename.replace(/\//g, ':')
|
||||
}
|
||||
|
||||
/** @since v2.0.0 */
|
||||
if (data.size) {
|
||||
console.warn("[StreamSaver] You shouldn't send `data.size` anymore. It should be included in the content-length header option")
|
||||
}
|
||||
|
||||
/** @since v2.0.0 */
|
||||
if (data.readableStream) {
|
||||
console.warn("[StreamSaver] You should send the readableStream in the messageChannel, not throught mitm")
|
||||
}
|
||||
|
||||
/** @since v2.0.0 */
|
||||
if (!data.pathname) {
|
||||
console.warn("[StreamSaver] Please send `data.pathname` (eg: /pictures/summer.jpg)")
|
||||
data.pathname = Math.random().toString().slice(-6) + '/' + data.filename
|
||||
}
|
||||
|
||||
// remove all leading slashes
|
||||
data.pathname = data.pathname.replace(/^\/+/g, '')
|
||||
|
||||
// remove protocol
|
||||
let org = origin.replace(/(^\w+:|^)\/\//, '')
|
||||
|
||||
// set the absolute pathname to the download url.
|
||||
data.url = new URL(`${scope + org}/${data.pathname}`).toString()
|
||||
|
||||
if (!data.url.startsWith(`${scope + org}/`)) {
|
||||
throw new TypeError('[StreamSaver] bad `data.pathname`')
|
||||
}
|
||||
|
||||
// This sends the message data as well as transferring
|
||||
// messageChannel.port2 to the service worker. The service worker can
|
||||
// then use the transferred port to reply via postMessage(), which
|
||||
// will in turn trigger the onmessage handler on messageChannel.port1.
|
||||
|
||||
const transferable = data.readableStream
|
||||
? [ ports[0], data.readableStream ]
|
||||
: [ ports[0] ]
|
||||
|
||||
if (!(data.readableStream || data.transferringReadable)) {
|
||||
keepAlive()
|
||||
}
|
||||
|
||||
return sw.postMessage(data, transferable)
|
||||
}
|
||||
|
||||
if (window.opener) {
|
||||
// The opener can't listen to onload event, so we need to help em out!
|
||||
// (telling them that we are ready to accept postMessage's)
|
||||
window.opener.postMessage('StreamSaver::loadedPopup', '*')
|
||||
}
|
||||
|
||||
if (navigator.serviceWorker) {
|
||||
registerWorker().then(() => {
|
||||
window.onmessage = onMessage
|
||||
messages.forEach(window.onmessage)
|
||||
})
|
||||
}
|
||||
|
||||
// FF v102 just started to supports transferable streams, but still needs to ping sw.js
|
||||
// even tough the service worker dose not have to do any kind of work and listen to any
|
||||
// messages... #305
|
||||
keepAlive()
|
||||
|
||||
</script>
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
/* global self ReadableStream Response */
|
||||
|
||||
self.addEventListener('install', () => {
|
||||
self.skipWaiting()
|
||||
})
|
||||
|
||||
self.addEventListener('activate', event => {
|
||||
event.waitUntil(self.clients.claim())
|
||||
})
|
||||
|
||||
const map = new Map()
|
||||
|
||||
// This should be called once per download
|
||||
// Each event has a dataChannel that the data will be piped through
|
||||
self.onmessage = event => {
|
||||
// We send a heartbeat every x second to keep the
|
||||
// service worker alive if a transferable stream is not sent
|
||||
if (event.data === 'ping') {
|
||||
return
|
||||
}
|
||||
|
||||
const data = event.data
|
||||
const downloadUrl = data.url || self.registration.scope + Math.random() + '/' + (typeof data === 'string' ? data : data.filename)
|
||||
const port = event.ports[0]
|
||||
const metadata = new Array(3) // [stream, data, port]
|
||||
|
||||
metadata[1] = data
|
||||
metadata[2] = port
|
||||
|
||||
// Note to self:
|
||||
// old streamsaver v1.2.0 might still use `readableStream`...
|
||||
// but v2.0.0 will always transfer the stream through MessageChannel #94
|
||||
if (event.data.readableStream) {
|
||||
metadata[0] = event.data.readableStream
|
||||
} else if (event.data.transferringReadable) {
|
||||
port.onmessage = evt => {
|
||||
port.onmessage = null
|
||||
metadata[0] = evt.data.readableStream
|
||||
}
|
||||
} else {
|
||||
metadata[0] = createStream(port)
|
||||
}
|
||||
|
||||
map.set(downloadUrl, metadata)
|
||||
port.postMessage({ download: downloadUrl })
|
||||
}
|
||||
|
||||
function createStream (port) {
|
||||
// ReadableStream is only supported by chrome 52
|
||||
return new ReadableStream({
|
||||
start (controller) {
|
||||
// When we receive data on the messageChannel, we write
|
||||
port.onmessage = ({ data }) => {
|
||||
if (data === 'end') {
|
||||
return controller.close()
|
||||
}
|
||||
|
||||
if (data === 'abort') {
|
||||
controller.error('Aborted the download')
|
||||
return
|
||||
}
|
||||
|
||||
controller.enqueue(data)
|
||||
}
|
||||
},
|
||||
cancel (reason) {
|
||||
console.log('user aborted', reason)
|
||||
port.postMessage({ abort: true })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
self.onfetch = event => {
|
||||
const url = event.request.url
|
||||
|
||||
// this only works for Firefox
|
||||
if (url.endsWith('/ping')) {
|
||||
return event.respondWith(new Response('pong'))
|
||||
}
|
||||
|
||||
const hijacke = map.get(url)
|
||||
|
||||
if (!hijacke) return null
|
||||
|
||||
const [ stream, data, port ] = hijacke
|
||||
|
||||
map.delete(url)
|
||||
|
||||
// Not comfortable letting any user control all headers
|
||||
// so we only copy over the length & disposition
|
||||
const responseHeaders = new Headers({
|
||||
'Content-Type': 'application/octet-stream; charset=utf-8',
|
||||
|
||||
// To be on the safe side, The link can be opened in a iframe.
|
||||
// but octet-stream should stop it.
|
||||
'Content-Security-Policy': "default-src 'none'",
|
||||
'X-Content-Security-Policy': "default-src 'none'",
|
||||
'X-WebKit-CSP': "default-src 'none'",
|
||||
'X-XSS-Protection': '1; mode=block',
|
||||
'Cross-Origin-Embedder-Policy': 'require-corp'
|
||||
})
|
||||
|
||||
let headers = new Headers(data.headers || {})
|
||||
|
||||
if (headers.has('Content-Length')) {
|
||||
responseHeaders.set('Content-Length', headers.get('Content-Length'))
|
||||
}
|
||||
|
||||
if (headers.has('Content-Disposition')) {
|
||||
responseHeaders.set('Content-Disposition', headers.get('Content-Disposition'))
|
||||
}
|
||||
|
||||
// data, data.filename and size should not be used anymore
|
||||
if (data.size) {
|
||||
console.warn('Depricated')
|
||||
responseHeaders.set('Content-Length', data.size)
|
||||
}
|
||||
|
||||
let fileName = typeof data === 'string' ? data : data.filename
|
||||
if (fileName) {
|
||||
console.warn('Depricated')
|
||||
// Make filename RFC5987 compatible
|
||||
fileName = encodeURIComponent(fileName).replace(/['()]/g, escape).replace(/\*/g, '%2A')
|
||||
responseHeaders.set('Content-Disposition', "attachment; filename*=UTF-8''" + fileName)
|
||||
}
|
||||
|
||||
event.respondWith(new Response(stream, { headers: responseHeaders }))
|
||||
|
||||
port.postMessage({ debug: 'Download started' })
|
||||
}
|
||||
+10
-1
@@ -3,6 +3,7 @@
|
||||
<router-view />
|
||||
<div
|
||||
v-show="show"
|
||||
v-if="$route.matched.length > 0"
|
||||
v-adaptive
|
||||
@click="openI18n"
|
||||
style="
|
||||
@@ -81,6 +82,7 @@
|
||||
>
|
||||
</div>
|
||||
</el-drawer>
|
||||
<feedBack v-if="$route.matched.length > 0" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -90,10 +92,12 @@ import {
|
||||
getFrontInternationalizationList,
|
||||
} from "@/api/dictionary/dictionary";
|
||||
import { getTrialExtralConfig } from "@/api/trials";
|
||||
import feedBack from "@/views/trials/trials-layout/components/feedBack";
|
||||
import Vue from "vue";
|
||||
import i18n from "./lang";
|
||||
export default {
|
||||
name: "App",
|
||||
components: { feedBack },
|
||||
data() {
|
||||
return {
|
||||
drawer: false,
|
||||
@@ -111,7 +115,9 @@ export default {
|
||||
async handler() {
|
||||
if (
|
||||
this.$route.query.trialId &&
|
||||
this.$route.query.trialId !== this.$store.state.trials.config.trialId
|
||||
this.$route.query.trialId !==
|
||||
this.$store.state.trials.config.trialId &&
|
||||
this.$store.state.trials.whiteList.indexOf(this.$route.path) === -1
|
||||
) {
|
||||
let res = await getTrialExtralConfig({
|
||||
TrialId: this.$route.query.trialId,
|
||||
@@ -275,4 +281,7 @@ textarea {
|
||||
.title-logo {
|
||||
height: 40px;
|
||||
}
|
||||
.title-logo {
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -277,3 +277,19 @@ export function batchAddInternationalization(param) {
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
// 国际化获取迭代列表
|
||||
export function getPublishVersionSelect() {
|
||||
return request({
|
||||
url: `/PublishLog/getPublishVersionSelect`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 国际化批量更新
|
||||
export function batchUpdateInternationalInfo(data) {
|
||||
return request({
|
||||
url: `/Internationalization/batchUpdateInternationalInfo`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1013,4 +1013,36 @@ export function getTrialSiteList(params) {
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
// 获取版本记录列表
|
||||
export function getExploreRecommendList(params) {
|
||||
return request({
|
||||
url: `/ExploreRecommend/getExploreRecommendList`,
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 新增或修改推荐版本记录
|
||||
export function addOrUpdateExploreRecommend(params) {
|
||||
return request({
|
||||
url: `/ExploreRecommend/addOrUpdateExploreRecommend`,
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 删除推荐版本记录
|
||||
export function deleteExploreRecommend(id) {
|
||||
return request({
|
||||
url: `/ExploreRecommend/deleteExploreRecommend/${id}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
// 获取推荐版本记录详情
|
||||
export function getExploreRecommentInfo(params) {
|
||||
return request({
|
||||
url: `/ExploreRecommend/getExploreRecommentInfo`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
@@ -51,4 +51,10 @@ export function batchAddOrUpdateFrontInternationalization(params) {
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
// 获取当前版本
|
||||
export function getCurrentPublishInfo() {
|
||||
return request({
|
||||
url: `/PublishLog/getCurrentPublishInfo`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -160,3 +160,30 @@ export function getSubjectProgress_Export(param) {
|
||||
data: param
|
||||
})
|
||||
}
|
||||
// 导出项目列表
|
||||
export function getTrialList_Export(data) {
|
||||
return requestDownload({
|
||||
url: `/ExcelExport/getTrialList_Export`,
|
||||
responseType: 'blob',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 导出培训记录
|
||||
export function pMTrainingRecordList_Export(data) {
|
||||
return requestDownload({
|
||||
url: `/ExcelExport/pMTrainingRecordList_Export`,
|
||||
responseType: 'blob',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 导出影像指控
|
||||
export function qCVisitList_Export(data) {
|
||||
return requestDownload({
|
||||
url: `/ExcelExport/qCVisitList_Export`,
|
||||
responseType: 'blob',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
+59
-3
@@ -8,11 +8,11 @@ export function requestPackageAndAnonymizImage(params) {
|
||||
})
|
||||
}
|
||||
// 获取影像上传列表
|
||||
export function getSubjectImageUploadList(params) {
|
||||
export function getSubjectImageUploadList(data) {
|
||||
return request({
|
||||
url: '/DownloadAndUpload/getSubjectImageUploadList',
|
||||
method: 'get',
|
||||
params
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 预上传
|
||||
@@ -39,4 +39,60 @@ export function deleteTaskStudy(params) {
|
||||
method: 'delete',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 获取iqc下载文件信息
|
||||
export function getCRCUploadedStudyInfo(data) {
|
||||
return request({
|
||||
url: '/DownloadAndUpload/getCRCUploadedStudyInfo',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取ir阅片和任务列表
|
||||
export function getSubjectImageDownloadSelectList(data) {
|
||||
return request({
|
||||
url: '/DownloadAndUpload/getSubjectImageDownloadSelectList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取ir阅片和任务下载文件信息
|
||||
export function getIRReadingDownloadStudyInfo(data) {
|
||||
return request({
|
||||
url: '/DownloadAndUpload/getIRReadingDownloadStudyInfo',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取ir阅片和任务非dicom上传列表
|
||||
export function getIRUploadTaskNoneDicomStudyList(data) {
|
||||
return request({
|
||||
url: '/DownloadAndUpload/getIRUploadTaskNoneDicomStudyList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 校验上传影像
|
||||
export function verifyIRStudyAllowUpload(data) {
|
||||
return request({
|
||||
url: '/DownloadAndUpload/verifyIRStudyAllowUpload',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 影像下载成功确认
|
||||
export function downloadImageSuccess(params) {
|
||||
return request({
|
||||
url: '/DownloadAndUpload/downloadImageSuccess',
|
||||
method: 'post',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 影像下载记录列表
|
||||
export function getTrialDownloadList(data) {
|
||||
return request({
|
||||
url: '/DownloadAndUpload/getTrialDownloadList',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
+63
-1
@@ -1,5 +1,5 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
import requestDownload from '@/utils/request-download'
|
||||
export function addBaseLineLesion(param) {
|
||||
return request({
|
||||
url: '/report/addBaseLineLesion',
|
||||
@@ -187,3 +187,65 @@ export function setSkipReadingCache(param) {
|
||||
data: param
|
||||
})
|
||||
}
|
||||
export function resetReadingTask(param) {
|
||||
return request({
|
||||
url: `/ReadingImageTask/resetReadingTask`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
export function getTaskUploadedDicomStudyList(param) {
|
||||
return request({
|
||||
url: `/DownloadAndUpload/getTaskUploadedDicomStudyList`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
export function getIVUSTemplate(param) {
|
||||
return requestDownload({
|
||||
url: '/IVUSCalculate/getIVUSTemplate',
|
||||
method: 'post',
|
||||
responseType: 'blob',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
export function uploadIVUSTemplate(param) {
|
||||
return request({
|
||||
url: `/IVUSCalculate/uploadIVUSTemplate`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function getOCTFCTTemplate(param) {
|
||||
return requestDownload({
|
||||
url: '/OCTCalculate/getOCTFCTTemplate',
|
||||
method: 'post',
|
||||
responseType: 'blob',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function uploadOCTFCTTemplate(param) {
|
||||
return request({
|
||||
url: `/OCTCalculate/uploadOCTFCTTemplate`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function getOCTLipidAngleTemplate(param) {
|
||||
return requestDownload({
|
||||
url: '/OCTCalculate/getOCTLipidAngleTemplate',
|
||||
method: 'post',
|
||||
responseType: 'blob',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
export function uploadOCTLipidAngleTemplate(param) {
|
||||
return request({
|
||||
url: `/OCTCalculate/uploadOCTLipidAngleTemplate`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
+225
-2
@@ -1364,9 +1364,9 @@ export function getForwardList(param) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getNoneDicomStudyList(subjectVisitId, sudyId = '', isFilterZip = false) {
|
||||
export function getNoneDicomStudyList(subjectVisitId, sudyId = '', isFilterZip = false, visitTaskId = '') {
|
||||
return request({
|
||||
url: `/NoneDicomStudy/getNoneDicomStudyList?subjectVisitId=${subjectVisitId}&nonedicomStudyId=${sudyId}&isFilterZip=${isFilterZip}`,
|
||||
url: `/NoneDicomStudy/getNoneDicomStudyList?subjectVisitId=${subjectVisitId}&nonedicomStudyId=${sudyId}&isFilterZip=${isFilterZip}&visitTaskId=${visitTaskId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -3675,6 +3675,54 @@ export function getTrialSiteSelectList(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function getNextIRMedicalFeedback(param) {
|
||||
return request({
|
||||
url: `/ReadingMedicalReview/getNextIRMedicalFeedback`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function getNextCRCChallenge(param) {
|
||||
return request({
|
||||
url: `/QCList/getNextCRCChallenge`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
// 获取中心dicomae列表
|
||||
export function getTrialSiteDicomAEList(param) {
|
||||
return request({
|
||||
url: `/TrialSiteDicomAE/getTrialSiteDicomAEList`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
// 新增或修改中心dicomae信息
|
||||
export function addOrUpdateTrialSiteDicomAE(param) {
|
||||
return request({
|
||||
url: `/TrialSiteDicomAE/addOrUpdateTrialSiteDicomAE`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
// 删除中心dicomae信息
|
||||
export function deleteTrialSiteDicomAE(id) {
|
||||
return request({
|
||||
url: `/TrialSiteDicomAE/deleteTrialSiteDicomAE/${id}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
// 获取项目中dicomAE配置
|
||||
export function getTrialDicomAE(params) {
|
||||
return request({
|
||||
url: `/TrialDicomAE/getTrialDicomAE`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 获取项目配置
|
||||
export function getTrialExtralConfig(params) {
|
||||
return request({
|
||||
@@ -3683,3 +3731,178 @@ export function getTrialExtralConfig(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
// 项目新增或修改dicomAE配置
|
||||
export function addOrUpdateDicomAE(data) {
|
||||
return request({
|
||||
url: `/TrialDicomAE/addOrUpdateDicomAE`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 测试dicomAE链接
|
||||
export function testSCPServerConnect(data) {
|
||||
return request({
|
||||
url: `/TrialDicomAE/testSCPServerConnect`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取dicomAE默认值
|
||||
export function getTrialPacsConfigInfo(params) {
|
||||
return request({
|
||||
url: `/TrialConfig/getTrialPacsConfigInfo`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// dicomAE配置签名
|
||||
export function ConfigTrialPACSInfoConfirm(data) {
|
||||
return request({
|
||||
url: `/Inspection/configTrialBasicInfo/ConfigTrialPACSInfoConfirm`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取推送记录
|
||||
export function getSCPImageUploadList(data) {
|
||||
return request({
|
||||
url: `/Patient/getSCPImageUploadList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取影像检查患者列表
|
||||
export function getPatientList(data) {
|
||||
return request({
|
||||
url: `/Patient/getPatientList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取影像检查患者检查列表
|
||||
export function getPatientStudyList(data) {
|
||||
return request({
|
||||
url: `/Patient/getPatientStudyList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取接收方AE列表
|
||||
export function getDicomCalledAEList(params) {
|
||||
return request({
|
||||
url: `/Patient/getDicomCalledAEList`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 获取发送方AE列表
|
||||
export function getDicomCallingAEList(params) {
|
||||
return request({
|
||||
url: `/Patient/getDicomCallingAEList`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// CRCpacs上传检查列表
|
||||
export function getVisitPatientStudyFilterList(data) {
|
||||
return request({
|
||||
url: `/Patient/getVisitPatientStudyFilterList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// CRCpacs上传检查校验
|
||||
export function verifyPacsImage(data) {
|
||||
return request({
|
||||
url: `/Patient/verifyPacsImage`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// CRCpacs上传检查
|
||||
export function submitVisitStudyBinding(data) {
|
||||
return request({
|
||||
url: `/Patient/submitVisitStudyBinding`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取pacs检查技术
|
||||
export function getDicomModalityList(params) {
|
||||
return request({
|
||||
url: `/Patient/getDicomModalityList`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 获取患者序列信息
|
||||
export function getPatientSeriesList(scpStudyId) {
|
||||
return request({
|
||||
url: `/Patient/getPatientSeriesList?scpStudyId=${scpStudyId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 获取反馈列表
|
||||
export function getUserFeedBackList(data) {
|
||||
return request({
|
||||
url: `/UserFeedBack/getUserFeedBackList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 更新反馈状态
|
||||
export function batchUpdateFeedBackState(data) {
|
||||
return request({
|
||||
url: `/UserFeedBack/batchUpdateFeedBackState`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 新增或修改意见反馈
|
||||
export function addOrUpdateUserFeedBack(data) {
|
||||
return request({
|
||||
url: `/UserFeedBack/addOrUpdateUserFeedBack`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取反馈详情
|
||||
export function getUserFeedBackInfo(data) {
|
||||
return request({
|
||||
url: `/UserFeedBack/getUserFeedBackInfo`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 一致性分析获取临床数据列表
|
||||
export function getConsistencyAnalysisReadingClinicalDataList(data) {
|
||||
return request({
|
||||
url: `/ReadingClinicalData/getConsistencyAnalysisReadingClinicalDataList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 新增或修改一致性分析临床数据
|
||||
export function addOrUpdateConsistencyAnalysisReadingClinicalData(data) {
|
||||
return request({
|
||||
url: `/ReadingClinicalData/addOrUpdateConsistencyAnalysisReadingClinicalData`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 一致性分析临床数据签名
|
||||
export function signConsistencyAnalysisReadingClinicalData(data) {
|
||||
return request({
|
||||
url: `/Inspection/ReadingClinicalData/SignConsistencyAnalysisReadingClinicalData`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 一致性分析临床数据设置任务为有效
|
||||
export function setTaskValid(data) {
|
||||
return request({
|
||||
url: `/ReadingClinicalData/setTaskValid`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
+9
-1
@@ -4,7 +4,8 @@ export function login(data) {
|
||||
return request({
|
||||
url: '/user/login',
|
||||
method: 'post',
|
||||
data
|
||||
data,
|
||||
ENCRYPT: true
|
||||
})
|
||||
}
|
||||
export function loginOut(params) {
|
||||
@@ -185,3 +186,10 @@ export function sendMFAEmail(params) {
|
||||
params
|
||||
})
|
||||
}
|
||||
// 获取公钥
|
||||
export function getPublicKey() {
|
||||
return request({
|
||||
url: `/user/getPublicKey`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 61 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB |
@@ -120,9 +120,9 @@
|
||||
v-if="item.type === 'Daterange'"
|
||||
v-model="searchData[item.prop]"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
:range-separator="$t('baseForm:daterange:rangeSeparator')"
|
||||
:start-placeholder="$t('baseForm:daterange:startPlaceholder')"
|
||||
:end-placeholder="$t('baseForm:daterange:startendPlaceholder')"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
:style="{ width: item.width }"
|
||||
|
||||
@@ -81,16 +81,25 @@
|
||||
<!-- <div v-show="stack.firstImageLoading" class="load-indicator">
|
||||
Loading Series #{{ stack.seriesNumber }}...
|
||||
</div>-->
|
||||
<el-dialog
|
||||
v-if="dcmTag.visible"
|
||||
:visible.sync="dcmTag.visible"
|
||||
:close-on-click-modal="false"
|
||||
:title="dcmTag.title"
|
||||
width="1000px"
|
||||
custom-class="base-dialog-wrapper"
|
||||
append-to-body
|
||||
>
|
||||
<DicomTags :image-id="stack.imageIds[stack.currentImageIdIndex]" @close="dcmTag.visible = false" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import Contextmenu from 'vue-contextmenujs'
|
||||
Vue.use(Contextmenu)
|
||||
import * as cornerstone from 'cornerstone-core'
|
||||
import * as cornerstoneMath from 'cornerstone-math'
|
||||
import * as cornerstoneTools from 'cornerstone-tools'
|
||||
|
||||
const scroll = cornerstoneTools.import('util/scrollToIndex')
|
||||
import Hammer from 'hammerjs'
|
||||
import getOrientationString from '@/views/trials/trials-panel/reading/dicoms/tools/OrientationMarkers/getOrientationString'
|
||||
@@ -108,8 +117,10 @@ cornerstoneTools.toolColors.setActiveColor('rgb(0, 255, 0)')
|
||||
// cornerstoneTools.init({ showSVGCursors: true })
|
||||
cornerstoneTools.init()
|
||||
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
||||
import DicomTags from './DicomTags'
|
||||
export default {
|
||||
name: 'DicomCanvas',
|
||||
components: { DicomTags },
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
@@ -164,7 +175,8 @@ export default {
|
||||
mousePosition: { x: '', y: '', mo: '' },
|
||||
markers: { top: '', right: '', bottom: '', left: '' },
|
||||
orientationMarkers: [],
|
||||
originalMarkers: []
|
||||
originalMarkers: [],
|
||||
dcmTag: { visible: false, title: this.$t('trials:dicom-tag:title') }
|
||||
}
|
||||
},
|
||||
|
||||
@@ -200,7 +212,7 @@ export default {
|
||||
this.stack.seriesId = dicomSeries.seriesId
|
||||
this.stack.seriesNumber = dicomSeries.seriesNumber
|
||||
this.stack.imageIds = dicomSeries.imageIds
|
||||
this.stack.currentImageIdIndex = dicomSeries.imageIdIndex ? dicomSeries.imageIdIndex : 0
|
||||
this.stack.currentImageIdIndex = dicomSeries.imageIdIndex && dicomSeries.imageIdIndex < dicomSeries.imageIds.length ? dicomSeries.imageIdIndex : 0
|
||||
this.stack.firstImageLoading = true
|
||||
this.stack.description = dicomSeries.description
|
||||
this.toolState.viewportInvert = false
|
||||
@@ -212,6 +224,8 @@ export default {
|
||||
this.toolState.clipPlaying = false
|
||||
const element = this.$refs.canvas
|
||||
cornerstone.enable(element)
|
||||
cornerstoneTools.stopClip(this.canvas)
|
||||
this.toolState.clipPlaying = false
|
||||
this.loading = true
|
||||
|
||||
cornerstone.loadAndCacheImage(this.stack.imageIds[this.stack.currentImageIdIndex])
|
||||
@@ -362,8 +376,8 @@ export default {
|
||||
if (this.dicomInfo.thick) {
|
||||
this.dicomInfo.thick = this.dicomInfo.thick.toFixed(2)
|
||||
}
|
||||
let newImageIdIndex = this.stack.imageIds.findIndex(i=>i===e.detail.image.imageId)
|
||||
if(newImageIdIndex === -1) return
|
||||
const newImageIdIndex = this.stack.imageIds.findIndex(i => i === e.detail.image.imageId)
|
||||
if (newImageIdIndex === -1) return
|
||||
this.stack.currentImageIdIndex = newImageIdIndex
|
||||
this.stack.imageIdIndex = newImageIdIndex
|
||||
this.series.imageIdIndex = newImageIdIndex
|
||||
@@ -439,7 +453,7 @@ export default {
|
||||
if (!markers) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
this.orientationMarkers = [oppositeColumn, row, column, oppositeRow]
|
||||
this.originalMarkers = [oppositeColumn, row, column, oppositeRow]
|
||||
this.setMarkers()
|
||||
@@ -634,7 +648,7 @@ export default {
|
||||
enabledElement.renderingTools.renderCanvasData = renderCanvasData
|
||||
},
|
||||
scrollPage(offset) {
|
||||
if(this.loading) return
|
||||
if (this.loading) return
|
||||
var index = this.stack.currentImageIdIndex + offset
|
||||
if (index < 0) index = 0
|
||||
else if (index >= this.stack.imageIds.length) {
|
||||
@@ -646,7 +660,7 @@ export default {
|
||||
},
|
||||
|
||||
toggleClipPlay() {
|
||||
if(this.loading) return
|
||||
if (this.loading) return
|
||||
if (this.toolState.clipPlaying) {
|
||||
cornerstoneTools.stopClip(this.canvas)
|
||||
this.toolState.clipPlaying = false
|
||||
@@ -666,7 +680,7 @@ export default {
|
||||
resetWwwc() {
|
||||
this.toolState.viewportInvert = false
|
||||
var viewport = cornerstone.getViewport(this.canvas)
|
||||
viewport.invert = false
|
||||
// viewport.invert = false
|
||||
var image = cornerstone.getImage(this.canvas)
|
||||
viewport.voi.windowWidth = image.windowWidth
|
||||
viewport.voi.windowCenter = image.windowCenter
|
||||
@@ -705,7 +719,7 @@ export default {
|
||||
this.orientationMarkers = [...this.originalMarkers]
|
||||
this.setMarkers()
|
||||
}
|
||||
|
||||
|
||||
var viewport = cornerstone.getViewport(this.canvas)
|
||||
viewport.hflip = false
|
||||
viewport.vflip = false
|
||||
@@ -745,6 +759,9 @@ export default {
|
||||
var uid = cornerstone.getImage(this.canvas).data.string('x00080018')
|
||||
cornerstoneTools.SaveAs(this.canvas, `${uid}.png`)
|
||||
},
|
||||
showTags() {
|
||||
this.dcmTag.visible = true
|
||||
},
|
||||
fitToWindow() {
|
||||
if (this.stack.seriesNumber) {
|
||||
cornerstone.fitToWindow(this.canvas)
|
||||
@@ -871,194 +888,197 @@ export default {
|
||||
synchronizer.remove(this.$refs.canvas)
|
||||
this.setAllToolsPassive()
|
||||
},
|
||||
onContextmenu(event) {
|
||||
const colormapsList = cornerstone.colors.getColormapsList()
|
||||
const colorItems = []
|
||||
colorItems.push({
|
||||
label: '默认值',
|
||||
onClick: () => {
|
||||
this.setColormap()
|
||||
}
|
||||
})
|
||||
colormapsList.forEach(colormap => {
|
||||
const item = {}
|
||||
item.label = colormap.name
|
||||
item.onClick = () => {
|
||||
this.setColormap(colormap.id)
|
||||
}
|
||||
colorItems.push(item)
|
||||
})
|
||||
this.$contextmenu({
|
||||
items: [
|
||||
{
|
||||
label: '移动',
|
||||
divided: true,
|
||||
onClick: () => {
|
||||
this.setToolActive('Pan')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '缩放',
|
||||
divided: true,
|
||||
children: [
|
||||
{
|
||||
label: '自由缩放',
|
||||
onClick: () => {
|
||||
this.setToolActive('Zoom')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '适应图像',
|
||||
onClick: () => {
|
||||
this.fitToWindow()
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '适应窗口',
|
||||
onClick: () => {
|
||||
this.fitToImage()
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '透镜',
|
||||
divided: true,
|
||||
onClick: () => {
|
||||
this.setToolActive('Magnify')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '旋转',
|
||||
divided: true,
|
||||
children: [
|
||||
{
|
||||
label: '默认值',
|
||||
onClick: () => {
|
||||
this.resetRotate()
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '自由旋转',
|
||||
onClick: () => {
|
||||
this.setToolActive('Rotate')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '水平翻转',
|
||||
onClick: () => {
|
||||
this.setRotate(true, false, 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '垂直翻转',
|
||||
onClick: () => {
|
||||
this.setRotate(false, true, 0)
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '左转90度',
|
||||
onClick: () => {
|
||||
this.setRotate(false, false, -90)
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '右转90度',
|
||||
onClick: () => {
|
||||
this.setRotate(false, false, 90)
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
onContextmenu(e) {
|
||||
e.stopImmediatePropagation()
|
||||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
// const colormapsList = cornerstone.colors.getColormapsList()
|
||||
// const colorItems = []
|
||||
// colorItems.push({
|
||||
// label: '默认值',
|
||||
// onClick: () => {
|
||||
// this.setColormap()
|
||||
// }
|
||||
// })
|
||||
// colormapsList.forEach(colormap => {
|
||||
// const item = {}
|
||||
// item.label = colormap.name
|
||||
// item.onClick = () => {
|
||||
// this.setColormap(colormap.id)
|
||||
// }
|
||||
// colorItems.push(item)
|
||||
// })
|
||||
// this.$contextmenu({
|
||||
// items: [
|
||||
// {
|
||||
// label: '移动',
|
||||
// divided: true,
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Pan')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '缩放',
|
||||
// divided: true,
|
||||
// children: [
|
||||
// {
|
||||
// label: '自由缩放',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Zoom')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '适应图像',
|
||||
// onClick: () => {
|
||||
// this.fitToWindow()
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '适应窗口',
|
||||
// onClick: () => {
|
||||
// this.fitToImage()
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// label: '透镜',
|
||||
// divided: true,
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Magnify')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '旋转',
|
||||
// divided: true,
|
||||
// children: [
|
||||
// {
|
||||
// label: '默认值',
|
||||
// onClick: () => {
|
||||
// this.resetRotate()
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '自由旋转',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Rotate')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '水平翻转',
|
||||
// onClick: () => {
|
||||
// this.setRotate(true, false, 0)
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '垂直翻转',
|
||||
// onClick: () => {
|
||||
// this.setRotate(false, true, 0)
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '左转90度',
|
||||
// onClick: () => {
|
||||
// this.setRotate(false, false, -90)
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '右转90度',
|
||||
// onClick: () => {
|
||||
// this.setRotate(false, false, 90)
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
|
||||
{
|
||||
label: '测量',
|
||||
divided: true,
|
||||
minWidth: 0,
|
||||
children: [
|
||||
{
|
||||
label: '探针',
|
||||
onClick: () => {
|
||||
this.setToolActive('Probe')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '长度测量',
|
||||
onClick: () => {
|
||||
this.setToolActive('Length')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '角度测量',
|
||||
onClick: () => {
|
||||
this.setToolActive('Angle')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'Cobb测量',
|
||||
onClick: () => {
|
||||
this.setToolActive('CobbAngle')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '椭圆测量',
|
||||
onClick: () => {
|
||||
this.setToolActive('EllipticalRoi')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '矩形测量',
|
||||
onClick: () => {
|
||||
this.setToolActive('RectangleRoi')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '多边形标记',
|
||||
onClick: () => {
|
||||
this.setToolActive('FreehandRoi')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '十字线',
|
||||
onClick: () => {
|
||||
this.setToolActive('Bidirectional')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '文字标注',
|
||||
onClick: () => {
|
||||
this.setToolActive('ArrowAnnotate')
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '调窗',
|
||||
divided: true,
|
||||
onClick: () => {
|
||||
this.setToolActive('Wwwc')
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '反色',
|
||||
divided: true,
|
||||
onClick: () => {
|
||||
this.toggleInvert()
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '伪彩',
|
||||
children: colorItems
|
||||
}
|
||||
],
|
||||
event,
|
||||
// x: event.clientX,
|
||||
// y: event.clientY,
|
||||
customClass: 'class-a',
|
||||
zIndex: 3,
|
||||
minWidth: 100
|
||||
})
|
||||
return false
|
||||
// {
|
||||
// label: '测量',
|
||||
// divided: true,
|
||||
// minWidth: 0,
|
||||
// children: [
|
||||
// {
|
||||
// label: '探针',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Probe')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '长度测量',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Length')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '角度测量',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Angle')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: 'Cobb测量',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('CobbAngle')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '椭圆测量',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('EllipticalRoi')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '矩形测量',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('RectangleRoi')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '多边形标记',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('FreehandRoi')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '十字线',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Bidirectional')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '文字标注',
|
||||
// onClick: () => {
|
||||
// this.setToolActive('ArrowAnnotate')
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// label: '调窗',
|
||||
// divided: true,
|
||||
// onClick: () => {
|
||||
// this.setToolActive('Wwwc')
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '反色',
|
||||
// divided: true,
|
||||
// onClick: () => {
|
||||
// this.toggleInvert()
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// label: '伪彩',
|
||||
// children: colorItems
|
||||
// }
|
||||
// ],
|
||||
// event,
|
||||
// // x: event.clientX,
|
||||
// // y: event.clientY,
|
||||
// customClass: 'class-a',
|
||||
// zIndex: 3,
|
||||
// minWidth: 100
|
||||
// })
|
||||
// return false
|
||||
},
|
||||
getToolSate() {
|
||||
const toolROITypes = [
|
||||
|
||||
@@ -0,0 +1,287 @@
|
||||
<template>
|
||||
<div class="dcm-tag">
|
||||
<el-input
|
||||
v-model="search"
|
||||
size="mini"
|
||||
:placeholder="$t('trials:dicom-tag:keywords')"
|
||||
style="width:200px"
|
||||
/>
|
||||
|
||||
<el-table
|
||||
:data="filterList(list)"
|
||||
row-key="id"
|
||||
default-expand-all
|
||||
:tree-props="{children: 'child', hasChildren: 'hasChildren'}"
|
||||
:default-sort="{prop: 'tagCode', order: 'ascending'}"
|
||||
height="500"
|
||||
>
|
||||
<el-table-column
|
||||
prop="tagCode"
|
||||
label="Tag"
|
||||
min-width="120"
|
||||
sortable
|
||||
/>
|
||||
<el-table-column
|
||||
prop="tagName"
|
||||
label="Description"
|
||||
min-width="150"
|
||||
show-overflow-tooltip
|
||||
sortable
|
||||
/>
|
||||
<el-table-column
|
||||
prop="vr"
|
||||
label="VR"
|
||||
min-width="50"
|
||||
show-overflow-tooltip
|
||||
sortable
|
||||
/>
|
||||
<el-table-column
|
||||
prop="tagLength"
|
||||
label="Length"
|
||||
min-width="80"
|
||||
show-overflow-tooltip
|
||||
sortable
|
||||
/>
|
||||
<el-table-column
|
||||
prop="value"
|
||||
label="Value"
|
||||
min-width="200"
|
||||
show-overflow-tooltip
|
||||
sortable
|
||||
/>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import TAG_DICT from './dataDictionary'
|
||||
import * as cornerstone from 'cornerstone-core'
|
||||
import dicomParser from 'dicom-parser'
|
||||
export default {
|
||||
name: 'DicomTags',
|
||||
props: {
|
||||
imageId: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
idx: 0,
|
||||
search: ''
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
const image = await cornerstone.loadAndCacheImage(this.imageId)
|
||||
var dataSet = dicomParser.parseDicom(image.data.byteArray)
|
||||
var output = []
|
||||
this.dumpDataSet(dataSet, output)
|
||||
this.list = output
|
||||
},
|
||||
methods: {
|
||||
filterList(list) {
|
||||
if (list.length === 0) return []
|
||||
if (!this.search) {
|
||||
return list
|
||||
} else {
|
||||
const search = isNaN(parseFloat(this.search)) ? this.search.toLowerCase() : String(this.search)
|
||||
const arr = list.filter(data => {
|
||||
if (data.tagCode && data.tagCode.toLowerCase().includes(search)) {
|
||||
return data
|
||||
} else if (data.tagName && data.tagName.toLowerCase().includes(search)) {
|
||||
return data
|
||||
} else if (data.value) {
|
||||
let v = ''
|
||||
if (!isNaN(parseFloat(data.value))) {
|
||||
v = String(data.value)
|
||||
} else {
|
||||
v = data.value.toLowerCase()
|
||||
}
|
||||
if (v.includes(search)) {
|
||||
return data
|
||||
}
|
||||
}
|
||||
})
|
||||
return arr
|
||||
}
|
||||
},
|
||||
dumpDataSet(dataSet, output) {
|
||||
try {
|
||||
for (const propertyName in dataSet.elements) {
|
||||
const elementObject = {}
|
||||
const element = dataSet.elements[propertyName]
|
||||
const tag = this.getTag(element.tag)
|
||||
elementObject.id = `${this.idx++}${new Date().getTime()}`
|
||||
if (!tag) {
|
||||
const group = element.tag.substring(1, 5)
|
||||
const el = element.tag.substring(5, 9)
|
||||
elementObject.tagCode = ('(' + group + ',' + el + ')').toUpperCase()
|
||||
} else {
|
||||
elementObject.tagCode = tag ? tag.tag : ''
|
||||
elementObject.tagName = tag ? tag.name : ''
|
||||
}
|
||||
|
||||
elementObject.tagLength = element.length
|
||||
elementObject.value = ''
|
||||
elementObject.child = []
|
||||
|
||||
if (element.items) {
|
||||
element.items.forEach(item => {
|
||||
const childOutput = []
|
||||
this.dumpDataSet(item.dataSet, childOutput)
|
||||
elementObject.child.push(...childOutput)
|
||||
})
|
||||
} else if (element.fragments) {
|
||||
// 多帧处理
|
||||
} else {
|
||||
var vr
|
||||
if (element.vr !== undefined) {
|
||||
vr = element.vr
|
||||
} else {
|
||||
if (tag !== undefined) {
|
||||
vr = tag.vr
|
||||
}
|
||||
}
|
||||
elementObject.vr = vr
|
||||
if (element.length < 128) {
|
||||
// const str = dataSet.string(propertyName)
|
||||
// if (elementObject.tagCode === 'x00280010') {
|
||||
// console.log(str)
|
||||
// }
|
||||
// const stringIsAscii = this.isASCII(str)
|
||||
// if (stringIsAscii && str !== undefined) {
|
||||
// elementObject.value = str
|
||||
// }
|
||||
|
||||
if (element.vr === undefined && tag === undefined) {
|
||||
if (element.length === 2) {
|
||||
elementObject.value = dataSet.uint16(propertyName)
|
||||
} else if (element.length === 4) {
|
||||
elementObject.value = dataSet.uint32(propertyName)
|
||||
}
|
||||
const str = dataSet.string(propertyName)
|
||||
const stringIsAscii = this.isASCII(str)
|
||||
|
||||
if (stringIsAscii) {
|
||||
if (str !== undefined) {
|
||||
elementObject.value = str
|
||||
}
|
||||
} else {
|
||||
if (element.length !== 2 && element.length !== 4) {
|
||||
// elementObject.value = 'binary data'
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this.isStringVr(vr)) {
|
||||
const str = dataSet.string(propertyName)
|
||||
const stringIsAscii = this.isASCII(str)
|
||||
|
||||
if (stringIsAscii) {
|
||||
if (str !== undefined) {
|
||||
elementObject.value = str
|
||||
}
|
||||
} else {
|
||||
if (element.length !== 2 && element.length !== 4) {
|
||||
// elementObject.value = 'binary data'
|
||||
}
|
||||
}
|
||||
} else if (vr === 'US') {
|
||||
let text = dataSet.uint16(propertyName)
|
||||
for (let i = 1; i < dataSet.elements[propertyName].length / 2; i++) {
|
||||
text += '\\' + dataSet.uint16(propertyName, i)
|
||||
}
|
||||
elementObject.value = text
|
||||
} else if (vr === 'SS') {
|
||||
let text = dataSet.int16(propertyName)
|
||||
for (let i = 1; i < dataSet.elements[propertyName].length / 2; i++) {
|
||||
text += '\\' + dataSet.int16(propertyName, i)
|
||||
}
|
||||
elementObject.value = text
|
||||
} else if (vr === 'UL') {
|
||||
let text = dataSet.uint32(propertyName)
|
||||
for (let i = 1; i < dataSet.elements[propertyName].length / 4; i++) {
|
||||
text += '\\' + dataSet.uint32(propertyName, i)
|
||||
}
|
||||
elementObject.value = text
|
||||
} else if (vr === 'SL') {
|
||||
let text = dataSet.int32(propertyName)
|
||||
for (let i = 1; i < dataSet.elements[propertyName].length / 4; i++) {
|
||||
text += '\\' + dataSet.int32(propertyName, i)
|
||||
}
|
||||
elementObject.value = text
|
||||
} else if (vr === 'FD') {
|
||||
let text = dataSet.double(propertyName)
|
||||
for (let i = 1; i < dataSet.elements[propertyName].length / 8; i++) {
|
||||
text += '\\' + dataSet.double(propertyName, i)
|
||||
}
|
||||
elementObject.value = text
|
||||
} else if (vr === 'FL') {
|
||||
let text = dataSet.float(propertyName)
|
||||
for (let i = 1; i < dataSet.elements[propertyName].length / 4; i++) {
|
||||
text += '\\' + dataSet.float(propertyName, i)
|
||||
}
|
||||
elementObject.value = text
|
||||
} else if (vr === 'OB' || vr === 'OW' || vr === 'UN' || vr === 'OF' || vr === 'UT') {
|
||||
if (element.length === 2) {
|
||||
elementObject.value = dataSet.uint16(propertyName)
|
||||
} else if (element.length === 4) {
|
||||
elementObject.value = dataSet.uint32(propertyName)
|
||||
} else {
|
||||
|
||||
}
|
||||
} else if (vr === 'AT') {
|
||||
// var group = dataSet.uint16(propertyName, 0);
|
||||
// var groupHexStr = ("0000" + group.toString(16)).substr(-4);
|
||||
// var element = dataSet.uint16(propertyName, 1);
|
||||
// var elementHexStr = ("0000" + element.toString(16)).substr(-4);
|
||||
// text += "x" + groupHexStr + elementHexStr;
|
||||
} else if (vr === 'SQ') {
|
||||
} else {
|
||||
// no display code for VR yet, sorry!
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
output.push(elementObject)
|
||||
}
|
||||
} catch (err) {
|
||||
const ex = {
|
||||
exception: err,
|
||||
output: output
|
||||
}
|
||||
console.log(ex)
|
||||
}
|
||||
},
|
||||
getTag(tag) {
|
||||
var group = tag.substring(1, 5)
|
||||
var element = tag.substring(5, 9)
|
||||
var tagIndex = ('(' + group + ',' + element + ')').toUpperCase()
|
||||
var attr = TAG_DICT[tagIndex]
|
||||
return attr
|
||||
},
|
||||
isASCII(str) {
|
||||
return /^[\x00-\x7F]*$/.test(str)
|
||||
},
|
||||
isStringVr(vr) {
|
||||
if (vr === 'AT' || vr === 'FL' || vr === 'FD' || vr === 'OB' || vr === 'OF' || vr === 'OW' || vr === 'SI' || vr === 'SQ' || vr === 'SS' || vr === 'UL' || vr === 'US') {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.dcm-tag{
|
||||
// user-select: none;
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 15px;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
background: #d0d0d0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -182,7 +182,7 @@
|
||||
<svg-icon icon-class="fitToImage" style="font-size:20px;" />
|
||||
</button>
|
||||
<!-- <button title="旋转" class="btn-link dropdown" data-tool="Rotate" @click="setToolActive($event,'Rotate')"> -->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 测量标注 -->
|
||||
@@ -233,6 +233,10 @@
|
||||
<button :title="$t('trials:dicom-show:image')" class="btn-link" @click="currentDicomCanvas.saveImage()">
|
||||
<svg-icon icon-class="image" style="font-size:20px;" />
|
||||
</button>
|
||||
<!-- 标签 -->
|
||||
<button :title="$t('trials:dicom-show:tags')" class="btn-link" @click="currentDicomCanvas.showTags()">
|
||||
<svg-icon icon-class="dictionary" style="font-size:20px;" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="measureTool-wrapper">
|
||||
@@ -405,7 +409,8 @@ export default {
|
||||
loadImageStack(dicomSeries) {
|
||||
this.currentDicomCanvas.toolState.clipPlaying = false
|
||||
this.$nextTick(() => {
|
||||
this.currentDicomCanvas.loadImageStack(dicomSeries)
|
||||
const series = Object.assign({}, dicomSeries)
|
||||
this.currentDicomCanvas.loadImageStack(series)
|
||||
})
|
||||
},
|
||||
loadOtherImageStack(seriesList) {
|
||||
@@ -415,7 +420,8 @@ export default {
|
||||
Array.from(elements).forEach((element, index) => {
|
||||
const canvasIndex = element.getAttribute('data-index')
|
||||
if (index < seriesList.length && element.style.display !== 'none') {
|
||||
this.$refs[`dicomCanvas${canvasIndex}`].loadImageStack(seriesList[index])
|
||||
const series = Object.assign({}, seriesList[index])
|
||||
this.$refs[`dicomCanvas${canvasIndex}`].loadImageStack(series)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,12 +2,13 @@ import Vue from "vue";
|
||||
import MFACOMP from "./index.vue";
|
||||
|
||||
const MFAConstructor = Vue.extend(MFACOMP);
|
||||
|
||||
let MFAINSTANCELIST = [];
|
||||
const MFA = options => {
|
||||
const { UserId, username, EMail, callBack, cancelBack, status = 'login' } = options;
|
||||
if (!UserId) throw `UserId is requred.but ${UserId}`
|
||||
const id = `MFA${new Date().getTime()}`;
|
||||
const instance = new MFAConstructor();
|
||||
MFAINSTANCELIST.push(instance)
|
||||
instance.id = id;
|
||||
instance.vm = instance.$mount();
|
||||
if (instance.vm.visible) return;
|
||||
@@ -20,7 +21,17 @@ const MFA = options => {
|
||||
if (cancelBack) cancelBack();
|
||||
document.body.removeChild(instance.vm.$el);
|
||||
instance.vm.$destroy();
|
||||
let index = MFAINSTANCELIST.findIndex(item => item.id === id);
|
||||
MFAINSTANCELIST.splice(index, 1)
|
||||
});
|
||||
return instance.vm;
|
||||
}
|
||||
MFA.close = () => {
|
||||
if (MFAINSTANCELIST.length <= 0) return;
|
||||
MFAINSTANCELIST.forEach(item => {
|
||||
document.body.removeChild(item.vm.$el);
|
||||
item.vm.$destroy();
|
||||
})
|
||||
MFAINSTANCELIST = [];
|
||||
}
|
||||
export default MFA;
|
||||
@@ -91,21 +91,21 @@ export default {
|
||||
Code: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
message: this.$t("mfa:ruleMessage:specify"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
EMail: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
message: this.$t("mfa:ruleMessage:specify"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
username: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
message: this.$t("mfa:ruleMessage:specify"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
@@ -167,6 +167,7 @@ export default {
|
||||
this.timer = setInterval(() => {
|
||||
this.second--;
|
||||
if (this.second <= 0) {
|
||||
this.flag = false;
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
@@ -201,4 +202,7 @@ export default {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
::v-deep .el-dialog__header {
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
@@ -9,7 +9,7 @@
|
||||
/>
|
||||
<!-- <embed v-else-if="fileType.indexOf('pdf') !== -1" :src="filePath+'#toolbar=0'" style="width: 100%; height: 100%"> -->
|
||||
<!-- <iframe v-else-if="fileType.indexOf('pdf') !== -1" :src="filePath+'#toolbar=0'" width="100%" height="100%" frameborder="0" /> -->
|
||||
<iframe v-else-if="fileType.indexOf('pdf') !== -1" :src="`/static/pdfjs/web/viewer.html?file=${OSSclientConfig.basePath}${filePath}?userName=${currentUser}`" width="100%" height="100%" frameborder="0" crossorigin="anonymous" />
|
||||
<iframe v-else-if="fileType.indexOf('pdf') !== -1" :src="`/static/pdfjs/web/viewer.html?file=${OSSclientConfig.basePath}${filePath}?userName=${currentUser}&COMPANY=${COMPANY}`" width="100%" height="100%" frameborder="0" crossorigin="anonymous" />
|
||||
<!-- <pdf-->
|
||||
<!-- v-else-if="fileType.indexOf('pdf') !== -1"-->
|
||||
<!-- :src="`/static/pdfjs/web/viewer.html?file=${filePath}`">-->
|
||||
@@ -40,7 +40,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentUser: zzSessionStorage.getItem('userName')
|
||||
currentUser: zzSessionStorage.getItem('userName'),
|
||||
COMPANY:process.env.VUE_APP_COMPANY_NAME
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -4,14 +4,15 @@
|
||||
<el-tabs v-model="trialsTab" @tab-click="clickTab">
|
||||
<el-tab-pane v-for="item of trialsRouter.children.find(v => {return v.name == 'TrialsPanel'}).children" :key="`tab${item.path}`" :disabled="TotalNeedSignTrialDocCount !== 0 && item.path !== '/trials/trials-panel/attachments'" :label="$t(item.LanguageMark)" :name="item.path">
|
||||
<el-tabs v-if="!item.tabHiddn" v-model="trialsTabChild" @tab-click="clickTab">
|
||||
<el-tab-pane
|
||||
v-for="item1 of item.children"
|
||||
v-if="TrialConfig && isShow(item1.path)"
|
||||
:key="`tab1${item1.path}`"
|
||||
:disabled="TotalNeedSignTrialDocCount !== 0 && item1.path !== '/trials/trials-panel/attachments/self-attachment' || (TrialStatusStr === 'Initializing' && (item1.path === '/trials/trials-panel/setting/personnel-manage' || item1.path === '/trials/trials-panel/setting/qc-question' || item1.path === '/trials/trials-panel/setting/reading-unit' || item1.path === '/trials/trials-panel/setting/medical-audit' || item1.path === '/trials/trials-panel/setting/email-manage'))"
|
||||
:label="$t(item1.LanguageMark)"
|
||||
:name="item1.path"
|
||||
/>
|
||||
<template v-for="item1 of item.children">
|
||||
<el-tab-pane
|
||||
v-if="TrialConfig && isShow(item1.path)"
|
||||
:key="`tab1${item1.path}`"
|
||||
:disabled="TotalNeedSignTrialDocCount !== 0 && item1.path !== '/trials/trials-panel/attachments/self-attachment' || (TrialStatusStr === 'Initializing' && (item1.path === '/trials/trials-panel/setting/personnel-manage' || item1.path === '/trials/trials-panel/setting/qc-question' || item1.path === '/trials/trials-panel/setting/reading-unit' || item1.path === '/trials/trials-panel/setting/medical-audit' || item1.path === '/trials/trials-panel/setting/email-manage'))"
|
||||
:label="$t(item1.LanguageMark)"
|
||||
:name="item1.path"
|
||||
/>
|
||||
</template>
|
||||
</el-tabs>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -126,6 +127,10 @@ export default {
|
||||
var additionalAssessmentList = [
|
||||
'/trials/trials-panel/subject/brain-metastasis'
|
||||
]
|
||||
let dicomList = [
|
||||
'/trials/trials-panel/trial-summary/image-inspect',
|
||||
'/trials/trials-panel/trial-summary/push-record',
|
||||
]
|
||||
if (this.TrialConfig.QCProcessEnum === 0 && ~qualityList.indexOf(path)) {
|
||||
isShow = false
|
||||
}
|
||||
@@ -135,6 +140,9 @@ export default {
|
||||
if (!this.IsAdditionalAssessment && ~additionalAssessmentList.indexOf(path)) {
|
||||
isShow = false
|
||||
}
|
||||
if ((!this.TrialConfig.IsPACSConnect || !this.TrialConfig.IsTrialPACSConfirmed) && ~dicomList.indexOf(path)) {
|
||||
isShow = false
|
||||
}
|
||||
return isShow
|
||||
},
|
||||
goBack() {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
accept=".pdf"
|
||||
>
|
||||
<el-button size="small" type="primary" :disabled="btnDisabled || $route.query.ReviewStatus === '1'" >{{ $t('system:GcpCertificate:upload:Upload') }}</el-button>
|
||||
<span slot="tip" class="el-upload__tip">{{$t('system:GcpCertificate:tap:must2') }}</span>
|
||||
<span slot="tip" class="el-upload__tip">{{$t('system:tip:file:pdf') }}</span>
|
||||
</el-upload>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,508 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:visible.sync="visible"
|
||||
:fullscreen="true"
|
||||
:close-on-click-modal="false"
|
||||
:before-close="beforeClose"
|
||||
:append-to-body="true"
|
||||
v-loading="btnLoading"
|
||||
class="downloadDicomAndNonedicom"
|
||||
>
|
||||
<span slot="title">{{ title }}</span>
|
||||
<div class="top">
|
||||
<span>{{ $t('download:top:title') }}</span>
|
||||
<div class="btnBox">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="hasDicom"
|
||||
@click.stop="getIRReadingDownloadStudyInfo('dicom')"
|
||||
>
|
||||
{{ $t('download:button:downloadDicom') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="hasNonedicom"
|
||||
@click.stop="getIRReadingDownloadStudyInfo('noneDicom')"
|
||||
>
|
||||
{{ $t('download:button:downloadNonedicom') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
v-if="hasDicom || hasNonedicom"
|
||||
@click.stop="getIRReadingDownloadStudyInfo('all')"
|
||||
>
|
||||
{{ $t('download:button:downloadAll') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tip">
|
||||
<i class="el-icon-warning-outline"></i>
|
||||
<div v-html="$t('download:tip:message')"></div>
|
||||
</div>
|
||||
<!--上传列表@selection-change="handleSelectionChange"-->
|
||||
<el-table
|
||||
ref="dicomFilesTable"
|
||||
v-adaptive="{ bottomOffset: 85 }"
|
||||
height="100"
|
||||
:data="list"
|
||||
:loading="loading"
|
||||
class="dicomFiles-table"
|
||||
@sort-change="handleSortByColumn"
|
||||
:default-sort="{ prop: 'TaskBlindName', order: 'descending' }"
|
||||
>
|
||||
<!-- <el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
:selectable="handleSelectable"
|
||||
/> -->
|
||||
<el-table-column type="index" width="40" />
|
||||
<!--受试者-->
|
||||
<el-table-column
|
||||
:label="$t('download:table:subjectCode')"
|
||||
min-width="130"
|
||||
prop="SubjectCode"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<!--任务名称-->
|
||||
<el-table-column
|
||||
:label="$t('download:table:taskName')"
|
||||
min-width="130"
|
||||
show-overflow-tooltip
|
||||
prop="TaskBlindName"
|
||||
sortable="custom"
|
||||
/>
|
||||
<!--检查类型-->
|
||||
<el-table-column
|
||||
:label="$t('download:table:studyType')"
|
||||
min-width="130"
|
||||
show-overflow-tooltip
|
||||
prop="IsDicom"
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ $fd('IsDicom', scope.row.IsDicom) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('download:table:orginalStudyListNum')"
|
||||
min-width="150"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="
|
||||
(scope.row.IsDicom &&
|
||||
scope.row.DicomStudyList &&
|
||||
scope.row.DicomStudyList.length >= 1) ||
|
||||
(!scope.row.IsDicom &&
|
||||
scope.row.NoneDicomStudyList &&
|
||||
scope.row.NoneDicomStudyList.length >= 1)
|
||||
"
|
||||
type="text"
|
||||
@click="handleOpenDialog(scope.row)"
|
||||
>
|
||||
<span>{{
|
||||
scope.row.IsDicom
|
||||
? scope.row.DicomStudyList.length
|
||||
: scope.row.NoneDicomStudyList.length
|
||||
}}</span>
|
||||
</el-button>
|
||||
<span v-else>0</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('common:action:action')"
|
||||
fixed="right"
|
||||
width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<!--预览--->
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-view"
|
||||
:title="$t('download:button:preview')"
|
||||
@click.stop="preview(scope.row)"
|
||||
/>
|
||||
<!--下载--->
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-download"
|
||||
:title="$t('download:button:download')"
|
||||
@click.stop="getIRReadingDownloadStudyInfo('one', scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<study-view
|
||||
v-if="model_cfg.visible"
|
||||
:model_cfg="model_cfg"
|
||||
:modelList="modelList"
|
||||
:bodyPart="bodyPart"
|
||||
:IsDicom="IsDicom"
|
||||
/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getSubjectImageDownloadSelectList,
|
||||
getIRReadingDownloadStudyInfo,
|
||||
downloadImageSuccess,
|
||||
} from '@/api/load.js'
|
||||
import studyView from '@/components/uploadDicomAndNonedicom/study-view.vue'
|
||||
import store from '@/store'
|
||||
import { downLoadFile } from '@/utils/stream.js'
|
||||
import { getToken } from '@/utils/auth'
|
||||
let defaultSearchData = () => {
|
||||
return {
|
||||
SubjectId: null,
|
||||
TrialReadingCriterionId: null,
|
||||
SubjectCode: null,
|
||||
Asc: false,
|
||||
SortField: 'TaskBlindName',
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'downloadDicomAndNonedicom',
|
||||
components: {
|
||||
'study-view': studyView,
|
||||
},
|
||||
props: {
|
||||
visible: {
|
||||
required: true,
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
SubjectId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
TaskId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
SubjectCode: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
Criterion: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: null,
|
||||
loading: false,
|
||||
list: [],
|
||||
searchData: defaultSearchData(),
|
||||
btnLoading: false,
|
||||
hasDicom: false,
|
||||
hasNonedicom: false,
|
||||
// 检查数弹框
|
||||
model_cfg: {
|
||||
visible: false,
|
||||
showClose: true,
|
||||
width: '1000px',
|
||||
title: '',
|
||||
appendToBody: true,
|
||||
},
|
||||
modelList: [],
|
||||
IsDicom: true,
|
||||
open: null,
|
||||
downloadId: null,
|
||||
IsReadingTaskViewInOrder: 0, // 阅片规则
|
||||
bodyPart: [],
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
this.getList()
|
||||
this.bodyPart = await this.$getBodyPart(this.$route.query.trialId)
|
||||
this.title = `Download Images:${this.SubjectCode}(${this.Criterion.TrialReadingCriterionName})`
|
||||
},
|
||||
beforeDestroy() {
|
||||
store.dispatch('trials/setUnLock', false)
|
||||
},
|
||||
methods: {
|
||||
beforeClose() {
|
||||
this.$emit('update:visible', false)
|
||||
},
|
||||
// 获取列表
|
||||
async getList() {
|
||||
try {
|
||||
this.searchData.SubjectId = this.SubjectId
|
||||
this.searchData.TrialReadingCriterionId =
|
||||
this.Criterion.TrialReadingCriterionId
|
||||
this.searchData.SubjectCode = this.SubjectCode
|
||||
if (this.TaskId) {
|
||||
this.searchData.VisitTaskId = this.TaskId
|
||||
}
|
||||
this.loading = true
|
||||
let res = await getSubjectImageDownloadSelectList(this.searchData)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.list = res.Result
|
||||
this.hasDicom = this.list.some((item) => item.IsDicom)
|
||||
this.hasNonedicom = this.list.some((item) => !item.IsDicom)
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 获取下载文件信息
|
||||
async getIRReadingDownloadStudyInfo(type, row) {
|
||||
try {
|
||||
let data = {
|
||||
SubjectId: this.SubjectId || this.list[0].SubjectId,
|
||||
TrialReadingCriterionId: this.Criterion.TrialReadingCriterionId,
|
||||
SubjectCode: this.SubjectCode || this.list[0].SubjectCode,
|
||||
SubjectVisitTaskList: [],
|
||||
DicomStudyIdList: [],
|
||||
NoneDicomStudyIdList: [],
|
||||
}
|
||||
if (type === 'dicom' || type === 'all') {
|
||||
this.list.forEach((item) => {
|
||||
if (
|
||||
item.IsDicom &&
|
||||
item.DicomStudyList &&
|
||||
item.DicomStudyList.length > 0
|
||||
) {
|
||||
data.SubjectVisitTaskList.push({
|
||||
SubjectvisitId: item.SourceSubjectVisitId,
|
||||
TaskId: item.VisitTaskId,
|
||||
})
|
||||
let arr = item.DicomStudyList.map((d) => d.Id)
|
||||
data.DicomStudyIdList = [...data.DicomStudyIdList, ...arr]
|
||||
}
|
||||
})
|
||||
}
|
||||
if (type === 'noneDicom' || type === 'all') {
|
||||
this.list.forEach((item) => {
|
||||
if (
|
||||
!item.IsDicom &&
|
||||
item.NoneDicomStudyList &&
|
||||
item.NoneDicomStudyList.length > 0
|
||||
) {
|
||||
data.SubjectVisitTaskList.push({
|
||||
SubjectvisitId: item.SourceSubjectVisitId,
|
||||
TaskId: item.VisitTaskId,
|
||||
})
|
||||
let arr = item.NoneDicomStudyList.map((d) => d.Id)
|
||||
data.NoneDicomStudyIdList = [...data.NoneDicomStudyIdList, ...arr]
|
||||
}
|
||||
})
|
||||
}
|
||||
if (type === 'one') {
|
||||
if (
|
||||
row.IsDicom &&
|
||||
row.DicomStudyList &&
|
||||
row.DicomStudyList.length > 0
|
||||
) {
|
||||
data.SubjectVisitTaskList.push({
|
||||
SubjectvisitId: row.SourceSubjectVisitId,
|
||||
TaskId: row.VisitTaskId,
|
||||
})
|
||||
let arr = row.DicomStudyList.map((d) => d.Id)
|
||||
data.DicomStudyIdList = [...data.DicomStudyIdList, ...arr]
|
||||
}
|
||||
if (
|
||||
!row.IsDicom &&
|
||||
row.NoneDicomStudyList &&
|
||||
row.NoneDicomStudyList.length > 0
|
||||
) {
|
||||
data.SubjectVisitTaskList.push({
|
||||
SubjectvisitId: row.SourceSubjectVisitId,
|
||||
TaskId: row.VisitTaskId,
|
||||
})
|
||||
let arr = row.NoneDicomStudyList.map((d) => d.Id)
|
||||
data.NoneDicomStudyIdList = [...data.NoneDicomStudyIdList, ...arr]
|
||||
}
|
||||
}
|
||||
this.btnLoading = true
|
||||
let res = await getIRReadingDownloadStudyInfo(data)
|
||||
this.btnLoading = false
|
||||
if (res.IsSuccess) {
|
||||
this.downloadId = res.OtherInfo.PreDownloadId
|
||||
this.IsReadingTaskViewInOrder = res.OtherInfo.IsReadingTaskViewInOrder
|
||||
this.downloadImage(res.Result)
|
||||
}
|
||||
} catch (err) {
|
||||
this.btnLoading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 打包下载
|
||||
async downloadImage(data) {
|
||||
try {
|
||||
let { files, name, fileType } = this.formatDownloadFile(data)
|
||||
let res = await downLoadFile(files, name, 'zip')
|
||||
if (res && this.downloadId) {
|
||||
this.downloadImageSuccess()
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 格式化下载文件路径
|
||||
formatDownloadFile(list) {
|
||||
let files = [],
|
||||
name = `${list[0].SubjectCode}_${new Date().getTime()}.zip`
|
||||
if (this.IsReadingTaskViewInOrder === 1) {
|
||||
name = `${list[0].SubjectCode}_${list[0].TaskBlindName}.zip`
|
||||
}
|
||||
if (this.IsReadingTaskViewInOrder === 0) {
|
||||
name = `${list[0].TaskBlindName}.zip`
|
||||
}
|
||||
list.forEach((data) => {
|
||||
if (data.StudyList && data.StudyList.length > 0) {
|
||||
let StudyList = data.StudyList
|
||||
StudyList.forEach((study) => {
|
||||
if (study.SeriesList.length > 0) {
|
||||
study.SeriesList.forEach((series) => {
|
||||
if (series.InstancePathList.length > 0) {
|
||||
series.InstancePathList.forEach((instance) => {
|
||||
let fileName = instance.Path.split('/').pop()
|
||||
let obj = {
|
||||
name: `${data.SubjectCode}/${
|
||||
data.TaskBlindName
|
||||
}/${this.$fd('IsDicom', true)}/${
|
||||
study.StudyCode
|
||||
}/${fileName}`,
|
||||
url: this.OSSclientConfig.basePath + instance.Path,
|
||||
}
|
||||
if (this.IsReadingTaskViewInOrder === 0) {
|
||||
obj = {
|
||||
name: `${data.TaskBlindName}/${this.$fd(
|
||||
'IsDicom',
|
||||
true
|
||||
)}/${fileName}`,
|
||||
url: this.OSSclientConfig.basePath + instance.Path,
|
||||
}
|
||||
}
|
||||
files.push(obj)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
if (data.NoneDicomStudyList && data.NoneDicomStudyList.length > 0) {
|
||||
let NoneDicomStudyList = data.NoneDicomStudyList
|
||||
// 多文件
|
||||
NoneDicomStudyList.forEach((study) => {
|
||||
if (study.FileList.length > 0) {
|
||||
study.FileList.forEach((item) => {
|
||||
let obj = {
|
||||
name: `${data.SubjectCode}/${data.TaskBlindName}/${this.$fd(
|
||||
'IsDicom',
|
||||
false
|
||||
)}/${study.StudyCode}/${item.FileName}`,
|
||||
url: this.OSSclientConfig.basePath + item.Path,
|
||||
}
|
||||
if (this.IsReadingTaskViewInOrder === 0) {
|
||||
obj = {
|
||||
name: `${data.TaskBlindName}/${this.$fd(
|
||||
'IsDicom',
|
||||
false
|
||||
)}/${item.FileName}`,
|
||||
url: this.OSSclientConfig.basePath + item.Path,
|
||||
}
|
||||
}
|
||||
files.push(obj)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
return { files, name }
|
||||
},
|
||||
// 影像下载成功确认
|
||||
async downloadImageSuccess() {
|
||||
try {
|
||||
let params = {
|
||||
TrialImageDownloadId: this.downloadId,
|
||||
}
|
||||
await downloadImageSuccess(params)
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
handleOpenDialog(item) {
|
||||
this.model_cfg.title = `${item.SubjectCode || ''} > ${item.TaskBlindName}`
|
||||
if (item.IsDicom) {
|
||||
this.modelList = item.DicomStudyList
|
||||
} else {
|
||||
this.modelList = item.NoneDicomStudyList
|
||||
this.modelList.forEach((data) => {
|
||||
data.SourceSubjectVisitId = item.SourceSubjectVisitId
|
||||
})
|
||||
}
|
||||
this.IsDicom = item.IsDicom
|
||||
this.model_cfg.visible = true
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
preview(row) {
|
||||
if (!row.IsDicom) {
|
||||
this.handlePreviewNoneDicomFiles(row)
|
||||
} else {
|
||||
this.handleViewReadingImages(row)
|
||||
}
|
||||
},
|
||||
// 预览单个检查下非Dicom文件
|
||||
handlePreviewNoneDicomFiles(row) {
|
||||
if (this.open) {
|
||||
this.open.close()
|
||||
}
|
||||
let trialId = this.$route.query.trialId
|
||||
var token = getToken()
|
||||
const routeData = this.$router.resolve({
|
||||
path: `/showNoneDicoms?trialId=${trialId}&subjectVisitId=${row.SourceSubjectVisitId}&TokenKey=${token}`,
|
||||
})
|
||||
this.open = window.open(routeData.href, '_blank')
|
||||
},
|
||||
// 预览阅片影像
|
||||
handleViewReadingImages(row) {
|
||||
if (this.open) {
|
||||
this.open.close()
|
||||
}
|
||||
var token = getToken()
|
||||
let trialId = this.$route.query.trialId
|
||||
const routeData = this.$router.resolve({
|
||||
path: `/showvisitdicoms?trialId=${trialId}&subjectVisitId=${row.SourceSubjectVisitId}&isReading=1&TokenKey=${token}`,
|
||||
})
|
||||
this.open = window.open(routeData.href, '_blank')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.tip {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-top: 5px;
|
||||
i {
|
||||
margin: 3px 5px 0 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,37 @@
|
||||
import Vue from "vue";
|
||||
import FEEDBACKCOMP from "./index.vue";
|
||||
const FBConstructor = Vue.extend(FEEDBACKCOMP);
|
||||
let FBCINSTANCELIST = [];
|
||||
const FB = options => {
|
||||
const { type, callBack, cancelBack, trialId = null, Id = null, visitTaskId = null, SubjectVisitId = null } = options;
|
||||
if (!type) throw `type is requred.but ${type}`
|
||||
const id = `FB${new Date().getTime()}`;
|
||||
const instance = new FBConstructor();
|
||||
FBCINSTANCELIST.push(instance);
|
||||
instance.id = id;
|
||||
instance.vm = instance.$mount();
|
||||
if (instance.vm.visible) return;
|
||||
document.body.appendChild(instance.vm.$el);
|
||||
instance.vm.open({ type, trialId, Id, visitTaskId, SubjectVisitId });
|
||||
instance.vm.$on("success", (Id) => {
|
||||
if (callBack) callBack();
|
||||
|
||||
});
|
||||
instance.vm.$on("closed", () => {
|
||||
document.body.removeChild(instance.vm.$el);
|
||||
instance.vm.$destroy();
|
||||
let index = FBCINSTANCELIST.findIndex(item => item.id === id);
|
||||
FBCINSTANCELIST.splice(index, 1)
|
||||
if (cancelBack) cancelBack()
|
||||
});
|
||||
return instance.vm;
|
||||
}
|
||||
FB.close = () => {
|
||||
if (FBCINSTANCELIST.length <= 0) return;
|
||||
FBCINSTANCELIST.forEach(item => {
|
||||
document.body.removeChild(item.vm.$el);
|
||||
item.vm.$destroy();
|
||||
})
|
||||
FBCINSTANCELIST = [];
|
||||
}
|
||||
export default FB;
|
||||
@@ -0,0 +1,7 @@
|
||||
import FEEDBACKCOMP from "./index.vue";
|
||||
import FB from "./fun";
|
||||
|
||||
export default Vue => {
|
||||
Vue.component(FEEDBACKCOMP.name, FEEDBACKCOMP);
|
||||
Vue.prototype.$FB = FB;
|
||||
};
|
||||
@@ -0,0 +1,416 @@
|
||||
<template>
|
||||
<!--FEEDBACK-->
|
||||
<div v-if="visible" @click.stop="() => false" class="feedBack-box">
|
||||
<div class="feedBack-box-modal"></div>
|
||||
<el-dialog
|
||||
:visible.sync="visible"
|
||||
v-dialogDrag
|
||||
width="800px"
|
||||
:close-on-click-modal="false"
|
||||
@close="cancel"
|
||||
:modal="false"
|
||||
>
|
||||
<div slot="title">
|
||||
{{ title }}
|
||||
</div>
|
||||
<!-- 项目详情 -->
|
||||
<div class="trialsBox" v-if="visitTaskId || SubjectVisitId">
|
||||
<el-form
|
||||
label-position="right"
|
||||
:model="form"
|
||||
:inline="true"
|
||||
class="trialsForm"
|
||||
v-if="type === 'detail'"
|
||||
>
|
||||
<el-form-item :label="$t('feedBack:trials:code')" style="width: 40%">
|
||||
<span>{{ form.TrialCode }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('feedBack:trials:name')" style="width: 40%">
|
||||
<span>{{ form.ExperimentName }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('feedBack:trials:siteCode')"
|
||||
style="width: 40%"
|
||||
>
|
||||
<span>{{ form.TrialSiteCode }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('feedBack:trials:visit')" style="width: 40%">
|
||||
<span>{{ form.SubjectCode }} - {{ form.SubjectVisitName }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-form
|
||||
ref="feedBackForm"
|
||||
label-position="right"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="100px"
|
||||
>
|
||||
<!-- 影像异常tip -->
|
||||
<p class="tip" v-if="type === 'imgfail'">
|
||||
<i
|
||||
class="el-icon-warning-outline"
|
||||
style="color: #f56c6c; font-size: 24px"
|
||||
></i>
|
||||
<span>{{ $t("feedBack:imgfail:tip") }}</span>
|
||||
</p>
|
||||
<!-- 问题反馈 -->
|
||||
<el-form-item
|
||||
:label="$t('feedBack:form:feedBack')"
|
||||
prop="QuestionType"
|
||||
v-if="type === 'feedback' && trialId"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.QuestionType"
|
||||
style="width: 100%"
|
||||
popper-class="feedBack-select-box"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in QuestionTypeOptions"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 问题反馈 -->
|
||||
<el-form-item
|
||||
:label="$t('feedBack:form:feedBack')"
|
||||
prop="QuestionType"
|
||||
v-if="type === 'detail'"
|
||||
>
|
||||
<span>{{
|
||||
QuestionTypeOptions.filter(
|
||||
(item) => item.value === form.QuestionType
|
||||
)[0].label
|
||||
}}</span>
|
||||
</el-form-item>
|
||||
<!-- 问题描述 -->
|
||||
<el-form-item
|
||||
:label="$t('feedBack:form:description')"
|
||||
prop="QuestionDescription"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.QuestionDescription"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
:maxlength="500"
|
||||
:disabled="type === 'detail'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 截图 -->
|
||||
<el-form-item :label="$t('feedBack:form:screenshot')" prop="screenshot">
|
||||
<uploadImage
|
||||
:path.sync="form.ScreenshotList"
|
||||
:isUpload.sync="loading"
|
||||
:trialId="trialId"
|
||||
:disabled="type === 'detail'"
|
||||
ref="uploadImage"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 反馈时间 -->
|
||||
<el-form-item
|
||||
:label="$t('feedBack:form:time')"
|
||||
prop="screenshot"
|
||||
v-if="type === 'detail'"
|
||||
>
|
||||
<span>{{ form.CreateTime }}</span>
|
||||
</el-form-item>
|
||||
<!-- 状态 -->
|
||||
<el-form-item
|
||||
:label="$t('feedBack:form:status')"
|
||||
prop="screenshot"
|
||||
v-if="type === 'detail' && level > 7"
|
||||
>
|
||||
<el-switch
|
||||
v-model="form.State"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
:active-text="$fd('FeedBackStatus', 1)"
|
||||
:inactive-text="$fd('FeedBackStatus', 0)"
|
||||
:disabled="level < 8 || !isStateChange"
|
||||
@change="changeState"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" v-if="type !== 'detail' || isImgfail">
|
||||
<!-- 取消 -->
|
||||
<el-button size="small" @click.stop="cancel">
|
||||
{{ $t("feedBack:button:cancel") }}
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click.stop="save"
|
||||
:loading="loading"
|
||||
>
|
||||
{{ $t("feedBack:button:save") }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import uploadImage from "./uploadImage.vue";
|
||||
import {
|
||||
addOrUpdateUserFeedBack,
|
||||
getUserFeedBackInfo,
|
||||
batchUpdateFeedBackState,
|
||||
} from "@/api/trials.js";
|
||||
export default {
|
||||
name: "FB",
|
||||
components: { uploadImage },
|
||||
data() {
|
||||
return {
|
||||
title: null,
|
||||
visible: false,
|
||||
loading: false,
|
||||
options: [],
|
||||
type: null, // detail 表格详情 feedback 填写反馈 imgfail 影像异常
|
||||
trialId: null, // 项目id
|
||||
Id: null, // 反馈数据id
|
||||
visitTaskId: null, // 任务id
|
||||
isImgfail: false, // 是否是影像异常
|
||||
isStateChange: true, // 是否可以切换状态
|
||||
form: {
|
||||
Id: null,
|
||||
SubjectId: null,
|
||||
SubjectVisitId: null,
|
||||
QuestionType: 0,
|
||||
QuestionDescription: null,
|
||||
State: 0,
|
||||
TrialSiteId: null,
|
||||
TrialId: null,
|
||||
VisitTaskId: null,
|
||||
SubjectVisitId: null,
|
||||
ScreenshotList: [],
|
||||
ScreenshotListStr: null,
|
||||
},
|
||||
rules: {
|
||||
QuestionType: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
QuestionDescription: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: "blur",
|
||||
},
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value.length < 5) {
|
||||
callback(
|
||||
new Error(this.$t("feedBack:ruleMessage:lengthLimitMin5"))
|
||||
);
|
||||
}
|
||||
callback();
|
||||
},
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
isUpload: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
level() {
|
||||
if (this.hasPermi(["role:dev", "role:admin"])) {
|
||||
return 9;
|
||||
}
|
||||
if (this.hasPermi(["role:pm"])) {
|
||||
return 8;
|
||||
}
|
||||
if (this.hasPermi(["role:ir", "role:crc"])) {
|
||||
return 7;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
QuestionTypeOptions() {
|
||||
if (this.level > 7) {
|
||||
return [
|
||||
...this.$d.FeedBackTypeToCRC.filter((item) => item.value > 0),
|
||||
...this.$d.FeedBackTypeToIR,
|
||||
];
|
||||
}
|
||||
if (this.hasPermi(["role:ir"])) {
|
||||
return this.$d.FeedBackTypeToIR;
|
||||
}
|
||||
if (this.hasPermi(["role:crc"])) {
|
||||
return this.$d.FeedBackTypeToCRC;
|
||||
}
|
||||
return [];
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
open(data) {
|
||||
let { type, trialId, Id, visitTaskId, SubjectVisitId } = data;
|
||||
this.type = type;
|
||||
this.trialId = trialId;
|
||||
this.Id = Id;
|
||||
this.visitTaskId = visitTaskId;
|
||||
this.SubjectVisitId = SubjectVisitId;
|
||||
if (visitTaskId) {
|
||||
this.isImgfail = true;
|
||||
}
|
||||
this.setTypeOption();
|
||||
if (!Id) {
|
||||
this.title = this.setTitle();
|
||||
}
|
||||
if (Id || visitTaskId) {
|
||||
this.getInfo(Id, visitTaskId);
|
||||
}
|
||||
this.visible = true;
|
||||
},
|
||||
cancel() {
|
||||
this.visible = false;
|
||||
this.$emit("closed");
|
||||
},
|
||||
async save() {
|
||||
try {
|
||||
let validate = await this.$refs.feedBackForm.validate();
|
||||
if (!validate) return;
|
||||
if (this.trialId) {
|
||||
this.form.TrialId = this.trialId;
|
||||
}
|
||||
if (this.visitTaskId) {
|
||||
this.form.VisitTaskId = this.visitTaskId;
|
||||
}
|
||||
if (this.SubjectVisitId) {
|
||||
this.form.SubjectVisitId = this.SubjectVisitId;
|
||||
}
|
||||
if (this.Id) {
|
||||
this.form.Id = this.Id;
|
||||
}
|
||||
this.loading = true;
|
||||
let res = await addOrUpdateUserFeedBack(this.form);
|
||||
this.loading = false;
|
||||
if (res.IsSuccess) {
|
||||
this.$emit("success");
|
||||
this.$message.success(this.$t("feedBack:save:success"));
|
||||
this.cancel();
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false;
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
// 修改状态
|
||||
async changeState() {
|
||||
if (this.isImgfail) return;
|
||||
try {
|
||||
let data = {
|
||||
IdList: [this.Id],
|
||||
State: this.form.State,
|
||||
};
|
||||
let res = await batchUpdateFeedBackState(data);
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(this.$t("feedBack:changeState:success"));
|
||||
this.$emit("success");
|
||||
// this.cancel();
|
||||
this.getInfo(this.Id, this.visitTaskId);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
// 获取反馈详情
|
||||
async getInfo(Id, visitTaskId) {
|
||||
try {
|
||||
let data = {
|
||||
Id,
|
||||
visitTaskId,
|
||||
};
|
||||
let res = await getUserFeedBackInfo(data);
|
||||
if (res.IsSuccess && res.Result) {
|
||||
this.form = res.Result;
|
||||
this.form.ScreenshotList = this.form.ScreenshotList || []
|
||||
this.Id = res.Result.Id;
|
||||
if (res.Result.State > 0) {
|
||||
this.isStateChange = false;
|
||||
}
|
||||
if (res.Result.VisitTaskId) {
|
||||
this.visitTaskId = res.Result.VisitTaskId;
|
||||
}
|
||||
if (res.Result.SubjectVisitId) {
|
||||
this.SubjectVisitId = res.Result.SubjectVisitId;
|
||||
}
|
||||
let code = this.$fd("UserType", res.Result.UserTypeEnum);
|
||||
this.title = this.setTitle(code, res.Result.FeedBackFullName);
|
||||
if (visitTaskId) {
|
||||
code = `${res.Result.SubjectCode}-${res.Result.SubjectVisitName}`;
|
||||
this.title = this.setTitle(code, res.Result.FeedBackFullName);
|
||||
}
|
||||
this.$refs.uploadImage.initFileList(res.Result.ScreenshotList);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
setTypeOption() {
|
||||
if (!this.trialId) return (this.options = []);
|
||||
if (this.hasPermi(["role:ir"]))
|
||||
return (this.option = this.$d.FeedBackTypeToIR);
|
||||
if (this.hasPermi(["role:crc"]))
|
||||
return (this.option = this.$d.FeedBackTypeToCRC);
|
||||
},
|
||||
setTitle(code, name) {
|
||||
if (this.hasPermi(["role:pm"]) && this.visitTaskId) {
|
||||
return `${this.$t("feedBack:form:title:pm2")}(${code}/${name})`;
|
||||
}
|
||||
if (this.hasPermi(["role:pm", "role:dev", "role:admin"])) {
|
||||
return `${this.$t("feedBack:form:title:pm")}(${code},${name})`;
|
||||
}
|
||||
if (this.hasPermi(["role:ir", "role:crc"]) && this.type === "detail") {
|
||||
return `${this.$t("feedBack:form:detail:title")}`;
|
||||
}
|
||||
if (this.hasPermi(["role:ir", "role:crc"])) {
|
||||
return `${this.$t("feedBack:form:title")}`;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.tip {
|
||||
width: 86%;
|
||||
margin: auto;
|
||||
margin-bottom: 20px;
|
||||
text-align: left;
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// border-radius: 5px;
|
||||
// background-color: #eee;
|
||||
i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.trialsBox {
|
||||
margin: auto;
|
||||
margin-bottom: 20px;
|
||||
text-align: left;
|
||||
padding: 0 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 5px;
|
||||
background-color: #eee;
|
||||
}
|
||||
.trialsForm {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
.el-form-item {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,252 @@
|
||||
<template>
|
||||
<div class="upload-container">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
:class="{ uploadDisabled: disabled ? true : false }"
|
||||
action
|
||||
multiple
|
||||
:http-request="uploadFile"
|
||||
:before-upload="beforeUpload"
|
||||
:file-list="fileList"
|
||||
:on-preview="handlePreview"
|
||||
:on-remove="remove"
|
||||
:on-exceed="handleExceed"
|
||||
accept=".png,.jpg,.jpeg"
|
||||
list-type="picture-card"
|
||||
>
|
||||
<i slot="default" class="el-icon-plus"></i>
|
||||
<div slot="file" slot-scope="{ file }" style="width: 100%; height: 100%">
|
||||
<viewer
|
||||
:ref="file.url"
|
||||
:images="fileList"
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
"
|
||||
>
|
||||
<img
|
||||
class="el-upload-list__item-thumbnail"
|
||||
:src="`${file.url}`"
|
||||
alt=""
|
||||
crossorigin="anonymous"
|
||||
style="max-width: 100%; max-height: 100%"
|
||||
/>
|
||||
<span class="el-upload-list__item-actions" v-if="!isUpload">
|
||||
<span
|
||||
class="el-upload-list__item-preview"
|
||||
@click="handlePictureCardPreview(file)"
|
||||
>
|
||||
<i class="el-icon-zoom-in"></i>
|
||||
</span>
|
||||
<span
|
||||
class="el-upload-list__item-delete"
|
||||
v-if="!disabled"
|
||||
@click="handleRemove(file)"
|
||||
>
|
||||
<i class="el-icon-delete"></i>
|
||||
</span>
|
||||
</span>
|
||||
<div class="loadingBox" v-else>
|
||||
<i class="el-icon-loading" style="color: #fff; margin: auto"></i>
|
||||
</div>
|
||||
</viewer>
|
||||
</div>
|
||||
</el-upload>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const type = "Statement of Work";
|
||||
export default {
|
||||
name: "UploadImage",
|
||||
props: {
|
||||
path: {
|
||||
required: true,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
disabled: {
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
isUpload: {
|
||||
required: true,
|
||||
default: false,
|
||||
},
|
||||
trialId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
btnDisabled: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
remove(file, fileList) {
|
||||
// this.$emit("update:path", null);
|
||||
},
|
||||
fileToBlob(file) {
|
||||
// 创建 FileReader 对象
|
||||
const reader = new FileReader();
|
||||
return new Promise((resolve) => {
|
||||
// FileReader 添加 load 事件
|
||||
reader.addEventListener("load", (e) => {
|
||||
let blob;
|
||||
if (typeof e.target.result === "object") {
|
||||
blob = new Blob([e.target.result]);
|
||||
} else {
|
||||
blob = e.target.result;
|
||||
}
|
||||
resolve(blob);
|
||||
});
|
||||
// FileReader 以 ArrayBuffer 格式 读取 File 对象中数据
|
||||
reader.readAsArrayBuffer(file);
|
||||
});
|
||||
},
|
||||
// 上传oss
|
||||
async uploadToOSS(name, file) {
|
||||
try {
|
||||
let defaultPath = "/System/FeedBack/";
|
||||
if (this.trialId) {
|
||||
defaultPath = `/${this.trialId}/FeedBack/`;
|
||||
}
|
||||
let res = await this.OSSclient.put(`${defaultPath}${name}`, file);
|
||||
return res;
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
initFileList(list) {
|
||||
if (list && list.length > 0) {
|
||||
this.fileList = [];
|
||||
list.forEach((item, index) => {
|
||||
let name = item.split("/");
|
||||
this.fileList.push({
|
||||
name: name[name.length - 1],
|
||||
path: item,
|
||||
fullPath: this.OSSclientConfig.basePath + item,
|
||||
url: this.OSSclientConfig.basePath + item,
|
||||
uid: `${name[name.length - 1]}${index}`,
|
||||
});
|
||||
});
|
||||
console.log(this.fileList);
|
||||
}
|
||||
},
|
||||
async uploadFile(param) {
|
||||
var fileName = param.file.name;
|
||||
this.$emit("update:isUpload", true);
|
||||
this.btnDisabled = true;
|
||||
this.fileList.push({
|
||||
url: param.file.url,
|
||||
path: fileName,
|
||||
uid: param.file.uid,
|
||||
});
|
||||
let file = await this.fileToBlob(param.file);
|
||||
let res = await this.uploadToOSS(fileName, file);
|
||||
this.btnDisabled = false;
|
||||
let index = this.fileList.findIndex(
|
||||
(item) => item.uid === param.file.uid
|
||||
);
|
||||
if (!res) {
|
||||
if (index >= 0) {
|
||||
this.fileList.splice(index, 1);
|
||||
}
|
||||
return this.$emit("update:isUpload", false);
|
||||
}
|
||||
this.fileList[index].url = this.OSSclientConfig.basePath + res.name;
|
||||
this.fileList[index].path = res.name;
|
||||
this.$emit("update:path", [...this.path, res.name]);
|
||||
this.$emit("update:isUpload", false);
|
||||
return false;
|
||||
},
|
||||
beforeUpload(file, fileList) {
|
||||
const isValidFile = this.fileValid(file.name, ["png", "jpg", "jpeg"]);
|
||||
if (isValidFile) {
|
||||
// this.fileList = [];
|
||||
} else {
|
||||
this.$alert(this.$t("feedBack:uploadImg:format"));
|
||||
return false;
|
||||
}
|
||||
},
|
||||
handlePreview(file) {
|
||||
file.fullPath ? window.open(file.fullPath, "_blank") : "";
|
||||
},
|
||||
handleExceed(files, fileList) {
|
||||
this.$message.warning(`Upload is currently limited to 1 file`);
|
||||
},
|
||||
fileValid(fileName, typeArr) {
|
||||
var extendName = fileName
|
||||
.substring(fileName.lastIndexOf(".") + 1)
|
||||
.toLocaleLowerCase();
|
||||
if (typeArr.indexOf(extendName) > -1) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.$refs[file.url].$viewer.show();
|
||||
},
|
||||
handleRemove(file) {
|
||||
let index = this.fileList.findIndex((item) => item.uid === file.uid);
|
||||
this.fileList.splice(index, 1);
|
||||
let arr = this.fileList.map((item) => item.path);
|
||||
this.$emit("update:path", arr);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.upload-container .el-upload--text {
|
||||
border: none;
|
||||
width: 80px;
|
||||
height: 30px;
|
||||
}
|
||||
.upload-container .el-form-item__label {
|
||||
font-size: 12px;
|
||||
}
|
||||
.upload-container .el-upload-list__item {
|
||||
font-size: 12px;
|
||||
}
|
||||
.logoAMessage {
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.upload-container .uploadDisabled .el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
.upload-container .el-upload--picture-card {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
}
|
||||
.upload-container .el-upload-list--picture-card .el-upload-list__item {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
line-height: 100px;
|
||||
}
|
||||
.loadingBox {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.el-upload-list--picture-card .el-upload-list__item-thumbnail {
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,35 @@
|
||||
import Vue from "vue";
|
||||
import FEEDBACKCOMP from "./index.vue";
|
||||
const FBConstructor = Vue.extend(FEEDBACKCOMP);
|
||||
let FBCTABLEINSTANCELIST = [];
|
||||
const FBT = (options = {}) => {
|
||||
const { data = {}, callBack } = options;
|
||||
// if (!UserId) throw `UserId is requred.but ${UserId}`
|
||||
const id = `FB${new Date().getTime()}`;
|
||||
const instance = new FBConstructor();
|
||||
FBCTABLEINSTANCELIST.push(instance);
|
||||
instance.id = id;
|
||||
instance.vm = instance.$mount();
|
||||
if (instance.vm.visible) return;
|
||||
document.body.appendChild(instance.vm.$el);
|
||||
instance.vm.open({ ...data });
|
||||
instance.vm.$on("success", (Id) => {
|
||||
if (callBack) callBack();
|
||||
});
|
||||
instance.vm.$on("closed", () => {
|
||||
document.body.removeChild(instance.vm.$el);
|
||||
instance.vm.$destroy();
|
||||
let index = FBCTABLEINSTANCELIST.findIndex(item => item.id === id);
|
||||
FBCTABLEINSTANCELIST.splice(index, 1)
|
||||
});
|
||||
return instance.vm;
|
||||
}
|
||||
FBT.close = () => {
|
||||
if (FBCTABLEINSTANCELIST.length <= 0) return;
|
||||
FBCTABLEINSTANCELIST.forEach(item => {
|
||||
document.body.removeChild(item.vm.$el);
|
||||
item.vm.$destroy();
|
||||
})
|
||||
FBCTABLEINSTANCELIST = [];
|
||||
}
|
||||
export default FBT;
|
||||
@@ -0,0 +1,7 @@
|
||||
import FEEDBACKCOMP from "./index.vue";
|
||||
import FBT from "./fun";
|
||||
|
||||
export default Vue => {
|
||||
Vue.component(FEEDBACKCOMP.name, FEEDBACKCOMP);
|
||||
Vue.prototype.$FBT = FBT;
|
||||
};
|
||||
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div v-if="visible" @click.stop="() => false" class="feedBack-box">
|
||||
<el-dialog
|
||||
:visible.sync="visible"
|
||||
v-dialogDrag
|
||||
width="1200px"
|
||||
:close-on-click-modal="false"
|
||||
@close="cancel"
|
||||
:fullscreen="true"
|
||||
>
|
||||
<div slot="title">
|
||||
{{ title }}
|
||||
</div>
|
||||
<feedBackTable :trialId="trialId" @success="success" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import feedBackTable from "@/views/feedBack/index.vue";
|
||||
export default {
|
||||
name: "FBT",
|
||||
components: { feedBackTable },
|
||||
data() {
|
||||
return {
|
||||
title: null,
|
||||
visible: false,
|
||||
trialId: null,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
open(data) {
|
||||
let { code, name, trialId } = data;
|
||||
this.title = this.setTitle(code, name);
|
||||
this.trialId = trialId;
|
||||
this.visible = true;
|
||||
},
|
||||
cancel() {
|
||||
this.visible = false;
|
||||
this.$emit("closed");
|
||||
},
|
||||
setTitle(code, name) {
|
||||
if (this.hasPermi(["role:pm"])) {
|
||||
return `${this.$t("feedBack:table:title:pm")}(${code},${name})`;
|
||||
}
|
||||
if (this.hasPermi(["role:ir", "role:crc"])) {
|
||||
return `${this.$t("feedBack:table:title")}`;
|
||||
}
|
||||
},
|
||||
success() {
|
||||
this.$emit("success");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
// <style lang="scss" scoped>
|
||||
// ::v-deep .el-dialog__body {
|
||||
// padding-bottom: 0;
|
||||
// height: 500px;
|
||||
// }
|
||||
//
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,115 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:visible.sync="visible"
|
||||
:fullscreen="true"
|
||||
:close-on-click-modal="false"
|
||||
:before-close="beforeClose"
|
||||
:append-to-body="true"
|
||||
class="uploadDicomAndNonedicom"
|
||||
>
|
||||
<span slot="title">{{ title }}</span>
|
||||
<el-tabs type="border-card" v-model="activeName">
|
||||
<el-tab-pane
|
||||
:label="$t('uploadDicomAndNonedicom:label:dicom')"
|
||||
name="dicom"
|
||||
>
|
||||
<dicomFile
|
||||
v-if="activeName === 'dicom'"
|
||||
:SubjectId="SubjectId"
|
||||
:SubjectCode="SubjectCode"
|
||||
:Criterion="Criterion"
|
||||
:TaskId="VisitTaskId"
|
||||
:isUpload.sync="isUpload"
|
||||
:isReadingTaskViewInOrder="isReadingTaskViewInOrder"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
:label="$t('uploadDicomAndNonedicom:label:nonedicom')"
|
||||
name="nonedicom"
|
||||
>
|
||||
<nonedicomFile
|
||||
v-if="activeName === 'nonedicom'"
|
||||
:SubjectId="SubjectId"
|
||||
:SubjectCode="SubjectCode"
|
||||
:Criterion="Criterion"
|
||||
:VisitTaskId="VisitTaskId"
|
||||
:isUpload.sync="isUpload"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import dicomFile from './dicomFile.vue'
|
||||
import nonedicomFile from './nonedicomFile.vue'
|
||||
export default {
|
||||
name: 'uploadDicomAndNonedicom',
|
||||
components: { dicomFile, nonedicomFile },
|
||||
props: {
|
||||
visible: {
|
||||
required: true,
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
SubjectId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
SubjectCode: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
Criterion: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
VisitTaskId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
isReadingTaskViewInOrder: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
activeName: 'dicom',
|
||||
isUpload: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.title = `Upload Images:${this.SubjectCode}(${this.Criterion.TrialReadingCriterionName})`
|
||||
},
|
||||
methods: {
|
||||
beforeClose() {
|
||||
if (
|
||||
this.$route.path !== '/trials/trials-panel/reading/readingTask' &&
|
||||
this.isUpload
|
||||
) {
|
||||
return window.location.reload()
|
||||
}
|
||||
this.$emit('update:visible', false)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep.el-tabs--left .el-tabs__header.is-left {
|
||||
margin-right: 0;
|
||||
}
|
||||
.uploadDicomAndNonedicom {
|
||||
::v-deep.el-tabs--border-card > .el-tabs__header .el-tabs__item {
|
||||
color: #909399;
|
||||
}
|
||||
::v-deep.el-tabs--border-card > .el-tabs__header .el-tabs__item.is-active {
|
||||
color: #428bca;
|
||||
background-color: #fff;
|
||||
border-right-color: #dcdfe6;
|
||||
border-left-color: #dcdfe6;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,916 @@
|
||||
<template>
|
||||
<div class="nonedicomFile">
|
||||
<div class="top">
|
||||
<span>{{ $t('upload:nonedicom:title') }}</span>
|
||||
<div class="tip">
|
||||
<i class="el-icon-warning-outline"></i>
|
||||
<div v-html="$t('upload:nonedicom:tip:message')"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!--检查列表-->
|
||||
<el-table
|
||||
:data="list"
|
||||
style="width: 100%"
|
||||
v-adaptive="{ bottomOffset: 60 }"
|
||||
:loading="loading"
|
||||
@sort-change="handleSortByColumn"
|
||||
:default-sort="{ prop: 'TaskBlindName', order: 'descending' }"
|
||||
>
|
||||
<!--受试者-->
|
||||
<el-table-column
|
||||
prop="SubjectCode"
|
||||
:label="$t('upload:nonedicom:table:subject')"
|
||||
/>
|
||||
<!--任务名称-->
|
||||
<el-table-column
|
||||
prop="TaskBlindName"
|
||||
:label="$t('upload:nonedicom:table:taskName')"
|
||||
sortable="custom"
|
||||
/>
|
||||
<!--检查类型-->
|
||||
<el-table-column
|
||||
prop="Modality"
|
||||
:label="$t('upload:nonedicom:table:molityType')"
|
||||
sortable="custom"
|
||||
>
|
||||
</el-table-column>
|
||||
<!--检查部位-->
|
||||
<el-table-column
|
||||
prop="BodyPart"
|
||||
:label="$t('upload:nonedicom:table:bodyPart')"
|
||||
sortable="custom"
|
||||
/>
|
||||
<!--原文件数-->
|
||||
<el-table-column
|
||||
prop="FileCount"
|
||||
:label="$t('upload:nonedicom:table:fileCount')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-popover
|
||||
v-if="scope.row.FileCount"
|
||||
trigger="click"
|
||||
placement="bottom"
|
||||
>
|
||||
<el-table :data="scope.row.FileList" height="300" size="small">
|
||||
<!-- 文件名称 -->
|
||||
<el-table-column
|
||||
prop="FileName"
|
||||
:label="$t('trials:audit:table:nonDicomsFileName')"
|
||||
width="200"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="FileSize"
|
||||
:label="$t('trials:audit:table:nonDicomsFileSize')"
|
||||
width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
scope.row.FileSize && scope.row.FileSize > 0
|
||||
? `${(scope.row.FileSize / 1024 / 1024).toFixed(2)}MB`
|
||||
: 0
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('common:action:action')" width="120">
|
||||
<template slot-scope="files">
|
||||
<!-- 预览 -->
|
||||
<viewer
|
||||
:ref="files.row.Path"
|
||||
style="margin: 0 10px"
|
||||
:images="[`${OSSclientConfig.basePath}${files.row.Path}`]"
|
||||
>
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-view"
|
||||
:title="$t('upload:nonedicom:button:preview')"
|
||||
:disabled="
|
||||
files.row.FileType &&
|
||||
files.row.FileType.indexOf('zip') >= 0
|
||||
"
|
||||
@click.native.prevent="previewFile(files.row)"
|
||||
/>
|
||||
<img
|
||||
v-show="false"
|
||||
crossorigin="anonymous"
|
||||
:src="`${OSSclientConfig.basePath}${files.row.Path}`"
|
||||
alt="Image"
|
||||
/>
|
||||
</viewer>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<el-button type="text">
|
||||
{{ scope.row.FileCount }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-popover>
|
||||
<span v-else>{{ scope.row.FileCount }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--后处理文件数-->
|
||||
<el-table-column
|
||||
prop="UploadedFileCount"
|
||||
:label="$t('upload:nonedicom:table:uploadFileCount')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-popover
|
||||
v-if="scope.row.UploadedFileCount"
|
||||
trigger="click"
|
||||
placement="bottom"
|
||||
>
|
||||
<el-table
|
||||
:data="scope.row.UploadedFileList"
|
||||
height="300"
|
||||
size="small"
|
||||
>
|
||||
<!-- 文件名称 -->
|
||||
<el-table-column
|
||||
prop="FileName"
|
||||
:label="$t('trials:audit:table:nonDicomsFileName')"
|
||||
width="200"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="FileSize"
|
||||
:label="$t('trials:audit:table:nonDicomsFileSize')"
|
||||
width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
scope.row.FileSize && scope.row.FileSize > 0
|
||||
? `${(scope.row.FileSize / 1024 / 1024).toFixed(2)}MB`
|
||||
: 0
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('common:action:action')" width="120">
|
||||
<template slot-scope="files">
|
||||
<!-- 预览 -->
|
||||
<viewer
|
||||
:ref="files.row.Path"
|
||||
style="margin: 0 10px"
|
||||
:images="[`${OSSclientConfig.basePath}${files.row.Path}`]"
|
||||
>
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-view"
|
||||
:title="$t('upload:nonedicom:button:preview')"
|
||||
:disabled="
|
||||
files.row.FileType &&
|
||||
files.row.FileType.indexOf('zip') >= 0
|
||||
"
|
||||
@click.native.prevent="previewFile(files.row)"
|
||||
/>
|
||||
<img
|
||||
v-show="false"
|
||||
crossorigin="anonymous"
|
||||
:src="`${OSSclientConfig.basePath}${files.row.Path}`"
|
||||
alt="Image"
|
||||
/>
|
||||
</viewer>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<el-button type="text">
|
||||
{{ scope.row.UploadedFileCount }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-popover>
|
||||
<span v-else>{{ scope.row.UploadedFileCount }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('common:action:action')"
|
||||
fixed="right"
|
||||
width="180"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<!--预览--->
|
||||
<el-button
|
||||
circle
|
||||
:disabled="scope.row.UploadedFileCount <= 0"
|
||||
icon="el-icon-view"
|
||||
:title="$t('upload:nonedicom:button:preview')"
|
||||
@click.stop="handlePreviewNoneDicomFiles(scope.row)"
|
||||
/>
|
||||
<!--上传--->
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-upload2"
|
||||
:title="$t('upload:nonedicom:button:upload')"
|
||||
@click.native.prevent="handleUpload(scope.row)"
|
||||
/>
|
||||
<!--删除--->
|
||||
<el-button
|
||||
:disabled="scope.row.UploadedFileCount <= 0"
|
||||
circle
|
||||
icon="el-icon-delete"
|
||||
:title="$t('upload:nonedicom:button:delete')"
|
||||
@click.stop="remove(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 预览单个图像 -->
|
||||
<el-dialog
|
||||
v-if="imgObj.visible"
|
||||
:visible.sync="imgObj.visible"
|
||||
:title="$t('upload:nonedicom:dialogTitle:preview')"
|
||||
append-to-body
|
||||
width="565px"
|
||||
>
|
||||
<div
|
||||
v-loading="imgObj.loading"
|
||||
class="base-modal-body"
|
||||
style="border: 2px solid #ccc; padding: 10px"
|
||||
>
|
||||
<el-image
|
||||
:src="`${OSSclientConfig.basePath}${imgObj.url}`"
|
||||
crossorigin="anonymous"
|
||||
fit="fit"
|
||||
style="height: 500px; width: 500px"
|
||||
@error="imgObj.loading = false"
|
||||
@load="imgObj.loading = false"
|
||||
/>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 上传非dicom文件 -->
|
||||
<el-dialog
|
||||
v-if="uploadVisible"
|
||||
:visible.sync="uploadVisible"
|
||||
:close-on-click-modal="false"
|
||||
:title="$t('trials:uploadNonDicoms:dialogTitle:upload')"
|
||||
width="800px"
|
||||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
@close="resetFileDiaolg"
|
||||
>
|
||||
<!-- 多文件上传 -->
|
||||
<form id="inputForm" ref="uploadForm">
|
||||
<el-divider content-position="left">{{
|
||||
$t('trials:uploadNonDicoms:label:fileType')
|
||||
}}</el-divider>
|
||||
<div class="form-group">
|
||||
<div class="upload" style="margin-right: 10px">
|
||||
<input
|
||||
multiple="multiple"
|
||||
webkitdirectory=""
|
||||
directory
|
||||
accept="*/*"
|
||||
type="file"
|
||||
name="uploadFolder"
|
||||
class="select-file"
|
||||
title=""
|
||||
@change="beginScanFiles($event)"
|
||||
v-if="!btnLoading"
|
||||
/>
|
||||
<div class="btn-select">
|
||||
{{ $t('trials:uploadNonDicoms:button:selectFolder') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload">
|
||||
<input
|
||||
class="select-file"
|
||||
multiple=""
|
||||
:accept="faccept.join(',')"
|
||||
type="file"
|
||||
name="uploadFile"
|
||||
title=""
|
||||
@change="beginScanFiles($event)"
|
||||
v-if="!btnLoading"
|
||||
/>
|
||||
<div class="btn-select">
|
||||
{{ $t('trials:uploadNonDicoms:button:select') }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- <span style="margin-left: 10px">{{
|
||||
$store.state.trials.uploadTip
|
||||
}}</span> -->
|
||||
</div>
|
||||
</form>
|
||||
<!-- 文件列表 -->
|
||||
<el-table
|
||||
ref="filesTable"
|
||||
:data="fileList"
|
||||
class="dicomFiles-table"
|
||||
height="300"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55"
|
||||
:selectable="(row, index) => row.status !== 2 && !btnLoading"
|
||||
/>
|
||||
<el-table-column type="index" width="50" />
|
||||
<!-- 文件名称 -->
|
||||
<el-table-column
|
||||
prop="name"
|
||||
:label="$t('trials:uploadNonDicoms:table:fileName')"
|
||||
min-width="100"
|
||||
/>
|
||||
<!-- 文件大小 -->
|
||||
<el-table-column
|
||||
prop="size"
|
||||
:label="$t('trials:uploadNonDicoms:table:fileSize')"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
scope.row.size && scope.row.size > 0
|
||||
? `${(scope.row.size / 1024 / 1024).toFixed(2)}MB`
|
||||
: 0
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 文件类型 -->
|
||||
<el-table-column
|
||||
prop="type"
|
||||
:label="$t('trials:uploadNonDicoms:table:fileType')"
|
||||
/>
|
||||
<!-- 上传状态 -->
|
||||
<el-table-column
|
||||
prop="status"
|
||||
:label="$t('trials:uploadNonDicoms:table:uploadStatus')"
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag
|
||||
:type="['warning', 'info', 'success', 'danger'][scope.row.status]"
|
||||
v-if="scope.row.status || scope.row.status === 0"
|
||||
>{{ $fd('NoneDicomUploadStatus', scope.row.status) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('trials:uploadNonDicoms:table:failedFileCount')"
|
||||
min-width="150"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-progress
|
||||
color="#409eff"
|
||||
:percentage="
|
||||
((scope.row.uploadFileSize * 100) / scope.row.size).toFixed(2) *
|
||||
1
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('common:action:action')">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
circle
|
||||
:disabled="btnLoading"
|
||||
:title="$t('trials:crcUpload:action:delete')"
|
||||
@click="handleRemoveFile(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: right; padding: 10px 0px">
|
||||
<span style="margin-right: 10px">{{
|
||||
$store.state.trials.uploadTip
|
||||
}}</span>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="selectArr.length == 0"
|
||||
:loading="btnLoading"
|
||||
@click="beginUpload"
|
||||
>
|
||||
{{ $t('trials:uploadNonDicoms:action:upload') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getIRUploadTaskNoneDicomStudyList,
|
||||
deleteTaskStudy,
|
||||
} from '@/api/load.js'
|
||||
import { preArchiveStudy, uploadNoneDicomFile } from '@/api/trials'
|
||||
import store from '@/store'
|
||||
import { getToken } from '@/utils/auth'
|
||||
let defaultSearchData = () => {
|
||||
return {
|
||||
SubjectId: null,
|
||||
TrialReadingCriterionId: null,
|
||||
SubjectCode: null,
|
||||
Asc: false,
|
||||
SortField: 'TaskBlindName',
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'nonedicomFile',
|
||||
props: {
|
||||
SubjectId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
SubjectCode: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
Criterion: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
VisitTaskId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
isUpload: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
list: [],
|
||||
searchData: defaultSearchData(),
|
||||
imgObj: { url: '', visible: false, loading: false },
|
||||
uploadVisible: false,
|
||||
fileList: [],
|
||||
selectArr: [],
|
||||
successFileList: [],
|
||||
isFail: false,
|
||||
faccept: ['.jpg', '.jpeg', '.png', '.bmp', '.zip'],
|
||||
fCount: 0,
|
||||
btnLoading: false,
|
||||
currentRow: {},
|
||||
studyMonitorId: null,
|
||||
open: null,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
isFail() {
|
||||
if (this.isFail) {
|
||||
this.$confirm(
|
||||
this.$t('trials:visit:crcUpload:nomDicomFiles:failUpload'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: this.$t('common:button:confirm'),
|
||||
cancelButtonText: this.$t('common:button:cancel'),
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.beginUpload()
|
||||
})
|
||||
.catch((err) => {
|
||||
this.btnLoading = false
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
},
|
||||
btnLoading() {
|
||||
store.dispatch('trials/setUnLock', this.btnLoading)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
beforeDestroy() {
|
||||
store.dispatch('trials/setUnLock', false)
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
try {
|
||||
this.searchData.SubjectId = this.SubjectId
|
||||
this.searchData.TrialReadingCriterionId =
|
||||
this.Criterion.TrialReadingCriterionId
|
||||
this.searchData.SubjectCode = this.SubjectCode
|
||||
if (this.VisitTaskId) {
|
||||
this.searchData.VisitTaskId = this.VisitTaskId
|
||||
}
|
||||
this.loading = true
|
||||
let res = await getIRUploadTaskNoneDicomStudyList(this.searchData)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.list = res.Result
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 扫描待上传文件
|
||||
beginScanFiles(e) {
|
||||
var files = [...e.target.files]
|
||||
var sameFiles = []
|
||||
files.forEach((file) => {
|
||||
var extendName = file.name
|
||||
.substring(file.name.lastIndexOf('.'))
|
||||
.toLocaleLowerCase()
|
||||
if (
|
||||
this.faccept.indexOf(extendName) !== -1 &&
|
||||
this.fileList.findIndex((v) => v.name === file.name) > -1
|
||||
) {
|
||||
sameFiles.push(file.name)
|
||||
}
|
||||
})
|
||||
var scope = this
|
||||
if (sameFiles.length > 0) {
|
||||
const h = this.$createElement
|
||||
var msg = this.$t(
|
||||
'trials:uploadNonDicoms:message:exsitSameFile'
|
||||
).replace('xxx', sameFiles.join(', '))
|
||||
this.$msgbox({
|
||||
message: h('div', { style: 'maxHeight:300px;overflow: auto;' }, [
|
||||
h('p', null, msg),
|
||||
h(
|
||||
'p',
|
||||
null,
|
||||
this.$t('trials:uploadNonDicoms:message:isContinueUpload')
|
||||
),
|
||||
]),
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
})
|
||||
.then(() => {
|
||||
scope.pendingUploadQuene(files)
|
||||
})
|
||||
.catch(() => {
|
||||
scope.resetUploadForm()
|
||||
})
|
||||
} else {
|
||||
scope.pendingUploadQuene(files)
|
||||
}
|
||||
},
|
||||
pendingUploadQuene(files) {
|
||||
for (var i = 0; i < files.length; ++i) {
|
||||
const fileName = files[i].name
|
||||
var extendName = fileName
|
||||
.substring(fileName.lastIndexOf('.'))
|
||||
.toLocaleLowerCase()
|
||||
if (this.faccept.indexOf(extendName) !== -1) {
|
||||
files[i].id = `${files[i].lastModified}${files[i].name}`
|
||||
let obj = {
|
||||
name: files[i].name,
|
||||
size: files[i].size,
|
||||
type: extendName.split('.')[1],
|
||||
status: 0,
|
||||
file: files[i],
|
||||
id: `${files[i].lastModified}${files[i].name}`,
|
||||
fileType: files[i].type,
|
||||
uploadFileSize: 0,
|
||||
}
|
||||
this.fileList.push(obj)
|
||||
this.$refs.filesTable.toggleRowSelection(obj, true)
|
||||
}
|
||||
}
|
||||
this.resetUploadForm()
|
||||
},
|
||||
handleRemoveFile(row) {
|
||||
this.$confirm(this.$t('trials:uploadNonDicoms:message:delete'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
})
|
||||
.then(() => {
|
||||
this.fileList.splice(
|
||||
this.fileList.findIndex((item) => item.id === row.id),
|
||||
1
|
||||
)
|
||||
let flag = this.successFileList.some((item) => item.id === row.id)
|
||||
if (flag) {
|
||||
this.successFileList.splice(
|
||||
this.successFileList.findIndex((item) => item.id === row.id),
|
||||
1
|
||||
)
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
resetUploadForm() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.uploadForm.reset()
|
||||
})
|
||||
},
|
||||
// 打开上传文件弹窗
|
||||
handleUpload(row) {
|
||||
this.fileList = []
|
||||
this.uploadVisible = true
|
||||
this.fCount = 0
|
||||
this.currentRow = { ...row }
|
||||
},
|
||||
resetFileDiaolg() {
|
||||
this.btnLoading = false
|
||||
this.uploadVisible = false
|
||||
this.selectArr = []
|
||||
this.successFileList = []
|
||||
this.OSSclient.close()
|
||||
},
|
||||
// 预览文件
|
||||
previewFile(row) {
|
||||
// window.open(row.FullFilePath, '_blank')
|
||||
// this.imgObj.url = row.FullFilePath || row.Path
|
||||
// this.imgObj.loading = true
|
||||
// this.imgObj.visible = true
|
||||
this.$refs[row.Path].$viewer.show()
|
||||
},
|
||||
// 预览单个检查下非Dicom文件
|
||||
handlePreviewNoneDicomFiles(row) {
|
||||
if (this.open) {
|
||||
this.open.close()
|
||||
}
|
||||
let trialId = this.$route.query.trialId
|
||||
var token = getToken()
|
||||
const routeData = this.$router.resolve({
|
||||
path: `/showNoneDicoms?trialId=${trialId}&subjectVisitId=${row.SourceSubjectVisitId}&studyId=${row.Id}&visitTaskId=${row.VisitTaskId}&TokenKey=${token}`,
|
||||
})
|
||||
this.open = window.open(routeData.href, '_blank')
|
||||
},
|
||||
// 删除
|
||||
async remove(item) {
|
||||
try {
|
||||
let confirm = await this.$confirm(
|
||||
this.$t('upload:nonedicom:confirm:delMessage'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: this.$t('common:button:confirm'),
|
||||
cancelButtonText: this.$t('common:button:cancel'),
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
let params = {
|
||||
VisitTaskId: item.VisitTaskId,
|
||||
IsDicom: false,
|
||||
NoneDicomStudyId: item.Id,
|
||||
}
|
||||
let res = await deleteTaskStudy(params)
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
this.$emit('update:isUpload', true)
|
||||
this.$message.success(
|
||||
this.$t('trials:uploadImage:message:delSuccess')
|
||||
)
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
// 获取待上传文件信息
|
||||
handleSelectionChange(selection) {
|
||||
this.selectArr = selection
|
||||
},
|
||||
// 开始上传文件
|
||||
async beginUpload() {
|
||||
this.btnLoading = true
|
||||
this.isFail = false
|
||||
const fileMaxSize = 1024 * 1024 * 1024 * 2 // 1G
|
||||
var currentFilesSize = 0
|
||||
this.selectArr.forEach((item) => {
|
||||
currentFilesSize += item.size
|
||||
})
|
||||
if (currentFilesSize / fileMaxSize > 1) {
|
||||
// 'Upload file size cannot exceed 1G'
|
||||
this.$alert(this.$t('trials:uploadNonDicoms:message:uploadSize'))
|
||||
this.btnLoading = false
|
||||
} else {
|
||||
this.selectArr.forEach((item) => (item.status = 0))
|
||||
let num = this.selectArr.length > 6 ? 6 : this.selectArr.length
|
||||
let funArr = []
|
||||
let res = await preArchiveStudy({
|
||||
subjectVisitId: this.currentRow.SourceSubjectVisitId,
|
||||
isDicom: false,
|
||||
FileCount: this.selectArr.length,
|
||||
})
|
||||
if (res.IsSuccess) {
|
||||
this.studyMonitorId = res.Result
|
||||
for (let i = 0; i < num; i++) {
|
||||
funArr.push(this.handleUploadTask(this.selectArr, i))
|
||||
}
|
||||
if (funArr.length > 0) {
|
||||
let res = await Promise.all(funArr)
|
||||
}
|
||||
} else {
|
||||
this.isFail = true
|
||||
}
|
||||
}
|
||||
},
|
||||
// 并发上传
|
||||
async handleUploadTask(arr, index) {
|
||||
if (!this.uploadVisible) return
|
||||
let file = this.fileList.filter((item) => item.id === arr[index].id)[0]
|
||||
file.status = 1
|
||||
let path = `/${this.$route.query.trialId}/TaskImage/${
|
||||
this.currentRow.SubjectId
|
||||
}/${this.currentRow.VisitTaskId}/${this.$guid()}${file.name
|
||||
.substring(file.name.lastIndexOf('.'))
|
||||
.toLocaleLowerCase()}`
|
||||
file.curPath = path
|
||||
const fileData = await this.fileToBlob(file.file)
|
||||
let res = await this.fileToOss(path, fileData, file)
|
||||
if (res) {
|
||||
file.status = 2
|
||||
this.successFileList.push({
|
||||
fileName: file.name,
|
||||
filePath: this.$getObjectName(res.url),
|
||||
fileFize: file.size,
|
||||
fileType: file.fileType,
|
||||
})
|
||||
let flag = arr.every((item) => item.status === 2)
|
||||
if (flag) {
|
||||
let RecordPath = await this.uploadRecord(arr)
|
||||
return this.submitFile(this.successFileList, RecordPath)
|
||||
}
|
||||
} else {
|
||||
file.status = 3
|
||||
}
|
||||
let flag = arr.every((item) => item.status > 1)
|
||||
if (flag) {
|
||||
let failFileList = arr.filter((item) => item.status === 3)
|
||||
if (failFileList && failFileList.length > 0) {
|
||||
let RecordPath = await this.uploadRecord(arr)
|
||||
this.$refs.filesTable.clearSelection()
|
||||
failFileList.forEach((row) => {
|
||||
row.uploadFileSize = 0
|
||||
this.$refs.filesTable.toggleRowSelection(row)
|
||||
})
|
||||
this.isFail = true
|
||||
this.submitFile(this.successFileList, RecordPath, true)
|
||||
return false
|
||||
}
|
||||
}
|
||||
let ind = arr.findIndex((item) => item.status === 0)
|
||||
if (ind >= 0) {
|
||||
return this.handleUploadTask(arr, ind)
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
// file上传到oss
|
||||
async fileToOss(path, file, item) {
|
||||
try {
|
||||
let res = await this.OSSclient.multipartUpload(
|
||||
{
|
||||
path,
|
||||
file,
|
||||
speed: true,
|
||||
},
|
||||
(percentage, checkpoint, lastPer) => {
|
||||
item.uploadFileSize += checkpoint.size * (percentage - lastPer)
|
||||
if (item.uploadFileSize > file.fileSize) {
|
||||
item.uploadFileSize = file.fileSize
|
||||
}
|
||||
}
|
||||
)
|
||||
if (res) {
|
||||
return res
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
return false
|
||||
}
|
||||
},
|
||||
// 非Dicom文件上传归档
|
||||
submitFile(uploadedFileList, RecordPath, isReLoad = false) {
|
||||
if (!this.uploadVisible) return
|
||||
this.btnLoading = true
|
||||
var params = {
|
||||
trialId: this.$route.query.trialId,
|
||||
subjectVisitId: this.currentRow.SourceSubjectVisitId,
|
||||
noneDicomStudyId: this.currentRow.Id,
|
||||
studyMonitorId: this.studyMonitorId,
|
||||
VisitTaskId: this.currentRow.VisitTaskId,
|
||||
uploadedFileList: uploadedFileList,
|
||||
}
|
||||
if (RecordPath) {
|
||||
params.RecordPath = RecordPath.path
|
||||
params.FailedFileCount = RecordPath.Record.Failed.length
|
||||
}
|
||||
uploadNoneDicomFile(params)
|
||||
.then((res) => {
|
||||
if (!isReLoad) {
|
||||
this.resetFileDiaolg()
|
||||
}
|
||||
this.getList()
|
||||
this.$emit('update:isUpload', true)
|
||||
// 刷新父组件列表
|
||||
this.$emit('getList')
|
||||
this.$message.success(
|
||||
this.$t('trials:uploadNonDicoms:message:uploadedSuccessfully')
|
||||
)
|
||||
})
|
||||
.catch(() => {
|
||||
this.btnLoading = false
|
||||
})
|
||||
},
|
||||
// 上传提交记录
|
||||
uploadRecord(arr) {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
let Record = {
|
||||
Failed: [],
|
||||
Existed: [],
|
||||
Uploaded: [],
|
||||
FileCount: arr.length,
|
||||
}
|
||||
arr.forEach((item) => {
|
||||
let file = this.fileList.find((data) => data.id === item.id)
|
||||
if (file.status === 2) {
|
||||
Record.Uploaded.push(file.curPath)
|
||||
}
|
||||
if (file.status === 3) {
|
||||
Record.Failed.push(file.curPath)
|
||||
}
|
||||
})
|
||||
let text = JSON.stringify(Record)
|
||||
let logJsonBlob = this.generateTxtFile(text)
|
||||
let logJsonObjectName = `/${this.$route.query.trialId}/TaskImage/${this.currentRow.SubjectId}/${this.currentRow.VisitTaskId}/${this.studyMonitorId}.txt`
|
||||
let logRes
|
||||
try {
|
||||
logRes = await this.OSSclient.put(logJsonObjectName, logJsonBlob)
|
||||
if (logRes && logRes.url) {
|
||||
resolve({ path: this.$getObjectName(logRes.url), Record })
|
||||
} else {
|
||||
resolve(false)
|
||||
}
|
||||
} catch (e) {
|
||||
resolve(false)
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
resolve(false)
|
||||
}
|
||||
})
|
||||
},
|
||||
generateTxtFile(text) {
|
||||
let blob = new Blob(['\ufeff', text], { type: 'text/plain' })
|
||||
return blob
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.top {
|
||||
margin: 10px 0;
|
||||
}
|
||||
.upload {
|
||||
display: inline-block;
|
||||
height: 30px;
|
||||
width: 90px;
|
||||
padding: 2px 10px;
|
||||
line-height: 23px;
|
||||
position: relative;
|
||||
text-decoration: none;
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
background: #428bca;
|
||||
border-color: #428bca;
|
||||
color: #fff;
|
||||
.select-file {
|
||||
height: 30px;
|
||||
width: 90px;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
left: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
font-size: 0;
|
||||
}
|
||||
.btn-select {
|
||||
//给显示在页面上的按钮写样式
|
||||
width: 90px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
border-radius: 24px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
pointer-events: none; //pointer-events:none用来控制该标签的点击穿透事件
|
||||
}
|
||||
}
|
||||
.tip {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-top: 5px;
|
||||
i {
|
||||
margin: 3px 5px 0 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,170 @@
|
||||
<template>
|
||||
<base-model :config="model_cfg">
|
||||
<div slot="dialog-body">
|
||||
<el-table :data="modelList" style="width: 100%" height="300">
|
||||
<!--检查编号-->
|
||||
<el-table-column
|
||||
prop="StudyCode"
|
||||
:label="$t('trials:uploadImage:table:StudyCode')"
|
||||
/>
|
||||
<!--检查类型-->
|
||||
<el-table-column
|
||||
prop="ModalityForEdit"
|
||||
:label="$t('trials:uploadImage:table:ModalityForEdit')"
|
||||
v-if="IsDicom"
|
||||
/>
|
||||
<!--检查模态-->
|
||||
<el-table-column
|
||||
prop="Modalities"
|
||||
:label="$t('trials:uploadImage:table:Modalities')"
|
||||
v-if="IsDicom"
|
||||
/>
|
||||
<!--检查部位-->
|
||||
<el-table-column
|
||||
prop="BodyPartForEdit"
|
||||
:label="$t('trials:uploadImage:table:BodyPartForEdit')"
|
||||
v-if="IsDicom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
$fd(
|
||||
'Bodypart',
|
||||
scope.row.BodyPartForEdit,
|
||||
'Code',
|
||||
{ Bodypart: bodyPart },
|
||||
'Name'
|
||||
)
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--序列数量-->
|
||||
<el-table-column
|
||||
prop="SeriesCount"
|
||||
:label="$t('trials:uploadImage:table:SeriesCount')"
|
||||
v-if="IsDicom"
|
||||
/>
|
||||
<!--图像数量-->
|
||||
<el-table-column
|
||||
prop="InstanceCount"
|
||||
:label="$t('trials:uploadImage:table:InstanceCount')"
|
||||
v-if="IsDicom"
|
||||
/>
|
||||
<!--检查时间-->
|
||||
<el-table-column
|
||||
prop="StudyTime"
|
||||
:label="$t('trials:uploadImage:table:StudyTime')"
|
||||
v-if="IsDicom"
|
||||
min-width="130"
|
||||
/>
|
||||
<!--检查模态-->
|
||||
<el-table-column
|
||||
prop="Modality"
|
||||
:label="$t('trials:uploadImage:table:Modalities')"
|
||||
v-if="!IsDicom"
|
||||
/>
|
||||
<!--检查部位-->
|
||||
<el-table-column
|
||||
prop="BodyPart"
|
||||
:label="$t('trials:uploadImage:table:BodyPartForEdit')"
|
||||
v-if="!IsDicom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
$fd(
|
||||
'Bodypart',
|
||||
scope.row.BodyPart,
|
||||
'Code',
|
||||
{ Bodypart: bodyPart },
|
||||
'Name'
|
||||
)
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--文件数量-->
|
||||
<el-table-column
|
||||
prop="FileCount"
|
||||
:label="$t('trials:uploadImage:table:FileCount')"
|
||||
v-if="!IsDicom"
|
||||
/>
|
||||
<!--检查时间-->
|
||||
<el-table-column
|
||||
prop="ImageDate"
|
||||
:label="$t('trials:uploadImage:table:StudyTime')"
|
||||
v-if="!IsDicom"
|
||||
min-width="130"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('common:action:action')"
|
||||
fixed="right"
|
||||
width="80"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<!--预览--->
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-view"
|
||||
:title="$t('trials:uploadImage:button:preview')"
|
||||
@click.stop="preview(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</base-model>
|
||||
</template>
|
||||
<script>
|
||||
import baseModel from '@/components/BaseModel'
|
||||
import { getToken } from '@/utils/auth'
|
||||
export default {
|
||||
name: 'studyView',
|
||||
props: {
|
||||
model_cfg: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
bodyPart: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
},
|
||||
},
|
||||
modelList: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
},
|
||||
},
|
||||
IsDicom: {
|
||||
required: true,
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
components: {
|
||||
'base-model': baseModel,
|
||||
},
|
||||
methods: {
|
||||
// 预览
|
||||
preview(row) {
|
||||
let routeData = null
|
||||
if (this.IsDicom) {
|
||||
var token = getToken()
|
||||
routeData = this.$router.resolve({
|
||||
path: `/showdicom?studyId=${row.Id}&TokenKey=${token}&type=Study`,
|
||||
})
|
||||
} else {
|
||||
let trialId = this.$route.query.trialId
|
||||
var token = getToken()
|
||||
routeData = this.$router.resolve({
|
||||
path: `/showNoneDicoms?trialId=${trialId}&subjectVisitId=${row.SourceSubjectVisitId}&studyId=${row.Id}&TokenKey=${token}`,
|
||||
})
|
||||
}
|
||||
window.open(routeData.href, '_blank')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
@@ -224,6 +224,7 @@ import {
|
||||
addOrUpdateArchiveTaskStudy,
|
||||
} from "@/api/load.js";
|
||||
import { parseDicom, getThumbnail, dicomToOSS } from "@/utils/parseDicom.js";
|
||||
import store from "@/store";
|
||||
export default {
|
||||
name: "uploadList",
|
||||
props: {
|
||||
@@ -262,6 +263,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
isLoad() {
|
||||
store.dispatch("trials/setUnLock", this.isLoad);
|
||||
if (!this.isLoad) {
|
||||
this.$refs.file.value = null;
|
||||
if (this.dicomList.some((item) => item.isUpload === 3)) {
|
||||
@@ -747,6 +749,7 @@ export default {
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.isClose = true;
|
||||
store.dispatch("trials/setUnLock", false);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -66,13 +66,13 @@
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<!--下载--->
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
v-if="!isUpload && Criterion.ImageDownloadEnum > 0"
|
||||
circle
|
||||
icon="el-icon-download"
|
||||
:title="$t('trials:uploadImage:button:download')"
|
||||
@click.stop="downloadImage(scope.row)"
|
||||
/>
|
||||
/> -->
|
||||
<!--删除--->
|
||||
<el-button
|
||||
v-if="isUpload"
|
||||
@@ -102,7 +102,7 @@
|
||||
import uploadList from "./components/upload-list.vue";
|
||||
import studyView from "./components/study-view.vue";
|
||||
import { getSubjectImageUploadList, deleteTaskStudy } from "@/api/load.js";
|
||||
import { downloadImage } from "@/utils/uploadZip.js";
|
||||
import store from "@/store";
|
||||
export default {
|
||||
name: "uploadImage",
|
||||
props: {
|
||||
@@ -247,16 +247,356 @@ export default {
|
||||
},
|
||||
// 打包下载
|
||||
async downloadImage(item) {
|
||||
try {
|
||||
await downloadImage(
|
||||
this.$route.query.trialId,
|
||||
item.SourceSubjectVisitId
|
||||
);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
let zipName = "压缩包.zip";
|
||||
let InstanceInfoList = [
|
||||
{
|
||||
Id: "e634352c-6465-32ba-04b3-824ec8d346a8",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/e634352c-6465-32ba-04b3-824ec8d346a8",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 1,
|
||||
},
|
||||
{
|
||||
Id: "d4ad1dd2-747b-6de7-8ad4-3e81c58943dd",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/d4ad1dd2-747b-6de7-8ad4-3e81c58943dd",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 2,
|
||||
},
|
||||
{
|
||||
Id: "6a1d1d12-2b4a-0368-c7e1-d44f7180b280",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/6a1d1d12-2b4a-0368-c7e1-d44f7180b280",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 3,
|
||||
},
|
||||
{
|
||||
Id: "7a8fb1b4-9ea8-1189-4ca6-b9a9b9547a39",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/7a8fb1b4-9ea8-1189-4ca6-b9a9b9547a39",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 4,
|
||||
},
|
||||
{
|
||||
Id: "8d00be19-5ac5-c608-dbd0-41f84cfacd95",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/8d00be19-5ac5-c608-dbd0-41f84cfacd95",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 5,
|
||||
},
|
||||
{
|
||||
Id: "729ded91-0eca-78f2-1c17-5182d4f27e3a",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/729ded91-0eca-78f2-1c17-5182d4f27e3a",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 6,
|
||||
},
|
||||
{
|
||||
Id: "9e2fd28c-72fe-bb66-e0ce-40115cd82260",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/9e2fd28c-72fe-bb66-e0ce-40115cd82260",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 7,
|
||||
},
|
||||
{
|
||||
Id: "9b31613f-3c9e-28ad-fd9e-7001a69e09b5",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/9b31613f-3c9e-28ad-fd9e-7001a69e09b5",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 8,
|
||||
},
|
||||
{
|
||||
Id: "4982b453-d068-7e56-2acd-a361d8584f35",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/4982b453-d068-7e56-2acd-a361d8584f35",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 9,
|
||||
},
|
||||
{
|
||||
Id: "8279cf5a-2551-43ea-3fe4-673e88ba7e5a",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/8279cf5a-2551-43ea-3fe4-673e88ba7e5a",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 10,
|
||||
},
|
||||
{
|
||||
Id: "6424e9c5-d31b-9388-3b64-a56705ab6fc8",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/6424e9c5-d31b-9388-3b64-a56705ab6fc8",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 11,
|
||||
},
|
||||
{
|
||||
Id: "a73cf3f9-defa-0c22-dfdc-8c5bfb93c9a7",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/a73cf3f9-defa-0c22-dfdc-8c5bfb93c9a7",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 12,
|
||||
},
|
||||
{
|
||||
Id: "dbfaafea-f721-0a93-37c6-69bcc0d957c3",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/dbfaafea-f721-0a93-37c6-69bcc0d957c3",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 13,
|
||||
},
|
||||
{
|
||||
Id: "52000ac1-6a5b-83e2-5468-4dfdf394e455",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/52000ac1-6a5b-83e2-5468-4dfdf394e455",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 14,
|
||||
},
|
||||
{
|
||||
Id: "de34a347-41f4-1018-a710-48d81fa9aadc",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/de34a347-41f4-1018-a710-48d81fa9aadc",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 15,
|
||||
},
|
||||
{
|
||||
Id: "251d6a13-26b7-935b-d765-0c5db1ed7dfc",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/251d6a13-26b7-935b-d765-0c5db1ed7dfc",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 16,
|
||||
},
|
||||
{
|
||||
Id: "b22e93c8-3f6a-484a-a32b-f7626689f8da",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/b22e93c8-3f6a-484a-a32b-f7626689f8da",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 17,
|
||||
},
|
||||
{
|
||||
Id: "6517400b-d4b5-db65-d026-8c06c40bf244",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/6517400b-d4b5-db65-d026-8c06c40bf244",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 18,
|
||||
},
|
||||
{
|
||||
Id: "8e70df99-525a-4ecd-5cf1-6c32698eaa3f",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/8e70df99-525a-4ecd-5cf1-6c32698eaa3f",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 19,
|
||||
},
|
||||
{
|
||||
Id: "7df907f2-b6a6-fd03-67ab-be86c497d412",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/7df907f2-b6a6-fd03-67ab-be86c497d412",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 20,
|
||||
},
|
||||
{
|
||||
Id: "ba31ba5b-728e-8301-273d-459fd3c65a43",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/ba31ba5b-728e-8301-273d-459fd3c65a43",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 21,
|
||||
},
|
||||
{
|
||||
Id: "7528c70c-5ba1-59c1-413c-7bfc984c0066",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/7528c70c-5ba1-59c1-413c-7bfc984c0066",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 22,
|
||||
},
|
||||
{
|
||||
Id: "15dd574d-fc82-c5b7-fefb-497346d4abbb",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/15dd574d-fc82-c5b7-fefb-497346d4abbb",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 23,
|
||||
},
|
||||
{
|
||||
Id: "6cd76aca-91fa-64ce-6077-af48c5e5b18b",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/6cd76aca-91fa-64ce-6077-af48c5e5b18b",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 24,
|
||||
},
|
||||
{
|
||||
Id: "2f0f9f4e-12b8-a6a8-d3f9-f43e2055653d",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/2f0f9f4e-12b8-a6a8-d3f9-f43e2055653d",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 25,
|
||||
},
|
||||
{
|
||||
Id: "3c49f379-8548-67cd-1333-dde28219c6e9",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/3c49f379-8548-67cd-1333-dde28219c6e9",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 26,
|
||||
},
|
||||
{
|
||||
Id: "910f43c8-123a-0753-aaf7-11081eef4268",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/910f43c8-123a-0753-aaf7-11081eef4268",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 27,
|
||||
},
|
||||
{
|
||||
Id: "ffad6b36-74aa-1c7d-01eb-18524da91f6e",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/ffad6b36-74aa-1c7d-01eb-18524da91f6e",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 28,
|
||||
},
|
||||
{
|
||||
Id: "9e2bf22d-8734-62ae-881a-7404064a95ce",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/9e2bf22d-8734-62ae-881a-7404064a95ce",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 29,
|
||||
},
|
||||
{
|
||||
Id: "eef8b291-ffdf-dbfb-244d-5e63dc5b8cc7",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/eef8b291-ffdf-dbfb-244d-5e63dc5b8cc7",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 30,
|
||||
},
|
||||
{
|
||||
Id: "12b0de3a-243c-78b9-b006-82f2cc633a0f",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/12b0de3a-243c-78b9-b006-82f2cc633a0f",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 31,
|
||||
},
|
||||
{
|
||||
Id: "4341ea87-7d54-2608-184e-01e5c976ce9f",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/4341ea87-7d54-2608-184e-01e5c976ce9f",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 32,
|
||||
},
|
||||
{
|
||||
Id: "4db2bac2-18eb-0589-d520-f297b2840e1d",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/4db2bac2-18eb-0589-d520-f297b2840e1d",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 33,
|
||||
},
|
||||
{
|
||||
Id: "9442c2a3-0972-67f7-afc3-6f1a47abefab",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/9442c2a3-0972-67f7-afc3-6f1a47abefab",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 34,
|
||||
},
|
||||
{
|
||||
Id: "a7fb75b0-0b09-5340-70cf-a11afd84b1ec",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/a7fb75b0-0b09-5340-70cf-a11afd84b1ec",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 35,
|
||||
},
|
||||
{
|
||||
Id: "753d7795-451a-bd32-69ea-fd58c1e89d63",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/753d7795-451a-bd32-69ea-fd58c1e89d63",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 36,
|
||||
},
|
||||
{
|
||||
Id: "33bf7274-de0a-e8f9-f97a-c58fb2ea3aaf",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/33bf7274-de0a-e8f9-f97a-c58fb2ea3aaf",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 37,
|
||||
},
|
||||
{
|
||||
Id: "adadae31-37a1-818d-3721-09a1d371c6a5",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/adadae31-37a1-818d-3721-09a1d371c6a5",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 38,
|
||||
},
|
||||
{
|
||||
Id: "f64e8b0d-d2ab-b112-5705-92c23cfc5df6",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/f64e8b0d-d2ab-b112-5705-92c23cfc5df6",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 39,
|
||||
},
|
||||
{
|
||||
Id: "781088b0-5afd-6eb3-5f87-9bfec210d490",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/781088b0-5afd-6eb3-5f87-9bfec210d490",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 40,
|
||||
},
|
||||
{
|
||||
Id: "56df4cef-8053-bff3-21f7-1b1841a3d6e6",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/56df4cef-8053-bff3-21f7-1b1841a3d6e6",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 41,
|
||||
},
|
||||
{
|
||||
Id: "a3e3dab9-7a61-f822-d113-42f46bc5e8ce",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/a3e3dab9-7a61-f822-d113-42f46bc5e8ce",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 42,
|
||||
},
|
||||
{
|
||||
Id: "1cc195b9-e498-179d-b927-6d706266decb",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/1cc195b9-e498-179d-b927-6d706266decb",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 43,
|
||||
},
|
||||
{
|
||||
Id: "7dca834f-d959-898e-a0cb-5c8244c4c4a9",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/7dca834f-d959-898e-a0cb-5c8244c4c4a9",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 44,
|
||||
},
|
||||
{
|
||||
Id: "13eeba83-2e93-800e-e934-a56061633c64",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/13eeba83-2e93-800e-e934-a56061633c64",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 45,
|
||||
},
|
||||
{
|
||||
Id: "971f0a62-92a3-6d04-53c5-51fa9155e28c",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/971f0a62-92a3-6d04-53c5-51fa9155e28c",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 46,
|
||||
},
|
||||
{
|
||||
Id: "2959d06c-5ac7-f3b9-63d4-1a56e3974fc7",
|
||||
Path: "/01000000-c0a8-0242-ff9a-08dc8a84633c/Image/01000000-c0a8-0242-2179-08dc8a9e55b4/01000000-c0a8-0242-7f99-08dc8abdc649/01000000-c0a8-0242-89ca-08dc8abdc65d/1.2.840.113619.2.334.3.2831181473.554.1419910103.185/2959d06c-5ac7-f3b9-63d4-1a56e3974fc7",
|
||||
HtmlPath: "",
|
||||
NumberOfFrames: 0,
|
||||
InstanceNumber: 47,
|
||||
},
|
||||
];
|
||||
let path = "https://zy-irc-test-store.oss-cn-shanghai.aliyuncs.com";
|
||||
let files = new Array();
|
||||
for (let i = 0; i < InstanceInfoList.length; i++) {
|
||||
let item = InstanceInfoList[i];
|
||||
let obj = {
|
||||
name: "file" + i,
|
||||
url: path + item.Path,
|
||||
};
|
||||
files.push(obj);
|
||||
}
|
||||
store.dispatch("trials/setUnLock", true);
|
||||
// let res = await downloadImage(zipName, files);
|
||||
store.dispatch("trials/setUnLock", false);
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
store.dispatch("trials/setUnLock", false);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -1,180 +0,0 @@
|
||||
<template>
|
||||
<div style="text-align: center">
|
||||
<div style="display: flex;justify-content: center">
|
||||
<video v-if="videoSrc" id="video" controls crossorigin="anonymous" width="400" height="270"">
|
||||
<source :src="videoSrc" type="video/mp4">
|
||||
无法播放,请点击转码
|
||||
</video>
|
||||
<div v-else style="border:2px dashed #999;border-radius: 10px;cursor:pointer;width:400px;height:270px;display: flex;justify-content: center;align-items: center" @click="$refs.fileInput.click()">
|
||||
请选择视频文件
|
||||
</div>
|
||||
</div>
|
||||
<input v-show="false" ref="fileInput" type="file" accept="video/*" @change="fileChange">
|
||||
<div v-if="isVideoToMp4" style="display: flex;align-items: center;justify-content: right;margin-top: 10px;">
|
||||
<div>转码进度: </div>
|
||||
<el-progress style="width: 200px" :percentage="percentage" :format="() => {return percentage + '%'}" />
|
||||
</div>
|
||||
<div style="margin-top: 10px;display: flex;justify-content: right;align-items: center">
|
||||
<el-button size="small" type="primary" :disabled="isVideoToMp4 || isDisabled" @click="$refs.fileInput.click()">选择文件</el-button>
|
||||
<el-button v-if="isNeedToMp4" size="small" type="primary" :disabled="(videoSrc ? false : true) || isVideoToMp4 || isDisabled" @click="videoToMp4">转码</el-button>
|
||||
<el-button size="small" type="primary" :disabled="(videoSrc ? false : true) || isVideoToMp4 || isDisabled" @click="upload">上传</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { createFFmpeg, fetchFile } from '@ffmpeg/ffmpeg'
|
||||
const ffmpeg = createFFmpeg({
|
||||
log: true,
|
||||
corePath: './ffmpeg-core.js'
|
||||
})
|
||||
|
||||
export default {
|
||||
props: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isDisabled: false,
|
||||
imgList: [],
|
||||
fileObj: null,
|
||||
videoList: [],
|
||||
videoSrc: null,
|
||||
file: null,
|
||||
dataBuffer: null,
|
||||
percentage: 0,
|
||||
isVideoToMp4: false,
|
||||
isNeedToMp4: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
async uploadVideo(objectName, file) {
|
||||
try {
|
||||
this.isDisabled = true
|
||||
const result = await this.OSSclient.put(objectName, file)
|
||||
this.$emit('uploadOver', true, result, this.file.name)
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
this.isDisabled = false
|
||||
this.$emit('uploadOver', false)
|
||||
}
|
||||
},
|
||||
upload() {
|
||||
if (document.querySelector('#video').readyState === 0 && document.querySelector('#video').buffered.length === 0) {
|
||||
this.$alert(this.$t('components:uploadvideo:message:xf2'))
|
||||
this.isNeedToMp4 = true
|
||||
return
|
||||
}
|
||||
this.uploadVideo(`file/videofile/${this.file.name.split('.')[0]}${new Date().getTime()}.mp4`, this.dataBuffer)
|
||||
},
|
||||
async videoToMp4() {
|
||||
// 页面是否在安全上下文中
|
||||
// https 或者 本地开发环境才是安全上下文
|
||||
if (!window.isSecureContext) {
|
||||
this.$alert(this.$t('components:uploadvideo:message:xf3'))
|
||||
return
|
||||
}
|
||||
// 顶部文档是否开启跨源隔离
|
||||
if (!window.crossOriginIsolated) {
|
||||
this.$alert(this.$t('components:uploadvideo:message:xf4'))
|
||||
return
|
||||
}
|
||||
this.$message.success(this.$t('components:uploadvideo:message:xf5'))
|
||||
if (!ffmpeg.isLoaded()) {
|
||||
await ffmpeg.load()
|
||||
}
|
||||
this.percentage = 0
|
||||
this.isVideoToMp4 = true
|
||||
ffmpeg.setProgress(({ ratio }) => {
|
||||
console.log(ratio)
|
||||
if (ratio * 100 < 1) {
|
||||
this.percentage = parseInt(0)
|
||||
} else {
|
||||
this.percentage = parseInt(ratio * 100)
|
||||
}
|
||||
})
|
||||
ffmpeg.FS('writeFile', 'input.mp4', await fetchFile(this.videoSrc))
|
||||
await ffmpeg.run('-i', 'input.mp4', 'output.mp4')
|
||||
this.videoSrc = null
|
||||
const data = ffmpeg.FS('readFile', 'output.mp4')
|
||||
this.dataBuffer = new Blob([data.buffer], { type: 'video/mp4' })
|
||||
this.$message.success(this.$t('components:uploadvideo:message:xf6'))
|
||||
setTimeout(() => {
|
||||
this.videoSrc = URL.createObjectURL(this.dataBuffer)
|
||||
this.isVideoToMp4 = false
|
||||
this.isNeedToMp4 = false
|
||||
process.exit(0)
|
||||
}, 50)
|
||||
},
|
||||
fileChange(e) {
|
||||
this.videoSrc = null
|
||||
const files = e.target.files || e.dataTransfer.files
|
||||
this.file = files[0]
|
||||
var reader = new FileReader()
|
||||
reader.readAsArrayBuffer(this.file)
|
||||
reader.onloadend = async(e) => {
|
||||
this.dataBuffer = new Blob([e.target.result], { type: 'video/mp4' })
|
||||
this.videoSrc = URL.createObjectURL(this.dataBuffer)
|
||||
this.$message.success(this.$t('components:uploadvideo:message:xf7'))
|
||||
e.target.files = []
|
||||
}
|
||||
},
|
||||
deleteimg(index) {
|
||||
this.imgList.splice(index, 1)
|
||||
},
|
||||
jietu() {
|
||||
this.screenShot('video')
|
||||
},
|
||||
screenShot(id) {
|
||||
var player = document.getElementById(id)
|
||||
var canvas = document.createElement('canvas')
|
||||
var img = document.createElement('img')
|
||||
canvas.width = player.videoWidth
|
||||
canvas.height = player.videoHeight
|
||||
canvas.getContext('2d').drawImage(player, 0, 0, canvas.width, canvas.height)
|
||||
var dataURL = canvas.toDataURL('image/png')
|
||||
img.src = dataURL
|
||||
img.width = player.clientWidth
|
||||
img.height = player.clientHeight
|
||||
img.style.objectFit = 'contain'
|
||||
this.imgList.push(dataURL)
|
||||
},
|
||||
downFile(data, fileName) {
|
||||
var save_link = document.createElementNS(
|
||||
'http://www.jumi.com',
|
||||
'a'
|
||||
)
|
||||
save_link.href = data
|
||||
save_link.download = fileName
|
||||
var event = document.createEvent('MouseEvents')
|
||||
event.initMouseEvent(
|
||||
'click',
|
||||
true,
|
||||
false,
|
||||
window,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
0,
|
||||
null
|
||||
)
|
||||
save_link.dispatchEvent(event)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
#cutImage{
|
||||
img{
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,5 @@
|
||||
<script>
|
||||
export default
|
||||
{
|
||||
export default {
|
||||
processSignature: {
|
||||
LogicalConfigConfirmation: 101, // 逻辑配置确认:逻辑配置确认操作
|
||||
ProcessConfigConfirmation: 102, // 流程配置确认:流程配置确认操作
|
||||
@@ -9,6 +8,8 @@ export default
|
||||
ProcessConfigUpdates: 105, // 流程配置更新:流程配置更新操作
|
||||
ExpeditedConfigUpdates: 106, // 加急配置更新:加急配置更新操作
|
||||
QCConfirmation: 107, // 质控问题配置:质控问题配置确认操作
|
||||
DicomConfigConfirmation: 110, // DICOM AE配置确认
|
||||
DicomConfigUpdates: 111, // DICOM AE配置更新
|
||||
ClinicalDataConfirmation: 201, // 临床数据完整性确认:临床数据完整性确认操作
|
||||
AgreeToRetransmit: 202, // 同意重传:同意重传操作
|
||||
QCSingleReviewPassed: 203, // 影像质控单审通过:影像质控审核操作
|
||||
@@ -25,9 +26,9 @@ export default
|
||||
ImageAssessmentReportConfirmation: 214, // 影像评估报告确认
|
||||
MedicalAuditConfirmation: 109, // 医学审核问题确认
|
||||
ReadingUnitConfirmation: 108, // 医学审核问题确认
|
||||
MedicalAudit: 215,// 医学审核
|
||||
HeavyReadingApproval: 216,// 重阅审批
|
||||
MedicalAudit: 215, // 医学审核
|
||||
HeavyReadingApproval: 216, // 重阅审批
|
||||
ResetAndAsyncCriterion: 218, //同步签名
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
+131
-56
@@ -1,10 +1,9 @@
|
||||
|
||||
import Vue from 'vue'
|
||||
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
|
||||
|
||||
// import { createVersionPolling } from "@/utils/version-polling.esm.js";
|
||||
import ElementUI, { MessageBox } from 'element-ui'
|
||||
import { getBasicDataAllSelect, getFrontInternationalizationList } from '@/api/dictionary/dictionary'
|
||||
import { sendMFAEmail } from "@/api/user.js";
|
||||
import { getBasicDataAllSelect, getFrontInternationalizationList, getCurrentPublishInfo } from '@/api/dictionary/dictionary'
|
||||
import { resetReadingRestTime } from '@/api/trials/reading'
|
||||
// import 'element-ui/lib/theme-chalk/index.css'
|
||||
import './assets/css/theme-blue/index.css' // 浅绿色主题
|
||||
@@ -29,25 +28,22 @@ Vue.use(permission)
|
||||
|
||||
import Viewer from 'v-viewer'
|
||||
import './assets/css/viewer.css'
|
||||
|
||||
Vue.use(Viewer)
|
||||
Viewer.setDefaults({
|
||||
Options: {
|
||||
'inline': true,
|
||||
'button': true,
|
||||
'navbar': true,
|
||||
'title': true,
|
||||
'toolbar': true,
|
||||
'tooltip': true,
|
||||
'movable': true,
|
||||
'zoomable': true,
|
||||
'rotatable': true,
|
||||
'scalable': true,
|
||||
'transition': true,
|
||||
'keyboard': true,
|
||||
'url': 'data-source'
|
||||
// navbar: true, //底部缩略图
|
||||
toolbar: {
|
||||
zoomIn: true,
|
||||
zoomOut: true,
|
||||
reset: true,
|
||||
prev: true,
|
||||
next: true,
|
||||
rotateLeft: true,
|
||||
rotateRight: true,
|
||||
flipHorizontal: true,
|
||||
flipVertical: true,
|
||||
}
|
||||
})
|
||||
Vue.use(Viewer)
|
||||
|
||||
|
||||
import hasPermi from './directive/permission'
|
||||
Vue.use(hasPermi)
|
||||
@@ -60,6 +56,10 @@ import Preview from '@/components/Preview/index'
|
||||
Vue.use(Preview)
|
||||
import MFA from '@/components/MFA/index'
|
||||
Vue.use(MFA)
|
||||
import FB from '@/components/feedBack/index'
|
||||
Vue.use(FB)
|
||||
import FBT from '@/components/feedBackTable/index'
|
||||
Vue.use(FBT)
|
||||
import adaptive from '@/directive/adaptive/index'
|
||||
// 表格自适应指令
|
||||
Vue.use(adaptive)
|
||||
@@ -130,7 +130,8 @@ Vue.prototype.$validatePassword = (rule, value, callback) => {
|
||||
/* eslint-disable */
|
||||
var reg1 = eval(process.env.VUE_APP_PASSWORD_FOR_PERMISSION) ? new RegExp(`${process.env.VUE_APP_PASSWORD_FOR_REGULAR}`) : /.*/g; //密码必须是8位以上、必须含有字母、数字、特殊符号
|
||||
if (!reg1.test(value)) {
|
||||
callback(lang === 'zh' ? new Error("密码必须包含:1)8 – 32 个字符;2)至少1个数字;3) 至少1个大写字母;4)至少1个小写字母;5)至少1个特殊字符 (~!-@#$%^&*_+?)") : new Error('Passwords must have: 1) 8 - 32 characters; 2) At least 1 number; 3) At least 1 uppercase letter; 4) At least 1 lowercase letter; 5) At least 1 special character (~!-@#$%^&*_+?) '))
|
||||
callback(
|
||||
new Error(_vm.$t('env:regExp:formatPassword')))
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
@@ -144,6 +145,12 @@ Vue.config.productionTip = false
|
||||
Vue.prototype.$upload = () => {
|
||||
_vm.$forceUpdate()
|
||||
}
|
||||
Vue.prototype.$guid = () => {
|
||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
||||
var r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
|
||||
return v.toString(16);
|
||||
});
|
||||
}
|
||||
Vue.prototype.fileToBlob = (file) => {
|
||||
// 创建 FileReader 对象
|
||||
const reader = new FileReader()
|
||||
@@ -185,6 +192,9 @@ async function VueInit() {
|
||||
zhMessages[v.Code] = v.ValueCN
|
||||
enMessages[v.Code] = v.Value
|
||||
})
|
||||
// 获取版本信息
|
||||
let PublishInfo = await getCurrentPublishInfo();
|
||||
Vue.prototype.$version = PublishInfo.Result;
|
||||
// 获取检查部位
|
||||
Vue.prototype.$getBodyPart = (id) => {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
@@ -245,6 +255,19 @@ async function VueInit() {
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
Vue.prototype.$company = (isShort = true) => {
|
||||
let companyName = null
|
||||
if (localStorage.getItem('CompanyInfo')) {
|
||||
let CompanyInfo = JSON.parse(localStorage.getItem('CompanyInfo'))
|
||||
let isZh = zzSessionStorage.getItem('lang') === 'zh' || _vm.$i18n.locale == 'zh'
|
||||
if (isZh) {
|
||||
companyName = isShort ? CompanyInfo.CompanyShortNameCN : CompanyInfo.CompanyNameCN
|
||||
} else {
|
||||
companyName = isShort ? CompanyInfo.CompanyShortName : CompanyInfo.CompanyName
|
||||
}
|
||||
}
|
||||
return companyName;
|
||||
}
|
||||
Vue.prototype.$updateDictionary = function () {
|
||||
Vue.prototype.$d = function (code) {
|
||||
var dictInfo = res.Result
|
||||
@@ -289,7 +312,8 @@ async function VueInit() {
|
||||
data: {
|
||||
unlock: {
|
||||
my_username: null,
|
||||
my_password: null
|
||||
my_password: null,
|
||||
view: false
|
||||
}
|
||||
},
|
||||
render: h => h(App)
|
||||
@@ -300,13 +324,13 @@ async function VueInit() {
|
||||
if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) {
|
||||
setInterval(() => {
|
||||
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
|
||||
if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
|
||||
if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchDetail_m' || _vm.$route.path === '/researchLogin_m' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
|
||||
return
|
||||
}
|
||||
if (_vm.$store.state.user.userId !== zzSessionStorage.getItem('userId')) {
|
||||
window.location.href = `/login`
|
||||
zzSessionStorage.removeItem('lastWorkbench')
|
||||
_vm.$alert(lang === 'en' ? 'The same browser only allows one user account to be logged in at a time.' : '同一浏览器只允许同时登陆一个账户', {
|
||||
_vm.$alert(_vm.$t("env:sso:tip"), {
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
@@ -357,23 +381,35 @@ async function VueInit() {
|
||||
}
|
||||
const h = _vm.$createElement
|
||||
/* eslint-disable */
|
||||
window.VUE_APP_COMPANY_NAME = process.env.VUE_APP_COMPANY_NAME;
|
||||
// eval(process.env.VUE_APP_LOGOUT_FOR_PERMISSION)
|
||||
// process.env.VUE_APP_LOGOUT_FOR_TIME
|
||||
// eval(process.env.VUE_APP_LOCK_FOR_PERMISSION)
|
||||
// process.env.VUE_APP_LOCK_FOR_TIME
|
||||
// window.VUE_APP_COMPANY_NAME = process.env.VUE_APP_COMPANY_NAME;
|
||||
waitOperate(eval(process.env.VUE_APP_LOGOUT_FOR_PERMISSION) ? () => {
|
||||
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
|
||||
if (_vm.$store.state.trials.unlock || _vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
|
||||
if (_vm.$store.state.trials.unlock || _vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchDetail_m' || _vm.$route.path === '/researchLogin_m' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
|
||||
count = 0;
|
||||
localStorage.setItem('count', '0')
|
||||
return
|
||||
}
|
||||
_vm.$store.dispatch('user/logout').then(res => {
|
||||
// window.location.href = `/login`
|
||||
_vm.$msgbox.close();
|
||||
if (_vm.$msgbox) {
|
||||
_vm.$msgbox.close();
|
||||
}
|
||||
_vm.$FB.close();
|
||||
_vm.$FBT.close();
|
||||
_vm.$MFA.close();
|
||||
isOpen = false
|
||||
isLock = null
|
||||
zzSessionStorage.removeItem('isLock')
|
||||
router.push("/login")
|
||||
}).then(() => {
|
||||
_vm.$alert(lang === 'zh' ? '由于您长时间未操作,为保护您的数据安全已强制将您下线,如果需要继续操作请重新登陆!' : 'No operation for a long time non-operation, you have been forced logout to protect data security. If continue to operate, please login again!', {
|
||||
// _vm.$alert(lang === 'zh' ? '由于您长时间未操作,为保护您的数据安全已强制将您下线,如果需要继续操作请重新登陆!' : 'No operation for a long time non-operation, you have been forced logout to protect data security. If continue to operate, please login again!', {
|
||||
// type: 'warning',
|
||||
// })
|
||||
_vm.$alert(_vm.$t("env:loginOut"), {
|
||||
type: 'warning',
|
||||
})
|
||||
})
|
||||
@@ -381,7 +417,7 @@ async function VueInit() {
|
||||
} : () => { }, process.env.VUE_APP_LOGOUT_FOR_TIME,
|
||||
eval(process.env.VUE_APP_LOCK_FOR_PERMISSION) ? () => {
|
||||
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
|
||||
if (_vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
|
||||
if (_vm.$store.state.trials.unlock || _vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchDetail_m' || _vm.$route.path === '/researchLogin_m' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
|
||||
count = 0;
|
||||
localStorage.setItem('count', '0')
|
||||
if (_vm.$route.path === '/login') {
|
||||
@@ -397,17 +433,17 @@ async function VueInit() {
|
||||
isOpen = true
|
||||
zzSessionStorage.setItem('isLock', 'true')
|
||||
_vm.$msgbox({
|
||||
title: lang === 'zh' ? '已锁定' : 'Locked',
|
||||
confirmButtonText: lang === 'zh' ? '解锁' : 'Unlock',
|
||||
title: _vm.$t("env:lock:msgBox:title"),
|
||||
confirmButtonText: _vm.$t("env:lock:msgBox:confirmButtonText"),
|
||||
showClose: false,
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === 'confirm') {
|
||||
if (!_vm.unlock.my_username) {
|
||||
_vm.$alert(lang === 'zh' ? '请输入您的用户名解锁' : 'Please enter your user name to unlock.')
|
||||
_vm.$alert(_vm.$t("env:lock:msgBox:iupUser"))
|
||||
return
|
||||
}
|
||||
if (!_vm.unlock.my_password) {
|
||||
_vm.$alert(lang === 'zh' ? '请输入您的密码解锁' : 'Please enter the correct password to unlock.')
|
||||
_vm.$alert(_vm.$t("env:lock:msgBox:inpPassword"))
|
||||
return
|
||||
}
|
||||
var my_username = zzSessionStorage.getItem('my_username')
|
||||
@@ -418,10 +454,11 @@ async function VueInit() {
|
||||
resetReadingRestTime().then(() => {
|
||||
})
|
||||
const closeLock = (_vm) => {
|
||||
_vm.$message.success(lang === 'zh' ? '解锁成功,请继续操作' : 'Unlocked successfully. Please continue operation.')
|
||||
_vm.$message.success(_vm.$t("env:lock:msgBox:lockSuccess"))
|
||||
_vm.unlock = {
|
||||
my_username: null,
|
||||
my_password: null
|
||||
my_password: null,
|
||||
view: false
|
||||
}
|
||||
isOpen = false
|
||||
count = 0;
|
||||
@@ -434,26 +471,26 @@ async function VueInit() {
|
||||
done()
|
||||
}, 500)
|
||||
}
|
||||
if (eval(process.env.VUE_APP_LOCK_FOR_PERMISSION_MFA)) {
|
||||
sendMFAEmail({ UserId: my_userid, MfaType: 1 }).then((res) => {
|
||||
done();
|
||||
Vue.prototype.$MFA({
|
||||
status: "lock",
|
||||
UserId: my_userid,
|
||||
EMail: my_EMail,
|
||||
username: my_username,
|
||||
callBack: () => {
|
||||
closeLock(_vm)
|
||||
},
|
||||
})
|
||||
})
|
||||
} else {
|
||||
closeLock(_vm)
|
||||
}
|
||||
// if (eval(process.env.VUE_APP_LOCK_FOR_PERMISSION_MFA)) {
|
||||
// sendMFAEmail({ UserId: my_userid, MfaType: 1 }).then((res) => {
|
||||
// done();
|
||||
// Vue.prototype.$MFA({
|
||||
// status: "lock",
|
||||
// UserId: my_userid,
|
||||
// EMail: res.Result,
|
||||
// username: my_username,
|
||||
// callBack: () => {
|
||||
// closeLock(_vm)
|
||||
// },
|
||||
// })
|
||||
// })
|
||||
// } else {
|
||||
closeLock(_vm)
|
||||
// }
|
||||
|
||||
} else {
|
||||
// console.log(111)
|
||||
_vm.$message.error(lang === 'zh' ? '请输入正确用户名密码' : 'Please enter the correct password.')
|
||||
_vm.$message.error(_vm.$t('env:lock:msgBox:userFail'))
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -462,7 +499,7 @@ async function VueInit() {
|
||||
props: { labelWidth: "80px" }
|
||||
}, [
|
||||
h('el-form-item', {
|
||||
props: { label: lang === 'zh' ? '用户名' : 'Username' },
|
||||
props: { label: _vm.$t("env:lock:msgBox:form:username") },
|
||||
}, [
|
||||
h('input', {
|
||||
props: {
|
||||
@@ -484,17 +521,22 @@ async function VueInit() {
|
||||
})
|
||||
]),
|
||||
h('el-form-item', {
|
||||
props: { label: lang === 'zh' ? '密码' : 'Password' },
|
||||
props: { label: _vm.$t("env:lock:msgBox:form:Password") },
|
||||
attrs: {
|
||||
style: "position: relative;"
|
||||
}
|
||||
}, [
|
||||
h('input', {
|
||||
props: {
|
||||
value: _vm.unlock.my_password
|
||||
},
|
||||
ref: "unlock_my_password_input",
|
||||
attrs: {
|
||||
id: 'my_password',
|
||||
class: 'el-input__inner',
|
||||
type: 'password',
|
||||
autocomplete: 'new-password'
|
||||
type: _vm.unlock.view ? 'text' : 'password',
|
||||
autocomplete: 'new-password',
|
||||
style: "padding-right:25px"
|
||||
},
|
||||
on: {
|
||||
change: (event) => {
|
||||
@@ -504,7 +546,24 @@ async function VueInit() {
|
||||
_vm.unlock.my_password = event.target.value
|
||||
}
|
||||
}
|
||||
})
|
||||
}),
|
||||
h('i', {
|
||||
attrs: {
|
||||
id: 'my_password_view',
|
||||
class: "el-icon-view",
|
||||
style: "cursor: pointer;position: absolute;top:35%;right:10px"
|
||||
},
|
||||
on: {
|
||||
click: (event) => {
|
||||
_vm.unlock.view = !_vm.unlock.view
|
||||
if (_vm.unlock.view) {
|
||||
_vm.$refs['unlock_my_password_input'].type = "text"
|
||||
} else {
|
||||
_vm.$refs['unlock_my_password_input'].type = "password"
|
||||
}
|
||||
},
|
||||
}
|
||||
}),
|
||||
])
|
||||
])
|
||||
])
|
||||
@@ -512,5 +571,21 @@ async function VueInit() {
|
||||
} : () => { }, process.env.VUE_APP_LOCK_FOR_TIME)
|
||||
}
|
||||
VueInit()
|
||||
// createVersionPolling({
|
||||
// appETagKey: "__APP_ETAG__",
|
||||
// pollingInterval: 5 * 60 * 1000, // 单位为毫秒
|
||||
// silent: process.env.NODE_ENV === false, // 开发环境下不检测
|
||||
// onUpdate: (self) => {
|
||||
// // 当检测到有新版本时,执行的回调函数,可以在这里提示用户刷新页面
|
||||
// const result = confirm(_vm.$t("versionPolling:tip"));
|
||||
// if (result) {
|
||||
// self.onRefresh();
|
||||
// } else {
|
||||
// self.onCancel();
|
||||
// }
|
||||
// // 强制更新可以用alert
|
||||
// // alert('有新版本,请刷新页面');
|
||||
// },
|
||||
// });
|
||||
|
||||
|
||||
|
||||
+23
-9
@@ -6,12 +6,13 @@ import 'nprogress/nprogress.css'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import Vue from 'vue'
|
||||
import { OSSclient } from './utils/oss'
|
||||
import WHITELIST from "./utils/whiteList"
|
||||
// import getPageTitle from '@/utils/get-page-title'
|
||||
|
||||
NProgress.configure({ showSpinner: false })
|
||||
|
||||
const whiteList = ['/ReviewersResearch', '/login', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms']
|
||||
|
||||
const whiteList = WHITELIST
|
||||
store.state.trials.whiteList = whiteList;
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
NProgress.start()
|
||||
// 设置页面标题
|
||||
@@ -25,15 +26,15 @@ router.beforeEach(async (to, from, next) => {
|
||||
if (to.path === '/login' || to.path === '/recompose' || to.path === '/email-recompose' || to.path === '/error' || to.path === '/ReviewersResearchForm' || to.path === '/ReviewersResearch') {
|
||||
if (to.path === '/ReviewersResearch') {
|
||||
await this.$store.dispatch('user/logout')
|
||||
OSSclient()
|
||||
await OSSclient()
|
||||
}
|
||||
if (to.path === '/ReviewersResearchForm') {
|
||||
OSSclient()
|
||||
await OSSclient()
|
||||
}
|
||||
next()
|
||||
NProgress.done()
|
||||
} else {
|
||||
OSSclient()
|
||||
await OSSclient()
|
||||
const hasGetUserInfo = store.getters.userId
|
||||
if (hasGetUserInfo) {
|
||||
next()
|
||||
@@ -55,15 +56,28 @@ router.beforeEach(async (to, from, next) => {
|
||||
} else {
|
||||
/* has no token*/
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
// 在免登录whiteList中,直接进入
|
||||
if (to.path === '/readingDicoms' || to.path === '/noneDicomReading') {
|
||||
OSSclient()
|
||||
if (to.path === '/researchLogin') {
|
||||
console.log(to)
|
||||
const flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
|
||||
if (flag) {
|
||||
next(`/researchLogin_m?trialId=${to.query.trialId}&lang=${to.query.lang}`)
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
} else {
|
||||
// 在免登录whiteList中,直接进入
|
||||
if (to.path === '/readingDicoms' || to.path === '/noneDicomReading') {
|
||||
await OSSclient()
|
||||
}
|
||||
next()
|
||||
}
|
||||
next()
|
||||
} else {
|
||||
if (to.path === '/researchForm') {
|
||||
next(`/researchLogin?`)
|
||||
NProgress.done()
|
||||
} else if (to.path === '/researchDetail_m') {
|
||||
next(`/researchLogin_m?`)
|
||||
NProgress.done()
|
||||
} else if (to.path === '/ReviewersResearchForm') {
|
||||
next(`/ReviewersResearch?`)
|
||||
NProgress.done()
|
||||
|
||||
@@ -201,6 +201,18 @@ export const constantRoutes = [
|
||||
component: () => import('@/views/research/form'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/researchLogin_m',
|
||||
name: 'researchLogin_m',
|
||||
component: () => import('@/views/research-mobile/login'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/researchDetail_m',
|
||||
name: 'researchDetail_m',
|
||||
component: () => import('@/views/research-mobile/detail'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/trialsResume',
|
||||
component: () => import('@/views/trials/trials-panel/enrolled-reviewers/resume/index'),
|
||||
|
||||
@@ -41,6 +41,7 @@ const getters = {
|
||||
lastCanvasTaskId: state => state.reading.lastCanvasTaskId,
|
||||
imageQuality: state => state.reading.imageQuality,
|
||||
imageQualityIssues: state => state.reading.imageQualityIssues,
|
||||
currentLoadIns: state => state.reading.currentLoadIns,
|
||||
language: state => state.lang.language,
|
||||
TotalNeedSignSystemDocCount: state => state.user.TotalNeedSignSystemDocCount,
|
||||
TotalNeedSignTrialDocCount: state => state.user.TotalNeedSignTrialDocCount,
|
||||
|
||||
+200
-29
@@ -30,30 +30,55 @@ const getDefaultState = () => {
|
||||
activeSeries: {},
|
||||
lastCanvasTaskId: '',
|
||||
imageQuality: null,
|
||||
imageQualityIssues: null
|
||||
imageQualityIssues: null,
|
||||
currentLoadIns: []
|
||||
}
|
||||
}
|
||||
function getQuestions(questions) {
|
||||
const criterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||
questions.forEach(item => {
|
||||
if (item.Type === 'table' && item.TableQuestions && item.TableQuestions.Answers.length > 0) {
|
||||
if ((item.Type === 'table' || item.Type === 'basicTable') && item.TableQuestions && item.TableQuestions.Answers.length > 0) {
|
||||
item.TableQuestions.Answers.forEach(answerObj => {
|
||||
answerObj.lesionPart = getQuestionAnswer(item.TableQuestions.Questions, 8, answerObj)
|
||||
answerObj.loctation = getQuestionAnswer(item.TableQuestions.Questions, 6, answerObj)
|
||||
answerObj.lesionLength = getQuestionAnswer(item.TableQuestions.Questions, 0, answerObj)
|
||||
answerObj.lesionShort = getQuestionAnswer(item.TableQuestions.Questions, 1, answerObj)
|
||||
answerObj.isDicomReading = answerObj.IsDicomReading === 'True'
|
||||
var isLymphLesion = getQuestionAnswer(item.TableQuestions.Questions, 2, answerObj)
|
||||
isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null
|
||||
answerObj.isLymphLesion = isLymphLesion
|
||||
answerObj.lesionState = getQuestionAnswer(item.TableQuestions.Questions, 7, answerObj)
|
||||
var lesionNum = getQuestionAnswer(item.TableQuestions.Questions, 11, answerObj)
|
||||
answerObj.lesionNum = lesionNum
|
||||
|
||||
if (answerObj.RowId) {
|
||||
var idx = item.TableQuestions.Questions.findIndex(i => i.QuestionMark === 11)
|
||||
if (idx > -1) {
|
||||
if (criterionType === 10) {
|
||||
// pcwg
|
||||
var lesionNum = getQuestionAnswer(item.TableQuestions.Questions, 11, answerObj)
|
||||
answerObj.lesionNum = lesionNum
|
||||
answerObj.saveTypeEnum = isNaN(parseInt(answerObj.lesionNum)) ? 1 : 2
|
||||
} else if (criterionType === 19) {
|
||||
// ivus
|
||||
answerObj.area1 = getQuestionAnswer(item.TableQuestions.Questions, 1001, answerObj)
|
||||
answerObj.area2 = getQuestionAnswer(item.TableQuestions.Questions, 1002, answerObj)
|
||||
const v = getQuestionAnswer(item.TableQuestions.Questions, 1003, answerObj)
|
||||
answerObj.diff = v
|
||||
answerObj.saveTypeEnum = isNaN(parseFloat(v)) ? 1 : 2
|
||||
} else if (criterionType === 20) {
|
||||
// oct
|
||||
if (item.LesionType === 101) {
|
||||
answerObj.l1 = getQuestionAnswer(item.TableQuestions.Questions, 1011, answerObj)
|
||||
answerObj.l2 = getQuestionAnswer(item.TableQuestions.Questions, 1012, answerObj)
|
||||
answerObj.l3 = getQuestionAnswer(item.TableQuestions.Questions, 1013, answerObj)
|
||||
const min = getQuestionAnswer(item.TableQuestions.Questions, 1014, answerObj)
|
||||
answerObj.min = min
|
||||
const mean = getQuestionAnswer(item.TableQuestions.Questions, 1015, answerObj)
|
||||
answerObj.mean = mean
|
||||
answerObj.saveTypeEnum = (isNaN(parseFloat(min)) || isNaN(parseFloat(mean))) ? 1 : 2
|
||||
} else if (item.LesionType === 103) {
|
||||
const angle = getQuestionAnswer(item.TableQuestions.Questions, 1016, answerObj)
|
||||
answerObj.angle = angle
|
||||
answerObj.saveTypeEnum = isNaN(parseFloat(angle)) ? 1 : 2
|
||||
}
|
||||
} else {
|
||||
answerObj.lesionPart = getQuestionAnswer(item.TableQuestions.Questions, 8, answerObj)
|
||||
answerObj.loctation = getQuestionAnswer(item.TableQuestions.Questions, 6, answerObj)
|
||||
answerObj.lesionLength = getQuestionAnswer(item.TableQuestions.Questions, 0, answerObj)
|
||||
answerObj.lesionShort = getQuestionAnswer(item.TableQuestions.Questions, 1, answerObj)
|
||||
let isLymphLesion = getQuestionAnswer(item.TableQuestions.Questions, 2, answerObj)
|
||||
isLymphLesion = isLymphLesion ? parseInt(isLymphLesion) : null
|
||||
answerObj.isLymphLesion = isLymphLesion
|
||||
answerObj.lesionState = getQuestionAnswer(item.TableQuestions.Questions, 7, answerObj)
|
||||
answerObj.saveTypeEnum = isNaN(parseInt(answerObj.lesionState)) ? 1 : 2
|
||||
}
|
||||
} else {
|
||||
@@ -69,7 +94,7 @@ function getQuestions(questions) {
|
||||
}
|
||||
function findQuestionAndRemoveLesion(questions, obj) {
|
||||
for (var i = 0; i < questions.length; i++) {
|
||||
if (questions[i].Type === 'table' && questions[i].TableQuestions && (questions[i].LesionType === obj.lesionType) && questions[i].TableQuestions.Answers.length > 0) {
|
||||
if ((questions[i].Type === 'table' || questions[i].Type === 'basicTable') && questions[i].TableQuestions && (questions[i].LesionType === obj.lesionType) && questions[i].TableQuestions.Answers.length > 0) {
|
||||
var idx = questions[i].TableQuestions.Answers.findIndex(i => String(i.RowIndex) === String(obj.rowIndex))
|
||||
if (idx > -1) {
|
||||
questions[i].TableQuestions.Answers.splice(idx, 1)
|
||||
@@ -85,7 +110,7 @@ function findQuestionAndRemoveLesion(questions, obj) {
|
||||
function findQuestionAndUpdateLesion(questions, obj) {
|
||||
for (var i = 0; i < questions.length; i++) {
|
||||
var item = questions[i]
|
||||
if (item.Type === 'table' && item.Id === obj.questionId) {
|
||||
if ((item.Type === 'table' || item.Type === 'basicTable') && item.Id === obj.questionId) {
|
||||
var idx = item.TableQuestions.Answers.findIndex(i => i.RowIndex === obj.rowIndex)
|
||||
item.TableQuestions.Answers[idx].isLymphLesion = obj.isLymphLesion
|
||||
item.TableQuestions.Answers[idx].loctation = obj.lesionOrgan
|
||||
@@ -114,10 +139,10 @@ function findQuestionAndUpdateLesion(questions, obj) {
|
||||
}
|
||||
function findQuestionAndAddLesion(questions, obj) {
|
||||
for (var i = 0; i < questions.length; i++) {
|
||||
if (questions[i].Type === 'table' && questions[i].TableQuestions && (questions[i].LesionType === obj.lesionType)) {
|
||||
if ((questions[i].Type === 'table' || questions[i].Type === 'basicTable') && questions[i].TableQuestions && (questions[i].LesionType === obj.lesionType)) {
|
||||
var sourceObj = {}
|
||||
questions[i].TableQuestions.Questions.forEach(item => {
|
||||
sourceObj[item.Id] = ''
|
||||
sourceObj[item.Id] = null
|
||||
})
|
||||
var targetObj = Object.assign(sourceObj, obj.lesionObj)
|
||||
targetObj.IsCurrentTaskAdd = 'True'
|
||||
@@ -139,6 +164,22 @@ function getQuestionAnswer(questions, questionMark, answers) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
// function getKeySeriesInfo(keyInstance, series) {
|
||||
// const obj = {}
|
||||
// const set = new Set()
|
||||
// var instances = series.instanceList.concat(keyInstance).filter((item) => {
|
||||
// if (set.has(item)) {
|
||||
// return true
|
||||
// } else {
|
||||
// set.add(item)
|
||||
// return false
|
||||
// }
|
||||
// })
|
||||
// instances.map(item => {
|
||||
// obj[item] = { seriesId: series.seriesId, studyIndex: series.studyIndex, seriesIndex: series.seriesIndex }
|
||||
// })
|
||||
// return obj
|
||||
// }
|
||||
|
||||
const state = getDefaultState
|
||||
|
||||
@@ -759,7 +800,17 @@ const actions = {
|
||||
resolve()
|
||||
} else {
|
||||
var studyList = []
|
||||
var keyImages = []
|
||||
getReadingVisitStudyList(obj.trialId, obj.subjectVisitId, obj.visitTaskId).then(res => {
|
||||
const i = res.Result.findIndex(i => i.IsCriticalSequence)
|
||||
if (i > -1) {
|
||||
const seriesList = res.Result[i].SeriesList && res.Result[i].SeriesList
|
||||
seriesList.map(i => {
|
||||
i.InstanceInfoList.map(k => {
|
||||
keyImages.push({ instanceId: k.Id })
|
||||
})
|
||||
})
|
||||
}
|
||||
res.Result.forEach((study, studyIndex) => {
|
||||
const data = {}
|
||||
data.StudyId = study.StudyId
|
||||
@@ -784,17 +835,30 @@ const actions = {
|
||||
// }
|
||||
series.InstanceInfoList.forEach(instance => {
|
||||
if (instance.NumberOfFrames && instance.NumberOfFrames > 1) {
|
||||
for (let i = 0; i < instance.NumberOfFrames; i++) {
|
||||
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${instance.Path}?frame=${i}&instanceId=${instance.Id}&visitTaskId=${obj.visitTaskId}&idx=${studyIndex}|${seriesIndex}`
|
||||
imageIds.push(imageId)
|
||||
if (study.IsCriticalSequence && instance.KeyFramesList.length > 0) {
|
||||
instance.KeyFramesList.map(i => {
|
||||
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${instance.Path}?frame=${i}&instanceId=${instance.Id}&visitTaskId=${obj.visitTaskId}&idx=${studyIndex}|${seriesIndex}|${index}`
|
||||
imageIds.push(imageId)
|
||||
})
|
||||
} else {
|
||||
for (let i = 0; i < instance.NumberOfFrames; i++) {
|
||||
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${instance.Path}?frame=${i}&instanceId=${instance.Id}&visitTaskId=${obj.visitTaskId}&idx=${studyIndex}|${seriesIndex}|${index}`
|
||||
imageIds.push(imageId)
|
||||
}
|
||||
}
|
||||
instance.ImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${instance.Path}?frame=${0}&instanceId=${instance.Id}&visitTaskId=${obj.visitTaskId}&idx=${studyIndex}|${seriesIndex}`
|
||||
instance.ImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${instance.Path}?frame=${0}&instanceId=${instance.Id}&visitTaskId=${obj.visitTaskId}&idx=${studyIndex}|${seriesIndex}|${index}`
|
||||
} else {
|
||||
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&visitTaskId=${obj.visitTaskId}&idx=${studyIndex}|${seriesIndex}`
|
||||
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? Vue.prototype.OSSclientConfig.basePath : Vue.prototype.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&visitTaskId=${obj.visitTaskId}&idx=${studyIndex}|${seriesIndex}|${index}`
|
||||
imageIds.push(imageId)
|
||||
instance.ImageId = imageId
|
||||
}
|
||||
|
||||
if (!study.IsCriticalSequence && series.IsBeMark) {
|
||||
const i = keyImages.findIndex(i => i.instanceId === instance.Id)
|
||||
if (i > -1) {
|
||||
keyImages[i].studyIndex = studyIndex
|
||||
keyImages[i].seriesIndex = seriesIndex
|
||||
}
|
||||
}
|
||||
instanceList.push(instance.Id)
|
||||
})
|
||||
seriesList.push({
|
||||
@@ -837,6 +901,7 @@ const actions = {
|
||||
})
|
||||
state.visitTaskList[index].StudyList = studyList
|
||||
state.visitTaskList[index].studyListInit = true
|
||||
state.visitTaskList[index].KeyImages = keyImages
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
resolve()
|
||||
}).catch(() => { resolve() })
|
||||
@@ -895,11 +960,114 @@ const actions = {
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
setImageLoadedProgress({ state }, obj) {
|
||||
const studyIndex = parseInt(obj.idx.split('|')[0])
|
||||
const seriesIndex = parseInt(obj.idx.split('|')[1])
|
||||
const visitTaskIndex = parseInt(obj.idx.split('|')[2])
|
||||
let pStudyIndex = null
|
||||
let pSeriesIndex = null
|
||||
let pSeries = null
|
||||
try {
|
||||
const study = state.visitTaskList[visitTaskIndex].StudyList[studyIndex]
|
||||
const series = state.visitTaskList[visitTaskIndex].StudyList[studyIndex].SeriesList[seriesIndex]
|
||||
const keyImages = state.visitTaskList[visitTaskIndex].KeyImages
|
||||
if (study.IsCriticalSequence) {
|
||||
const i = keyImages.findIndex(i => i.instanceId === obj.instanceId)
|
||||
if (i > -1) {
|
||||
pStudyIndex = keyImages[i].studyIndex
|
||||
pSeriesIndex = keyImages[i].seriesIndex
|
||||
}
|
||||
} else if (series.isBeMark) {
|
||||
if (keyImages.length > 0) {
|
||||
pStudyIndex = 0
|
||||
pSeriesIndex = 0
|
||||
}
|
||||
}
|
||||
if (pStudyIndex !== null && pSeriesIndex !== null) {
|
||||
pSeries = state.visitTaskList[visitTaskIndex].StudyList[pStudyIndex].SeriesList[pSeriesIndex]
|
||||
}
|
||||
|
||||
var prefetchInstanceCount = series.prefetchInstanceCount
|
||||
var instanceCount = series.instanceCount
|
||||
var prefetchInstanceCount2 = pSeries ? pSeries.prefetchInstanceCount : null
|
||||
var instanceCount2 = pSeries ? pSeries.instanceCount : null
|
||||
if (series.imageloadedArr.indexOf(obj.instanceId) < 0) {
|
||||
const i = state.currentLoadIns.findIndex(i => i.instanceId === obj.instanceId)
|
||||
if (i > -1) {
|
||||
prefetchInstanceCount = prefetchInstanceCount + obj.percentComplete - state.currentLoadIns[i].percentComplete
|
||||
prefetchInstanceCount2 = prefetchInstanceCount2 !== null ? prefetchInstanceCount2 + obj.percentComplete - state.currentLoadIns[i].percentComplete : null
|
||||
state.currentLoadIns[i].percentComplete = obj.percentComplete
|
||||
if (obj.percentComplete >= 100) {
|
||||
state.currentLoadIns.splice(i, 1)
|
||||
}
|
||||
} else {
|
||||
if (obj.percentComplete !== 100) {
|
||||
state.currentLoadIns.push({ instanceId: obj.instanceId, percentComplete: obj.percentComplete })
|
||||
}
|
||||
prefetchInstanceCount = prefetchInstanceCount + obj.percentComplete
|
||||
prefetchInstanceCount2 = prefetchInstanceCount2 !== null ? prefetchInstanceCount2 + obj.percentComplete : null
|
||||
}
|
||||
series.prefetchInstanceCount = prefetchInstanceCount
|
||||
if (pSeries) {
|
||||
pSeries.prefetchInstanceCount = prefetchInstanceCount2
|
||||
}
|
||||
if (obj.percentComplete >= 100) {
|
||||
series.imageloadedArr.push(obj.instanceId)
|
||||
if (pSeries) {
|
||||
pSeries.imageloadedArr.push(obj.instanceId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (prefetchInstanceCount >= instanceCount * 100) {
|
||||
series.prefetchInstanceCount = instanceCount * 100
|
||||
// 设置当前序列状态为已下载完成
|
||||
series.loadStatus = true
|
||||
}
|
||||
if (prefetchInstanceCount2 !== null && instanceCount2 !== null && prefetchInstanceCount2 >= instanceCount2 * 100) {
|
||||
pSeries.prefetchInstanceCount = instanceCount2 * 100
|
||||
// 设置当前序列状态为已下载完成
|
||||
pSeries.loadStatus = true
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('error')
|
||||
}
|
||||
},
|
||||
setImageloadedInfo({ state }, obj) {
|
||||
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
|
||||
const prefetchInstanceCount = state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount
|
||||
state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount = prefetchInstanceCount + 100
|
||||
state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].imageloadedArr.push(obj.imageId)
|
||||
console.log('setImageloadedInfo', obj)
|
||||
// if(obj.instance === '20dd8fc9-51b0-ec63-942b-cb3006c72650')
|
||||
// var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
|
||||
// // const prefetchInstanceCount = state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount
|
||||
// const instanceList = state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].instanceList
|
||||
// const idx = state.visitTaskList[index].StudyList.findIndex(i => i.IsCriticalSequence)
|
||||
|
||||
// if (!state.visitTaskList[index].StudyList[obj.studyIndex].IsCriticalSequence) {
|
||||
// // 当前下载的非关键序列
|
||||
// console.log('当前下载的非关键序列')
|
||||
// if (idx > -1) {
|
||||
// const keyInstance = state.visitTaskList[index].StudyList[idx].SeriesList[0].instanceList
|
||||
// obj.markedImages = getKeySeriesInfo(keyInstance, state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex])
|
||||
// instanceList.map(i => {
|
||||
// if (obj.markedImages.hasOwnProperty(i) && state.visitTaskList[index].StudyList[idx].SeriesList[0].imageloadedArr.indexOf(i) < 0) {
|
||||
// state.visitTaskList[index].StudyList[idx].SeriesList[0].imageloadedArr.push(i)
|
||||
// state.visitTaskList[index].StudyList[idx].SeriesList[0].prefetchInstanceCount = state.visitTaskList[index].StudyList[idx].SeriesList[0].prefetchInstanceCount + 100
|
||||
// }
|
||||
// })
|
||||
// if (state.visitTaskList[index].StudyList[idx].SeriesList[0].imageloadedArr >= state.visitTaskList[index].StudyList[idx].SeriesList[0].instanceCount) {
|
||||
// state.visitTaskList[index].StudyList[idx].SeriesList[0].loadStatus = true
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount = state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].instanceCount * 100
|
||||
// state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].imageloadedArr = instanceList
|
||||
// state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].loadStatus = true
|
||||
// const imageloadedArr = state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].imageloadedArr
|
||||
// if (imageloadedArr.indexOf())
|
||||
|
||||
// if (state.visitTaskList[index].StudyList[0].IsCriticalSequence){
|
||||
// state.visitTaskList[index].StudyList[0].SeriesList[0].prefetchInstanceCount = prefetchInstanceCount + 100
|
||||
// state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].imageloadedArr.push(obj.imageId)
|
||||
// }
|
||||
},
|
||||
setStatus({ state }, obj) {
|
||||
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
|
||||
@@ -916,7 +1084,10 @@ const actions = {
|
||||
return new Promise(resolve => {
|
||||
var isReadingTaskViewInOrder = localStorage.getItem('isReadingTaskViewInOrder')
|
||||
if (parseInt(isReadingTaskViewInOrder) === 2) {
|
||||
if (!state.lastCanvasTaskId) state.lastCanvasTaskId = taskId
|
||||
if (!state.lastCanvasTaskId) {
|
||||
console.log('setLastCanvasTaskId')
|
||||
state.lastCanvasTaskId = taskId
|
||||
}
|
||||
} else {
|
||||
state.lastCanvasTaskId = taskId
|
||||
}
|
||||
|
||||
@@ -9,6 +9,10 @@ const getDefaultState = () => {
|
||||
studyListQuery: null,
|
||||
unlock: false,
|
||||
config: {},
|
||||
uploadTip: '0.00KB/s',
|
||||
timer: null,
|
||||
whiteList: [],
|
||||
checkTaskId: null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ const actions = {
|
||||
zzSessionStorage.setItem('my_username', username.trim())
|
||||
zzSessionStorage.setItem('my_password', md5(password))
|
||||
zzSessionStorage.setItem('my_EMail', response.Result.BasicInfo.EMail)
|
||||
localStorage.setItem('CompanyInfo', JSON.stringify(response.Result.CompanyInfo))
|
||||
const data = response.Result
|
||||
if (data.BasicInfo.IsFirstAdd || data.BasicInfo.LoginState === 1) {
|
||||
try {
|
||||
|
||||
+167
-95
@@ -9,7 +9,7 @@ body {
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-rendering: optimizeLegibility;
|
||||
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
|
||||
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
|
||||
// font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
// font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
|
||||
// "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
|
||||
@@ -52,6 +52,7 @@ a:hover {
|
||||
div:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
body .el-table th.gutter {
|
||||
display: table-cell !important;
|
||||
}
|
||||
@@ -66,6 +67,7 @@ body .el-table th.gutter {
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.el-loading-mask {
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
@@ -80,6 +82,7 @@ body .el-table th.gutter {
|
||||
.table-container {
|
||||
height: calc(100% - 100px);
|
||||
}
|
||||
|
||||
// .pagination-container{
|
||||
// text-align: right;
|
||||
// }
|
||||
@@ -92,10 +95,12 @@ body .el-table th.gutter {
|
||||
border-left: 3px solid #0fc8e0;
|
||||
font-size: 13px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.add {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
@@ -104,9 +109,11 @@ body .el-table th.gutter {
|
||||
margin-top: -15px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-dialog__body {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.el-date-editor.el-input,
|
||||
.el-date-editor.el-input__inner,
|
||||
.el-select {
|
||||
@@ -114,167 +121,232 @@ body .el-table th.gutter {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.data-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
|
||||
.toolbar {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.data-table {
|
||||
flex: 1;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
height: 32px;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.is-fullscreen{
|
||||
.el-dialog__headerbtn{
|
||||
top:10px;
|
||||
.is-fullscreen {
|
||||
.el-dialog__headerbtn {
|
||||
top: 10px;
|
||||
font-size: 30px;
|
||||
}
|
||||
.el-dialog__body{
|
||||
|
||||
.el-dialog__body {
|
||||
height: calc(100% - 70px);
|
||||
padding: 0 20px;
|
||||
.base-modal-body{
|
||||
|
||||
.base-modal-body {
|
||||
padding: 10px 20px;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
.el-dialog__footer{
|
||||
|
||||
.el-dialog__footer {
|
||||
padding: 10px;
|
||||
}
|
||||
.link-breadcrumb{
|
||||
|
||||
.link-breadcrumb {
|
||||
cursor: pointer;
|
||||
color: #428bca;
|
||||
}
|
||||
}
|
||||
|
||||
.base-dialog-wrapper{
|
||||
.el-dialog__header{
|
||||
.base-dialog-wrapper {
|
||||
.el-dialog__header {
|
||||
padding: 15px;
|
||||
}
|
||||
.base-dialog-body{
|
||||
|
||||
.base-dialog-body {
|
||||
border: 1px solid #e0e0e0;
|
||||
padding:10px;
|
||||
max-height:600px;
|
||||
padding: 10px;
|
||||
max-height: 600px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.base-dialog-footer{
|
||||
text-align:right;
|
||||
margin-top:10px;
|
||||
|
||||
.base-dialog-footer {
|
||||
text-align: right;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.el-dialog__body{
|
||||
padding:10px;
|
||||
|
||||
.el-dialog__body {
|
||||
padding: 10px;
|
||||
}
|
||||
.el-dialog__footer{
|
||||
padding: 10px;
|
||||
|
||||
.el-dialog__footer {
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
.el-descriptions{
|
||||
box-sizing:border-box;
|
||||
font-size:14px;
|
||||
color:#303133
|
||||
|
||||
.el-descriptions {
|
||||
box-sizing: border-box;
|
||||
font-size: 14px;
|
||||
color: #303133
|
||||
}
|
||||
.el-descriptions__header{
|
||||
display:flex;
|
||||
justify-content:space-between;
|
||||
align-items:center;
|
||||
margin-bottom:20px
|
||||
|
||||
.el-descriptions__header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px
|
||||
}
|
||||
.el-descriptions__title{
|
||||
font-size:16px;
|
||||
font-weight:700
|
||||
|
||||
.el-descriptions__title {
|
||||
font-size: 16px;
|
||||
font-weight: 700
|
||||
}
|
||||
.el-descriptions__body{
|
||||
color:#606266;
|
||||
background-color:#fff
|
||||
|
||||
.el-descriptions__body {
|
||||
color: #606266;
|
||||
background-color: #fff
|
||||
}
|
||||
.el-descriptions__body .el-descriptions__table{
|
||||
border-collapse:collapse;
|
||||
width:100%;
|
||||
table-layout:fixed
|
||||
|
||||
.el-descriptions__body .el-descriptions__table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
table-layout: fixed
|
||||
}
|
||||
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell{
|
||||
box-sizing:border-box;
|
||||
text-align:left;
|
||||
font-weight:400;
|
||||
line-height:1.5
|
||||
|
||||
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell {
|
||||
box-sizing: border-box;
|
||||
text-align: left;
|
||||
font-weight: 400;
|
||||
line-height: 1.5
|
||||
}
|
||||
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell.is-left{
|
||||
text-align:left
|
||||
|
||||
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell.is-left {
|
||||
text-align: left
|
||||
}
|
||||
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell.is-center{
|
||||
text-align:center
|
||||
|
||||
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell.is-center {
|
||||
text-align: center
|
||||
}
|
||||
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell.is-right{
|
||||
text-align:right
|
||||
|
||||
.el-descriptions__body .el-descriptions__table .el-descriptions-item__cell.is-right {
|
||||
text-align: right
|
||||
}
|
||||
.el-descriptions .is-bordered{
|
||||
table-layout:auto
|
||||
|
||||
.el-descriptions .is-bordered {
|
||||
table-layout: auto
|
||||
}
|
||||
.el-descriptions .is-bordered .el-descriptions-item__cell{
|
||||
border:1px solid #ebeef5;
|
||||
padding:12px 10px
|
||||
|
||||
.el-descriptions .is-bordered .el-descriptions-item__cell {
|
||||
border: 1px solid #ebeef5;
|
||||
padding: 12px 10px
|
||||
}
|
||||
.el-descriptions :not(.is-bordered) .el-descriptions-item__cell{
|
||||
padding-bottom:12px
|
||||
|
||||
.el-descriptions :not(.is-bordered) .el-descriptions-item__cell {
|
||||
padding-bottom: 12px
|
||||
}
|
||||
.el-descriptions--medium.is-bordered .el-descriptions-item__cell{
|
||||
padding:10px
|
||||
|
||||
.el-descriptions--medium.is-bordered .el-descriptions-item__cell {
|
||||
padding: 10px
|
||||
}
|
||||
.el-descriptions--medium:not(.is-bordered) .el-descriptions-item__cell{
|
||||
padding-bottom:10px
|
||||
|
||||
.el-descriptions--medium:not(.is-bordered) .el-descriptions-item__cell {
|
||||
padding-bottom: 10px
|
||||
}
|
||||
.el-descriptions--small{
|
||||
font-size:12px
|
||||
|
||||
.el-descriptions--small {
|
||||
font-size: 12px
|
||||
}
|
||||
.el-descriptions--small.is-bordered .el-descriptions-item__cell{
|
||||
padding:8px 10px
|
||||
|
||||
.el-descriptions--small.is-bordered .el-descriptions-item__cell {
|
||||
padding: 8px 10px
|
||||
}
|
||||
.el-descriptions--small:not(.is-bordered) .el-descriptions-item__cell{
|
||||
padding-bottom:8px
|
||||
|
||||
.el-descriptions--small:not(.is-bordered) .el-descriptions-item__cell {
|
||||
padding-bottom: 8px
|
||||
}
|
||||
.el-descriptions--mini{
|
||||
font-size:12px
|
||||
|
||||
.el-descriptions--mini {
|
||||
font-size: 12px
|
||||
}
|
||||
.el-descriptions--mini.is-bordered .el-descriptions-item__cell{
|
||||
padding:6px 10px
|
||||
|
||||
.el-descriptions--mini.is-bordered .el-descriptions-item__cell {
|
||||
padding: 6px 10px
|
||||
}
|
||||
.el-descriptions--mini:not(.is-bordered) .el-descriptions-item__cell{
|
||||
padding-bottom:6px
|
||||
|
||||
.el-descriptions--mini:not(.is-bordered) .el-descriptions-item__cell {
|
||||
padding-bottom: 6px
|
||||
}
|
||||
.el-descriptions-item{
|
||||
vertical-align:top
|
||||
|
||||
.el-descriptions-item {
|
||||
vertical-align: top
|
||||
}
|
||||
.el-descriptions-item__container{
|
||||
display:flex
|
||||
|
||||
.el-descriptions-item__container {
|
||||
display: flex
|
||||
}
|
||||
.el-descriptions-item__container .el-descriptions-item__content,.el-descriptions-item__container .el-descriptions-item__label{
|
||||
display:inline-flex;
|
||||
align-items:baseline
|
||||
|
||||
.el-descriptions-item__container .el-descriptions-item__content,
|
||||
.el-descriptions-item__container .el-descriptions-item__label {
|
||||
display: inline-flex;
|
||||
align-items: baseline
|
||||
}
|
||||
.el-descriptions-item__container .el-descriptions-item__content{
|
||||
flex:1
|
||||
|
||||
.el-descriptions-item__container .el-descriptions-item__content {
|
||||
flex: 1
|
||||
}
|
||||
.el-descriptions-item__label.has-colon:after{
|
||||
content:":";
|
||||
position:relative;
|
||||
top:-.5px
|
||||
|
||||
.el-descriptions-item__label.has-colon:after {
|
||||
content: ":";
|
||||
position: relative;
|
||||
top: -.5px
|
||||
}
|
||||
.el-descriptions-item__label.is-bordered-label{
|
||||
font-weight:700;
|
||||
color:#909399;
|
||||
background:#fafafa
|
||||
|
||||
.el-descriptions-item__label.is-bordered-label {
|
||||
font-weight: 700;
|
||||
color: #909399;
|
||||
background: #fafafa
|
||||
}
|
||||
.el-descriptions-item__label:not(.is-bordered-label){
|
||||
margin-right:10px
|
||||
|
||||
.el-descriptions-item__label:not(.is-bordered-label) {
|
||||
margin-right: 10px
|
||||
}
|
||||
.el-descriptions-item__content{
|
||||
word-break:break-word;
|
||||
overflow-wrap:break-word
|
||||
|
||||
.el-descriptions-item__content {
|
||||
word-break: break-word;
|
||||
overflow-wrap: break-word
|
||||
}
|
||||
|
||||
.feedBack-box {
|
||||
.el-dialog__wrapper {
|
||||
z-index: 3999 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.feedBack-select-box {
|
||||
z-index: 4000 !important;
|
||||
}
|
||||
|
||||
.feedBack-box-modal {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: .5;
|
||||
background: #000;
|
||||
z-index: 3999;
|
||||
}
|
||||
.el-message-box__wrapper{
|
||||
z-index: 9999 !important;
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
import dicomParser from "dicom-parser";
|
||||
import dcmjs from './dcmjs'
|
||||
import { encoder } from "./encoder";
|
||||
|
||||
export const anonymization = function (file, config) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import Vue from 'vue'
|
||||
import { anonymization } from './anonymization'
|
||||
export const dcmUpload = async function (name, file, config) {
|
||||
export const dcmUpload = async function (data, config, progressFn) {
|
||||
return new Promise(async resolve => {
|
||||
try {
|
||||
// let blob = await encoder(file, config)
|
||||
let blob = await fileToBlob(file)
|
||||
let blob = await fileToBlob(data.file)
|
||||
if (config) {
|
||||
blob = await anonymization(file, config)
|
||||
blob = await anonymization(data.file, config)
|
||||
}
|
||||
let res = await Vue.prototype.OSSclient.put(name, blob.blob)
|
||||
let res = await Vue.prototype.OSSclient.multipartUpload(Object.assign(data, { file: blob.blob }), progressFn)
|
||||
resolve({
|
||||
...res,
|
||||
image: blob.pixelDataElement
|
||||
@@ -19,7 +19,7 @@ export const dcmUpload = async function (name, file, config) {
|
||||
|
||||
|
||||
} catch (e) {
|
||||
console.log(file, 'warning')
|
||||
console.log(data.file, 'warning')
|
||||
resolve(false)
|
||||
console.log(e)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
// crypto.js
|
||||
import CryptoJS from 'crypto-js';
|
||||
import { JSEncrypt } from "jsencrypt";
|
||||
import { getPublicKey } from "@/api/user.js"
|
||||
export const Crypto = {
|
||||
AES: {
|
||||
encrypt: function (plaintext, secretKey) {
|
||||
return CryptoJS.AES.encrypt(plaintext, CryptoJS.enc.Utf8.parse(secretKey), {
|
||||
mode: CryptoJS.mode.ECB,
|
||||
padding: CryptoJS.pad.Pkcs7,
|
||||
iv: ''
|
||||
}).ciphertext.toString(CryptoJS.enc.Base64);
|
||||
},
|
||||
decrypt: function (ciphertext, secretKey) {
|
||||
const bytes = CryptoJS.AES.decrypt(ciphertext, secretKey);
|
||||
return bytes.toString(CryptoJS.enc.Utf8);
|
||||
}
|
||||
}
|
||||
};
|
||||
export const Encrypt = {
|
||||
encrypt: async function (plaintext) {
|
||||
let PublicKey = null;
|
||||
if (sessionStorage.getItem('PublicKey')) {
|
||||
PublicKey = atob(sessionStorage.getItem('PublicKey'));
|
||||
} else {
|
||||
try {
|
||||
let res = await getPublicKey();
|
||||
if (res.IsSuccess) {
|
||||
PublicKey = atob(res.Result)
|
||||
sessionStorage.setItem('PublicKey', res.Result)
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
}
|
||||
let encryptor = new JSEncrypt()
|
||||
encryptor.setPublicKey(PublicKey)
|
||||
return encryptor.encrypt(plaintext)
|
||||
|
||||
},
|
||||
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
import { Encrypt, Crypto } from "./crypto";
|
||||
export const encryptConfig = async (config) => {
|
||||
let secretKey = randomRange(32, 32);
|
||||
let encryptSecretKey = await Encrypt.encrypt(secretKey); // 密钥进行非对称加密
|
||||
if (encryptSecretKey) {
|
||||
config.headers['X-Encrypted-Key'] = encryptSecretKey;
|
||||
}
|
||||
if (config.data && Object.prototype.toString.call(config.data) === '[object Object]') {
|
||||
Object.keys(config.data).forEach(async key => {
|
||||
config.data[key] = Crypto.AES.encrypt(config.data[key], secretKey)
|
||||
console.log(config.data[key], 'KEY')
|
||||
// config.data[key] = await Encrypt.encrypt(config.data[key])
|
||||
})
|
||||
}
|
||||
return config;
|
||||
}
|
||||
const randomRange = (min, max, charStr) => {
|
||||
var returnStr = "",
|
||||
range;
|
||||
if (typeof max == 'string') {
|
||||
charStr = max;
|
||||
}
|
||||
range = ((max && typeof max == 'number') ? Math.round(Math.random() * (max - min)) + min : min);
|
||||
charStr = charStr || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
||||
for (var i = 0; i < range; i++) {
|
||||
var index = Math.round(Math.random() * (charStr.length - 1));
|
||||
returnStr += charStr.substring(index, index + 1);
|
||||
}
|
||||
return returnStr;
|
||||
}
|
||||
@@ -0,0 +1,457 @@
|
||||
const {
|
||||
CreateMultipartUploadCommand,
|
||||
UploadPartCommand,
|
||||
CompleteMultipartUploadCommand,
|
||||
ListMultipartUploadsCommand,//bucket中正在上传的文件列表
|
||||
ListPartsCommand,//列出文件已上传的分片
|
||||
GetObjectCommand,//获取文件
|
||||
} = require("@aws-sdk/client-s3");
|
||||
import SparkMD5 from "./spark-md5.min.js";
|
||||
import store from "@/store";
|
||||
let timer = null, // 网速定时器
|
||||
bytesReceivedPerSecond = {}; // 时间节点上传文件总量
|
||||
export function AWSclose() {
|
||||
if (timer) {
|
||||
clearInterval(timer);
|
||||
timer = null;
|
||||
store.state.trials.uploadTip = '0KB/s'
|
||||
}
|
||||
bytesReceivedPerSecond = {};
|
||||
}
|
||||
//查询文件是否存在于bucket或者正在上传
|
||||
export async function exist(s3, bucket, fileInformation, progressFn, changeStatus) {
|
||||
// 拿到上传到的file
|
||||
const File = fileInformation.file;
|
||||
// 拿到上传的size
|
||||
const uploadFileSize = File.size; // 这里拿到的单位是字节(uploadFileSize/ 1024 / 1024
|
||||
// = 多少兆)
|
||||
// 设置每一片的大小,shardSize 指定上传的每个分片的大小,范围为100 KB~5 GB。
|
||||
// 分片标准为5MB,文件总大小大于5GB分片为20MB
|
||||
let shardSize = 5 * 1024 * 1024;
|
||||
if (uploadFileSize < shardSize) {
|
||||
shardSize = uploadFileSize;
|
||||
}
|
||||
if (uploadFileSize > 5 * 1024 * 1024 * 1024) {
|
||||
shardSize = 20 * 1024 * 1024;
|
||||
}
|
||||
fileInformation = Object.assign({
|
||||
shardSize,
|
||||
sharding: []
|
||||
}, fileInformation)
|
||||
if (fileInformation.speed) {
|
||||
setTimer();
|
||||
}
|
||||
// 1、查询该文件是否已上传到bucket
|
||||
//判断sharding里面是否有东西,有东西证明已经上传过分片了,不需要再进行检测
|
||||
if (fileInformation.sharding.length === 0) {
|
||||
let existBucket = await existInBucket({ s3, bucket, fileInformation: fileInformation });
|
||||
if (existBucket === 'true') {
|
||||
progressFn(1, fileInformation.file, 0);
|
||||
changeStatus(fileInformation.path, 'success');//直接告诉前端,状态
|
||||
return;
|
||||
} else if (existBucket === 'same key') {
|
||||
console.log(fileInformation.path + " bucket中存在同名不同内容的文件");
|
||||
} else if (existBucket === 'not exist') {
|
||||
console.log(fileInformation.path + " bucket中不存在该文件");
|
||||
}
|
||||
//2、查询该文件是否存在上传事件
|
||||
let upload = await existUpload({ s3, bucket: bucket, fileInformation: fileInformation });
|
||||
if (upload.code === 0) {
|
||||
//存在该上传事件并且已经上传了多个分片
|
||||
console.log(fileInformation.path + " 存在上传事件,并已经上传多个分片");
|
||||
//将分片存入sharding
|
||||
const uploadId = upload.uploadId;
|
||||
let parts = upload.parts;
|
||||
let SIZE = 0;
|
||||
for (let i = 0; i < parts.length; i++) {
|
||||
SIZE += parts[i].Size;
|
||||
fileInformation.sharding.push({ ETag: parts[i].ETag, PartNumber: parts[i].PartNumber, Size: parts[i].Size, UploadId: uploadId });
|
||||
}
|
||||
progressFn(SIZE / uploadFileSize, { fileSize: uploadFileSize }, 0);//告诉前端,加入分片
|
||||
//重新上传
|
||||
await uploadFile({ fileInformation: fileInformation, uploadId: uploadId, bucket, changeStatus, getSuspend, progressFn });
|
||||
} else if (upload.code === 1) {
|
||||
// //重名但是不同文件
|
||||
console.log('err 重名文件')
|
||||
changeStatus(fileInformation.path, 'same key');
|
||||
} else if (upload.code === 2) {
|
||||
//没有上传事件
|
||||
console.log(fileInformation.path + " 不存在上传事件");
|
||||
//建立分段上传事件
|
||||
const connect = await createMultipartUpload({ s3, bucket: bucket, key: fileInformation.path, type: fileInformation.file.type });
|
||||
//上传整个文件
|
||||
await uploadFile({ s3, fileInformation: fileInformation, uploadId: connect.UploadId, bucket: bucket, changeStatus, progressFn });
|
||||
}
|
||||
} else {
|
||||
//分片组里面有东西
|
||||
//重新上传
|
||||
await uploadFile({ s3, fileInformation: fileInformation, uploadId: fileInformation.sharding[0].UploadId, bucket, changeStatus, progressFn });
|
||||
}
|
||||
}
|
||||
|
||||
//上传文件未上传的所有分片
|
||||
async function uploadFile({ s3, fileInformation, uploadId, bucket, changeStatus, progressFn }) {// file:上传文件, uploadId parts:已上传的分片
|
||||
const chunkCount = Math.ceil(fileInformation.file.size / fileInformation.shardSize)//总分片数
|
||||
//循环切片并上传
|
||||
for (let i = 0; i < chunkCount; i++) {
|
||||
let start = i * fileInformation.shardSize;//文件分片开始位置
|
||||
let end = Math.min(fileInformation.file.size, start + fileInformation.shardSize)//文件分片结束位置
|
||||
let _chunkFile = fileInformation.file.slice(start, end);//切片文件 即 待上传文件分片
|
||||
//判断parts中是否存在该分片
|
||||
let res1 = fileInformation.sharding.filter((part) => {
|
||||
return part.PartNumber === (i + 1);
|
||||
});
|
||||
if (res1.length === 0) {
|
||||
//不包含该分片
|
||||
const upload = await uploadPart({ s3, f: _chunkFile, uploadId: uploadId, key: fileInformation.path, bucket: bucket, num: i + 1 });//将分片上传
|
||||
//判断sharding中是否存在该分片,如果不存在的话,才判错
|
||||
let res2 = fileInformation.sharding.filter((part) => {
|
||||
return part.PartNumber === (i + 1);
|
||||
});
|
||||
if (res2.length === 0) {
|
||||
if (upload !== 'err') {//上传分片成功,并且没有暂停上传
|
||||
//判断是否存在该分片
|
||||
//判断parts中是否存在该分片
|
||||
let res3 = fileInformation.sharding.filter((part) => {
|
||||
return part.PartNumber === (i + 1);
|
||||
});
|
||||
if (res3.length === 0) {
|
||||
let LASTSIZE = fileInformation.sharding.reduce((sum, item) => sum + item.Size, 0)
|
||||
fileInformation.sharding.push({ ETag: upload.ETag, PartNumber: i + 1, Size: _chunkFile.size, UploadId: uploadId });//上传成功,存到sharding
|
||||
let SIZE = fileInformation.sharding.reduce((sum, item) => sum + item.Size, 0)
|
||||
let lastPercentage = LASTSIZE / fileInformation.file.size, percentage = SIZE / fileInformation.file.size;
|
||||
progressFn(percentage, fileInformation.file, lastPercentage);
|
||||
if (fileInformation.speed) {
|
||||
let time = new Date().getTime();
|
||||
let timeList = Object.keys(bytesReceivedPerSecond).sort((a, b) => a - b);
|
||||
let bytesTime = timeList.find(item => time - item < 1000);
|
||||
if (bytesTime) {
|
||||
bytesReceivedPerSecond[bytesTime] += fileInformation.file.size * (percentage - lastPercentage);
|
||||
} else {
|
||||
console.log("未查询到时间")
|
||||
if (timeList.length > 0) {
|
||||
bytesReceivedPerSecond[timeList[timeList.length - 1]] += fileInformation.file.size * (percentage - lastPercentage);
|
||||
} else {
|
||||
bytesReceivedPerSecond[time] = fileInformation.file.size * (percentage - lastPercentage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (upload === 'err') {
|
||||
changeStatus(fileInformation.path, 'err');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}//for
|
||||
if (fileInformation.sharding.length === chunkCount) {
|
||||
//合并分片
|
||||
const complete = await completeMultipartUpload({ s3, bucket: bucket, key: fileInformation.path, sharding: fileInformation.sharding, uploadId: uploadId });
|
||||
if (complete !== 'err') {
|
||||
changeStatus(fileInformation.path, 'success');//通知前端,上传成功
|
||||
} else {
|
||||
changeStatus(fileInformation.path, 'err');//通知前端,上传失败
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 判断该文件是否已经存在于bucket
|
||||
// bucket file:上传文件
|
||||
// 返回值 'same key':同名不同文件 'not exist':不存在该文件 'true':该文件已存在bucket中
|
||||
async function existInBucket({ s3, bucket, fileInformation }) {
|
||||
if (s3 === null) {
|
||||
return console.log("未创建s3客户端,请先调用init事件");
|
||||
}
|
||||
//getObject 每次最多传回767448b的数据,所以要分段请求
|
||||
let bucketFileUniArray = [];
|
||||
// 分段
|
||||
let count = Math.ceil(fileInformation.file.size / 767448);
|
||||
if (count > 4) {
|
||||
count = 4;
|
||||
}
|
||||
for (let i = 0; i < count; i++) {
|
||||
const obj = await getObject({ s3, bucket: bucket, fileInformation: fileInformation, count: i });
|
||||
if (obj !== 'err') {
|
||||
//获取文件的文件体 计算某个分片的md5
|
||||
const fileBody = obj.Body;
|
||||
let fileUnitArray = await fileBody.transformToByteArray();
|
||||
bucketFileUniArray = [...bucketFileUniArray, ...fileUnitArray];
|
||||
} else {
|
||||
return 'not exist';
|
||||
}
|
||||
}
|
||||
let bucketFileBufferArray = new Uint8Array(bucketFileUniArray);
|
||||
// 将传入文件的fileReader 转成 arrayBuffer
|
||||
let fileArrayBuff = null;
|
||||
fileArrayBuff = await new Promise((resolve) => {
|
||||
let fileReader = new FileReader();
|
||||
fileReader.readAsArrayBuffer(fileInformation.file.slice(0, count * 767448));
|
||||
fileReader.onload = (e) => {
|
||||
resolve(e.target.result);
|
||||
};
|
||||
});
|
||||
if (fileArrayBuff.byteLength > count * 767448) {
|
||||
fileArrayBuff = fileArrayBuff.slice(0, count * 767448);
|
||||
}
|
||||
let bodyMD5 = await getMD5({ arrayBuffer: bucketFileBufferArray.buffer });
|
||||
let fileMD5 = await getMD5({ arrayBuffer: fileArrayBuff });
|
||||
if (bodyMD5 === fileMD5) {
|
||||
//证明是同一个文件 秒传
|
||||
return 'true';
|
||||
} else {
|
||||
return 'same key';
|
||||
}
|
||||
}
|
||||
|
||||
//判断该文件是否正在上传
|
||||
// bucket:bucket file:上传文件
|
||||
//返回值 'not exist upload':不存在上传事件 'same key':同名不同文件
|
||||
async function existUpload({ s3, bucket, fileInformation }) {
|
||||
//判断该文件是否有上传事件
|
||||
const listUploads = await listMultipartUploadsCommand({ s3, bucket: bucket, key: fileInformation.path });
|
||||
if (listUploads !== 'err') {
|
||||
if (listUploads.Uploads !== undefined && listUploads.Uploads.length > 0) {
|
||||
//存在上传事件 获取上传的第一个分片的eTag,计算传入文件md5,相比较是否相同
|
||||
const uploads = listUploads.Uploads;
|
||||
for (const one in uploads) {//可能存在多个连接
|
||||
let uploadOne = uploads[one];
|
||||
const uploadId = uploadOne.UploadId;//UploadId
|
||||
const key = uploadOne.Key;//key
|
||||
//查询该文件已上传分片
|
||||
const listParts = await listPartsCommand({ s3, bucket: bucket, key: key, uploadId: uploadId });
|
||||
if (listParts !== 'err') {
|
||||
if (listParts.Parts !== undefined && listParts.Parts.length !== 0) {
|
||||
//存在分片
|
||||
let etag = listParts.Parts[0].ETag;
|
||||
//计算文件的第一个分片的md5
|
||||
let fileSlice = null;
|
||||
if (fileInformation.file.size > fileInformation.shardSize) {
|
||||
fileSlice = fileInformation.file.slice(0, fileInformation.shardSize);
|
||||
} else {
|
||||
fileSlice = fileInformation.file;
|
||||
}
|
||||
let fileMD5 = await new Promise((resolve) => {
|
||||
const fileReader = new FileReader();
|
||||
var spark = new SparkMD5.ArrayBuffer();
|
||||
fileReader.readAsArrayBuffer(fileSlice);
|
||||
fileReader.onload = (e) => {
|
||||
spark.append(e.target.result);
|
||||
var m = spark.end();
|
||||
resolve(m);
|
||||
};
|
||||
});
|
||||
if (etag.split('"')[1] === fileMD5) {
|
||||
//是同一个文件上传
|
||||
return {
|
||||
code: 0,
|
||||
message: 'true',
|
||||
uploadId: uploadId,
|
||||
key: key,
|
||||
parts: listParts.Parts
|
||||
}
|
||||
} else {
|
||||
//同名不同文件
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
//该文件有进行上传,但没有上传完成一个分片
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
//有连接,没上传分片
|
||||
continue;
|
||||
}
|
||||
}//for
|
||||
return {
|
||||
code: 1,
|
||||
message: 'same key'
|
||||
}
|
||||
} else {
|
||||
//无连接
|
||||
return {
|
||||
code: 2,
|
||||
message: 'not exist upload'
|
||||
};
|
||||
}
|
||||
} else {
|
||||
//无连接
|
||||
return {
|
||||
code: 2,
|
||||
message: 'not exist upload'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
//计算arrayBuffer的md5值
|
||||
async function getMD5({ arrayBuffer }) {
|
||||
return await new Promise((resolve) => {
|
||||
const spark = new SparkMD5.ArrayBuffer();
|
||||
spark.append(arrayBuffer);
|
||||
const m = spark.end();
|
||||
resolve(m);
|
||||
});
|
||||
}
|
||||
|
||||
//建立文件上传事件
|
||||
async function createMultipartUpload({ s3, bucket, key, type }) {//bucket:bucket key:文件名 type:文件类型
|
||||
if (s3 === null) {
|
||||
return console.log("未创建s3客户端,请先调用init事件");
|
||||
}
|
||||
const params = {
|
||||
Bucket: bucket,
|
||||
Key: key,
|
||||
ContentType: type
|
||||
};
|
||||
const res = async () => {
|
||||
try {
|
||||
return await s3.send(new CreateMultipartUploadCommand(params));
|
||||
} catch (err) {
|
||||
console.log('建立上传事件失败:', err.message)
|
||||
return 'err';
|
||||
}
|
||||
}
|
||||
return res();
|
||||
}
|
||||
|
||||
//上传一个分片
|
||||
async function uploadPart({ s3, f, uploadId, key, bucket, num }) { //f:文件分片,num:分片标号
|
||||
if (s3 === null) {
|
||||
return console.log("未创建s3客户端,请先调用init事件");
|
||||
}
|
||||
const params = {
|
||||
Bucket: bucket,
|
||||
Key: key,
|
||||
PartNumber: num,
|
||||
UploadId: uploadId,
|
||||
Body: f,
|
||||
// ContentDisposition: "attachment; filename=hahaha.dcm"
|
||||
};
|
||||
const res = async () => {
|
||||
try {
|
||||
return await s3.send(new UploadPartCommand(params));
|
||||
} catch (err) {
|
||||
console.log('上传分片第 ' + num + ' 片错误信息', err.message)
|
||||
return 'err';
|
||||
}
|
||||
}
|
||||
return res();
|
||||
}
|
||||
//将分片合并
|
||||
async function completeMultipartUpload({ s3, bucket, key, sharding, uploadId }) {
|
||||
if (s3 === null) {
|
||||
return console.log("未创建s3客户端,请先调用init事件");
|
||||
}
|
||||
let parts = [];
|
||||
for (let i = 0; i < sharding.length; i++) {
|
||||
parts.push({
|
||||
"ETag": sharding[i].ETag,
|
||||
"PartNumber": sharding[i].PartNumber,
|
||||
})
|
||||
}
|
||||
const params = {
|
||||
Bucket: bucket,
|
||||
Key: key,
|
||||
MultipartUpload: {
|
||||
Parts: parts
|
||||
},
|
||||
UploadId: uploadId
|
||||
};
|
||||
const res = async () => {
|
||||
try {
|
||||
return await s3.send(new CompleteMultipartUploadCommand(params))
|
||||
} catch (err) {
|
||||
console.log("合并分片失败: ", err.message);
|
||||
return 'err';
|
||||
}
|
||||
}
|
||||
return res();
|
||||
}
|
||||
|
||||
//查询某个文件已经上传的所有分片
|
||||
async function listPartsCommand({ s3, bucket, key, uploadId }) {
|
||||
if (s3 === null) {
|
||||
return console.log("未创建s3客户端,请先调用init事件");
|
||||
}
|
||||
const params = {
|
||||
Bucket: bucket,
|
||||
Key: key,
|
||||
UploadId: uploadId
|
||||
};
|
||||
const res = async () => {
|
||||
try {
|
||||
return await s3.send(new ListPartsCommand(params));
|
||||
} catch (err) {
|
||||
console.log("查询该文件已上传分片失败: " + err.message);
|
||||
return 'err';
|
||||
}
|
||||
}
|
||||
return res();
|
||||
}
|
||||
//查询该文件是否存在上传事件
|
||||
async function listMultipartUploadsCommand({ s3, bucket, key }) {
|
||||
if (s3 === null) {
|
||||
return console.log("未创建s3客户端,请先调用init事件");
|
||||
}
|
||||
const params = {
|
||||
Bucket: bucket,
|
||||
Delimiter: '',
|
||||
MaxUploads: 1000,
|
||||
Prefix: key
|
||||
};
|
||||
const res = async () => {
|
||||
try {
|
||||
return await s3.send(new ListMultipartUploadsCommand(params));
|
||||
} catch (err) {
|
||||
console.log("查询 " + key + " 文件是否存在上传事件失败: " + err.message);
|
||||
return 'err';
|
||||
}
|
||||
}
|
||||
return res();
|
||||
}
|
||||
//获取文件
|
||||
async function getObject({ s3, bucket, fileInformation, count }) {
|
||||
//一次请求最多 767448
|
||||
if (s3 === null) {
|
||||
return console.log("未创建s3客户端,请先调用init事件");
|
||||
}
|
||||
let byte1 = ((count + 1) * 767448 - 1) > fileInformation.file.size ? fileInformation.file.size : ((count + 1) * 767448 - 1);
|
||||
let byte2 = (count * 767448) > fileInformation.file.size ? fileInformation.file.size : (count * 767448);
|
||||
let range = "bytes=" + byte2 + "-" + byte1;
|
||||
const params = {
|
||||
Bucket: bucket,
|
||||
Key: fileInformation.path,
|
||||
Range: range
|
||||
};
|
||||
const res = async () => {
|
||||
try {
|
||||
return await s3.send(new GetObjectCommand(params));
|
||||
} catch (err) {
|
||||
console.log('获取 ' + fileInformation.path + ' 文件失败:', err.message);
|
||||
return 'err';
|
||||
}
|
||||
}
|
||||
return res();
|
||||
}
|
||||
function setTimer() {
|
||||
if (timer) return false;
|
||||
timer = setInterval(() => {
|
||||
let timeList = Object.keys(bytesReceivedPerSecond).sort((a, b) => a - b);
|
||||
if (timeList.length > 0) {
|
||||
let totalBytes = timeList.reduce((sum, bytes) => sum + bytesReceivedPerSecond[bytes], 0) / (5 * 1024);
|
||||
let unit = 'KB/s';
|
||||
if (totalBytes > 1024) {
|
||||
totalBytes = totalBytes / 1024;
|
||||
unit = "MB/s";
|
||||
}
|
||||
store.state.trials.uploadTip = totalBytes.toFixed(2) + unit;
|
||||
}
|
||||
if (timeList.length >= 5) {
|
||||
delete bytesReceivedPerSecond[timeList[0]]
|
||||
}
|
||||
let time = new Date().getTime();
|
||||
bytesReceivedPerSecond[time] = 0;
|
||||
}, 1000)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
import moment from "moment";
|
||||
import store from "@/store";
|
||||
let savaData = {},
|
||||
checkData = {}, // 当前上传的节点文件和上一次提交进度
|
||||
timer = null, // 网速定时器
|
||||
bytesReceivedPerSecond = {}; // 时间节点上传文件总量
|
||||
export function OSSclose() {
|
||||
if (timer) {
|
||||
clearInterval(timer);
|
||||
timer = null;
|
||||
store.state.trials.uploadTip = '0KB/s'
|
||||
}
|
||||
bytesReceivedPerSecond = {};
|
||||
savaData = {};
|
||||
checkData = {};
|
||||
saveFinishedData(savaData);
|
||||
}
|
||||
export async function customerHttp(OSSclient, data, progressFn) {
|
||||
// 拿到上传到的file
|
||||
const uploadFile = data.file;
|
||||
// 拿到上传的size
|
||||
const uploadFileSize = uploadFile.size; // 这里拿到的单位是字节(uploadFileSize/ 1024 / 1024
|
||||
// = 多少兆)
|
||||
// 设置每一片的大小,partSize 指定上传的每个分片的大小,范围为100 KB~5 GB。
|
||||
// 分片标准为5MB,文件总大小大于5GB分片为20MB
|
||||
let partSize = 5 * 1024 * 1024;
|
||||
if (uploadFileSize < partSize) {
|
||||
partSize = uploadFileSize;
|
||||
}
|
||||
if (uploadFileSize > 5 * 1024 * 1024 * 1024) {
|
||||
partSize = 20 * 1024 * 1024;
|
||||
}
|
||||
// 设置所有的文件上传所有的唯一的saveFileId
|
||||
const saveFileId = `${uploadFileSize}_${data.path}`;
|
||||
if (data.speed) {
|
||||
setTimer();
|
||||
}
|
||||
initPage();
|
||||
let res = await multipartUpload(OSSclient, partSize, saveFileId, uploadFile, data, progressFn);
|
||||
return res;
|
||||
}
|
||||
|
||||
async function multipartUpload(OSSclient, partSize, saveFileId, uploadFile, data, progressFn) {
|
||||
try {
|
||||
// object-name目前我是用的uploadFile.name,其实也是要根据你们的项目而定,
|
||||
// 有没有具体的规定, 要不要加项目名, 要不要加对应的环境;
|
||||
// 上传的参数
|
||||
const uploadParams = {
|
||||
partSize,
|
||||
progress: (percentage, checkpoint) => {
|
||||
savaData[saveFileId] = checkpoint;
|
||||
if (!checkData[saveFileId]) {
|
||||
checkData[saveFileId] = 0
|
||||
}
|
||||
if (data.speed) {
|
||||
let time = new Date().getTime();
|
||||
let timeList = Object.keys(bytesReceivedPerSecond).sort((a, b) => a - b);
|
||||
let bytesTime = timeList.find(item => time - item < 1000);
|
||||
if (bytesTime) {
|
||||
bytesReceivedPerSecond[bytesTime] += data.file.size * (percentage - checkData[saveFileId]);
|
||||
} else {
|
||||
// console.log("未查询到时间")
|
||||
if (timeList.length > 0) {
|
||||
bytesReceivedPerSecond[timeList[timeList.length - 1]] += data.file.size * (percentage - checkData[saveFileId]);
|
||||
} else {
|
||||
bytesReceivedPerSecond[time] = data.file.size * (percentage - checkData[saveFileId]);
|
||||
}
|
||||
}
|
||||
}
|
||||
savaData["lastSaveTime"] = new Date();
|
||||
progressFn(percentage, data.file, checkData[saveFileId])
|
||||
checkData[saveFileId] = percentage;
|
||||
if (percentage === 1) {
|
||||
delete checkData[saveFileId]
|
||||
}
|
||||
// 在上传过程中,把已经上传的数据存储下来
|
||||
saveFinishedData(savaData);
|
||||
},
|
||||
// headers: {
|
||||
// "Content-Disposition": `attachment; filename=hahaha.dcm`,
|
||||
// "Cache-Control": "public, no-cache"
|
||||
// }
|
||||
};
|
||||
// 断点续传
|
||||
await resumeUpload(uploadParams, saveFileId);
|
||||
const res = await OSSclient.multipartUpload(
|
||||
data.path,
|
||||
uploadFile,
|
||||
uploadParams
|
||||
);
|
||||
if (res.res.status === 200) {
|
||||
// 重新去掉某个缓存进行设置
|
||||
delete savaData[saveFileId];
|
||||
saveFinishedData(savaData);
|
||||
} else if (res.res.status === 404) {
|
||||
delete savaData[saveFileId];
|
||||
saveFinishedData(savaData);
|
||||
}
|
||||
return res;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
delete savaData[saveFileId];
|
||||
saveFinishedData(savaData);
|
||||
// 捕获超时异常。
|
||||
if (e.code === "ConnectionTimeoutError") {
|
||||
console.log("TimeoutError");
|
||||
// do ConnectionTimeoutError operation
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
async function resumeUpload(uploadParams, saveFileId) {
|
||||
if (localStorage.getItem("upload-function-name")) {
|
||||
const obj = JSON.parse(localStorage.getItem("upload-function-name"));
|
||||
if (Object.keys(obj).includes(saveFileId)) {
|
||||
uploadParams.checkpoint = obj[saveFileId];
|
||||
}
|
||||
}
|
||||
}
|
||||
// 存储到内存
|
||||
function saveFinishedData(finishedData) {
|
||||
localStorage.setItem(
|
||||
"upload-function-name",
|
||||
JSON.stringify(finishedData)
|
||||
);
|
||||
}
|
||||
function initPage() {
|
||||
// 判断是不是有缓存
|
||||
const localData = localStorage.getItem("upload-function-name");
|
||||
if (!localData) return;
|
||||
savaData = JSON.parse(localData);
|
||||
// 当前时间 > 存储时间(1000 * 60 * 60表示1h,意思就是这些数据你要存多久,
|
||||
// 可以是1h也可以是多少天,随意)
|
||||
if (
|
||||
moment(new Date()).diff(moment(savaData.lastSaveTime)) >
|
||||
1000 * 60 * 60
|
||||
) {
|
||||
localStorage.removeItem("upload-function-name");
|
||||
}
|
||||
}
|
||||
function setTimer() {
|
||||
if (timer) return false;
|
||||
timer = setInterval(() => {
|
||||
// console.log(Object.assign({}, bytesReceivedPerSecond))
|
||||
let timeList = Object.keys(bytesReceivedPerSecond).sort((a, b) => a - b);
|
||||
if (timeList.length > 0) {
|
||||
let totalBytes = timeList.reduce((sum, bytes) => sum + bytesReceivedPerSecond[bytes], 0) / (5 * 1024);
|
||||
let unit = 'KB/s';
|
||||
if (totalBytes > 1024) {
|
||||
totalBytes = totalBytes / 1024;
|
||||
unit = "MB/s";
|
||||
}
|
||||
store.state.trials.uploadTip = totalBytes.toFixed(2) + unit;
|
||||
}
|
||||
if (timeList.length >= 5) {
|
||||
delete bytesReceivedPerSecond[timeList[0]]
|
||||
}
|
||||
let time = new Date().getTime();
|
||||
bytesReceivedPerSecond[time] = 0;
|
||||
}, 1000)
|
||||
}
|
||||
+1
File diff suppressed because one or more lines are too long
+204
-41
@@ -3,30 +3,39 @@ const router = require('@/router');
|
||||
const Minio = require('minio')
|
||||
const stream = require('stream')
|
||||
import Vue from 'vue'
|
||||
import { customerHttp, OSSclose } from "@/utils/multipartUpload/oss"
|
||||
import { exist, AWSclose } from "@/utils/multipartUpload/aws"
|
||||
const { GetObjectStoreToken } = require('../api/user.js')
|
||||
const {
|
||||
S3Client,
|
||||
} = require("@aws-sdk/client-s3");
|
||||
|
||||
Vue.prototype.OSSclientConfig = {
|
||||
}
|
||||
|
||||
function blobToBuffer(blob, fileName) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const file = new File([blob], fileName);
|
||||
resolve(file)
|
||||
})
|
||||
}
|
||||
|
||||
async function ossGenerateSTS() {
|
||||
let res = await GetObjectStoreToken()
|
||||
let res = null;
|
||||
if (localStorage.getItem('stsToken')) {
|
||||
res = JSON.parse(localStorage.getItem('stsToken'))
|
||||
} else {
|
||||
res = await GetObjectStoreToken()
|
||||
localStorage.setItem('stsToken', JSON.stringify(res))
|
||||
}
|
||||
|
||||
// res.Result.ObjectStoreUse = 'AWS';
|
||||
Vue.prototype.OSSclientConfig = { ...res.Result[res.Result.ObjectStoreUse] }
|
||||
Vue.prototype.OSSclientConfig.ObjectStoreUse = res.Result.ObjectStoreUse;
|
||||
Vue.prototype.OSSclientConfig.basePath = Vue.prototype.OSSclientConfig.viewEndpoint
|
||||
switch (res.Result.ObjectStoreUse) {
|
||||
case 'AliyunOSS':
|
||||
Vue.prototype.OSSclientConfig.bucket = Vue.prototype.OSSclientConfig.bucketName
|
||||
Vue.prototype.OSSclientConfig.stsToken = Vue.prototype.OSSclientConfig.securityToken
|
||||
Vue.prototype.OSSclientConfig.timeout = 10 * 60 * 1000
|
||||
let OSSclient = new OSS(Vue.prototype.OSSclientConfig)
|
||||
Vue.prototype.OSSclient = {
|
||||
put: function (objectName, object) {
|
||||
put: async function (objectName, object) {
|
||||
OSSclient = await RefreshClient(OSSclient)
|
||||
return new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
let _vm = router.default.app
|
||||
@@ -49,6 +58,46 @@ async function ossGenerateSTS() {
|
||||
reject()
|
||||
}
|
||||
})
|
||||
},
|
||||
multipartUpload: async (data, progress) => {
|
||||
OSSclient = await RefreshClient(OSSclient)
|
||||
return new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
const { file, path } = data;
|
||||
if (!file || !path) return reject('file and path be required');
|
||||
let config = await getSTSToken(Vue.prototype.OSSclientConfig.expiration);
|
||||
if (config) {
|
||||
Vue.prototype.OSSclientConfig = { ...config.Result[config.Result.ObjectStoreUse] }
|
||||
Vue.prototype.OSSclientConfig.ObjectStoreUse = config.Result.ObjectStoreUse;
|
||||
Vue.prototype.OSSclientConfig.basePath = Vue.prototype.OSSclientConfig.viewEndpoint;
|
||||
Vue.prototype.OSSclientConfig.bucket = Vue.prototype.OSSclientConfig.bucketName
|
||||
Vue.prototype.OSSclientConfig.stsToken = Vue.prototype.OSSclientConfig.securityToken
|
||||
Vue.prototype.OSSclientConfig.timeout = 10 * 60 * 1000
|
||||
OSSclient = new OSS(Vue.prototype.OSSclientConfig);
|
||||
}
|
||||
let _vm = router.default.app
|
||||
if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload') {
|
||||
var objectItem = data.path.split('/')
|
||||
objectItem[objectItem.length - 1] = new Date().getTime() + '_' + objectItem[objectItem.length - 1]
|
||||
data.path = objectItem.join('/')
|
||||
}
|
||||
let res = await customerHttp(OSSclient, data, progress);
|
||||
if (res) {
|
||||
resolve({
|
||||
name: data.path,
|
||||
url: Vue.prototype.OSSclientConfig.viewEndpoint + decodeUtf8(res.name)
|
||||
})
|
||||
} else {
|
||||
reject()
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
},
|
||||
close: () => {
|
||||
OSSclose();
|
||||
}
|
||||
}
|
||||
break
|
||||
@@ -86,49 +135,121 @@ async function ossGenerateSTS() {
|
||||
console.log(e)
|
||||
}
|
||||
})
|
||||
},
|
||||
close: () => {
|
||||
return false
|
||||
}
|
||||
}
|
||||
break
|
||||
case 'AWS':
|
||||
let aws = new Minio.Client(Vue.prototype.OSSclientConfig);
|
||||
Vue.prototype.OSSclientConfig.bucket = Vue.prototype.OSSclientConfig.bucketName
|
||||
let aws = new S3Client({
|
||||
endpoint: Vue.prototype.OSSclientConfig.viewEndpoint,
|
||||
region: Vue.prototype.OSSclientConfig.region,
|
||||
s3ForcePathStyle: true,
|
||||
signatureVersion: 'v4',
|
||||
forcePathStyle: true,
|
||||
// SessionToken: '',
|
||||
credentials: {
|
||||
accessKeyId: Vue.prototype.OSSclientConfig.accessKeyId,
|
||||
secretAccessKey: Vue.prototype.OSSclientConfig.secretAccessKey,
|
||||
sessionToken: Vue.prototype.OSSclientConfig.sessionToken
|
||||
}
|
||||
});
|
||||
Vue.prototype.OSSclient = {
|
||||
put: function (objectName, object) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
var name = objectName.split('/')[objectName.split('/').length - 1]
|
||||
let _vm = router.default.app
|
||||
if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload') {
|
||||
var objectItem = objectName.split('/')
|
||||
objectItem[objectItem.length - 1] = new Date().getTime() + '_' + objectItem[objectItem.length - 1]
|
||||
objectName = objectItem.join('/')
|
||||
}
|
||||
const reader = new FileReader();
|
||||
reader.onload = (ex) => {
|
||||
const bufferStream = new stream.PassThrough()
|
||||
bufferStream.end(Buffer.from(ex.target.result))
|
||||
aws.putObject(Vue.prototype.OSSclientConfig.bucketName, objectName, bufferStream, function (err, etag) {
|
||||
if (err) {
|
||||
console.log(err)
|
||||
reject()
|
||||
} else {
|
||||
console.log(objectName);
|
||||
resolve({
|
||||
name: objectName,
|
||||
url: Vue.prototype.OSSclientConfig.viewEndpoint + decodeUtf8(objectName)
|
||||
})
|
||||
}
|
||||
})
|
||||
};
|
||||
reader.readAsArrayBuffer(object);
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
})
|
||||
put: async function (objectName, object) {
|
||||
let data = {
|
||||
file: object,
|
||||
path: objectName
|
||||
}
|
||||
aws = await RefreshClient(aws);
|
||||
return uploadAWS(aws, data, () => { });
|
||||
},
|
||||
multipartUpload: async (data, progress) => {
|
||||
aws = await RefreshClient(aws);
|
||||
return uploadAWS(aws, data, progress);
|
||||
},
|
||||
close: () => {
|
||||
AWSclose();
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
// AWS上传函数
|
||||
function uploadAWS(aws, data, progress) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
const { file, path } = data;
|
||||
if (!file || !path) return reject('file and path be required');
|
||||
let _vm = router.default.app
|
||||
if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload') {
|
||||
var objectItem = data.path.split('/')
|
||||
objectItem[objectItem.length - 1] = new Date().getTime() + '_' + objectItem[objectItem.length - 1]
|
||||
data.path = objectItem.join('/')
|
||||
}
|
||||
let bucketName = data.path.split("/")[1] || Vue.prototype.OSSclientConfig.bucket
|
||||
let curPath = data.path;
|
||||
data.path = data.path.replace(`/${bucketName}/`, '');
|
||||
await exist(aws, bucketName, data, progress, (path, status) => {
|
||||
if (status === 'success') {
|
||||
resolve({
|
||||
name: decodeUtf8(curPath),
|
||||
url: Vue.prototype.OSSclientConfig.viewEndpoint + decodeUtf8(curPath)
|
||||
})
|
||||
} else {
|
||||
reject()
|
||||
}
|
||||
});
|
||||
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
// client过期刷新
|
||||
async function RefreshClient(client) {
|
||||
let config = await getSTSToken(Vue.prototype.OSSclientConfig.expiration);
|
||||
if (config) {
|
||||
// config.Result.ObjectStoreUse = 'AWS'
|
||||
switch (config.Result.ObjectStoreUse) {
|
||||
case 'AliyunOSS': {
|
||||
Vue.prototype.OSSclientConfig = { ...config.Result[config.Result.ObjectStoreUse] }
|
||||
Vue.prototype.OSSclientConfig.ObjectStoreUse = config.Result.ObjectStoreUse;
|
||||
Vue.prototype.OSSclientConfig.basePath = Vue.prototype.OSSclientConfig.viewEndpoint;
|
||||
Vue.prototype.OSSclientConfig.bucket = Vue.prototype.OSSclientConfig.bucketName
|
||||
Vue.prototype.OSSclientConfig.stsToken = Vue.prototype.OSSclientConfig.securityToken
|
||||
Vue.prototype.OSSclientConfig.timeout = 10 * 60 * 1000
|
||||
return new OSS(Vue.prototype.OSSclientConfig);
|
||||
}
|
||||
case "MinIO": {
|
||||
return client;
|
||||
}
|
||||
case "AWS": {
|
||||
Vue.prototype.OSSclientConfig = { ...config.Result[config.Result.ObjectStoreUse] }
|
||||
Vue.prototype.OSSclientConfig.ObjectStoreUse = config.Result.ObjectStoreUse;
|
||||
Vue.prototype.OSSclientConfig.basePath = Vue.prototype.OSSclientConfig.viewEndpoint;
|
||||
Vue.prototype.OSSclientConfig.bucket = Vue.prototype.OSSclientConfig.bucketName
|
||||
return new S3Client({
|
||||
endpoint: Vue.prototype.OSSclientConfig.viewEndpoint,
|
||||
region: Vue.prototype.OSSclientConfig.region,
|
||||
s3ForcePathStyle: true,
|
||||
signatureVersion: 'v4',
|
||||
forcePathStyle: true,
|
||||
credentials: {
|
||||
accessKeyId: Vue.prototype.OSSclientConfig.accessKeyId,
|
||||
secretAccessKey: Vue.prototype.OSSclientConfig.secretAccessKey,
|
||||
sessionToken: Vue.prototype.OSSclientConfig.sessionToken
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
return client;
|
||||
}
|
||||
}
|
||||
function decodeUtf8(bytes) {
|
||||
let str = bytes.split('?');
|
||||
let str2 = str[0].split('/');
|
||||
@@ -138,6 +259,48 @@ function decodeUtf8(bytes) {
|
||||
str2.pop();
|
||||
return str2.join("/") + '/' + name;
|
||||
}
|
||||
const queue = []
|
||||
let loading = false;
|
||||
// 获取凭证
|
||||
function getSTSToken(credentials) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let isExpired = isCredentialsExpired(credentials);
|
||||
if (isExpired) {
|
||||
if (loading) {
|
||||
queue.push({ resolve, reject })
|
||||
}
|
||||
if (!loading) {
|
||||
loading = true;
|
||||
let res = await GetObjectStoreToken();
|
||||
loading = false;
|
||||
localStorage.setItem('stsToken', JSON.stringify(res))
|
||||
resolve(res)
|
||||
let p = queue.shift();
|
||||
while (p) {
|
||||
p.resolve(res)
|
||||
p = queue.shift();
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// console.log("凭证未过期");
|
||||
resolve(false)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
/**
|
||||
* oss判断临时凭证是否到期。
|
||||
**/
|
||||
function isCredentialsExpired(credentials) {
|
||||
if (!credentials) {
|
||||
return true;
|
||||
}
|
||||
const expireDate = new Date(credentials);
|
||||
const now = new Date();
|
||||
// 如果有效期不足五分钟,视为过期。
|
||||
return expireDate.getTime() - now.getTime() <= 300000;
|
||||
|
||||
}
|
||||
|
||||
export const OSSclient = ossGenerateSTS
|
||||
|
||||
+15
-5
@@ -2,9 +2,9 @@ import axios from 'axios'
|
||||
import { Message, MessageBox, Alert } from 'element-ui'
|
||||
import store from '@/store'
|
||||
import router from '@/router'
|
||||
import Vue from 'vue'
|
||||
import WHITELIST from "./whiteList"
|
||||
import moment from 'moment-timezone';
|
||||
console.log(moment.tz.guess())
|
||||
import { encryptConfig } from "@/utils/encrypt"
|
||||
axios.defaults.withCredentials = false
|
||||
const service = axios.create({
|
||||
baseURL: '/api',
|
||||
@@ -16,18 +16,28 @@ var path
|
||||
// var lang = store.state.lang.language
|
||||
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
async config => {
|
||||
path = router && router.app && router.app._route && router.app._route.path
|
||||
config.headers['Content-Type'] = 'application/json;charset=UTF-8'
|
||||
var language = zzSessionStorage.getItem('lang')
|
||||
config.headers['Accept-Language'] = language === 'en' ? 'en-US,en;q=0.5' : 'zh-CN,zh;q=0.9'
|
||||
config.headers['TimeZoneId'] = moment.tz.guess()
|
||||
if (store.getters.token) {
|
||||
if (config.ENCRYPT) {
|
||||
try {
|
||||
config = await encryptConfig(config)
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
}
|
||||
if (store.getters.token && !config.clearToken) {
|
||||
config.headers.Authorization = `Bearer ${store.getters.token}`
|
||||
}
|
||||
try {
|
||||
if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) {
|
||||
if (!path || path === '/ReviewersResearchForm' || path === '/ReviewersResearch' || path === '/login' || path === '/researchForm' || path === '/researchLogin' || path === '/email-recompose' || path === '/recompose' || path === '/resetpassword' || path === '/error') {
|
||||
// if (!path || path === '/ReviewersResearchForm' || path === '/ReviewersResearch' || path === '/login' || path === '/researchForm' || path === '/researchDetail_m' || path === '/researchLogin_m' || path === '/researchLogin' || path === '/email-recompose' || path === '/recompose' || path === '/resetpassword' || path === '/error') {
|
||||
// return config
|
||||
// }
|
||||
if (!path || WHITELIST.some(item => item === path)) {
|
||||
return config
|
||||
}
|
||||
if (store.state.user.userId !== zzSessionStorage.getItem('userId')) {
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
import streamSaver from "streamsaver";
|
||||
import "streamsaver/examples/zip-stream.js";
|
||||
import store from '@/store'
|
||||
streamSaver.mitm = `${window.location.origin}/mitm.html?version=2.0.0`
|
||||
// 下载文件并压缩
|
||||
function zipFiles(zipName, files) {
|
||||
return new Promise((resolve) => {
|
||||
try {
|
||||
console.log("同步下载打包开始时间:" + new Date());
|
||||
store.dispatch('trials/setUnLock', true)
|
||||
files = formatFiles(files)
|
||||
// 创建压缩文件输出流
|
||||
const zipFileOutputStream = streamSaver.createWriteStream(zipName);
|
||||
// 创建下载文件流
|
||||
const fileIterator = files.values();
|
||||
const readableZipStream = new ZIP({
|
||||
async pull(ctrl) {
|
||||
const fileInfo = fileIterator.next();
|
||||
if (fileInfo.done) {//迭代终止
|
||||
ctrl.close();
|
||||
} else {
|
||||
let { name, url } = fileInfo.value;
|
||||
url = decodeUtf8(url);
|
||||
return fetch(url).then(res => {
|
||||
ctrl.enqueue({
|
||||
name,
|
||||
stream: () => res.body
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
if (window.WritableStream && readableZipStream.pipeTo) {
|
||||
// 开始下载
|
||||
readableZipStream
|
||||
.pipeTo(zipFileOutputStream)
|
||||
.then(() => {
|
||||
console.log("同步下载打包结束时间:" + new Date());
|
||||
store.dispatch('trials/setUnLock', false)
|
||||
resolve(true)
|
||||
}).catch(err => {
|
||||
console.log(err);
|
||||
resolve(false)
|
||||
});
|
||||
} else {
|
||||
resolve(false)
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
resolve(false)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
// 下载文件并修改名称
|
||||
async function updateFile(file, name) {
|
||||
return new Promise(async resolve => {
|
||||
try {
|
||||
store.dispatch('trials/setUnLock', true)
|
||||
const fileOutputStream = streamSaver.createWriteStream(name);
|
||||
file = decodeUtf8(file);
|
||||
let res = await fetch(file);
|
||||
res.body.pipeTo(fileOutputStream).then(() => {
|
||||
store.dispatch('trials/setUnLock', true)
|
||||
resolve(true)
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
resolve(false)
|
||||
});
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
resolve(false)
|
||||
}
|
||||
})
|
||||
}
|
||||
// 同名文件修改名称
|
||||
function formatFiles(files) {
|
||||
let fileObj = {};
|
||||
files.forEach(file => {
|
||||
let arr = Object.keys(fileObj);
|
||||
if (!~arr.indexOf(file.name)) {
|
||||
fileObj[file.name] = 1;
|
||||
} else {
|
||||
let name = file.name;
|
||||
file.name = name.split(".")[0] + `(${fileObj[name]})` + name
|
||||
.substring(name.lastIndexOf('.'))
|
||||
.toLocaleLowerCase()
|
||||
fileObj[name]++;
|
||||
}
|
||||
})
|
||||
return files;
|
||||
}
|
||||
function decodeUtf8(bytes) {
|
||||
let str = bytes.split('?');
|
||||
let str2 = str[0].split('/');
|
||||
let name = str2[str2.length - 1];
|
||||
name = encodeURIComponent(name);
|
||||
str.shift();
|
||||
str2.pop();
|
||||
return str2.join("/") + '/' + name;
|
||||
}
|
||||
export async function downLoadFile(file, name, type = 'file') {
|
||||
if (type === 'zip') return await zipFiles(name, file);
|
||||
return await updateFile(file, name)
|
||||
|
||||
}
|
||||
@@ -1,195 +0,0 @@
|
||||
import JSZip from "jszip";
|
||||
import axios from "axios";
|
||||
import { saveAs } from "file-saver";
|
||||
import Vue from 'vue';
|
||||
import {
|
||||
requestPackageAndAnonymizImage,
|
||||
} from "@/api/load.js";
|
||||
let flag = {};
|
||||
export const resetFlag = () => {
|
||||
flag = {}
|
||||
}
|
||||
export const downloadImage = async (id, id2, IsDicom = true) => {
|
||||
if (flag[`${id2}_${IsDicom}`]) return Vue.prototype.$message.warning(Vue.prototype.$t('trials:upload:tip:uploading'));
|
||||
flag[`${id2}_${IsDicom}`] = true
|
||||
try {
|
||||
let params = {
|
||||
TrialId: id,
|
||||
SubjectVisitId: id2,
|
||||
IsDicom: IsDicom
|
||||
}
|
||||
let res = await requestPackageAndAnonymizImage(params);
|
||||
if (res.IsSuccess) {
|
||||
if (!res.Result) {
|
||||
flag[`${id2}_${IsDicom}`] = false;
|
||||
Vue.prototype.$message.warning(Vue.prototype.$t("trials:upload:message:not"))
|
||||
return 1;
|
||||
}
|
||||
Vue.prototype.$message.success(Vue.prototype.$t("trials:upload:message:startUpload"));
|
||||
let href = Vue.prototype.OSSclientConfig.basePath + res.Result;
|
||||
download(href, res.OtherInfo.FileName, { id2, IsDicom })
|
||||
return 2;
|
||||
// let a = document.createElement("a");
|
||||
// // let fileName =
|
||||
// // res.Result.split("/")[res.Result.split("/").length - 1];
|
||||
// a.download = res.OtherInfo.FileName;
|
||||
// a.href = href;
|
||||
// a.click();
|
||||
// URL.revokeObjectURL(href);
|
||||
// let timer = setTimeout(() => {
|
||||
// a = null;
|
||||
// href = null;
|
||||
// timer = null;
|
||||
// }, 500)
|
||||
// return 2;
|
||||
} else {
|
||||
flag[`${id2}_${IsDicom}`] = false;
|
||||
return false;
|
||||
}
|
||||
} catch (err) {
|
||||
flag[`${id2}_${IsDicom}`] = false;
|
||||
console.log(err);
|
||||
}
|
||||
};
|
||||
const setfolder = async (item) => {
|
||||
const zip = new JSZip(); // 创建实例对象
|
||||
let patientIds = item.PatientList.map(i => i.PatientIdStr);
|
||||
let zipName = `${item.SubjectCode}_${patientIds.join(',')}`;
|
||||
let zipObj = {};
|
||||
const promises = [];
|
||||
for (let visit of item.VisitList) {
|
||||
if (!zipObj[`${visit.VisitName}`]) {
|
||||
zipObj[`${visit.VisitName}`] = zip.folder(visit.VisitName);
|
||||
}
|
||||
for (let study of visit.StudyList) {
|
||||
let date = study.StudyTime.split(" ")[0];
|
||||
for (let series of study.SeriesList) {
|
||||
if (
|
||||
!zipObj[
|
||||
`${visit.VisitName}${series.Modality}`
|
||||
]
|
||||
) {
|
||||
zipObj[
|
||||
`${visit.VisitName}${series.Modality}`
|
||||
] = zipObj[`${visit.VisitName}`].folder(
|
||||
`${date}_${series.Modality}`
|
||||
);
|
||||
}
|
||||
for (let instance of series.InstancePathList) {
|
||||
let obj = {
|
||||
subjectCode: item.SubjectCode,
|
||||
visitName: visit.VisitName,
|
||||
date: study.StudyTime.split(" ")[0],
|
||||
modality: series.Modality,
|
||||
instancePath: instance.Path,
|
||||
dicomName: instance.Path.split("/Dicom/")[1],
|
||||
};
|
||||
const promise = handleBatchDown(
|
||||
obj,
|
||||
zipObj[
|
||||
`${visit.VisitName}${series.Modality}`
|
||||
],
|
||||
);
|
||||
promises.push(promise);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 生成 zip 文件
|
||||
Promise.all(promises)
|
||||
.then(() => {
|
||||
// 生成zip 文件
|
||||
zip
|
||||
.generateAsync({
|
||||
type: "blob",
|
||||
compression: "DEFLATE", // STORE: 默认不压缩, DEFLATE:需要压缩
|
||||
compressionOptions: {
|
||||
level: 9, // 压缩等级 1~9 1 压缩速度最快, 9 最优压缩方式
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
saveAs(res, zipName + ".zip"); // 使用FileSaver.saveAs保存文件,文件名可自定义
|
||||
flag[`${id2}_${IsDicom}`] = false;
|
||||
zipObj = null;
|
||||
});
|
||||
})
|
||||
.catch((reason) => { flag[`${id2}_${IsDicom}`] = false; });
|
||||
};
|
||||
const handleBatchDown = async (item, zip) => {
|
||||
return new Promise((resolve) => {
|
||||
getFileData(
|
||||
Vue.prototype.OSSclientConfig.basePath + item.instancePath
|
||||
).then((res) => {
|
||||
const fileName = item.dicomName + ".dcm";
|
||||
zip.file(fileName, res.data, { binary: true });
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
};
|
||||
const getFileData = (fileUrl) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios(fileUrl, {
|
||||
method: "GET",
|
||||
responseType: "blob", // 返回的数据会被强制转为blob类型 ,转换成arraybuffer 也行
|
||||
})
|
||||
.then((res) => {
|
||||
resolve(res);
|
||||
})
|
||||
.catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
};
|
||||
export const fileDownload = (content, filename) => {
|
||||
const eleLink = document.createElement("a");
|
||||
eleLink.download = filename;
|
||||
eleLink.style.display = "none";
|
||||
const blob = new Blob([content]);
|
||||
eleLink.href = URL.createObjectURL(blob);
|
||||
document.body.appendChild(eleLink);
|
||||
eleLink.click();
|
||||
document.body.removeChild(eleLink);
|
||||
};
|
||||
let download = async (downloadUrl, downloadFileName, res) => {
|
||||
const blob = await getBlob(downloadUrl);
|
||||
flag[`${res.id2}_${res.IsDicom}`] = false;
|
||||
saveAsB(blob, downloadFileName);
|
||||
}
|
||||
|
||||
let getBlob = (url) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const xhr = new XMLHttpRequest();
|
||||
|
||||
xhr.open('GET', url, true);
|
||||
xhr.responseType = 'blob';
|
||||
xhr.onload = () => {
|
||||
if (xhr.status === 200) {
|
||||
resolve(xhr.response);
|
||||
} else {
|
||||
reject(new Error(`Request failed with status ${xhr.status}`));
|
||||
}
|
||||
};
|
||||
xhr.onerror = () => {
|
||||
reject(new Error('Request failed'));
|
||||
};
|
||||
|
||||
xhr.send();
|
||||
});
|
||||
}
|
||||
|
||||
let saveAsB = (blob, filename) => {
|
||||
const link = document.createElement('a');
|
||||
const body = document.body;
|
||||
|
||||
link.href = window.URL.createObjectURL(blob);
|
||||
link.download = filename;
|
||||
|
||||
// hide the link
|
||||
link.style.display = 'none';
|
||||
body.appendChild(link);
|
||||
|
||||
link.click();
|
||||
body.removeChild(link);
|
||||
|
||||
window.URL.revokeObjectURL(link.href);
|
||||
}
|
||||
@@ -0,0 +1,222 @@
|
||||
/*!
|
||||
* version-polling v1.2.6
|
||||
* (c) 2023 JoeshuTT
|
||||
* @license MIT
|
||||
*/
|
||||
function _defineProperty(obj, key, value) {
|
||||
key = _toPropertyKey(key);
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
function _toPrimitive(input, hint) {
|
||||
if (typeof input !== "object" || input === null) return input;
|
||||
var prim = input[Symbol.toPrimitive];
|
||||
if (prim !== undefined) {
|
||||
var res = prim.call(input, hint || "default");
|
||||
if (typeof res !== "object") return res;
|
||||
throw new TypeError("@@toPrimitive must return a primitive value.");
|
||||
}
|
||||
return (hint === "string" ? String : Number)(input);
|
||||
}
|
||||
function _toPropertyKey(arg) {
|
||||
var key = _toPrimitive(arg, "string");
|
||||
return typeof key === "symbol" ? key : String(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否有值
|
||||
* @param {*} val
|
||||
*/
|
||||
/**
|
||||
* 创建一个 Web Work 实例
|
||||
* @param func
|
||||
*/
|
||||
function createWorker(func) {
|
||||
const blob = new Blob(["(" + func.toString() + ")()"]);
|
||||
const url = window.URL.createObjectURL(blob);
|
||||
const worker = new Worker(url);
|
||||
window.URL.revokeObjectURL(url);
|
||||
return worker;
|
||||
}
|
||||
function createWorkerFunc() {
|
||||
let timerId = null;
|
||||
let options;
|
||||
self.onmessage = event => {
|
||||
let code = event.data["code"];
|
||||
options = Object.assign({}, options, event.data["data"]);
|
||||
const {
|
||||
htmlFileUrl,
|
||||
lastEtag,
|
||||
appETagKey,
|
||||
pollingInterval,
|
||||
silentPollingInterval
|
||||
} = options;
|
||||
const runReq = () => {
|
||||
fetch(htmlFileUrl, {
|
||||
method: "HEAD",
|
||||
cache: "no-cache"
|
||||
}).then(response => {
|
||||
if (Number(response.status) !== 200) {
|
||||
return;
|
||||
}
|
||||
const etag = response.headers.get("etag");
|
||||
if (lastEtag !== etag) {
|
||||
self.postMessage({
|
||||
appETagKey,
|
||||
lastEtag,
|
||||
etag
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const startPollingTask = () => {
|
||||
timerId = setInterval(runReq, pollingInterval);
|
||||
};
|
||||
const pausePollingTask = () => {
|
||||
if (timerId) {
|
||||
clearInterval(timerId);
|
||||
timerId = null;
|
||||
}
|
||||
};
|
||||
if (code === "pause") {
|
||||
pausePollingTask();
|
||||
} else {
|
||||
runReq(); // 立即执行一次
|
||||
if (!silentPollingInterval) {
|
||||
startPollingTask();
|
||||
}
|
||||
}
|
||||
};
|
||||
return self;
|
||||
}
|
||||
function closeWorker(worker) {
|
||||
worker.terminate();
|
||||
}
|
||||
|
||||
let APP_ETAG_KEY = "__APP_ETAG__";
|
||||
let myWorker;
|
||||
const defaultOptions = {
|
||||
appETagKey: APP_ETAG_KEY,
|
||||
pollingInterval: 5 * 60 * 1000,
|
||||
htmlFileUrl: `${location.origin}${location.pathname}`,
|
||||
silent: false,
|
||||
silentPollingInterval: false,
|
||||
silentPageVisibility: false,
|
||||
forceUpdate: false
|
||||
};
|
||||
let attached = false;
|
||||
/**
|
||||
* 页面隐藏时停止轮询任务,页面再度可见时在继续
|
||||
*/
|
||||
function handleVisibilityChange() {
|
||||
if (document.visibilityState === "visible") {
|
||||
myWorker.postMessage({
|
||||
code: "resume"
|
||||
});
|
||||
} else {
|
||||
myWorker.postMessage({
|
||||
code: "pause"
|
||||
});
|
||||
}
|
||||
}
|
||||
class VersionPolling {
|
||||
constructor(options) {
|
||||
_defineProperty(this, "options", void 0);
|
||||
_defineProperty(this, "appEtag", "");
|
||||
this.options = Object.assign({}, defaultOptions, options);
|
||||
this.init();
|
||||
}
|
||||
async init() {
|
||||
const {
|
||||
htmlFileUrl
|
||||
} = this.options;
|
||||
if (!htmlFileUrl) {
|
||||
throw new Error("[version-polling]: htmlFileUrl is required");
|
||||
}
|
||||
const response = await fetch(htmlFileUrl, {
|
||||
method: "HEAD",
|
||||
cache: "no-cache"
|
||||
});
|
||||
if (Number(response.status) !== 200) {
|
||||
throw new Error(`[version-polling]: status is ${response.status}`);
|
||||
}
|
||||
const etag = response.headers.get("etag");
|
||||
// eslint-disable-next-line no-eq-null
|
||||
if (etag == null) {
|
||||
throw new Error(`[version-polling]: etag is null`);
|
||||
}
|
||||
this.appEtag = etag;
|
||||
localStorage.setItem(`${this.options.appETagKey}`, etag);
|
||||
this.start();
|
||||
}
|
||||
start() {
|
||||
const {
|
||||
appETagKey,
|
||||
pollingInterval,
|
||||
htmlFileUrl,
|
||||
silent,
|
||||
silentPollingInterval,
|
||||
silentPageVisibility
|
||||
} = this.options;
|
||||
if (silent) {
|
||||
return;
|
||||
}
|
||||
myWorker = createWorker(createWorkerFunc);
|
||||
myWorker.postMessage({
|
||||
code: "start",
|
||||
data: {
|
||||
appETagKey,
|
||||
pollingInterval,
|
||||
htmlFileUrl,
|
||||
silentPollingInterval,
|
||||
lastEtag: this.appEtag
|
||||
}
|
||||
});
|
||||
myWorker.onmessage = event => {
|
||||
const {
|
||||
lastEtag,
|
||||
etag
|
||||
} = event.data;
|
||||
if (lastEtag !== etag) {
|
||||
this.stop();
|
||||
this.options.onUpdate(this);
|
||||
}
|
||||
};
|
||||
if (!silentPageVisibility) {
|
||||
if (!attached) {
|
||||
document.addEventListener("visibilitychange", handleVisibilityChange);
|
||||
attached = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
stop() {
|
||||
if (myWorker) {
|
||||
closeWorker(myWorker);
|
||||
if (attached) {
|
||||
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
||||
attached = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
onRefresh() {
|
||||
window.location.reload();
|
||||
}
|
||||
onCancel() {
|
||||
this.options.forceUpdate && this.start();
|
||||
}
|
||||
}
|
||||
function createVersionPolling(options) {
|
||||
const versionPolling = new VersionPolling(options);
|
||||
return versionPolling;
|
||||
}
|
||||
|
||||
export { VersionPolling, createVersionPolling };
|
||||
@@ -0,0 +1,2 @@
|
||||
const WHITELIST = ['/', 'researchDetail_m', '/researchForm', '/ReviewersResearch', '/login', '/error', '/resetpassword', '/recompose', '/email-recompose', '/trialStats', '/showdicom', '/imagesShare', '/audit', '/preview', '/researchLogin', '/researchLogin_m', '/blindResumeInfo', '/trialsResume', '/joinVerify', '/showNoneDicoms', '/noneDicomReading', '/clinicalData', '/readingDicoms', '/readingPage', '/visitDicomReview', '/visitNondicomReview', '/globalReview', '/adReview', '/oncologyReview', '/nonedicoms']
|
||||
export default WHITELIST
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="status-info">
|
||||
<el-form :inline="true" :model="basicInfo" class="demo-form-inline" size="small">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<!-- <el-col :span="6">
|
||||
<el-form-item :label="$t('resumeInfo:label:Pending')">
|
||||
<span v-if="statusList.Submitted" style="color:#428bca">
|
||||
<router-link
|
||||
@@ -42,7 +42,7 @@
|
||||
</span>
|
||||
<span v-else>{{ statusList.Reading }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="$t('resumeInfo:label:Vacation')">
|
||||
<span style="font-size:12px;margin-right:20px;">{{ holiday }}</span>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div v-loading="pageLoading" style="height:100%;display:flex;flex-direction: column;">
|
||||
<div style="height:50px">
|
||||
<div style="text-align:right;">
|
||||
<!-- <div style="text-align:right;">
|
||||
<el-switch
|
||||
v-model="isEnglish"
|
||||
active-text="EN"
|
||||
inactive-text="中文"
|
||||
style="margin-right:20px;"
|
||||
/>
|
||||
</div>
|
||||
</div> -->
|
||||
<div style="text-align:center;">
|
||||
<h3>{{ title }}</h3>
|
||||
</div>
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
<!-- <div class="studyDesc" style="border-bottom:1px solid #9e9e9e;" @click="closeDialog()">
|
||||
<span style="font-size:14px;color:#d0d0d0;margin:5px 0px;line-height: 25px;">返回列表</span>
|
||||
</div> -->
|
||||
<div class="studyDesc" style="line-height: 10px;">
|
||||
<div class="studyDesc">
|
||||
{{ studyTitle }}
|
||||
</div>
|
||||
<div class="studyDesc" style="line-height: 10px">
|
||||
<div class="studyDesc">
|
||||
{{ seriesCount }} Series
|
||||
</div>
|
||||
<div class="viewerSidethumbs ps" style="position: relative;">
|
||||
@@ -38,11 +38,12 @@
|
||||
</span>
|
||||
</span>-->
|
||||
<div class="viewernavitextwrapper">
|
||||
<div style="padding: 1px;">#{{ item.seriesTitle }}</div>
|
||||
<div style="padding: 1px;">#{{ item.seriesNumber }}</div>
|
||||
<div style="padding: 1px;">{{ item.description }}</div>
|
||||
<div
|
||||
v-show="item.instanceCount"
|
||||
style="padding: 1px;"
|
||||
>{{ item.instanceCount }} image
|
||||
>{{ item.modality }} : {{ item.instanceCount }} Series
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,20 +64,22 @@
|
||||
import * as dicomParser from 'dicom-parser'
|
||||
import * as cornerstone from 'cornerstone-core'
|
||||
import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
|
||||
import dicomStore from '@/utils/dicom-store'
|
||||
// import dicomStore from '@/utils/dicom-store'
|
||||
import dicomViewer from '@/components/Dicom/DicomViewer'
|
||||
import dicomPreview from '@/components/Dicom/DicomPreview'
|
||||
|
||||
var config = {
|
||||
maxWebWorkers: 4,
|
||||
startWebWorkersOnDemand: true,
|
||||
taskConfiguration: {
|
||||
decodeTask: {
|
||||
initializeCodecsOnStartup: false
|
||||
}
|
||||
}
|
||||
}
|
||||
cornerstoneWADOImageLoader.webWorkerManager.initialize(config)
|
||||
cornerstoneWADOImageLoader.external.dicomParser = dicomParser
|
||||
cornerstoneWADOImageLoader.external.cornerstone = cornerstone
|
||||
// cornerstoneWADOImageLoader.webWorkerManager.initialize({
|
||||
// webWorkerPath: './webWorker.js',
|
||||
// taskConfiguration: {
|
||||
// decodeTask: {
|
||||
// codecsPath: './dicomCodecs.js'
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
|
||||
export default {
|
||||
components: {
|
||||
dicomViewer,
|
||||
@@ -89,6 +92,7 @@ export default {
|
||||
},
|
||||
studyList: {
|
||||
type: Array,
|
||||
// eslint-disable-next-line vue/require-valid-default-prop
|
||||
default: []
|
||||
}
|
||||
},
|
||||
@@ -131,8 +135,7 @@ export default {
|
||||
})
|
||||
if (!studyItem) return
|
||||
|
||||
this.studyTitle =
|
||||
studyItem.dicomInfo.patientName || studyItem.dicomInfo.description
|
||||
this.studyTitle = studyItem.dicomInfo.description
|
||||
this.seriesCount = studyItem.seriesList.length
|
||||
var scope = this
|
||||
|
||||
@@ -155,7 +158,8 @@ export default {
|
||||
|
||||
scope.seriesList.push({
|
||||
seriesNumber: series.seriesNumber,
|
||||
seriesTitle: series.description || series.modality || '(Anonymous)',
|
||||
description: series.description,
|
||||
modality: series.modality,
|
||||
instanceCount: series.instanceList.length,
|
||||
imageIds: imageIds,
|
||||
previewImageId: imageIds[0]
|
||||
@@ -257,7 +261,7 @@ export default {
|
||||
text-align: center;
|
||||
background: rgb(88 84 83);
|
||||
color: #d0d0d0;
|
||||
padding: 2px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.ps {
|
||||
|
||||
@@ -56,33 +56,23 @@
|
||||
trigger="hover"
|
||||
popper-class="instance_frame_wrapper"
|
||||
>
|
||||
<div
|
||||
v-for="(instance, idx) in item.instanceInfoList"
|
||||
:key="instance.Id"
|
||||
class="frame_content"
|
||||
:style="{'margin-bottom':idx<item.instanceInfoList.length-1? '5px':'0px'}"
|
||||
@click="showMultiFrames(item, index, instance)"
|
||||
>
|
||||
<!-- <div>
|
||||
<img
|
||||
class="image-preview"
|
||||
:src="series.previewImageUrl"
|
||||
crossorigin="anonymous"
|
||||
alt=""
|
||||
style="width: 40px;height:40px;"
|
||||
fit="fill"
|
||||
>
|
||||
</div> -->
|
||||
<div>
|
||||
<div>{{ instance.InstanceNumber }}</div>
|
||||
<div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div>
|
||||
<div class="frame_list">
|
||||
<div
|
||||
v-for="(instance, idx) in item.instanceInfoList"
|
||||
:key="instance.Id"
|
||||
class="frame_content"
|
||||
:style="{'margin-bottom':idx<item.instanceInfoList.length-1? '5px':'0px'}"
|
||||
@click="showMultiFrames(item, index, instance)"
|
||||
>
|
||||
<div>
|
||||
<div>{{ instance.InstanceNumber }}</div>
|
||||
<div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;" />
|
||||
</el-popover>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-show="item.instanceCount" style="padding: 1px;">
|
||||
{{ item.modality }}: {{ item.instanceCount }} image
|
||||
@@ -148,14 +138,25 @@ import * as cornerstone from 'cornerstone-core'
|
||||
import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
|
||||
import dicomViewer from '@/components/Dicom/DicomViewer'
|
||||
import { getStudyInfo, getSeriesList } from '@/api/reading'
|
||||
import { getInstanceList, setSeriesStatus } from '@/api/trials'
|
||||
import { getInstanceList, getPatientSeriesList, setSeriesStatus } from '@/api/trials'
|
||||
|
||||
import requestPoolManager from '@/utils/request-pool'
|
||||
import store from '@/store'
|
||||
import { changeURLStatic } from '@/utils/history.js'
|
||||
var config = {
|
||||
maxWebWorkers: 4,
|
||||
startWebWorkersOnDemand: true,
|
||||
taskConfiguration: {
|
||||
decodeTask: {
|
||||
initializeCodecsOnStartup: false
|
||||
}
|
||||
}
|
||||
}
|
||||
cornerstoneWADOImageLoader.webWorkerManager.initialize(config)
|
||||
cornerstoneWADOImageLoader.external.dicomParser = dicomParser
|
||||
cornerstoneWADOImageLoader.external.cornerstone = cornerstone
|
||||
const maximumSizeInBytes = 1024 * 1024 * 1024 // 1 GB
|
||||
const maximumSizeInBytes = 1024 * 1024 * 1024 * 6
|
||||
cornerstone.imageCache.setMaximumSizeBytes(maximumSizeInBytes)
|
||||
export default {
|
||||
components: {
|
||||
'dicom-viewer': dicomViewer
|
||||
@@ -192,7 +193,8 @@ export default {
|
||||
loading: false,
|
||||
imageList: [],
|
||||
showSeriesList: [],
|
||||
currentLoadIns: []
|
||||
currentLoadIns: [],
|
||||
isFromCRCUpload: false
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
@@ -207,6 +209,7 @@ export default {
|
||||
changeURLStatic('TokenKey', '')
|
||||
}
|
||||
this.studyId = this.$router.currentRoute.query.studyId
|
||||
this.isFromCRCUpload = !!this.$router.currentRoute.query.isFromCRCUpload
|
||||
if (this.type === 'Series') {
|
||||
// this.initStudy()
|
||||
this.showDelete = parseInt(this.$router.currentRoute.query.showDelete)
|
||||
@@ -216,6 +219,8 @@ export default {
|
||||
this.loadStudy()
|
||||
} else if (this.type === 'Share') {
|
||||
this.loadStudy()
|
||||
} else if (this.type === 'Patient') {
|
||||
this.loadPatientStudy()
|
||||
}
|
||||
cornerstone.events.addEventListener('cornerstoneimageloadprogress', this.cornerstoneimageloadprogress)
|
||||
window.addEventListener('beforeunload', e => {
|
||||
@@ -231,22 +236,22 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
loadStudy() {
|
||||
var scope = this
|
||||
getStudyInfo(scope.studyId).then(data => {
|
||||
if (data.IsSuccess) {
|
||||
scope.studyCode = data.Result.StudyCode
|
||||
scope.modality = data.Result.Modalities
|
||||
scope.seriesCount = data.Result.SeriesCount
|
||||
scope.description = data.Result.Description
|
||||
var url = `/series/list/${scope.studyId}`
|
||||
scope.getSeriesList(url)
|
||||
async loadStudy() {
|
||||
const data = await getStudyInfo(this.studyId)
|
||||
if (data.IsSuccess) {
|
||||
if (data.Result) {
|
||||
this.studyCode = data.Result.StudyCode
|
||||
this.modality = data.Result.Modalities
|
||||
this.seriesCount = data.Result.SeriesCount
|
||||
this.description = data.Result.Description
|
||||
}
|
||||
})
|
||||
const url = `/series/list/${this.studyId}`
|
||||
this.getSeriesList(url)
|
||||
}
|
||||
},
|
||||
getSeriesList(url) {
|
||||
var scope = this
|
||||
getSeriesList(url).then(data => {
|
||||
async loadPatientStudy() {
|
||||
try {
|
||||
let data = await getPatientSeriesList(this.studyId);
|
||||
if (data.IsSuccess) {
|
||||
const { Result } = data
|
||||
var seriesList = []
|
||||
@@ -255,15 +260,18 @@ export default {
|
||||
item.InstanceInfoList.forEach(i => {
|
||||
if (i.NumberOfFrames && i.NumberOfFrames > 1) {
|
||||
for (let j = 0; j < i.NumberOfFrames; j++) {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&seriesIndex=${index}`)
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&seriesIndex=${index}`)
|
||||
}
|
||||
i.ImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=0&instanceId=${i.Id}&seriesIndex=${index}`
|
||||
} else {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&seriesIndex=${index}`)
|
||||
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&seriesIndex=${index}`
|
||||
imageIds.push(imageId)
|
||||
i.ImageId = imageId
|
||||
}
|
||||
})
|
||||
var subjectVisitId = scope.$router.currentRoute.query.subjectVisitId
|
||||
var studyId = scope.$router.currentRoute.query.studyId
|
||||
var trialId = scope.$router.currentRoute.query.trialId
|
||||
var subjectVisitId = this.$router.currentRoute.query.subjectVisitId
|
||||
var studyId = this.$router.currentRoute.query.studyId
|
||||
var trialId = this.$router.currentRoute.query.trialId
|
||||
seriesList.push({
|
||||
trialId,
|
||||
subjectVisitId,
|
||||
@@ -278,38 +286,99 @@ export default {
|
||||
description: item.Description,
|
||||
isReading: item.IsReading,
|
||||
isDeleted: item.IsDeleted,
|
||||
previewImageUrl: item.ImageResizePath ? scope.OSSclientConfig.basePath + item.ImageResizePath : `/api/series/preview/${item.Id}`,
|
||||
previewImageUrl: item.ImageResizePath ? this.OSSclientConfig.basePath + item.ImageResizePath : `/api/series/preview/${item.Id}`,
|
||||
instanceCount: item.InstanceCount,
|
||||
prefetchInstanceCount: 0,
|
||||
hasLabel: item.HasLabel,
|
||||
keySeries: item.KeySeries,
|
||||
tpCode: scope.tpCode,
|
||||
tpCode: this.tpCode,
|
||||
loadStatus: false,
|
||||
imageloadedArr: [],
|
||||
isExistMutiFrames: item.IsExistMutiFrames
|
||||
})
|
||||
})
|
||||
scope.seriesList = seriesList
|
||||
if (scope.seriesList.length > 0) {
|
||||
this.seriesList = seriesList
|
||||
if (this.seriesList.length > 0) {
|
||||
this.loadAllImages()
|
||||
scope.$refs.dicomViewer.loadImageStack(scope.seriesList[0], scope.labels[scope.tpCode])
|
||||
scope.firstInstanceId = scope.seriesList[0].imageIds[0]
|
||||
this.$refs.dicomViewer.loadImageStack(this.seriesList[0], this.labels[this.tpCode])
|
||||
this.firstInstanceId = this.seriesList[0].imageIds[0]
|
||||
}
|
||||
}
|
||||
})
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
initSeries() {
|
||||
var scope = this
|
||||
this.studyCode = this.$router.currentRoute.query.studyCode
|
||||
this.modality = this.$router.currentRoute.query.modality
|
||||
this.seriesCount = 1
|
||||
this.description = this.$router.currentRoute.query.description
|
||||
var seriesId = this.$router.currentRoute.query.seriesId
|
||||
var seriesNumber = this.$router.currentRoute.query.seriesNumber
|
||||
var subjectVisitId = this.$router.currentRoute.query.subjectVisitId
|
||||
var studyId = this.$router.currentRoute.query.studyId
|
||||
var trialId = this.$router.currentRoute.query.trialId
|
||||
getInstanceList(seriesId).then(res => {
|
||||
async getSeriesList(url) {
|
||||
try {
|
||||
const data = await getSeriesList(url)
|
||||
if (data.IsSuccess) {
|
||||
const { Result } = data
|
||||
var seriesList = []
|
||||
Result.forEach((item, index) => {
|
||||
const imageIds = []
|
||||
item.InstanceInfoList.forEach(i => {
|
||||
if (i.NumberOfFrames && i.NumberOfFrames > 1) {
|
||||
for (let j = 0; j < i.NumberOfFrames; j++) {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&seriesIndex=${index}`)
|
||||
}
|
||||
i.ImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=0&instanceId=${i.Id}&seriesIndex=${index}`
|
||||
} else {
|
||||
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&seriesIndex=${index}`
|
||||
imageIds.push(imageId)
|
||||
i.ImageId = imageId
|
||||
}
|
||||
})
|
||||
var subjectVisitId = this.$router.currentRoute.query.subjectVisitId
|
||||
var studyId = this.$router.currentRoute.query.studyId
|
||||
var trialId = this.$router.currentRoute.query.trialId
|
||||
seriesList.push({
|
||||
trialId,
|
||||
subjectVisitId,
|
||||
studyId,
|
||||
imageIds: imageIds,
|
||||
instanceInfoList: item.InstanceInfoList,
|
||||
seriesId: item.Id,
|
||||
seriesUid: item.SeriesInstanceUid,
|
||||
seriesNumber: item.SeriesNumber,
|
||||
sliceThickness: item.SliceThickness,
|
||||
modality: item.Modality,
|
||||
description: item.Description,
|
||||
isReading: item.IsReading,
|
||||
isDeleted: item.IsDeleted,
|
||||
previewImageUrl: item.ImageResizePath ? this.OSSclientConfig.basePath + item.ImageResizePath : `/api/series/preview/${item.Id}`,
|
||||
instanceCount: item.InstanceCount,
|
||||
prefetchInstanceCount: 0,
|
||||
hasLabel: item.HasLabel,
|
||||
keySeries: item.KeySeries,
|
||||
tpCode: this.tpCode,
|
||||
loadStatus: false,
|
||||
imageloadedArr: [],
|
||||
isExistMutiFrames: item.IsExistMutiFrames
|
||||
})
|
||||
})
|
||||
this.seriesList = seriesList
|
||||
if (this.seriesList.length > 0) {
|
||||
this.loadAllImages()
|
||||
this.$refs.dicomViewer.loadImageStack(this.seriesList[0], this.labels[this.tpCode])
|
||||
this.firstInstanceId = this.seriesList[0].imageIds[0]
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async initSeries() {
|
||||
try {
|
||||
this.studyCode = this.$router.currentRoute.query.studyCode
|
||||
this.modality = this.$router.currentRoute.query.modality
|
||||
this.seriesCount = 1
|
||||
this.description = this.$router.currentRoute.query.description
|
||||
var seriesId = this.$router.currentRoute.query.seriesId
|
||||
var seriesNumber = this.$router.currentRoute.query.seriesNumber
|
||||
var subjectVisitId = this.$router.currentRoute.query.subjectVisitId
|
||||
var studyId = this.$router.currentRoute.query.studyId
|
||||
var trialId = this.$router.currentRoute.query.trialId
|
||||
const res = await getInstanceList(seriesId)
|
||||
if (!res.Result || (res.Result && res.Result.length === 0)) return
|
||||
var seriesInstanceUid = res.Result[0].SeriesInstanceUid
|
||||
var sliceThickness = res.Result[0].SliceThickness
|
||||
@@ -320,15 +389,19 @@ export default {
|
||||
let isExistMutiFrames = false
|
||||
const instanceInfoList = []
|
||||
res.Result.forEach(instance => {
|
||||
let imageId = ''
|
||||
if (instance.NumberOfFrames > 1) {
|
||||
for (let i = 0; i < instance.NumberOfFrames; i++) {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?frame=${i}&instanceId=${instance.Id}&seriesIndex=0`)
|
||||
}
|
||||
isExistMutiFrames = true
|
||||
imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?frame=0&instanceId=${instance.Id}&seriesIndex=0`
|
||||
} else {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&seriesIndex=0`)
|
||||
const path = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${instance.Path}?instanceId=${instance.Id}&seriesIndex=0`
|
||||
imageIds.push(path)
|
||||
imageId = path
|
||||
}
|
||||
instanceInfoList.push({ Id: instance.Id, InstanceNumber: instance.InstanceNumber, NumberOfFrames: instance.NumberOfFrames, Path: instance.Path })
|
||||
instanceInfoList.push({ Id: instance.Id, InstanceNumber: instance.InstanceNumber, NumberOfFrames: instance.NumberOfFrames, Path: instance.Path, ImageId: imageId })
|
||||
})
|
||||
seriesList.push({
|
||||
trialId,
|
||||
@@ -344,7 +417,7 @@ export default {
|
||||
description: this.description,
|
||||
isReading,
|
||||
isDeleted,
|
||||
previewImageUrl: res.OtherInfo.ImageResizePath ? scope.OSSclientConfig.basePath + res.OtherInfo.ImageResizePath : res.OtherInfo.ImageResizePath,
|
||||
previewImageUrl: res.OtherInfo.ImageResizePath ? this.OSSclientConfig.basePath + res.OtherInfo.ImageResizePath : res.OtherInfo.ImageResizePath,
|
||||
instanceCount: res.Result.length,
|
||||
prefetchInstanceCount: 0,
|
||||
loadStatus: false,
|
||||
@@ -359,7 +432,9 @@ export default {
|
||||
this.firstInstanceId = this.seriesList[0].imageIds[0]
|
||||
})
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
showSeriesImage(e, seriesIndex, series) {
|
||||
// if (seriesIndex === this.currentSeriesIndex) return
|
||||
@@ -372,7 +447,39 @@ export default {
|
||||
this.currentSeriesIndex = seriesIndex
|
||||
this.$refs.dicomViewer.loadImageStack(this.seriesList[seriesIndex])
|
||||
if (!series.loadStatus) {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
series.isLoading = true
|
||||
var isAddToTakPool = false
|
||||
if (this.showSeriesList.includes(`0_${seriesIndex}`)) {
|
||||
isAddToTakPool = true
|
||||
} else {
|
||||
this.showSeriesList.push(`0_${seriesIndex}`)
|
||||
}
|
||||
if (!isAddToTakPool) {
|
||||
var priority = parseInt(new Date().getTime())
|
||||
// var images = []
|
||||
// if (series.isExistMutiFrames) {
|
||||
// images = series.imageIds.filter(i => i.includes('?frame=0'))
|
||||
// } else {
|
||||
// images = series.imageIds
|
||||
// }
|
||||
// images.map(imageId => {
|
||||
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
|
||||
// })
|
||||
if (series.isExistMutiFrames) {
|
||||
series.instanceInfoList.map(image => {
|
||||
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
} else {
|
||||
series.imageIds.map(imageId => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
}
|
||||
if (this.imageList.length > 0) {
|
||||
this.loopLoad()
|
||||
}
|
||||
} else {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
}
|
||||
}
|
||||
},
|
||||
showMultiFrames(series, seriesIndex, instanceInfo) {
|
||||
@@ -403,7 +510,39 @@ export default {
|
||||
}
|
||||
this.$refs.dicomViewer.loadImageStack(seriesInfo)
|
||||
if (!series.loadStatus) {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
var isAddToTakPool = false
|
||||
if (this.showSeriesList.includes(`0_${seriesIndex}`)) {
|
||||
isAddToTakPool = true
|
||||
} else {
|
||||
this.showSeriesList.push(`0_${seriesIndex}`)
|
||||
}
|
||||
if (!isAddToTakPool) {
|
||||
var priority = parseInt(new Date().getTime())
|
||||
// if (series.isExistMutiFrames) {
|
||||
// series.instanceInfoList.map(image => {
|
||||
// this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
|
||||
// })
|
||||
// } else {
|
||||
// series.imageIds.map((imageId) => {
|
||||
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
|
||||
// })
|
||||
// }
|
||||
if (series.isExistMutiFrames) {
|
||||
series.instanceInfoList.map(image => {
|
||||
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
} else {
|
||||
series.imageIds.map(imageId => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
}
|
||||
|
||||
if (this.imageList.length > 0) {
|
||||
this.loopLoad()
|
||||
}
|
||||
} else {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
}
|
||||
}
|
||||
},
|
||||
initStudy() {
|
||||
@@ -415,13 +554,6 @@ export default {
|
||||
const seriesInfo = JSON.parse(this.$router.currentRoute.query.series)
|
||||
var seriesList = []
|
||||
const imageIds = []
|
||||
// const scope = this
|
||||
// seriesInfo.InstanceList.forEach(function(item) {
|
||||
// imageIds.push(`wadouri:/api/instance/content/${item}`)
|
||||
// })
|
||||
// seriesInfo.InstanceList.forEach((id) => {
|
||||
// imageIds.push(`wadouri:http://123.56.94.154:7000/instance/content/${id}`)
|
||||
// })
|
||||
seriesInfo.InstancePathList.forEach((path) => {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${path}`)
|
||||
})
|
||||
@@ -451,22 +583,25 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
deleteSeries() {
|
||||
async deleteSeries() {
|
||||
this.loading = true
|
||||
var subjectVisitId = this.$router.currentRoute.query.subjectVisitId
|
||||
var studyId = this.$router.currentRoute.query.studyId
|
||||
var seriesId = this.$router.currentRoute.query.seriesId
|
||||
// trialId, subjectVisitId, studyId, seriesId, state
|
||||
setSeriesStatus(this.trialId, subjectVisitId, studyId, seriesId, 5).then(res => {
|
||||
try {
|
||||
const res = await setSeriesStatus(this.trialId, subjectVisitId, studyId, seriesId, 5)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
changeReadingStatus(callback, data) {
|
||||
async changeReadingStatus(callback, data) {
|
||||
let statusStr = ''
|
||||
if (callback) {
|
||||
statusStr = this.$t('trials:audit:label:setSeriesReading')
|
||||
@@ -477,24 +612,30 @@ export default {
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !data.isReading))
|
||||
this.$confirm(message, {
|
||||
distinguishCancelAndClose: true,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const state = data.isReading ? 1 : 2
|
||||
this.loading = true
|
||||
|
||||
setSeriesStatus(data.trialId, data.subjectVisitId, data.studyId, data.seriesId, state).then(res => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
data.isReading = !data.isReading
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
}).catch(() => {})
|
||||
const confirm = await this.$confirm(
|
||||
message,
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
const state = data.isReading ? 1 : 2
|
||||
this.loading = true
|
||||
try {
|
||||
const res = await setSeriesStatus(data.trialId, data.subjectVisitId, data.studyId, data.seriesId, state)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
data.isReading = !data.isReading
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
changeDeleteStatus(callback, data) {
|
||||
async changeDeleteStatus(callback, data) {
|
||||
let statusStr = ''
|
||||
if (callback) {
|
||||
statusStr = this.$t('trials:audit:label:setSeriesDeleted')
|
||||
@@ -505,46 +646,51 @@ export default {
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !data.isDeleted))
|
||||
this.$confirm(message, {
|
||||
distinguishCancelAndClose: true,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const state = data.isDeleted ? 5 : 4
|
||||
this.loading = true
|
||||
// var trialId = this.$router.currentRoute.query.trialId
|
||||
// var subjectVisitId = this.$router.currentRoute.query.subjectVisitId
|
||||
// var studyId = this.$router.currentRoute.query.studyId
|
||||
// var seriesId = this.$router.currentRoute.query.seriesId
|
||||
setSeriesStatus(data.trialId, data.subjectVisitId, data.studyId, data.seriesId, state).then(res => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
data.isDeleted = !data.isDeleted
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
}).catch(() => {})
|
||||
const confirm = await this.$confirm(
|
||||
message,
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
const state = data.isDeleted ? 5 : 4
|
||||
this.loading = true
|
||||
try {
|
||||
const res = await setSeriesStatus(data.trialId, data.subjectVisitId, data.studyId, data.seriesId, state)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
data.isDeleted = !data.isDeleted
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
loadAllImages() {
|
||||
const seriesIndex = this.seriesList.findIndex(i => i.loadStatus === false)
|
||||
if (seriesIndex === -1) return
|
||||
const series = this.seriesList[seriesIndex]
|
||||
var priority = new Date().getTime()
|
||||
for (let i = 0; i < series.imageIds.length; i++) {
|
||||
const imageId = series.imageIds[i]
|
||||
if (series.isExistMutiFrames) {
|
||||
const params = this.getInstanceInfo(imageId)
|
||||
if (params.frame && params.frame > 0) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
var p = null
|
||||
if (this.firstInstanceId === imageId) {
|
||||
p = priority * 100
|
||||
} else {
|
||||
p = priority - 1
|
||||
}
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, seriesIndex: seriesIndex, priority: p })
|
||||
// var images = []
|
||||
// if (series.isExistMutiFrames) {
|
||||
// images = series.imageIds.filter(i => i.includes('?frame=0'))
|
||||
// } else {
|
||||
// images = series.imageIds
|
||||
// }
|
||||
// images.map(imageId => {
|
||||
// this.imageList.push({ imageId: imageId, seriesId: series.seriesId, studyIndex: 0, seriesIndex: seriesIndex, priority })
|
||||
// })
|
||||
if (series.isExistMutiFrames) {
|
||||
series.instanceInfoList.map(image => {
|
||||
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
} else {
|
||||
series.imageIds.map(imageId => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
}
|
||||
if (this.imageList.length > 0) {
|
||||
this.loopLoad()
|
||||
@@ -569,60 +715,6 @@ export default {
|
||||
this.imageList = []
|
||||
}
|
||||
},
|
||||
load(imageId, seriesId, priority = 999) {
|
||||
return new Promise((resolve, reject) => {
|
||||
requestPoolManager.loadAndCacheImagePlus(imageId, seriesId, priority).then(res => {
|
||||
if (!res) return
|
||||
this.imageLoaded(imageId, res.data.string('x0020000e'))
|
||||
resolve(res)
|
||||
}).catch(e => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
},
|
||||
imageLoaded(image, seriesUid) {
|
||||
var seriesIndex = image.seriesIndex
|
||||
if (seriesIndex < 0) return
|
||||
if (this.seriesList[seriesIndex].imageloadedArr.indexOf(image.imageId) < 0) {
|
||||
++this.seriesList[seriesIndex].prefetchInstanceCount
|
||||
this.seriesList[seriesIndex].imageloadedArr.push(image.imageId)
|
||||
|
||||
if (this.seriesList[seriesIndex].prefetchInstanceCount >= this.seriesList[seriesIndex].instanceCount) {
|
||||
this.seriesList[seriesIndex].prefetchInstanceCount = this.seriesList[seriesIndex].instanceCount
|
||||
// 设置当前序列状态为已下载完成
|
||||
this.seriesList[seriesIndex].loadStatus = true
|
||||
// if (!this.isLoadedAll) {
|
||||
// this.loadAllImages()
|
||||
// }
|
||||
}
|
||||
}
|
||||
},
|
||||
imageLoaded2(imageId, seriesUid) {
|
||||
var seriesIndex = -1
|
||||
for (let i = 0; i < this.seriesList.length; ++i) {
|
||||
if (this.seriesList[i].seriesUid === seriesUid) {
|
||||
seriesIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
if (seriesIndex < 0) return
|
||||
|
||||
const imageIdIndex = this.seriesList[seriesIndex].imageIds.indexOf(imageId)
|
||||
if (imageIdIndex < 0) return
|
||||
if (this.seriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
|
||||
++this.seriesList[seriesIndex].prefetchInstanceCount
|
||||
this.seriesList[seriesIndex].imageloadedArr.push(imageId)
|
||||
|
||||
if (this.seriesList[seriesIndex].prefetchInstanceCount >= this.seriesList[seriesIndex].instanceCount) {
|
||||
this.seriesList[seriesIndex].prefetchInstanceCount = this.seriesList[seriesIndex].instanceCount
|
||||
// 设置当前序列状态为已下载完成
|
||||
this.seriesList[seriesIndex].loadStatus = true
|
||||
// if (!this.isLoadedAll) {
|
||||
// this.loadAllImages()
|
||||
// }
|
||||
}
|
||||
}
|
||||
},
|
||||
datasetsCacheChanged(e) {
|
||||
// const uri = e.detail.uri
|
||||
const cacheInfo = e.detail.cacheInfo
|
||||
@@ -658,7 +750,7 @@ export default {
|
||||
const seriesIndex = params.seriesIndex
|
||||
var prefetchInstanceCount = this.seriesList[seriesIndex].prefetchInstanceCount
|
||||
var instanceCount = this.seriesList[seriesIndex].instanceCount
|
||||
if (this.seriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
|
||||
if (this.seriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0 && this.seriesList[seriesIndex].imageloadedArr.length < this.seriesList[seriesIndex].instanceCount) {
|
||||
const i = this.currentLoadIns.findIndex(i => i.imageId === imageId)
|
||||
if (i > -1) {
|
||||
prefetchInstanceCount = prefetchInstanceCount - this.currentLoadIns[i].percentComplete + percentComplete
|
||||
@@ -681,52 +773,9 @@ export default {
|
||||
this.seriesList[seriesIndex].prefetchInstanceCount = instanceCount * 100
|
||||
// 设置当前序列状态为已下载完成
|
||||
this.seriesList[seriesIndex].loadStatus = true
|
||||
this.loadAllImages()
|
||||
}
|
||||
}
|
||||
},
|
||||
cornerstoneImageLoaded(e) {
|
||||
if (this.firstInstanceId === e.detail.image.imageId && !this.isStartLoad) {
|
||||
// 初始化图像加载完成时,自动下载
|
||||
this.loadAllImages()
|
||||
this.isStartLoad = true
|
||||
// requestPoolManager.executeTask()
|
||||
}
|
||||
const uri = e.detail.image.sharedCacheKey
|
||||
const index = this.cachedImages.findIndex(item => item.uri === uri)
|
||||
if (index === -1) {
|
||||
this.cachedImages.push({ uri: uri, timestamp: new Date().getTime() })
|
||||
} else {
|
||||
this.cachedImages[index].timestamp = new Date().getTime()
|
||||
}
|
||||
// loadedDataSets[uri].dataSet.byteArray.length
|
||||
// console.log(this.cachedImages.length)
|
||||
// console.log(cornerstoneWADOImageLoader.wadouri.dataSetCacheManager.getInfo().cacheSizeInBytes)
|
||||
// const imageId = e.detail.image.imageId
|
||||
var imageId = e.detail.image.imageId
|
||||
var seriesUid = e.detail.image.data.string('x0020000e')
|
||||
var seriesIndex = -1
|
||||
for (let i = 0; i < this.seriesList.length; ++i) {
|
||||
if (this.seriesList[i].seriesUid === seriesUid) {
|
||||
seriesIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
if (seriesIndex < 0) return
|
||||
|
||||
const imageIdIndex = this.seriesList[seriesIndex].imageIds.indexOf(imageId)
|
||||
if (imageIdIndex < 0) return
|
||||
if (this.seriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
|
||||
++this.seriesList[seriesIndex].prefetchInstanceCount
|
||||
this.seriesList[seriesIndex].imageloadedArr.push(imageId)
|
||||
|
||||
if (this.seriesList[seriesIndex].prefetchInstanceCount >= this.seriesList[seriesIndex].instanceCount) {
|
||||
this.seriesList[seriesIndex].prefetchInstanceCount = this.seriesList[seriesIndex].instanceCount
|
||||
// 设置当前序列状态为已下载完成
|
||||
this.seriesList[seriesIndex].loadStatus = true
|
||||
// if (!this.isLoadedAll) {
|
||||
// this.loadAllImages()
|
||||
// }
|
||||
if (!this.isFromCRCUpload) {
|
||||
this.loadAllImages()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -884,6 +933,18 @@ export default {
|
||||
border: 1px solid #2c2c2c;
|
||||
padding: 5px;
|
||||
}
|
||||
.frame_list{
|
||||
max-height: 500px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.instance_frame_wrapper ::-webkit-scrollbar {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
}
|
||||
.instance_frame_wrapper ::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px;
|
||||
background: #d0d0d0;
|
||||
}
|
||||
.frame_content{
|
||||
height: 50px;
|
||||
padding: 5px;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="sidePanelThumbs">
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleTabClick">
|
||||
<el-tab-pane :label="$t('trials:dicom-show:currentVisit')" name="current-study">
|
||||
<div class="text-desc" style="background:rgb(55 55 55);">
|
||||
<div v-if="visitInfo" class="text-desc" style="background:rgb(55 55 55);">
|
||||
{{ visitInfo }}
|
||||
</div>
|
||||
<div class="viewerSidethumbs ps" style="position: relative;">
|
||||
@@ -171,7 +171,7 @@
|
||||
class="viewernavigatorwrapper"
|
||||
style="position: relative;border:1px solid #434343;"
|
||||
series-type="relation"
|
||||
@click="showRelationSeriesImage($event,seriesItem,index)"
|
||||
@click="showRelationSeriesImage($event,seriesItem,studyIndex,index)"
|
||||
>
|
||||
<!-- <el-image
|
||||
class="image-preview"
|
||||
@@ -200,28 +200,20 @@
|
||||
trigger="hover"
|
||||
popper-class="instance_frame_wrapper"
|
||||
>
|
||||
<div
|
||||
v-for="(instance, idx) in seriesItem.instanceInfoList"
|
||||
:key="instance.Id"
|
||||
class="frame_content"
|
||||
:style="{'margin-bottom':idx<seriesItem.instanceInfoList.length-1? '5px':'0px'}"
|
||||
@click="showMultiFrames(studyIndex,seriesItem, index, instance)"
|
||||
>
|
||||
<!-- <div>
|
||||
<img
|
||||
class="image-preview"
|
||||
:src="series.previewImageUrl"
|
||||
crossorigin="anonymous"
|
||||
alt=""
|
||||
style="width: 40px;height:40px;"
|
||||
fit="fill"
|
||||
>
|
||||
</div> -->
|
||||
<div>
|
||||
<div>{{ instance.InstanceNumber }}</div>
|
||||
<div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div>
|
||||
</div>
|
||||
<div class="frame_list">
|
||||
<div
|
||||
v-for="(instance, idx) in seriesItem.instanceInfoList"
|
||||
:key="instance.Id"
|
||||
class="frame_content"
|
||||
:style="{'margin-bottom':idx<seriesItem.instanceInfoList.length-1? '5px':'0px'}"
|
||||
@click="showMultiFrames(studyIndex,seriesItem, index, instance)"
|
||||
>
|
||||
<div>
|
||||
<div>{{ instance.InstanceNumber }}</div>
|
||||
<div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;" />
|
||||
</el-popover>
|
||||
@@ -269,12 +261,25 @@ import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
|
||||
import dicomViewer from '@/components/Dicom/DicomViewer'
|
||||
import { getVisitStudyList, getAllRelationStudyList, getSeriesList } from '@/api/reading'
|
||||
import { setSeriesStatus } from '@/api/trials'
|
||||
import { getTaskUploadedDicomStudyList } from '@/api/reading'
|
||||
import requestPoolManager from '@/utils/request-pool'
|
||||
import store from '@/store'
|
||||
import { changeURLStatic } from '@/utils/history.js'
|
||||
// import * as cornerstoneTools from 'cornerstone-tools'
|
||||
var config = {
|
||||
maxWebWorkers: 4,
|
||||
startWebWorkersOnDemand: true,
|
||||
taskConfiguration: {
|
||||
decodeTask: {
|
||||
initializeCodecsOnStartup: false
|
||||
}
|
||||
}
|
||||
}
|
||||
cornerstoneWADOImageLoader.webWorkerManager.initialize(config)
|
||||
cornerstoneWADOImageLoader.external.dicomParser = dicomParser
|
||||
cornerstoneWADOImageLoader.external.cornerstone = cornerstone
|
||||
const maximumSizeInBytes = 1024 * 1024 * 1024 // 1 GB
|
||||
const maximumSizeInBytes = 1024 * 1024 * 1024 * 6
|
||||
cornerstone.imageCache.setMaximumSizeBytes(maximumSizeInBytes)
|
||||
export default {
|
||||
name: 'DicomsOfVisit',
|
||||
components: {
|
||||
@@ -296,7 +301,9 @@ export default {
|
||||
activeNames: [],
|
||||
relationActiveName: [],
|
||||
showSeriesList: [],
|
||||
currentLoadIns: []
|
||||
currentLoadIns: [],
|
||||
isFromCRCUpload: false,
|
||||
visitTaskId: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -312,6 +319,8 @@ export default {
|
||||
this.visitInfo = this.$router.currentRoute.query.visitInfo
|
||||
this.isReading = this.$router.currentRoute.query.isReading ? this.$router.currentRoute.query.isReading * 1 : 0
|
||||
this.showDelete = parseInt(this.$router.currentRoute.query.showDelete)
|
||||
this.isFromCRCUpload = !!this.$router.currentRoute.query.isFromCRCUpload
|
||||
this.visitTaskId = this.$router.currentRoute.query.visitTaskId
|
||||
// cornerstone.events.addEventListener('cornerstoneimageloaded', this.cornerstoneImageLoaded)
|
||||
this.getStudiesInfo()
|
||||
cornerstone.events.addEventListener('cornerstoneimageloadprogress', this.cornerstoneimageloadprogress)
|
||||
@@ -322,72 +331,103 @@ export default {
|
||||
},
|
||||
beforeDestroy() {
|
||||
requestPoolManager.stopTaskTimer()
|
||||
window.removeEventListener('beforeunload', e => {
|
||||
cornerstone.imageCache.purgeCache()
|
||||
window.removeEventListener('beforeunload', e => {
|
||||
cornerstone.imageCache.purgeCache()
|
||||
requestPoolManager.resetRequestPool()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 获取某个访视下所有的检查信息
|
||||
getStudiesInfo() {
|
||||
async getStudiesInfo() {
|
||||
this.studyList = []
|
||||
getVisitStudyList(this.trialId, this.subjectVisitId, this.isReading).then(res => {
|
||||
res.Result.forEach((study,studyIndex) => {
|
||||
const data = {}
|
||||
data.StudyId = study.StudyId
|
||||
data.StudyCode = study.StudyCode
|
||||
data.Modalities = study.Modalities
|
||||
data.SeriesCount = study.SeriesCount
|
||||
data.InstanceCount = study.InstanceCount
|
||||
data.InstanceCount = study.InstanceCount
|
||||
data.PreviewImageCount = 0
|
||||
var seriesList = []
|
||||
study.SeriesList.forEach((series,seriesIndex) => {
|
||||
const imageIds = []
|
||||
series.InstanceInfoList.forEach(i => {
|
||||
if (i.NumberOfFrames && i.NumberOfFrames > 1) {
|
||||
for (let j = 0; j < i.NumberOfFrames; j++) {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`)
|
||||
}
|
||||
} else {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`)
|
||||
}
|
||||
})
|
||||
seriesList.push({
|
||||
trialId: this.trialId,
|
||||
subjectVisitId: this.subjectVisitId,
|
||||
studyId: study.StudyId,
|
||||
imageIds: imageIds,
|
||||
instanceInfoList: series.InstanceInfoList,
|
||||
seriesId: series.Id,
|
||||
seriesUid: series.SeriesInstanceUid,
|
||||
seriesNumber: series.SeriesNumber,
|
||||
sliceThickness: series.SliceThickness,
|
||||
modality: series.Modality,
|
||||
description: series.Description,
|
||||
isReading: series.IsReading,
|
||||
isDeleted: series.IsDeleted,
|
||||
previewImageUrl: series.ImageResizePath ? this.OSSclientConfig.basePath + series.ImageResizePath : `/api/series/preview/${series.Id}`,
|
||||
instanceCount: series.InstanceCount,
|
||||
prefetchInstanceCount: 0,
|
||||
loadStatus: false,
|
||||
imageloadedArr: [],
|
||||
isExistMutiFrames: series.IsExistMutiFrames
|
||||
})
|
||||
})
|
||||
data.SeriesList = seriesList
|
||||
this.studyList.push(data)
|
||||
})
|
||||
if (this.studyList.length > 0) {
|
||||
this.$refs.dicomViewer.loadImageStack(this.studyList[0].SeriesList[0])
|
||||
const imageId = this.studyList[0].SeriesList[0].imageIds[0]
|
||||
let instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
instanceId = instanceId.split('.')[0]
|
||||
this.firstInstanceId = instanceId
|
||||
this.activeNames = [this.studyList[0].StudyId]
|
||||
this.loadAllImages()
|
||||
try {
|
||||
let res = null
|
||||
if (this.visitTaskId) {
|
||||
res = await getTaskUploadedDicomStudyList({ visitTaskId: this.visitTaskId })
|
||||
} else {
|
||||
res = await getVisitStudyList(this.trialId, this.subjectVisitId, this.isReading)
|
||||
}
|
||||
})
|
||||
if (res.IsSuccess) {
|
||||
res.Result.forEach((study, studyIndex) => {
|
||||
const data = {}
|
||||
data.StudyId = study.StudyId
|
||||
data.StudyCode = study.StudyCode
|
||||
data.Modalities = study.Modalities
|
||||
data.SeriesCount = study.SeriesCount
|
||||
data.InstanceCount = study.InstanceCount
|
||||
data.InstanceCount = study.InstanceCount
|
||||
data.PreviewImageCount = 0
|
||||
var seriesList = []
|
||||
study.SeriesList.forEach((series, seriesIndex) => {
|
||||
const imageIds = []
|
||||
series.InstanceInfoList.forEach(i => {
|
||||
if (i.NumberOfFrames && i.NumberOfFrames > 1) {
|
||||
for (let j = 0; j < i.NumberOfFrames; j++) {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`)
|
||||
}
|
||||
i.ImageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?frame=0&instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`
|
||||
// imageIds.push(`${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}`)
|
||||
} else {
|
||||
const imageId = `wadouri:${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&idx=${studyIndex}|${seriesIndex}`
|
||||
imageIds.push(imageId)
|
||||
i.ImageId = imageId
|
||||
// imageIds.push(`${localStorage.getItem('location') !== 'USA' ? this.OSSclientConfig.basePath : this.OSSclientConfig.basePath}${i.Path}`)
|
||||
}
|
||||
})
|
||||
seriesList.push({
|
||||
trialId: this.trialId,
|
||||
subjectVisitId: this.subjectVisitId,
|
||||
studyId: study.StudyId,
|
||||
imageIds: imageIds,
|
||||
instanceInfoList: series.InstanceInfoList,
|
||||
seriesId: series.Id,
|
||||
seriesUid: series.SeriesInstanceUid,
|
||||
seriesNumber: series.SeriesNumber,
|
||||
sliceThickness: series.SliceThickness,
|
||||
modality: series.Modality,
|
||||
description: series.Description,
|
||||
isReading: series.IsReading,
|
||||
isDeleted: series.IsDeleted,
|
||||
previewImageUrl: series.ImageResizePath ? this.OSSclientConfig.basePath + series.ImageResizePath : `/api/series/preview/${series.Id}`,
|
||||
instanceCount: series.InstanceCount,
|
||||
prefetchInstanceCount: 0,
|
||||
loadStatus: false,
|
||||
imageloadedArr: [],
|
||||
isExistMutiFrames: series.IsExistMutiFrames
|
||||
})
|
||||
})
|
||||
data.SeriesList = seriesList
|
||||
this.studyList.push(data)
|
||||
})
|
||||
if (this.studyList.length > 0) {
|
||||
this.$refs.dicomViewer.loadImageStack(this.studyList[0].SeriesList[0])
|
||||
const imageId = this.studyList[0].SeriesList[0].imageIds[0]
|
||||
let instanceId = imageId.split('/')[imageId.split('/').length - 1]
|
||||
instanceId = instanceId.split('.')[0]
|
||||
this.firstInstanceId = instanceId
|
||||
this.activeNames = [this.studyList[0].StudyId]
|
||||
this.loadImages(this.studyList[0].SeriesList[0], 0)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
||||
loadImages(series, seriesIndex) {
|
||||
var priority = parseInt(new Date().getTime())
|
||||
if (series.isExistMutiFrames) {
|
||||
series.instanceInfoList.map(image => {
|
||||
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
} else {
|
||||
series.imageIds.map(imageId => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
}
|
||||
if (this.imageList.length > 0) {
|
||||
this.loopLoad()
|
||||
}
|
||||
},
|
||||
showSeriesImage(e, studyIndex, seriesIndex, series) {
|
||||
const element = e.currentTarget
|
||||
@@ -398,11 +438,37 @@ export default {
|
||||
element.classList.add('viewerSideActive')
|
||||
this.currentSeriesIndex = seriesIndex
|
||||
this.$refs.dicomViewer.loadImageStack(this.studyList[studyIndex].SeriesList[seriesIndex])
|
||||
// if (!series.loadStatus) {
|
||||
// requestPoolManager.changePriority(series.seriesId)
|
||||
// }
|
||||
if (!series.loadStatus) {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
series.isLoading = true
|
||||
var isAddToTakPool = false
|
||||
if (this.showSeriesList.includes(`${studyIndex}_${seriesIndex}`)) {
|
||||
isAddToTakPool = true
|
||||
} else {
|
||||
this.showSeriesList.push(`${studyIndex}_${seriesIndex}`)
|
||||
}
|
||||
if (!isAddToTakPool) {
|
||||
var priority = parseInt(new Date().getTime())
|
||||
if (series.isExistMutiFrames) {
|
||||
series.instanceInfoList.map(image => {
|
||||
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
} else {
|
||||
series.imageIds.map(imageId => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
}
|
||||
if (this.imageList.length > 0) {
|
||||
this.loopLoad()
|
||||
}
|
||||
} else {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
}
|
||||
}
|
||||
},
|
||||
showMultiFrames(studyIndex,series, seriesIndex, instanceInfo) {
|
||||
showMultiFrames(studyIndex, series, seriesIndex, instanceInfo) {
|
||||
this.currentSeriesIndex = seriesIndex
|
||||
const imageIds = []
|
||||
if (instanceInfo.NumberOfFrames && instanceInfo.NumberOfFrames > 1) {
|
||||
@@ -430,10 +496,33 @@ export default {
|
||||
}
|
||||
this.$refs.dicomViewer.loadImageStack(seriesInfo)
|
||||
if (!series.loadStatus) {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
var isAddToTakPool = false
|
||||
if (this.showSeriesList.includes(`${studyIndex}_${seriesIndex}`)) {
|
||||
isAddToTakPool = true
|
||||
} else {
|
||||
this.showSeriesList.push(`${studyIndex}_${seriesIndex}`)
|
||||
}
|
||||
if (!isAddToTakPool) {
|
||||
var priority = parseInt(new Date().getTime())
|
||||
if (series.isExistMutiFrames) {
|
||||
series.instanceInfoList.map(image => {
|
||||
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
} else {
|
||||
series.imageIds.map((imageId) => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
}
|
||||
|
||||
if (this.imageList.length > 0) {
|
||||
this.loopLoad()
|
||||
}
|
||||
} else {
|
||||
requestPoolManager.changePriority(series.seriesId)
|
||||
}
|
||||
}
|
||||
},
|
||||
changeReadingStatus(callback, data) {
|
||||
async changeReadingStatus(callback, data) {
|
||||
let statusStr = ''
|
||||
if (callback) {
|
||||
statusStr = this.$t('trials:audit:label:setSeriesReading')
|
||||
@@ -444,24 +533,29 @@ export default {
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !data.isReading))
|
||||
this.$confirm(message, {
|
||||
distinguishCancelAndClose: true,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const state = data.isReading ? 1 : 2
|
||||
this.loading = true
|
||||
|
||||
setSeriesStatus(data.trialId, data.subjectVisitId, data.studyId, data.seriesId, state).then(res => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
data.isReading = !data.isReading
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
}).catch(() => {})
|
||||
const confirm = await this.$confirm(
|
||||
message,
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
const state = data.isReading ? 1 : 2
|
||||
this.loading = true
|
||||
try {
|
||||
const res = await setSeriesStatus(data.trialId, data.subjectVisitId, data.studyId, data.seriesId, state)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
data.isReading = !data.isReading
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
changeDeleteStatus(callback, data) {
|
||||
async changeDeleteStatus(callback, data) {
|
||||
let statusStr = ''
|
||||
if (callback) {
|
||||
statusStr = this.$t('trials:audit:label:setSeriesDeleted')
|
||||
@@ -472,24 +566,31 @@ export default {
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !data.isDeleted))
|
||||
this.$confirm(message, {
|
||||
distinguishCancelAndClose: true,
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const state = data.isDeleted ? 5 : 4
|
||||
this.loading = true
|
||||
setSeriesStatus(data.trialId, data.subjectVisitId, data.studyId, data.seriesId, state).then(res => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
data.isDeleted = !data.isDeleted
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
}).catch(() => {})
|
||||
const confirm = await this.$confirm(
|
||||
message,
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
const state = data.isDeleted ? 5 : 4
|
||||
this.loading = true
|
||||
try {
|
||||
const res = await setSeriesStatus(data.trialId, data.subjectVisitId, data.studyId, data.seriesId, state)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
data.isDeleted = !data.isDeleted
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
// 切换关联检查Tab时获取关联检查信息
|
||||
handleTabClick(tab, event) {
|
||||
async handleTabClick(tab, event) {
|
||||
if (tab.name === 'relation-study' && this.relationStudyList.length <= 0) {
|
||||
const loading = this.$loading({
|
||||
target: document.querySelector('.pane-relation-wrapper'),
|
||||
@@ -499,11 +600,13 @@ export default {
|
||||
background: 'rgb(49 49 49 / 50%)',
|
||||
spinner: 'el-icon-loading'
|
||||
})
|
||||
getAllRelationStudyList(this.subjectVisitId).then(res => {
|
||||
try {
|
||||
const res = await getAllRelationStudyList(this.subjectVisitId)
|
||||
loading.close()
|
||||
this.relationStudyList = res.Result
|
||||
console.log(this.relationStudyList)
|
||||
}).catch(() => { loading.close() })
|
||||
} catch (e) {
|
||||
loading.close()
|
||||
}
|
||||
}
|
||||
},
|
||||
handelRelationActiveChange(v) {
|
||||
@@ -515,8 +618,7 @@ export default {
|
||||
}
|
||||
},
|
||||
// 根据关联检查获取序列信息
|
||||
getRelationSeriesByStudy(studyId, index) {
|
||||
console.log('getRelationSeriesByStudy')
|
||||
async getRelationSeriesByStudy(studyId, index) {
|
||||
if (this.relationStudyList[index].seriesCount) {
|
||||
this.relationStudyList[index].showSeries = !this.relationStudyList[index].showSeries
|
||||
this.$forceUpdate()
|
||||
@@ -530,20 +632,21 @@ export default {
|
||||
background: 'rgb(49 49 49 / 50%)',
|
||||
spinner: 'el-icon-loading'
|
||||
})
|
||||
getSeriesList(`/series/list/${studyId}`).then(data => {
|
||||
try {
|
||||
const data = await getSeriesList(`/series/list/${studyId}`)
|
||||
loading.close()
|
||||
if (data.Result != null && data.Result.length > 0) {
|
||||
var seriesList = []
|
||||
const res = data.Result
|
||||
res.forEach((item,seriesIndex)=> {
|
||||
res.forEach((item, seriesIndex) => {
|
||||
const imageIds = []
|
||||
item.InstanceInfoList.forEach(i => {
|
||||
if (i.NumberOfFrames && i.NumberOfFrames > 1) {
|
||||
for (let j = 0; j < i.NumberOfFrames; j++) {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&idx=${index}|${seriesIndex}`)
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?frame=${j}&instanceId=${i.Id}&idx=${index}|${seriesIndex}&isRelation=1`)
|
||||
}
|
||||
} else {
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&idx=${index}|${seriesIndex}`)
|
||||
imageIds.push(`wadouri:${localStorage.getItem('location') !== 'USA' ? scope.OSSclientConfig.basePath : scope.OSSclientConfig.basePath}${i.Path}?instanceId=${i.Id}&idx=${index}|${seriesIndex}&isRelation=1`)
|
||||
}
|
||||
})
|
||||
seriesList.push({
|
||||
@@ -568,13 +671,14 @@ export default {
|
||||
scope.relationStudyList[index].seriesCount = seriesList.length
|
||||
scope.relationStudyList[index].seriesList = seriesList
|
||||
scope.relationStudyList[index].showSeries = true
|
||||
console.log(scope.relationStudyList)
|
||||
scope.$forceUpdate()
|
||||
}
|
||||
}).catch(() => { loading.close() })
|
||||
} catch (e) {
|
||||
loading.close()
|
||||
}
|
||||
}
|
||||
},
|
||||
showRelationSeriesImage(e, series, index) {
|
||||
showRelationSeriesImage(e, series, studyIndex, index) {
|
||||
this.currentRelationIndex = index
|
||||
const element = e.currentTarget
|
||||
const elements = document.querySelectorAll('[series-type]')
|
||||
@@ -585,9 +689,15 @@ export default {
|
||||
this.$refs.dicomViewer.loadImageStack(series)
|
||||
if (!series.loadStatus) {
|
||||
var priority = parseInt(new Date().getTime())
|
||||
series.imageIds.map(imageId => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
if (series.isExistMutiFrames) {
|
||||
series.instanceInfoList.map(image => {
|
||||
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
} else {
|
||||
series.imageIds.map((imageId) => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
loadAllImages() {
|
||||
@@ -596,21 +706,14 @@ export default {
|
||||
if (seriesIndex === -1) return
|
||||
const series = seriesList[seriesIndex]
|
||||
var priority = parseInt(new Date().getTime())
|
||||
for (let i = 0; i < series.imageIds.length; i++) {
|
||||
const imageId = series.imageIds[i]
|
||||
if (series.isExistMutiFrames) {
|
||||
const params = this.getInstanceInfo(imageId)
|
||||
if (params.frame && params.frame > 0) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
var p = null
|
||||
if (this.firstInstanceId === imageId) {
|
||||
p = priority * 100
|
||||
} else {
|
||||
p = priority - 1
|
||||
}
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, seriesIndex: seriesIndex, priority: p })
|
||||
if (series.isExistMutiFrames) {
|
||||
series.instanceInfoList.map(image => {
|
||||
this.imageList.push({ imageId: image.ImageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
} else {
|
||||
series.imageIds.map((imageId) => {
|
||||
this.imageList.push({ imageId: imageId, seriesId: series.seriesId, priority })
|
||||
})
|
||||
}
|
||||
if (this.imageList.length > 0) {
|
||||
this.loopLoad()
|
||||
@@ -635,26 +738,6 @@ export default {
|
||||
this.imageList = []
|
||||
}
|
||||
},
|
||||
// load(imageId, priority = 999) {
|
||||
// return new Promise((resolve, reject) => {
|
||||
// const imageTask = this.buildImageRequestTask(imageId, { priority })
|
||||
// requestPoolManager.addTaskIntoPool(imageTask).then((res) => {
|
||||
// resolve(res)
|
||||
// }).catch(e => {
|
||||
// reject(e)
|
||||
// console.log(e)
|
||||
// })
|
||||
// })
|
||||
// },
|
||||
buildImageRequestTask(imageId, config = {}) {
|
||||
return {
|
||||
key: imageId,
|
||||
...config,
|
||||
execute: () => {
|
||||
return cornerstone.loadAndCacheImage(imageId)
|
||||
}
|
||||
}
|
||||
},
|
||||
datasetsCacheChanged(e) {
|
||||
const cacheInfo = e.detail.cacheInfo
|
||||
const cacheSizeInBytes = cacheInfo.cacheSizeInBytes
|
||||
@@ -662,57 +745,46 @@ export default {
|
||||
// 清理缓存的影像
|
||||
}
|
||||
},
|
||||
imageLoaded(image, seriesUid) {
|
||||
var studyIndex = image.studyIndex
|
||||
var seriesIndex = image.seriesIndex
|
||||
if (seriesIndex < 0 || studyIndex < 0) return
|
||||
if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(image.imageId) < 0) {
|
||||
++this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.push(image.imageId)
|
||||
|
||||
if (this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount >= this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount) {
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount
|
||||
// 设置当前序列状态为已下载完成
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true
|
||||
}
|
||||
}
|
||||
},
|
||||
cornerstoneimageloadprogress(e){
|
||||
cornerstoneimageloadprogress(e) {
|
||||
const imageId = e.detail.imageId
|
||||
if (!imageId) return
|
||||
const percentComplete = e.detail.percentComplete
|
||||
const params = {}
|
||||
const searchParams = new URLSearchParams(imageId.split('?')[1])
|
||||
if (!searchParams) return
|
||||
for (const [key, value] of searchParams.entries()) {
|
||||
params[key] = value
|
||||
}
|
||||
if (this.visitTaskId === params.visitTaskId) {
|
||||
const studyIndex = params.idx.split('|')[0]
|
||||
const seriesIndex = params.idx.split('|')[1]
|
||||
var prefetchInstanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount
|
||||
var instanceCount = this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount
|
||||
if (this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.indexOf(imageId) < 0) {
|
||||
const i = this.currentLoadIns.findIndex(i => i.imageId === imageId)
|
||||
if (i > -1) {
|
||||
prefetchInstanceCount = prefetchInstanceCount - this.currentLoadIns[i].percentComplete + percentComplete
|
||||
this.currentLoadIns[i].percentComplete = percentComplete
|
||||
if (percentComplete === 100) {
|
||||
this.currentLoadIns.splice(i, 1)
|
||||
}
|
||||
} else {
|
||||
if (percentComplete !== 100) {
|
||||
this.currentLoadIns.push({ imageId, percentComplete })
|
||||
}
|
||||
prefetchInstanceCount = prefetchInstanceCount + percentComplete
|
||||
const studyIndex = params.idx.split('|')[0]
|
||||
const seriesIndex = params.idx.split('|')[1]
|
||||
var series = !params.isRelation ? this.studyList[studyIndex].SeriesList[seriesIndex] : null
|
||||
if (!series) return
|
||||
var prefetchInstanceCount = series.prefetchInstanceCount
|
||||
var instanceCount = series.instanceCount
|
||||
if (series.imageloadedArr.indexOf(imageId) < 0) {
|
||||
const i = this.currentLoadIns.findIndex(i => i.imageId === imageId)
|
||||
if (i > -1) {
|
||||
prefetchInstanceCount = prefetchInstanceCount - this.currentLoadIns[i].percentComplete + percentComplete
|
||||
this.currentLoadIns[i].percentComplete = percentComplete
|
||||
if (percentComplete === 100) {
|
||||
this.currentLoadIns.splice(i, 1)
|
||||
}
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = prefetchInstanceCount
|
||||
if (percentComplete >= 100) {
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.push(imageId)
|
||||
} else {
|
||||
if (percentComplete !== 100) {
|
||||
this.currentLoadIns.push({ imageId, percentComplete })
|
||||
}
|
||||
prefetchInstanceCount = prefetchInstanceCount + percentComplete
|
||||
}
|
||||
if (prefetchInstanceCount >= instanceCount * 100) {
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].prefetchInstanceCount = instanceCount * 100
|
||||
// 设置当前序列状态为已下载完成
|
||||
this.studyList[studyIndex].SeriesList[seriesIndex].loadStatus = true
|
||||
series.prefetchInstanceCount = prefetchInstanceCount
|
||||
if (percentComplete >= 100) {
|
||||
series.imageloadedArr.push(imageId)
|
||||
}
|
||||
}
|
||||
if (prefetchInstanceCount >= instanceCount * 100) {
|
||||
series.prefetchInstanceCount = instanceCount * 100
|
||||
// 设置当前序列状态为已下载完成
|
||||
series.loadStatus = true
|
||||
if (!this.isFromCRCUpload) {
|
||||
this.loadAllImages()
|
||||
}
|
||||
}
|
||||
@@ -784,7 +856,7 @@ export default {
|
||||
white-space: normal;
|
||||
}
|
||||
.viewerContainer .viewerLeftSidePanel {
|
||||
width: 215px;
|
||||
width: 220px;
|
||||
background-color: #323232;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
@@ -821,7 +893,7 @@ export default {
|
||||
}
|
||||
.viewerContainer .viewerLeftSidePanel .viewernavigatorwrapper {
|
||||
display: flex;
|
||||
width: 200px;
|
||||
width: 220px;
|
||||
/* height: 84px; */
|
||||
padding: 1px 2px 1px 2px;
|
||||
margin: 2px 0 1px 1px;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
ref="sysTemplateFrom"
|
||||
v-loading="loading"
|
||||
:model="form"
|
||||
label-width="90px"
|
||||
label-width="140px"
|
||||
size="small"
|
||||
:rules="rules"
|
||||
class="upload-temporary-file"
|
||||
@@ -12,10 +12,13 @@
|
||||
<el-form-item label="Code" prop="Code">
|
||||
<el-input v-model="form.Code" />
|
||||
</el-form-item>
|
||||
<el-form-item label="业务场景: " prop="BusinessScenarioEnum">
|
||||
<el-form-item
|
||||
:label="$t('dictionary:attachment:export:form:business')"
|
||||
prop="BusinessScenarioEnum"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.BusinessScenarioEnum"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
filterable
|
||||
>
|
||||
@@ -27,7 +30,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="文件: ">
|
||||
<el-form-item :label="$t('dictionary:attachment:export:form:file')">
|
||||
<div class="upload-container">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
@@ -43,84 +46,123 @@
|
||||
:on-exceed="handleExceed"
|
||||
:disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum"
|
||||
>
|
||||
<el-button size="small" type="primary" :disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum" :loading="btnLoading">Select</el-button>
|
||||
<span
|
||||
slot="tip"
|
||||
style="margin-left:10px;"
|
||||
class="el-upload__tip"
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum"
|
||||
:loading="btnLoading"
|
||||
>Select</el-button
|
||||
>
|
||||
<span slot="tip" style="margin-left: 10px" class="el-upload__tip">
|
||||
(must be in xlsx/xls/doc/docx format)
|
||||
</span>
|
||||
</el-upload>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="文件名" prop="Name">
|
||||
<el-form-item
|
||||
:label="$t('dictionary:attachment:export:form:name')"
|
||||
prop="Name"
|
||||
>
|
||||
<el-input v-model="form.Name" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.Id !== ''" label="是否废除: ">
|
||||
<el-form-item
|
||||
:label="$t('dictionary:attachment:export:form:nameCN')"
|
||||
prop="NameCN"
|
||||
>
|
||||
<el-input v-model="form.NameCN" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.Id !== ''"
|
||||
:label="$t('dictionary:attachment:export:form:isDeleted')"
|
||||
>
|
||||
<el-radio-group v-model="form.IsDeleted">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述">
|
||||
<el-form-item
|
||||
:label="$t('dictionary:attachment:export:form:description')"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.Description"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
placeholder="请输入内容"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder=""
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
|
||||
<el-form-item style="text-align:right;">
|
||||
<el-button size="small" type="primary" :disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum" :loading="saveBtnLoading" @click="handleSave">Save</el-button>
|
||||
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
|
||||
<el-form-item style="text-align: right">
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum"
|
||||
:loading="saveBtnLoading"
|
||||
@click="handleSave"
|
||||
>{{ $t("common:button:save") }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { addOrUpdateCommonDocument, uploadCommonDoc, Upload } from '@/api/dictionary'
|
||||
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
|
||||
import {
|
||||
addOrUpdateCommonDocument,
|
||||
uploadCommonDoc,
|
||||
Upload,
|
||||
} from "@/api/dictionary";
|
||||
import { getBasicDataSelects } from "@/api/dictionary/dictionary";
|
||||
export default {
|
||||
name: 'TemplateForm',
|
||||
name: "TemplateForm",
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default() { return {} }
|
||||
}
|
||||
default() {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
Id: '',
|
||||
Code: '',
|
||||
Id: "",
|
||||
Code: "",
|
||||
FileTypeEnum: null,
|
||||
BusinessScenarioEnum: null,
|
||||
Name: '',
|
||||
Path: '',
|
||||
Description: '',
|
||||
IsDeleted: false
|
||||
Name: "",
|
||||
NameCN: "",
|
||||
Path: "",
|
||||
Description: "",
|
||||
IsDeleted: false,
|
||||
},
|
||||
rules: {
|
||||
Code: [{ required: true, message: 'Please specify', trigger: ['blur'] }],
|
||||
Name: [{ required: true, message: 'Please specify', trigger: ['blur'] }],
|
||||
BusinessScenarioEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }]
|
||||
Code: [
|
||||
{ required: true, message: "Please specify", trigger: ["blur"] },
|
||||
],
|
||||
Name: [
|
||||
{ required: true, message: "Please specify", trigger: ["blur"] },
|
||||
],
|
||||
NameCN: [
|
||||
{ required: true, message: "Please specify", trigger: ["blur"] },
|
||||
],
|
||||
BusinessScenarioEnum: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
},
|
||||
fileList: [],
|
||||
btnLoading: false,
|
||||
saveBtnLoading: false,
|
||||
loading: false,
|
||||
dictionaryList: {}
|
||||
}
|
||||
dictionaryList: {},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.initForm()
|
||||
this.initForm();
|
||||
},
|
||||
methods: {
|
||||
async initForm() {
|
||||
await this.getDicData()
|
||||
await this.getDicData();
|
||||
if (Object.keys(this.data).length > 0) {
|
||||
if (this.data.Path) {
|
||||
this.fileList = [
|
||||
@@ -128,97 +170,111 @@ export default {
|
||||
name: this.data.Name,
|
||||
path: this.data.Path,
|
||||
url: this.data.Path,
|
||||
type: this.data.Type
|
||||
}
|
||||
]
|
||||
type: this.data.Type,
|
||||
},
|
||||
];
|
||||
}
|
||||
for (const k in this.form) {
|
||||
if (this.data.hasOwnProperty(k)) {
|
||||
this.form[k] = this.data[k]
|
||||
this.form[k] = this.data[k];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取文件类型下拉框
|
||||
getDicData() {
|
||||
this.loading = true
|
||||
getBasicDataSelects(['Common_File_ModuleType', 'Common_File_Type']).then(res => {
|
||||
this.dictionaryList = { ...res.Result }
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
this.loading = true;
|
||||
getBasicDataSelects(["Common_File_ModuleType", "Common_File_Type"])
|
||||
.then((res) => {
|
||||
this.dictionaryList = { ...res.Result };
|
||||
this.loading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
beforeUpload(file) {
|
||||
// 检测文件类型是否符合要求
|
||||
if (this.checkFileSuffix(file.name)) {
|
||||
this.fileList = []
|
||||
return true
|
||||
this.fileList = [];
|
||||
return true;
|
||||
} else {
|
||||
this.$alert('必须是word/excel格式')
|
||||
|
||||
return false
|
||||
// this.$alert("必须是word/excel格式");
|
||||
this.$alert(this.$t("dictionary:attachment:export:alert:formatFile"));
|
||||
return false;
|
||||
}
|
||||
},
|
||||
async handleUploadFile(param) {
|
||||
this.loading = true
|
||||
const formData = new FormData()
|
||||
formData.append('file', param.file)
|
||||
this.form.FileName = param.file.name
|
||||
Upload(formData, 1).then(res => {
|
||||
this.fileList.push({ name: param.file.name, path: res.Result.FilePath, fullPath: res.Result.FullFilePath, url: res.Result.FilePath })
|
||||
this.form.Path = res.Result.FilePath
|
||||
this.form.Name = param.file.name
|
||||
this.loading = false
|
||||
this.btnLoading = false
|
||||
})
|
||||
this.loading = true;
|
||||
const formData = new FormData();
|
||||
formData.append("file", param.file);
|
||||
this.form.FileName = param.file.name;
|
||||
Upload(formData, 1).then((res) => {
|
||||
this.fileList.push({
|
||||
name: param.file.name,
|
||||
path: res.Result.FilePath,
|
||||
fullPath: res.Result.FullFilePath,
|
||||
url: res.Result.FilePath,
|
||||
});
|
||||
this.form.Path = res.Result.FilePath;
|
||||
this.form.NameCN = param.file.name;
|
||||
this.loading = false;
|
||||
this.btnLoading = false;
|
||||
});
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.sysTemplateFrom.validate(valid => {
|
||||
if (!valid) return
|
||||
this.$refs.sysTemplateFrom.validate((valid) => {
|
||||
if (!valid) return;
|
||||
if (!this.form.Name) {
|
||||
this.$alert('Please select file.')
|
||||
return
|
||||
this.$alert("Please select file.");
|
||||
return;
|
||||
}
|
||||
this.saveBtnLoading = true
|
||||
addOrUpdateCommonDocument(this.form).then(res => {
|
||||
this.saveBtnLoading = false
|
||||
this.$emit('closeDialog')
|
||||
this.$emit('getList')
|
||||
this.$message.success('Uploaded successfully')
|
||||
}).catch(() => {
|
||||
this.saveBtnLoading = false
|
||||
})
|
||||
})
|
||||
this.saveBtnLoading = true;
|
||||
addOrUpdateCommonDocument(this.form)
|
||||
.then((res) => {
|
||||
this.saveBtnLoading = false;
|
||||
this.$emit("closeDialog");
|
||||
this.$emit("getList");
|
||||
this.$message.success(
|
||||
this.$t("trials:uploadMonitor:table:uploadStatus")
|
||||
);
|
||||
})
|
||||
.catch(() => {
|
||||
this.saveBtnLoading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
handleRemoveFile() {
|
||||
this.fileList = []
|
||||
this.form.Path = ''
|
||||
this.form.Name = ''
|
||||
this.fileList = [];
|
||||
this.form.Path = "";
|
||||
this.form.NameCN = "";
|
||||
this.form.Name = "";
|
||||
},
|
||||
handlePreview(file) {
|
||||
if (file.fullPath) {
|
||||
window.open(file.fullPath, '_blank')
|
||||
window.open(file.fullPath, "_blank");
|
||||
}
|
||||
},
|
||||
handleExceed(files, fileList) {
|
||||
this.$message.warning(`Upload is currently limited to 1 file`)
|
||||
this.$message.warning(`Upload is currently limited to 1 file`);
|
||||
},
|
||||
checkFileSuffix(fileName) {
|
||||
var typeArr = ['xls', 'xlsx', 'doc', 'docx']
|
||||
var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
|
||||
var typeArr = ["xls", "xlsx", "doc", "docx"];
|
||||
var extendName = fileName
|
||||
.substring(fileName.lastIndexOf(".") + 1)
|
||||
.toLocaleLowerCase();
|
||||
if (typeArr.indexOf(extendName) !== -1) {
|
||||
return true
|
||||
return true;
|
||||
} else {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.upload-temporary-file{
|
||||
.upload-temporary-file {
|
||||
.upload-container .el-upload--text {
|
||||
border: none;
|
||||
width: 80px;
|
||||
@@ -231,8 +287,8 @@ export default {
|
||||
color: #428bca;
|
||||
font-size: 13px;
|
||||
}
|
||||
.account_item_clear{
|
||||
.el-tag__close{
|
||||
.account_item_clear {
|
||||
.el-tag__close {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
<BaseContainer>
|
||||
<template slot="search-container">
|
||||
<el-form :inline="true" size="small">
|
||||
<el-form-item label="业务场景">
|
||||
<el-form-item
|
||||
:label="$t('dictionary:attachment:export:search:business')"
|
||||
>
|
||||
<el-select
|
||||
v-model="searchData.BusinessScenarioEnum"
|
||||
style="width:150px;"
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.Common_File_BusinessScenario"
|
||||
@@ -13,41 +15,42 @@
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="文件名称">
|
||||
<el-input
|
||||
v-model="searchData.Name"
|
||||
style="width:130px;"
|
||||
clearable
|
||||
/>
|
||||
<el-form-item
|
||||
:label="$t('dictionary:attachment:export:search:fileName')"
|
||||
>
|
||||
<el-input v-model="searchData.Name" style="width: 130px" clearable />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<!-- 查询 -->
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
{{ $t('common:button:search') }}
|
||||
{{ $t("common:button:search") }}
|
||||
</el-button>
|
||||
<!-- 重置 -->
|
||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||
{{ $t('common:button:reset') }}
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
{{ $t("common:button:reset") }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
style="float: right"
|
||||
size="small"
|
||||
@click="handleAdd"
|
||||
>
|
||||
{{ $t("common:button:new") }}
|
||||
</el-button>
|
||||
</el-form>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
style="margin-left:auto;"
|
||||
size="small"
|
||||
@click="handleAdd"
|
||||
>
|
||||
{{ $t('common:button:new') }}
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot="main-container">
|
||||
<el-table
|
||||
v-adaptive="{bottomOffset:60}"
|
||||
v-adaptive="{ bottomOffset: 60 }"
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
stripe
|
||||
@@ -64,70 +67,81 @@
|
||||
|
||||
<el-table-column
|
||||
prop="BusinessScenarioEnum"
|
||||
label="业务场景"
|
||||
:label="$t('dictionary:attachment:export:table:business')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('Common_File_BusinessScenario',scope.row.BusinessScenarioEnum) }}
|
||||
{{
|
||||
$fd(
|
||||
"Common_File_BusinessScenario",
|
||||
scope.row.BusinessScenarioEnum
|
||||
)
|
||||
}}
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="Name"
|
||||
label="文件名称"
|
||||
:label="$t('dictionary:attachment:export:table:name')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="NameCN"
|
||||
:label="$t('dictionary:attachment:export:table:nameCN')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Description"
|
||||
label="描述"
|
||||
:label="$t('dictionary:attachment:export:table:description')"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="IsDeleted"
|
||||
label="是否废除"
|
||||
:label="$t('dictionary:attachment:export:table:isDeleted')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ $fd('YesOrNo', scope.row.IsDeleted) }}</el-tag>
|
||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsDeleted) }}</el-tag>
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||
$fd("YesOrNo", scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
<el-tag v-else type="primary">{{
|
||||
$fd("YesOrNo", scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
label="更新时间"
|
||||
:label="$t('dictionary:attachment:export:table:updateTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
<el-table-column label="Action">
|
||||
<el-table-column :label="$t('common:action:action')">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleDownload(scope.row)"
|
||||
>
|
||||
下载
|
||||
<el-button type="text" @click="handleDownload(scope.row)">
|
||||
{{ $t("common:button:download") }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
编辑
|
||||
<el-button type="text" @click="handleEdit(scope.row)">
|
||||
{{ $t("common:button:edit") }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
>
|
||||
删除
|
||||
<el-button type="text" @click="handleDelete(scope.row)">
|
||||
{{ $t("common:button:delete") }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 新增/编辑 -->
|
||||
<el-dialog
|
||||
@@ -138,28 +152,36 @@
|
||||
width="600px"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<TemplateForm :data="currentRow" @closeDialog="closeDialog" @getList="getList" />
|
||||
<TemplateForm
|
||||
:data="currentRow"
|
||||
@closeDialog="closeDialog"
|
||||
@getList="getList"
|
||||
/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
</BaseContainer>
|
||||
</template>
|
||||
<script>
|
||||
import { getCommonDocumentList, DownloadCommonDoc, deleteCommonDocument } from '@/api/dictionary'
|
||||
import BaseContainer from '@/components/BaseContainer'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import TemplateForm from './TemplateForm'
|
||||
const FileTypeEnum = 2
|
||||
import {
|
||||
getCommonDocumentList,
|
||||
DownloadCommonDoc,
|
||||
deleteCommonDocument,
|
||||
} from "@/api/dictionary";
|
||||
import BaseContainer from "@/components/BaseContainer";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import TemplateForm from "./TemplateForm";
|
||||
const FileTypeEnum = 2;
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
FileTypeEnum: FileTypeEnum,
|
||||
BusinessScenarioEnum: null,
|
||||
Name: '',
|
||||
Name: "",
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
}
|
||||
PageSize: 20,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: 'ExportTemplate',
|
||||
name: "ExportTemplate",
|
||||
components: { BaseContainer, Pagination, TemplateForm },
|
||||
data() {
|
||||
return {
|
||||
@@ -167,73 +189,86 @@ export default {
|
||||
list: [],
|
||||
total: 0,
|
||||
currentRow: {},
|
||||
editDialog: { title: '', visible: false },
|
||||
loading: false
|
||||
}
|
||||
editDialog: { title: "", visible: false },
|
||||
loading: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleDelete(row) {
|
||||
this.$confirm('确定删除该模版?').then(() => {
|
||||
this.$confirm(
|
||||
this.$t("dictionary:attachment:export:confirm:delete")
|
||||
).then(() => {
|
||||
deleteCommonDocument(row.Id).then(() => {
|
||||
this.$message.success('删除成功')
|
||||
this.getList()
|
||||
})
|
||||
})
|
||||
this.$message.success(this.$t("common:message:deletedSuccessfully"));
|
||||
this.getList();
|
||||
});
|
||||
});
|
||||
},
|
||||
getList() {
|
||||
this.loading = true
|
||||
getCommonDocumentList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
this.loading = true;
|
||||
getCommonDocumentList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.editDialog.title = 'Add'
|
||||
this.currentRow = { FileTypeEnum: FileTypeEnum }
|
||||
this.editDialog.visible = true
|
||||
this.editDialog.title = "Add";
|
||||
this.currentRow = { FileTypeEnum: FileTypeEnum };
|
||||
this.editDialog.visible = true;
|
||||
},
|
||||
// 下载
|
||||
handleDownload(row) {
|
||||
this.loading = true
|
||||
DownloadCommonDoc(row.Code).then(data => {
|
||||
this.loading = false
|
||||
}).catch(() => { this.loading = false })
|
||||
this.loading = true;
|
||||
DownloadCommonDoc(row.Code)
|
||||
.then((data) => {
|
||||
this.loading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.editDialog.title = 'Edit'
|
||||
this.currentRow = { ...row }
|
||||
this.editDialog.visible = true
|
||||
this.editDialog.title = "Edit";
|
||||
this.currentRow = { ...row };
|
||||
this.editDialog.visible = true;
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
},
|
||||
closeDialog() {
|
||||
this.editDialog.visible = false
|
||||
this.editDialog.visible = false;
|
||||
},
|
||||
// 排序
|
||||
handleSortChange(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
if (column.order === "ascending") {
|
||||
this.searchData.Asc = true;
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
this.searchData.Asc = false;
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
this.searchData.SortField = column.prop;
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .search{
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
ref="sysTemplateFrom"
|
||||
v-loading="loading"
|
||||
:model="form"
|
||||
label-width="90px"
|
||||
label-width="140px"
|
||||
size="small"
|
||||
:rules="rules"
|
||||
class="upload-temporary-file"
|
||||
@@ -15,7 +15,7 @@
|
||||
<el-form-item label="业务场景: " prop="BusinessScenarioEnum">
|
||||
<el-select
|
||||
v-model="form.BusinessScenarioEnum"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
filterable
|
||||
>
|
||||
@@ -44,12 +44,14 @@
|
||||
:on-exceed="handleExceed"
|
||||
:disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum"
|
||||
>
|
||||
<el-button size="small" type="primary" :disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum" :loading="btnLoading">Select</el-button>
|
||||
<span
|
||||
slot="tip"
|
||||
style="margin-left:10px;"
|
||||
class="el-upload__tip"
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum"
|
||||
:loading="btnLoading"
|
||||
>Select</el-button
|
||||
>
|
||||
<span slot="tip" style="margin-left: 10px" class="el-upload__tip">
|
||||
(must be in xlsx/xls/doc/docx format)
|
||||
</span>
|
||||
</el-upload>
|
||||
@@ -58,37 +60,61 @@
|
||||
<el-form-item label="文件名" prop="Name">
|
||||
<el-input v-model="form.Name" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('dictionary:attachment:export:form:nameCN')"
|
||||
prop="NameCN"
|
||||
>
|
||||
<el-input v-model="form.NameCN" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.Id !== ''" label="是否废除: ">
|
||||
<el-radio-group v-model="form.IsDeleted">
|
||||
<el-radio v-for="item of $d.YesOrNo" :label="item.value">{{item.label}}</el-radio>
|
||||
<el-radio
|
||||
v-for="item of $d.YesOrNo"
|
||||
:label="item.value"
|
||||
:key="item.id"
|
||||
>{{ item.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述">
|
||||
<el-input
|
||||
v-model="form.Description"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 4}"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
placeholder="请输入内容"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
|
||||
<el-form-item style="text-align:right;">
|
||||
<el-button size="small" type="primary" :disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum" :loading="saveBtnLoading" @click="handleSave">Save</el-button>
|
||||
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
|
||||
<el-form-item style="text-align: right">
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum"
|
||||
:loading="saveBtnLoading"
|
||||
@click="handleSave"
|
||||
>Save</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { addOrUpdateCommonDocument, uploadCommonDoc, Upload } from '@/api/dictionary'
|
||||
import {
|
||||
addOrUpdateCommonDocument,
|
||||
uploadCommonDoc,
|
||||
Upload,
|
||||
} from '@/api/dictionary'
|
||||
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
|
||||
export default {
|
||||
name: 'TemplateForm',
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default() { return {} }
|
||||
}
|
||||
default() {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
@@ -99,20 +125,30 @@ export default {
|
||||
FileTypeEnum: null,
|
||||
BusinessScenarioEnum: null,
|
||||
Name: '',
|
||||
NameCN: '',
|
||||
Path: '',
|
||||
Description: '',
|
||||
IsDeleted: false
|
||||
IsDeleted: false,
|
||||
},
|
||||
rules: {
|
||||
Code: [{ required: true, message: 'Please specify', trigger: ['blur'] }],
|
||||
Name: [{ required: true, message: 'Please specify', trigger: ['blur'] }],
|
||||
BusinessScenarioEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }]
|
||||
Code: [
|
||||
{ required: true, message: 'Please specify', trigger: ['blur'] },
|
||||
],
|
||||
Name: [
|
||||
{ required: true, message: 'Please specify', trigger: ['blur'] },
|
||||
],
|
||||
NameCN: [
|
||||
{ required: true, message: 'Please specify', trigger: ['blur'] },
|
||||
],
|
||||
BusinessScenarioEnum: [
|
||||
{ required: true, message: 'Please select', trigger: ['blur'] },
|
||||
],
|
||||
},
|
||||
fileList: [],
|
||||
btnLoading: false,
|
||||
saveBtnLoading: false,
|
||||
loading: false,
|
||||
dictionaryList: {}
|
||||
dictionaryList: {},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -128,8 +164,8 @@ export default {
|
||||
name: this.data.Name,
|
||||
path: this.data.Path,
|
||||
url: this.data.Path,
|
||||
type: this.data.Type
|
||||
}
|
||||
type: this.data.Type,
|
||||
},
|
||||
]
|
||||
}
|
||||
for (const k in this.form) {
|
||||
@@ -142,12 +178,14 @@ export default {
|
||||
// 获取文件类型下拉框
|
||||
getDicData() {
|
||||
this.loading = true
|
||||
getBasicDataSelects(['Common_File_ModuleType', 'Common_File_Type']).then(res => {
|
||||
this.dictionaryList = { ...res.Result }
|
||||
this.loading = false
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
getBasicDataSelects(['Common_File_ModuleType', 'Common_File_Type'])
|
||||
.then((res) => {
|
||||
this.dictionaryList = { ...res.Result }
|
||||
this.loading = false
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
beforeUpload(file) {
|
||||
// 检测文件类型是否符合要求
|
||||
@@ -165,35 +203,43 @@ export default {
|
||||
const formData = new FormData()
|
||||
formData.append('file', param.file)
|
||||
this.form.FileName = param.file.name
|
||||
Upload(formData, 1).then(res => {
|
||||
this.fileList.push({ name: param.file.name, path: res.Result.FilePath, fullPath: res.Result.FullFilePath, url: res.Result.FilePath })
|
||||
Upload(formData, 1).then((res) => {
|
||||
this.fileList.push({
|
||||
name: param.file.name,
|
||||
path: res.Result.FilePath,
|
||||
fullPath: res.Result.FullFilePath,
|
||||
url: res.Result.FilePath,
|
||||
})
|
||||
this.form.Path = res.Result.FilePath
|
||||
this.form.Name = param.file.name
|
||||
this.form.NameCN = param.file.name
|
||||
this.loading = false
|
||||
this.btnLoading = false
|
||||
})
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.sysTemplateFrom.validate(valid => {
|
||||
this.$refs.sysTemplateFrom.validate((valid) => {
|
||||
if (!valid) return
|
||||
if (!this.form.Name) {
|
||||
this.$alert('Please select file.')
|
||||
return
|
||||
}
|
||||
this.saveBtnLoading = true
|
||||
addOrUpdateCommonDocument(this.form).then(res => {
|
||||
this.saveBtnLoading = false
|
||||
this.$emit('closeDialog')
|
||||
this.$emit('getList')
|
||||
this.$message.success('Uploaded successfully')
|
||||
}).catch(() => {
|
||||
this.saveBtnLoading = false
|
||||
})
|
||||
addOrUpdateCommonDocument(this.form)
|
||||
.then((res) => {
|
||||
this.saveBtnLoading = false
|
||||
this.$emit('closeDialog')
|
||||
this.$emit('getList')
|
||||
this.$message.success('Uploaded successfully')
|
||||
})
|
||||
.catch(() => {
|
||||
this.saveBtnLoading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
handleRemoveFile() {
|
||||
this.fileList = []
|
||||
this.form.Path = ''
|
||||
this.form.NameCN = ''
|
||||
this.form.Name = ''
|
||||
},
|
||||
handlePreview(file) {
|
||||
@@ -206,19 +252,21 @@ export default {
|
||||
},
|
||||
checkFileSuffix(fileName) {
|
||||
var typeArr = ['xls', 'xlsx', 'doc', 'docx']
|
||||
var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
|
||||
var extendName = fileName
|
||||
.substring(fileName.lastIndexOf('.') + 1)
|
||||
.toLocaleLowerCase()
|
||||
if (typeArr.indexOf(extendName) !== -1) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.upload-temporary-file{
|
||||
.upload-temporary-file {
|
||||
.upload-container .el-upload--text {
|
||||
border: none;
|
||||
width: 80px;
|
||||
@@ -231,8 +279,8 @@ export default {
|
||||
color: #428bca;
|
||||
font-size: 13px;
|
||||
}
|
||||
.account_item_clear{
|
||||
.el-tag__close{
|
||||
.account_item_clear {
|
||||
.el-tag__close {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<el-form-item label="业务场景">
|
||||
<el-select
|
||||
v-model="searchData.BusinessScenarioEnum"
|
||||
style="width:150px;"
|
||||
style="width: 150px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.Common_File_BusinessScenario"
|
||||
@@ -13,15 +13,10 @@
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="文件名称">
|
||||
<el-input
|
||||
v-model="searchData.Name"
|
||||
style="width:130px;"
|
||||
clearable
|
||||
/>
|
||||
<el-input v-model="searchData.Name" style="width: 130px" clearable />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
@@ -30,24 +25,28 @@
|
||||
{{ $t('common:button:search') }}
|
||||
</el-button>
|
||||
<!-- 重置 -->
|
||||
<el-button type="primary" icon="el-icon-refresh-left" @click="handleReset">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
{{ $t('common:button:reset') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
style="float: right"
|
||||
size="small"
|
||||
@click="handleAdd"
|
||||
>
|
||||
{{ $t('common:button:new') }}
|
||||
</el-button>
|
||||
</el-form>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
style="margin-left:auto;"
|
||||
size="small"
|
||||
@click="handleAdd"
|
||||
>
|
||||
{{ $t('common:button:new') }}
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot="main-container">
|
||||
<el-table
|
||||
v-adaptive="{bottomOffset:60}"
|
||||
v-adaptive="{ bottomOffset: 60 }"
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
stripe
|
||||
@@ -69,9 +68,13 @@
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('Common_File_BusinessScenario',scope.row.BusinessScenarioEnum) }}
|
||||
{{
|
||||
$fd(
|
||||
'Common_File_BusinessScenario',
|
||||
scope.row.BusinessScenarioEnum
|
||||
)
|
||||
}}
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
@@ -80,6 +83,12 @@
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="NameCN"
|
||||
:label="$t('dictionary:attachment:upload:table:nameCN')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Description"
|
||||
label="描述"
|
||||
@@ -92,8 +101,12 @@
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ $fd('YesOrNo', scope.row.IsDeleted) }}</el-tag>
|
||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsDeleted) }}</el-tag>
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||
$fd('YesOrNo', scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
<el-tag v-else type="primary">{{
|
||||
$fd('YesOrNo', scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -105,29 +118,26 @@
|
||||
|
||||
<el-table-column label="Action">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleDownload(scope.row)"
|
||||
>
|
||||
<el-button type="text" @click="handleDownload(scope.row)">
|
||||
下载
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
<el-button type="text" @click="handleEdit(scope.row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
>
|
||||
<el-button type="text" @click="handleDelete(scope.row)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 新增/编辑 -->
|
||||
<el-dialog
|
||||
@@ -138,13 +148,21 @@
|
||||
width="600px"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<TemplateForm :data="currentRow" @closeDialog="closeDialog" @getList="getList" />
|
||||
<TemplateForm
|
||||
:data="currentRow"
|
||||
@closeDialog="closeDialog"
|
||||
@getList="getList"
|
||||
/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
</BaseContainer>
|
||||
</template>
|
||||
<script>
|
||||
import { getCommonDocumentList, DownloadCommonDoc, deleteCommonDocument } from '@/api/dictionary'
|
||||
import {
|
||||
getCommonDocumentList,
|
||||
DownloadCommonDoc,
|
||||
deleteCommonDocument,
|
||||
} from '@/api/dictionary'
|
||||
import BaseContainer from '@/components/BaseContainer'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import TemplateForm from './TemplateForm'
|
||||
@@ -155,7 +173,7 @@ const searchDataDefault = () => {
|
||||
BusinessScenarioEnum: null,
|
||||
Name: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
PageSize: 20,
|
||||
}
|
||||
}
|
||||
export default {
|
||||
@@ -168,7 +186,7 @@ export default {
|
||||
total: 0,
|
||||
currentRow: {},
|
||||
editDialog: { title: '', visible: false },
|
||||
loading: false
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -185,13 +203,15 @@ export default {
|
||||
},
|
||||
getList() {
|
||||
this.loading = true
|
||||
getCommonDocumentList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
getCommonDocumentList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
@@ -202,9 +222,13 @@ export default {
|
||||
// 下载
|
||||
handleDownload(row) {
|
||||
this.loading = true
|
||||
DownloadCommonDoc(row.Code).then(data => {
|
||||
this.loading = false
|
||||
}).catch(() => { this.loading = false })
|
||||
DownloadCommonDoc(row.Code)
|
||||
.then((data) => {
|
||||
this.loading = false
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
@@ -233,7 +257,12 @@ export default {
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .search {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<el-table-column prop="Identification" label="标识" :show-overflow-tooltip="true" min-width="200px" />
|
||||
<el-table-column prop="OptTypeValueCN" label="操作类型" show-overflow-tooltip width="100px" />
|
||||
<el-table-column prop="ObjectTypeValueCN" label="对象类型" show-overflow-tooltip min-width="100px" />
|
||||
<el-table-column prop="ChildrenTypeValueCN" label="数据类型" show-overflow-tooltip min-width="100px" show-overflow-tooltip />
|
||||
<el-table-column prop="ChildrenTypeValueCN" label="数据类型" show-overflow-tooltip min-width="100px"/>
|
||||
<el-table-column
|
||||
prop="Sort"
|
||||
label="显示顺序"
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
<!-- 添加或修改菜单对话框 -->
|
||||
<el-dialog :title="title" top="100px" :close-on-click-modal="false" id="check_config" :visible.sync="open" :width="form.DataType === 'Table' ? '1280px' : '680px'" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col v-show="title !== '复制'" :span="24">
|
||||
<el-divider content-position="left">基本信息</el-divider>
|
||||
@@ -142,11 +142,16 @@
|
||||
<el-input v-model="form.Identification" placeholder="请输入标识" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-show="form.ConfigType === 'C' && title !== '复制'" :span="24">
|
||||
<el-col v-show="form.ConfigType === 'C' && title !== '复制'" :span="12">
|
||||
<el-form-item label="字段key">
|
||||
<el-input v-model="form.Code" placeholder="请输入字段key" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-show="form.ConfigType === 'C' && title !== '复制'" :span="12">
|
||||
<el-form-item label="字段key英文">
|
||||
<el-input v-model="form.CodeEn" placeholder="请输入字段key英文" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-show="form.ConfigType === 'C' && title !== '复制'" :span="12">
|
||||
<el-form-item label="字段英文">
|
||||
<el-input v-model="form.Value" placeholder="请输入字段英文" />
|
||||
@@ -372,6 +377,16 @@
|
||||
<el-input :disabled="!scope.row.IsFixedColumn" v-model="scope.row.FixedColumnName" placeholder="固定列名"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="FixedColumnEnName"
|
||||
min-width="120"
|
||||
label="固定列名EN"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input :disabled="!scope.row.IsFixedColumn" v-model="scope.row.FixedColumnEnName" placeholder="固定列名EN"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="ColumnName"
|
||||
min-width="120"
|
||||
@@ -382,6 +397,16 @@
|
||||
<el-input :disabled="scope.row.IsFixedColumn" v-model="scope.row.ColumnName" placeholder="列字段名"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="ColumnEnName"
|
||||
min-width="120"
|
||||
label="列字段名En"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input :disabled="scope.row.IsFixedColumn" v-model="scope.row.ColumnEnName" placeholder="列字段名En"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="ColumnValue"
|
||||
min-width="120"
|
||||
@@ -415,6 +440,16 @@
|
||||
<el-input :disabled="!scope.row.IsMerge" v-model="scope.row.MergeColumnName" placeholder="合并组"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="MergeColumnEnName"
|
||||
min-width="120"
|
||||
label="合并组EN"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input :disabled="!scope.row.IsMerge" v-model="scope.row.MergeColumnEnName" placeholder="合并组EN"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="IsPicture"
|
||||
min-width="120"
|
||||
@@ -489,6 +524,14 @@
|
||||
<el-input v-model="form.ChildDataLabel" placeholder="请输入子数据Lable" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-show="form.ConfigType === 'C' && title !== '复制' && form.DataType === 'Array'" :span="12">
|
||||
<el-form-item>
|
||||
<span slot="label">
|
||||
子数据LableEN
|
||||
</span>
|
||||
<el-input v-model="form.ChildDataEnLabel" placeholder="请输入子数据LableEN" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-show="form.ConfigType === 'C' && title !== '复制' && form.DataType === 'Array'" :span="12">
|
||||
<el-form-item>
|
||||
<span slot="label">
|
||||
@@ -559,6 +602,11 @@
|
||||
<el-input v-model="form.ForeignKeyText" placeholder="请输入数据库字段to" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-show="form.ConfigType === 'C' && title !== '复制' && form.EnumType === 'Foreign'" :span="12">
|
||||
<el-form-item label="字段toEN">
|
||||
<el-input v-model="form.ForeignKeyEnText" placeholder="请输入数据库字段toEN" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col v-show="title !== '复制'" :span="24">
|
||||
@@ -643,6 +691,7 @@
|
||||
height="100"
|
||||
>
|
||||
<el-table-column prop="Code" label="字段名" min-width="120px" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="CodeEn" label="字段名英文" min-width="120px" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="Value" label="字段英文" min-width="120px" :show-overflow-tooltip="true" />
|
||||
<el-table-column prop="ValueCN" label="字段中文" min-width="120px" :show-overflow-tooltip="true" />
|
||||
<el-table-column
|
||||
@@ -821,10 +870,13 @@ export default {
|
||||
ListName: null,
|
||||
IsFixedColumn: false,
|
||||
FixedColumnName: null,
|
||||
FixedColumnEnName: null,
|
||||
ColumnName: null,
|
||||
ColumnEnName: null,
|
||||
ColumnValue: null,
|
||||
IsMerge: false,
|
||||
MergeColumnName: null,
|
||||
MergeColumnEnName: null,
|
||||
IsPicture: false,
|
||||
IsDynamicTranslate: false,
|
||||
IsNeedTransalate: false,
|
||||
@@ -1097,6 +1149,7 @@ export default {
|
||||
IsShowParent: 0,
|
||||
Sort: 0,
|
||||
Code: null,
|
||||
CodeEn: null,
|
||||
Value: null,
|
||||
ValueCN: null,
|
||||
EnumType: '',
|
||||
@@ -1111,6 +1164,7 @@ export default {
|
||||
IsSpecialType: false,
|
||||
DataType: '',
|
||||
ChildDataLabel: null,
|
||||
ChildDataEnLabel: null,
|
||||
ChildDataValue: null,
|
||||
DateType: null,
|
||||
DictionaryCode: null,
|
||||
@@ -1118,6 +1172,7 @@ export default {
|
||||
ForeignKeyTableName: null,
|
||||
ForeignKeyValue: null,
|
||||
ForeignKeyText: null,
|
||||
ForeignKeyEnText: null,
|
||||
TableConfigList: [],
|
||||
UrlConfig: {
|
||||
RoutePath: null,
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<el-input v-model="form.SiteName" />
|
||||
</el-form-item>
|
||||
<!-- 中心名称(CN) -->
|
||||
<el-form-item :label="$t('trials:customSite:form:siteName') + '(CN)'" v-if="!show" prop="SiteNameCN">
|
||||
<el-form-item :label="$t('trials:customSite:form:siteName') + '(CN)'" prop="SiteNameCN">
|
||||
<el-input v-model="form.SiteNameCN" />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
<template>
|
||||
<base-model :config="config">
|
||||
<div slot="dialog-body">
|
||||
<el-form
|
||||
ref="browserForm"
|
||||
:model="form"
|
||||
label-width="140px"
|
||||
size="small"
|
||||
:rules="rules"
|
||||
>
|
||||
<div class="base-dialog-body">
|
||||
<el-form-item
|
||||
:label="$t('dictionary:browser:form:title')"
|
||||
prop="Title"
|
||||
>
|
||||
<el-input v-model="form.Title" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('dictionary:browser:form:exploreType')"
|
||||
prop="ExploreType"
|
||||
>
|
||||
<el-input v-model="form.ExploreType" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('dictionary:browser:form:version')"
|
||||
prop="Version"
|
||||
>
|
||||
<el-input v-model="form.Version" type="textarea" rows="5" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('dictionary:browser:form:downloadUrl')"
|
||||
prop="DownloadUrl"
|
||||
>
|
||||
<el-input v-model="form.DownloadUrl" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('dictionary:browser:form:addFile')">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action
|
||||
:before-upload="beforeUpload"
|
||||
:http-request="handleUploadFile"
|
||||
:on-preview="handlePreview"
|
||||
:on-remove="handleRemoveFile"
|
||||
:show-file-list="true"
|
||||
:limit="1"
|
||||
:file-list="fileList"
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="fileList.length > 0"
|
||||
>{{ $t("common:button:upload") }}</el-button
|
||||
>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('dictionary:browser:form:isDeleted')">
|
||||
<el-switch
|
||||
v-model="form.IsDeleted"
|
||||
:active-value="false"
|
||||
:inactive-value="true"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<div slot="dialog-footer">
|
||||
<el-button size="small" @click="canel">
|
||||
{{ $t("dictionary:browser:button:canel") }}
|
||||
</el-button>
|
||||
<el-button size="small" type="primary" :loading="loading" @click="save">
|
||||
{{ $t("dictionary:browser:button:save") }}
|
||||
</el-button>
|
||||
</div>
|
||||
</base-model>
|
||||
</template>
|
||||
<script>
|
||||
import baseModel from "@/components/BaseModel";
|
||||
import { addOrUpdateExploreRecommend } from "@/api/dictionary";
|
||||
export default {
|
||||
props: {
|
||||
config: {
|
||||
required: true,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
data: {
|
||||
required: true,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
},
|
||||
components: {
|
||||
"base-model": baseModel,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
Version: null,
|
||||
Title: null,
|
||||
IsDeleted: true,
|
||||
ExploreType: null,
|
||||
DownloadUrl: null,
|
||||
Path: null,
|
||||
FileName: null,
|
||||
},
|
||||
rules: {
|
||||
Title: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
ExploreType: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
Version: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
DownloadUrl: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: ["blur", "change"],
|
||||
},
|
||||
],
|
||||
},
|
||||
fileList: [],
|
||||
loading: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
if (this.config.status === "edit") {
|
||||
Object.keys(this.form).forEach((key) => {
|
||||
this.form[key] = this.data[key];
|
||||
});
|
||||
if (this.form.FileName) {
|
||||
this.fileList[0] = {
|
||||
name: this.form.FileName,
|
||||
path: this.form.Path,
|
||||
fullPath: this.form.Path,
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async save() {
|
||||
try {
|
||||
let validate = await this.$refs.browserForm.validate();
|
||||
if (!validate) return false;
|
||||
this.loading = true;
|
||||
if (this.config.status === "edit") {
|
||||
this.form.Id = this.data.Id;
|
||||
}
|
||||
let res = await addOrUpdateExploreRecommend(this.form);
|
||||
if (res.IsSuccess) {
|
||||
this.$emit("close");
|
||||
this.$emit("getList");
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
canel() {
|
||||
this.$emit("close");
|
||||
},
|
||||
handleRemoveFile() {
|
||||
this.form.FileName = null;
|
||||
this.form.Path = null;
|
||||
this.fileList = [];
|
||||
},
|
||||
beforeUpload() {
|
||||
if (this.fileList.length > 0) {
|
||||
this.$alert(this.$t("dictionary:bbrowser:msg:message1"));
|
||||
return;
|
||||
}
|
||||
},
|
||||
handlePreview(row, r2) {
|
||||
if (row.fullPath) {
|
||||
window.open(row.fullPath, "_blank");
|
||||
}
|
||||
},
|
||||
async handleUploadFile(param) {
|
||||
this.loading = true;
|
||||
var file = await this.fileToBlob(param.file);
|
||||
const res = await this.OSSclient.put(
|
||||
`/System/Browser/${param.file.name}`,
|
||||
file
|
||||
);
|
||||
this.fileList.push({
|
||||
name: param.file.name,
|
||||
path: this.$getObjectName(res.url),
|
||||
fullPath: this.$getObjectName(res.url),
|
||||
url: this.$getObjectName(res.url),
|
||||
});
|
||||
this.form.Path = this.$getObjectName(res.url);
|
||||
this.form.FileName = param.file.name;
|
||||
this.loading = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,252 @@
|
||||
<template>
|
||||
<box-content>
|
||||
<!-- 搜索框 -->
|
||||
<div class="search">
|
||||
<el-form :inline="true" size="mini" class="base-search-form">
|
||||
<el-form-item :label="$t('dictionary:browser:search:title')">
|
||||
<el-input v-model="searchData.Title" style="width: 100px" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('dictionary:browser:search:version')">
|
||||
<el-input v-model="searchData.Version" style="width: 100px" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleReset">{{
|
||||
$t("dictionary:browser:button:reset")
|
||||
}}</el-button>
|
||||
<el-button type="primary" @click="handleSearch">{{
|
||||
$t("dictionary:browser:button:search")
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left: auto">
|
||||
<el-button type="primary" size="mini" @click="handleAdd">
|
||||
{{ $t("dictionary:browser:button:add") }}
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- 浏览器推荐版本列表 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{ bottomOffset: 45 }"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width: 100%"
|
||||
@sort-change="handleSortByColumn"
|
||||
>
|
||||
<el-table-column type="index" width="40" />
|
||||
|
||||
<el-table-column
|
||||
prop="Title"
|
||||
:label="$t('dictionary:browser:table:title')"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
prop="ExploreType"
|
||||
:label="$t('dictionary:browser:table:exploreType')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Version"
|
||||
:label="$t('dictionary:browser:table:version')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="DownloadUrl"
|
||||
:label="$t('dictionary:browser:table:path')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="FileName"
|
||||
:label="$t('dictionary:browser:table:fileName')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<a
|
||||
:href="OSSclientConfig.basePath + scope.row.Path"
|
||||
target="_blank"
|
||||
style="color: #428bca"
|
||||
>
|
||||
{{ scope.row.FileName }}
|
||||
</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="IsDeleted"
|
||||
:label="$t('dictionary:browser:table:IsDeleted')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||
$fd("IsSiteDisable", scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
<el-tag v-else>{{
|
||||
$fd("IsSiteDisable", scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
:label="$t('dictionary:browser:table:updateTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('dictionary:browser:table:action')"
|
||||
width="200"
|
||||
fixed="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleEdit(scope.row)">
|
||||
{{ $t("dictionary:browser:button:edit") }}
|
||||
</el-button>
|
||||
<el-button type="text" @click="handleDelete(scope.row)">
|
||||
{{ $t("dictionary:browser:button:delete") }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<browser-form
|
||||
:config="config"
|
||||
:data="rowData"
|
||||
v-if="config.visible"
|
||||
@close="close"
|
||||
@getList="getList"
|
||||
/>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getExploreRecommendList,
|
||||
deleteExploreRecommend,
|
||||
} from "@/api/dictionary";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import BoxContent from "@/components/BoxContent";
|
||||
import browserForm from "./form.vue";
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
Version: null,
|
||||
Title: null,
|
||||
DownloadUrl: null,
|
||||
FileName: null,
|
||||
IsDeleted: null,
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
Asc: false,
|
||||
SortField: null,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: "browser",
|
||||
components: { BoxContent, Pagination, browserForm },
|
||||
data() {
|
||||
return {
|
||||
searchData: searchDataDefault(),
|
||||
loading: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
rowData: {},
|
||||
config: {
|
||||
visible: false,
|
||||
showClose: true,
|
||||
width: "600px",
|
||||
title: "",
|
||||
appendToBody: true,
|
||||
status: "add",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
try {
|
||||
this.loading = true;
|
||||
let res = await getExploreRecommendList(this.searchData);
|
||||
if (res.IsSuccess) {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.rowData = {};
|
||||
this.config.title = this.$t("dictionary:browser:form:title:add");
|
||||
this.config.status = "add";
|
||||
this.config.visible = true;
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.rowData = { ...row };
|
||||
this.config.title = this.$t("dictionary:browser:form:title:edit");
|
||||
this.config.status = "edit";
|
||||
this.config.visible = true;
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm(this.$t("dictionary:browser:message:deleteMessage"), {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
}).then(() => {
|
||||
deleteExploreRecommend(row.Id).then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(
|
||||
this.list.findIndex((item) => item.Id === row.Id),
|
||||
1
|
||||
);
|
||||
this.$message.success(
|
||||
this.$t("common:message:deletedSuccessfully")
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
// 查询
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === "ascending") {
|
||||
this.searchData.Asc = true;
|
||||
} else {
|
||||
this.searchData.Asc = false;
|
||||
}
|
||||
this.searchData.SortField = column.prop;
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
close() {
|
||||
this.config.visible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<div class="browserTip" v-if="visible">
|
||||
<i class="el-icon-warning-outline"></i>
|
||||
<span v-html="tip"></span>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getExploreRecommentInfo } from "@/api/dictionary";
|
||||
export default {
|
||||
name: "browserTip",
|
||||
data() {
|
||||
return {
|
||||
form: {},
|
||||
tip: this.$t("browser:tip:changeBorwser"),
|
||||
visible: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async getInfo() {
|
||||
try {
|
||||
let res = await getExploreRecommentInfo();
|
||||
if (res.IsSuccess) {
|
||||
return res.Result;
|
||||
}
|
||||
return false;
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
async open() {
|
||||
try {
|
||||
let browserType = this.getExplore();
|
||||
let type = browserType.split(": ")[0];
|
||||
let No = browserType.split(": ")[1].split(".")[0];
|
||||
console.log(type, No);
|
||||
if (type !== "Chrome" && type !== "Edge") {
|
||||
this.tip = this.$t("browser:tip:changeBorwser");
|
||||
return (this.visible = true);
|
||||
}
|
||||
let res = await this.getInfo();
|
||||
if (!res) return this.$t("dictionary:browser:tip:getError");
|
||||
let currentType = res.filter(
|
||||
(item) => item.ExploreType.toLowerCase() === type.toLowerCase()
|
||||
)[0];
|
||||
if (No < currentType.Version) {
|
||||
this.tip = `<span>${this.$t("browser:tip:borwserversionLow")}</span>`;
|
||||
res.forEach((item, index) => {
|
||||
this.tip += `<a href="${item.DownloadUrl}" target="_blank" style="color:#428bca">${item.Title}</a>`;
|
||||
if (index < res.length - 1) {
|
||||
this.tip += "、";
|
||||
}
|
||||
});
|
||||
return (this.visible = true);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
getExplore() {
|
||||
var Sys = {};
|
||||
var ua = navigator.userAgent.toLowerCase();
|
||||
var s;
|
||||
(s = ua.match(/rv:([\d.]+)\) like gecko/))
|
||||
? (Sys.ie = s[1])
|
||||
: (s = ua.match(/msie ([\d\.]+)/))
|
||||
? (Sys.ie = s[1])
|
||||
: (s = ua.match(/edg\/([\d\.]+)/) || ua.match(/edge\/([\d\.]+)/))
|
||||
? (Sys.edge = s[1])
|
||||
: (s = ua.match(/firefox\/([\d\.]+)/))
|
||||
? (Sys.firefox = s[1])
|
||||
: (s = ua.match(/(?:opera|opr).([\d\.]+)/))
|
||||
? (Sys.opera = s[1])
|
||||
: (s = ua.match(/chrome\/([\d\.]+)/))
|
||||
? (Sys.chrome = s[1])
|
||||
: (s = ua.match(/version\/([\d\.]+).*safari/))
|
||||
? (Sys.safari = s[1])
|
||||
: 0;
|
||||
// 根据关系进行判断
|
||||
if (Sys.ie) return "IE: " + Sys.ie;
|
||||
if (Sys.edge) return "Edge: " + Sys.edge;
|
||||
if (Sys.firefox) return "Firefox: " + Sys.firefox;
|
||||
if (Sys.chrome) return "Chrome: " + Sys.chrome;
|
||||
if (Sys.opera) return "Opera: " + Sys.opera;
|
||||
if (Sys.safari) return "Safari: " + Sys.safari;
|
||||
return "Unkonwn";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.browserTip {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
background-color: rgba(250, 205, 145, 0.129411764705882);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 20px;
|
||||
color: #555;
|
||||
i {
|
||||
color: red;
|
||||
font-size: 24px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -213,7 +213,6 @@ export default {
|
||||
}).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result
|
||||
console.log(this.$d.GlobalAssessType)
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
@@ -265,7 +264,7 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-form-item__content{
|
||||
width: calc(100% - 110px);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<el-radio-group v-model="scope.row.CrterionDictionaryGroup" @change="(v) => {crterionDictionaryGroupChange(v, scope.row)}" size="mini">
|
||||
<el-radio-button v-for="item of $d.CrterionDictionaryGroup" :label="item.value">{{item.label}}</el-radio-button>
|
||||
<el-radio-button v-for="item of $d.CrterionDictionaryGroup" :label="item.value" :key="item.id">{{item.label}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</template>
|
||||
@@ -158,7 +158,6 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
console.log(this.$d[this.parentCode])
|
||||
},
|
||||
methods: {
|
||||
crterionDictionaryGroupChange(v, row) {
|
||||
@@ -231,7 +230,7 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-form-item__content{
|
||||
width: calc(100% - 110px);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,15 @@
|
||||
>
|
||||
<div class="base-dialog-body">
|
||||
<el-form-item label="类型" prop="Type">
|
||||
<el-select v-model="form.Type" clearable @change="((val)=>{typeChange(val, form)})">
|
||||
<el-select
|
||||
v-model="form.Type"
|
||||
clearable
|
||||
@change="
|
||||
(val) => {
|
||||
typeChange(val, form)
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.Criterion_Question_Type"
|
||||
:key="item.value"
|
||||
@@ -31,10 +39,7 @@
|
||||
v-if="form.Type === 'group'"
|
||||
prop="GroupClassify"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.GroupClassify"
|
||||
clearable
|
||||
>
|
||||
<el-select v-model="form.GroupClassify" clearable>
|
||||
<el-option
|
||||
v-for="item of groupClassifyList"
|
||||
:key="item.Id"
|
||||
@@ -70,13 +75,9 @@
|
||||
v-if="form.Type === 'number' || form.Type === 'calculation'"
|
||||
label="数值类型"
|
||||
prop="ValueType"
|
||||
:rules="[
|
||||
{ required: true, message: '请选择'}
|
||||
]"
|
||||
:rules="[{ required: true, message: '请选择' }]"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="form.ValueType"
|
||||
>
|
||||
<el-radio-group v-model="form.ValueType">
|
||||
<el-radio
|
||||
v-for="item of $d.ValueType"
|
||||
:key="item.id"
|
||||
@@ -92,9 +93,7 @@
|
||||
v-if="form.Type === 'number' || form.Type === 'calculation'"
|
||||
label="单位"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="form.Unit"
|
||||
>
|
||||
<el-radio-group v-model="form.Unit">
|
||||
<el-radio
|
||||
v-for="item of $d.ValueUnit"
|
||||
:key="item.id"
|
||||
@@ -109,15 +108,26 @@
|
||||
label="表格类型标识"
|
||||
prop="LesionType"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.LesionType"
|
||||
clearable
|
||||
>
|
||||
<el-select v-model="form.LesionType" clearable>
|
||||
<el-option
|
||||
v-for="item of lesionTypes"
|
||||
:key="item.Code"
|
||||
:value="parseInt(item.Code)"
|
||||
:label="$fd('LesionType',parseInt(item.Code))"
|
||||
:label="$fd('LesionType', parseInt(item.Code))"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.Type === 'basicTable'"
|
||||
label="表格类型标识"
|
||||
prop="LesionType"
|
||||
>
|
||||
<el-select v-model="form.LesionType" clearable>
|
||||
<el-option
|
||||
v-for="item of lesionTypeList"
|
||||
:key="item.Id"
|
||||
:value="parseInt(item.Code)"
|
||||
:label="item.ValueCN"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -133,25 +143,27 @@
|
||||
</el-form-item> -->
|
||||
<!-- 选项类型 -->
|
||||
<el-form-item
|
||||
v-if="form.Type === 'select' || form.Type === 'radio' || form.Type === 'calculation'"
|
||||
v-if="
|
||||
form.Type === 'select' ||
|
||||
form.Type === 'radio' ||
|
||||
form.Type === 'calculation'
|
||||
"
|
||||
label="选项类型"
|
||||
prop="QuestionGenre"
|
||||
:rules="[
|
||||
{ required: form.Type !== 'calculation', message: '请选择'}
|
||||
]"
|
||||
:rules="[{ required: form.Type !== 'calculation', message: '请选择' }]"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="form.QuestionGenre"
|
||||
@change="((val)=>{questionGenreChange(val, form)})"
|
||||
@change="
|
||||
(val) => {
|
||||
questionGenreChange(val, form)
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-radio
|
||||
:label="-1"
|
||||
>
|
||||
无
|
||||
</el-radio>
|
||||
<el-radio :label="-1"> 无 </el-radio>
|
||||
<el-radio
|
||||
v-for="item of $d.TableQuestionType"
|
||||
v-show="item.value===0 || item.value===3"
|
||||
v-show="item.value === 0 || item.value === 3"
|
||||
:key="item.id"
|
||||
:label="item.value"
|
||||
>
|
||||
@@ -183,13 +195,8 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="转化显示类型"
|
||||
prop="ConvertShowType"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="form.ConvertShowType"
|
||||
>
|
||||
<el-form-item label="转化显示类型" prop="ConvertShowType">
|
||||
<el-radio-group v-model="form.ConvertShowType">
|
||||
<el-radio
|
||||
v-for="item of $d.ConvertShowType"
|
||||
:key="item.id"
|
||||
@@ -200,11 +207,19 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.QuestionGenre === 3 "
|
||||
v-if="form.QuestionGenre === 3"
|
||||
label="关联字典"
|
||||
prop="DictionaryCode"
|
||||
>
|
||||
<el-select v-model="form.DictionaryCode" clearable @change="() => {form.DefaultValue = null}">
|
||||
<el-select
|
||||
v-model="form.DictionaryCode"
|
||||
clearable
|
||||
@change="
|
||||
() => {
|
||||
form.DefaultValue = null
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of dicList"
|
||||
:key="item.Id"
|
||||
@@ -213,10 +228,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.QuestionGenre === 3 "
|
||||
label="默认值"
|
||||
>
|
||||
<el-form-item v-if="form.QuestionGenre === 3" label="默认值">
|
||||
<el-select v-model="form.DefaultValue" clearable>
|
||||
<el-option
|
||||
v-for="item of form.DictionaryCode ? $d[form.DictionaryCode] : []"
|
||||
@@ -226,10 +238,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.QuestionGenre === 0 "
|
||||
label="默认值"
|
||||
>
|
||||
<el-form-item v-if="form.QuestionGenre === 0" label="默认值">
|
||||
<el-select v-model="form.DefaultValue" clearable>
|
||||
<el-option
|
||||
v-for="item of form.TypeValue ? form.TypeValue.split('|') : []"
|
||||
@@ -240,10 +249,18 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.Type !== 'group'" label="是否显示" prop="ShowQuestion">
|
||||
<el-form-item
|
||||
v-if="form.Type !== 'group'"
|
||||
label="是否显示"
|
||||
prop="ShowQuestion"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="form.ShowQuestion"
|
||||
@change="((val)=>{isShowQuestionChange(val, form)})"
|
||||
@change="
|
||||
(val) => {
|
||||
isShowQuestionChange(val, form)
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-radio
|
||||
v-for="item of $d.ShowQuestion"
|
||||
@@ -257,14 +274,18 @@
|
||||
|
||||
<!-- 显示时依赖父问题 -->
|
||||
<el-form-item
|
||||
v-if="form.Type !== 'group' && form.ShowQuestion===1"
|
||||
v-if="form.Type !== 'group' && form.ShowQuestion === 1"
|
||||
label="显示依赖父问题"
|
||||
prop="ParentId"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.ParentId"
|
||||
clearable
|
||||
@change="((val)=>{parentQuestionChange(val, form)})"
|
||||
@change="
|
||||
(val) => {
|
||||
parentQuestionChange(val, form)
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of parentOptions"
|
||||
@@ -275,15 +296,19 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 显示时依赖父问题触发值 -->
|
||||
<el-form-item v-if="form.ParentId && form.ShowQuestion===1" label="显示触发值" prop="ParentTriggerValueList">
|
||||
<!-- <el-select v-model="form.ParentTriggerValue" clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item of parentTriggerValOptions"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value.toString()"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<el-form-item
|
||||
v-if="form.ParentId && form.ShowQuestion === 1"
|
||||
label="显示触发值"
|
||||
prop="ParentTriggerValueList"
|
||||
>
|
||||
<!-- <el-select v-model="form.ParentTriggerValue" clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item of parentTriggerValOptions"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value.toString()"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<el-select v-model="form.ParentTriggerValueList" clearable multiple>
|
||||
<el-option
|
||||
v-for="item of parentTriggerValOptions"
|
||||
@@ -293,16 +318,44 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.Type === 'select' || form.Type === 'radio' || form.Type === 'calculation'" label="是否裁判问题">
|
||||
<el-radio-group v-model="form.IsJudgeQuestion" @change="((val)=>{isJudgeQuestionChange(val, form)})">
|
||||
<el-radio v-for="item of $d.YesOrNo" :key="`YesOrNo${item.value}`" :label="item.value">{{ item.label }}</el-radio>
|
||||
<el-form-item
|
||||
v-if="
|
||||
form.Type === 'select' ||
|
||||
form.Type === 'radio' ||
|
||||
form.Type === 'calculation' ||
|
||||
form.Type === 'number'
|
||||
"
|
||||
label="是否裁判问题"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="form.IsJudgeQuestion"
|
||||
@change="
|
||||
(val) => {
|
||||
isJudgeQuestionChange(val, form)
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-radio
|
||||
v-for="item of $d.YesOrNo"
|
||||
:key="`YesOrNo${item.value}`"
|
||||
:label="item.value"
|
||||
>{{ item.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.Type !== 'group' && form.Type !== 'table'" label="是否必填" prop="IsRequired">
|
||||
<el-form-item
|
||||
v-if="form.Type !== 'group' && form.Type !== 'table'"
|
||||
label="是否必填"
|
||||
prop="IsRequired"
|
||||
>
|
||||
<el-radio-group
|
||||
v-model="form.IsRequired"
|
||||
:disabled="form.IsJudgeQuestion===true || form.ShowQuestion===2"
|
||||
@change="((val)=>{isRequiredChange(val, form)})"
|
||||
:disabled="form.IsJudgeQuestion === true || form.ShowQuestion === 2"
|
||||
@change="
|
||||
(val) => {
|
||||
isRequiredChange(val, form)
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-radio
|
||||
v-for="item of $d.QuestionRequired"
|
||||
@@ -323,7 +376,11 @@
|
||||
<el-select
|
||||
v-model="form.RelevanceId"
|
||||
clearable
|
||||
@change="((val)=>{relevanceQuestionChange(val, form)})"
|
||||
@change="
|
||||
(val) => {
|
||||
relevanceQuestionChange(val, form)
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of parentOptions"
|
||||
@@ -339,14 +396,14 @@
|
||||
label="必填触发值"
|
||||
prop="RelevanceValueList"
|
||||
>
|
||||
<!-- <el-select v-model="form.RelevanceValue" clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item of reParentTriggerValOptions"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value.toString()"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- <el-select v-model="form.RelevanceValue" clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item of reParentTriggerValOptions"-->
|
||||
<!-- :key="item.id"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value.toString()"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
<el-select v-model="form.RelevanceValueList" clearable multiple>
|
||||
<el-option
|
||||
v-for="item of reParentTriggerValOptions"
|
||||
@@ -385,7 +442,11 @@
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item v-if="form.Type !== 'group'" label="问题分组">
|
||||
<el-select v-model="form.GroupId" clearable :disabled="isParentExistGroup">
|
||||
<el-select
|
||||
v-model="form.GroupId"
|
||||
clearable
|
||||
:disabled="isParentExistGroup"
|
||||
>
|
||||
<el-option
|
||||
v-for="group of groupOptions"
|
||||
:key="group.GroupId"
|
||||
@@ -396,12 +457,22 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="限制编辑">
|
||||
<el-radio-group v-model="form.LimitEdit">
|
||||
<el-radio v-for="item of $d.LimitEdit" :key="`LimitEdit${item.value}`" :label="item.value">{{ item.label }}</el-radio>
|
||||
<el-radio
|
||||
v-for="item of $d.LimitEdit"
|
||||
:key="`LimitEdit${item.value}`"
|
||||
:label="item.value"
|
||||
>{{ item.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="全局阅片是否显示">
|
||||
<el-radio-group v-model="form.GlobalReadingShowType">
|
||||
<el-radio v-for="item of $d.GlobalReadingShowType" :key="item.id" :label="item.value">{{ item.label }}</el-radio>
|
||||
<el-radio
|
||||
v-for="item of $d.GlobalReadingShowType"
|
||||
:key="item.id"
|
||||
:label="item.value"
|
||||
>{{ item.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@@ -409,10 +480,7 @@
|
||||
v-if="form.Type !== 'group'"
|
||||
prop="QuestionType"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.QuestionType"
|
||||
clearable
|
||||
>
|
||||
<el-select v-model="form.QuestionType" clearable>
|
||||
<el-option
|
||||
v-for="item of CriterionDictionaryList.QuestionType"
|
||||
:key="item.Id"
|
||||
@@ -428,11 +496,37 @@
|
||||
</el-radio-group>
|
||||
</el-form-item> -->
|
||||
<el-form-item v-if="form.Type === 'upload'" label="最大上传个数">
|
||||
<el-input-number v-model="form.ImageCount" controls-position="right" :min="1" :max="10" />
|
||||
<el-input-number
|
||||
v-model="form.ImageCount"
|
||||
controls-position="right"
|
||||
:min="1"
|
||||
:max="10"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="form.Type === 'select' || form.Type === 'radio'"
|
||||
label="高亮标记值"
|
||||
prop="HighlightAnswerList"
|
||||
>
|
||||
<el-select v-model="form.HighlightAnswerList" clearable multiple>
|
||||
<template v-if="form.TypeValue">
|
||||
<el-option
|
||||
v-for="item of form.TypeValue.split('|')"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="form.DictionaryCode">
|
||||
<el-option
|
||||
v-for="item of highlightAnswers"
|
||||
:key="item.Id"
|
||||
:label="item.ValueCN"
|
||||
:value="item.Code"
|
||||
/>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item v-if="form.Type !== 'group' && form.Type !== 'summary'" label="注释">-->
|
||||
<!-- <el-input v-model="form.Remark" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="序号" prop="ShowOrder">
|
||||
<el-input-number
|
||||
v-model="form.ShowOrder"
|
||||
@@ -454,20 +548,23 @@
|
||||
|
||||
<el-form-item label="是否在阅片页面显示">
|
||||
<el-radio-group v-model="form.IsShowInDicom">
|
||||
<el-radio v-for="item of $d.YesOrNo" :key="`YesOrNo${item.value}`" :label="item.value">{{ item.label }}</el-radio>
|
||||
<el-radio
|
||||
v-for="item of $d.YesOrNo"
|
||||
:key="`YesOrNo${item.value}`"
|
||||
:label="item.value"
|
||||
>{{ item.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('trials:readingUnit:qsList:title:Remark')"
|
||||
prop="Remark"
|
||||
>
|
||||
<el-input
|
||||
v-model="form.Remark"
|
||||
/>
|
||||
<el-input v-model="form.Remark" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
|
||||
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
|
||||
<el-form-item>
|
||||
<!-- 取消 -->
|
||||
<el-button
|
||||
@@ -479,7 +576,12 @@
|
||||
{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
<el-button size="small" type="primary" :loading="btnLoading" @click="save">
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:loading="btnLoading"
|
||||
@click="save"
|
||||
>
|
||||
{{ $t('common:button:save') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
@@ -487,19 +589,30 @@
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { getBasicConfigSelect, addOrUpdateReadingQuestionSystem, getSystemCriterionOtherQuestion, getSystemGroupNameList, getCriterionDictionary, getCriterionDictionaryList } from '@/api/dictionary'
|
||||
import {
|
||||
getBasicConfigSelect,
|
||||
addOrUpdateReadingQuestionSystem,
|
||||
getSystemCriterionOtherQuestion,
|
||||
getSystemGroupNameList,
|
||||
getCriterionDictionary,
|
||||
getCriterionDictionaryList,
|
||||
} from '@/api/dictionary'
|
||||
import { getCriterionLesionType } from '@/api/trials'
|
||||
export default {
|
||||
name: 'AddOrUpdateClinicalData',
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default() { return {} }
|
||||
default() {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default() { return '' }
|
||||
}
|
||||
default() {
|
||||
return ''
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
var validateTypeVal = (rule, value, callback) => {
|
||||
@@ -536,7 +649,7 @@ export default {
|
||||
IsJudgeQuestion: false,
|
||||
GroupName: '',
|
||||
GroupEnName: '',
|
||||
GroupClassify:null,
|
||||
GroupClassify: null,
|
||||
Remark: '',
|
||||
ImageCount: 1,
|
||||
RelevanceId: '',
|
||||
@@ -552,32 +665,39 @@ export default {
|
||||
LimitEdit: 0,
|
||||
GroupId: null,
|
||||
ConvertShowType: 0,
|
||||
QuestionClassify: null
|
||||
QuestionClassify: null,
|
||||
HighlightAnswerList: [],
|
||||
},
|
||||
rules: {
|
||||
Type: [
|
||||
{ required: true, message: '请选择', trigger: 'blur' }
|
||||
Type: [{ required: true, message: '请选择', trigger: 'blur' }],
|
||||
LesionType: [{ required: true, message: '请选择', trigger: 'blur' }],
|
||||
QuestionName: [
|
||||
{ required: true, message: '请注明', trigger: 'blur' },
|
||||
{ max: 300, message: '最大长度为 300' },
|
||||
],
|
||||
LesionType: [
|
||||
{ required: true, message: '请选择', trigger: 'blur' }
|
||||
],
|
||||
QuestionName: [{ required: true, message: '请注明', trigger: 'blur' },
|
||||
{ max: 300, message: '最大长度为 300' }],
|
||||
QuestionGenre: [{ required: true, message: '请选择', trigger: 'blur' }],
|
||||
TypeValue: [{ required: true, message: '请注明', trigger: 'blur' },
|
||||
TypeValue: [
|
||||
{ required: true, message: '请注明', trigger: 'blur' },
|
||||
{ validator: validateTypeVal, trigger: 'blur' },
|
||||
{ max: 500, message: '最大长度为 500' }],
|
||||
DictionaryCode: [{ required: true, message: '请选择', trigger: 'blur' }],
|
||||
{ max: 500, message: '最大长度为 500' },
|
||||
],
|
||||
DictionaryCode: [
|
||||
{ required: true, message: '请选择', trigger: 'blur' },
|
||||
],
|
||||
ShowQuestion: [{ required: true, message: '请选择', trigger: 'blur' }],
|
||||
IsRequired: [{ required: true, message: '请选择', trigger: 'blur' }],
|
||||
ParentId: [{ required: true, message: '请选择', trigger: 'blur' }],
|
||||
ParentTriggerValueList: [
|
||||
{ required: true, message: '请选择', trigger: 'blur' }
|
||||
{ required: true, message: '请选择', trigger: 'blur' },
|
||||
],
|
||||
RelevanceId: [{ required: true, message: '请选择', trigger: 'blur' }],
|
||||
RelevanceValueList: [{ required: true, message: '请选择', trigger: 'blur' }],
|
||||
GroupName: [{ required: true, message: '请注明', trigger: 'blur' },
|
||||
{ max: 50, message: '最大长度为 50' }]
|
||||
RelevanceValueList: [
|
||||
{ required: true, message: '请选择', trigger: 'blur' },
|
||||
],
|
||||
GroupName: [
|
||||
{ required: true, message: '请注明', trigger: 'blur' },
|
||||
{ max: 50, message: '最大长度为 50' },
|
||||
],
|
||||
},
|
||||
loading: false,
|
||||
btnLoading: false,
|
||||
@@ -588,9 +708,32 @@ export default {
|
||||
lesionTypes: [],
|
||||
dicList: [],
|
||||
CriterionDictionaryList: [],
|
||||
groupClassifyList:[]
|
||||
groupClassifyList: [],
|
||||
highlightAnswers: [],
|
||||
lesionTypeList: []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'form.DictionaryCode': {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
async handler(v, oldv) {
|
||||
try {
|
||||
if (!v) {
|
||||
this.highlightAnswers = []
|
||||
return
|
||||
}
|
||||
let res = await getCriterionDictionary({
|
||||
ReadingCriterionId: this.data.ReadingQuestionCriterionSystemId,
|
||||
DictionaryCode: this.form.DictionaryCode,
|
||||
})
|
||||
this.highlightAnswers = res.Result[this.form.DictionaryCode]
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.initForm()
|
||||
},
|
||||
@@ -598,61 +741,79 @@ export default {
|
||||
getCriterionDictionary() {
|
||||
getCriterionDictionary({
|
||||
ReadingCriterionId: this.data.ReadingQuestionCriterionSystemId,
|
||||
DictionaryCode: 'QuestionType'
|
||||
}).then(res => {
|
||||
DictionaryCode: 'QuestionType',
|
||||
}).then((res) => {
|
||||
this.CriterionDictionaryList = res.Result
|
||||
})
|
||||
},
|
||||
getGroupClassifyDictionary() {
|
||||
getCriterionDictionary({
|
||||
ReadingCriterionId: this.data.ReadingQuestionCriterionSystemId,
|
||||
DictionaryCode: 'GroupClassify'
|
||||
}).then(res => {
|
||||
DictionaryCode: 'GroupClassify',
|
||||
}).then((res) => {
|
||||
this.groupClassifyList = res.Result.GroupClassify
|
||||
})
|
||||
},
|
||||
getLesionTypeDictionary() {
|
||||
getCriterionDictionary({
|
||||
ReadingCriterionId: this.data.ReadingQuestionCriterionSystemId,
|
||||
DictionaryCode: 'LesionType',
|
||||
}).then((res) => {
|
||||
this.lesionTypeList = res.Result.LesionType
|
||||
})
|
||||
},
|
||||
async initForm() {
|
||||
await this.getGroupOptions()
|
||||
await this.getParentQuestions()
|
||||
await this.getLesionTypeDictionary()
|
||||
await this.getLesionType()
|
||||
await this.getBasicConfigSelect()
|
||||
if (Object.keys(this.data).length > 0) {
|
||||
for (const k in this.form) {
|
||||
if (this.data.hasOwnProperty(k)) {
|
||||
this.form[k] = this.data[k]
|
||||
}
|
||||
}
|
||||
if (this.form.ParentId !== '' && this.form.ParentId !== null && this.form.GroupName !== '') {
|
||||
if (
|
||||
this.form.ParentId !== '' &&
|
||||
this.form.ParentId !== null &&
|
||||
this.form.GroupName !== ''
|
||||
) {
|
||||
this.isParentExistGroup = true
|
||||
}
|
||||
if (this.form.ParentId) {
|
||||
var index = this.parentOptions.findIndex(item => {
|
||||
var index = this.parentOptions.findIndex((item) => {
|
||||
return item.QuestionId === this.form.ParentId
|
||||
})
|
||||
if (index !== -1) {
|
||||
if (this.parentOptions[index].QuestionGenre === 3) {
|
||||
this.parentTriggerValOptions = this.$d[this.parentOptions[index].DictionaryCode]
|
||||
this.parentTriggerValOptions =
|
||||
this.$d[this.parentOptions[index].DictionaryCode]
|
||||
} else {
|
||||
const options = []
|
||||
this.parentOptions[index].TypeValue.split('|').forEach((item, index) => {
|
||||
options.push({ id: index, label: item, value: item })
|
||||
})
|
||||
this.parentOptions[index].TypeValue.split('|').forEach(
|
||||
(item, index) => {
|
||||
options.push({ id: index, label: item, value: item })
|
||||
}
|
||||
)
|
||||
this.parentTriggerValOptions = options
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.form.RelevanceId) {
|
||||
var index = this.parentOptions.findIndex(item => {
|
||||
var index = this.parentOptions.findIndex((item) => {
|
||||
return item.QuestionId === this.form.RelevanceId
|
||||
})
|
||||
if (index !== -1) {
|
||||
if (this.parentOptions[index].QuestionGenre === 3) {
|
||||
this.reParentTriggerValOptions = this.$d[this.parentOptions[index].DictionaryCode]
|
||||
this.reParentTriggerValOptions =
|
||||
this.$d[this.parentOptions[index].DictionaryCode]
|
||||
} else {
|
||||
const options = []
|
||||
this.parentOptions[index].TypeValue.split('|').forEach((item, index) => {
|
||||
options.push({ id: index, label: item, value: item })
|
||||
})
|
||||
this.parentOptions[index].TypeValue.split('|').forEach(
|
||||
(item, index) => {
|
||||
options.push({ id: index, label: item, value: item })
|
||||
}
|
||||
)
|
||||
this.reParentTriggerValOptions = options
|
||||
}
|
||||
}
|
||||
@@ -662,66 +823,60 @@ export default {
|
||||
this.getGroupClassifyDictionary()
|
||||
},
|
||||
save() {
|
||||
this.$refs.clinicalDataForm.validate(valid => {
|
||||
this.$refs.clinicalDataForm.validate((valid) => {
|
||||
if (!valid) return
|
||||
this.btnLoading = true
|
||||
if (this.form.Type !== 'upload') {
|
||||
this.form.ImageCount = 0
|
||||
}
|
||||
addOrUpdateReadingQuestionSystem(this.form).then(res => {
|
||||
this.btnLoading = false
|
||||
this.$emit('getList')
|
||||
this.$emit('close')
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
})
|
||||
addOrUpdateReadingQuestionSystem(this.form)
|
||||
.then((res) => {
|
||||
this.btnLoading = false
|
||||
this.$emit('getList')
|
||||
this.$emit('close')
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
})
|
||||
.catch(() => {
|
||||
this.btnLoading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
getBasicConfigSelect() {
|
||||
// getBasicConfigSelect('Reading_eCRF_Criterion').then(res => {
|
||||
// this.dicList = res.Result
|
||||
// })
|
||||
getCriterionDictionaryList({
|
||||
CriterionId: this.data.ReadingQuestionCriterionSystemId,
|
||||
SystemCriterionId: this.data.ReadingQuestionCriterionSystemId
|
||||
}).then(res => {
|
||||
console.log(this.dicList)
|
||||
this.dicList = res.Result
|
||||
})
|
||||
},
|
||||
getGroupOptions() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.loading = true
|
||||
var param = {
|
||||
criterionId: this.data.ReadingQuestionCriterionSystemId
|
||||
criterionId: this.data.ReadingQuestionCriterionSystemId,
|
||||
}
|
||||
getSystemGroupNameList(param).then(res => {
|
||||
this.groupOptions = res.Result
|
||||
this.loading = false
|
||||
resolve()
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
reject()
|
||||
})
|
||||
getSystemGroupNameList(param)
|
||||
.then((res) => {
|
||||
this.groupOptions = res.Result
|
||||
this.loading = false
|
||||
resolve()
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
reject()
|
||||
})
|
||||
})
|
||||
},
|
||||
getParentQuestions() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.loading = true
|
||||
var param = {
|
||||
readingQuestionCriterionSystemId: this.data.ReadingQuestionCriterionSystemId,
|
||||
id: this.data.Id
|
||||
readingQuestionCriterionSystemId:
|
||||
this.data.ReadingQuestionCriterionSystemId,
|
||||
id: this.data.Id,
|
||||
}
|
||||
getSystemCriterionOtherQuestion(param).then(res => {
|
||||
this.parentOptions = res.Result
|
||||
this.loading = false
|
||||
resolve()
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
reject()
|
||||
})
|
||||
getSystemCriterionOtherQuestion(param)
|
||||
.then((res) => {
|
||||
this.parentOptions = res.Result
|
||||
this.loading = false
|
||||
resolve()
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
reject()
|
||||
})
|
||||
})
|
||||
},
|
||||
questionGenreChange(val, form) {
|
||||
@@ -792,17 +947,20 @@ export default {
|
||||
parentQuestionChange(val, form) {
|
||||
this.isParentExistGroup = false
|
||||
if (val) {
|
||||
var index = this.parentOptions.findIndex(item => {
|
||||
var index = this.parentOptions.findIndex((item) => {
|
||||
return item.QuestionId === val
|
||||
})
|
||||
if (index !== -1) {
|
||||
if (this.parentOptions[index].QuestionGenre === 3) {
|
||||
this.parentTriggerValOptions = this.$d[this.parentOptions[index].DictionaryCode]
|
||||
this.parentTriggerValOptions =
|
||||
this.$d[this.parentOptions[index].DictionaryCode]
|
||||
} else {
|
||||
var options = []
|
||||
this.parentOptions[index].TypeValue.split('|').forEach((item, index) => {
|
||||
options.push({ id: index, label: item, value: item })
|
||||
})
|
||||
this.parentOptions[index].TypeValue.split('|').forEach(
|
||||
(item, index) => {
|
||||
options.push({ id: index, label: item, value: item })
|
||||
}
|
||||
)
|
||||
this.parentTriggerValOptions = options
|
||||
}
|
||||
if (this.parentOptions[index].GroupName) {
|
||||
@@ -818,17 +976,20 @@ export default {
|
||||
},
|
||||
relevanceQuestionChange(val, form) {
|
||||
if (val) {
|
||||
var index = this.parentOptions.findIndex(item => {
|
||||
var index = this.parentOptions.findIndex((item) => {
|
||||
return item.QuestionId === val
|
||||
})
|
||||
if (index !== -1) {
|
||||
if (this.parentOptions[index].QuestionGenre === 3) {
|
||||
this.reParentTriggerValOptions = this.$d[this.parentOptions[index].DictionaryCode]
|
||||
this.reParentTriggerValOptions =
|
||||
this.$d[this.parentOptions[index].DictionaryCode]
|
||||
} else {
|
||||
var options = []
|
||||
this.parentOptions[index].TypeValue.split('|').forEach((item, index) => {
|
||||
options.push({ id: index, label: item, value: item })
|
||||
})
|
||||
this.parentOptions[index].TypeValue.split('|').forEach(
|
||||
(item, index) => {
|
||||
options.push({ id: index, label: item, value: item })
|
||||
}
|
||||
)
|
||||
this.reParentTriggerValOptions = options
|
||||
}
|
||||
}
|
||||
@@ -844,23 +1005,24 @@ export default {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.loading = true
|
||||
var param = {
|
||||
SystemCriterionId: this.data.ReadingQuestionCriterionSystemId
|
||||
SystemCriterionId: this.data.ReadingQuestionCriterionSystemId,
|
||||
}
|
||||
getCriterionLesionType(param).then(res => {
|
||||
this.lesionTypes = res.Result
|
||||
this.loading = false
|
||||
resolve()
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
reject()
|
||||
})
|
||||
getCriterionLesionType(param)
|
||||
.then((res) => {
|
||||
this.lesionTypes = res.Result
|
||||
this.loading = false
|
||||
resolve()
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
reject()
|
||||
})
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.$emit('close')
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
:disabled="scope.row.Type !== 'table'"
|
||||
:disabled="!(scope.row.Type === 'table' || scope.row.Type === 'basicTable')"
|
||||
@click="handleConfig(scope.row)"
|
||||
>
|
||||
表格问题
|
||||
|
||||
@@ -113,13 +113,13 @@
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="raw.ValueCN"
|
||||
prop="ValueCN"
|
||||
label="中文值"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="raw.Value"
|
||||
prop="Value"
|
||||
label="英文值"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
>{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="序号">
|
||||
<el-form-item label="序号" prop="ShowOrder">
|
||||
<el-input v-model="form.ShowOrder" type="number" />
|
||||
</el-form-item>
|
||||
<!-- 描述 -->
|
||||
@@ -135,7 +135,8 @@ export default {
|
||||
Part: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] }],
|
||||
TULOC: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] }],
|
||||
Remark: [{ max: 500, message: `${this.$t('common:ruleMessage:maxLength')} 500`, trigger: ['blur', 'change'] }],
|
||||
IsLymphNodes: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] }]
|
||||
IsLymphNodes: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] }],
|
||||
ShowOrder: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] }]
|
||||
},
|
||||
lesionTypes: [],
|
||||
loading: false,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<el-form :inline="true" size="mini">
|
||||
<el-form-item label="器官类型">
|
||||
<el-select v-model="searchData.OrganType" clearable style="width:130px;">
|
||||
<el-option v-for="item of CriterionDictionaryOrganTypeList.OrganType" :key="item.Id" :value="parseInt(item.Code)" :label="item.ValueCN" />
|
||||
<el-option v-for="item of CriterionDictionaryOrganTypeList && CriterionDictionaryOrganTypeList.OrganType" :key="item.Id" :value="parseInt(item.Code)" :label="item.ValueCN" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="部位">
|
||||
|
||||
@@ -315,7 +315,26 @@
|
||||
:max="10"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="form.Type === 'select' || form.Type === 'radio'" label="高亮标记值" prop="HighlightAnswerList">
|
||||
<el-select v-model="form.HighlightAnswerList" clearable multiple>
|
||||
<template v-if="form.TypeValue">
|
||||
<el-option
|
||||
v-for="item of form.TypeValue.split('|')"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="form.DictionaryCode">
|
||||
<el-option
|
||||
v-for="item of $d[form.DictionaryCode]"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value.toString()"
|
||||
/>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="序号" prop="ShowOrder">
|
||||
<el-input-number
|
||||
v-model="form.ShowOrder"
|
||||
@@ -427,7 +446,8 @@ export default {
|
||||
QuestionMark: null,
|
||||
LimitEdit: 0,
|
||||
GlobalReadingShowType: null,
|
||||
QuestionClassify: null
|
||||
QuestionClassify: null,
|
||||
HighlightAnswerList: []
|
||||
|
||||
// IsEnable: true
|
||||
},
|
||||
|
||||
@@ -59,9 +59,14 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="systemLevel !== 1">
|
||||
<el-form-item label="收件人" prop="ToUserTypeList">
|
||||
<el-select v-model="form.ToUserTypeList" clearable multiple class="mr">
|
||||
<el-select
|
||||
v-model="form.ToUserTypeList"
|
||||
clearable
|
||||
multiple
|
||||
class="mr"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.UserType"
|
||||
:key="`ToUserTypeList${item.label}`"
|
||||
@@ -71,9 +76,14 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!systemLevel">
|
||||
<el-form-item label="抄送人" prop="CopyUserTypeList">
|
||||
<el-select v-model="form.CopyUserTypeList" clearable multiple class="mr">
|
||||
<el-select
|
||||
v-model="form.CopyUserTypeList"
|
||||
clearable
|
||||
multiple
|
||||
class="mr"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.UserType"
|
||||
:key="`CopyUserTypeList${item.label}`"
|
||||
@@ -83,9 +93,18 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!systemLevel">
|
||||
<el-form-item label="加急状态" prop="EmailUrgentEnum">
|
||||
<el-select v-model="form.EmailUrgentEnum" @change="(v) => {v === 1 ? form.EmailCron = null : null}" clearable class="mr">
|
||||
<el-select
|
||||
v-model="form.EmailUrgentEnum"
|
||||
@change="
|
||||
(v) => {
|
||||
v === 1 ? (form.EmailCron = null) : null;
|
||||
}
|
||||
"
|
||||
clearable
|
||||
class="mr"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.EmailUrgent"
|
||||
:key="`EmailUrgent${item.label}`"
|
||||
@@ -95,13 +114,17 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发送周期和时间" v-if="form.EmailUrgentEnum !== 1" prop="EmailCron">
|
||||
<el-col :span="12" v-if="!systemLevel">
|
||||
<el-form-item
|
||||
label="发送周期和时间"
|
||||
v-if="form.EmailUrgentEnum !== 1"
|
||||
prop="EmailCron"
|
||||
>
|
||||
<el-input style="width: 300px" readonly v-model="form.EmailCron" />
|
||||
<el-button type="primary" @click="showDialog">生成 cron</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!systemLevel">
|
||||
<el-form-item label="是否需要回执" prop="IsReturnRequired">
|
||||
<el-radio-group v-model="form.IsReturnRequired">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
@@ -109,7 +132,7 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!systemLevel">
|
||||
<el-form-item label="是否自动发送" prop="IsAutoSend">
|
||||
<el-radio-group v-model="form.IsAutoSend">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
@@ -117,18 +140,27 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!systemLevel">
|
||||
<el-form-item label="是否区分标准" prop="IsDistinguishCriteria">
|
||||
<el-radio-group v-model="form.IsDistinguishCriteria" @change="() => {form.CriterionTypeEnum = null}">
|
||||
<el-radio-group
|
||||
v-model="form.IsDistinguishCriteria"
|
||||
@change="
|
||||
() => {
|
||||
form.CriterionTypeEnum = null;
|
||||
}
|
||||
"
|
||||
>
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!systemLevel">
|
||||
<el-form-item
|
||||
:label="$t('trials:auditRecord:table:criterion')"
|
||||
v-if="form.IsDistinguishCriteria" prop="CriterionTypeEnum">
|
||||
v-if="form.IsDistinguishCriteria"
|
||||
prop="CriterionTypeEnum"
|
||||
>
|
||||
<el-select v-model="form.CriterionTypeEnum" clearable class="mr">
|
||||
<el-option
|
||||
v-for="item of $d.CriterionType"
|
||||
@@ -139,7 +171,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!systemLevel">
|
||||
<el-form-item label="是否启用" prop="IsEnable">
|
||||
<el-radio-group v-model="form.IsEnable">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
@@ -147,7 +179,7 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!systemLevel">
|
||||
<el-form-item label="附件(CN)" prop="IsEnable">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
@@ -160,11 +192,16 @@
|
||||
:limit="1"
|
||||
:file-list="fileListCN"
|
||||
>
|
||||
<el-button size="small" type="primary" :disabled="fileListCN.length > 0">{{$t('common:button:upload')}}</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="fileListCN.length > 0"
|
||||
>{{ $t("common:button:upload") }}</el-button
|
||||
>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="12" v-if="!systemLevel">
|
||||
<el-form-item label="附件(EN)" prop="IsEnable">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
@@ -177,7 +214,12 @@
|
||||
:limit="1"
|
||||
:file-list="fileListEN"
|
||||
>
|
||||
<el-button size="small" type="primary" :disabled="fileListEN.length > 0">{{$t('common:button:upload')}}</el-button>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="fileListEN.length > 0"
|
||||
>{{ $t("common:button:upload") }}</el-button
|
||||
>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -186,181 +228,250 @@
|
||||
<el-input
|
||||
v-model="form.EmailHtmlContentCN"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 8, maxRows: 8}"
|
||||
:autosize="{ minRows: 8, maxRows: 8 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮件内容模版(EN)" prop="EmailHtmlContent">
|
||||
<el-input
|
||||
v-model="form.EmailHtmlContent"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 8, maxRows: 8}"
|
||||
:autosize="{ minRows: 8, maxRows: 8 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;padding-bottom: 10px">
|
||||
<el-form-item style="text-align:right;">
|
||||
<el-button size="small" type="primary" @click="handleSave">Save</el-button>
|
||||
<div
|
||||
class="base-dialog-footer"
|
||||
style="text-align: right; margin-top: 10px; padding-bottom: 10px"
|
||||
>
|
||||
<el-form-item style="text-align: right">
|
||||
<el-button size="small" type="primary" @click="handleSave"
|
||||
>Save</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-dialog append-to-body title="生成 cron" :visible.sync="showCron">
|
||||
<vcrontab :hideComponent="['year']" @hide="showCron=false" @fill="crontabFill" :expression="expression"></vcrontab>
|
||||
<vcrontab
|
||||
:hideComponent="['year']"
|
||||
@hide="showCron = false"
|
||||
@fill="crontabFill"
|
||||
:expression="expression"
|
||||
></vcrontab>
|
||||
</el-dialog>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { Upload, addOrUpdateEmailNoticeConfigList } from '@/api/dictionary'
|
||||
import { Upload, addOrUpdateEmailNoticeConfigList } from "@/api/dictionary";
|
||||
export default {
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default() { return {} }
|
||||
}
|
||||
default() {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
systemLevel: {
|
||||
type: Number,
|
||||
default() {
|
||||
return 0;
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
expression: '',
|
||||
expression: "",
|
||||
showCron: false,
|
||||
form: {
|
||||
Id: '',
|
||||
Code: '',
|
||||
EmailTopicCN: '',
|
||||
EmailTopic: '',
|
||||
BusinessLevelEnum: '',
|
||||
BusinessModuleEnum: '',
|
||||
ToUserTypeList: '',
|
||||
CopyUserTypeList: '',
|
||||
EmailUrgentEnum: '',
|
||||
EmailCron: '',
|
||||
Id: "",
|
||||
Code: "",
|
||||
EmailTopicCN: "",
|
||||
EmailTopic: "",
|
||||
BusinessLevelEnum: "",
|
||||
BusinessModuleEnum: "",
|
||||
ToUserTypeList: "",
|
||||
CopyUserTypeList: "",
|
||||
EmailUrgentEnum: "",
|
||||
EmailCron: "",
|
||||
BusinessScenarioEnum: null,
|
||||
EmailHtmlContentCN: '',
|
||||
EmailHtmlContent: '',
|
||||
AttachPath: '',
|
||||
AttachName: '',
|
||||
AttachNameCN: '',
|
||||
AttachCNPath: '',
|
||||
EmailHtmlContentCN: "",
|
||||
EmailHtmlContent: "",
|
||||
AttachPath: "",
|
||||
AttachName: "",
|
||||
AttachNameCN: "",
|
||||
AttachCNPath: "",
|
||||
IsDistinguishCriteria: true,
|
||||
IsReturnRequired: true,
|
||||
IsUrgent: true,
|
||||
IsEnable: true,
|
||||
IsAutoSend: true,
|
||||
CriterionTypeEnum: null
|
||||
CriterionTypeEnum: null,
|
||||
},
|
||||
rules: {
|
||||
Code: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
BusinessScenarioEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
EmailTopicCN: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
EmailTopic: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
BusinessLevelEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
ToUserTypeList: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
EmailCron: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
EmailUrgentEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
EmailHtmlContentCN: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
EmailHtmlContent: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
CriterionTypeEnum: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
Code: [{ required: true, message: "Please select", trigger: ["blur"] }],
|
||||
BusinessScenarioEnum: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
EmailTopicCN: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
EmailTopic: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
BusinessLevelEnum: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
ToUserTypeList: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
EmailCron: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
EmailUrgentEnum: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
EmailHtmlContentCN: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
EmailHtmlContent: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
CriterionTypeEnum: [
|
||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
||||
],
|
||||
},
|
||||
scenarioOption: [],
|
||||
fileListCN: [],
|
||||
fileListEN: [],
|
||||
loading: false
|
||||
}
|
||||
loading: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.initForm()
|
||||
this.initForm();
|
||||
if (this.systemLevel) {
|
||||
if (this.systemLevel === 1) {
|
||||
this.form.ToUserTypeList = [];
|
||||
}
|
||||
this.form.CopyUserTypeList = [];
|
||||
this.form.EmailUrgentEnum = "3";
|
||||
this.form.IsReturnRequired = false;
|
||||
this.form.IsDistinguishCriteria = false;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showDialog() {
|
||||
this.expression = this.form.EmailCron;//传入的 cron 表达式,可以反解析到 UI 上
|
||||
this.expression = this.form.EmailCron; //传入的 cron 表达式,可以反解析到 UI 上
|
||||
this.showCron = true;
|
||||
},
|
||||
crontabFill(value) {
|
||||
this.form.EmailCron = value;
|
||||
},
|
||||
handleRemoveFileCN() {
|
||||
this.form.AttachNameCN = null
|
||||
this.form.AttachCNPath = null
|
||||
this.fileListCN = []
|
||||
this.form.AttachNameCN = null;
|
||||
this.form.AttachCNPath = null;
|
||||
this.fileListCN = [];
|
||||
},
|
||||
beforeUploadCN() {
|
||||
if (this.fileListCN.length > 0) {
|
||||
this.$alert('最多只能传一个附件')
|
||||
return
|
||||
this.$alert("最多只能传一个附件");
|
||||
return;
|
||||
}
|
||||
},
|
||||
handlePreviewCN(row, r2) {
|
||||
if (row.fullPath) {
|
||||
window.open(row.fullPath, '_blank')
|
||||
window.open(row.fullPath, "_blank");
|
||||
}
|
||||
},
|
||||
handleUploadFileCN(param) {
|
||||
this.btnLoading = true
|
||||
const formData = new FormData()
|
||||
formData.append('file', param.file)
|
||||
this.form.AttachNameCN = param.file.name
|
||||
Upload(formData, 3).then(res => {
|
||||
this.form.AttachCNPath = res.Result.FilePath
|
||||
this.btnLoading = false
|
||||
this.fileListCN.push({ name: param.file.name, path: res.Result.FilePath, fullPath: res.Result.FullFilePath, url: res.Result.FilePath })
|
||||
})
|
||||
this.btnLoading = true;
|
||||
const formData = new FormData();
|
||||
formData.append("file", param.file);
|
||||
this.form.AttachNameCN = param.file.name;
|
||||
Upload(formData, 3).then((res) => {
|
||||
this.form.AttachCNPath = res.Result.FilePath;
|
||||
this.btnLoading = false;
|
||||
this.fileListCN.push({
|
||||
name: param.file.name,
|
||||
path: res.Result.FilePath,
|
||||
fullPath: res.Result.FullFilePath,
|
||||
url: res.Result.FilePath,
|
||||
});
|
||||
});
|
||||
},
|
||||
handleUploadFileEN(param) {
|
||||
this.btnLoading = true
|
||||
const formData = new FormData()
|
||||
formData.append('file', param.file)
|
||||
this.form.AttachName = param.file.name
|
||||
Upload(formData, 3).then(res => {
|
||||
this.form.AttachPath = res.Result.FilePath
|
||||
this.btnLoading = false
|
||||
this.fileListEN.push({ name: param.file.name, path: res.Result.FilePath, fullPath: res.Result.FullFilePath, url: res.Result.FilePath })
|
||||
})
|
||||
this.btnLoading = true;
|
||||
const formData = new FormData();
|
||||
formData.append("file", param.file);
|
||||
this.form.AttachName = param.file.name;
|
||||
Upload(formData, 3).then((res) => {
|
||||
this.form.AttachPath = res.Result.FilePath;
|
||||
this.btnLoading = false;
|
||||
this.fileListEN.push({
|
||||
name: param.file.name,
|
||||
path: res.Result.FilePath,
|
||||
fullPath: res.Result.FullFilePath,
|
||||
url: res.Result.FilePath,
|
||||
});
|
||||
});
|
||||
},
|
||||
handleRemoveFileEN() {
|
||||
this.form.AttachName = null
|
||||
this.form.AttachPath = null
|
||||
this.fileListEN = []
|
||||
this.form.AttachName = null;
|
||||
this.form.AttachPath = null;
|
||||
this.fileListEN = [];
|
||||
},
|
||||
beforeUploadEN() {
|
||||
if (this.fileListEN.length > 0) {
|
||||
this.$alert('最多只能传一个附件')
|
||||
return
|
||||
this.$alert("最多只能传一个附件");
|
||||
return;
|
||||
}
|
||||
},
|
||||
handlePreviewEN(row, r2) {
|
||||
if (row.fullPath) {
|
||||
window.open(row.fullPath, '_blank')
|
||||
window.open(row.fullPath, "_blank");
|
||||
}
|
||||
},
|
||||
async initForm() {
|
||||
this.loading = true
|
||||
this.loading = true;
|
||||
// await this.getScenarios()
|
||||
for (const k in this.form) {
|
||||
if (this.data.hasOwnProperty(k)) {
|
||||
this.form[k] = this.data[k]
|
||||
this.form[k] = this.data[k];
|
||||
}
|
||||
if (k === 'AttachPath' && this.form[k]) {
|
||||
this.fileListEN.push({ name: this.data.AttachName, path: this.data.AttachPath, fullPath: this.data.AttachPath, url: this.data.AttachPath })
|
||||
if (k === "AttachPath" && this.form[k]) {
|
||||
this.fileListEN.push({
|
||||
name: this.data.AttachName,
|
||||
path: this.data.AttachPath,
|
||||
fullPath: this.data.AttachPath,
|
||||
url: this.data.AttachPath,
|
||||
});
|
||||
}
|
||||
if (k === 'AttachCNPath' && this.form[k]) {
|
||||
this.fileListCN.push({ name: this.data.AttachNameCN, path: this.data.AttachCNPath, fullPath: this.data.AttachCNPath, url: this.data.AttachCNPath })
|
||||
if (k === "AttachCNPath" && this.form[k]) {
|
||||
this.fileListCN.push({
|
||||
name: this.data.AttachNameCN,
|
||||
path: this.data.AttachCNPath,
|
||||
fullPath: this.data.AttachCNPath,
|
||||
url: this.data.AttachCNPath,
|
||||
});
|
||||
}
|
||||
}
|
||||
console.log(this.fileListEN, this.fileListCN)
|
||||
this.loading = false
|
||||
this.loading = false;
|
||||
},
|
||||
|
||||
// 保存
|
||||
handleSave() {
|
||||
this.$refs.emailForm.validate(valid => {
|
||||
if (!valid) return
|
||||
this.loading = true
|
||||
addOrUpdateEmailNoticeConfigList(this.form).then(res => {
|
||||
this.loading = false
|
||||
this.$emit('closeDialog')
|
||||
this.$emit('getList')
|
||||
this.$message.success('Saved successfully')
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$refs.emailForm.validate((valid) => {
|
||||
if (!valid) return;
|
||||
this.loading = true;
|
||||
this.form.systemLevel = this.systemLevel;
|
||||
addOrUpdateEmailNoticeConfigList(this.form)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.$emit("closeDialog");
|
||||
this.$emit("getList");
|
||||
this.$message.success("Saved successfully");
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,25 +1,69 @@
|
||||
<template>
|
||||
<box-content>
|
||||
<div class="search">
|
||||
<el-form :inline="true" size="mini" class="base-search-form">
|
||||
<el-form
|
||||
v-if="!systemLevel"
|
||||
:inline="true"
|
||||
size="mini"
|
||||
class="base-search-form"
|
||||
>
|
||||
<el-form-item label="是否需要回执:">
|
||||
<el-select v-model="searchData.IsReturnRequired" clearable style="width:100px;">
|
||||
<el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" />
|
||||
<el-select
|
||||
v-model="searchData.IsReturnRequired"
|
||||
clearable
|
||||
style="width: 100px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.YesOrNo"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
:key="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否加急:">
|
||||
<el-select v-model="searchData.IsUrgent" clearable style="width:100px;">
|
||||
<el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" />
|
||||
<el-select
|
||||
v-model="searchData.IsUrgent"
|
||||
clearable
|
||||
style="width: 100px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.YesOrNo"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
:key="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用:">
|
||||
<el-select v-model="searchData.IsEnable" clearable style="width:100px;">
|
||||
<el-option v-for="item of $d.YesOrNo" :value="item.value" :label="item.label" />
|
||||
<el-select
|
||||
v-model="searchData.IsEnable"
|
||||
clearable
|
||||
style="width: 100px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.YesOrNo"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
:key="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('trials:auditRecord:table:criterion')" v-if="isDistinguishCriteria">
|
||||
<el-select v-model="searchData.CriterionTypeEnum" clearable style="width:100px;">
|
||||
<el-option v-for="item of $d.CriterionType" :value="item.value" :label="item.label" />
|
||||
<el-form-item
|
||||
:label="$t('trials:auditRecord:table:criterion')"
|
||||
v-if="isDistinguishCriteria"
|
||||
>
|
||||
<el-select
|
||||
v-model="searchData.CriterionTypeEnum"
|
||||
clearable
|
||||
style="width: 100px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.CriterionType"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
:key="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -27,31 +71,26 @@
|
||||
<el-button type="primary" @click="handleReset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span style="margin-left:auto;">
|
||||
<!-- <el-button
|
||||
<span style="margin-left: auto">
|
||||
<!-- <el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
>
|
||||
场景配置
|
||||
</el-button> -->
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
<el-button type="primary" size="mini" @click="handleAdd">
|
||||
新增
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
<!-- 受试者列表 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{bottomOffset:45}"
|
||||
v-adaptive="{ bottomOffset: 45 }"
|
||||
:data="list"
|
||||
stripe
|
||||
height="100"
|
||||
style="width:100%"
|
||||
style="width: 100%"
|
||||
@sort-change="handleSortByColumn"
|
||||
>
|
||||
<el-table-column type="index" width="40" />
|
||||
@@ -61,7 +100,7 @@
|
||||
:label="$t('trials:emailManageCfg:title:code')"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
width="100"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
v-if="isDistinguishCriteria"
|
||||
@@ -69,10 +108,10 @@
|
||||
:label="$t('trials:reviewTrack:table:criterionName')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
width="120"
|
||||
min-width="120"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('CriterionType', scope.row.CriterionTypeEnum) }}
|
||||
{{ $fd("CriterionType", scope.row.CriterionTypeEnum) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -80,23 +119,24 @@
|
||||
label="邮件主题(中文)"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
width="160"
|
||||
min-width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="EmailTopic"
|
||||
label="邮件主题(英文)"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
width="160"
|
||||
min-width="160"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="BusinessLevelEnum"
|
||||
label="业务层级"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
width="100">
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('BusinessLevel',scope.row.BusinessLevelEnum) }}
|
||||
{{ $fd("BusinessLevel", scope.row.BusinessLevelEnum) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -104,9 +144,10 @@
|
||||
label="业务模块"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
width="100">
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('BusinessModule',scope.row.BusinessModuleEnum) }}
|
||||
{{ $fd("BusinessModule", scope.row.BusinessModuleEnum) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -114,10 +155,10 @@
|
||||
label="业务场景"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
width="130"
|
||||
min-width="130"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('Email_BusinessScenario',scope.row.BusinessScenarioEnum) }}
|
||||
{{ $fd("Email_BusinessScenario", scope.row.BusinessScenarioEnum) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 收件人 -->
|
||||
@@ -125,10 +166,17 @@
|
||||
prop="ToUserTypeList"
|
||||
:label="$t('trials:emailManageCfg:title:toUserTypeList')"
|
||||
show-overflow-tooltip
|
||||
width="100"
|
||||
min-width="100"
|
||||
v-if="systemLevel !== 1"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.ToUserTypeList.length > 0?scope.row.ToUserTypeList.map(v => $fd('UserType', v)).join('、'):'' }}
|
||||
{{
|
||||
scope.row.ToUserTypeList.length > 0
|
||||
? scope.row.ToUserTypeList.map((v) => $fd("UserType", v)).join(
|
||||
"、"
|
||||
)
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 抄送人 -->
|
||||
@@ -136,10 +184,17 @@
|
||||
prop="CopyUserTypeList"
|
||||
:label="$t('trials:emailManageCfg:title:copyUserTypeList')"
|
||||
show-overflow-tooltip
|
||||
width="100"
|
||||
min-width="100"
|
||||
v-if="!systemLevel"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.CopyUserTypeList.length > 0?scope.row.CopyUserTypeList.map(v => $fd('UserType', v)).join('、'):'' }}
|
||||
{{
|
||||
scope.row.CopyUserTypeList.length > 0
|
||||
? scope.row.CopyUserTypeList.map((v) => $fd("UserType", v)).join(
|
||||
"、"
|
||||
)
|
||||
: ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -147,10 +202,11 @@
|
||||
label="加急状态"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
width="100"
|
||||
min-width="100"
|
||||
v-if="!systemLevel"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('EmailUrgent',scope.row.EmailUrgentEnum) }}
|
||||
{{ $fd("EmailUrgent", scope.row.EmailUrgentEnum) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -158,17 +214,23 @@
|
||||
label="发送周期和时间"
|
||||
sortable="custom"
|
||||
show-overflow-tooltip
|
||||
width="160"
|
||||
min-width="160"
|
||||
v-if="!systemLevel"
|
||||
/>
|
||||
<!-- 附件 -->
|
||||
<el-table-column
|
||||
prop="FileName"
|
||||
:label="$t('trials:emailManageCfg:title:fileName')"
|
||||
show-overflow-tooltip
|
||||
width="100"
|
||||
min-width="100"
|
||||
v-if="!systemLevel"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.FilePath" type="text" @click="handlePreview(scope.row.FilePath)">
|
||||
<el-button
|
||||
v-if="scope.row.FilePath"
|
||||
type="text"
|
||||
@click="handlePreview(scope.row.FilePath)"
|
||||
>
|
||||
{{ scope.row.FileName }}
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -179,13 +241,16 @@
|
||||
:label="$t('trials:emailManageCfg:title:isReturnRequired')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
width="140"
|
||||
min-width="140"
|
||||
v-if="!systemLevel"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsReturnRequired" type="danger">
|
||||
{{ $fd('YesOrNo', scope.row.IsReturnRequired) }}
|
||||
{{ $fd("YesOrNo", scope.row.IsReturnRequired) }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsReturnRequired) }}</el-tag>
|
||||
<el-tag v-else type="primary">{{
|
||||
$fd("YesOrNo", scope.row.IsReturnRequired)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 是否自动发送 -->
|
||||
@@ -194,13 +259,16 @@
|
||||
:label="$t('trials:emailManageCfg:title:isAutoSend')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
width="160"
|
||||
min-width="160"
|
||||
v-if="!systemLevel"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsAutoSend" type="danger">
|
||||
{{ $fd('YesOrNo', scope.row.IsAutoSend) }}
|
||||
{{ $fd("YesOrNo", scope.row.IsAutoSend) }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsAutoSend) }}</el-tag>
|
||||
<el-tag v-else type="primary">{{
|
||||
$fd("YesOrNo", scope.row.IsAutoSend)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -208,13 +276,16 @@
|
||||
:label="$t('trials:emailManageCfg:table:IsEnable')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
width="160"
|
||||
min-width="160"
|
||||
v-if="!systemLevel"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsEnable" type="danger">
|
||||
{{ $fd('YesOrNo', scope.row.IsEnable) }}
|
||||
{{ $fd("YesOrNo", scope.row.IsEnable) }}
|
||||
</el-tag>
|
||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsEnable) }}</el-tag>
|
||||
<el-tag v-else type="primary">{{
|
||||
$fd("YesOrNo", scope.row.IsEnable)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 更新时间 -->
|
||||
@@ -223,7 +294,7 @@
|
||||
:label="$t('trials:emailManageCfg:title:updateTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
width="160"
|
||||
min-width="160"
|
||||
/>
|
||||
<!-- 创建时间 -->
|
||||
<el-table-column
|
||||
@@ -231,24 +302,28 @@
|
||||
:label="$t('trials:emailManageCfg:title:createTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
width="160"
|
||||
min-width="160"
|
||||
/>
|
||||
<el-table-column label="Action" width="140" fixed="right">
|
||||
<el-table-column label="Action" min-width="140" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
<el-button type="text" @click="handleEdit(scope.row)">
|
||||
编辑
|
||||
</el-button>
|
||||
|
||||
<el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
|
||||
|
||||
<el-button type="text" @click="handleDelete(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 搜索框 -->
|
||||
<!-- 修改受试者状态 -->
|
||||
<el-dialog
|
||||
@@ -260,7 +335,12 @@
|
||||
fullscreen
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<EmailForm :data="rowData" @closeDialog="closeDialog" @getList="getList" />
|
||||
<EmailForm
|
||||
:data="rowData"
|
||||
:system-level="systemLevel"
|
||||
@closeDialog="closeDialog"
|
||||
@getList="getList"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 修改受试者状态 -->
|
||||
@@ -282,116 +362,128 @@
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import { getEmailNoticeConfigList, deleteEmailNoticeConfig } from '@/api/dictionary'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import EmailForm from './EmailForm'
|
||||
import AttachmentList from './AttachmentList'
|
||||
import {
|
||||
getEmailNoticeConfigList,
|
||||
deleteEmailNoticeConfig,
|
||||
} from "@/api/dictionary";
|
||||
import BoxContent from "@/components/BoxContent";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import EmailForm from "./EmailForm";
|
||||
import AttachmentList from "./AttachmentList";
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
IsReturnRequired: '',
|
||||
IsUrgent: '',
|
||||
IsEnable: '',
|
||||
IsReturnRequired: "",
|
||||
IsUrgent: "",
|
||||
IsEnable: "",
|
||||
CriterionTypeEnum: null,
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
}
|
||||
PageSize: 20,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: 'EmailList',
|
||||
name: "EmailList",
|
||||
components: { BoxContent, Pagination, EmailForm, AttachmentList },
|
||||
props: {
|
||||
isDistinguishCriteria: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
},
|
||||
systemLevel: {
|
||||
type: Number,
|
||||
default() {
|
||||
return 0;
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeTab: '0',
|
||||
activeTab: "0",
|
||||
searchData: searchDataDefault(),
|
||||
loading: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
rowData: {},
|
||||
title: '',
|
||||
title: "",
|
||||
editVisible: false,
|
||||
attachmentVisible: false
|
||||
}
|
||||
attachmentVisible: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 获取受试者列表
|
||||
getList() {
|
||||
this.loading = true
|
||||
this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria
|
||||
getEmailNoticeConfigList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => { this.loading = false })
|
||||
this.loading = true;
|
||||
this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria;
|
||||
this.searchData.systemLevel = this.systemLevel;
|
||||
getEmailNoticeConfigList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.rowData = {}
|
||||
this.title = '新增'
|
||||
this.editVisible = true
|
||||
this.rowData = {};
|
||||
this.title = "新增";
|
||||
this.editVisible = true;
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.rowData = { ...row }
|
||||
this.title = '编辑'
|
||||
this.editVisible = true
|
||||
this.rowData = { ...row };
|
||||
this.title = "编辑";
|
||||
this.editVisible = true;
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(() => {
|
||||
deleteEmailNoticeConfig(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
this.$message.success('删除成功!')
|
||||
}
|
||||
})
|
||||
})
|
||||
this.$confirm(this.$t("trials:staffResearch:message:confirmDel"), {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
}).then(() => {
|
||||
deleteEmailNoticeConfig(row.Id).then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
this.getList();
|
||||
this.$message.success("删除成功!");
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
handleDetail(row) {
|
||||
this.rowData = { ...row }
|
||||
this.attachmentVisible = true
|
||||
this.rowData = { ...row };
|
||||
this.attachmentVisible = true;
|
||||
},
|
||||
// 查询
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
if (column.order === "ascending") {
|
||||
this.searchData.Asc = true;
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
this.searchData.Asc = false;
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
this.searchData.SortField = column.prop;
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 关闭新增、编辑框
|
||||
closeDialog() {
|
||||
this.editVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
this.editVisible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -2,122 +2,148 @@
|
||||
<box-content>
|
||||
<el-tabs v-model="activeTab" type="border-card">
|
||||
<!-- 通用 -->
|
||||
<el-tab-pane
|
||||
:label="$t('trials:emailManageCfg:title:commom')"
|
||||
name="0"
|
||||
>
|
||||
<EmailList v-if="activeTab === '0'" :is-distinguish-criteria="false"></EmailList>
|
||||
<el-tab-pane :label="$t('trials:emailManageCfg:title:commom')" name="0">
|
||||
<EmailList
|
||||
v-if="activeTab === '0'"
|
||||
:is-distinguish-criteria="false"
|
||||
:system-level="0"
|
||||
></EmailList>
|
||||
</el-tab-pane>
|
||||
<!-- 标准相关 -->
|
||||
<el-tab-pane
|
||||
:label="$t('trials:emailManageCfg:title:criterions')"
|
||||
name="1"
|
||||
>
|
||||
<EmailList v-if="activeTab === '1'" :is-distinguish-criteria="true"></EmailList>
|
||||
<EmailList
|
||||
v-if="activeTab === '1'"
|
||||
:is-distinguish-criteria="true"
|
||||
:system-level="0"
|
||||
></EmailList>
|
||||
</el-tab-pane>
|
||||
<!-- 系统相关 -->
|
||||
<el-tab-pane :label="$t('trials:emailManageCfg:title:system')" name="2">
|
||||
<EmailList
|
||||
v-if="activeTab === '2'"
|
||||
:is-distinguish-criteria="false"
|
||||
:system-level="1"
|
||||
></EmailList>
|
||||
</el-tab-pane>
|
||||
<!-- 系统相关-分角色 -->
|
||||
<el-tab-pane :label="$t('trials:emailManageCfg:title:systemDisRole')" name="3">
|
||||
<EmailList
|
||||
v-if="activeTab === '3'"
|
||||
:is-distinguish-criteria="false"
|
||||
:system-level="2"
|
||||
></EmailList>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</box-content>
|
||||
</template>
|
||||
<script>
|
||||
import { getEmailNoticeConfigList, deleteEmailNoticeConfig } from '@/api/dictionary'
|
||||
import BoxContent from '@/components/BoxContent'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import EmailList from './components/EmailList'
|
||||
import {
|
||||
getEmailNoticeConfigList,
|
||||
deleteEmailNoticeConfig,
|
||||
} from "@/api/dictionary";
|
||||
import BoxContent from "@/components/BoxContent";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import EmailList from "./components/EmailList";
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
IsReturnRequired: '',
|
||||
IsUrgent: '',
|
||||
IsEnable: '',
|
||||
IsReturnRequired: "",
|
||||
IsUrgent: "",
|
||||
IsEnable: "",
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
}
|
||||
PageSize: 20,
|
||||
};
|
||||
};
|
||||
export default {
|
||||
name: 'EmailListIndex',
|
||||
name: "EmailListIndex",
|
||||
components: { BoxContent, Pagination, EmailList },
|
||||
data() {
|
||||
return {
|
||||
activeTab: '0',
|
||||
activeTab: "0",
|
||||
searchData: searchDataDefault(),
|
||||
loading: false,
|
||||
list: [],
|
||||
total: 0,
|
||||
rowData: {},
|
||||
title: '',
|
||||
title: "",
|
||||
editVisible: false,
|
||||
attachmentVisible: false
|
||||
}
|
||||
attachmentVisible: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 获取受试者列表
|
||||
getList() {
|
||||
this.loading = true
|
||||
getEmailNoticeConfigList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
}).catch(() => { this.loading = false })
|
||||
this.loading = true;
|
||||
getEmailNoticeConfigList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.rowData = {}
|
||||
this.title = '新增'
|
||||
this.editVisible = true
|
||||
this.rowData = {};
|
||||
this.title = "新增";
|
||||
this.editVisible = true;
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.rowData = { ...row }
|
||||
this.title = '编辑'
|
||||
this.editVisible = true
|
||||
this.rowData = { ...row };
|
||||
this.title = "编辑";
|
||||
this.editVisible = true;
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
})
|
||||
.then(() => {
|
||||
deleteEmailNoticeConfig(row.Id)
|
||||
.then(res => {
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
this.$message.success('删除成功!')
|
||||
}
|
||||
})
|
||||
})
|
||||
this.$confirm(this.$t("trials:staffResearch:message:confirmDel"), {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
}).then(() => {
|
||||
deleteEmailNoticeConfig(row.Id).then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
this.getList();
|
||||
this.$message.success("删除成功!");
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
handleDetail(row) {
|
||||
this.rowData = { ...row }
|
||||
this.attachmentVisible = true
|
||||
this.rowData = { ...row };
|
||||
this.attachmentVisible = true;
|
||||
},
|
||||
// 查询
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 重置
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
if (column.order === "ascending") {
|
||||
this.searchData.Asc = true;
|
||||
} else {
|
||||
this.searchData.Asc = false
|
||||
this.searchData.Asc = false;
|
||||
}
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
this.searchData.SortField = column.prop;
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 关闭新增、编辑框
|
||||
closeDialog() {
|
||||
this.editVisible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
this.editVisible = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -25,56 +25,68 @@
|
||||
<el-tab-pane label="签名管理" name="sign">
|
||||
<Sign v-if="activeTab == 'sign'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="浏览器推荐" name="browser">
|
||||
<Browser v-if="activeTab == 'browser'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import QcQuestions from './components/QcQuestions.vue'
|
||||
import CriterionsTmp from './components/CriterionsTmp'
|
||||
import ClinicalData from './components/ClinicalDataConfig'
|
||||
import MedicalAudit from './components/MedicalAudit'
|
||||
import Anonymization from './components/Anonymization'
|
||||
import IncreaseFields from './components/IncreaseFields'
|
||||
import Email from './email/index.vue'
|
||||
import Sign from './sign/index.vue'
|
||||
import QcQuestions from "./components/QcQuestions.vue";
|
||||
import CriterionsTmp from "./components/CriterionsTmp";
|
||||
import ClinicalData from "./components/ClinicalDataConfig";
|
||||
import MedicalAudit from "./components/MedicalAudit";
|
||||
import Anonymization from "./components/Anonymization";
|
||||
import IncreaseFields from "./components/IncreaseFields";
|
||||
import Email from "./email/index.vue";
|
||||
import Sign from "./sign/index.vue";
|
||||
import Browser from "./browser/index.vue";
|
||||
export default {
|
||||
name: 'Questions',
|
||||
name: "Questions",
|
||||
components: {
|
||||
QcQuestions, CriterionsTmp, ClinicalData, Anonymization, IncreaseFields, Email, Sign,
|
||||
MedicalAudit
|
||||
QcQuestions,
|
||||
CriterionsTmp,
|
||||
ClinicalData,
|
||||
Anonymization,
|
||||
IncreaseFields,
|
||||
Email,
|
||||
Sign,
|
||||
MedicalAudit,
|
||||
Browser,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeTab: 'qc'
|
||||
}
|
||||
}, mounted() {
|
||||
activeTab: "qc",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
if (this.$route.query.tabActive) {
|
||||
this.activeTab = this.$route.query.tabActive
|
||||
this.activeTab = this.$route.query.tabActive;
|
||||
} else {
|
||||
this.activeTab = 'qc'
|
||||
this.activeTab = "qc";
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickTab(tab, event) {
|
||||
this.$router.push({ path: `/dictionary/template?tabActive=${tab.name}` })
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$router.push({ path: `/dictionary/template?tabActive=${tab.name}` });
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.question-wrapper{
|
||||
.el-tabs{
|
||||
.question-wrapper {
|
||||
.el-tabs {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.el-tabs__header {
|
||||
height: 40px;
|
||||
margin-bottom:5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.el-tabs__content{
|
||||
.el-tabs__content {
|
||||
flex: 1;
|
||||
.el-tab-pane{
|
||||
.el-tab-pane {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,29 @@
|
||||
<template>
|
||||
<div style="display: flex;justify-content: center">
|
||||
<div style="width: 600px;text-align: center;border: 1px solid #e6e6e6;margin-top:40px;padding:10px;">
|
||||
<div class="trial-myinfo-head" style="font-size: 30px;line-height: 120px;">
|
||||
<div style="display: flex; justify-content: center">
|
||||
<div
|
||||
style="
|
||||
width: 600px;
|
||||
text-align: center;
|
||||
border: 1px solid #e6e6e6;
|
||||
margin-top: 40px;
|
||||
padding: 10px;
|
||||
"
|
||||
>
|
||||
<div
|
||||
class="trial-myinfo-head"
|
||||
style="font-size: 30px; line-height: 120px"
|
||||
>
|
||||
<!-- 首次登录修改密码 -->
|
||||
{{ $t('recompose:title:init') }}
|
||||
</div>
|
||||
<el-form ref="passwordForm" v-loading="loading" label-position="right" :model="password" :rules="passwordFormRules" label-width="200px">
|
||||
<el-form
|
||||
ref="passwordForm"
|
||||
v-loading="loading"
|
||||
label-position="right"
|
||||
:model="password"
|
||||
:rules="passwordFormRules"
|
||||
:label-width="$i18n.locale == 'zh' ? '100px' : '200px'"
|
||||
>
|
||||
<!-- 邮箱 -->
|
||||
<el-form-item :label="$t('recompose:form:email')" prop="Email">
|
||||
<el-input v-model="password.Email" disabled />
|
||||
@@ -19,70 +37,135 @@
|
||||
<el-input v-model="password.NewUserName" />
|
||||
</el-form-item>
|
||||
<!-- 新密码 -->
|
||||
<el-form-item :label="$t('recompose:form:newPassword')" prop="NewPassWord">
|
||||
<el-input v-model="password.NewPassWord" type="password" show-password auto-complete="new-password" />
|
||||
<el-form-item
|
||||
:label="$t('recompose:form:newPassword')"
|
||||
prop="NewPassWord"
|
||||
>
|
||||
<el-input
|
||||
v-model="password.NewPassWord"
|
||||
type="password"
|
||||
show-password
|
||||
auto-complete="new-password"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 确认密码 -->
|
||||
<el-form-item :label="$t('recompose:form:confirmPassword')" prop="ConfirmPassWord">
|
||||
<el-input v-model="password.ConfirmPassWord" type="password" show-password auto-complete="new-password" />
|
||||
<el-form-item
|
||||
:label="$t('recompose:form:confirmPassword')"
|
||||
prop="ConfirmPassWord"
|
||||
>
|
||||
<el-input
|
||||
v-model="password.ConfirmPassWord"
|
||||
type="password"
|
||||
show-password
|
||||
auto-complete="new-password"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item style="text-align:right">
|
||||
<el-form-item style="text-align: right">
|
||||
<!-- 取消 -->
|
||||
<el-button
|
||||
size="small"
|
||||
@click="cancel"
|
||||
>
|
||||
<el-button size="small" @click="cancel">
|
||||
{{ $t('recompose:button:cancel') }}
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="save"
|
||||
>
|
||||
<el-button type="primary" size="small" @click="save">
|
||||
{{ $t('recompose:button:save') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { initSetUserNameAndPwd } from '@/api/admin.js'
|
||||
import md5 from 'js-md5'
|
||||
import {mapGetters, mapMutations} from "vuex";
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
password: {
|
||||
NewUserName: null,
|
||||
UserId: null
|
||||
UserId: null,
|
||||
},
|
||||
passwordFormRules: {
|
||||
NewUserName: [{ required: true, validator: (rule, value, callback) => {!value ? callback(new Error(this.$t('trials:researchForm:formRule:specify'))) : callback()}, trigger: 'blur' }],
|
||||
NewUserName: [
|
||||
{
|
||||
required: true,
|
||||
validator: (rule, value, callback) => {
|
||||
var lang = zzSessionStorage.getItem('lang')
|
||||
? zzSessionStorage.getItem('lang')
|
||||
: 'zh'
|
||||
/* eslint-disable */
|
||||
var reg1 = /^[a-zA-Z0-9_]{4,16}$/ //密码必须是8位以上、必须含有字母、数字、特殊符号
|
||||
console.log(!reg1.test(value))
|
||||
if (!reg1.test(value)) {
|
||||
callback(
|
||||
lang === 'zh'
|
||||
? new Error(
|
||||
'1)新建账号,用户名字符长度最小为4个字符,最大为16个字符,只可使用字母、数字、下划线;'
|
||||
)
|
||||
: new Error(
|
||||
'For a new account, the username must have:1) At least 4 characters;2) At most 16 characters;3)Only letters, numbers, and underscores are allowed.'
|
||||
)
|
||||
)
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
NewPassWord: [
|
||||
{ required: true, validator: (rule, value, callback) => {!value ? callback(new Error(this.$t('trials:researchForm:formRule:specify'))) : callback()}, trigger: 'blur' },
|
||||
{
|
||||
required: true,
|
||||
validator: (rule, value, callback) => {
|
||||
!value
|
||||
? callback(
|
||||
new Error(this.$t('trials:researchForm:formRule:specify'))
|
||||
)
|
||||
: callback()
|
||||
},
|
||||
trigger: 'blur',
|
||||
},
|
||||
{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
validator: this.$validatePassword
|
||||
validator: this.$validatePassword,
|
||||
},
|
||||
],
|
||||
ConfirmPassWord: [
|
||||
{ required: true, validator: (rule, value, callback) => {!value ? callback(new Error(this.$t('trials:researchForm:formRule:specify'))) : callback()}, trigger: 'blur' }
|
||||
]
|
||||
{
|
||||
required: true,
|
||||
validator: (rule, value, callback) => {
|
||||
!value
|
||||
? callback(
|
||||
new Error(this.$t('trials:researchForm:formRule:specify'))
|
||||
)
|
||||
: callback()
|
||||
},
|
||||
trigger: 'blur',
|
||||
},
|
||||
{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
validator: (rule, value, callback) => {
|
||||
value !== this.password.NewPassWord
|
||||
? callback(
|
||||
new Error(
|
||||
this.$t(
|
||||
'trials:researchForm:formRule:NewPassWordAndConfirmPassWord'
|
||||
)
|
||||
)
|
||||
)
|
||||
: callback()
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
userId: null,
|
||||
loading: false
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'asyncRoutes',
|
||||
'routes',
|
||||
'language'
|
||||
])
|
||||
...mapGetters(['asyncRoutes', 'routes', 'language']),
|
||||
},
|
||||
mounted() {
|
||||
this.password.UserId = this.$route.query.UserId
|
||||
@@ -112,7 +195,7 @@ export default {
|
||||
this.$updateDictionary()
|
||||
},
|
||||
save() {
|
||||
this.$refs.passwordForm.validate(valid => {
|
||||
this.$refs.passwordForm.validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.password.NewPassWord !== this.password.ConfirmPassWord) {
|
||||
// 两次密码输入不一致
|
||||
@@ -123,26 +206,32 @@ export default {
|
||||
NewUserName: this.password.NewUserName,
|
||||
UserId: this.password.UserId,
|
||||
NewPwd: md5(this.password.NewPassWord),
|
||||
access_token: this.password.access_token
|
||||
access_token: this.password.access_token,
|
||||
}
|
||||
this.loading = true
|
||||
initSetUserNameAndPwd(param).then(res => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
// 修改成功,请重新登录账号
|
||||
this.$message.success(this.$t('recompose:message:updatedSuccessfully'))
|
||||
setTimeout(() => {
|
||||
this.logout()
|
||||
}, 500)
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
initSetUserNameAndPwd(param)
|
||||
.then((res) => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
// 修改成功,请重新登录账号
|
||||
this.$message.success(
|
||||
this.$t('recompose:message:updatedSuccessfully')
|
||||
)
|
||||
setTimeout(() => {
|
||||
this.logout()
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
this.$refs['passwordForm'].resetFields()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
@@ -165,13 +254,16 @@ export default {
|
||||
<style scoped>
|
||||
input:-webkit-autofill {
|
||||
-webkit-text-fill-color: #ededed !important;
|
||||
box-shadow: 0 0 0px 1000px transparent inset !important;
|
||||
background-color:transparent;
|
||||
box-shadow: 0 0 0px 1000px transparent inset !important;
|
||||
background-color: transparent;
|
||||
background-image: none;
|
||||
transition: background-color 50000s ease-in-out 0s;
|
||||
}
|
||||
input {
|
||||
background-color:transparent;
|
||||
background-color: transparent;
|
||||
caret-color: #fff;
|
||||
}
|
||||
.el-form-item {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,507 @@
|
||||
<template>
|
||||
<div class="role">
|
||||
<div ref="leftContainer" class="left">
|
||||
<el-form :inline="true">
|
||||
<!--项目编号/实验名称-->
|
||||
<el-form-item :label="$t('feedBack:search:trials')" v-if="level > 8">
|
||||
<el-input
|
||||
v-model="searchData.TrialKeyInfo"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!--中心-->
|
||||
<el-form-item :label="$t('feedBack:search:site')" v-if="level > 7">
|
||||
<el-input
|
||||
v-model="searchData.TrialSiteCode"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!--受试者访视-->
|
||||
<el-form-item
|
||||
:label="$t('feedBack:search:subjectVisit')"
|
||||
v-if="level > 7"
|
||||
>
|
||||
<el-input
|
||||
v-model="searchData.SubejctAndVisitKeyInfo"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!--角色-->
|
||||
<el-form-item :label="$t('feedBack:search:role')" v-if="level > 7">
|
||||
<el-select
|
||||
v-model="searchData.UserTypeEnum"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
popper-class="feedBack-select-box"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of UserTypeOptins"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--反馈人-->
|
||||
<el-form-item :label="$t('feedBack:search:user')" v-if="level > 7">
|
||||
<el-input
|
||||
v-model="searchData.FeedBackUserKeyInfo"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!--问题类型-->
|
||||
<el-form-item :label="$t('feedBack:search:questionType')">
|
||||
<el-select
|
||||
v-model="searchData.QuestionType"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
popper-class="feedBack-select-box"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of QuestionTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--问题描述-->
|
||||
<el-form-item :label="$t('feedBack:search:description')">
|
||||
<el-input
|
||||
v-model="searchData.QuestionDescription"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!--状态-->
|
||||
<el-form-item :label="$t('feedBack:search:status')" v-if="level > 7">
|
||||
<el-select
|
||||
v-model="searchData.State"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
popper-class="feedBack-select-box"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.FeedBackStatus"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--反馈日期-->
|
||||
<el-form-item :label="$t('feedBack:search:time')">
|
||||
<el-date-picker
|
||||
v-model="datetimerange"
|
||||
type="datetimerange"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
:start-placeholder="$t('feedBack:search:beginTime')"
|
||||
:end-placeholder="$t('feedBack:search:endTime')"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
@change="handleDatetimeChange"
|
||||
style="width: 250px"
|
||||
popper-class="feedBack-select-box"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="getList"
|
||||
>
|
||||
{{ $t("common:button:search") }}
|
||||
</el-button>
|
||||
<!-- 重置 -->
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
{{ $t("common:button:reset") }}
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="report"
|
||||
v-if="level > 7"
|
||||
>
|
||||
{{ $t("common:button:export") }}
|
||||
</el-button> -->
|
||||
</el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="resolve"
|
||||
style="float: right"
|
||||
v-if="level > 7"
|
||||
:disabled="tableSelectData.length <= 0"
|
||||
>
|
||||
{{ $t("feedBack:button:resolve") }}
|
||||
</el-button>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
v-adaptive="{ bottomOffset: 45 }"
|
||||
height="100"
|
||||
:data="list"
|
||||
class="table"
|
||||
@selection-change="handleSelectChange"
|
||||
@sort-change="handleSortByColumn"
|
||||
:default-sort="{ prop: 'CreateTime', order: 'descending' }"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
align="center"
|
||||
width="45"
|
||||
v-if="level > 7"
|
||||
:selectable="handleSelectTable"
|
||||
/>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:trialCode')"
|
||||
prop="TrialCode"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="level > 8"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:study')"
|
||||
prop="ExperimentName"
|
||||
min-width="140"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="level > 8"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:siteCode')"
|
||||
prop="TrialSiteCode"
|
||||
min-width="100"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="level > 7"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:SubjectCode')"
|
||||
prop="SubjectCode"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="level > 7"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:subjectVisit')"
|
||||
prop="SubjectVisitName"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="level > 7"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:role')"
|
||||
prop="FeedBackUserName"
|
||||
min-width="80"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="level > 7"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:user')"
|
||||
prop="FeedBackFullName"
|
||||
min-width="140"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="level > 7"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:questionType')"
|
||||
prop="QuestionType"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{
|
||||
QuestionTypeOptions.filter(
|
||||
(item) => item.value === scope.row.QuestionType
|
||||
)[0].label
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:description')"
|
||||
prop="QuestionDescription"
|
||||
min-width="200"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:time')"
|
||||
prop="CreateTime"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:status')"
|
||||
prop="State"
|
||||
min-width="120"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="level > 7"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="['danger', 'success'][scope.row.State]">{{
|
||||
$fd("FeedBackStatus", scope.row.State)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('feedBack:form:uploadTime')"
|
||||
prop="UpdateTime"
|
||||
min-width="180"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
v-if="level > 7"
|
||||
/>
|
||||
<el-table-column
|
||||
:label="$t('common:action:action')"
|
||||
fixed="right"
|
||||
prop="UserTypeShortName"
|
||||
width="80"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="getDetail(scope.row)">
|
||||
{{ $t("common:button:view") }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="pagination" style="text-align: right; margin-top: 5px">
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Pagination from "@/components/Pagination";
|
||||
import { batchUpdateFeedBackState, getUserFeedBackList } from "@/api/trials.js";
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
TrialKeyInfo: null,
|
||||
SubejctAndVisitKeyInfo: null,
|
||||
UserTypeEnum: null,
|
||||
FeedBackUserKeyInfo: null,
|
||||
QuestionDescription: null,
|
||||
QuestionType: null,
|
||||
State: null,
|
||||
TrialSiteCode: null,
|
||||
BeginCreatime: null,
|
||||
EndCreatime: null,
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
Asc: false,
|
||||
SortField: "CreateTime",
|
||||
};
|
||||
};
|
||||
export default {
|
||||
components: { Pagination },
|
||||
props: {
|
||||
trialId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
dicts: [
|
||||
"NoticeApplicableTrial",
|
||||
"NoteLevel",
|
||||
"NoteType",
|
||||
"NoticeState",
|
||||
"NoticeMode",
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
total: 0,
|
||||
loading: false,
|
||||
datetimerange: [],
|
||||
// 查询参数
|
||||
searchData: searchDataDefault(),
|
||||
tableSelectData: [],
|
||||
UserTypeOptins: [
|
||||
{ label: "CRC", value: 2 },
|
||||
{ label: "IR", value: 13 },
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
level() {
|
||||
if (this.hasPermi(["role:dev", "role:admin"])) {
|
||||
return 9;
|
||||
}
|
||||
if (this.hasPermi(["role:pm"])) {
|
||||
return 8;
|
||||
}
|
||||
if (this.hasPermi(["role:ir", "role:crc"])) {
|
||||
return 7;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
QuestionTypeOptions() {
|
||||
if (this.level > 7) {
|
||||
return [
|
||||
...this.$d.FeedBackTypeToCRC.filter((item) => item.value > 0),
|
||||
...this.$d.FeedBackTypeToIR,
|
||||
];
|
||||
}
|
||||
if (this.hasPermi(["role:ir"])) {
|
||||
return this.$d.FeedBackTypeToIR;
|
||||
}
|
||||
if (this.hasPermi(["role:crc"])) {
|
||||
return this.$d.FeedBackTypeToCRC;
|
||||
}
|
||||
return [];
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
// 通过提交状态决定该行的 CheckBox 是否可以勾选
|
||||
handleSelectTable(row) {
|
||||
return row.State < 1;
|
||||
},
|
||||
async getList() {
|
||||
try {
|
||||
if (this.trialId) {
|
||||
this.searchData.TrialId = this.trialId;
|
||||
}
|
||||
this.loading = true;
|
||||
let res = await getUserFeedBackList(this.searchData);
|
||||
this.loading = false;
|
||||
if (res.IsSuccess) {
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false;
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
handleDatetimeChange(val) {
|
||||
if (val) {
|
||||
this.searchData.BeginCreatime = val[0];
|
||||
this.searchData.EndCreatime = val[1];
|
||||
} else {
|
||||
this.searchData.BeginCreatime = "";
|
||||
this.searchData.EndCreatime = "";
|
||||
}
|
||||
},
|
||||
// 重置列表查询
|
||||
handleReset() {
|
||||
this.datetimerange = null;
|
||||
this.handleDatetimeChange();
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
},
|
||||
// 设为解决
|
||||
async resolve() {
|
||||
try {
|
||||
let confirm = await this.$confirm(this.$t("feedBack:resolve:tip"), {
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
});
|
||||
if (!confirm) return;
|
||||
let data = {
|
||||
IdList: this.tableSelectData.map((item) => item.Id),
|
||||
state: 1,
|
||||
};
|
||||
let res = await batchUpdateFeedBackState(data);
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(this.$t("feedBack:resolve:success"));
|
||||
this.getList();
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
// 导出
|
||||
report() {},
|
||||
// 表格选择
|
||||
handleSelectChange(selection) {
|
||||
// console.log(selection, "handleSelectChange");
|
||||
this.tableSelectData = selection;
|
||||
},
|
||||
// 排序
|
||||
handleSortByColumn(column) {
|
||||
if (column.order === "ascending") {
|
||||
this.searchData.Asc = true;
|
||||
} else {
|
||||
this.searchData.Asc = false;
|
||||
}
|
||||
this.searchData.SortField = column.prop;
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
},
|
||||
// 获取详情
|
||||
getDetail(row) {
|
||||
this.$FB({
|
||||
type: "detail",
|
||||
Id: row.Id,
|
||||
callBack: () => {
|
||||
this.getList();
|
||||
this.$emit("success");
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.role {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
.left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 0;
|
||||
flex-grow: 4;
|
||||
// border-right: 1px solid #ccc;
|
||||
.filter-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 5px;
|
||||
}
|
||||
.data-table {
|
||||
flex: 1;
|
||||
padding: 5px 0px;
|
||||
}
|
||||
.pagination-container {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
.right {
|
||||
width: 0;
|
||||
flex-grow: 6;
|
||||
overflow-y: auto;
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
.selected-row {
|
||||
background-color: cadetblue;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -61,16 +61,16 @@
|
||||
:disabled="form.VerificationCode === '' || form.EmailOrPhone === ''"
|
||||
@click="verifyCode"
|
||||
>
|
||||
{{ $t("passwordReset:button:verify") }}
|
||||
{{ $t('passwordReset:button:verify') }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="box-wrapper" v-if="active === 1">
|
||||
<div class="box-wrapper" v-show="active === 1">
|
||||
<el-form
|
||||
ref="resetForm"
|
||||
ref="resetForm2"
|
||||
v-loading="formLoading"
|
||||
:model="form"
|
||||
label-width="100px"
|
||||
:rules="rules"
|
||||
:label-width="$i18n.locale === 'en' ? '180px' : '100px'"
|
||||
:rules="rules2"
|
||||
class="demo-ruleForm"
|
||||
size="small"
|
||||
>
|
||||
@@ -131,7 +131,7 @@
|
||||
<div style="width: 50%; margin: auto; display: flex">
|
||||
<!-- 取消 -->
|
||||
<el-button size="small" @click="onCancel" style="width: 46%">
|
||||
{{ $t("passwordReset:button:cancel") }}
|
||||
{{ $t('passwordReset:button:cancel') }}
|
||||
</el-button>
|
||||
<!-- 提交 -->
|
||||
<el-button
|
||||
@@ -140,17 +140,17 @@
|
||||
@click="onSubmit"
|
||||
style="width: 46%"
|
||||
>
|
||||
{{ $t("passwordReset:button:submit") }}
|
||||
{{ $t('passwordReset:button:submit') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-wrapper flexBox" v-if="active === 3">
|
||||
<svg-icon icon-class="resetSuccess" style="width: 300px; height: 300px" />
|
||||
<p style="width: 100%; text-align: center">
|
||||
{{ $t("resetPassword:successTip") }}
|
||||
{{ $t('resetPassword:successTip') }}
|
||||
</p>
|
||||
<el-button size="small" type="primary" @click="goBack">
|
||||
{{ $t("passwordReset:button:back") }}
|
||||
{{ $t('passwordReset:button:back') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -160,32 +160,30 @@ import {
|
||||
anonymousSendVerificationCode,
|
||||
verifyAnonymousVerifyCode,
|
||||
anonymousSetPassword,
|
||||
} from "@/api/user";
|
||||
import md5 from "js-md5";
|
||||
import Img from "@/assets/icons/svg/resetSuccess.svg";
|
||||
var timer = "";
|
||||
var countdown = 60;
|
||||
} from '@/api/user'
|
||||
import md5 from 'js-md5'
|
||||
import Img from '@/assets/icons/svg/resetSuccess.svg'
|
||||
var timer = ''
|
||||
var countdown = 60
|
||||
export default {
|
||||
data() {
|
||||
var validateEmail = (rule, value, callback) => {
|
||||
if (value === "") {
|
||||
if (value === '') {
|
||||
// 请输入邮箱
|
||||
callback(new Error(this.$t("passwordReset:formRule:email")));
|
||||
callback(new Error(this.$t('passwordReset:formRule:email')))
|
||||
} else {
|
||||
var reg =
|
||||
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/;
|
||||
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
|
||||
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
|
||||
this.sendDisabled = false;
|
||||
callback();
|
||||
this.sendDisabled = false
|
||||
callback()
|
||||
} else {
|
||||
// 邮箱无效
|
||||
callback(
|
||||
new Error(this.$t("passwordReset:formRule:passwordinvalid"))
|
||||
);
|
||||
this.sendDisabled = true;
|
||||
callback(new Error(this.$t('passwordReset:formRule:passwordinvalid')))
|
||||
this.sendDisabled = true
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
// var validatePass = (rule, value, callback) => {
|
||||
// if (value === '') {
|
||||
// // 请输入密码
|
||||
@@ -198,181 +196,206 @@ export default {
|
||||
// }
|
||||
// }
|
||||
var validatePass2 = (rule, value, callback) => {
|
||||
if (value === "" || value === undefined) {
|
||||
if (value === '' || value === undefined) {
|
||||
// 请再次输入密码
|
||||
callback(new Error(this.$t("passwordReset:formRule:confirmPassword")));
|
||||
callback(new Error(this.$t('passwordReset:formRule:confirmPassword')))
|
||||
} else if (value !== undefined && value !== this.form.NewPwd) {
|
||||
// 两次密码不一致
|
||||
callback(new Error(this.$t("passwordReset:formRule:passwordsDiffer")));
|
||||
callback(new Error(this.$t('passwordReset:formRule:passwordsDiffer')))
|
||||
} else {
|
||||
callback();
|
||||
callback()
|
||||
}
|
||||
};
|
||||
}
|
||||
return {
|
||||
active: 0,
|
||||
Img,
|
||||
form: {
|
||||
EmailOrPhone: "",
|
||||
VerificationCode: "",
|
||||
NewPwd: "",
|
||||
UserId: "",
|
||||
UserType: "",
|
||||
EmailOrPhone: '',
|
||||
VerificationCode: '',
|
||||
NewPwd: '',
|
||||
CheckPass: '',
|
||||
UserId: '',
|
||||
UserType: '',
|
||||
},
|
||||
users: [],
|
||||
CheckPass: "",
|
||||
CheckPass: '',
|
||||
rules: {
|
||||
EmailOrPhone: [
|
||||
{
|
||||
required: true,
|
||||
validator: validateEmail,
|
||||
trigger: ["blur", "change"],
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
VerificationCode: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: ["blur", "change"],
|
||||
message: this.$t('common:ruleMessage:specify'),
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
NewPwd: [
|
||||
{
|
||||
required: true,
|
||||
validator: this.$validatePassword,
|
||||
trigger: ["blur", "change"],
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
CheckPass: [
|
||||
{
|
||||
required: true,
|
||||
validator: validatePass2,
|
||||
trigger: ["blur", "change"],
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
UserId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:select"),
|
||||
trigger: ["blur", "change"],
|
||||
message: this.$t('common:ruleMessage:select'),
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
},
|
||||
rules2: {
|
||||
NewPwd: [
|
||||
{
|
||||
required: true,
|
||||
validator: this.$validatePassword,
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
CheckPass: [
|
||||
{
|
||||
required: true,
|
||||
validator: validatePass2,
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
UserId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:select'),
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
},
|
||||
sendDisabled: true,
|
||||
sendTitle: this.$t("passwordReset:button:send"),
|
||||
sendTitle: this.$t('passwordReset:button:send'),
|
||||
formLoading: false,
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
this.$refs["resetForm"].validate((valid) => {
|
||||
this.$refs['resetForm2'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.formLoading = true;
|
||||
this.formLoading = true
|
||||
anonymousSetPassword(this.form.UserId, md5(this.form.NewPwd))
|
||||
.then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
// 修改成功
|
||||
this.$message.success(
|
||||
this.$t("passwordReset:message:updatedSuccessfully")
|
||||
);
|
||||
this.formLoading = false;
|
||||
this.active = 3;
|
||||
this.$t('passwordReset:message:updatedSuccessfully')
|
||||
)
|
||||
this.formLoading = false
|
||||
this.active = 3
|
||||
// this.goBack();
|
||||
} else {
|
||||
this.$alert(res.ErrorMessage);
|
||||
this.$alert(res.ErrorMessage)
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.formLoading = false;
|
||||
});
|
||||
this.formLoading = false
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
handleSendCode() {
|
||||
const that = this;
|
||||
this.sendDisabled = true;
|
||||
const that = this
|
||||
this.sendDisabled = true
|
||||
// var isReviewer = JSON.parse(zzSessionStorage.getItem('IsReviewer'))
|
||||
anonymousSendVerificationCode(this.form.EmailOrPhone)
|
||||
.then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
let msg = this.$t('passwordReset:message:tip:sendCode').replace("xxx", this.form.EmailOrPhone)
|
||||
let msg = this.$t('passwordReset:message:tip:sendCode').replace(
|
||||
'xxx',
|
||||
this.form.EmailOrPhone
|
||||
)
|
||||
this.$message.success(msg)
|
||||
that.settime(that);
|
||||
that.settime(that)
|
||||
} else {
|
||||
that.$alert(res.ErrorMessage);
|
||||
that.$alert(res.ErrorMessage)
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.sendDisabled = false;
|
||||
});
|
||||
this.sendDisabled = false
|
||||
})
|
||||
},
|
||||
verifyCode() {
|
||||
this.formLoading = true;
|
||||
this.formLoading = true
|
||||
verifyAnonymousVerifyCode(
|
||||
this.form.EmailOrPhone,
|
||||
this.form.VerificationCode
|
||||
)
|
||||
.then((res) => {
|
||||
this.formLoading = false;
|
||||
this.users = res.Result;
|
||||
this.formLoading = false
|
||||
this.users = res.Result
|
||||
if (this.users.length === 1) {
|
||||
this.form.UserId = this.users[0].UserId;
|
||||
this.form.UserType = this.users[0].UserType;
|
||||
this.form.UserId = this.users[0].UserId
|
||||
this.form.UserType = this.users[0].UserType
|
||||
}
|
||||
// 验证成功
|
||||
this.$message.success(
|
||||
this.$t("passwordReset:message:verifiedSuccessfully")
|
||||
);
|
||||
this.active = 1;
|
||||
this.$t('passwordReset:message:verifiedSuccessfully')
|
||||
)
|
||||
this.active = 1
|
||||
})
|
||||
.catch(() => {
|
||||
this.formLoading = false;
|
||||
});
|
||||
this.formLoading = false
|
||||
})
|
||||
},
|
||||
handleEmailChange() {
|
||||
var reg =
|
||||
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/;
|
||||
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
|
||||
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
|
||||
this.sendDisabled = false;
|
||||
this.sendDisabled = false
|
||||
}
|
||||
},
|
||||
handleUserChange(val) {
|
||||
const seleted = this.users.findIndex((user) => user.UserId === val);
|
||||
const seleted = this.users.findIndex((user) => user.UserId === val)
|
||||
if (seleted > -1) {
|
||||
this.form.UserType = this.users[seleted].UserType;
|
||||
this.form.UserType = this.users[seleted].UserType
|
||||
}
|
||||
},
|
||||
settime(obj) {
|
||||
if (countdown === 0) {
|
||||
obj.sendDisabled = false;
|
||||
obj.sendTitle = this.$t("passwordReset:button:send");
|
||||
countdown = 60;
|
||||
clearTimeout(timer);
|
||||
return;
|
||||
obj.sendDisabled = false
|
||||
obj.sendTitle = this.$t('passwordReset:button:send')
|
||||
countdown = 60
|
||||
clearTimeout(timer)
|
||||
return
|
||||
} else {
|
||||
obj.sendDisabled = true;
|
||||
obj.sendTitle = `${this.$t(
|
||||
"passwordReset:button:wait"
|
||||
)}(${countdown}s)`;
|
||||
countdown--;
|
||||
obj.sendDisabled = true
|
||||
obj.sendTitle = `${this.$t('passwordReset:button:wait')}(${countdown}s)`
|
||||
countdown--
|
||||
// eslint-disable-next-line no-self-assign
|
||||
countdown = countdown;
|
||||
countdown = countdown
|
||||
timer = setTimeout(function () {
|
||||
obj.settime(obj);
|
||||
}, 1000);
|
||||
obj.settime(obj)
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
onCancel() {
|
||||
this.$refs["resetForm"].resetFields();
|
||||
this.$refs['resetForm'].resetFields()
|
||||
Object.keys(this.form).forEach((key) => {
|
||||
this.form[key] = "";
|
||||
});
|
||||
this.active = 0;
|
||||
this.form[key] = ''
|
||||
})
|
||||
this.active = 0
|
||||
},
|
||||
goBack() {
|
||||
this.$router.push("/login");
|
||||
this.$router.push('/login')
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.reset-wrapper {
|
||||
|
||||
+113
-96
@@ -18,15 +18,11 @@
|
||||
<div
|
||||
:class="{
|
||||
'login-image': true,
|
||||
'login-image-usa': NODE_ENV === 'usa',
|
||||
'login-image-usa': true,
|
||||
}"
|
||||
>
|
||||
<svg-icon
|
||||
icon-class="login-bg"
|
||||
style="width: 90%; height: 90%"
|
||||
v-if="NODE_ENV === 'usa'"
|
||||
/>
|
||||
<img src="@/assets/login-bg.png" v-else />
|
||||
<svg-icon icon-class="login-bg" style="width: 90%; height: 90%" />
|
||||
<!-- <img src="@/assets/login-bg.png" v-else /> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="login-r">
|
||||
@@ -38,7 +34,7 @@
|
||||
style="width: 300px; height: 94px"
|
||||
/>
|
||||
</div>
|
||||
<div class="title" v-else>{{ $t("login:title:system") }}</div>
|
||||
<div class="title" v-else>{{ $t('login:title:system') }}</div>
|
||||
</div>
|
||||
<el-form
|
||||
ref="loginForm"
|
||||
@@ -116,10 +112,15 @@
|
||||
size="medium"
|
||||
@click.native.prevent="handleLogin"
|
||||
>
|
||||
{{ $t("login:button:login") }}
|
||||
{{ $t('login:button:login') }}
|
||||
</el-button>
|
||||
<div style="text-align: right">
|
||||
<TopLang v-if="VUE_APP_OSS_CONFIG_REGION !== 'oss-us-west-1'" />
|
||||
<TopLang
|
||||
v-if="
|
||||
VUE_APP_OSS_CONFIG_REGION !== 'oss-us-west-1' &&
|
||||
NODE_ENV !== 'usa'
|
||||
"
|
||||
/>
|
||||
<!-- Forget password? -->
|
||||
<el-button
|
||||
type="text"
|
||||
@@ -127,7 +128,7 @@
|
||||
@click.native.prevent="handleResetPwd"
|
||||
style="color: rgb(0, 147, 221)"
|
||||
>
|
||||
{{ $t("login:button:forgetPassword") }}
|
||||
{{ $t('login:button:forgetPassword') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
@@ -180,10 +181,12 @@
|
||||
>
|
||||
<h1 style="text-align: center; margin-bottom: 20px">关于</h1>
|
||||
<p style="margin-bottom: 20px" v-if="NODE_ENV === 'usa'">
|
||||
{{ $t("login:title:system_title") }}
|
||||
{{ $t('login:title:system_title') }}
|
||||
</p>
|
||||
<p style="margin-bottom: 20px" v-else>{{ $t('login:title:system') }}</p>
|
||||
<p style="margin-bottom: 20px">
|
||||
V{{ $Version.IsEnv_US ? $version.Version_US : $version.Version }}
|
||||
</p>
|
||||
<p style="margin-bottom: 20px" v-else>{{ $t("login:title:system") }}</p>
|
||||
<p style="margin-bottom: 20px">V1.5.3.001</p>
|
||||
<p style="margin-bottom: 20px" v-if="language === 'zh'">
|
||||
Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司
|
||||
版权所有
|
||||
@@ -202,36 +205,38 @@
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<browserTip ref="browserTip" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from "vuex";
|
||||
import TopLang from "./topLang";
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
import TopLang from './topLang'
|
||||
// import NoticeMarquee from '../trials/trials-layout/components/noticeMarquee'
|
||||
import Vcode from "vue-puzzle-vcode";
|
||||
import Img1 from "@/assets/pic-2.png";
|
||||
import Vcode from 'vue-puzzle-vcode'
|
||||
import browserTip from '@/views/dictionary/template/browser/tip.vue'
|
||||
import Img1 from '@/assets/pic-2.png'
|
||||
export default {
|
||||
name: "Login",
|
||||
components: { TopLang, Vcode },
|
||||
name: 'Login',
|
||||
components: { TopLang, Vcode, browserTip },
|
||||
data() {
|
||||
return {
|
||||
NODE_ENV: process.env.NODE_ENV,
|
||||
NODE_ENV: process.env.NODE_ENV, // process.env.NODE_ENV
|
||||
VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION,
|
||||
aboutVisible: false,
|
||||
loginForm: {
|
||||
username: "",
|
||||
password: "",
|
||||
username: '',
|
||||
password: '',
|
||||
UserId: null,
|
||||
},
|
||||
loginRules: {
|
||||
username: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("login:formRule:userName"),
|
||||
trigger: "blur",
|
||||
message: this.$t('login:formRule:userName'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
{ max: 20, message: `${this.$t("common:ruleMessage:maxLength")} 20` },
|
||||
{ max: 20, message: `${this.$t('common:ruleMessage:maxLength')} 20` },
|
||||
],
|
||||
password: [
|
||||
// {
|
||||
@@ -241,106 +246,118 @@ export default {
|
||||
// },
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("login:formRule:password"),
|
||||
trigger: "blur",
|
||||
message: this.$t('login:formRule:password'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
{ max: 20, message: `${this.$t("common:ruleMessage:maxLength")} 20` },
|
||||
{ max: 20, message: `${this.$t('common:ruleMessage:maxLength')} 20` },
|
||||
],
|
||||
},
|
||||
loading: false,
|
||||
passwordType: "password",
|
||||
passwordType: 'password',
|
||||
loginType: null,
|
||||
location: null,
|
||||
isShow: false,
|
||||
showCode: false,
|
||||
Img1,
|
||||
};
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["asyncRoutes", "routes", "language"]),
|
||||
...mapGetters(['asyncRoutes', 'routes', 'language']),
|
||||
},
|
||||
watch: {
|
||||
'$i18n.locale': {
|
||||
handler() {
|
||||
if (this.$refs.browserTip) {
|
||||
this.$refs.browserTip.open()
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.loginType = this.$route.query.loginType;
|
||||
this.location = this.$route.query.location;
|
||||
zzSessionStorage.setItem("loginType", this.loginType);
|
||||
localStorage.setItem("location", this.location);
|
||||
if (process.env.VUE_APP_OSS_CONFIG_REGION === "oss-us-west-1") {
|
||||
this.$i18n.locale = "en";
|
||||
this.setLanguage("en");
|
||||
this.$updateDictionary();
|
||||
this.loginType = this.$route.query.loginType
|
||||
this.location = this.$route.query.location
|
||||
zzSessionStorage.setItem('loginType', this.loginType)
|
||||
localStorage.setItem('location', this.location)
|
||||
if (process.env.VUE_APP_OSS_CONFIG_REGION === 'oss-us-west-1') {
|
||||
this.$i18n.locale = 'en'
|
||||
this.setLanguage('en')
|
||||
this.$updateDictionary()
|
||||
} else {
|
||||
if (this.location === "USA") {
|
||||
this.$i18n.locale = "en";
|
||||
this.setLanguage("en");
|
||||
this.$updateDictionary();
|
||||
if (this.location === 'USA' || this.NODE_ENV === 'usa') {
|
||||
this.$i18n.locale = 'en'
|
||||
this.setLanguage('en')
|
||||
this.$updateDictionary()
|
||||
} else {
|
||||
// this.$i18n.locale = 'zh'
|
||||
// this.setLanguage('zh')
|
||||
// this.$updateDictionary()
|
||||
}
|
||||
}
|
||||
this.$refs.browserTip.open()
|
||||
},
|
||||
methods: {
|
||||
...mapMutations({ setLanguage: "lang/setLanguage" }),
|
||||
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
||||
openAbout() {
|
||||
this.aboutVisible = true;
|
||||
this.aboutVisible = true
|
||||
},
|
||||
showPwd() {
|
||||
if (this.passwordType === "password") {
|
||||
this.passwordType = "";
|
||||
if (this.passwordType === 'password') {
|
||||
this.passwordType = ''
|
||||
} else {
|
||||
this.passwordType = "password";
|
||||
this.passwordType = 'password'
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.password.focus();
|
||||
});
|
||||
this.$refs.password.focus()
|
||||
})
|
||||
},
|
||||
handleLogin() {
|
||||
this.loginType = this.$route.query.loginType;
|
||||
this.loginType = this.$route.query.loginType
|
||||
this.$refs.loginForm.validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.showCode) {
|
||||
this.isShow = true;
|
||||
this.isShow = true
|
||||
} else {
|
||||
this.onSuccess();
|
||||
this.onSuccess()
|
||||
}
|
||||
} else {
|
||||
// console.log('error submit!!')
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
loginIn(Id) {
|
||||
this.loading = true;
|
||||
this.showCode = false;
|
||||
if (Id) this.loginForm.UserId = Id;
|
||||
this.loading = true
|
||||
this.showCode = false
|
||||
if (Id) this.loginForm.UserId = Id
|
||||
this.$store
|
||||
.dispatch("user/login", this.loginForm)
|
||||
.dispatch('user/login', this.loginForm)
|
||||
.then((res) => {
|
||||
if (res.BasicInfo.IsFirstAdd) {
|
||||
// 当前用户为首次登录,请先修改密码之后再次登录
|
||||
this.$message.success(this.$t("login:message:login1"));
|
||||
this.$message.success(this.$t('login:message:login1'))
|
||||
setTimeout(() => {
|
||||
this.$router.push({
|
||||
path: `/recompose?userName=${this.loginForm.username}`,
|
||||
});
|
||||
}, 500);
|
||||
return;
|
||||
})
|
||||
}, 500)
|
||||
return
|
||||
} else if (res.BasicInfo.LoginState === 1) {
|
||||
// 请先修改密码后再登录!
|
||||
this.$alert(
|
||||
this.$t("login:message:login3"),
|
||||
this.$t("common:title:warning"),
|
||||
this.$t('login:message:login3'),
|
||||
this.$t('common:title:warning'),
|
||||
{
|
||||
callback: (action) => {
|
||||
this.$router.push({
|
||||
path: `/recompose?userName=${this.loginForm.username}`,
|
||||
});
|
||||
return;
|
||||
})
|
||||
return
|
||||
},
|
||||
}
|
||||
);
|
||||
return;
|
||||
)
|
||||
return
|
||||
} else if (res.IsMFA) {
|
||||
this.$MFA({
|
||||
UserId: res.BasicInfo.Id,
|
||||
@@ -348,55 +365,55 @@ export default {
|
||||
username: this.loginForm.username,
|
||||
callBack: this.loginIn,
|
||||
cancelBack: () => {
|
||||
this.loading = false;
|
||||
this.loading = false
|
||||
},
|
||||
});
|
||||
return;
|
||||
})
|
||||
return
|
||||
} else if (res.BasicInfo.LoginState === 2) {
|
||||
// 本次登录的IP或设备与上次不一致,请确认'
|
||||
// this.$alert(this.$t('login:message:login4'), this.$t('common:title:warning'))
|
||||
this.$message.warning(this.$t("login:message:login4"));
|
||||
this.$message.warning(this.$t('login:message:login4'))
|
||||
}
|
||||
this.$store.dispatch("permission/generateRoutes").then((res) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('permission/generateRoutes').then((res) => {
|
||||
this.loading = false
|
||||
if (res && res.length > 0) {
|
||||
this.$store.dispatch("global/getNoticeList");
|
||||
this.$router.addRoutes(res);
|
||||
if (this.loginType === "DevOps") {
|
||||
this.$router.replace({ path: res[0].path });
|
||||
return;
|
||||
this.$store.dispatch('global/getNoticeList')
|
||||
this.$router.addRoutes(res)
|
||||
if (this.loginType === 'DevOps') {
|
||||
this.$router.replace({ path: res[0].path })
|
||||
return
|
||||
}
|
||||
if (this.hasPermi(["role:radmin"])) {
|
||||
this.$router.replace({ path: res[0].path });
|
||||
return;
|
||||
if (this.hasPermi(['role:radmin'])) {
|
||||
this.$router.replace({ path: res[0].path })
|
||||
return
|
||||
}
|
||||
if (
|
||||
this.hasPermi(["role:air", "role:rpm", "role:rcrc", "role:rir"])
|
||||
this.hasPermi(['role:air', 'role:rpm', 'role:rcrc', 'role:rir'])
|
||||
) {
|
||||
this.$router.replace({ path: "/trials/trials-list" });
|
||||
this.$router.replace({ path: '/trials/trials-list' })
|
||||
} else {
|
||||
this.$router.replace({ path: "/trials" });
|
||||
this.$router.replace({ path: '/trials' })
|
||||
}
|
||||
} else {
|
||||
// 此账户暂未配置菜单权限,请联系管理员处理后再登录。
|
||||
this.$message.warning(this.$t("login:message:login2"));
|
||||
this.$message.warning(this.$t('login:message:login2'))
|
||||
}
|
||||
});
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
this.showCode = true;
|
||||
this.loading = false;
|
||||
});
|
||||
this.showCode = true
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
onSuccess() {
|
||||
this.isShow = false;
|
||||
this.loginIn();
|
||||
this.isShow = false
|
||||
this.loginIn()
|
||||
},
|
||||
handleResetPwd() {
|
||||
this.$router.push({ name: "Resetpassword" });
|
||||
this.$router.push({ name: 'Resetpassword' })
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@@ -2,52 +2,65 @@
|
||||
<div v-loading="loading" class="img-container">
|
||||
<el-card class="box-card left">
|
||||
<div class="title">
|
||||
{{$t('trials:none-dicom-show:fileList')}}
|
||||
{{ $t('trials:none-dicom-show:fileList') }}
|
||||
</div>
|
||||
<div class="left-content">
|
||||
<!-- 检查层级 -->
|
||||
<div v-for="(study,i) in studyList" :key="study.CodeView">
|
||||
<div v-for="(study, i) in studyList" :key="study.CodeView">
|
||||
<div class="study-desc">
|
||||
<span>{{ study.CodeView }}</span>
|
||||
<span style="margin:0 5px">{{ study.Modality }}</span>
|
||||
<span style="margin: 0 5px">{{ study.Modality }}</span>
|
||||
<span>{{ getBodyPart(study.BodyPart) }}</span>
|
||||
</div>
|
||||
<!-- 文件层级 -->
|
||||
<div v-if="study.NoneDicomStudyFileList.length === 0" class="empty-text">
|
||||
<slot name="empty">暂无数据</slot>
|
||||
<div
|
||||
v-if="study.NoneDicomStudyFileList.length === 0"
|
||||
class="empty-text"
|
||||
>
|
||||
<slot name="empty">{{ $t('trials:audit:message:noData') }}</slot>
|
||||
</div>
|
||||
<div v-else id="imgList" style="height:100%;overflow: hidden">
|
||||
<div v-else id="imgList" style="height: 100%; overflow: hidden">
|
||||
<div
|
||||
v-for="(item,j) in study.NoneDicomStudyFileList"
|
||||
v-for="(item, j) in study.NoneDicomStudyFileList"
|
||||
:id="`img${item.Id}`"
|
||||
:key="item.Id"
|
||||
:class="{
|
||||
'is-boxActive': item.Id === currentFileId
|
||||
'is-boxActive': item.Id === currentFileId,
|
||||
}"
|
||||
class="img-box"
|
||||
@click="selected(item,i,j,true)"
|
||||
@click="selected(item, i, j, true)"
|
||||
>
|
||||
{{ `${j+1}. ${item.FileName}` }}
|
||||
<div v-if="item.FileName.length < 15" class="img-text">
|
||||
{{ `${j + 1}. ${item.FileName}` }}
|
||||
</div>
|
||||
<el-tooltip v-else :content="item.FileName" placement="bottom">
|
||||
<div class="img-text">
|
||||
{{ `${j + 1}. ${item.FileName}` }}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
<!-- 预览图像 -->
|
||||
<el-card class="box-card right">
|
||||
<div style="width:100%;height: 100%;">
|
||||
<Preview v-if="previewImage.imgList.length > 0" ref="previewImage" style="width:100%;" :preview-image="previewImage" :value="currentStudyFileIndex" @selectedImg="selectedImg" />
|
||||
<div style="width: 100%; height: 100%">
|
||||
<Preview
|
||||
v-if="previewImage.imgList.length > 0"
|
||||
ref="previewImage"
|
||||
style="width: 100%"
|
||||
:preview-image="previewImage"
|
||||
:value="currentStudyFileIndex"
|
||||
@selectedImg="selectedImg"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
<!-- <el-card class="box-card" style="width:300px;height:100%;padding: 10px;margin-left:10px;">
|
||||
<CheckForm />
|
||||
</el-card> -->
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -59,7 +72,7 @@ import Preview from './components/preview'
|
||||
export default {
|
||||
name: 'Notice',
|
||||
components: {
|
||||
Preview
|
||||
Preview,
|
||||
// CheckForm
|
||||
},
|
||||
data() {
|
||||
@@ -76,18 +89,18 @@ export default {
|
||||
popup: true, // 弹窗的显示隐藏
|
||||
studyCode: '',
|
||||
modality: '',
|
||||
bodyPart: ''
|
||||
bodyPart: '',
|
||||
},
|
||||
previewVisible: false,
|
||||
studyList: [],
|
||||
subjectVisitId: '',
|
||||
sudyId: '',
|
||||
loading: false,
|
||||
bp:[]
|
||||
bp: [],
|
||||
}
|
||||
},
|
||||
async created(){
|
||||
this.bp = await this.$getBodyPart(this.$route.query.trialId);
|
||||
async created() {
|
||||
this.bp = await this.$getBodyPart(this.$route.query.trialId)
|
||||
},
|
||||
async mounted() {
|
||||
if (this.$router.currentRoute.query.TokenKey) {
|
||||
@@ -112,31 +125,47 @@ export default {
|
||||
separator = ','
|
||||
}
|
||||
var arr = bodyPart.split(separator)
|
||||
var newArr = arr.map(i => {
|
||||
return this.$fd('Bodypart', i.trim(),'Code',{Bodypart:this.bp},'Name')
|
||||
var newArr = arr.map((i) => {
|
||||
return this.$fd(
|
||||
'Bodypart',
|
||||
i.trim(),
|
||||
'Code',
|
||||
{ Bodypart: this.bp },
|
||||
'Name'
|
||||
)
|
||||
})
|
||||
console.log(newArr,this.bp)
|
||||
console.log(newArr, this.bp)
|
||||
return newArr.join(' | ')
|
||||
},
|
||||
// 获取非Dicom检查信息
|
||||
getNoneDicomList() {
|
||||
this.loading = true
|
||||
getNoneDicomStudyList(this.subjectVisitId, this.studyId, true).then(res => {
|
||||
this.studyList = res.Result
|
||||
this.loading = false
|
||||
const studyIndex = this.studyList.findIndex(item => {
|
||||
return item.NoneDicomStudyFileList.length > 0
|
||||
getNoneDicomStudyList(
|
||||
this.subjectVisitId,
|
||||
this.studyId,
|
||||
false,
|
||||
this.$route.query.visitTaskId
|
||||
)
|
||||
.then((res) => {
|
||||
this.studyList = res.Result
|
||||
this.loading = false
|
||||
const studyIndex = this.studyList.findIndex((item) => {
|
||||
return item.NoneDicomStudyFileList.length > 0
|
||||
})
|
||||
if (studyIndex > -1) {
|
||||
var fileObj = this.studyList[studyIndex]['NoneDicomStudyFileList']
|
||||
this.selected(fileObj[0], studyIndex, 0, true)
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
if (studyIndex > -1) {
|
||||
var fileObj = this.studyList[studyIndex]['NoneDicomStudyFileList']
|
||||
this.selected(fileObj[0], studyIndex, 0, true)
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
},
|
||||
selected(file, studyIndex, fileIndex, isChangeSub = false) {
|
||||
this.currentFileId = file.Id
|
||||
this.currentStudyIndex = studyIndex
|
||||
this.previewImage.imgList = this.studyList[studyIndex].NoneDicomStudyFileList
|
||||
this.previewImage.imgList =
|
||||
this.studyList[studyIndex].NoneDicomStudyFileList
|
||||
this.currentStudyFileIndex = fileIndex
|
||||
this.previewImage.index = fileIndex
|
||||
this.previewImage.studyCode = this.studyList[studyIndex].CodeView
|
||||
@@ -151,11 +180,17 @@ export default {
|
||||
selectedImg(fileIndex) {
|
||||
if (this.studyList.length > 0) {
|
||||
this.currentStudyFileIndex = fileIndex
|
||||
this.currentFileId = this.studyList[this.currentStudyIndex].NoneDicomStudyFileList[fileIndex].Id
|
||||
this.currentFileId =
|
||||
this.studyList[this.currentStudyIndex].NoneDicomStudyFileList[
|
||||
fileIndex
|
||||
].Id
|
||||
this.previewImage.index = fileIndex
|
||||
this.previewImage.studyCode = this.studyList[this.currentStudyIndex].CodeView
|
||||
this.previewImage.bodyPart = this.studyList[this.currentStudyIndex].BodyPart
|
||||
this.previewImage.modality = this.studyList[this.currentStudyIndex].Modality
|
||||
this.previewImage.studyCode =
|
||||
this.studyList[this.currentStudyIndex].CodeView
|
||||
this.previewImage.bodyPart =
|
||||
this.studyList[this.currentStudyIndex].BodyPart
|
||||
this.previewImage.modality =
|
||||
this.studyList[this.currentStudyIndex].Modality
|
||||
this.$nextTick(() => {
|
||||
const target = document.getElementById(`img${this.currentFileId}`)
|
||||
const parent = document.getElementsByClassName('left-content')[0]
|
||||
@@ -165,14 +200,13 @@ export default {
|
||||
},
|
||||
preview() {
|
||||
this.previewVisible = true
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.img-container{
|
||||
.img-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -186,27 +220,27 @@ export default {
|
||||
border-radius: 10px;
|
||||
background: #d0d0d0;
|
||||
}
|
||||
/deep/ .el-card__body{
|
||||
/deep/ .el-card__body {
|
||||
padding: 0px;
|
||||
}
|
||||
}
|
||||
.study-desc{
|
||||
.study-desc {
|
||||
padding: 15px 5px;
|
||||
line-height: 20px;
|
||||
background-color: #d5d5d5;
|
||||
font-weight: 500;
|
||||
}
|
||||
.left{
|
||||
width:220px;
|
||||
.left {
|
||||
width: 220px;
|
||||
height: 100%;
|
||||
|
||||
/deep/ .el-card__body{
|
||||
/deep/ .el-card__body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.title{
|
||||
.title {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
border: 1ppx solid;
|
||||
@@ -215,7 +249,7 @@ export default {
|
||||
background-color: #4e4e4e;
|
||||
color: #ffffff;
|
||||
}
|
||||
.left-content{
|
||||
.left-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
@@ -231,21 +265,26 @@ export default {
|
||||
// overflow-y: auto;
|
||||
// padding: 0;
|
||||
// }
|
||||
.img-box{
|
||||
.img-box {
|
||||
// position: relative;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 2px solid #f3f3f3;
|
||||
width: 180px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
|
||||
cursor: pointer;
|
||||
// margin-bottom: 5px;
|
||||
padding-left: 5px;
|
||||
text-overflow:ellipsis;
|
||||
}
|
||||
.img-text {
|
||||
display: inline-block;
|
||||
width: 200px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis; /* 用省略号表示溢出的文本 */
|
||||
white-space: nowrap;
|
||||
}
|
||||
.img-box:nth-last-child(1){
|
||||
.img-box:nth-last-child(1) {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.is-boxActive {
|
||||
@@ -256,14 +295,13 @@ export default {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
.right{
|
||||
.right {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
margin-left: 10px;
|
||||
/deep/ .el-card__body{
|
||||
/deep/ .el-card__body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -62,7 +62,7 @@ export default {
|
||||
// 获取非Dicom检查信息
|
||||
getNoneDicomList() {
|
||||
this.loading = true
|
||||
getNoneDicomStudyList(this.subjectVisitId, '', true).then(res => {
|
||||
getNoneDicomStudyList(this.subjectVisitId, '').then(res => {
|
||||
this.noneDicomStudyList = res.Result
|
||||
this.loading = false
|
||||
const study = this.noneDicomStudyList.find((item, index) => {
|
||||
|
||||
+123
-64
@@ -1,76 +1,130 @@
|
||||
<template>
|
||||
<div style="display: flex;justify-content: center">
|
||||
<div style="width: 600px;text-align: center;border: 1px solid #e6e6e6;margin-top:40px;padding:10px;">
|
||||
<div class="trial-myinfo-head" style="font-size: 30px;line-height: 120px;">
|
||||
<div style="display: flex; justify-content: center">
|
||||
<div
|
||||
style="
|
||||
width: 600px;
|
||||
text-align: center;
|
||||
border: 1px solid #e6e6e6;
|
||||
margin-top: 40px;
|
||||
padding: 10px;
|
||||
"
|
||||
>
|
||||
<div
|
||||
class="trial-myinfo-head"
|
||||
style="font-size: 30px; line-height: 120px"
|
||||
>
|
||||
<!-- 首次登录修改密码 -->
|
||||
{{ $t('recompose:title:init') }}
|
||||
</div>
|
||||
<el-form ref="passwordForm" v-loading="loading" label-position="right" :model="password" :rules="passwordFormRules" label-width="120px">
|
||||
<el-form
|
||||
ref="passwordForm"
|
||||
v-loading="loading"
|
||||
label-position="right"
|
||||
:model="password"
|
||||
:rules="passwordFormRules"
|
||||
:label-width="$i18n.locale === 'en' ? '180px' : '120px'"
|
||||
>
|
||||
<!-- 用户名 -->
|
||||
<el-form-item :label="$t('recompose:form:userName')" prop="NewUserName">
|
||||
<el-input v-model="password.NewUserName" />
|
||||
</el-form-item>
|
||||
<!-- 旧密码 -->
|
||||
<el-form-item :label="$t('recompose:form:oldPassword')" prop="OldPassWord">
|
||||
<el-input v-model="password.OldPassWord" type="password" show-password auto-complete="new-password" />
|
||||
<el-form-item
|
||||
:label="$t('recompose:form:oldPassword')"
|
||||
prop="OldPassWord"
|
||||
>
|
||||
<el-input
|
||||
v-model="password.OldPassWord"
|
||||
type="password"
|
||||
show-password
|
||||
auto-complete="new-password"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 新密码 -->
|
||||
<el-form-item :label="$t('recompose:form:newPassword')" prop="NewPassWord">
|
||||
<el-input v-model="password.NewPassWord" type="password" show-password auto-complete="new-password" />
|
||||
<el-form-item
|
||||
:label="$t('recompose:form:newPassword')"
|
||||
prop="NewPassWord"
|
||||
>
|
||||
<el-input
|
||||
v-model="password.NewPassWord"
|
||||
type="password"
|
||||
show-password
|
||||
auto-complete="new-password"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 确认密码 -->
|
||||
<el-form-item :label="$t('recompose:form:confirmPassword')" prop="ConfirmPassWord">
|
||||
<el-input v-model="password.ConfirmPassWord" type="password" show-password auto-complete="new-password" />
|
||||
<el-form-item
|
||||
:label="$t('recompose:form:confirmPassword')"
|
||||
prop="ConfirmPassWord"
|
||||
>
|
||||
<el-input
|
||||
v-model="password.ConfirmPassWord"
|
||||
type="password"
|
||||
show-password
|
||||
auto-complete="new-password"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item style="text-align:right">
|
||||
<el-form-item style="text-align: right">
|
||||
<!-- 取消 -->
|
||||
<el-button
|
||||
size="small"
|
||||
@click="cancel"
|
||||
>
|
||||
<el-button size="small" @click="cancel">
|
||||
{{ $t('recompose:button:cancel') }}
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="save"
|
||||
>
|
||||
<el-button type="primary" size="small" @click="save">
|
||||
{{ $t('recompose:button:save') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { modifyPassword } from '@/api/admin.js'
|
||||
import md5 from 'js-md5'
|
||||
import {mapMutations} from "vuex";
|
||||
import { mapMutations } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
password: {
|
||||
NewUserName: null
|
||||
NewUserName: null,
|
||||
},
|
||||
passwordFormRules: {
|
||||
NewUserName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
|
||||
OldPassWord: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
|
||||
NewUserName: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:specify'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
OldPassWord: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:specify'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
NewPassWord: [
|
||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:specify'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
{
|
||||
required: true,
|
||||
trigger: 'blur',
|
||||
validator: this.$validatePassword
|
||||
validator: this.$validatePassword,
|
||||
},
|
||||
],
|
||||
ConfirmPassWord: [
|
||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
||||
]
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:specify'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
},
|
||||
userId: null,
|
||||
loading: false
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -78,7 +132,6 @@ export default {
|
||||
if (!this.password.NewUserName) {
|
||||
// 该页面只提供给首次进入系统的用户使用
|
||||
this.$alert(this.$t('recompose:message:warning'))
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -96,7 +149,7 @@ export default {
|
||||
this.$updateDictionary()
|
||||
},
|
||||
save() {
|
||||
this.$refs.passwordForm.validate(valid => {
|
||||
this.$refs.passwordForm.validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.password.NewPassWord !== this.password.ConfirmPassWord) {
|
||||
// 两次密码输入不一致
|
||||
@@ -106,58 +159,64 @@ export default {
|
||||
const param = {
|
||||
NewUserName: this.password.NewUserName,
|
||||
NewPassWord: md5(this.password.NewPassWord),
|
||||
OldPassWord: md5(this.password.OldPassWord)
|
||||
OldPassWord: md5(this.password.OldPassWord),
|
||||
}
|
||||
this.loading = true
|
||||
modifyPassword(param).then(res => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
// 修改成功,请重新登录账号
|
||||
this.$message.success(this.$t('recompose:message:updatedSuccessfully'))
|
||||
setTimeout(() => {
|
||||
this.logout()
|
||||
}, 500)
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
modifyPassword(param)
|
||||
.then((res) => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
// 修改成功,请重新登录账号
|
||||
this.$message.success(
|
||||
this.$t('recompose:message:updatedSuccessfully')
|
||||
)
|
||||
setTimeout(() => {
|
||||
this.logout()
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
this.$refs['passwordForm'].resetFields()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.reset-wrapper {
|
||||
padding: 20px;
|
||||
}
|
||||
.reset-wrapper .el-page-header {
|
||||
line-height: 50px;
|
||||
border: 1px solid #ebeef5;
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
}
|
||||
.reset-wrapper .box-wrapper {
|
||||
width: 60%;
|
||||
margin: 20px auto;
|
||||
padding: 10px;
|
||||
color: #303133;
|
||||
}
|
||||
.reset-wrapper {
|
||||
padding: 20px;
|
||||
}
|
||||
.reset-wrapper .el-page-header {
|
||||
line-height: 50px;
|
||||
border: 1px solid #ebeef5;
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
}
|
||||
.reset-wrapper .box-wrapper {
|
||||
width: 60%;
|
||||
margin: 20px auto;
|
||||
padding: 10px;
|
||||
color: #303133;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
::v-deep .is-error{
|
||||
::v-deep .is-error {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
input:-webkit-autofill {
|
||||
-webkit-text-fill-color: #ededed !important;
|
||||
box-shadow: 0 0 0px 1000px transparent inset !important;
|
||||
background-color:transparent;
|
||||
box-shadow: 0 0 0px 1000px transparent inset !important;
|
||||
background-color: transparent;
|
||||
background-image: none;
|
||||
transition: background-color 50000s ease-in-out 0s;
|
||||
}
|
||||
input {
|
||||
background-color:transparent;
|
||||
background-color: transparent;
|
||||
caret-color: #fff;
|
||||
}
|
||||
</style>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user