Compare commits
895 Commits
v1.5.4
..
6ecce41b35
| Author | SHA1 | Date | |
|---|---|---|---|
| 6ecce41b35 | |||
| 3a20586609 | |||
| b1d707a7dd | |||
| 51101748b8 | |||
| 5fb085b6d3 | |||
| 0aaea5a325 | |||
| e57d03a040 | |||
| 7a07172c23 | |||
| 4e06b5ef87 | |||
| 5e520a94c1 | |||
| c2be30632a | |||
| 443ee66e33 | |||
| 95f210a90d | |||
| 25336491ac | |||
| 581cd2c9c1 | |||
| f0b1d8f3c9 | |||
| 73f12173f5 | |||
| 2e30461e2e | |||
| 2d91053668 | |||
| 5b90b2d155 | |||
| 33f920e7bc | |||
| 45aa1ba24a | |||
| d47f0811cb | |||
| e336d90f45 | |||
| e723d345d7 | |||
| cb40a8e880 | |||
| b166818131 | |||
| dafc92d4b1 | |||
| 8cf047a854 | |||
| a9f8f3a1da | |||
| 48335b4c2a | |||
| 5784a4eb93 | |||
| 2f875d94c7 | |||
| 05c6a9a8fc | |||
| 9c5e3570b5 | |||
| 1be88b66af | |||
| 12e93fbd15 | |||
| ac33e9268d | |||
| 81d9f2ea7b | |||
| 9b47ae188c | |||
| de400c66d8 | |||
| 261d1468e7 | |||
| 080e858ae0 | |||
| 55d8db3369 | |||
| 056aa80097 | |||
| aeeb13d035 | |||
| d82e009206 | |||
| 0b09bcb702 | |||
| 30ee433de3 | |||
| 3783f3cea4 | |||
| 2aa98eb68b | |||
| 486e7db9f1 | |||
| b2f0923df2 | |||
| b64809a4d4 | |||
| 3a81bad5db | |||
| f8ddeb311c | |||
| 7c9207db57 | |||
| 174f4b0c4b | |||
| 53f0462108 | |||
| 6d7b991482 | |||
| cbec90d0bf | |||
| bc3f475954 | |||
| 4c652a91fc | |||
| f7e8d3b4dd | |||
| b30644ddd2 | |||
| 181a8bddf4 | |||
| 4b353bab8f | |||
| d9de0f22cf | |||
| 6cb544117c | |||
| 629816217c | |||
| ab527e2357 | |||
| b076c1edbd | |||
| fbbcad359c | |||
| 24500fc1a1 | |||
| e388ea2543 | |||
| 4b406f96fc | |||
| 4b31cf1196 | |||
| 4c1d1fb9b1 | |||
| 2952652dbc | |||
| 485a53011d | |||
| 7d9cededbf | |||
| b691219db8 | |||
| f34faa7db3 | |||
| ede1455bc4 | |||
| 1e36464182 | |||
| 6a52f9571d | |||
| bd85918f8d | |||
| 23069c7ef7 | |||
| d866153ccc | |||
| cb4d44ef74 | |||
| e99e69d0dd | |||
| 55bb2493e4 | |||
| 041c23daf6 | |||
| 7c01819ced | |||
| ff97099c3f | |||
| bff239179f | |||
| 237e3eed60 | |||
| 1bc78dffc1 | |||
| e21d3b331a | |||
| 6992dc6a2b | |||
| d53130e994 | |||
| 631c903135 | |||
| 994c97479b | |||
| 33b172fb66 | |||
| 01f6049f21 | |||
| 07fd3ab863 | |||
| c51dedbd1e | |||
| 5619412556 | |||
| 34267bc007 | |||
| 286ce9656c | |||
| db856c6aa9 | |||
| 682d07cc6d | |||
| af27788e4c | |||
| bc6f15388d | |||
| 6714d2a3c2 | |||
| 76616e257f | |||
| 1d35efd4aa | |||
| de0051a8c3 | |||
| 8c5297e401 | |||
| 55b39a6b29 | |||
| ceb1425908 | |||
| 093cffa298 | |||
| eb5561b611 | |||
| cea867bdaf | |||
| d1958e3bef | |||
| a79796df4c | |||
| 327623e8b1 | |||
| 19c25d369e | |||
| ea9c1ca90d | |||
| 9bd6c1f433 | |||
| 62d5b39036 | |||
| 03e390013e | |||
| b65b93a5ab | |||
| 94d626a453 | |||
| 13d0f6d796 | |||
| 0c90ffb514 | |||
| 7a5693a468 | |||
| b8baa1b5d8 | |||
| c02308dd23 | |||
| 49a915fb89 | |||
| 07b5296a4b | |||
| 5eb00c4111 | |||
| 39b5333f9c | |||
| 79473f6638 | |||
| 7952c83b52 | |||
| 9671722e1a | |||
| fe18b885f1 | |||
| 25a3a0e371 | |||
| e947c99f71 | |||
| f672ac3500 | |||
| 13418ddad3 | |||
| 296a455f0d | |||
| 31047f2e30 | |||
| a3e518d960 | |||
| e326cba5e0 | |||
| 8cbb7a8333 | |||
| 5c700f055f | |||
| d292b655d3 | |||
| ab362937f3 | |||
| a8d090e32c | |||
| 716d0e3513 | |||
| 8d84dde45e | |||
| 6743811bd6 | |||
| 71f856029c | |||
| 96d2a99f17 | |||
| 7b7d4a7d6d | |||
| 0413a791c9 | |||
| 8802e56549 | |||
| 3f9edfa2a0 | |||
| eccf51cea9 | |||
| 11627af629 | |||
| fadd24480d | |||
| 6b7d3da4a4 | |||
| 48ebd8e76d | |||
| bb4193730e | |||
| a19d756879 | |||
| 94e924a753 | |||
| 3633de8c35 | |||
| 4400d31bca | |||
| 2a11d3f012 | |||
| ae599f4ada | |||
| 19a6371008 | |||
| 7ebfcd0827 | |||
| 0158ab2e96 | |||
| ee9a30f6d0 | |||
| 2d938d077e | |||
| 9f9255d315 | |||
| 0624446d2c | |||
| 0458b2d73d | |||
| 1abb330d7d | |||
| 7343036ebf | |||
| 5edf2f8790 | |||
| fb4fc347f3 | |||
| c1c6f5a6c7 | |||
| 7360be1726 | |||
| ec8c9df6b6 | |||
| c18587b4f5 | |||
| 7eff02eb9b | |||
| 4c8f2675ad | |||
| 67dd01c0be | |||
| 925451ea65 | |||
| 70fcd15ab7 | |||
| 9c156ec1e6 | |||
| dd57f24996 | |||
| cc520270ac | |||
| 9f9a799832 | |||
| 1422a6f406 | |||
| f7124d35b0 | |||
| fabd26536c | |||
| a83b094a46 | |||
| 6c46a58f15 | |||
| 6f6959627f | |||
| f1f27f405b | |||
| 21a1eaf20a | |||
| f7aaaf7900 | |||
| a3dcb7054a | |||
| 917d32bf46 | |||
| 99cd18c8e5 | |||
| 58f223a028 | |||
| 3c3a670ae4 | |||
| b124178355 | |||
| 28be57dfee | |||
| 06c7398c1b | |||
| 11c7070799 | |||
| 0633e775d4 | |||
| c18c083840 | |||
| 20ff8d2a81 | |||
| 6b1bfe0c0b | |||
| 5d13328c74 | |||
| bb830e2cb4 | |||
| ee4bd5ec8e | |||
| 86020e4f16 | |||
| d78ccb6e98 | |||
| b23e9efe06 | |||
| 14d1866138 | |||
| cc4afc8d37 | |||
| 5a1b4b181a | |||
| fe8b0a524b | |||
| d6861f400e | |||
| 8281737ddc | |||
| 9bfb233270 | |||
| bbc2d43335 | |||
| 3694c51288 | |||
| 219e39afb3 | |||
| e255f8c859 | |||
| 4b84c7df3b | |||
| 9c98cfb668 | |||
| bc15ac1cd3 | |||
| 6288770c26 | |||
| 93c64e04f2 | |||
| df638f5a73 | |||
| b0195b8d21 | |||
| f5954817fb | |||
| 77f8a80fd6 | |||
| 2b7a100d73 | |||
| 07a4c66fcc | |||
| 143b6e9fc1 | |||
| 6d943f94d8 | |||
| a6b68ea599 | |||
| 8c68866aca | |||
| ccdedbee2f | |||
| 3b7ea6491e | |||
| 12e1454be4 | |||
| 9582e0a5a7 | |||
| 9a77ce849b | |||
| 7beec24a7c | |||
| a564225623 | |||
| 8790c8f814 | |||
| 4c1ed950e5 | |||
| 4f1e951a83 | |||
| a3e544f6e4 | |||
| 292151f7e1 | |||
| c3b7fd7072 | |||
| 109470ca1a | |||
| 98c42c7b6a | |||
| 75ca85a994 | |||
| e8f80646f1 | |||
| bc70c64898 | |||
| d114690114 | |||
| 705585da38 | |||
| f58eb07323 | |||
| 83a14956e3 | |||
| ef2e7d4cf8 | |||
| 9e7ec09719 | |||
| 19f9c8012c | |||
| 506307690d | |||
| b945db8a47 | |||
| 7bb0213a8c | |||
| a75367480d | |||
| 64fd549d12 | |||
| f0ec643205 | |||
| 34c05a9728 | |||
| 49241bacfa | |||
| 3bb0250699 | |||
| 47dd21ea7e | |||
| 64d268b6e8 | |||
| 463ecee3d8 | |||
| 9936d8c942 | |||
| 1e132e0046 | |||
| 95097caac2 | |||
| dcde93b4f8 | |||
| e690aadd8a | |||
| 7874f69bfe | |||
| bdb45c7b4e | |||
| 0a4683386c | |||
| c73297003f | |||
| 4faff7e85c | |||
| 595e10a77a | |||
| 360826ef28 | |||
| cd7d261adf | |||
| 3ed09d16f6 | |||
| 2a016cf5f6 | |||
| 2d996941a2 | |||
| 2ac92aa8b3 | |||
| e8a21fa5a3 | |||
| 771554c9b2 | |||
| 3b7271d3a8 | |||
| d2ab510a3c | |||
| 7e8af2b4e5 | |||
| f9f3c55ea1 | |||
| 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 | |||
| d0641cdfc9 | |||
| 32274c4a37 | |||
| 132af31c1b | |||
| f8c28fc66d | |||
| 46bc955e76 | |||
| 802870f3b4 | |||
| 8a46adf96f | |||
| 57f470e219 | |||
| 14cc8ad5f5 | |||
| 049d8dc430 | |||
| e0ccfe8da7 | |||
| c5758b17df | |||
| e485b73e1b | |||
| 91c78127f2 | |||
| bbfd119d08 | |||
| 32de7c4f18 | |||
| b76303c63d | |||
| 96cb8a478c | |||
| c13fe6b521 | |||
| fc6d0c7b35 | |||
| 0ba8739cb5 | |||
| aeeb4b05f5 | |||
| df304d8f07 | |||
| 404d18faa5 | |||
| c6c9142934 | |||
| 14ad1ae156 | |||
| ddd35f4ff8 | |||
| 275501db20 | |||
| 7f8d08032c | |||
| c3955dc017 | |||
| c01c69a9fe | |||
| d1f90a2525 | |||
| 4212eb0f52 | |||
| d37c44a268 | |||
| 4c0b219b47 | |||
| 42c1b56dda | |||
| d56b904141 | |||
| aa5f5f9bc6 | |||
| 8fc6bdb437 | |||
| a7ce5526fd | |||
| 4b9118839f | |||
| a533bb680b | |||
| d274c774ba | |||
| a7a034014d | |||
| ca98bc278c | |||
| 03cf2def1b | |||
| 847845a6c4 | |||
| f5ec5505d4 | |||
| 53a9b3882d | |||
| 671be02d13 | |||
| d1956e3077 | |||
| 9486054a19 | |||
| cd3f36756d | |||
| bea2d448ea | |||
| b9b62334c4 | |||
| 8cf5a1a524 | |||
| 02a5f30224 | |||
| 8933a398d7 | |||
| a71c6e92dc | |||
| 80c0bfb694 | |||
| 426faba24c | |||
| c6cc83aeec | |||
| 46f66ce2d2 | |||
| 35846365a4 | |||
| 90e33e1b97 | |||
| 9b6f8717c3 | |||
| 65da9636a2 | |||
| 9a1b28e08c | |||
| 94ca89db27 | |||
| b786c5e656 | |||
| 0a880af52f | |||
| 089d8668f2 | |||
| a1dab30d37 | |||
| 32a7e42c51 | |||
| 1a69bd9003 | |||
| b37e351491 | |||
| c74806a367 | |||
| b637fc5856 | |||
| de18b8e6e3 | |||
| 31d3a17b80 | |||
| a0bbb7b64c | |||
| a8bebaba49 | |||
| 403008c25f | |||
| 52ed67850d | |||
| dfd0b1a767 | |||
| ced87c29c9 | |||
| 5e14615176 | |||
| 65b9cff361 | |||
| 862dcb1b3d | |||
| 3a02e9a596 | |||
| af586a1187 | |||
| 39a0c8163f | |||
| da0dabecca | |||
| 75efdcf0f7 | |||
| bc674ec334 | |||
| 663c78ef51 | |||
| b8b876c0c9 | |||
| 24e7b30b7e | |||
| ba1ba68c78 | |||
| e51e7d0e66 | |||
| 7f36aa5a05 | |||
| 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 |
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
"i18n:en": "node i18nGenerate.js lang=en keyCol=5 valCol=7"
|
||||
},
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.370.0",
|
||||
"@cornerstonejs/calculate-suv": "^1.1.0",
|
||||
"@cornerstonejs/core": "^1.27.4",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.27.4",
|
||||
@@ -23,6 +24,9 @@
|
||||
"@ffmpeg/ffmpeg": "^0.10.1",
|
||||
"@microsoft/signalr": "^6.0.8",
|
||||
"@riophae/vue-treeselect": "0.4.0",
|
||||
"@vue-office/docx": "^1.6.2",
|
||||
"@vue-office/excel": "^1.7.11",
|
||||
"@vue/composition-api": "^1.7.2",
|
||||
"ali-oss": "^6.17.1",
|
||||
"axios": "0.18.1",
|
||||
"babel-eslint": "7.2.3",
|
||||
@@ -32,6 +36,7 @@
|
||||
"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 +47,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",
|
||||
@@ -62,6 +68,7 @@
|
||||
"vue-clipboard2": "^0.3.1",
|
||||
"vue-contextmenujs": "^1.3.13",
|
||||
"vue-count-to": "^1.0.13",
|
||||
"vue-demi": "^0.14.6",
|
||||
"vue-i18n": "^8.7.0",
|
||||
"vue-pdf": "^4.3.0",
|
||||
"vue-puzzle-vcode": "^1.1.10",
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
<img src="./error_assets/zzlogo2.png" alt="">
|
||||
<img v-show="false" src="./error_assets/zzlogo3.png" alt="">
|
||||
</div>
|
||||
<div class="login-image">
|
||||
<img src="./error_assets/login-bg.png">
|
||||
<div class="login-image login-image-usa">
|
||||
<img src="./error_assets/login-bg.svg" style="max-width: 500px;max-height: 300px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="login-r">
|
||||
@@ -148,7 +148,7 @@
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
width: 1200px;
|
||||
width: 1100px;
|
||||
height: 600px;
|
||||
box-sizing: border-box;
|
||||
background: rgb(255, 255, 255);
|
||||
@@ -179,7 +179,12 @@
|
||||
.login-container .login-body .login-l .login-image img{
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.login-container .login-body .login-l .login-image-usa {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.login-container .login-body .login-r{
|
||||
position: relative;
|
||||
float: left;
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
<img src="./error_assets/zzlogo3.png" alt="">
|
||||
<img v-show="false" src="./error_assets/zzlogo3.png" alt="">
|
||||
</div>
|
||||
<div class="login-image">
|
||||
<img src="./error_assets/login-bg.png">
|
||||
<div class="login-image login-image-usa">
|
||||
<img src="./error_assets/login-bg.svg" style="max-width: 500px;max-height: 300px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="login-r">
|
||||
@@ -104,7 +104,7 @@
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
width: 1200px;
|
||||
width: 1100px;
|
||||
height: 600px;
|
||||
box-sizing: border-box;
|
||||
background: rgb(255, 255, 255);
|
||||
@@ -135,7 +135,12 @@
|
||||
.login-container .login-body .login-l .login-image img{
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.login-container .login-body .login-l .login-image-usa {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.login-container .login-body .login-r{
|
||||
position: relative;
|
||||
float: left;
|
||||
|
||||
|
After Width: | Height: | Size: 98 KiB |
@@ -5,6 +5,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<meta http-equiv="pragram" content="no-cache">
|
||||
<meta name="autocomplete" content="off">
|
||||
<meta http-equiv="Expires" content="0">
|
||||
<meta http-equiv="Pragma" content="no-cache">
|
||||
<meta http-equiv="Cache-control" content="no-store,no-cache,must-revalidate">
|
||||
|
||||
@@ -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>
|
||||
@@ -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' })
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
<router-view />
|
||||
<div
|
||||
v-show="show"
|
||||
v-if="$route.matched.length > 0"
|
||||
v-adaptive
|
||||
@click="openI18n"
|
||||
style="
|
||||
@@ -36,7 +37,12 @@
|
||||
height="100"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column prop="Code" label="标签" width="300">
|
||||
<el-table-column
|
||||
prop="Code"
|
||||
label="标签"
|
||||
width="300"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="Description"-->
|
||||
@@ -53,7 +59,7 @@
|
||||
v-model="scope.row.Value"
|
||||
@input="
|
||||
(e) => {
|
||||
$set(scope.row, 'Value', e);
|
||||
$set(scope.row, 'Value', e)
|
||||
}
|
||||
"
|
||||
size="mini"
|
||||
@@ -66,7 +72,7 @@
|
||||
v-model="scope.row.ValueCN"
|
||||
@input="
|
||||
(e) => {
|
||||
$set(scope.row, 'ValueCN', e);
|
||||
$set(scope.row, 'ValueCN', e)
|
||||
}
|
||||
"
|
||||
size="mini"
|
||||
@@ -81,6 +87,7 @@
|
||||
>
|
||||
</div>
|
||||
</el-drawer>
|
||||
<feedBack v-if="$route.matched.length > 0" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -88,12 +95,14 @@
|
||||
import {
|
||||
batchAddOrUpdateFrontInternationalization,
|
||||
getFrontInternationalizationList,
|
||||
} from "@/api/dictionary/dictionary";
|
||||
import { getTrialExtralConfig } from "@/api/trials";
|
||||
import Vue from "vue";
|
||||
import i18n from "./lang";
|
||||
} 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",
|
||||
name: 'App',
|
||||
components: { feedBack },
|
||||
data() {
|
||||
return {
|
||||
drawer: false,
|
||||
@@ -101,36 +110,43 @@ export default {
|
||||
show: false,
|
||||
key: null,
|
||||
arr: [],
|
||||
};
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.show = process.env.VUE_APP_OSS_PATH === "/test/dist";
|
||||
},
|
||||
watch: {
|
||||
"$route.query": {
|
||||
async handler() {
|
||||
if (
|
||||
this.$route.query.trialId &&
|
||||
this.$route.query.trialId !== this.$store.state.trials.config.trialId
|
||||
) {
|
||||
let res = await getTrialExtralConfig({
|
||||
TrialId: this.$route.query.trialId,
|
||||
});
|
||||
if (res.IsSuccess) {
|
||||
this.$store.dispatch("trials/setConfig", {
|
||||
trialId: this.$route.query.trialId,
|
||||
...res.Result,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
deep: true,
|
||||
},
|
||||
this.show = process.env.VUE_APP_OSS_PATH === '/test/dist'
|
||||
},
|
||||
// watch: {
|
||||
// '$route.query': {
|
||||
// async handler() {
|
||||
// if (!this.$route.query.trialId) {
|
||||
// this.$store.dispatch('trials/setConfig', {})
|
||||
// }
|
||||
// if (
|
||||
// this.$route.query.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,
|
||||
// })
|
||||
// console.log(222222222222)
|
||||
// res.Result.aa = { 阅片人: '采集人', 申办方: 'aaa' }
|
||||
// if (res.IsSuccess) {
|
||||
// this.$store.dispatch('trials/setConfig', {
|
||||
// trialId: this.$route.query.trialId,
|
||||
// ...res.Result,
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// immediate: true,
|
||||
// deep: true,
|
||||
// },
|
||||
// },
|
||||
methods: {
|
||||
changeValue(target, attr, e) {
|
||||
this.$set(target, attr, e);
|
||||
this.$set(target, attr, e)
|
||||
},
|
||||
keyChange(v) {
|
||||
if (this.key) {
|
||||
@@ -142,65 +158,65 @@ export default {
|
||||
~v.Value.indexOf(this.key) ||
|
||||
~v.ValueCN.indexOf(this.key)
|
||||
)
|
||||
);
|
||||
)
|
||||
} else {
|
||||
this.tableData = Object.assign([], this.arr);
|
||||
this.tableData = Object.assign([], this.arr)
|
||||
}
|
||||
},
|
||||
handleSave() {
|
||||
this.$confirm("确定修改当前页面国际化内容?").then(() => {
|
||||
this.$confirm('确定修改当前页面国际化内容?').then(() => {
|
||||
batchAddOrUpdateFrontInternationalization(this.tableData).then(
|
||||
async (res) => {
|
||||
var zhMessages = {},
|
||||
enMessages = {};
|
||||
var Internationalization = await getFrontInternationalizationList();
|
||||
Vue.prototype.$tl = Internationalization.Result;
|
||||
enMessages = {}
|
||||
var Internationalization = await getFrontInternationalizationList()
|
||||
Vue.prototype.$tl = Internationalization.Result
|
||||
this.tableData.forEach((v) => {
|
||||
// zhMessages[v.Description + '_' + v.Code] = v.ValueCN
|
||||
// enMessages[v.Description + '_' + v.Code] = v.Value
|
||||
zhMessages[v.Code] = v.ValueCN;
|
||||
enMessages[v.Code] = v.Value;
|
||||
});
|
||||
i18n.mergeLocaleMessage("zh", zhMessages);
|
||||
i18n.mergeLocaleMessage("en", enMessages);
|
||||
this.drawer = false;
|
||||
this.$message.success("国际化修改成功");
|
||||
zhMessages[v.Code] = v.ValueCN
|
||||
enMessages[v.Code] = v.Value
|
||||
})
|
||||
i18n.mergeLocaleMessage('zh', zhMessages)
|
||||
i18n.mergeLocaleMessage('en', enMessages)
|
||||
this.drawer = false
|
||||
this.$message.success('国际化修改成功')
|
||||
}
|
||||
);
|
||||
});
|
||||
)
|
||||
})
|
||||
},
|
||||
openI18n() {
|
||||
this.tableData = [];
|
||||
this.key = null;
|
||||
this.drawer = true;
|
||||
let arr = [];
|
||||
this.tableData = []
|
||||
this.key = null
|
||||
this.drawer = true
|
||||
let arr = []
|
||||
let tableData = this.$tl.map((v) => {
|
||||
let a = { ...v };
|
||||
let a = { ...v }
|
||||
// if (!a.Description) {
|
||||
// a.Description = this.$route.path
|
||||
// }
|
||||
return a;
|
||||
});
|
||||
return a
|
||||
})
|
||||
tableData = tableData.filter((v) => {
|
||||
// return ~this.$path.indexOf(v.Description + '_' + v.Code)
|
||||
return ~this.$path.indexOf(v.Code);
|
||||
});
|
||||
return ~this.$path.indexOf(v.Code)
|
||||
})
|
||||
this.$path.forEach((v) => {
|
||||
let o = tableData.find((a) => {
|
||||
return a.Code === v;
|
||||
});
|
||||
return a.Code === v
|
||||
})
|
||||
if (o) {
|
||||
arr.push(o);
|
||||
arr.push(o)
|
||||
} else {
|
||||
arr.push({
|
||||
Code: v,
|
||||
Description: null,
|
||||
Value: null,
|
||||
ValueCN: null,
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
this.arr = arr;
|
||||
})
|
||||
this.arr = arr
|
||||
if (this.key) {
|
||||
this.tableData = Object.assign(
|
||||
[],
|
||||
@@ -210,15 +226,15 @@ export default {
|
||||
~v.Value.indexOf(this.key) ||
|
||||
~v.ValueCN.indexOf(this.key)
|
||||
)
|
||||
);
|
||||
)
|
||||
} else {
|
||||
this.tableData = Object.assign([], this.arr);
|
||||
this.tableData = Object.assign([], this.arr)
|
||||
}
|
||||
// console.log(JSON.stringify(this.$path))
|
||||
// console.log(JSON.stringify(this.tableData))
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@@ -243,7 +259,7 @@ input::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none !important;
|
||||
}
|
||||
|
||||
input[type="number"] {
|
||||
input[type='number'] {
|
||||
-moz-appearance: textfield !important;
|
||||
}
|
||||
|
||||
@@ -269,10 +285,13 @@ textarea {
|
||||
color: $light_gray;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-family: "Times New Roman";
|
||||
font-family: 'Times New Roman';
|
||||
text-shadow: 1px 0.5px 1.5px #666;
|
||||
}
|
||||
.title-logo {
|
||||
height: 40px;
|
||||
}
|
||||
.title-logo {
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -277,3 +277,43 @@ 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
|
||||
})
|
||||
}
|
||||
// 邮件事件消息列表
|
||||
export function getEventStoreRecordList(data) {
|
||||
return request({
|
||||
url: `/EventStoreRecord/getEventStoreRecordList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 重新发布事件消息
|
||||
export function rePublishEvent(params) {
|
||||
return request({
|
||||
url: `/EventStoreRecord/rePublishEvent`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// userId获取doctorId
|
||||
export function useUserIDGetDoctorID(data) {
|
||||
return request({
|
||||
url: `/TrialSiteSurvey/useUserIDGetDoctorID`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1013,4 +1013,60 @@ 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
|
||||
})
|
||||
}
|
||||
|
||||
export function getSystemCalculateQuestions(params) {
|
||||
return request({
|
||||
url: `/ReadingQuestion/getSystemCalculateQuestions`,
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
export function getSystemCalculateTableQuestions(params) {
|
||||
return request({
|
||||
url: `/ReadingQuestion/getSystemCalculateTableQuestions`,
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
// 添加pd/入组默认邮件
|
||||
export function batchAddEnrollOrPdEmailConfig(params) {
|
||||
return request({
|
||||
url: `/TrialEmailNoticeConfig/batchAddEnrollOrPdEmailConfig`,
|
||||
method: 'post',
|
||||
params
|
||||
})
|
||||
}
|
||||
@@ -51,4 +51,10 @@ export function batchAddOrUpdateFrontInternationalization(params) {
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
// 获取当前版本
|
||||
export function getCurrentPublishInfo() {
|
||||
return request({
|
||||
url: `/PublishLog/getCurrentPublishInfo`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -160,3 +160,100 @@ 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
|
||||
})
|
||||
}
|
||||
// 导出下载记录
|
||||
export function getTrialDownloadList_Export(data) {
|
||||
return requestDownload({
|
||||
url: `/ExcelExport/getTrialDownloadList_Export`,
|
||||
responseType: 'blob',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 导出接收记录
|
||||
export function getSCPImageUploadList_Export(data) {
|
||||
return requestDownload({
|
||||
url: `/ExcelExport/getSCPImageUploadList_Export`,
|
||||
responseType: 'blob',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 导出接收检查影像记录
|
||||
export function getPatientList_Export(data) {
|
||||
return requestDownload({
|
||||
url: `/ExcelExport/getPatientList_Export`,
|
||||
responseType: 'blob',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getCommonEvaluationList_Export(data) {
|
||||
return requestDownload({
|
||||
url: `/ExcelExport/getCommonEvaluationList_Export`,
|
||||
responseType: 'blob',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function getCommonJudgeRatioList_Export(data) {
|
||||
return requestDownload({
|
||||
url: `/ExcelExport/getCommonJudgeRatioList_Export`,
|
||||
responseType: 'blob',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 导出国际化列表
|
||||
export function GetInternationalizationList_Export(data) {
|
||||
return requestDownload({
|
||||
url: `/ExcelExport/GetInternationalizationList_Export`,
|
||||
responseType: 'blob',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 导出一致性分析
|
||||
export function GetAnalysisTaskList_Export(data) {
|
||||
return requestDownload({
|
||||
url: `/ExcelExport/GetAnalysisTaskList_Export`,
|
||||
responseType: 'blob',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 导出邮件配置
|
||||
export function GetEmailNoticeConfigList_Export(data) {
|
||||
return requestDownload({
|
||||
url: `/ExcelExport/GetEmailNoticeConfigList_Export`,
|
||||
responseType: 'blob',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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,68 @@ 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
|
||||
})
|
||||
}
|
||||
// 修改后处理检查类型
|
||||
export function updateTaskStudyModality(params) {
|
||||
return request({
|
||||
url: '/DownloadAndUpload/updateTaskStudyModality',
|
||||
method: 'put',
|
||||
params
|
||||
})
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
import requestDownload from '@/utils/request-download'
|
||||
export function addBaseLineLesion(param) {
|
||||
return request({
|
||||
url: '/report/addBaseLineLesion',
|
||||
@@ -133,9 +133,11 @@ export function AddAdjudicationReport(param) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getVisitStudyList(trialId, subjectVisitId, isReading) {
|
||||
export function getVisitStudyList(trialId, subjectVisitId, isReading, visitTaskId) {
|
||||
let url = `/SubjectVisit/getVisitStudyList/${trialId}/${subjectVisitId}/${isReading}`
|
||||
url = visitTaskId ? `${url}?visitTaskId=${visitTaskId}` : url
|
||||
return request({
|
||||
url: `/SubjectVisit/getVisitStudyList/${trialId}/${subjectVisitId}/${isReading}`,
|
||||
url: url,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -187,3 +189,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
|
||||
})
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@ export function verifySendCode(param) {
|
||||
return request({
|
||||
url: '/TrialSiteSurvey/verifySendCode',
|
||||
method: 'post',
|
||||
data: param
|
||||
data: param,
|
||||
clearToken: true
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -138,10 +138,11 @@ export function addOrUpdateResearchPublication(param) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getTrialExperience(doctorId) {
|
||||
export function getTrialExperience(data) {
|
||||
return request({
|
||||
url: `/trialExperience/getTrialExperience/${doctorId}`,
|
||||
method: 'get'
|
||||
url: `/trialExperience/getTrialExperience`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -236,10 +237,14 @@ export function downloadByAttachmentId(doctorId, attachmentIds) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getDetail(doctorId) {
|
||||
export function getDetail(doctorId, TrialId) {
|
||||
return request({
|
||||
url: `/doctor/getDetail/${doctorId}`,
|
||||
method: 'get'
|
||||
url: `/doctor/getDetail`,
|
||||
method: 'post',
|
||||
data: {
|
||||
DoctorId: doctorId,
|
||||
TrialId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -290,3 +295,75 @@ export function verifyEmialGetDoctorInfo(param) {
|
||||
data: param
|
||||
})
|
||||
}
|
||||
// 新增或编辑基本信息
|
||||
export function addOrUpdateDoctorBasicInfoAndEmployment(param) {
|
||||
return request({
|
||||
url: `/Doctor/addOrUpdateDoctorBasicInfoAndEmployment`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
// 新增或编辑概述
|
||||
export function addOrUpdateGneralSituation(param) {
|
||||
return request({
|
||||
url: `/Doctor/addOrUpdateGneralSituation`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
// 新增或编辑支付方式
|
||||
export function updatePaymentMode(param) {
|
||||
return request({
|
||||
url: `/Doctor/updatePaymentMode`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
// 新增或编辑Publication
|
||||
export function addOrUpdateResearchPublicationInfo(param) {
|
||||
return request({
|
||||
url: `/ResearchPublication/addOrUpdateResearchPublicationInfo`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
// 发送简历采集邮件
|
||||
export function doctorSendEmail(param) {
|
||||
return request({
|
||||
url: `/Doctor/sendEmail`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
// 获取医生是否休假
|
||||
export function getIsVacation(param) {
|
||||
return request({
|
||||
url: `/Vacation/getIsVacation`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
// 获取概述
|
||||
export function getSummarizeInfo(param) {
|
||||
return request({
|
||||
url: `/Doctor/getSummarizeInfo`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
// 删除概述
|
||||
export function deleteSummarizeInfo(param) {
|
||||
return request({
|
||||
url: `/Doctor/deleteSummarizeInfo`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
// pm通过邮箱新建或查询简历
|
||||
export function useEmialGetDoctorInfo(param) {
|
||||
return request({
|
||||
url: `/TrialSiteSurvey/useEmialGetDoctorInfo`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
@@ -286,10 +286,11 @@ export function trialSiteUserSummaryListExport(param) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getVisitStageList(trialId) {
|
||||
export function getVisitStageList(data) {
|
||||
return request({
|
||||
url: `/visitPlan/getVisitStageList/${trialId}`,
|
||||
method: 'get'
|
||||
url: `/visitPlan/getVisitStageList`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1364,9 +1365,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 +3676,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 +3732,186 @@ 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
|
||||
})
|
||||
}
|
||||
// 一致性分析临床数据设置任务为有效
|
||||
export function getVisitClinicalDataName(data) {
|
||||
return request({
|
||||
url: `/ReadingClinicalData/getVisitClinicalDataName`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -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',
|
||||
})
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 7.3 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 }"
|
||||
|
||||
@@ -8,10 +8,11 @@
|
||||
:visible.sync="config.visible"
|
||||
:close-on-click-modal="false"
|
||||
:show-close="config.showClose"
|
||||
:top="config.top"
|
||||
:width="config.width"
|
||||
:fullscreen="config.fullscreen"
|
||||
>
|
||||
<div class="base-modal-body">
|
||||
<div class="base-modal-body" :style="config.bodyStyle">
|
||||
<slot name="dialog-body" />
|
||||
</div>
|
||||
<div slot="footer" class="base-modal-footer">
|
||||
@@ -22,24 +23,26 @@
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "BaseDialog",
|
||||
name: 'BaseDialog',
|
||||
props: {
|
||||
config: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
visible: false,
|
||||
title: "",
|
||||
title: '',
|
||||
closeOnClickModal: false,
|
||||
showClose: true,
|
||||
appendToBody: false,
|
||||
width: "100px",
|
||||
width: '100px',
|
||||
fullscreen: false,
|
||||
};
|
||||
top: '15vh',
|
||||
bodyStyle: '',
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.base-model-wrapper {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<el-row>
|
||||
<el-col class="m-b-10" :span="24">
|
||||
<el-table
|
||||
v-adaptive="{bottomOffset}"
|
||||
v-adaptive="{ bottomOffset }"
|
||||
:data="list"
|
||||
:height="tableHeight"
|
||||
v-bind="$attrs"
|
||||
@@ -15,15 +15,44 @@
|
||||
>
|
||||
<template v-for="(column, index) in columns">
|
||||
<slot name="front-slot" />
|
||||
<el-table-column v-if="column.type === 'tip'" :key="index" width="35">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="column.slot">
|
||||
<!-- 具名slot -->
|
||||
<slot v-if="column.slot" :name="column.slot" :scope="scope" />
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 序号 -->
|
||||
<el-table-column v-if="column.type === 'selection'" :key="index" type="selection" width="55" />
|
||||
<el-table-column
|
||||
v-else-if="column.type === 'selection'"
|
||||
:key="index"
|
||||
type="selection"
|
||||
width="55"
|
||||
/>
|
||||
<!-- 复选框 -->
|
||||
<el-table-column v-else-if="column.type === 'index'" :key="index" type="index" width="50" />
|
||||
<el-table-column
|
||||
v-else-if="column.type === 'index'"
|
||||
:key="index"
|
||||
type="index"
|
||||
width="50"
|
||||
/>
|
||||
<!-- 具体内容 -->
|
||||
<el-table-column v-else :key="index" align="left" :label="column.label" :width="column.width" :min-width="column.minWidth" :show-overflow-tooltip="column.showOverflowTooltip || false" :sortable="column.sortable || false" :prop="column.prop">
|
||||
<el-table-column
|
||||
v-else
|
||||
:key="index"
|
||||
align="left"
|
||||
:label="column.label"
|
||||
:width="column.width"
|
||||
:min-width="column.minWidth"
|
||||
:show-overflow-tooltip="column.showOverflowTooltip || false"
|
||||
:sortable="column.sortable || false"
|
||||
:prop="column.prop"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<!-- 仅仅显示文字 -->
|
||||
<span v-if="!column.hidden"> <!-- 如果hidden为true的时候 那么当前格可以不显示,可以选择显示自定义的slot-->
|
||||
<span v-if="!column.hidden">
|
||||
<!-- 如果hidden为true的时候 那么当前格可以不显示,可以选择显示自定义的slot-->
|
||||
<!-- 操作按钮 -->
|
||||
<span v-if="column.type === 'operate'">
|
||||
<!-- <a v-for="(operate, i) in column.operates" :key="i" href="javascript:void(0)" class="operate-button" @click="handleClick(operate, scope.row)">
|
||||
@@ -31,7 +60,13 @@
|
||||
|
||||
</a> -->
|
||||
<span v-for="(operate, i) in column.operates" :key="i">
|
||||
<el-button :size="operate.size || 'mini'" :type="operate.type || 'primary'" style="margin-right:5px;" @click="handleClick(operate, scope.row)">{{ operate.name }}</el-button>
|
||||
<el-button
|
||||
:size="operate.size || 'mini'"
|
||||
:type="operate.type || 'primary'"
|
||||
style="margin-right: 5px"
|
||||
@click="handleClick(operate, scope.row)"
|
||||
>{{ operate.name }}</el-button
|
||||
>
|
||||
</span>
|
||||
</span>
|
||||
<span v-else>
|
||||
@@ -52,7 +87,12 @@
|
||||
</el-col>
|
||||
<!-- 分页部分 -->
|
||||
<el-col v-if="!hiddenPage" :span="24" class="page">
|
||||
<pagination :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="pagination" />
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="pagination"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
@@ -96,45 +136,44 @@ export default {
|
||||
// 核心数据
|
||||
list: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
default: () => [],
|
||||
},
|
||||
|
||||
// columns
|
||||
columns: {
|
||||
type: Array,
|
||||
required: true,
|
||||
default: () => []
|
||||
default: () => [],
|
||||
},
|
||||
// is hidden page for table
|
||||
hiddenPage: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
default: false,
|
||||
},
|
||||
bottomOffset: {
|
||||
type: Number,
|
||||
default: 45
|
||||
default: 45,
|
||||
},
|
||||
searchData: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
default: () => {},
|
||||
},
|
||||
total: {
|
||||
type: Number,
|
||||
default: 0
|
||||
default: 0,
|
||||
},
|
||||
highlightCurrentRow: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
return {}
|
||||
},
|
||||
computed: {
|
||||
tableHeight() {
|
||||
return 100
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 处理点击事件
|
||||
@@ -157,12 +196,12 @@ export default {
|
||||
},
|
||||
pagination() {
|
||||
this.$emit('getList')
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page{
|
||||
.page {
|
||||
padding-top: 3px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
@@ -215,7 +227,7 @@ export default {
|
||||
cornerstoneTools.stopClip(this.canvas)
|
||||
this.toolState.clipPlaying = false
|
||||
this.loading = true
|
||||
|
||||
|
||||
cornerstone.loadAndCacheImage(this.stack.imageIds[this.stack.currentImageIdIndex])
|
||||
.then(image => {
|
||||
this.loading = false
|
||||
@@ -250,7 +262,13 @@ export default {
|
||||
apiTool
|
||||
)
|
||||
if (!toolAlreadyAddedToElement) {
|
||||
cornerstoneTools.addToolForElement(element, apiTool)
|
||||
if (toolName === 'RectangleRoi') {
|
||||
cornerstoneTools.addToolForElement(element, apiTool, { configuration: { showMinMax: true, showStatsText: true}})
|
||||
} else if (toolName === 'EllipticalRoi') {
|
||||
cornerstoneTools.addToolForElement(element, apiTool, { configuration: { showMinMax: true}})
|
||||
} else {
|
||||
cornerstoneTools.addToolForElement(element, apiTool)
|
||||
}
|
||||
}
|
||||
}
|
||||
// Setup button listener
|
||||
@@ -310,7 +328,7 @@ export default {
|
||||
// cornerstoneTools.addStackStateManager(this.canvas, ['stack', 'stackPrefetch', 'playClip'])
|
||||
cornerstoneTools.addToolState(this.canvas, 'stack', this.stack)
|
||||
// cornerstoneTools.stackPrefetch.enable(this.canvas)
|
||||
cornerstone.updateImage(element, true)
|
||||
cornerstone.updateImage(element, true)
|
||||
// cornerstoneTools.stackPrefetch.setConfiguration({ maxImagesToPrefetch: Infinity,
|
||||
// preserveExistingPool: true })
|
||||
// cornerstoneTools.stackPrefetch.enable(this.canvas)
|
||||
@@ -364,8 +382,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
|
||||
@@ -441,7 +459,7 @@ export default {
|
||||
if (!markers) {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
this.orientationMarkers = [oppositeColumn, row, column, oppositeRow]
|
||||
this.originalMarkers = [oppositeColumn, row, column, oppositeRow]
|
||||
this.setMarkers()
|
||||
@@ -636,7 +654,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) {
|
||||
@@ -648,7 +666,7 @@ export default {
|
||||
},
|
||||
|
||||
toggleClipPlay() {
|
||||
if(this.loading) return
|
||||
if (this.loading) return
|
||||
if (this.toolState.clipPlaying) {
|
||||
cornerstoneTools.stopClip(this.canvas)
|
||||
this.toolState.clipPlaying = false
|
||||
@@ -668,7 +686,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
|
||||
@@ -707,7 +725,7 @@ export default {
|
||||
this.orientationMarkers = [...this.originalMarkers]
|
||||
this.setMarkers()
|
||||
}
|
||||
|
||||
|
||||
var viewport = cornerstone.getViewport(this.canvas)
|
||||
viewport.hflip = false
|
||||
viewport.vflip = false
|
||||
@@ -747,6 +765,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)
|
||||
|
||||
@@ -0,0 +1,288 @@
|
||||
<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 {
|
||||
elementObject.value = dataSet.string(propertyName)
|
||||
// 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)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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;
|
||||
@@ -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,7 +202,7 @@ export default {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
::v-deep .el-dialog__header{
|
||||
::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() {
|
||||
|
||||
@@ -124,7 +124,7 @@ export default {
|
||||
inputChange(v) {
|
||||
this.resultFilter = this.options.filter((o) => {
|
||||
var reg = new RegExp(v, 'ig')
|
||||
return reg.test(o.ResearchProgramNo) || reg.test(o.Indication)
|
||||
return reg.test(o.ResearchProgramNo) || reg.test(o.Indication) || reg.test(o.ExperimentName)
|
||||
})
|
||||
},
|
||||
getTrialList() {
|
||||
|
||||
@@ -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>
|
||||
@@ -99,7 +99,7 @@ export default {
|
||||
this.btnDisabled = false
|
||||
if (res.IsSuccess) {
|
||||
this.fileList[0].id = res.Result[0].Id
|
||||
this.$message.success('Uploaded successfully')
|
||||
this.$message.success(this.$t('trials:uploadDicomList:table:Uploaded'))
|
||||
this.$emit('getFileList', res.Result[0].Id, res.Result[0].Path)
|
||||
}
|
||||
})
|
||||
@@ -113,13 +113,13 @@ export default {
|
||||
if (isValidFile) {
|
||||
this.fileList = []
|
||||
} else {
|
||||
this.$alert('must be in pdf format')
|
||||
this.$alert(this.$t('upload:rule:MUSTPDF'))
|
||||
return false
|
||||
}
|
||||
},
|
||||
beforeRemove(file, fileList) {
|
||||
if (file && file.status === 'success') {
|
||||
return this.$confirm(`Sure to remove ${file.name}?`)
|
||||
return this.$confirm(this.$t('system:reviewer:confirm:delete'))
|
||||
}
|
||||
},
|
||||
handleRemoveFile(file, fileList) {
|
||||
@@ -146,7 +146,7 @@ export default {
|
||||
}
|
||||
},
|
||||
handleExceed(files, fileList) {
|
||||
this.$message.warning(`Upload is currently limited to 1 file`)
|
||||
this.$message.warning(this.$t('upload:rule:maxFile1'))
|
||||
},
|
||||
fileValid(fileName, typeArr) {
|
||||
var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
|
||||
|
||||
@@ -9,37 +9,51 @@
|
||||
:file-list="fileList"
|
||||
:accept="accept"
|
||||
>
|
||||
<el-button size="small" type="primary" :disabled="isDisabled">{{ $t('common:button:upload') }}</el-button>
|
||||
<el-button size="small" type="primary" :disabled="isDisabled">{{
|
||||
$t('common:button:upload')
|
||||
}}</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getAttachmentByType, uploadFile, saveAttachments, deleteAttachment } from '@/api/attachment'
|
||||
import {
|
||||
getAttachmentByType,
|
||||
uploadFile,
|
||||
saveAttachments,
|
||||
deleteAttachment,
|
||||
} from '@/api/attachment'
|
||||
export default {
|
||||
name: 'UploadFiles',
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
required: true
|
||||
required: true,
|
||||
},
|
||||
doctorId: {
|
||||
type: String,
|
||||
required: true
|
||||
required: true,
|
||||
},
|
||||
accept: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
repeat: false,
|
||||
isDisabled: false
|
||||
isDisabled: false,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
doctorId() {
|
||||
if (this.doctorId) {
|
||||
this.initFileList()
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if(!this.doctorId) return
|
||||
if (!this.doctorId) return
|
||||
this.initFileList()
|
||||
},
|
||||
methods: {
|
||||
@@ -49,24 +63,28 @@ export default {
|
||||
lock: true,
|
||||
text: 'Loading',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.07)'
|
||||
background: 'rgba(0, 0, 0, 0.07)',
|
||||
})
|
||||
getAttachmentByType(this.doctorId, this.type).then(res => {
|
||||
loading.close()
|
||||
if (res.IsSuccess) {
|
||||
if (res.Result.length > 0) {
|
||||
this.fileList = this.formatterFileList(res.Result)
|
||||
this.$emit('getFileList', this.fileList)
|
||||
} else {
|
||||
this.fileList = []
|
||||
getAttachmentByType(this.doctorId, this.type)
|
||||
.then((res) => {
|
||||
loading.close()
|
||||
if (res.IsSuccess) {
|
||||
if (res.Result.length > 0) {
|
||||
this.fileList = this.formatterFileList(res.Result)
|
||||
this.$emit('getFileList', this.fileList)
|
||||
} else {
|
||||
this.fileList = []
|
||||
}
|
||||
}
|
||||
}
|
||||
}).catch(() => { loading.close() })
|
||||
})
|
||||
.catch(() => {
|
||||
loading.close()
|
||||
})
|
||||
},
|
||||
|
||||
formatterFileList(list) {
|
||||
var arr = []
|
||||
list.forEach(item => {
|
||||
list.forEach((item) => {
|
||||
const data = {
|
||||
DoctorId: item.DoctorId,
|
||||
Type: item.Type,
|
||||
@@ -74,7 +92,7 @@ export default {
|
||||
FullPath: item.FullPath,
|
||||
FileName: item.FileName,
|
||||
CreateTime: item.CreateTime,
|
||||
Id: item.Id
|
||||
Id: item.Id,
|
||||
}
|
||||
arr.push(data)
|
||||
})
|
||||
@@ -85,32 +103,42 @@ export default {
|
||||
// 检测文件后缀名
|
||||
if (this.checkFileSuffix(param.file.name)) {
|
||||
// 检测是否有重名文件
|
||||
const isRepeat = this.fileList.some(item => item.FileName === param.file.name)
|
||||
const isRepeat = this.fileList.some(
|
||||
(item) => item.FileName === param.file.name
|
||||
)
|
||||
if (isRepeat) {
|
||||
this.$confirm('Override the existing resume?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: 'OK',
|
||||
cancelButtonText: 'Cancel'
|
||||
})
|
||||
this.$confirm(
|
||||
this.$t('curriculumVitae:resume:message:existingResume'),
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
// 重名覆盖
|
||||
this.repeat = true
|
||||
this.uploadFile(param.file)
|
||||
})
|
||||
.catch(action => {})
|
||||
.catch((action) => {})
|
||||
} else {
|
||||
this.uploadFile(param.file)
|
||||
}
|
||||
} else {
|
||||
this.$alert(`Must be in ${this.accept} format`)
|
||||
let str = this.accept.join(', ')
|
||||
let message = this.$t(
|
||||
'trials:readingUnit:qsList:message:imageFormat'
|
||||
).replace('xxx', str)
|
||||
this.$alert(message)
|
||||
}
|
||||
},
|
||||
async uploadFile(file) {
|
||||
this.isDisabled = true
|
||||
var fileName = file.name
|
||||
file = await this.fileToBlob(file)
|
||||
let res = await this.OSSclient.put(`/SystemData/reviewer/Agreements/${this.doctorId}/${fileName}`, file)
|
||||
let res = await this.OSSclient.put(
|
||||
`/SystemData/reviewer/Agreements/${this.doctorId}/${fileName}`,
|
||||
file
|
||||
)
|
||||
if (this.repeat) {
|
||||
const index = this.fileList.findIndex((item, index) => {
|
||||
return item.FileName === fileName
|
||||
@@ -124,52 +152,60 @@ export default {
|
||||
Type: this.type,
|
||||
Path: this.$getObjectName(res.url),
|
||||
FullPath: this.$getObjectName(res.url),
|
||||
FileName: fileName
|
||||
FileName: fileName,
|
||||
}
|
||||
this.fileList.push(fileData)
|
||||
}
|
||||
this.saveUploadFiles()
|
||||
},
|
||||
saveUploadFiles() {
|
||||
saveAttachments(this.fileList).then(res => {
|
||||
this.fileList = this.formatterFileList(res.Result)
|
||||
this.isDisabled = false
|
||||
this.$message.success('Uploaded successfully')
|
||||
this.$emit('getFileList', this.fileList)
|
||||
}).catch(() => {
|
||||
this.isDisabled = false
|
||||
})
|
||||
saveAttachments(this.fileList)
|
||||
.then((res) => {
|
||||
this.fileList = this.formatterFileList(res.Result)
|
||||
this.isDisabled = false
|
||||
this.$message.success(
|
||||
this.$t('trials:uploadDicomList:table:Uploaded')
|
||||
)
|
||||
this.$emit('getFileList', this.fileList)
|
||||
})
|
||||
.catch(() => {
|
||||
this.isDisabled = false
|
||||
})
|
||||
},
|
||||
handleDeleteFile(file) {
|
||||
this.$confirm('Sure to remove?', {
|
||||
this.$confirm(this.$t('system:reviewer:confirm:delete'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
|
||||
}).then(() => {
|
||||
deleteAttachment(file.Id, file.Path)
|
||||
.then(res => {
|
||||
})
|
||||
.then(() => {
|
||||
deleteAttachment(file.Id, file.Path).then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
this.fileList.splice(this.fileList.findIndex(item => item.Id === file.Id), 1)
|
||||
this.fileList.splice(
|
||||
this.fileList.findIndex((item) => item.Id === file.Id),
|
||||
1
|
||||
)
|
||||
this.$emit('getFileList', this.fileList)
|
||||
this.$message({
|
||||
message: this.$t('common:message:deletedSuccessfully'),
|
||||
type: 'success'
|
||||
type: 'success',
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(action => {})
|
||||
})
|
||||
.catch((action) => {})
|
||||
},
|
||||
checkFileSuffix(fileName) {
|
||||
var index = fileName.lastIndexOf('.')
|
||||
var suffix = fileName.substring(index + 1, fileName.length)
|
||||
return this.accept.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === 1
|
||||
}
|
||||
}
|
||||
return (
|
||||
this.accept.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === 1
|
||||
)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.uploadFiles-container{
|
||||
.uploadFiles-container {
|
||||
margin: 0 5px;
|
||||
}
|
||||
.uploadFiles-container .el-upload--text {
|
||||
|
||||
@@ -180,10 +180,10 @@
|
||||
<template v-if="question.Unit" slot="append">{{ question.Unit }}</template>
|
||||
</el-input>
|
||||
<span v-if="question.CustomCalculateMark === 11 && question.ClinicalQuestionType === 'number'" v-show="questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] <= questionForm[JSON.parse(question.CalculateQuestions)[0].QuestionId]" style="margin-left: 10px">
|
||||
{{ questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] }}-{{ questionForm[JSON.parse(question.CalculateQuestions)[0].QuestionId] }}
|
||||
{{ questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] }}~{{ questionForm[JSON.parse(question.CalculateQuestions)[0].QuestionId] }}
|
||||
</span>
|
||||
<span v-if="question.CustomCalculateMark === 10 && question.ClinicalQuestionType === 'number' && questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId]" style="margin-left: 10px">
|
||||
{{ questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] }}-{{ questionForm.CreateTime ? questionForm.CreateTime : parseTime(new Date(), '{y}-{m}-{d}') }}
|
||||
{{ questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] }}~{{ questionForm.CreateTime ? questionForm.CreateTime : parseTime(new Date(), '{y}-{m}-{d}') }}
|
||||
</span>
|
||||
<!-- 生日不能大于截止日期 -->
|
||||
<span v-if="question.CustomCalculateMark === 11 && question.ClinicalQuestionType === 'number'" v-show="questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] > questionForm[JSON.parse(question.CalculateQuestions)[0].QuestionId]" style="margin-left: 10px;font-size: 12px;color:#f66">
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="close"
|
||||
v-show="$route.path !== '/trials/trials-panel/visit/crc-upload'"
|
||||
v-show="$route.path !== '/trials/trials-panel/visit/crc-upload'&&$route.path!=='/trials/trials-panel/visit/crc-question'"
|
||||
>
|
||||
{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
|
||||
@@ -0,0 +1,511 @@
|
||||
<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"
|
||||
:visitTaskId="modelTaskId"
|
||||
/>
|
||||
</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: [],
|
||||
modelTaskId: null,
|
||||
}
|
||||
},
|
||||
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.modelTaskId = item.VisitTaskId
|
||||
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?page=download&trialId=${trialId}&visitTaskId=${row.VisitTaskId}&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', 'role:apm'])) {
|
||||
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,250 @@
|
||||
<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}`,
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
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)
|
||||
}
|
||||
let name = this.$getObjectName(res.url)
|
||||
this.fileList[index].url = this.OSSclientConfig.basePath + name
|
||||
this.fileList[index].path = 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>
|
||||
@@ -0,0 +1,117 @@
|
||||
<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'
|
||||
import store from '@/store'
|
||||
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})`
|
||||
store.dispatch('trials/setUnLock', true)
|
||||
},
|
||||
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,919 @@
|
||||
<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`
|
||||
: ''
|
||||
}}</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`
|
||||
: ''
|
||||
}}</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 ||
|
||||
scope.row.ReadingTaskState === 2
|
||||
"
|
||||
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`
|
||||
: ''
|
||||
}}</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,291 @@
|
||||
<template>
|
||||
<div v-if="model_cfg.visible">
|
||||
<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')"
|
||||
v-if="!isUpload"
|
||||
@click.stop="preview(scope.row)"
|
||||
/>
|
||||
<!--编辑--->
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-edit-outline"
|
||||
:title="$t('trials:uploadImage:button:edit')"
|
||||
v-else
|
||||
@click.stop="openEdit(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</base-model>
|
||||
<!--新增检查部位-->
|
||||
<base-model v-if="editModality_model.visible" :config="editModality_model">
|
||||
<template slot="dialog-body">
|
||||
<el-form
|
||||
ref="editModalityform"
|
||||
:inline="true"
|
||||
:model="form"
|
||||
class="demo-form-inline"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-form-item
|
||||
:label="$t('trials:uploadImage:form:ModalityForEdit')"
|
||||
prop="Modality"
|
||||
label-width="150px"
|
||||
>
|
||||
<el-select v-model="form.Modality" placeholder="">
|
||||
<el-option
|
||||
v-for="item in TrialModality"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<template slot="dialog-footer">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="updateTaskStudyModality"
|
||||
:loading="loading"
|
||||
>
|
||||
{{ $t('common:button:confirm') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
@click="editModality_model.visible = false"
|
||||
:loading="loading"
|
||||
>
|
||||
{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</base-model>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import baseModel from '@/components/BaseModel'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { updateTaskStudyModality } from '@/api/load.js'
|
||||
export default {
|
||||
name: 'studyView',
|
||||
props: {
|
||||
model_cfg: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
bodyPart: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
},
|
||||
},
|
||||
modelList: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
},
|
||||
},
|
||||
TrialModality: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
},
|
||||
},
|
||||
visitTaskId: {
|
||||
type: String,
|
||||
},
|
||||
IsDicom: {
|
||||
required: true,
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
isUpload: {
|
||||
required: true,
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
components: {
|
||||
'base-model': baseModel,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
Modality: null,
|
||||
TaskStudyId: null,
|
||||
},
|
||||
editModality_model: {
|
||||
visible: false,
|
||||
title: this.$t('trials:uploadImage:button:edit'),
|
||||
width: '500px',
|
||||
appendToBody: true,
|
||||
},
|
||||
rules: {
|
||||
Modality: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('trials:uploadImage:format:notModality'),
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
},
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
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&visitTaskId=${this.visitTaskId}`,
|
||||
})
|
||||
} 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')
|
||||
},
|
||||
// 打开编辑
|
||||
openEdit(row) {
|
||||
this.form.TaskStudyId = row.Id
|
||||
this.form.Modality = row.ModalityForEdit
|
||||
this.editModality_model.visible = true
|
||||
},
|
||||
// 修改检查类型
|
||||
async updateTaskStudyModality() {
|
||||
try {
|
||||
let validate = await this.$refs.editModalityform.validate()
|
||||
if (!validate) return false
|
||||
this.loading = true
|
||||
let res = await updateTaskStudyModality(this.form)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.modelList.some((item) => {
|
||||
if (this.form.TaskStudyId === item.Id) {
|
||||
item.ModalityForEdit = this.form.Modality
|
||||
}
|
||||
return this.form.TaskStudyId === item.Id
|
||||
})
|
||||
this.editModality_model.visible = false
|
||||
this.$emit('getList')
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</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>
|
||||
|
||||
@@ -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' // 浅绿色主题
|
||||
@@ -16,7 +15,7 @@ import '@/styles/index.scss' // global css
|
||||
import App from './App'
|
||||
import store from './store'
|
||||
import router from './router'
|
||||
|
||||
import WHITELIST from "./utils/whiteList"
|
||||
import '@/icons' // icon
|
||||
import '@/permission' // permission control
|
||||
import md5 from 'js-md5'
|
||||
@@ -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)
|
||||
@@ -145,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()
|
||||
@@ -186,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) => {
|
||||
@@ -246,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
|
||||
@@ -273,13 +295,20 @@ async function VueInit() {
|
||||
}
|
||||
Vue.prototype.$path = []
|
||||
var t = function (key) {
|
||||
// if (![Vue.prototype.toPath + '_' + key].includes(Vue.prototype.$path)) {
|
||||
if (!~Vue.prototype.$path.indexOf(key)) {
|
||||
// Vue.prototype.$path.push(Vue.prototype.toPath + '_' + key)
|
||||
Vue.prototype.$path.push(key)
|
||||
}
|
||||
// return i18n.t(Vue.prototype.toPath + '_' + key)
|
||||
return i18n.t(key)
|
||||
let text = i18n.t(key)
|
||||
if (Array.isArray(store.state.trials.config.TrialObjectNameList) && store.state.trials.config.TrialObjectNameList.length > 0) {
|
||||
let arr = JSON.parse(JSON.stringify(store.state.trials.config.TrialObjectNameList))
|
||||
arr.sort((a, b) => b.Name.length - a.Name.length)
|
||||
arr.forEach(item => {
|
||||
let test = new RegExp(item.Name, 'ig')
|
||||
text = text.replace(test, item.TrialName)
|
||||
})
|
||||
}
|
||||
// return i18n.t(key)
|
||||
return text;
|
||||
}
|
||||
Vue.prototype.$t = t
|
||||
_vm = new Vue({
|
||||
@@ -290,7 +319,8 @@ async function VueInit() {
|
||||
data: {
|
||||
unlock: {
|
||||
my_username: null,
|
||||
my_password: null
|
||||
my_password: null,
|
||||
view: false
|
||||
}
|
||||
},
|
||||
render: h => h(App)
|
||||
@@ -301,7 +331,7 @@ 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 (WHITELIST.includes(_vm.$route.path)) {
|
||||
return
|
||||
}
|
||||
if (_vm.$store.state.user.userId !== zzSessionStorage.getItem('userId')) {
|
||||
@@ -358,10 +388,14 @@ 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 || WHITELIST.includes(_vm.$route.path)) {
|
||||
count = 0;
|
||||
localStorage.setItem('count', '0')
|
||||
return
|
||||
@@ -371,6 +405,9 @@ async function VueInit() {
|
||||
if (_vm.$msgbox) {
|
||||
_vm.$msgbox.close();
|
||||
}
|
||||
_vm.$FB.close();
|
||||
_vm.$FBT.close();
|
||||
_vm.$MFA.close();
|
||||
isOpen = false
|
||||
isLock = null
|
||||
zzSessionStorage.removeItem('isLock')
|
||||
@@ -387,7 +424,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 || WHITELIST.includes(_vm.$route.path)) {
|
||||
count = 0;
|
||||
localStorage.setItem('count', '0')
|
||||
if (_vm.$route.path === '/login') {
|
||||
@@ -409,11 +446,11 @@ async function VueInit() {
|
||||
beforeClose: (action, instance, done) => {
|
||||
if (action === 'confirm') {
|
||||
if (!_vm.unlock.my_username) {
|
||||
_vm.$alert(_vm.$t("env:lock:msgBox:iupUser"))
|
||||
_vm.$message.warning(_vm.$t("env:lock:msgBox:iupUser"))
|
||||
return
|
||||
}
|
||||
if (!_vm.unlock.my_password) {
|
||||
_vm.$alert(_vm.$t("env:lock:msgBox:inpPassword"))
|
||||
_vm.$message.warning(_vm.$t("env:lock:msgBox:inpPassword"))
|
||||
return
|
||||
}
|
||||
var my_username = zzSessionStorage.getItem('my_username')
|
||||
@@ -427,7 +464,8 @@ async function VueInit() {
|
||||
_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;
|
||||
@@ -440,22 +478,22 @@ 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: res.Result,
|
||||
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)
|
||||
@@ -491,16 +529,21 @@ async function VueInit() {
|
||||
]),
|
||||
h('el-form-item', {
|
||||
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) => {
|
||||
@@ -510,7 +553,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"
|
||||
}
|
||||
},
|
||||
}
|
||||
}),
|
||||
])
|
||||
])
|
||||
])
|
||||
@@ -518,5 +578,22 @@ 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('有新版本,请刷新页面');
|
||||
// },
|
||||
// });
|
||||
|
||||
|
||||
export default _vm
|
||||
@@ -6,17 +6,56 @@ import 'nprogress/nprogress.css'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import Vue from 'vue'
|
||||
import { OSSclient } from './utils/oss'
|
||||
import WHITELIST from "./utils/whiteList"
|
||||
import { getTrialExtralConfig } from '@/api/trials'
|
||||
// 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()
|
||||
// 设置页面标题
|
||||
// document.title = getPageTitle(to.meta.title)
|
||||
|
||||
if (!to.query.trialId) {
|
||||
store.dispatch('trials/setConfig', {})
|
||||
}
|
||||
if (
|
||||
to.query.trialId &&
|
||||
to.query.trialId !==
|
||||
store.state.trials.config.trialId &&
|
||||
store.state.trials.whiteList.indexOf(to.path) === -1
|
||||
) {
|
||||
console.log(to.query.path)
|
||||
let res = await getTrialExtralConfig({
|
||||
TrialId: to.query.trialId,
|
||||
})
|
||||
if (res.IsSuccess) {
|
||||
store.dispatch('trials/setConfig', {
|
||||
trialId: to.query.trialId,
|
||||
...res.Result,
|
||||
})
|
||||
}
|
||||
} if (!to.query.trialId) {
|
||||
store.dispatch('trials/setConfig', {})
|
||||
}
|
||||
if (
|
||||
to.query.trialId &&
|
||||
to.query.trialId !==
|
||||
store.state.trials.config.trialId &&
|
||||
store.state.trials.whiteList.indexOf(to.path) === -1
|
||||
) {
|
||||
let res = await getTrialExtralConfig({
|
||||
TrialId: to.query.trialId,
|
||||
})
|
||||
if (res.IsSuccess) {
|
||||
store.dispatch('trials/setConfig', {
|
||||
trialId: to.query.trialId,
|
||||
...res.Result,
|
||||
})
|
||||
}
|
||||
}
|
||||
// 确定用户是否已登录
|
||||
const hasToken = getToken()
|
||||
Vue.prototype.toPath = to.path
|
||||
@@ -24,16 +63,16 @@ router.beforeEach(async (to, from, next) => {
|
||||
if (hasToken) {
|
||||
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()
|
||||
await store.dispatch('user/logout')
|
||||
}
|
||||
if (to.path === '/ReviewersResearchForm') {
|
||||
OSSclient()
|
||||
await OSSclient()
|
||||
}
|
||||
next()
|
||||
NProgress.done()
|
||||
} else {
|
||||
OSSclient()
|
||||
await OSSclient()
|
||||
const hasGetUserInfo = store.getters.userId
|
||||
if (hasGetUserInfo) {
|
||||
next()
|
||||
@@ -55,15 +94,27 @@ 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') {
|
||||
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'),
|
||||
@@ -211,6 +223,11 @@ export const constantRoutes = [
|
||||
component: () => import('@/views/reviewers/ReviewersResearch'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/curriculumVitae',
|
||||
component: () => import('@/views/reviewers/curriculumVitae/index'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/ReviewersResearchForm',
|
||||
component: () => import('@/views/reviewers/ReviewersResearchForm'),
|
||||
|
||||
@@ -35,26 +35,50 @@ const getDefaultState = () => {
|
||||
}
|
||||
}
|
||||
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 {
|
||||
@@ -70,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)
|
||||
@@ -86,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
|
||||
@@ -115,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'
|
||||
@@ -811,9 +835,16 @@ 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}|${index}`
|
||||
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}|${index}`
|
||||
} else {
|
||||
@@ -1053,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 {
|
||||
|
||||
@@ -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,234 @@ 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 {
|
||||
margin-top: 15px;
|
||||
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,103 @@
|
||||
import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
|
||||
function parseImageId(imageId) {
|
||||
// build a url by parsing out the url scheme and frame index from the imageId
|
||||
const firstColonIndex = imageId.indexOf(':');
|
||||
|
||||
let url = imageId.substring(firstColonIndex + 1);
|
||||
const frameIndex = url.indexOf('frame=');
|
||||
|
||||
let frame;
|
||||
|
||||
if (frameIndex !== -1) {
|
||||
const frameStr = url.substr(frameIndex + 6);
|
||||
|
||||
frame = parseInt(frameStr, 10);
|
||||
url = url.substr(0, frameIndex - 1);
|
||||
}
|
||||
|
||||
return {
|
||||
scheme: imageId.substr(0, firstColonIndex),
|
||||
url,
|
||||
frame,
|
||||
};
|
||||
}
|
||||
function getNumberValues(dataSet, tag, minimumLength) {
|
||||
const values = [];
|
||||
const valueAsString = dataSet.string(tag);
|
||||
|
||||
if (!valueAsString) {
|
||||
return;
|
||||
}
|
||||
const split = valueAsString.split('\\');
|
||||
|
||||
if (minimumLength && split.length < minimumLength) {
|
||||
return;
|
||||
}
|
||||
for (let i = 0; i < split.length; i++) {
|
||||
values.push(parseFloat(split[i]));
|
||||
}
|
||||
|
||||
return values;
|
||||
}
|
||||
function metaDataProvider(type, imageId) {
|
||||
const parsedImageId = parseImageId(imageId);
|
||||
const dataSet = cornerstoneWADOImageLoader.wadouri.dataSetCacheManager.get(parsedImageId.url);
|
||||
|
||||
if (!dataSet) {
|
||||
return;
|
||||
}
|
||||
if (type === 'imagePlaneModule') {
|
||||
const imageOrientationPatient = getNumberValues(dataSet, 'x00200037', 6);
|
||||
const imagePositionPatient = getNumberValues(dataSet, 'x00200032', 3);
|
||||
const pixelSpacing = getNumberValues(dataSet, 'x00280030', 2);
|
||||
const imagePixelSpacing = getNumberValues(dataSet, 'x00181164', 2);
|
||||
const estimatedRadiographicMagnificationFactor = getNumberValues(dataSet, 'x00181114', 2);
|
||||
let columnPixelSpacing = null;
|
||||
|
||||
let rowPixelSpacing = null;
|
||||
|
||||
if (pixelSpacing) {
|
||||
rowPixelSpacing = pixelSpacing[0];
|
||||
columnPixelSpacing = pixelSpacing[1];
|
||||
} else if (imagePixelSpacing && estimatedRadiographicMagnificationFactor) {
|
||||
rowPixelSpacing = imagePixelSpacing[0] / estimatedRadiographicMagnificationFactor[0];
|
||||
columnPixelSpacing = imagePixelSpacing[1] / estimatedRadiographicMagnificationFactor[1];
|
||||
} else if (imagePixelSpacing && !estimatedRadiographicMagnificationFactor) {
|
||||
rowPixelSpacing = imagePixelSpacing[0];
|
||||
columnPixelSpacing = imagePixelSpacing[1];
|
||||
}
|
||||
|
||||
let rowCosines = null;
|
||||
|
||||
let columnCosines = null;
|
||||
|
||||
if (imageOrientationPatient) {
|
||||
rowCosines = [
|
||||
parseFloat(imageOrientationPatient[0]),
|
||||
parseFloat(imageOrientationPatient[1]),
|
||||
parseFloat(imageOrientationPatient[2]),
|
||||
];
|
||||
columnCosines = [
|
||||
parseFloat(imageOrientationPatient[3]),
|
||||
parseFloat(imageOrientationPatient[4]),
|
||||
parseFloat(imageOrientationPatient[5]),
|
||||
];
|
||||
}
|
||||
|
||||
return {
|
||||
frameOfReferenceUID: dataSet.string('x00200052'),
|
||||
rows: dataSet.uint16('x00280010'),
|
||||
columns: dataSet.uint16('x00280011'),
|
||||
imageOrientationPatient,
|
||||
rowCosines,
|
||||
columnCosines,
|
||||
imagePositionPatient,
|
||||
sliceThickness: dataSet.floatString('x00180050'),
|
||||
sliceLocation: dataSet.floatString('x00201041'),
|
||||
pixelSpacing,
|
||||
rowPixelSpacing,
|
||||
columnPixelSpacing,
|
||||
};
|
||||
}
|
||||
}
|
||||
export default metaDataProvider;
|
||||
@@ -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)
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -113,10 +113,14 @@ export const parseDicom = (file, name = false) => {
|
||||
}
|
||||
})
|
||||
uintKey.forEach(key => {
|
||||
res[key] = data.uint16(dicom[key])
|
||||
if (res.hasOwnProperty(key)) {
|
||||
res[key] = data.uint16(dicom[key])
|
||||
}
|
||||
})
|
||||
intStringKey.forEach(key => {
|
||||
res[key] = data.intString(dicom[key])
|
||||
if (res.hasOwnProperty(key)) {
|
||||
res[key] = data.intString(dicom[key])
|
||||
}
|
||||
})
|
||||
defaultKey.forEach(key => {
|
||||
if (!res[key] && res.hasOwnProperty(key)) {
|
||||
|
||||
@@ -14,8 +14,7 @@ service.interceptors.request.use(
|
||||
config => {
|
||||
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'
|
||||
console.log(config.headers)
|
||||
config.headers['Accept-Language'] = language === 'en'?'en-US,en;q=0.5':'zh-CN,zh;q=0.9'
|
||||
if (store.getters.token) {
|
||||
config.headers.Authorization = `Bearer ${store.getters.token}`
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import axios from 'axios'
|
||||
import _vm from '@/main'
|
||||
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 +17,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')) {
|
||||
@@ -80,6 +91,9 @@ service.interceptors.response.use(
|
||||
const status = error.response.status
|
||||
if (error.response.data && (error.response.data.Code === -1 || error.response.data.Code === -2)) {
|
||||
store.dispatch('user/logout').then(() => {
|
||||
if (_vm.$msgbox) {
|
||||
_vm.$msgbox.close();
|
||||
}
|
||||
router.push(`/login`)
|
||||
this.$i18n.locale = 'zh'
|
||||
this.setLanguage('zh')
|
||||
|
||||
@@ -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,199 +0,0 @@
|
||||
import JSZip from "jszip";
|
||||
import axios from "axios";
|
||||
import { saveAs } from "file-saver";
|
||||
import Vue from 'vue';
|
||||
import store from "@/store";
|
||||
import {
|
||||
requestPackageAndAnonymizImage,
|
||||
} from "@/api/load.js";
|
||||
let flag = {};
|
||||
export const resetFlag = () => {
|
||||
flag = {};
|
||||
store.dispatch("trials/setUnLock", false);
|
||||
}
|
||||
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
|
||||
}
|
||||
store.dispatch("trials/setUnLock", true);
|
||||
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;
|
||||
store.dispatch("trials/setUnLock", 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 = ['/', "/curriculumVitae", '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 }} image
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,20 +64,24 @@
|
||||
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'
|
||||
|
||||
import metaDataProvider from '@/utils/metaDataProvider'
|
||||
cornerstone.metaData.addProvider(metaDataProvider, { priority: 10 });
|
||||
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 +94,7 @@ export default {
|
||||
},
|
||||
studyList: {
|
||||
type: Array,
|
||||
// eslint-disable-next-line vue/require-valid-default-prop
|
||||
default: []
|
||||
}
|
||||
},
|
||||
@@ -131,8 +137,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 +160,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 +263,7 @@ export default {
|
||||
text-align: center;
|
||||
background: rgb(88 84 83);
|
||||
color: #d0d0d0;
|
||||
padding: 2px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.ps {
|
||||
|
||||
@@ -68,13 +68,11 @@
|
||||
<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
|
||||
@@ -140,11 +138,23 @@ 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'
|
||||
import metaDataProvider from '@/utils/metaDataProvider'
|
||||
cornerstone.metaData.addProvider(metaDataProvider, { priority: 10 });
|
||||
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 * 6
|
||||
@@ -185,7 +195,8 @@ export default {
|
||||
loading: false,
|
||||
imageList: [],
|
||||
showSeriesList: [],
|
||||
currentLoadIns: []
|
||||
currentLoadIns: [],
|
||||
isFromCRCUpload: false
|
||||
}
|
||||
},
|
||||
created: function() {
|
||||
@@ -200,6 +211,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)
|
||||
@@ -209,6 +221,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 => {
|
||||
@@ -224,22 +238,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 {
|
||||
const data = await getPatientSeriesList(this.studyId)
|
||||
if (data.IsSuccess) {
|
||||
const { Result } = data
|
||||
var seriesList = []
|
||||
@@ -248,15 +262,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,
|
||||
@@ -271,38 +288,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
|
||||
@@ -313,15 +391,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,
|
||||
@@ -337,7 +419,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,
|
||||
@@ -352,7 +434,9 @@ export default {
|
||||
this.firstInstanceId = this.seriesList[0].imageIds[0]
|
||||
})
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
showSeriesImage(e, seriesIndex, series) {
|
||||
// if (seriesIndex === this.currentSeriesIndex) return
|
||||
@@ -365,7 +449,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) {
|
||||
@@ -396,7 +512,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() {
|
||||
@@ -408,13 +556,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}`)
|
||||
})
|
||||
@@ -444,22 +585,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')
|
||||
@@ -470,24 +614,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')
|
||||
@@ -498,46 +648,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()
|
||||
@@ -562,60 +717,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
|
||||
@@ -674,52 +775,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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;">
|
||||
@@ -143,7 +143,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('trials:dicom-show:relatedVisit')" name="relation-study" class="pane-relation-wrapper">
|
||||
<el-tab-pane :label="$t('trials:dicom-show:relatedVisit')" name="relation-study" class="pane-relation-wrapper" v-if="!visitTaskId">
|
||||
<div class="viewerSidethumbinner">
|
||||
<el-collapse v-model="relationActiveName" @change="handelRelationActiveChange">
|
||||
<el-collapse-item v-for="(study,studyIndex) in relationStudyList" :key="`${study.StudyId}`" :name="`${study.StudyId}`">
|
||||
@@ -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"
|
||||
@@ -261,9 +261,23 @@ 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 metaDataProvider from '@/utils/metaDataProvider'
|
||||
cornerstone.metaData.addProvider(metaDataProvider, { priority: 10 });
|
||||
// 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 * 6
|
||||
@@ -289,7 +303,10 @@ export default {
|
||||
activeNames: [],
|
||||
relationActiveName: [],
|
||||
showSeriesList: [],
|
||||
currentLoadIns: []
|
||||
currentLoadIns: [],
|
||||
isFromCRCUpload: false,
|
||||
visitTaskId: null,
|
||||
page: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -305,6 +322,9 @@ 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
|
||||
this.page = this.$route.query.page
|
||||
// cornerstone.events.addEventListener('cornerstoneimageloaded', this.cornerstoneImageLoaded)
|
||||
this.getStudiesInfo()
|
||||
cornerstone.events.addEventListener('cornerstoneimageloadprogress', this.cornerstoneimageloadprogress)
|
||||
@@ -315,72 +335,105 @@ 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.page === 'upload') {
|
||||
res = await getTaskUploadedDicomStudyList({ visitTaskId: this.visitTaskId })
|
||||
} else if (this.page === 'download'){
|
||||
res = await getVisitStudyList(this.trialId, this.subjectVisitId, this.isReading, 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
|
||||
@@ -391,11 +444,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) {
|
||||
@@ -423,10 +502,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')
|
||||
@@ -437,24 +539,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')
|
||||
@@ -465,24 +572,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'),
|
||||
@@ -492,11 +606,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) {
|
||||
@@ -508,8 +624,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()
|
||||
@@ -523,20 +638,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({
|
||||
@@ -561,13 +677,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]')
|
||||
@@ -578,9 +695,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() {
|
||||
@@ -589,21 +712,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()
|
||||
@@ -628,26 +744,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
|
||||
@@ -655,57 +751,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 && this.studyList[studyIndex].SeriesList[seriesIndex].imageloadedArr.length < this.studyList[studyIndex].SeriesList[seriesIndex].instanceCount) {
|
||||
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()
|
||||
}
|
||||
}
|
||||
@@ -777,7 +862,7 @@ export default {
|
||||
white-space: normal;
|
||||
}
|
||||
.viewerContainer .viewerLeftSidePanel {
|
||||
width: 215px;
|
||||
width: 220px;
|
||||
background-color: #323232;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
@@ -814,7 +899,7 @@ export default {
|
||||
}
|
||||
.viewerContainer .viewerLeftSidePanel .viewernavigatorwrapper {
|
||||
display: flex;
|
||||
width: 200px;
|
||||
width: 220px;
|
||||
/* height: 84px; */
|
||||
padding: 1px 2px 1px 2px;
|
||||
margin: 2px 0 1px 1px;
|
||||
@@ -893,18 +978,6 @@ 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;
|
||||
|
||||
@@ -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,15 +15,12 @@
|
||||
: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>
|
||||
@@ -30,24 +29,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
|
||||
@@ -64,70 +67,84 @@
|
||||
|
||||
<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="PreviewFile(scope.row)">
|
||||
{{ $t('common:button:preview') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
编辑
|
||||
<el-button type="text" @click="handleDownload(scope.row)">
|
||||
{{ $t('common:button:download') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
>
|
||||
删除
|
||||
<el-button type="text" @click="handleEdit(scope.row)">
|
||||
{{ $t('common:button:edit') }}
|
||||
</el-button>
|
||||
<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,13 +155,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 +180,7 @@ const searchDataDefault = () => {
|
||||
BusinessScenarioEnum: null,
|
||||
Name: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
PageSize: 20,
|
||||
}
|
||||
}
|
||||
export default {
|
||||
@@ -168,30 +193,45 @@ export default {
|
||||
total: 0,
|
||||
currentRow: {},
|
||||
editDialog: { title: '', visible: false },
|
||||
loading: false
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
PreviewFile(row) {
|
||||
let basePath = window.location.origin
|
||||
if (window.location.protocol !== 'https:') {
|
||||
basePath = 'https://irc.test.extimaging.com'
|
||||
}
|
||||
let data = {
|
||||
name: row.NameCN,
|
||||
path: basePath + row.Path,
|
||||
}
|
||||
this.$emit('PreviewFile', data)
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('确定删除该模版?').then(() => {
|
||||
this.$confirm(
|
||||
this.$t('dictionary:attachment:export:confirm:delete')
|
||||
).then(() => {
|
||||
deleteCommonDocument(row.Id).then(() => {
|
||||
this.$message.success('删除成功')
|
||||
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
|
||||
})
|
||||
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 +242,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 +277,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>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<el-form-item label="文件类型: " prop="FileTypeId">
|
||||
<el-select
|
||||
v-model="form.FileTypeId"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
filterable
|
||||
>
|
||||
@@ -41,21 +41,26 @@
|
||||
:on-exceed="handleExceed"
|
||||
:disabled="form.Type === ''"
|
||||
>
|
||||
<el-button size="small" type="primary" :disabled="form.FileTypeId === ''" :loading="btnLoading">Select</el-button>
|
||||
<span
|
||||
slot="tip"
|
||||
style="margin-left:10px;"
|
||||
class="el-upload__tip"
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="form.FileTypeId === ''"
|
||||
:loading="btnLoading"
|
||||
>Select</el-button
|
||||
>
|
||||
<span slot="tip" style="margin-left: 10px" class="el-upload__tip">
|
||||
(must be in pdf format)
|
||||
</span>
|
||||
</el-upload>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="需要签署的用户类型: " prop="NeedConfirmedUserTypeIdList">
|
||||
<el-form-item
|
||||
label="需要签署的用户类型: "
|
||||
prop="NeedConfirmedUserTypeIdList"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.NeedConfirmedUserTypeIdList"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
multiple
|
||||
>
|
||||
<el-option
|
||||
@@ -66,7 +71,18 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="查看最短时间(分钟): " prop="SignViewMinimumMinutes">
|
||||
<el-form-item label="是否仅内部签署: " prop="DocUserSignType">
|
||||
<el-switch
|
||||
v-model="form.DocUserSignType"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="查看最短时间(分钟): "
|
||||
prop="SignViewMinimumMinutes"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="form.SignViewMinimumMinutes"
|
||||
controls-position="right"
|
||||
@@ -81,9 +97,16 @@
|
||||
</el-radio-group>
|
||||
</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.FileTypeId === '' || form.Name === ''" :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.FileTypeId === '' || form.Name === ''"
|
||||
:loading="saveBtnLoading"
|
||||
@click="handleSave"
|
||||
>Save</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
@@ -96,8 +119,10 @@ export default {
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default() { return {} }
|
||||
}
|
||||
default() {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
@@ -108,19 +133,26 @@ export default {
|
||||
Name: '',
|
||||
Path: '',
|
||||
IsDeleted: false,
|
||||
SignViewMinimumMinutes: null
|
||||
SignViewMinimumMinutes: null,
|
||||
DocUserSignType: 0,
|
||||
},
|
||||
rules: {
|
||||
FileTypeId: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||
SignViewMinimumMinutes: [{ required: true, message: 'Please specify', trigger: ['change'] }],
|
||||
NeedConfirmedUserTypeIdList: [{ required: true, message: 'Please select', trigger: ['blur'] }]
|
||||
FileTypeId: [
|
||||
{ required: true, message: 'Please select', trigger: ['blur'] },
|
||||
],
|
||||
SignViewMinimumMinutes: [
|
||||
{ required: true, message: 'Please specify', trigger: ['change'] },
|
||||
],
|
||||
NeedConfirmedUserTypeIdList: [
|
||||
{ required: true, message: 'Please select', trigger: ['blur'] },
|
||||
],
|
||||
},
|
||||
fileList: [],
|
||||
userTypeOptions: [],
|
||||
btnLoading: false,
|
||||
saveBtnLoading: false,
|
||||
loading: false,
|
||||
dictionaryList: {}
|
||||
dictionaryList: {},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -137,8 +169,8 @@ export default {
|
||||
{
|
||||
name: this.data.Name,
|
||||
url: this.data.Path,
|
||||
path: this.data.Path
|
||||
}
|
||||
path: this.data.Path,
|
||||
},
|
||||
]
|
||||
}
|
||||
this.form.Id = this.data.Id
|
||||
@@ -147,25 +179,31 @@ export default {
|
||||
this.form.Path = this.data.Path
|
||||
this.form.IsDeleted = this.data.IsDeleted
|
||||
this.form.SignViewMinimumMinutes = this.data.SignViewMinimumMinutes
|
||||
this.form.DocUserSignType = this.data.DocUserSignType
|
||||
}
|
||||
this.loading = false
|
||||
},
|
||||
// 获取文件类型下拉框
|
||||
getDicData() {
|
||||
getBasicDataSelects(['Sys_Document']).then(res => {
|
||||
this.dictionaryList = { ...res.Result }
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
getBasicDataSelects(['Sys_Document'])
|
||||
.then((res) => {
|
||||
this.dictionaryList = { ...res.Result }
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
// 获取用户类型下拉数据
|
||||
getUserType() {
|
||||
getTrialUserTypeList().then(res => {
|
||||
this.userTypeOptions = res.Result
|
||||
if (this.form.Id) {
|
||||
this.form.NeedConfirmedUserTypeIdList = this.data.NeedConfirmedUserTypeIds
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
getTrialUserTypeList()
|
||||
.then((res) => {
|
||||
this.userTypeOptions = res.Result
|
||||
if (this.form.Id) {
|
||||
this.form.NeedConfirmedUserTypeIdList =
|
||||
this.data.NeedConfirmedUserTypeIds
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
beforeUpload(file) {
|
||||
// 检测文件类型是否符合要求
|
||||
@@ -181,28 +219,37 @@ export default {
|
||||
async handleUploadFile(param) {
|
||||
this.loading = true
|
||||
var file = await this.fileToBlob(param.file)
|
||||
const res = await this.OSSclient.put(`/System/DocumentToSign/${param.file.name}${new Date().getTime()}`, file)
|
||||
this.fileList.push({ name: param.file.name, path: this.$getObjectName(res.url), url: this.$getObjectName(res.url) })
|
||||
const res = await this.OSSclient.put(
|
||||
`/System/DocumentToSign/${param.file.name}${new Date().getTime()}`,
|
||||
file
|
||||
)
|
||||
this.fileList.push({
|
||||
name: param.file.name,
|
||||
path: this.$getObjectName(res.url),
|
||||
url: this.$getObjectName(res.url),
|
||||
})
|
||||
this.form.Path = this.$getObjectName(res.url)
|
||||
this.form.Name = param.file.name
|
||||
this.loading = false
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.sysAttachmentFrom.validate(valid => {
|
||||
this.$refs.sysAttachmentFrom.validate((valid) => {
|
||||
if (!valid) return
|
||||
if (!this.form.Name) {
|
||||
this.$alert('Please select file.')
|
||||
return
|
||||
}
|
||||
this.saveBtnLoading = true
|
||||
addOrUpdateSystemDocument(this.form).then(res => {
|
||||
this.saveBtnLoading = false
|
||||
this.$emit('closeDialog')
|
||||
this.$emit('getList')
|
||||
this.$message.success('Uploaded successfully')
|
||||
}).catch(() => {
|
||||
this.saveBtnLoading = false
|
||||
})
|
||||
addOrUpdateSystemDocument(this.form)
|
||||
.then((res) => {
|
||||
this.saveBtnLoading = false
|
||||
this.$emit('closeDialog')
|
||||
this.$emit('getList')
|
||||
this.$message.success('Uploaded successfully')
|
||||
})
|
||||
.catch(() => {
|
||||
this.saveBtnLoading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
handleRemoveFile() {
|
||||
@@ -220,19 +267,21 @@ export default {
|
||||
},
|
||||
checkFileSuffix(fileName) {
|
||||
var typeArr = ['pdf']
|
||||
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;
|
||||
@@ -245,8 +294,8 @@ export default {
|
||||
color: #428bca;
|
||||
font-size: 13px;
|
||||
}
|
||||
.account_item_clear{
|
||||
.el-tag__close{
|
||||
.account_item_clear {
|
||||
.el-tag__close {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,27 +2,18 @@
|
||||
<BaseContainer>
|
||||
<template slot="search-container">
|
||||
<el-form :inline="true" size="small">
|
||||
|
||||
<el-form-item label="文件类型:">
|
||||
<el-select
|
||||
v-model="searchData.FileTypeId"
|
||||
style="width:150px;"
|
||||
>
|
||||
<el-select v-model="searchData.FileTypeId" style="width: 150px">
|
||||
<el-option
|
||||
v-for="item of dict.type.Sys_Document"
|
||||
:key="item.value"
|
||||
: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>
|
||||
@@ -31,7 +22,11 @@
|
||||
{{ $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>
|
||||
@@ -39,7 +34,7 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
style="margin-left:auto;"
|
||||
style="margin-left: auto"
|
||||
size="small"
|
||||
@click="handleAdd"
|
||||
>
|
||||
@@ -48,7 +43,7 @@
|
||||
</template>
|
||||
<template slot="main-container">
|
||||
<el-table
|
||||
v-adaptive="{bottomOffset:60}"
|
||||
v-adaptive="{ bottomOffset: 60 }"
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
stripe
|
||||
@@ -81,7 +76,11 @@
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.NeedConfirmedUserTypes?scope.row.NeedConfirmedUserTypes.join(', '):'' }}
|
||||
{{
|
||||
scope.row.NeedConfirmedUserTypes
|
||||
? scope.row.NeedConfirmedUserTypes.join(', ')
|
||||
: ''
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -91,7 +90,17 @@
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.IsDeleted?'Yes':'No' }}
|
||||
{{ scope.row.IsDeleted ? 'Yes' : 'No' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="DocUserSignType"
|
||||
label="是否仅内部签署"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('ReadingYesOrNo', Number(scope.row.DocUserSignType)) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -103,16 +112,10 @@
|
||||
|
||||
<el-table-column label="Action">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handlePreview(scope.row)"
|
||||
>
|
||||
<el-button type="text" @click="handlePreview(scope.row)">
|
||||
预览
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
<el-button type="text" @click="handleEdit(scope.row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
@@ -122,17 +125,20 @@
|
||||
>
|
||||
废除
|
||||
</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
|
||||
@@ -143,7 +149,11 @@
|
||||
width="600px"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<TemplateForm :data="currentRow" @closeDialog="closeDialog" @getList="getList" />
|
||||
<TemplateForm
|
||||
:data="currentRow"
|
||||
@closeDialog="closeDialog"
|
||||
@getList="getList"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 预览文件 -->
|
||||
@@ -155,10 +165,16 @@
|
||||
append-to-body
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<div class="base-modal-body" style="border:2px solid #ccc;padding: 10px">
|
||||
<PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" />
|
||||
<div
|
||||
class="base-modal-body"
|
||||
style="border: 2px solid #ccc; padding: 10px"
|
||||
>
|
||||
<PreviewFile
|
||||
v-if="previewVisible"
|
||||
:file-path="currentPath"
|
||||
:file-type="currentType"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
</BaseContainer>
|
||||
@@ -175,7 +191,7 @@ const searchDataDefault = () => {
|
||||
FileTypeId: '',
|
||||
Name: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
PageSize: 20,
|
||||
}
|
||||
}
|
||||
export default {
|
||||
@@ -193,7 +209,7 @@ export default {
|
||||
editVisible: false,
|
||||
previewVisible: false,
|
||||
title: '',
|
||||
loading: false
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -203,22 +219,24 @@ export default {
|
||||
// 获取系统文件数据
|
||||
getList() {
|
||||
this.loading = true
|
||||
getSystemDocumentList(this.searchData).then(res => {
|
||||
this.loading = false
|
||||
const { CurrentPageData, TotalCount } = res.Result
|
||||
CurrentPageData.forEach(item => {
|
||||
item.NeedConfirmedUserTypes = []
|
||||
item.NeedConfirmedUserTypeIds = []
|
||||
item.NeedConfirmedUserTypeList.forEach((i) => {
|
||||
item.NeedConfirmedUserTypes.push(i.UserTypeShortName)
|
||||
item.NeedConfirmedUserTypeIds.push(i.NeedConfirmUserTypeId)
|
||||
getSystemDocumentList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false
|
||||
const { CurrentPageData, TotalCount } = res.Result
|
||||
CurrentPageData.forEach((item) => {
|
||||
item.NeedConfirmedUserTypes = []
|
||||
item.NeedConfirmedUserTypeIds = []
|
||||
item.NeedConfirmedUserTypeList.forEach((i) => {
|
||||
item.NeedConfirmedUserTypes.push(i.UserTypeShortName)
|
||||
item.NeedConfirmedUserTypeIds.push(i.NeedConfirmUserTypeId)
|
||||
})
|
||||
})
|
||||
this.list = CurrentPageData
|
||||
this.total = TotalCount
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
this.list = CurrentPageData
|
||||
this.total = TotalCount
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
@@ -230,7 +248,9 @@ export default {
|
||||
handlePreview(row) {
|
||||
const { Name, FullFilePath } = row
|
||||
this.currentPath = FullFilePath
|
||||
this.currentType = row.Name ? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase() : ''
|
||||
this.currentType = row.Name
|
||||
? Name.substring(Name.lastIndexOf('.') + 1).toLocaleLowerCase()
|
||||
: ''
|
||||
this.previewVisible = true
|
||||
},
|
||||
// 编辑
|
||||
@@ -244,39 +264,47 @@ export default {
|
||||
this.$confirm('是否确认废除此文件?', {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
userAbandonDoc(row.Id, true)
|
||||
.then(res => {
|
||||
.then((res) => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.getList()
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.$message.success(
|
||||
this.$t('common:message:savedSuccessfully')
|
||||
)
|
||||
}
|
||||
}).catch(() => { this.loading = false })
|
||||
}).catch(() => {})
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row) {
|
||||
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), {
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
distinguishCancelAndClose: true,
|
||||
}).then(() => {
|
||||
this.loading = true
|
||||
deleteSystemDocument(row.Id)
|
||||
.then((res) => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(
|
||||
this.list.findIndex((item) => item.Id === row.Id),
|
||||
1
|
||||
)
|
||||
this.$message.success('删除成功!')
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
.then(() => {
|
||||
this.loading = true
|
||||
deleteSystemDocument(row.Id)
|
||||
.then(res => {
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
||||
this.$message.success('删除成功!')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
// 关闭弹窗
|
||||
closeDialog() {
|
||||
@@ -305,7 +333,7 @@ export default {
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -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,29 @@
|
||||
|
||||
<el-table-column label="Action">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleDownload(scope.row)"
|
||||
>
|
||||
<el-button type="text" @click="PreviewFile(scope.row)">
|
||||
{{ $t('common:button:preview') }}
|
||||
</el-button>
|
||||
<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 +151,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 +176,7 @@ const searchDataDefault = () => {
|
||||
BusinessScenarioEnum: null,
|
||||
Name: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
PageSize: 20,
|
||||
}
|
||||
}
|
||||
export default {
|
||||
@@ -168,7 +189,7 @@ export default {
|
||||
total: 0,
|
||||
currentRow: {},
|
||||
editDialog: { title: '', visible: false },
|
||||
loading: false
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -183,15 +204,28 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
PreviewFile(row) {
|
||||
let basePath = window.location.origin
|
||||
if (window.location.protocol !== 'https:') {
|
||||
basePath = 'https://irc.test.extimaging.com'
|
||||
}
|
||||
let data = {
|
||||
name: row.NameCN,
|
||||
path: basePath + row.Path,
|
||||
}
|
||||
this.$emit('PreviewFile', data)
|
||||
},
|
||||
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 +236,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 +271,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>
|
||||
|
||||
@@ -1,14 +1,54 @@
|
||||
<template>
|
||||
<div class="attachment-wrapper">
|
||||
<el-tabs v-model="activeTab" @tab-click="clickTab">
|
||||
<el-tab-pane v-for="item in $d.Common_File_Type" :key="item.value" :label="item.label" :name="String(item.value)">
|
||||
<UploadTemplate v-if="activeTab === '1'" />
|
||||
<ExportTemplate v-if="activeTab === '2'" />
|
||||
<EmailTemplate v-if="activeTab === '3'" />
|
||||
<CommonTemplate v-if="activeTab === '4'" />
|
||||
<SignatureTemplate v-if="activeTab === '5'" />
|
||||
<el-tab-pane
|
||||
v-for="item in $d.Common_File_Type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:name="String(item.value)"
|
||||
>
|
||||
<UploadTemplate
|
||||
v-if="activeTab === '1' && item.value == activeTab"
|
||||
@PreviewFile="PreviewFile"
|
||||
/>
|
||||
<ExportTemplate
|
||||
v-if="activeTab === '2' && item.value == activeTab"
|
||||
@PreviewFile="PreviewFile"
|
||||
/>
|
||||
<EmailTemplate v-if="activeTab === '3' && item.value == activeTab" />
|
||||
<CommonTemplate v-if="activeTab === '4' && item.value == activeTab" />
|
||||
<SignatureTemplate
|
||||
v-if="activeTab === '5' && item.value == activeTab"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<!-- 预览 -->
|
||||
<el-dialog
|
||||
v-if="Preview.visible"
|
||||
:visible.sync="Preview.visible"
|
||||
:close-on-click-modal="false"
|
||||
:fullscreen="true"
|
||||
:title="Preview.title"
|
||||
width="600px"
|
||||
custom-class="base-dialog-wrapper"
|
||||
>
|
||||
<vue-office-docx
|
||||
v-if="docxTypes.includes(Preview.type)"
|
||||
:src="Preview.path"
|
||||
style="height: calc(100vh - 70px)"
|
||||
@rendered="renderedHandler"
|
||||
@error="errorHandler"
|
||||
/>
|
||||
<vue-office-excel
|
||||
v-else-if="excelTypes.includes(Preview.type)"
|
||||
:src="Preview.path"
|
||||
:options="options"
|
||||
style="height: calc(100vh - 70px)"
|
||||
@rendered="renderedHandler"
|
||||
@error="errorHandler"
|
||||
/>
|
||||
<PreviewFile v-else :file-path="Preview.path" :file-type="Preview.type" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -17,6 +57,11 @@ import ExportTemplate from './components/ExportTemplate'
|
||||
import EmailTemplate from './components/EmailTemplate'
|
||||
import CommonTemplate from './components/CommonTemplate'
|
||||
import SignatureTemplate from './components/SignatureTemplate'
|
||||
import VueOfficeDocx from '@vue-office/docx'
|
||||
import '@vue-office/docx/lib/index.css'
|
||||
import VueOfficeExcel from '@vue-office/excel'
|
||||
import '@vue-office/excel/lib/index.css'
|
||||
import PreviewFile from '@/components/PreviewFile/index'
|
||||
export default {
|
||||
name: 'Attachment',
|
||||
components: {
|
||||
@@ -24,11 +69,35 @@ export default {
|
||||
ExportTemplate,
|
||||
EmailTemplate,
|
||||
CommonTemplate,
|
||||
SignatureTemplate
|
||||
SignatureTemplate,
|
||||
VueOfficeDocx,
|
||||
VueOfficeExcel,
|
||||
PreviewFile,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeTab: null
|
||||
activeTab: null,
|
||||
Preview: {
|
||||
visible: false,
|
||||
title: '',
|
||||
type: null,
|
||||
path: null,
|
||||
},
|
||||
excelTypes: ['xlsx', 'xls'],
|
||||
docxTypes: ['docx', 'doc'],
|
||||
options: {
|
||||
xls: false, //预览xlsx文件设为false;预览xls文件设为true
|
||||
minColLength: 0, // excel最少渲染多少列,如果想实现xlsx文件内容有几列,就渲染几列,可以将此值设置为0.
|
||||
minRowLength: 0, // excel最少渲染多少行,如果想实现根据xlsx实际函数渲染,可以将此值设置为0.
|
||||
widthOffset: 10, //如果渲染出来的结果感觉单元格宽度不够,可以在默认渲染的列表宽度上再加 Npx宽
|
||||
heightOffset: 10, //在默认渲染的列表高度上再加 Npx高
|
||||
beforeTransformData: (workbookData) => {
|
||||
return workbookData
|
||||
}, //底层通过exceljs获取excel文件内容,通过该钩子函数,可以对获取的excel文件内容进行修改,比如某个单元格的数据显示不正确,可以在此自行修改每个单元格的value值。
|
||||
transformData: (workbookData) => {
|
||||
return workbookData
|
||||
}, //将获取到的excel数据进行处理之后且渲染到页面之前,可通过transformData对即将渲染的数据及样式进行修改,此时每个单元格的text值就是即将渲染到页面上的内容
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -40,25 +109,46 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
clickTab(tab, event) {
|
||||
this.$router.push({ path: `/dictionary/attachment?tabActive=${tab.name}` })
|
||||
}
|
||||
}
|
||||
this.$router.push({
|
||||
path: `/dictionary/attachment?tabActive=${tab.name}`,
|
||||
})
|
||||
},
|
||||
PreviewFile(data) {
|
||||
if (!data.path) return false
|
||||
let type = data.path
|
||||
.substring(data.path.lastIndexOf('.') + 1)
|
||||
.toLocaleLowerCase()
|
||||
this.Preview.path = data.path
|
||||
this.Preview.type = type
|
||||
this.Preview.title = data.name
|
||||
if (this.excelTypes.includes(type)) {
|
||||
this.options.xls = type === 'xls'
|
||||
}
|
||||
this.Preview.visible = true
|
||||
},
|
||||
renderedHandler() {
|
||||
console.log('渲染完成')
|
||||
},
|
||||
errorHandler() {
|
||||
console.log('渲染失败')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.attachment-wrapper{
|
||||
.el-tabs{
|
||||
.attachment-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%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -14,11 +14,17 @@
|
||||
</el-form-item>
|
||||
|
||||
<!-- 中心名称 -->
|
||||
<el-form-item :label="$t('trials:customSite:form:siteName')" prop="SiteName">
|
||||
<el-form-item
|
||||
:label="$t('trials:customSite:form:siteName')"
|
||||
prop="SiteName"
|
||||
>
|
||||
<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>
|
||||
|
||||
@@ -46,7 +52,7 @@
|
||||
v-model="form.HospitalId"
|
||||
clearable
|
||||
placeholder="Please select"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in hospitalList"
|
||||
@@ -73,10 +79,22 @@
|
||||
<el-input v-model="form.ContactPhone" />
|
||||
</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 :disabled="btnLoading" size="small" type="primary" @click="handleCancel">Cancel</el-button>
|
||||
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">Save</el-button>
|
||||
<el-button
|
||||
:disabled="btnLoading"
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="handleCancel"
|
||||
>Cancel</el-button
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
type="primary"
|
||||
:loading="btnLoading"
|
||||
@click="handleSave"
|
||||
>Save</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
@@ -91,8 +109,8 @@ export default {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -111,50 +129,42 @@ export default {
|
||||
ContactName: '',
|
||||
ContactPhone: '',
|
||||
UniqueCode: '',
|
||||
Address: ''
|
||||
Address: '',
|
||||
},
|
||||
rules: {
|
||||
SiteName: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{ max: 50, message: 'The maximum length is 50' }
|
||||
// { max: 50, message: 'The maximum length is 50' }
|
||||
],
|
||||
SiteNameCN: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{ max: 50, message: 'The maximum length is 50' }
|
||||
// { max: 50, message: 'The maximum length is 50' }
|
||||
],
|
||||
SiteCode: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{ max: 50, message: 'The maximum length is 50' }
|
||||
{ max: 50, message: 'The maximum length is 50' },
|
||||
],
|
||||
Country: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{ max: 50, message: 'The maximum length is 50' }
|
||||
{ max: 50, message: 'The maximum length is 50' },
|
||||
],
|
||||
City: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{ max: 50, message: 'The maximum length is 50' }
|
||||
{ max: 50, message: 'The maximum length is 50' },
|
||||
],
|
||||
// HospitalId: [
|
||||
// { required: true, message: 'Please specify', trigger: 'blur' }
|
||||
// ],
|
||||
Address: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' }
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
],
|
||||
DirectorName: [
|
||||
{ max: 50, message: 'The maximum length is 50' }
|
||||
],
|
||||
DirectorPhone: [
|
||||
{ max: 50, message: 'The maximum length is 50' }
|
||||
],
|
||||
ContactName: [
|
||||
{ max: 50, message: 'The maximum length is 50' }
|
||||
],
|
||||
ContactPhone: [
|
||||
{ max: 50, message: 'The maximum length is 50' }
|
||||
]
|
||||
DirectorName: [{ max: 50, message: 'The maximum length is 50' }],
|
||||
DirectorPhone: [{ max: 50, message: 'The maximum length is 50' }],
|
||||
ContactName: [{ max: 50, message: 'The maximum length is 50' }],
|
||||
ContactPhone: [{ max: 50, message: 'The maximum length is 50' }],
|
||||
},
|
||||
loading: false,
|
||||
show: false
|
||||
show: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -163,20 +173,22 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleSave() {
|
||||
this.$refs.siteForm.validate(valid => {
|
||||
this.$refs.siteForm.validate((valid) => {
|
||||
if (!valid) return
|
||||
this.btnLoading = true
|
||||
addOrUpdateSite(this.form).then(res => {
|
||||
this.btnLoading = false
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success('Saved successfully')
|
||||
this.$refs['siteForm'].resetFields()
|
||||
this.$emit('getList')
|
||||
this.$emit('close')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.btnLoading = false
|
||||
})
|
||||
addOrUpdateSite(this.form)
|
||||
.then((res) => {
|
||||
this.btnLoading = false
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success('Saved successfully')
|
||||
this.$refs['siteForm'].resetFields()
|
||||
this.$emit('getList')
|
||||
this.$emit('close')
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.btnLoading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
@@ -189,8 +201,7 @@ export default {
|
||||
if (Object.keys(this.data).length && this.data.Id) {
|
||||
this.form = { ...this.data }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
{{ question.GroupName }}
|
||||
</div>
|
||||
<div
|
||||
v-else-if="question.Type==='table'"
|
||||
v-else-if="question.Type==='table' || question.Type==='basicTable'"
|
||||
style="font-weight: bold;font-size: 14px;margin: 5px 0px;"
|
||||
>
|
||||
{{ question.QuestionName }}
|
||||
</div>
|
||||
</div>
|
||||
<template v-else>
|
||||
<el-form-item
|
||||
v-if="(question.ShowQuestion===1 && question.ParentTriggerValueList.includes(questionForm[question.ParentId])) || question.ShowQuestion===0"
|
||||
v-if="(question.ShowQuestion===1 && question.ParentTriggerValueList.includes(String(questionForm[question.ParentId]))) || question.ShowQuestion===0"
|
||||
:label="`${question.QuestionName}`"
|
||||
:prop="question.Id"
|
||||
:rules="[
|
||||
@@ -139,14 +139,29 @@
|
||||
/>
|
||||
<!-- 数值 -->
|
||||
<!-- :precision="2" :step="0.1" :max="10" -->
|
||||
<el-input-number
|
||||
<!-- <el-input-number
|
||||
v-if="question.Type==='number'"
|
||||
v-model="questionForm[question.Id]"
|
||||
/> -->
|
||||
<el-input
|
||||
v-if="question.Type==='number'"
|
||||
v-model="questionForm[question.Id]"
|
||||
type="number"
|
||||
:disabled="question.DataSource === 1"
|
||||
>
|
||||
<template v-if="question.Unit" slot="append">{{$fd('ValueUnit', question.Unit)}}</template>
|
||||
</el-input>
|
||||
<!-- 自动分类 -->
|
||||
<el-input
|
||||
v-if="question.Type==='calss'"
|
||||
v-model="questionForm[question.Id]"
|
||||
disabled
|
||||
/>
|
||||
<!-- 上传图像 -->
|
||||
<el-upload
|
||||
v-if="question.Type==='upload'"
|
||||
:action="accept"
|
||||
action
|
||||
:accept="question.FileType"
|
||||
:limit="question.ImageCount"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:before-upload="handleBeforeUpload"
|
||||
|
||||