Compare commits
842 Commits
2303c04857
..
v1.9.1
| Author | SHA1 | Date | |
|---|---|---|---|
| a2b2fd65af | |||
| 551cdf0ed3 | |||
| cadb3e8f7a | |||
| 4da35daa3c | |||
| 0f50ff6ded | |||
| 2f371f0435 | |||
| 245d4edca7 | |||
| 42d1c713bd | |||
| 65b81fc633 | |||
| 3a1d4ee15d | |||
| c0eab7e896 | |||
| 4ba4d7cf00 | |||
| bfe9817544 | |||
| f5fd1252c9 | |||
| 596ea8f658 | |||
| b24548dd8b | |||
| 4a479258f2 | |||
| 29d0cc7653 | |||
| 6de9cd26a4 | |||
| caf3f41465 | |||
| 8896737a9e | |||
| 1be46686a3 | |||
| 0cd07b76f8 | |||
| d74c0028f6 | |||
| ab5645f28a | |||
| efb88b7ad1 | |||
| 129548031c | |||
| 5dbddbea57 | |||
| 689782bf36 | |||
| 89fe4e4c00 | |||
| a582daf686 | |||
| 3e680d0033 | |||
| af343d43d8 | |||
| 4b9216229c | |||
| 2952762ce7 | |||
| 361aed4a0c | |||
| 19b419c29e | |||
| 7e9a9b62f6 | |||
| 3921f369c3 | |||
| 0ffe7ff1a7 | |||
| 5ec969c2f9 | |||
| dba4466ac2 | |||
| 9187bbe64f | |||
| a0f593a22f | |||
| 89f7aee973 | |||
| ced57cbfe4 | |||
| 99d099496e | |||
| d3afa7b676 | |||
| c08d701143 | |||
| a2d06ba72f | |||
| 148aa4908b | |||
| 53738c2da4 | |||
| 3513c08adf | |||
| 9eb3f2f322 | |||
| b16e351779 | |||
| b176ab0716 | |||
| c7eb323eaa | |||
| 7b3fe42654 | |||
| 21c96300ad | |||
| 8f46819b9a | |||
| 6e66dd8bbe | |||
| b209c6566b | |||
| f8bd826c9c | |||
| e3f6f9107d | |||
| f1c72c66e8 | |||
| 79caed3fd9 | |||
| e56440634e | |||
| ac657a162f | |||
| 9d362e13de | |||
| d04898dc28 | |||
| e0f42e815e | |||
| efe3d937b4 | |||
| 5cf6ab24bd | |||
| ff0ddeea9a | |||
| 42083afb8d | |||
| de1b22ff48 | |||
| 66cbbbbb75 | |||
| 3d89939a98 | |||
| ade4ab3e03 | |||
| a3550c44bd | |||
| 9e85e9705e | |||
| e1d5db8cf5 | |||
| 6f3381c267 | |||
| 0c52bde525 | |||
| 102089c16f | |||
| 6e1d07ee95 | |||
| 55ae6bac7e | |||
| 823ac2f085 | |||
| 73e0a13e91 | |||
| 7f179fb393 | |||
| 3441793bcb | |||
| dbe651fe98 | |||
| f54ff927ec | |||
| 535b37e830 | |||
| 13191c914e | |||
| 70735f2c47 | |||
| 8ad77f1679 | |||
| 3a76a7c24d | |||
| 5393ca571c | |||
| 4cef62ccba | |||
| 2772168c3b | |||
| 89be8d8a12 | |||
| 041266c250 | |||
| cbcb84a768 | |||
| 830718c228 | |||
| 6977ed3713 | |||
| 28ea52797e | |||
| 1348d5f864 | |||
| cd34ad7ef7 | |||
| 5af7e8dd3c | |||
| 455f808f49 | |||
| a0d5e58311 | |||
| 84dbcd49f0 | |||
| a4ec387814 | |||
| 3a6c3d451c | |||
| f396901731 | |||
| 0b00f4bc7e | |||
| e58695aeff | |||
| 65a9dd3cf1 | |||
| 63743dbbc1 | |||
| b5643d3774 | |||
| 4c1a770969 | |||
| 7ff0273c29 | |||
| 3f2a339cba | |||
| d3dd4ecffc | |||
| d636813210 | |||
| 66d09ca284 | |||
| e672e6bd18 | |||
| 9c964f11a1 | |||
| 0a473dcae3 | |||
| 85b3960f97 | |||
| b96f5b9910 | |||
| 31196e850e | |||
| c309410c04 | |||
| 0a671fb330 | |||
| febdfd7b4f | |||
| e1da0c9ea5 | |||
| 54be84c300 | |||
| 78c1b57770 | |||
| 39ce8fd355 | |||
| 130862518f | |||
| a129adbc4b | |||
| 3066781ee6 | |||
| df4880dc08 | |||
| 29e2a6ea65 | |||
| ae12c3d517 | |||
| cbe346a049 | |||
| c8c5ab72bb | |||
| 37dc4a960f | |||
| 05cf250c21 | |||
| b2ca803f94 | |||
| 2ff2f5106e | |||
| 67c2d47689 | |||
| 67a3c4f926 | |||
| 9ab7afa06f | |||
| e5a17d20b1 | |||
| 3c664e9ba6 | |||
| 50dd74b4ce | |||
| b22b9d338e | |||
| a13ef6e5d2 | |||
| 58141aaca9 | |||
| 17b868e7ed | |||
| bbc4da7b9e | |||
| c14079efe3 | |||
| ecf5119269 | |||
| b35ff2b7dc | |||
| bae5b9c51c | |||
| be5b9efa7b | |||
| efab56f6bd | |||
| a239bccc90 | |||
| 7dd15434bf | |||
| 437b4377ed | |||
| 7229bc65a9 | |||
| bf95ea96e2 | |||
| 013a657f78 | |||
| 8d4e9368c6 | |||
| d71fff7393 | |||
| d243d3cd11 | |||
| 221ad89fd4 | |||
| af42a3aec0 | |||
| b0529dca5f | |||
| 17ee60de81 | |||
| b9ef4fd3f3 | |||
| 252333ea5b | |||
| a5445804e2 | |||
| 0cabf49c43 | |||
| 5ee7ba9820 | |||
| 4f2419fe03 | |||
| 28bb98099c | |||
| 5963fc629d | |||
| 44feb21f63 | |||
| 343813158f | |||
| 5e80fe2c3f | |||
| 2e8095939b | |||
| b0dc5400aa | |||
| 7f18e717b7 | |||
| 6e66b77857 | |||
| 5328217853 | |||
| 0f4819f5db | |||
| 907371b693 | |||
| f65042a5c2 | |||
| 518ce72fd2 | |||
| ba54da2814 | |||
| d381b10bcd | |||
| d127637922 | |||
| 0e0c2ca55d | |||
| 98502230c3 | |||
| 2b987fb1ae | |||
| f1dee25987 | |||
| 8799431f7a | |||
| a8fe3d6073 | |||
| 3578882ec0 | |||
| d5c9298aab | |||
| 59df7214d4 | |||
| 6c50257972 | |||
| 58b8cf1391 | |||
| 1f6ee08a8b | |||
| c5fb53a05f | |||
| 24e05ebc3e | |||
| a78d848424 | |||
| 75f3b37c05 | |||
| ca4f2c4a8e | |||
| 4defa157ee | |||
| 13ba919484 | |||
| bf407a49fd | |||
| 3c50254a2d | |||
| 41ac3d562a | |||
| d790a95952 | |||
| 328359dfde | |||
| 1286cd1212 | |||
| f739563fe9 | |||
| 2f4ace45b8 | |||
| 407f0b85d2 | |||
| 3052b269e9 | |||
| a7c3bf09f8 | |||
| 65d9c7b711 | |||
| 3ca1e9d8ed | |||
| f27fda4a5f | |||
| 27352f572c | |||
| 47c6b30d4a | |||
| 91bd50d565 | |||
| d1ed8b39f0 | |||
| 3925652428 | |||
| 37f8f2fff1 | |||
| 32551e3faa | |||
| 43f99b02c4 | |||
| 9c22809bae | |||
| be9e78ec73 | |||
| d645df58c2 | |||
| 5d9adab706 | |||
| 291f9b5d66 | |||
| 5dedcbc2ef | |||
| 940a860352 | |||
| 9cd540d1ec | |||
| 9e8d537358 | |||
| 7882c9b631 | |||
| 5dd1935997 | |||
| 47d60769be | |||
| 8225eacb7e | |||
| 57a8bb4e24 | |||
| 36ffd8b371 | |||
| 7fc6f4494b | |||
| 9d3ba7eb57 | |||
| 7ed4dd7e24 | |||
| b233535d95 | |||
| 9bdb8f64b3 | |||
| f637f746cb | |||
| dec01d779d | |||
| 7363b0049d | |||
| a95a129dde | |||
| 177510643d | |||
| eeac5b76c4 | |||
| a17359a56e | |||
| 28c7cf7d67 | |||
| d9091fbb79 | |||
| 7e52005dab | |||
| 5866535fb5 | |||
| 862c6d64cc | |||
| 2c0c2e8111 | |||
| c24c98b334 | |||
| 97caeae753 | |||
| 6725f6e276 | |||
| 38ad4e72a2 | |||
| c9c4826274 | |||
| 4f1fdb185f | |||
| feb65ae0cd | |||
| 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 |
+153
-143
@@ -1,48 +1,58 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
parserOptions: {
|
||||
parser: 'babel-eslint',
|
||||
parser: '@babel/eslint-parser',
|
||||
sourceType: 'module'
|
||||
},
|
||||
globals: {
|
||||
"zzSessionStorage": true
|
||||
'zzSessionStorage': true
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
node: true,
|
||||
es6: true
|
||||
},
|
||||
extends: ["plugin:vue/recommended"],
|
||||
extends: ['plugin:vue/recommended'],
|
||||
|
||||
// add your custom rules here
|
||||
//it is base on https://github.com/vuejs/eslint-config-vue
|
||||
// it is base on https://github.com/vuejs/eslint-config-vue
|
||||
rules: {
|
||||
"vue/max-attributes-per-line": [
|
||||
2,
|
||||
// "rule-name": "off"
|
||||
// "vue/max-attributes-per-line": [
|
||||
// 2,
|
||||
// {
|
||||
// singleline: 10,
|
||||
// multiline: {
|
||||
// max: 1,
|
||||
// allowFirstLine: false
|
||||
// }
|
||||
// }
|
||||
// ],
|
||||
'vue/max-attributes-per-line': [
|
||||
'error',
|
||||
{
|
||||
singleline: 10,
|
||||
multiline: {
|
||||
max: 1,
|
||||
allowFirstLine: false
|
||||
max: 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"vue/singleline-html-element-content-newline": "off",
|
||||
"vue/multiline-html-element-content-newline": "off",
|
||||
"vue/name-property-casing": ["error", "PascalCase"],
|
||||
"vue/no-v-html": "off",
|
||||
"accessor-pairs": 2,
|
||||
"arrow-spacing": [
|
||||
'vue/singleline-html-element-content-newline': 'off',
|
||||
'vue/multiline-html-element-content-newline': 'off',
|
||||
'vue/name-property-casing': ['error', 'PascalCase'],
|
||||
'vue/no-v-html': 'off',
|
||||
'accessor-pairs': 2,
|
||||
'arrow-spacing': [
|
||||
2,
|
||||
{
|
||||
before: true,
|
||||
after: true
|
||||
}
|
||||
],
|
||||
"block-spacing": [2, "always"],
|
||||
"brace-style": [
|
||||
'block-spacing': [2, 'always'],
|
||||
'brace-style': [
|
||||
2,
|
||||
"1tbs",
|
||||
'1tbs',
|
||||
{
|
||||
allowSingleLine: true
|
||||
}
|
||||
@@ -50,31 +60,31 @@ module.exports = {
|
||||
camelcase: [
|
||||
0,
|
||||
{
|
||||
properties: "always"
|
||||
properties: 'always'
|
||||
}
|
||||
],
|
||||
"comma-dangle": [2, "never"],
|
||||
"comma-spacing": [
|
||||
'comma-dangle': [2, 'never'],
|
||||
'comma-spacing': [
|
||||
2,
|
||||
{
|
||||
before: false,
|
||||
after: true
|
||||
}
|
||||
],
|
||||
"comma-style": [2, "last"],
|
||||
"constructor-super": 2,
|
||||
curly: [2, "multi-line"],
|
||||
"dot-location": [2, "property"],
|
||||
"eol-last": 2,
|
||||
eqeqeq: ["error", "always", { null: "ignore" }],
|
||||
"generator-star-spacing": [
|
||||
'comma-style': [2, 'last'],
|
||||
'constructor-super': 2,
|
||||
curly: [2, 'multi-line'],
|
||||
'dot-location': [2, 'property'],
|
||||
'eol-last': 2,
|
||||
eqeqeq: ['error', 'always', { null: 'ignore' }],
|
||||
'generator-star-spacing': [
|
||||
2,
|
||||
{
|
||||
before: true,
|
||||
after: true
|
||||
}
|
||||
],
|
||||
"handle-callback-err": [2, "^(err|error)$"],
|
||||
'handle-callback-err': [2, '^(err|error)$'],
|
||||
indent: [
|
||||
2,
|
||||
2,
|
||||
@@ -82,197 +92,197 @@ module.exports = {
|
||||
SwitchCase: 1
|
||||
}
|
||||
],
|
||||
"jsx-quotes": [2, "prefer-single"],
|
||||
"key-spacing": [
|
||||
'jsx-quotes': [2, 'prefer-single'],
|
||||
'key-spacing': [
|
||||
2,
|
||||
{
|
||||
beforeColon: false,
|
||||
afterColon: true
|
||||
}
|
||||
],
|
||||
"keyword-spacing": [
|
||||
'keyword-spacing': [
|
||||
2,
|
||||
{
|
||||
before: true,
|
||||
after: true
|
||||
}
|
||||
],
|
||||
"new-cap": [
|
||||
'new-cap': [
|
||||
2,
|
||||
{
|
||||
newIsCap: true,
|
||||
capIsNew: false
|
||||
}
|
||||
],
|
||||
"new-parens": 2,
|
||||
"no-array-constructor": 2,
|
||||
"no-caller": 2,
|
||||
"no-console": "off",
|
||||
"no-class-assign": 2,
|
||||
"no-cond-assign": 2,
|
||||
"no-const-assign": 2,
|
||||
"no-control-regex": 0,
|
||||
"no-delete-var": 2,
|
||||
"no-dupe-args": 2,
|
||||
"no-dupe-class-members": 2,
|
||||
"no-dupe-keys": 2,
|
||||
"no-duplicate-case": 2,
|
||||
"no-empty-character-class": 2,
|
||||
"no-empty-pattern": 2,
|
||||
"no-eval": 2,
|
||||
"no-ex-assign": 2,
|
||||
"no-extend-native": 2,
|
||||
"no-extra-bind": 2,
|
||||
"no-extra-boolean-cast": 2,
|
||||
"no-extra-parens": [2, "functions"],
|
||||
"no-fallthrough": 2,
|
||||
"no-floating-decimal": 2,
|
||||
"no-func-assign": 2,
|
||||
"no-implied-eval": 2,
|
||||
"no-inner-declarations": [2, "functions"],
|
||||
"no-invalid-regexp": 2,
|
||||
"no-irregular-whitespace": 2,
|
||||
"no-iterator": 2,
|
||||
"no-label-var": 2,
|
||||
"no-labels": [
|
||||
'new-parens': 2,
|
||||
'no-array-constructor': 2,
|
||||
'no-caller': 2,
|
||||
'no-console': 'off',
|
||||
'no-class-assign': 2,
|
||||
'no-cond-assign': 2,
|
||||
'no-const-assign': 2,
|
||||
'no-control-regex': 0,
|
||||
'no-delete-var': 2,
|
||||
'no-dupe-args': 2,
|
||||
'no-dupe-class-members': 2,
|
||||
'no-dupe-keys': 2,
|
||||
'no-duplicate-case': 2,
|
||||
'no-empty-character-class': 2,
|
||||
'no-empty-pattern': 2,
|
||||
'no-eval': 2,
|
||||
'no-ex-assign': 2,
|
||||
'no-extend-native': 2,
|
||||
'no-extra-bind': 2,
|
||||
'no-extra-boolean-cast': 2,
|
||||
'no-extra-parens': [2, 'functions'],
|
||||
'no-fallthrough': 2,
|
||||
'no-floating-decimal': 2,
|
||||
'no-func-assign': 2,
|
||||
'no-implied-eval': 2,
|
||||
'no-inner-declarations': [2, 'functions'],
|
||||
'no-invalid-regexp': 2,
|
||||
'no-irregular-whitespace': 2,
|
||||
'no-iterator': 2,
|
||||
'no-label-var': 2,
|
||||
'no-labels': [
|
||||
2,
|
||||
{
|
||||
allowLoop: false,
|
||||
allowSwitch: false
|
||||
}
|
||||
],
|
||||
"no-lone-blocks": 2,
|
||||
"no-mixed-spaces-and-tabs": 2,
|
||||
"no-multi-spaces": 2,
|
||||
"no-multi-str": 2,
|
||||
"no-multiple-empty-lines": [
|
||||
'no-lone-blocks': 2,
|
||||
'no-mixed-spaces-and-tabs': 2,
|
||||
'no-multi-spaces': 2,
|
||||
'no-multi-str': 2,
|
||||
'no-multiple-empty-lines': [
|
||||
2,
|
||||
{
|
||||
max: 1
|
||||
}
|
||||
],
|
||||
"no-native-reassign": 2,
|
||||
"no-negated-in-lhs": 2,
|
||||
"no-new-object": 2,
|
||||
"no-new-require": 2,
|
||||
"no-new-symbol": 2,
|
||||
"no-new-wrappers": 2,
|
||||
"no-obj-calls": 2,
|
||||
"no-octal": 2,
|
||||
"no-octal-escape": 2,
|
||||
"no-path-concat": 2,
|
||||
"no-proto": 2,
|
||||
"no-redeclare": 2,
|
||||
"no-regex-spaces": 2,
|
||||
"no-return-assign": [2, "except-parens"],
|
||||
"no-self-assign": 2,
|
||||
"no-self-compare": 2,
|
||||
"no-sequences": 2,
|
||||
"no-shadow-restricted-names": 2,
|
||||
"no-spaced-func": 2,
|
||||
"no-sparse-arrays": 2,
|
||||
"no-this-before-super": 2,
|
||||
"no-throw-literal": 2,
|
||||
"no-trailing-spaces": 2,
|
||||
"no-undef": 2,
|
||||
"no-undef-init": 2,
|
||||
"no-unexpected-multiline": 2,
|
||||
"no-unmodified-loop-condition": 2,
|
||||
"no-unneeded-ternary": [
|
||||
'no-native-reassign': 2,
|
||||
'no-negated-in-lhs': 2,
|
||||
'no-new-object': 2,
|
||||
'no-new-require': 2,
|
||||
'no-new-symbol': 2,
|
||||
'no-new-wrappers': 2,
|
||||
'no-obj-calls': 2,
|
||||
'no-octal': 2,
|
||||
'no-octal-escape': 2,
|
||||
'no-path-concat': 2,
|
||||
'no-proto': 2,
|
||||
'no-redeclare': 2,
|
||||
'no-regex-spaces': 2,
|
||||
'no-return-assign': [2, 'except-parens'],
|
||||
'no-self-assign': 2,
|
||||
'no-self-compare': 2,
|
||||
'no-sequences': 2,
|
||||
'no-shadow-restricted-names': 2,
|
||||
'no-spaced-func': 2,
|
||||
'no-sparse-arrays': 2,
|
||||
'no-this-before-super': 2,
|
||||
'no-throw-literal': 2,
|
||||
'no-trailing-spaces': 2,
|
||||
'no-undef': 2,
|
||||
'no-undef-init': 2,
|
||||
'no-unexpected-multiline': 2,
|
||||
'no-unmodified-loop-condition': 2,
|
||||
'no-unneeded-ternary': [
|
||||
2,
|
||||
{
|
||||
defaultAssignment: false
|
||||
}
|
||||
],
|
||||
"no-unreachable": 2,
|
||||
"no-unsafe-finally": 2,
|
||||
"no-unused-vars": [
|
||||
'no-unreachable': 2,
|
||||
'no-unsafe-finally': 2,
|
||||
'no-unused-vars': [
|
||||
2,
|
||||
{
|
||||
vars: "all",
|
||||
args: "none"
|
||||
vars: 'all',
|
||||
args: 'none'
|
||||
}
|
||||
],
|
||||
"no-useless-call": 2,
|
||||
"no-useless-computed-key": 2,
|
||||
"no-useless-constructor": 2,
|
||||
"no-useless-escape": 0,
|
||||
"no-whitespace-before-property": 2,
|
||||
"no-with": 2,
|
||||
"one-var": [
|
||||
'no-useless-call': 2,
|
||||
'no-useless-computed-key': 2,
|
||||
'no-useless-constructor': 2,
|
||||
'no-useless-escape': 0,
|
||||
'no-whitespace-before-property': 2,
|
||||
'no-with': 2,
|
||||
'one-var': [
|
||||
2,
|
||||
{
|
||||
initialized: "never"
|
||||
initialized: 'never'
|
||||
}
|
||||
],
|
||||
"operator-linebreak": [
|
||||
'operator-linebreak': [
|
||||
2,
|
||||
"after",
|
||||
'after',
|
||||
{
|
||||
overrides: {
|
||||
"?": "before",
|
||||
":": "before"
|
||||
'?': 'before',
|
||||
':': 'before'
|
||||
}
|
||||
}
|
||||
],
|
||||
"padded-blocks": [2, "never"],
|
||||
'padded-blocks': [2, 'never'],
|
||||
quotes: [
|
||||
2,
|
||||
"single",
|
||||
'single',
|
||||
{
|
||||
avoidEscape: true,
|
||||
allowTemplateLiterals: true
|
||||
}
|
||||
],
|
||||
semi: [2, "never"],
|
||||
"semi-spacing": [
|
||||
semi: [2, 'never'],
|
||||
'semi-spacing': [
|
||||
2,
|
||||
{
|
||||
before: false,
|
||||
after: true
|
||||
}
|
||||
],
|
||||
"space-before-blocks": [2, "always"],
|
||||
"space-before-function-paren": [2, "never"],
|
||||
"space-in-parens": [2, "never"],
|
||||
"space-infix-ops": 2,
|
||||
"space-unary-ops": [
|
||||
'space-before-blocks': [2, 'always'],
|
||||
'space-before-function-paren': [2, 'never'],
|
||||
'space-in-parens': [2, 'never'],
|
||||
'space-infix-ops': 2,
|
||||
'space-unary-ops': [
|
||||
2,
|
||||
{
|
||||
words: true,
|
||||
nonwords: false
|
||||
}
|
||||
],
|
||||
"spaced-comment": [
|
||||
'spaced-comment': [
|
||||
2,
|
||||
"always",
|
||||
'always',
|
||||
{
|
||||
markers: [
|
||||
"global",
|
||||
"globals",
|
||||
"eslint",
|
||||
"eslint-disable",
|
||||
"*package",
|
||||
"!",
|
||||
","
|
||||
'global',
|
||||
'globals',
|
||||
'eslint',
|
||||
'eslint-disable',
|
||||
'*package',
|
||||
'!',
|
||||
','
|
||||
]
|
||||
}
|
||||
],
|
||||
"template-curly-spacing": [2, "never"],
|
||||
"use-isnan": 2,
|
||||
"valid-typeof": 2,
|
||||
"wrap-iife": [2, "any"],
|
||||
"yield-star-spacing": [2, "both"],
|
||||
yoda: [2, "never"],
|
||||
"prefer-const": 2,
|
||||
//"no-debugger": process.env.NODE_ENV === "production" ? 2 : 0,
|
||||
"object-curly-spacing": [
|
||||
'template-curly-spacing': [2, 'never'],
|
||||
'use-isnan': 2,
|
||||
'valid-typeof': 2,
|
||||
'wrap-iife': [2, 'any'],
|
||||
'yield-star-spacing': [2, 'both'],
|
||||
yoda: [2, 'never'],
|
||||
'prefer-const': 2,
|
||||
// "no-debugger": process.env.NODE_ENV === "production" ? 2 : 0,
|
||||
'object-curly-spacing': [
|
||||
2,
|
||||
"always",
|
||||
'always',
|
||||
{
|
||||
objectsInObjects: false
|
||||
}
|
||||
],
|
||||
"array-bracket-spacing": [2, "never"]
|
||||
'array-bracket-spacing': [2, 'never']
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,3 +5,6 @@ npm install
|
||||
# 启动服务
|
||||
npm run dev
|
||||
|
||||
# v1.9.0修改
|
||||
1. 角色修改,全局userId实际意义修改为userRoleId(用户角色id),新增identityUserId(新的用户id)
|
||||
|
||||
|
||||
+5
-3
@@ -1,10 +1,12 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset',
|
||||
// '@vue/cli-plugin-babel/preset',
|
||||
// ["@babel/preset-env", { "modules": false }]
|
||||
'@babel/preset-env'
|
||||
],
|
||||
plugins: [
|
||||
'@babel/plugin-proposal-optional-chaining',
|
||||
'@babel/plugin-proposal-nullish-coalescing-operator'
|
||||
'@vue/babel-plugin-transform-vue-jsx'
|
||||
// '@babel/plugin-proposal-optional-chaining',
|
||||
// '@babel/plugin-proposal-nullish-coalescing-operator'
|
||||
]
|
||||
}
|
||||
|
||||
Generated
+20753
-15146
File diff suppressed because it is too large
Load Diff
+72
-68
@@ -14,88 +14,92 @@
|
||||
"i18n:en": "node i18nGenerate.js lang=en keyCol=5 valCol=7"
|
||||
},
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.701.0",
|
||||
"@cornerstonejs/adapters": "^2.19.7",
|
||||
"@cornerstonejs/calculate-suv": "^1.1.0",
|
||||
"@cornerstonejs/core": "^1.27.4",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.27.4",
|
||||
"@cornerstonejs/streaming-image-volume-loader": "1.23.2",
|
||||
"@cornerstonejs/tools": "^1.27.4",
|
||||
"@ffmpeg/core": "^0.10.0",
|
||||
"@ffmpeg/ffmpeg": "^0.10.1",
|
||||
"@microsoft/signalr": "^6.0.8",
|
||||
"@riophae/vue-treeselect": "0.4.0",
|
||||
"@cornerstonejs/core": "^2.19.7",
|
||||
"@cornerstonejs/dicom-image-loader": "^2.19.7",
|
||||
"@cornerstonejs/tools": "^2.19.7",
|
||||
"@icr/polyseg-wasm": "^0.4.0",
|
||||
"@microsoft/signalr": "^8.0.7",
|
||||
"@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",
|
||||
"copy-webpack-plugin": "^4.5.2",
|
||||
"@aws-sdk/client-s3": "^3.370.0",
|
||||
"axios": "^0.18.1",
|
||||
"core-js": "^3.8.3",
|
||||
"cornerstone-core": "^2.6.1",
|
||||
"cornerstone-math": "^0.1.10",
|
||||
"cornerstone-tools": "^6.0.10",
|
||||
"cornerstone-wado-image-loader": "^4.13.2",
|
||||
"crypto-js": "^4.2.0",
|
||||
"dcmjs": "^0.29.8",
|
||||
"dicom-parser": "^1.8.9",
|
||||
"dicomedit": "^0.1.0",
|
||||
"echarts": "^4.8.0",
|
||||
"element-ui": "^2.15.8",
|
||||
"exceljs": "^4.1.0",
|
||||
"element-ui": "^2.15.14",
|
||||
"exceljs": "^4.4.0",
|
||||
"file-saver": "^2.0.5",
|
||||
"hammerjs": "^2.0.8",
|
||||
"html2canvas": "^1.4.1",
|
||||
"js-md5": "^0.7.3",
|
||||
"jszip": "^3.7.1",
|
||||
"moment": "^2.27.0",
|
||||
"node-polyfill-webpack-plugin": "^2.0.1",
|
||||
"node-sass": "^4.14.1",
|
||||
"normalize.css": "7.0.0",
|
||||
"nprogress": "0.2.0",
|
||||
"path-to-regexp": "2.4.0",
|
||||
"pdfobject": "^2.2.8",
|
||||
"popper.js": "^1.16.1",
|
||||
"qrcodejs2": "0.0.2",
|
||||
"sass-loader": "^8.0.0",
|
||||
"screenfull": "^4.2.0",
|
||||
"sortablejs": "^1.15.0",
|
||||
"js-md5": "^0.8.3",
|
||||
"jsencrypt": "^3.3.2",
|
||||
"jszip": "^3.10.1",
|
||||
"minio": "^7.1.3",
|
||||
"moment": "^2.30.1",
|
||||
"moment-timezone": "^0.5.46",
|
||||
"node-xlsx": "^0.24.0",
|
||||
"normalize.css": "^8.0.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"path-to-regexp": "^0.1.10",
|
||||
"pdfobject": "^2.3.0",
|
||||
"qrcodejs2": "^0.0.2",
|
||||
"screenfull": "^6.0.2",
|
||||
"sortablejs": "^1.15.5",
|
||||
"streamsaver": "^2.0.6",
|
||||
"v-viewer": "^1.6.4",
|
||||
"svg-sprite-loader": "^4.1.3",
|
||||
"svgo": "^1.2.2",
|
||||
"v-viewer": "^1.7.4",
|
||||
"vcrontab": "^0.3.5",
|
||||
"vue": "^2.6.11",
|
||||
"vue-clipboard2": "^0.3.1",
|
||||
"vue-contextmenujs": "^1.3.13",
|
||||
"vue": "^2.6.14",
|
||||
"vue-clipboard2": "^0.3.3",
|
||||
"vue-contextmenujs": "^1.4.11",
|
||||
"vue-count-to": "^1.0.13",
|
||||
"vue-i18n": "^8.7.0",
|
||||
"vue-pdf": "^4.3.0",
|
||||
"vue-demi": "^0.14.10",
|
||||
"vue-i18n": "^8.28.2",
|
||||
"vue-puzzle-vcode": "^1.1.10",
|
||||
"vue-router": "3.0.6",
|
||||
"vue-seamless-scroll": "^1.1.21",
|
||||
"vue-router": "^3.0.6",
|
||||
"vue-seamless-scroll": "^1.1.23",
|
||||
"vuedraggable": "^2.24.3",
|
||||
"vuex": "3.1.0",
|
||||
"webpack-aliyun-oss": "^0.4.9"
|
||||
"vuex": "^3.1.0",
|
||||
"webpack-aliyun-oss": "^0.3.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
|
||||
"@vue/cli-plugin-babel": "~4.5.4",
|
||||
"@vue/cli-plugin-eslint": "~4.5.4",
|
||||
"@vue/cli-service": "~4.5.4",
|
||||
"autoprefixer": "^9.5.1",
|
||||
"aws-sdk": "^2.1532.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"chalk": "2.4.2",
|
||||
"connect": "3.6.6",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"html-webpack-plugin": "3.2.0",
|
||||
"minio": "^7.1.3",
|
||||
"moment-timezone": "^0.5.45",
|
||||
"node-xlsx": "^0.21.0",
|
||||
"runjs": "^4.3.2",
|
||||
"script-ext-html-webpack-plugin": "2.1.3",
|
||||
"script-loader": "0.7.2",
|
||||
"serve-static": "^1.13.2",
|
||||
"svg-sprite-loader": "4.1.3",
|
||||
"svgo": "1.2.2",
|
||||
"vue-template-compiler": "^2.6.11"
|
||||
"@babel/core": "^7.12.16",
|
||||
"@babel/eslint-parser": "^7.12.16",
|
||||
"@babel/plugin-transform-class-static-block": "^7.26.0",
|
||||
"@vue/babel-plugin-transform-vue-jsx": "^1.4.0",
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"clean-webpack-plugin": "^4.0.0",
|
||||
"copy-webpack-plugin": "^12.0.2",
|
||||
"css-minimizer-webpack-plugin": "^7.0.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-vue": "^8.0.3",
|
||||
"html-webpack-plugin": "^5.6.3",
|
||||
"mini-css-extract-plugin": "^2.9.2",
|
||||
"node-polyfill-webpack-plugin": "^4.0.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"process": "^0.11.10",
|
||||
"sass": "^1.63.2",
|
||||
"sass-loader": "^10.4.1",
|
||||
"terser-webpack-plugin": "^5.3.10",
|
||||
"vue-template-compiler": "^2.6.14",
|
||||
"webpack": "^5.96.1",
|
||||
"webpack-bundle-analyzer": "^4.10.2"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
@@ -103,19 +107,19 @@
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/essential"
|
||||
"plugin:vue/essential",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"parser": "babel-eslint"
|
||||
"parser": "@babel/eslint-parser",
|
||||
"requireConfigFile": false
|
||||
},
|
||||
"rules": {}
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.9",
|
||||
"npm": ">= 3.0.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions"
|
||||
"last 2 versions",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
]
|
||||
}
|
||||
|
||||
+9
-4
@@ -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;
|
||||
|
||||
+9
-4
@@ -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;
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 98 KiB |
+1
-1
@@ -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">
|
||||
@@ -29,7 +30,6 @@
|
||||
</script>
|
||||
<% } else { %>
|
||||
<script>
|
||||
console.log(2)
|
||||
window.zzSessionStorage = {
|
||||
setItem: (item, value) => {
|
||||
return sessionStorage.setItem(item, value)
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
<!--
|
||||
mitm.html is the lite "man in the middle"
|
||||
|
||||
This is only meant to signal the opener's messageChannel to
|
||||
the service worker - when that is done this mitm can be closed
|
||||
but it's better to keep it alive since this also stops the sw
|
||||
from restarting
|
||||
|
||||
The service worker is capable of intercepting all request and fork their
|
||||
own "fake" response - wish we are going to craft
|
||||
when the worker then receives a stream then the worker will tell the opener
|
||||
to open up a link that will start the download
|
||||
-->
|
||||
<script>
|
||||
// This will prevent the sw from restarting
|
||||
let keepAlive = () => {
|
||||
keepAlive = () => {}
|
||||
var ping = location.href.substr(0, location.href.lastIndexOf('/')) + '/ping'
|
||||
var interval = setInterval(() => {
|
||||
if (sw) {
|
||||
sw.postMessage('ping')
|
||||
} else {
|
||||
fetch(ping).then(res => res.text(!res.ok && clearInterval(interval)))
|
||||
}
|
||||
}, 10000)
|
||||
}
|
||||
|
||||
// message event is the first thing we need to setup a listner for
|
||||
// don't want the opener to do a random timeout - instead they can listen for
|
||||
// the ready event
|
||||
// but since we need to wait for the Service Worker registration, we store the
|
||||
// message for later
|
||||
let messages = []
|
||||
window.onmessage = evt => messages.push(evt)
|
||||
|
||||
let sw = null
|
||||
let scope = ''
|
||||
|
||||
function registerWorker() {
|
||||
return navigator.serviceWorker.getRegistration('./').then(swReg => {
|
||||
return swReg || navigator.serviceWorker.register('sw.js', { scope: './' })
|
||||
}).then(swReg => {
|
||||
const swRegTmp = swReg.installing || swReg.waiting
|
||||
|
||||
scope = swReg.scope
|
||||
|
||||
return (sw = swReg.active) || new Promise(resolve => {
|
||||
swRegTmp.addEventListener('statechange', fn = () => {
|
||||
if (swRegTmp.state === 'activated') {
|
||||
swRegTmp.removeEventListener('statechange', fn)
|
||||
sw = swReg.active
|
||||
resolve()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// Now that we have the Service Worker registered we can process messages
|
||||
function onMessage (event) {
|
||||
let { data, ports, origin } = event
|
||||
|
||||
// It's important to have a messageChannel, don't want to interfere
|
||||
// with other simultaneous downloads
|
||||
if (!ports || !ports.length) {
|
||||
throw new TypeError("[StreamSaver] You didn't send a messageChannel")
|
||||
}
|
||||
|
||||
if (typeof data !== 'object') {
|
||||
throw new TypeError("[StreamSaver] You didn't send a object")
|
||||
}
|
||||
|
||||
// the default public service worker for StreamSaver is shared among others.
|
||||
// so all download links needs to be prefixed to avoid any other conflict
|
||||
data.origin = origin
|
||||
|
||||
// if we ever (in some feature versoin of streamsaver) would like to
|
||||
// redirect back to the page of who initiated a http request
|
||||
data.referrer = data.referrer || document.referrer || origin
|
||||
|
||||
// pass along version for possible backwards compatibility in sw.js
|
||||
data.streamSaverVersion = new URLSearchParams(location.search).get('version')
|
||||
|
||||
if (data.streamSaverVersion === '1.2.0') {
|
||||
console.warn('[StreamSaver] please update streamsaver')
|
||||
}
|
||||
|
||||
/** @since v2.0.0 */
|
||||
if (!data.headers) {
|
||||
console.warn("[StreamSaver] pass `data.headers` that you would like to pass along to the service worker\nit should be a 2D array or a key/val object that fetch's Headers api accepts")
|
||||
} else {
|
||||
// test if it's correct
|
||||
// should thorw a typeError if not
|
||||
new Headers(data.headers)
|
||||
}
|
||||
|
||||
/** @since v2.0.0 */
|
||||
if (typeof data.filename === 'string') {
|
||||
console.warn("[StreamSaver] You shouldn't send `data.filename` anymore. It should be included in the Content-Disposition header option")
|
||||
// Do what File constructor do with fileNames
|
||||
data.filename = data.filename.replace(/\//g, ':')
|
||||
}
|
||||
|
||||
/** @since v2.0.0 */
|
||||
if (data.size) {
|
||||
console.warn("[StreamSaver] You shouldn't send `data.size` anymore. It should be included in the content-length header option")
|
||||
}
|
||||
|
||||
/** @since v2.0.0 */
|
||||
if (data.readableStream) {
|
||||
console.warn("[StreamSaver] You should send the readableStream in the messageChannel, not throught mitm")
|
||||
}
|
||||
|
||||
/** @since v2.0.0 */
|
||||
if (!data.pathname) {
|
||||
console.warn("[StreamSaver] Please send `data.pathname` (eg: /pictures/summer.jpg)")
|
||||
data.pathname = Math.random().toString().slice(-6) + '/' + data.filename
|
||||
}
|
||||
|
||||
// remove all leading slashes
|
||||
data.pathname = data.pathname.replace(/^\/+/g, '')
|
||||
|
||||
// remove protocol
|
||||
let org = origin.replace(/(^\w+:|^)\/\//, '')
|
||||
|
||||
// set the absolute pathname to the download url.
|
||||
data.url = new URL(`${scope + org}/${data.pathname}`).toString()
|
||||
|
||||
if (!data.url.startsWith(`${scope + org}/`)) {
|
||||
throw new TypeError('[StreamSaver] bad `data.pathname`')
|
||||
}
|
||||
|
||||
// This sends the message data as well as transferring
|
||||
// messageChannel.port2 to the service worker. The service worker can
|
||||
// then use the transferred port to reply via postMessage(), which
|
||||
// will in turn trigger the onmessage handler on messageChannel.port1.
|
||||
|
||||
const transferable = data.readableStream
|
||||
? [ ports[0], data.readableStream ]
|
||||
: [ ports[0] ]
|
||||
|
||||
if (!(data.readableStream || data.transferringReadable)) {
|
||||
keepAlive()
|
||||
}
|
||||
|
||||
return sw.postMessage(data, transferable)
|
||||
}
|
||||
|
||||
if (window.opener) {
|
||||
// The opener can't listen to onload event, so we need to help em out!
|
||||
// (telling them that we are ready to accept postMessage's)
|
||||
window.opener.postMessage('StreamSaver::loadedPopup', '*')
|
||||
}
|
||||
|
||||
if (navigator.serviceWorker) {
|
||||
registerWorker().then(() => {
|
||||
window.onmessage = onMessage
|
||||
messages.forEach(window.onmessage)
|
||||
})
|
||||
}
|
||||
|
||||
// FF v102 just started to supports transferable streams, but still needs to ping sw.js
|
||||
// even tough the service worker dose not have to do any kind of work and listen to any
|
||||
// messages... #305
|
||||
keepAlive()
|
||||
|
||||
</script>
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
/* global self ReadableStream Response */
|
||||
|
||||
self.addEventListener('install', () => {
|
||||
self.skipWaiting()
|
||||
})
|
||||
|
||||
self.addEventListener('activate', event => {
|
||||
event.waitUntil(self.clients.claim())
|
||||
})
|
||||
|
||||
const map = new Map()
|
||||
|
||||
// This should be called once per download
|
||||
// Each event has a dataChannel that the data will be piped through
|
||||
self.onmessage = event => {
|
||||
// We send a heartbeat every x second to keep the
|
||||
// service worker alive if a transferable stream is not sent
|
||||
if (event.data === 'ping') {
|
||||
return
|
||||
}
|
||||
|
||||
const data = event.data
|
||||
const downloadUrl = data.url || self.registration.scope + Math.random() + '/' + (typeof data === 'string' ? data : data.filename)
|
||||
const port = event.ports[0]
|
||||
const metadata = new Array(3) // [stream, data, port]
|
||||
|
||||
metadata[1] = data
|
||||
metadata[2] = port
|
||||
|
||||
// Note to self:
|
||||
// old streamsaver v1.2.0 might still use `readableStream`...
|
||||
// but v2.0.0 will always transfer the stream through MessageChannel #94
|
||||
if (event.data.readableStream) {
|
||||
metadata[0] = event.data.readableStream
|
||||
} else if (event.data.transferringReadable) {
|
||||
port.onmessage = evt => {
|
||||
port.onmessage = null
|
||||
metadata[0] = evt.data.readableStream
|
||||
}
|
||||
} else {
|
||||
metadata[0] = createStream(port)
|
||||
}
|
||||
|
||||
map.set(downloadUrl, metadata)
|
||||
port.postMessage({ download: downloadUrl })
|
||||
}
|
||||
|
||||
function createStream (port) {
|
||||
// ReadableStream is only supported by chrome 52
|
||||
return new ReadableStream({
|
||||
start (controller) {
|
||||
// When we receive data on the messageChannel, we write
|
||||
port.onmessage = ({ data }) => {
|
||||
if (data === 'end') {
|
||||
return controller.close()
|
||||
}
|
||||
|
||||
if (data === 'abort') {
|
||||
controller.error('Aborted the download')
|
||||
return
|
||||
}
|
||||
|
||||
controller.enqueue(data)
|
||||
}
|
||||
},
|
||||
cancel (reason) {
|
||||
console.log('user aborted', reason)
|
||||
port.postMessage({ abort: true })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
self.onfetch = event => {
|
||||
const url = event.request.url
|
||||
|
||||
// this only works for Firefox
|
||||
if (url.endsWith('/ping')) {
|
||||
return event.respondWith(new Response('pong'))
|
||||
}
|
||||
|
||||
const hijacke = map.get(url)
|
||||
|
||||
if (!hijacke) return null
|
||||
|
||||
const [ stream, data, port ] = hijacke
|
||||
|
||||
map.delete(url)
|
||||
|
||||
// Not comfortable letting any user control all headers
|
||||
// so we only copy over the length & disposition
|
||||
const responseHeaders = new Headers({
|
||||
'Content-Type': 'application/octet-stream; charset=utf-8',
|
||||
|
||||
// To be on the safe side, The link can be opened in a iframe.
|
||||
// but octet-stream should stop it.
|
||||
'Content-Security-Policy': "default-src 'none'",
|
||||
'X-Content-Security-Policy': "default-src 'none'",
|
||||
'X-WebKit-CSP': "default-src 'none'",
|
||||
'X-XSS-Protection': '1; mode=block',
|
||||
'Cross-Origin-Embedder-Policy': 'require-corp'
|
||||
})
|
||||
|
||||
let headers = new Headers(data.headers || {})
|
||||
|
||||
if (headers.has('Content-Length')) {
|
||||
responseHeaders.set('Content-Length', headers.get('Content-Length'))
|
||||
}
|
||||
|
||||
if (headers.has('Content-Disposition')) {
|
||||
responseHeaders.set('Content-Disposition', headers.get('Content-Disposition'))
|
||||
}
|
||||
|
||||
// data, data.filename and size should not be used anymore
|
||||
if (data.size) {
|
||||
console.warn('Depricated')
|
||||
responseHeaders.set('Content-Length', data.size)
|
||||
}
|
||||
|
||||
let fileName = typeof data === 'string' ? data : data.filename
|
||||
if (fileName) {
|
||||
console.warn('Depricated')
|
||||
// Make filename RFC5987 compatible
|
||||
fileName = encodeURIComponent(fileName).replace(/['()]/g, escape).replace(/\*/g, '%2A')
|
||||
responseHeaders.set('Content-Disposition', "attachment; filename*=UTF-8''" + fileName)
|
||||
}
|
||||
|
||||
event.respondWith(new Response(stream, { headers: responseHeaders }))
|
||||
|
||||
port.postMessage({ debug: 'Download started' })
|
||||
}
|
||||
+200
-96
@@ -23,12 +23,38 @@
|
||||
>
|
||||
i18n
|
||||
</div>
|
||||
<el-drawer title="国际化" :visible.sync="drawer" direction="rtl" size="80%">
|
||||
<div style="width: 320px">
|
||||
<el-form label-width="100px" @submit.native.prevent size="small">
|
||||
<el-form-item label="关键字">
|
||||
<el-drawer
|
||||
:title="$t('il8n:title')"
|
||||
:visible.sync="drawer"
|
||||
direction="rtl"
|
||||
size="80%"
|
||||
>
|
||||
<div style="width: 620px">
|
||||
<el-form
|
||||
label-width="100px"
|
||||
@submit.native.prevent
|
||||
size="small"
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
>
|
||||
<el-form-item :label="$t('il8n:search:keyword')">
|
||||
<el-input v-model="key" @input="keyChange" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('il8n:search:state')">
|
||||
<el-select
|
||||
v-model="State"
|
||||
clearable
|
||||
filterable
|
||||
@change="handleStateChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.InternationalizationKeyState"
|
||||
:key="'InternationalizationKeyState' + item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
@@ -37,7 +63,12 @@
|
||||
height="100"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column prop="Code" label="标签" width="300">
|
||||
<el-table-column
|
||||
prop="Code"
|
||||
:label="$t('il8n:table:label')"
|
||||
width="300"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column-->
|
||||
<!-- prop="Description"-->
|
||||
@@ -48,38 +79,59 @@
|
||||
<!-- {{scope.row.Description}}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="Value" label="英文">
|
||||
<el-table-column prop="Value" :label="$t('il8n:table:en')">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.Value"
|
||||
@input="
|
||||
(e) => {
|
||||
$set(scope.row, 'Value', e);
|
||||
$set(scope.row, 'Value', e)
|
||||
}
|
||||
"
|
||||
size="mini"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="ValueCN" label="中文">
|
||||
<el-table-column prop="ValueCN" :label="$t('il8n:table:cn')">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.ValueCN"
|
||||
@input="
|
||||
(e) => {
|
||||
$set(scope.row, 'ValueCN', e);
|
||||
$set(scope.row, 'ValueCN', e)
|
||||
}
|
||||
"
|
||||
size="mini"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="ValueCN" :label="$t('il8n:table:state')">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.State"
|
||||
clearable
|
||||
filterable
|
||||
size="mini"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of $d.InternationalizationKeyState"
|
||||
:key="'InternationalizationKeyState' + item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Version" :label="$t('il8n:table:Version')">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: right; padding-top: 10px; padding-right: 10px">
|
||||
<el-button size="mini" @click="drawer = false">取消 </el-button>
|
||||
<el-button size="mini" type="primary" @click="handleSave"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button size="mini" @click="drawer = false"
|
||||
>{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
<el-button size="mini" type="primary" @click="handleSave">{{
|
||||
$t('common:button:save')
|
||||
}}</el-button>
|
||||
</div>
|
||||
</el-drawer>
|
||||
<feedBack v-if="$route.matched.length > 0" />
|
||||
@@ -90,13 +142,13 @@
|
||||
import {
|
||||
batchAddOrUpdateFrontInternationalization,
|
||||
getFrontInternationalizationList,
|
||||
} from "@/api/dictionary/dictionary";
|
||||
import { getTrialExtralConfig } from "@/api/trials";
|
||||
import feedBack from "@/views/trials/trials-layout/components/feedBack";
|
||||
import Vue from "vue";
|
||||
import i18n from "./lang";
|
||||
} 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 {
|
||||
@@ -105,38 +157,51 @@ export default {
|
||||
show: false,
|
||||
key: null,
|
||||
arr: [],
|
||||
};
|
||||
il8nExternal: false,
|
||||
State: null,
|
||||
}
|
||||
},
|
||||
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 &&
|
||||
this.$store.state.trials.whiteList.indexOf(this.$route.path) === -1
|
||||
) {
|
||||
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'
|
||||
Vue.prototype.$openI18n = this.openI18n
|
||||
},
|
||||
// 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: {
|
||||
handleStateChange() {
|
||||
this.tableData.forEach((item) => {
|
||||
item.State = this.State
|
||||
})
|
||||
},
|
||||
changeValue(target, attr, e) {
|
||||
this.$set(target, attr, e);
|
||||
this.$set(target, attr, e)
|
||||
},
|
||||
keyChange(v) {
|
||||
if (this.key) {
|
||||
@@ -144,69 +209,108 @@ export default {
|
||||
[],
|
||||
this.arr.filter(
|
||||
(v) =>
|
||||
~v.Code.indexOf(this.key) ||
|
||||
~v.Value.indexOf(this.key) ||
|
||||
~v.ValueCN.indexOf(this.key)
|
||||
~v.Code.toLowerCase().indexOf(this.key.toLowerCase()) ||
|
||||
~v.Value.toLowerCase().indexOf(this.key.toLowerCase()) ||
|
||||
~v.ValueCN.toLowerCase().indexOf(this.key.toLowerCase())
|
||||
)
|
||||
);
|
||||
)
|
||||
} else {
|
||||
this.tableData = Object.assign([], this.arr);
|
||||
this.tableData = Object.assign([], this.arr)
|
||||
}
|
||||
},
|
||||
handleSave() {
|
||||
this.$confirm("确定修改当前页面国际化内容?").then(() => {
|
||||
batchAddOrUpdateFrontInternationalization(this.tableData).then(
|
||||
async (res) => {
|
||||
var zhMessages = {},
|
||||
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("国际化修改成功");
|
||||
}
|
||||
);
|
||||
});
|
||||
this.$confirm('确定修改当前页面国际化内容?')
|
||||
.then(() => {
|
||||
batchAddOrUpdateFrontInternationalization(this.tableData).then(
|
||||
async (res) => {
|
||||
var zhMessages = {},
|
||||
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('国际化修改成功')
|
||||
if (this.il8nExternal) {
|
||||
this.$EventBus.$emit('il8nUpdate')
|
||||
}
|
||||
}
|
||||
)
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
openI18n() {
|
||||
this.tableData = [];
|
||||
this.key = null;
|
||||
this.drawer = true;
|
||||
let arr = [];
|
||||
let tableData = this.$tl.map((v) => {
|
||||
let a = { ...v };
|
||||
// if (!a.Description) {
|
||||
// a.Description = this.$route.path
|
||||
// }
|
||||
return a;
|
||||
});
|
||||
openI18n(ARRAY) {
|
||||
this.tableData = []
|
||||
this.il8nExternal = false
|
||||
this.State = null
|
||||
this.key = null
|
||||
this.drawer = true
|
||||
let arr = []
|
||||
let tableData = []
|
||||
if (ARRAY && Array.isArray(ARRAY)) {
|
||||
this.il8nExternal = true
|
||||
let data = ARRAY.map((v) => {
|
||||
let a = { ...v }
|
||||
|
||||
return a
|
||||
})
|
||||
tableData = data.map((item) => {
|
||||
return {
|
||||
Code: item.Code,
|
||||
Description: item.Description,
|
||||
FrontType: item.FrontType,
|
||||
Module: item.Module,
|
||||
Value: item.Value,
|
||||
ValueCN: item.ValueCN,
|
||||
State: item.State,
|
||||
Version: item.Version,
|
||||
InternationalizationType: item.InternationalizationType,
|
||||
}
|
||||
})
|
||||
this.tableData = Object.assign([], tableData)
|
||||
this.arr = Object.assign([], tableData)
|
||||
return false
|
||||
} else {
|
||||
tableData = this.$tl.map((v) => {
|
||||
let a = { ...v }
|
||||
// if (!a.Description) {
|
||||
// a.Description = this.$route.path
|
||||
// }
|
||||
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,
|
||||
});
|
||||
State: 0,
|
||||
Version: this.$version.Version,
|
||||
InternationalizationType: 0,
|
||||
})
|
||||
}
|
||||
});
|
||||
this.arr = arr;
|
||||
})
|
||||
this.arr = arr
|
||||
if (this.key) {
|
||||
this.tableData = Object.assign(
|
||||
[],
|
||||
@@ -216,15 +320,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">
|
||||
@@ -249,7 +353,7 @@ input::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none !important;
|
||||
}
|
||||
|
||||
input[type="number"] {
|
||||
input[type='number'] {
|
||||
-moz-appearance: textfield !important;
|
||||
}
|
||||
|
||||
@@ -275,7 +379,7 @@ 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 {
|
||||
|
||||
+53
-4
@@ -44,11 +44,19 @@ export function updateUser(param) {
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function getUser(userId) {
|
||||
export function updateUserBasicInfo(param) {
|
||||
return request({
|
||||
url: `/user/getUser/${userId}`,
|
||||
method: 'get'
|
||||
url: `/user/updateUserBasicInfo`,
|
||||
method: 'put',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function getUser(params) {
|
||||
return request({
|
||||
url: `/user/getUser`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
@@ -293,3 +301,44 @@ export function batchUpdateInternationalInfo(data) {
|
||||
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
|
||||
})
|
||||
}
|
||||
|
||||
// 管理端修改用户角色
|
||||
export function updateUserRoleInfo(data) {
|
||||
return request({
|
||||
url: `/User/updateUserRoleInfo`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 管理端新增用户发送邮件
|
||||
export function addNewUserSendEmail(data) {
|
||||
return request({
|
||||
url: `/User/addNewUserSendEmail`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1045,4 +1045,28 @@ export function getExploreRecommentInfo(params) {
|
||||
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
|
||||
})
|
||||
}
|
||||
@@ -187,3 +187,73 @@ export function qCVisitList_Export(data) {
|
||||
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
|
||||
})
|
||||
}
|
||||
|
||||
+59
-3
@@ -8,11 +8,11 @@ export function requestPackageAndAnonymizImage(params) {
|
||||
})
|
||||
}
|
||||
// 获取影像上传列表
|
||||
export function getSubjectImageUploadList(params) {
|
||||
export function getSubjectImageUploadList(data) {
|
||||
return request({
|
||||
url: '/DownloadAndUpload/getSubjectImageUploadList',
|
||||
method: 'get',
|
||||
params
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 预上传
|
||||
@@ -47,4 +47,60 @@ export function getCRCUploadedStudyInfo(data) {
|
||||
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
|
||||
})
|
||||
}
|
||||
+94
-3
@@ -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'
|
||||
})
|
||||
}
|
||||
@@ -194,3 +196,92 @@ export function resetReadingTask(param) {
|
||||
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
|
||||
})
|
||||
}
|
||||
|
||||
export function saveTableQuestionMark(param, type) {
|
||||
return request({
|
||||
url: `/saveTableQuestionMark/${type}`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteTableQuestionMark(param, type) {
|
||||
return request({
|
||||
url: `/deleteTableQuestionMark/${type}`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function submitTaskRowInfo(param, type) {
|
||||
return request({
|
||||
url: `/SubmitTaskRowInfo/${type}`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
export function deleteSingleTableQuestionMark(param, type) {
|
||||
return request({
|
||||
url: `/DeleteSingleTableQuestionMark/${type}`,
|
||||
method: 'post',
|
||||
data: param
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-1
@@ -12,7 +12,8 @@ export function verifySendCode(param) {
|
||||
return request({
|
||||
url: '/TrialSiteSurvey/verifySendCode',
|
||||
method: 'post',
|
||||
data: param
|
||||
data: param,
|
||||
clearToken: true
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
+83
-6
@@ -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
|
||||
})
|
||||
}
|
||||
+65
-5
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1080,6 +1081,13 @@ export function setSeriesStatus(trialId, subjectVisitId, studyId, seriesId, stat
|
||||
})
|
||||
}
|
||||
|
||||
export function setInstanceStatus(trialId, subjectVisitId, seriesId, instanceId, state) {
|
||||
return request({
|
||||
url: `/QCOperation/setInstanceState/${trialId}/${subjectVisitId}/${seriesId}/${instanceId}/${state}`,
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
export function getVisitQCStudyAndSeriesList(subjectVisitId) {
|
||||
return request({
|
||||
url: `/QCList/getVisitQCStudyAndSeriesList/${subjectVisitId}`,
|
||||
@@ -1364,9 +1372,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'
|
||||
})
|
||||
}
|
||||
@@ -3905,4 +3913,56 @@ export function setTaskValid(data) {
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 一致性分析临床数据设置任务为有效
|
||||
export function getVisitClinicalDataName(data) {
|
||||
return request({
|
||||
url: `/ReadingClinicalData/getVisitClinicalDataName`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 修改外部人员权限配置
|
||||
export function configTrialSPMInfo(data) {
|
||||
return request({
|
||||
url: `/TrialConfig/configTrialSPMInfo`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 项目添加角色修改权限
|
||||
export function updateTrialUserRole(data) {
|
||||
return request({
|
||||
url: `/TrialMaintenance/updateTrialUserRole`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 获取报表配置
|
||||
export function getTrialQuestionExportResult(data) {
|
||||
return request({
|
||||
url: `/ReadingQuestion/getTrialQuestionExportResult`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 修改报表配置
|
||||
export function setTrialQuestionExportResult(data) {
|
||||
return request({
|
||||
url: `/ReadingQuestion/SetTrialQuestionExportResult`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
// 项目加入人员发送邮件
|
||||
export function trialUserSendJoinEmail(data) {
|
||||
return request({
|
||||
url: `/TrialMaintenance/trialUserSendJoinEmail`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
+27
-3
@@ -4,7 +4,8 @@ export function login(data) {
|
||||
return request({
|
||||
url: '/user/login',
|
||||
method: 'post',
|
||||
data
|
||||
data,
|
||||
ENCRYPT: true
|
||||
})
|
||||
}
|
||||
export function loginOut(params) {
|
||||
@@ -178,10 +179,33 @@ export function verifyMFACode(params) {
|
||||
}
|
||||
|
||||
// 发送MFA邮件
|
||||
export function sendMFAEmail(params) {
|
||||
export function sendMFAEmail(data) {
|
||||
return request({
|
||||
url: `/User/sendMFAEmail`,
|
||||
method: 'post',
|
||||
params
|
||||
data
|
||||
})
|
||||
}
|
||||
// 获取公钥
|
||||
export function getPublicKey() {
|
||||
return request({
|
||||
url: `/user/getPublicKey`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 登陆获取角色
|
||||
export function getUserLoginRoleList(data) {
|
||||
return request({
|
||||
url: `/User/getUserLoginRoleList`,
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
// 登陆角色id获取token
|
||||
export function loginSelectUserRole(params) {
|
||||
return request({
|
||||
url: `/User/loginSelectUserRole`,
|
||||
method: 'get',
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 61 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 7.3 KiB |
@@ -13,6 +13,7 @@
|
||||
v-model="searchData[item.prop]"
|
||||
:placeholder="item.placeholder"
|
||||
size="mini"
|
||||
clearable
|
||||
:style="{ width: item.width }"
|
||||
:readonly="item.readonly"
|
||||
/>
|
||||
@@ -22,6 +23,7 @@
|
||||
v-model="searchData[item.prop]"
|
||||
:placeholder="item.placeholder"
|
||||
size="mini"
|
||||
clearable
|
||||
:style="{ width: item.width }"
|
||||
@change="item.change && item.change(that, searchData[item.prop])"
|
||||
>
|
||||
@@ -37,6 +39,7 @@
|
||||
v-model="searchData[item.prop]"
|
||||
:placeholder="item.placeholder"
|
||||
size="mini"
|
||||
clearable
|
||||
:style="{ width: item.width }"
|
||||
@change="item.change && item.change(that, searchData[item.prop])"
|
||||
>
|
||||
@@ -96,6 +99,7 @@
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
:picker-options="item.pickerOption"
|
||||
clearable
|
||||
/>
|
||||
<!-- 时间 -->
|
||||
<el-time-select
|
||||
@@ -104,6 +108,7 @@
|
||||
:placeholder="item.placeholder"
|
||||
type=""
|
||||
:style="{ width: item.width }"
|
||||
clearable
|
||||
/>
|
||||
<!-- 日期时间 -->
|
||||
<el-date-picker
|
||||
@@ -114,12 +119,14 @@
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
:disabled="item.disable && item.disable(searchData[item.prop])"
|
||||
:style="{ width: item.width }"
|
||||
clearable
|
||||
/>
|
||||
<!-- 日期时间段 -->
|
||||
<el-date-picker
|
||||
v-if="item.type === 'Daterange'"
|
||||
v-model="searchData[item.prop]"
|
||||
type="datetimerange"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
:range-separator="$t('baseForm:daterange:rangeSeparator')"
|
||||
:start-placeholder="$t('baseForm:daterange:startPlaceholder')"
|
||||
:end-placeholder="$t('baseForm:daterange:startendPlaceholder')"
|
||||
|
||||
@@ -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,45 @@
|
||||
>
|
||||
<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"
|
||||
:fixed="column.fixed"
|
||||
>
|
||||
<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 +61,17 @@
|
||||
|
||||
</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'"
|
||||
v-if="
|
||||
(operate.show && scope.row[operate.show]) ||
|
||||
!operate.show
|
||||
"
|
||||
style="margin-right: 5px"
|
||||
@click="handleClick(operate, scope.row)"
|
||||
>{{ operate.name }}</el-button
|
||||
>
|
||||
</span>
|
||||
</span>
|
||||
<span v-else>
|
||||
@@ -52,7 +92,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 +141,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 +201,12 @@ export default {
|
||||
},
|
||||
pagination() {
|
||||
this.$emit('getList')
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page{
|
||||
.page {
|
||||
padding-top: 3px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
custom-class="base-dialog-wrapper"
|
||||
append-to-body
|
||||
>
|
||||
<DicomTags :image-data="imageData" @close="dcmTag.visible = false" />
|
||||
<DicomTags :image-id="stack.imageIds[stack.currentImageIdIndex]" @close="dcmTag.visible = false" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -176,8 +176,7 @@ export default {
|
||||
markers: { top: '', right: '', bottom: '', left: '' },
|
||||
orientationMarkers: [],
|
||||
originalMarkers: [],
|
||||
dcmTag: { visible: false, title: 'DICOM Tags' },
|
||||
imageData: null
|
||||
dcmTag: { visible: false, title: this.$t('trials:dicom-tag:title') }
|
||||
}
|
||||
},
|
||||
|
||||
@@ -263,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
|
||||
@@ -323,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)
|
||||
@@ -681,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
|
||||
@@ -761,11 +766,7 @@ export default {
|
||||
cornerstoneTools.SaveAs(this.canvas, `${uid}.png`)
|
||||
},
|
||||
showTags() {
|
||||
var image = cornerstone.getImage(this.canvas)
|
||||
// var dataSet = dicomParser.parseDicom(image.data.byteArray)
|
||||
// console.log('showTags', dataSet)
|
||||
this.dcmTag.visible = true
|
||||
this.imageData = image.data
|
||||
},
|
||||
fitToWindow() {
|
||||
if (this.stack.seriesNumber) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-input
|
||||
v-model="search"
|
||||
size="mini"
|
||||
placeholder="输入关键字搜索"
|
||||
:placeholder="$t('trials:dicom-tag:keywords')"
|
||||
style="width:200px"
|
||||
/>
|
||||
|
||||
@@ -54,15 +54,14 @@
|
||||
</template>
|
||||
<script>
|
||||
import TAG_DICT from './dataDictionary'
|
||||
import * as cornerstone from 'cornerstone-core'
|
||||
import dicomParser from 'dicom-parser'
|
||||
export default {
|
||||
name: 'DicomTags',
|
||||
props: {
|
||||
imageData: {
|
||||
type: Object,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
imageId: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -72,8 +71,9 @@ export default {
|
||||
search: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
var dataSet = dicomParser.parseDicom(this.imageData.byteArray)
|
||||
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
|
||||
@@ -84,24 +84,45 @@ export default {
|
||||
if (!this.search) {
|
||||
return list
|
||||
} else {
|
||||
return list.filter(data => data.tagCode.toLowerCase().includes(this.search.toLowerCase()) || data.tagName.toLowerCase().includes(this.search.toLowerCase()) || (data.value && data.value.toLowerCase().includes(this.search.toLowerCase())))
|
||||
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 elementObject = {}
|
||||
const element = dataSet.elements[propertyName]
|
||||
const tag = this.getTag(element.tag)
|
||||
elementObject.id = `${this.idx++}${new Date().getTime()}`
|
||||
elementObject.tagCode = element.tag
|
||||
elementObject.tagName = tag.name
|
||||
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 = ''
|
||||
|
||||
if (element.vr) {
|
||||
elementObject.vr = element.vr
|
||||
}
|
||||
elementObject.child = []
|
||||
|
||||
if (element.items) {
|
||||
@@ -116,7 +137,12 @@ export default {
|
||||
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') {
|
||||
@@ -155,9 +181,10 @@ export default {
|
||||
elementObject.value = str
|
||||
}
|
||||
} else {
|
||||
if (element.length !== 2 && element.length !== 4) {
|
||||
// elementObject.value = 'binary data'
|
||||
}
|
||||
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)
|
||||
@@ -224,7 +251,7 @@ export default {
|
||||
exception: err,
|
||||
output: output
|
||||
}
|
||||
throw ex
|
||||
console.log(ex)
|
||||
}
|
||||
},
|
||||
getTag(tag) {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
label-width="100px"
|
||||
>
|
||||
<!-- 邮箱 -->
|
||||
<p class="tip">
|
||||
<p class="tip_mfa">
|
||||
<i class="el-icon-warning" style="color: #409eff"></i>
|
||||
<span>{{ tip }}</span>
|
||||
</p>
|
||||
@@ -83,7 +83,7 @@ export default {
|
||||
second: 60,
|
||||
form: {
|
||||
Code: null,
|
||||
UserId: null,
|
||||
IdentityUserId: null,
|
||||
EMail: null,
|
||||
username: null,
|
||||
},
|
||||
@@ -115,7 +115,7 @@ export default {
|
||||
methods: {
|
||||
open(data) {
|
||||
let { UserId, status, username, EMail } = data;
|
||||
this.form.UserId = UserId;
|
||||
this.form.IdentityUserId = UserId;
|
||||
this.status = status ? status : "login";
|
||||
this.form.username = username;
|
||||
this.form.EMail = EMail;
|
||||
@@ -134,10 +134,10 @@ export default {
|
||||
let res = await verifyMFACode(this.form);
|
||||
this.loading = false;
|
||||
if (res.IsSuccess) {
|
||||
if (this.status === "login") {
|
||||
this.$message.success(this.$t("mfa:message:verifySuccess"));
|
||||
}
|
||||
this.$emit("success", this.form.UserId);
|
||||
// if (this.status === "login") {
|
||||
// this.$message.success(this.$t("mfa:message:verifySuccess"));
|
||||
// }
|
||||
this.$emit("success", this.form.IdentityUserId);
|
||||
this.cancel();
|
||||
}
|
||||
} catch (err) {
|
||||
@@ -154,7 +154,7 @@ export default {
|
||||
this.timer = null;
|
||||
}
|
||||
let data = {
|
||||
UserId: this.form.UserId,
|
||||
IdentityUserId: this.form.IdentityUserId,
|
||||
};
|
||||
if (this.status === "lock") {
|
||||
data.MfaType = 1;
|
||||
@@ -189,7 +189,7 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.tip {
|
||||
.tip_mfa {
|
||||
width: 86%;
|
||||
margin: auto;
|
||||
margin-bottom: 20px;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="trialsTab">
|
||||
<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-tabs v-if="!item.tabHiddn" v-model="trialsTabChild" @tab-click="clickTab" style="background-color: #f5f7fa;">
|
||||
<template v-for="item1 of item.children">
|
||||
<el-tab-pane
|
||||
v-if="TrialConfig && isShow(item1.path)"
|
||||
@@ -22,11 +22,14 @@
|
||||
<i class="iconfont" style="font-size: 30px;color:#ccc"></i>
|
||||
</div>
|
||||
<!-- 返回项目列表 -->
|
||||
<div class="my_icon_box" :title="$t('trials:trials:title:backTrialList')" @click="goBack">
|
||||
<el-button type="primary" size="small" @click="goBack">
|
||||
<i class="iconfont"></i>
|
||||
<!-- 返回 -->
|
||||
<span>{{ $t('trials:trials:title:back') }}</span>
|
||||
</div>
|
||||
</el-button>
|
||||
<!-- <div class="my_icon_box" :title="$t('trials:trials:title:backTrialList')" @click="goBack">
|
||||
<i class="iconfont"></i>
|
||||
<span>{{ $t('trials:trials:title:back') }}</span>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -146,6 +149,7 @@ export default {
|
||||
return isShow
|
||||
},
|
||||
goBack() {
|
||||
zzSessionStorage.removeItem('lastWorkbench')
|
||||
this.$router.push({ path: '/trials/trials-list' })
|
||||
},
|
||||
selectTrials(v) {
|
||||
@@ -221,6 +225,9 @@ export default {
|
||||
.el-tabs__header{
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
.el-tabs__item.is-active{
|
||||
font-weight: bold;
|
||||
}
|
||||
position: relative;
|
||||
.el-input--medium .el-input__inner{
|
||||
height: 44px;line-height: 44px;width: 280px;
|
||||
|
||||
@@ -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">
|
||||
@@ -193,7 +193,7 @@
|
||||
</el-col>
|
||||
<!-- eslint-disable vue/no-use-v-if-with-v-for -->
|
||||
<!-- eslint-disable vue/valid-v-for -->
|
||||
<el-col v-for="(item) in question.Childrens" v-if="question.Childrens && question.Childrens.length>0 && question.ClinicalQuestionType !== 'table'" :span="['group', 'summary', 'table'].includes(item.ClinicalQuestionType) || item.Childrens.length > 0 ? 24 : 12">
|
||||
<el-col v-for="(item) in question.Childrens" :key="item.Id" v-if="question.Childrens && question.Childrens.length>0 && question.ClinicalQuestionType !== 'table'" :span="['group', 'summary', 'table'].includes(item.ClinicalQuestionType) || item.Childrens.length > 0 ? 24 : 12">
|
||||
<QuestionFormItem
|
||||
:key="item.Id"
|
||||
:question="item"
|
||||
@@ -593,7 +593,7 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.my_dialog{
|
||||
.criterion-form-item{
|
||||
>>>.el-form-item__content{
|
||||
::v-deep .el-form-item__content{
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
@@ -614,7 +614,7 @@ export default {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.disabled{
|
||||
>>>.el-upload--picture-card {
|
||||
::v-deep .el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.my_dialog{
|
||||
.criterion-form-item{
|
||||
>>>.el-form-item__content{
|
||||
::v-deep .el-form-item__content{
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
@@ -233,7 +233,7 @@ export default {
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
}
|
||||
>>>.el-form-item__content{
|
||||
::v-deep .el-form-item__content{
|
||||
width: 500px;
|
||||
}
|
||||
.el-input{
|
||||
@@ -243,7 +243,7 @@ export default {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.disabled{
|
||||
>>>.el-upload--picture-card {
|
||||
::v-deep .el-upload--picture-card {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
@@ -52,7 +52,7 @@
|
||||
class="el-icon-warning-outline"
|
||||
style="color: #f56c6c; font-size: 24px"
|
||||
></i>
|
||||
<span>{{ $t("feedBack:imgfail:tip") }}</span>
|
||||
<span>{{ $t('feedBack:imgfail:tip') }}</span>
|
||||
</p>
|
||||
<!-- 问题反馈 -->
|
||||
<el-form-item
|
||||
@@ -140,7 +140,7 @@
|
||||
<div slot="footer" v-if="type !== 'detail' || isImgfail">
|
||||
<!-- 取消 -->
|
||||
<el-button size="small" @click.stop="cancel">
|
||||
{{ $t("feedBack:button:cancel") }}
|
||||
{{ $t('feedBack:button:cancel') }}
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
<el-button
|
||||
@@ -149,21 +149,21 @@
|
||||
@click.stop="save"
|
||||
:loading="loading"
|
||||
>
|
||||
{{ $t("feedBack:button:save") }}
|
||||
{{ $t('feedBack:button:save') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import uploadImage from "./uploadImage.vue";
|
||||
import uploadImage from './uploadImage.vue'
|
||||
import {
|
||||
addOrUpdateUserFeedBack,
|
||||
getUserFeedBackInfo,
|
||||
batchUpdateFeedBackState,
|
||||
} from "@/api/trials.js";
|
||||
} from '@/api/trials.js'
|
||||
export default {
|
||||
name: "FB",
|
||||
name: 'FB',
|
||||
components: { uploadImage },
|
||||
data() {
|
||||
return {
|
||||
@@ -195,131 +195,131 @@ export default {
|
||||
QuestionType: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: "blur",
|
||||
message: this.$t('common:ruleMessage:specify'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
QuestionDescription: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("common:ruleMessage:specify"),
|
||||
trigger: "blur",
|
||||
message: this.$t('common:ruleMessage:specify'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value.length < 5) {
|
||||
callback(
|
||||
new Error(this.$t("feedBack:ruleMessage:lengthLimitMin5"))
|
||||
);
|
||||
new Error(this.$t('feedBack:ruleMessage:lengthLimitMin5'))
|
||||
)
|
||||
}
|
||||
callback();
|
||||
callback()
|
||||
},
|
||||
trigger: "blur",
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
},
|
||||
isUpload: false,
|
||||
};
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
level() {
|
||||
if (this.hasPermi(["role:dev", "role:admin"])) {
|
||||
return 9;
|
||||
if (this.hasPermi(['role:dev', 'role:admin'])) {
|
||||
return 9
|
||||
}
|
||||
if (this.hasPermi(["role:pm"])) {
|
||||
return 8;
|
||||
if (this.hasPermi(['role:pm', 'role:apm'])) {
|
||||
return 8
|
||||
}
|
||||
if (this.hasPermi(["role:ir", "role:crc"])) {
|
||||
return 7;
|
||||
if (this.hasPermi(['role:ir', 'role:crc'])) {
|
||||
return 7
|
||||
}
|
||||
return 0;
|
||||
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:ir'])) {
|
||||
return this.$d.FeedBackTypeToIR
|
||||
}
|
||||
if (this.hasPermi(["role:crc"])) {
|
||||
return this.$d.FeedBackTypeToCRC;
|
||||
if (this.hasPermi(['role:crc'])) {
|
||||
return this.$d.FeedBackTypeToCRC
|
||||
}
|
||||
return [];
|
||||
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;
|
||||
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.isImgfail = true
|
||||
}
|
||||
this.setTypeOption();
|
||||
this.setTypeOption()
|
||||
if (!Id) {
|
||||
this.title = this.setTitle();
|
||||
this.title = this.setTitle()
|
||||
}
|
||||
if (Id || visitTaskId) {
|
||||
this.getInfo(Id, visitTaskId);
|
||||
this.getInfo(Id, visitTaskId)
|
||||
}
|
||||
this.visible = true;
|
||||
this.visible = true
|
||||
},
|
||||
cancel() {
|
||||
this.visible = false;
|
||||
this.$emit("closed");
|
||||
this.visible = false
|
||||
this.$emit('closed')
|
||||
},
|
||||
async save() {
|
||||
try {
|
||||
let validate = await this.$refs.feedBackForm.validate();
|
||||
if (!validate) return;
|
||||
let validate = await this.$refs.feedBackForm.validate()
|
||||
if (!validate) return
|
||||
if (this.trialId) {
|
||||
this.form.TrialId = this.trialId;
|
||||
this.form.TrialId = this.trialId
|
||||
}
|
||||
if (this.visitTaskId) {
|
||||
this.form.VisitTaskId = this.visitTaskId;
|
||||
this.form.VisitTaskId = this.visitTaskId
|
||||
}
|
||||
if (this.SubjectVisitId) {
|
||||
this.form.SubjectVisitId = this.SubjectVisitId;
|
||||
this.form.SubjectVisitId = this.SubjectVisitId
|
||||
}
|
||||
if (this.Id) {
|
||||
this.form.Id = this.Id;
|
||||
this.form.Id = this.Id
|
||||
}
|
||||
this.loading = true;
|
||||
let res = await addOrUpdateUserFeedBack(this.form);
|
||||
this.loading = false;
|
||||
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();
|
||||
this.$emit('success')
|
||||
this.$message.success(this.$t('feedBack:save:success'))
|
||||
this.cancel()
|
||||
}
|
||||
} catch (err) {
|
||||
this.loading = false;
|
||||
console.log(err);
|
||||
this.loading = false
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 修改状态
|
||||
async changeState() {
|
||||
if (this.isImgfail) return;
|
||||
if (this.isImgfail) return
|
||||
try {
|
||||
let data = {
|
||||
IdList: [this.Id],
|
||||
State: this.form.State,
|
||||
};
|
||||
let res = await batchUpdateFeedBackState(data);
|
||||
}
|
||||
let res = await batchUpdateFeedBackState(data)
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success(this.$t("feedBack:changeState:success"));
|
||||
this.$emit("success");
|
||||
this.$message.success(this.$t('feedBack:changeState:success'))
|
||||
this.$emit('success')
|
||||
// this.cancel();
|
||||
this.getInfo(this.Id, this.visitTaskId);
|
||||
this.getInfo(this.Id, this.visitTaskId)
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
// 获取反馈详情
|
||||
@@ -328,56 +328,56 @@ export default {
|
||||
let data = {
|
||||
Id,
|
||||
visitTaskId,
|
||||
};
|
||||
let res = await getUserFeedBackInfo(data);
|
||||
}
|
||||
let res = await getUserFeedBackInfo(data)
|
||||
if (res.IsSuccess && res.Result) {
|
||||
this.form = res.Result;
|
||||
this.Id = res.Result.Id;
|
||||
this.form = res.Result
|
||||
this.form.ScreenshotList = this.form.ScreenshotList || []
|
||||
this.Id = res.Result.Id
|
||||
if (res.Result.State > 0) {
|
||||
this.isStateChange = false;
|
||||
this.isStateChange = false
|
||||
}
|
||||
if (res.Result.VisitTaskId) {
|
||||
this.visitTaskId = res.Result.VisitTaskId;
|
||||
this.visitTaskId = res.Result.VisitTaskId
|
||||
}
|
||||
if (res.Result.SubjectVisitId) {
|
||||
this.SubjectVisitId = res.Result.SubjectVisitId;
|
||||
this.SubjectVisitId = res.Result.SubjectVisitId
|
||||
}
|
||||
let code = this.$fd("UserType", res.Result.UserTypeEnum);
|
||||
this.title = this.setTitle(code, res.Result.FeedBackFullName);
|
||||
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);
|
||||
code = `${res.Result.SubjectCode}-${res.Result.SubjectVisitName}`
|
||||
this.title = this.setTitle(code, res.Result.FeedBackFullName)
|
||||
}
|
||||
this.$refs.uploadImage.initFileList(res.Result.ScreenshotList);
|
||||
this.$refs.uploadImage.initFileList(res.Result.ScreenshotList)
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(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);
|
||||
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) {
|
||||
console.log(code, name);
|
||||
if (this.hasPermi(["role:pm"]) && this.visitTaskId) {
|
||||
return `${this.$t("feedBack:form:title:pm2")}(${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: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']) && this.type === 'detail') {
|
||||
return `${this.$t('feedBack:form:detail:title')}`
|
||||
}
|
||||
if (this.hasPermi(["role:ir", "role:crc"])) {
|
||||
return `${this.$t("feedBack:form:title")}`;
|
||||
if (this.hasPermi(['role:ir', 'role:crc'])) {
|
||||
return `${this.$t('feedBack:form:title')}`
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.tip {
|
||||
|
||||
@@ -58,14 +58,14 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const type = "Statement of Work";
|
||||
const type = 'Statement of Work'
|
||||
export default {
|
||||
name: "UploadImage",
|
||||
name: 'UploadImage',
|
||||
props: {
|
||||
path: {
|
||||
required: true,
|
||||
default: () => {
|
||||
return [];
|
||||
return []
|
||||
},
|
||||
},
|
||||
disabled: {
|
||||
@@ -78,14 +78,14 @@ export default {
|
||||
},
|
||||
trialId: {
|
||||
type: String,
|
||||
default: "",
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileList: [],
|
||||
btnDisabled: false,
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
remove(file, fileList) {
|
||||
@@ -93,115 +93,113 @@ export default {
|
||||
},
|
||||
fileToBlob(file) {
|
||||
// 创建 FileReader 对象
|
||||
const reader = new 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]);
|
||||
reader.addEventListener('load', (e) => {
|
||||
let blob
|
||||
if (typeof e.target.result === 'object') {
|
||||
blob = new Blob([e.target.result])
|
||||
} else {
|
||||
blob = e.target.result;
|
||||
blob = e.target.result
|
||||
}
|
||||
resolve(blob);
|
||||
});
|
||||
resolve(blob)
|
||||
})
|
||||
// FileReader 以 ArrayBuffer 格式 读取 File 对象中数据
|
||||
reader.readAsArrayBuffer(file);
|
||||
});
|
||||
reader.readAsArrayBuffer(file)
|
||||
})
|
||||
},
|
||||
// 上传oss
|
||||
async uploadToOSS(name, file) {
|
||||
try {
|
||||
let defaultPath = "/System/FeedBack/";
|
||||
let defaultPath = '/System/FeedBack/'
|
||||
if (this.trialId) {
|
||||
defaultPath = `/${this.trialId}/FeedBack/`;
|
||||
defaultPath = `/${this.trialId}/FeedBack/`
|
||||
}
|
||||
let res = await this.OSSclient.put(`${defaultPath}${name}`, file);
|
||||
return res;
|
||||
let res = await this.OSSclient.put(`${defaultPath}${name}`, file)
|
||||
return res
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
return false;
|
||||
console.log(err)
|
||||
return false
|
||||
}
|
||||
},
|
||||
initFileList(list) {
|
||||
if (list && list.length > 0) {
|
||||
this.fileList = [];
|
||||
this.fileList = []
|
||||
list.forEach((item, index) => {
|
||||
let name = item.split("/");
|
||||
let name = item.split('/')
|
||||
this.fileList.push({
|
||||
name: name[name.length - 1],
|
||||
path: item,
|
||||
fullPath: this.OSSclientConfig.basePath + item,
|
||||
url: this.OSSclientConfig.basePath + item,
|
||||
uid: `${name[name.length - 1]}${index}`,
|
||||
});
|
||||
});
|
||||
console.log(this.fileList);
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
async uploadFile(param) {
|
||||
var fileName = param.file.name;
|
||||
this.$emit("update:isUpload", true);
|
||||
this.btnDisabled = true;
|
||||
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
|
||||
);
|
||||
})
|
||||
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);
|
||||
this.fileList.splice(index, 1)
|
||||
}
|
||||
return this.$emit("update:isUpload", false);
|
||||
return this.$emit('update:isUpload', false)
|
||||
}
|
||||
this.fileList[index].url = this.OSSclientConfig.basePath + res.name;
|
||||
this.fileList[index].path = res.name;
|
||||
this.$emit("update:path", [...this.path, res.name]);
|
||||
this.$emit("update:isUpload", false);
|
||||
return false;
|
||||
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"]);
|
||||
const isValidFile = this.fileValid(file.name, ['png', 'jpg', 'jpeg'])
|
||||
if (isValidFile) {
|
||||
// this.fileList = [];
|
||||
} else {
|
||||
this.$alert(this.$t("feedBack:uploadImg:format"));
|
||||
return false;
|
||||
this.$alert(this.$t('feedBack:uploadImg:format'))
|
||||
return false
|
||||
}
|
||||
},
|
||||
handlePreview(file) {
|
||||
file.fullPath ? window.open(file.fullPath, "_blank") : "";
|
||||
file.fullPath ? 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`)
|
||||
},
|
||||
fileValid(fileName, typeArr) {
|
||||
var extendName = fileName
|
||||
.substring(fileName.lastIndexOf(".") + 1)
|
||||
.toLocaleLowerCase();
|
||||
.substring(fileName.lastIndexOf('.') + 1)
|
||||
.toLocaleLowerCase()
|
||||
if (typeArr.indexOf(extendName) > -1) {
|
||||
return true;
|
||||
return true
|
||||
} else {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.$refs[file.url].$viewer.show();
|
||||
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);
|
||||
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 {
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-if="visible"
|
||||
:visible.sync="visible"
|
||||
v-dialogDrag
|
||||
width="540px"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
append-to-body
|
||||
:title="$t('toggleRole:tip:title')"
|
||||
center
|
||||
top="30vh"
|
||||
:show-close="false"
|
||||
:before-close="cancel"
|
||||
>
|
||||
<template v-if="hasRole">
|
||||
<el-radio-group v-model="form.userRoleId" class="roles">
|
||||
<el-radio
|
||||
v-for="item in roles"
|
||||
:key="item.Id"
|
||||
:label="item.Id"
|
||||
:disabled="item.IsUserRoleDisabled"
|
||||
style="margin-bottom: 10px"
|
||||
>
|
||||
{{ item.UserTypeShortName }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
|
||||
<div v-else style="text-align: center">
|
||||
{{ $t('toggleRole:tip:noRole') }}
|
||||
</div>
|
||||
<div slot="footer">
|
||||
<!-- 取消 -->
|
||||
<el-button size="small" @click="cancel()">
|
||||
{{ $t('common:button:cancel') }}
|
||||
</el-button>
|
||||
<!-- 保存 -->
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="save"
|
||||
:disabled="saveDisabled"
|
||||
:loading="loading"
|
||||
v-if="hasRole"
|
||||
>
|
||||
{{ $t('common:button:confirm') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'toggleRole',
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
userRoleId: null,
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.form.userRoleId = zzSessionStorage.getItem('userId')
|
||||
},
|
||||
computed: {
|
||||
roles() {
|
||||
return this.$store.state.user.roles
|
||||
},
|
||||
hasRole() {
|
||||
return this.roles && this.roles.length > 0
|
||||
},
|
||||
saveDisabled() {
|
||||
return this.form.userRoleId === zzSessionStorage.getItem('userId')
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
cancel() {
|
||||
this.$emit('update:visible', false)
|
||||
this.$emit('cancel')
|
||||
},
|
||||
async save() {
|
||||
try {
|
||||
if (!this.form.userRoleId)
|
||||
return this.$message.warning(this.$t('toggleRole:ruleMessage:select'))
|
||||
zzSessionStorage.removeItem('lastWorkbench')
|
||||
this.$emit('save', this.form.userRoleId)
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.roles {
|
||||
max-width: 365px;
|
||||
width: fit-content;
|
||||
display: flex;
|
||||
align-content: center;
|
||||
// justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
::v-deep .el-radio__original {
|
||||
display: none !important; /* 隐藏原生 radio 输入,但仍然允许交互 */
|
||||
}
|
||||
|
||||
::v-deep.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled)
|
||||
.el-radio__inner {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.el-radio {
|
||||
width: 60px;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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>
|
||||
@@ -102,7 +102,6 @@
|
||||
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",
|
||||
@@ -591,7 +590,7 @@ export default {
|
||||
files.push(obj);
|
||||
}
|
||||
store.dispatch("trials/setUnLock", true);
|
||||
let res = await downloadImage(zipName, files);
|
||||
// let res = await downloadImage(zipName, files);
|
||||
store.dispatch("trials/setUnLock", false);
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { SubjectCheckConfig } from './module/Subject'
|
||||
|
||||
console.log(SubjectCheckConfig.moduleType)
|
||||
export const checkConfig = {
|
||||
ModuleType: {
|
||||
...SubjectCheckConfig.ModuleType
|
||||
|
||||
@@ -10,7 +10,7 @@ const dialogDrag = Vue.directive('dialogDrag', {
|
||||
dragDom.style.cssText += ';top:0px;'
|
||||
|
||||
// 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
|
||||
const sty = (function() {
|
||||
const sty = (function () {
|
||||
if (window.document.currentStyle) {
|
||||
return (dom, attr) => dom.currentStyle[attr]
|
||||
} else {
|
||||
@@ -47,8 +47,10 @@ const dialogDrag = Vue.directive('dialogDrag', {
|
||||
styL = +styL.replace(/\px/g, '')
|
||||
styT = +styT.replace(/\px/g, '')
|
||||
}
|
||||
const oldMousemove = document.onmousemove
|
||||
|
||||
document.onmousemove = function(e) {
|
||||
document.onmousemove = function (e) {
|
||||
oldMousemove(e)
|
||||
// 通过事件委托,计算移动的距离
|
||||
let left = e.clientX - disX
|
||||
const top = e.clientY - disY
|
||||
@@ -70,8 +72,8 @@ const dialogDrag = Vue.directive('dialogDrag', {
|
||||
dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`
|
||||
}
|
||||
|
||||
document.onmouseup = function(e) {
|
||||
document.onmousemove = null
|
||||
document.onmouseup = function (e) {
|
||||
document.onmousemove = oldMousemove
|
||||
document.onmouseup = null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
|
||||
<div class="right-menu">
|
||||
<div class="navbar-flex-wrapper">
|
||||
<template v-if="device!=='mobile'">
|
||||
<template v-if="device !== 'mobile'">
|
||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||
</template>
|
||||
<!-- <div class="avatar-container">
|
||||
<img src="@/assets/avatar.png" class="user-avatar">
|
||||
</div> -->
|
||||
<div style="margin-left:20px;">
|
||||
<div style="margin-left: 20px">
|
||||
<el-dropdown class="dropdown-container" trigger="click">
|
||||
<span class="el-dropdown-link">
|
||||
{{ `${name} (${userTypeShortName})` }}
|
||||
@@ -30,10 +30,20 @@
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown" class="user-dropdown">
|
||||
<el-dropdown-item v-if="!isReviewer">
|
||||
<span style="display:block;" @click="editInfo">{{$t('system:navbar:button:Profile')}}</span>
|
||||
<span style="display: block" @click="editInfo">{{
|
||||
$t('system:navbar:button:Profile')
|
||||
}}</span>
|
||||
</el-dropdown-item>
|
||||
<!-- 切换角色 -->
|
||||
<el-dropdown-item divided v-if="hasRole">
|
||||
<span style="display: block" @click="openToggleRole">{{
|
||||
$t('system:navbar:button:toggleRole')
|
||||
}}</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item divided>
|
||||
<span style="display:block;" @click="logout">{{$t('system:navbar:button:Log Out')}}</span>
|
||||
<span style="display: block" @click="logout">{{
|
||||
$t('system:navbar:button:Log Out')
|
||||
}}</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
@@ -41,38 +51,119 @@
|
||||
<TopLang></TopLang>
|
||||
</div>
|
||||
</div>
|
||||
<toggleRole
|
||||
v-if="toggleRoleVisible"
|
||||
:visible.sync="toggleRoleVisible"
|
||||
:loading="toggleRoleLoading"
|
||||
@save="loginByRole"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters, mapMutations} from 'vuex'
|
||||
import { mapGetters, mapMutations } from 'vuex'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
import Screenfull from '@/components/Screenfull'
|
||||
import TopLang from './topLang'
|
||||
|
||||
|
||||
import toggleRole from '@/components/toggleRole'
|
||||
import { resetRouter } from '@/router'
|
||||
export default {
|
||||
components: {
|
||||
Breadcrumb,
|
||||
Hamburger,
|
||||
Screenfull,
|
||||
TopLang
|
||||
TopLang,
|
||||
toggleRole,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isReviewer: false,
|
||||
userTypeShortName: zzSessionStorage.getItem('userTypeShortName')
|
||||
toggleRoleVisible: false,
|
||||
toggleRoleLoading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['sidebar', 'name', 'device'])
|
||||
...mapGetters(['sidebar', 'name', 'device', 'userTypeShortName']),
|
||||
roles() {
|
||||
return this.$store.state.user.roles
|
||||
},
|
||||
hasRole() {
|
||||
return this.roles && this.roles.length > 1
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.isReviewer = JSON.parse(zzSessionStorage.getItem('IsReviewer'))
|
||||
// this.isReviewer = JSON.parse(zzSessionStorage.getItem('IsReviewer'))
|
||||
},
|
||||
methods: {
|
||||
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
||||
openToggleRole() {
|
||||
this.$store.dispatch('user/getUserInfo').then((res) => {
|
||||
this.toggleRoleVisible = true
|
||||
})
|
||||
},
|
||||
loginByRole(userRoleId) {
|
||||
if (this.$store.state.user.userId === userRoleId) {
|
||||
this.toggleRoleVisible = false
|
||||
this.toggleRoleLoading = false
|
||||
return false
|
||||
}
|
||||
this.toggleRoleLoading = true
|
||||
this.$store
|
||||
.dispatch('user/loginByRole', { userRoleId })
|
||||
.then((res) => {
|
||||
if (res) {
|
||||
this.$store
|
||||
.dispatch('permission/generateRoutes')
|
||||
.then(async (res) => {
|
||||
if (res && res.length > 0) {
|
||||
resetRouter()
|
||||
await this.$store.dispatch('global/getNoticeList')
|
||||
this.$router.addRoutes(res)
|
||||
this.toggleRoleLoading = false
|
||||
if (this.loginType === 'DevOps') {
|
||||
this.$router.replace({ path: res[0].path })
|
||||
return
|
||||
}
|
||||
if (this.hasPermi(['role:radmin'])) {
|
||||
this.$router.replace({ path: res[0].path })
|
||||
return
|
||||
}
|
||||
if (
|
||||
this.hasPermi([
|
||||
'role:air',
|
||||
'role:rpm',
|
||||
'role:rcrc',
|
||||
'role:rir',
|
||||
])
|
||||
) {
|
||||
history.replaceState(null, null, '/trials/trials-list')
|
||||
history.go(0)
|
||||
} else {
|
||||
history.replaceState(null, null, '/trials/trials-workbench')
|
||||
history.go(0)
|
||||
}
|
||||
this.toggleRoleVisible = false
|
||||
this.toggleRoleLoading = false
|
||||
this.$EventBus.$emit('reload')
|
||||
} else {
|
||||
// 此账户暂未配置菜单权限,请联系管理员处理后再登录。
|
||||
this.toggleRoleLoading = false
|
||||
this.$message.warning(this.$t('login:message:login2'))
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
this.toggleRoleLoading = false
|
||||
})
|
||||
} else {
|
||||
this.toggleRoleLoading = false
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.toggleRoleLoading = false
|
||||
})
|
||||
},
|
||||
toggleSideBar() {
|
||||
this.$store.dispatch('app/toggleSideBar')
|
||||
},
|
||||
@@ -84,23 +175,23 @@ export default {
|
||||
} else {
|
||||
this.$router.push(`/login`)
|
||||
}
|
||||
this.$i18n.locale = 'zh'
|
||||
this.setLanguage('zh')
|
||||
// //this.$i18n.locale = 'zh'
|
||||
// //this.setLanguage('zh')
|
||||
this.$updateDictionary()
|
||||
},
|
||||
editInfo() {
|
||||
this.$router.push({ name: 'BaiscInfo' })
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.navbar-flex-wrapper{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.navbar-flex-wrapper {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.navbar {
|
||||
height: 50px;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
import { mapGetters } from 'vuex'
|
||||
import Logo from './Logo'
|
||||
import SidebarItem from './SidebarItem'
|
||||
import variables from '@/styles/variables.scss'
|
||||
import variables from '@/styles/variables.module.scss'
|
||||
|
||||
export default {
|
||||
components: { SidebarItem, Logo },
|
||||
|
||||
@@ -73,7 +73,7 @@ export default {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
/deep/ {
|
||||
::v-deep {
|
||||
.el-scrollbar__bar {
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/styles/mixin.scss";
|
||||
@import "~@/styles/variables.scss";
|
||||
@import "~@/styles/variables.module.scss";
|
||||
|
||||
.app-wrapper {
|
||||
@include clearfix;
|
||||
|
||||
+75
-19
@@ -15,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'
|
||||
@@ -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()
|
||||
@@ -168,7 +174,7 @@ var _vm
|
||||
async function VueInit() {
|
||||
var params
|
||||
var res
|
||||
if (~window.location.href.indexOf('/readingDicoms') || ~window.location.href.indexOf('/noneDicomReading') || ~window.location.href.indexOf('/criterionquestions') || ~window.location.href.indexOf('/petct')) {
|
||||
if (~window.location.href.indexOf('/readingDicoms') || ~window.location.href.indexOf('/noneDicomReading') || ~window.location.href.indexOf('/criterionquestions') || ~window.location.href.indexOf('/petct') || ~window.location.href.indexOf('/fusion')) {
|
||||
params = $q('TrialReadingCriterionId')
|
||||
res = await getBasicDataAllSelect(params)
|
||||
} else if (~window.location.href.indexOf('/ecrfPreview')) {
|
||||
@@ -249,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
|
||||
@@ -274,15 +293,23 @@ async function VueInit() {
|
||||
}()
|
||||
_vm.$forceUpdate()
|
||||
}
|
||||
Vue.prototype.$EventBus = new Vue()
|
||||
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({
|
||||
@@ -293,7 +320,8 @@ async function VueInit() {
|
||||
data: {
|
||||
unlock: {
|
||||
my_username: null,
|
||||
my_password: null
|
||||
my_password: null,
|
||||
view: false
|
||||
}
|
||||
},
|
||||
render: h => h(App)
|
||||
@@ -304,7 +332,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 === '/researchDetail_m' || _vm.$route.path === '/researchLogin_m' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
|
||||
if (WHITELIST.includes(_vm.$route.path)) {
|
||||
return
|
||||
}
|
||||
if (_vm.$store.state.user.userId !== zzSessionStorage.getItem('userId')) {
|
||||
@@ -365,18 +393,22 @@ async function VueInit() {
|
||||
// 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;
|
||||
// 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 === '/researchDetail_m' || _vm.$route.path === '/researchLogin_m' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
|
||||
if (_vm.$store.state.trials.unlock || WHITELIST.includes(_vm.$route.path)) {
|
||||
count = 0;
|
||||
localStorage.setItem('count', '0')
|
||||
return
|
||||
}
|
||||
_vm.$store.dispatch('user/logout').then(res => {
|
||||
// window.location.href = `/login`
|
||||
if (_vm.$msgbox) {
|
||||
_vm.$msgbox.close();
|
||||
try {
|
||||
if (_vm.$msgbox && _vm.$msgbox.close) {
|
||||
_vm.$msgbox.close();
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
_vm.$FB.close();
|
||||
_vm.$FBT.close();
|
||||
@@ -397,7 +429,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.$store.state.trials.unlock || _vm.$route.path === '/ReviewersResearchForm' || _vm.$route.path === '/ReviewersResearch' || _vm.$route.path === '/login' || _vm.$route.path === '/researchForm' || _vm.$route.path === '/researchDetail_m' || _vm.$route.path === '/researchLogin_m' || _vm.$route.path === '/researchLogin' || _vm.$route.path === '/email-recompose' || _vm.$route.path === '/recompose' || _vm.$route.path === '/resetpassword' || _vm.$route.path === '/error') {
|
||||
if (_vm.$store.state.trials.unlock || WHITELIST.includes(_vm.$route.path)) {
|
||||
count = 0;
|
||||
localStorage.setItem('count', '0')
|
||||
if (_vm.$route.path === '/login') {
|
||||
@@ -419,11 +451,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')
|
||||
@@ -437,7 +469,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;
|
||||
@@ -501,16 +534,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) => {
|
||||
@@ -520,7 +558,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"
|
||||
}
|
||||
},
|
||||
}
|
||||
}),
|
||||
])
|
||||
])
|
||||
])
|
||||
@@ -546,3 +601,4 @@ VueInit()
|
||||
// });
|
||||
|
||||
|
||||
export default _vm
|
||||
+66
-13
@@ -1,22 +1,60 @@
|
||||
import router from './router'
|
||||
import { resetRouter } from '@/router'
|
||||
import store from './store'
|
||||
// import { Message } from 'element-ui'
|
||||
import NProgress from 'nprogress'
|
||||
import 'nprogress/nprogress.css'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { getToken, removeToken } 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', '/researchLogin_m', '/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)
|
||||
|
||||
// document.title = getPageTitle(to.meta.title) store.state.trials.whiteList.indexOf(to.path) === -1
|
||||
if (!to.query.trialId) {
|
||||
store.dispatch('trials/setConfig', {})
|
||||
}
|
||||
if (
|
||||
to.query.trialId &&
|
||||
to.query.trialId !==
|
||||
store.state.trials.config.trialId
|
||||
) {
|
||||
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
|
||||
) {
|
||||
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 +62,26 @@ 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 if (from.path === '/researchForm') {
|
||||
removeToken()
|
||||
let lang = to.query.lang || zzSessionStorage.getItem('lang')
|
||||
next(`/researchLogin?trialId=${to.query.trialId}&lang=${lang}`)
|
||||
NProgress.done()
|
||||
} else if (from.path === '/researchDetail_m') {
|
||||
removeToken()
|
||||
let lang = to.query.lang || zzSessionStorage.getItem('lang')
|
||||
next(`/researchLogin_m?trialId=${to.query.trialId}&lang=${lang}`)
|
||||
NProgress.done()
|
||||
} else {
|
||||
OSSclient()
|
||||
await OSSclient()
|
||||
const hasGetUserInfo = store.getters.userId
|
||||
if (hasGetUserInfo) {
|
||||
next()
|
||||
@@ -41,10 +89,13 @@ router.beforeEach(async (to, from, next) => {
|
||||
try {
|
||||
// 获取用户信息
|
||||
await store.dispatch('user/getInfo')
|
||||
await store.dispatch('user/getUserInfo')
|
||||
const accessRoutes = await store.dispatch('permission/generateRoutes')
|
||||
resetRouter()
|
||||
router.addRoutes(accessRoutes)
|
||||
next({ ...to, replace: true })
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
// 删除token并进入登录页面以重新登录
|
||||
await store.dispatch('user/resetToken')
|
||||
next(`/login?redirect=${to.path}`)
|
||||
@@ -56,26 +107,28 @@ router.beforeEach(async (to, from, next) => {
|
||||
/* has no token*/
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
if (to.path === '/researchLogin') {
|
||||
console.log(to)
|
||||
let lang = to.query.lang || zzSessionStorage.getItem('lang')
|
||||
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}`)
|
||||
next(`/researchLogin_m?trialId=${to.query.trialId}&lang=${lang}`)
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
} else {
|
||||
// 在免登录whiteList中,直接进入
|
||||
if (to.path === '/readingDicoms' || to.path === '/noneDicomReading') {
|
||||
OSSclient()
|
||||
await OSSclient()
|
||||
}
|
||||
next()
|
||||
}
|
||||
} else {
|
||||
if (to.path === '/researchForm') {
|
||||
next(`/researchLogin?`)
|
||||
let lang = to.query.lang || zzSessionStorage.getItem('lang')
|
||||
next(`/researchLogin?trialId=${to.query.trialId}&lang=${lang}`)
|
||||
NProgress.done()
|
||||
} else if (to.path === '/researchDetail_m') {
|
||||
next(`/researchLogin_m?`)
|
||||
let lang = to.query.lang || zzSessionStorage.getItem('lang')
|
||||
next(`/researchLogin_m?trialId=${to.query.trialId}&lang=${lang}`)
|
||||
NProgress.done()
|
||||
} else if (to.path === '/ReviewersResearchForm') {
|
||||
next(`/ReviewersResearch?`)
|
||||
|
||||
@@ -50,6 +50,11 @@ export const constantRoutes = [
|
||||
component: () => import('@/views/login/index'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/test',
|
||||
component: () => import('@/views/test/index'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/resetpassword',
|
||||
component: () => import('@/views/forgetpassword/index'),
|
||||
@@ -139,6 +144,12 @@ export const constantRoutes = [
|
||||
hidden: true,
|
||||
component: () => import('@/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt')
|
||||
},
|
||||
{
|
||||
path: '/fusion',
|
||||
name: 'fusion',
|
||||
hidden: true,
|
||||
component: () => import('@/views/trials/trials-panel/reading/dicoms/components/Fusion/demo/index')
|
||||
},
|
||||
|
||||
{
|
||||
path: '/historyScreenshot',
|
||||
@@ -223,6 +234,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'),
|
||||
|
||||
@@ -3,10 +3,12 @@ const getters = {
|
||||
device: state => state.app.device,
|
||||
token: state => state.user.token,
|
||||
name: state => state.user.name,
|
||||
userTypeShortName: state => state.user.userTypeShortName,
|
||||
permissions: state => state.user.permissions,
|
||||
tree: state => state.user.tree,
|
||||
userName: state => state.user.userName,
|
||||
userId: state => state.user.userId,
|
||||
identityUserId: state => state.user.identityUserId,
|
||||
routes: state => state.permission.routes,
|
||||
asyncRoutes: state => state.permission.addRoutes,
|
||||
visitedViews: state => state.tagsView.visitedViews,
|
||||
@@ -45,6 +47,7 @@ const getters = {
|
||||
language: state => state.lang.language,
|
||||
TotalNeedSignSystemDocCount: state => state.user.TotalNeedSignSystemDocCount,
|
||||
TotalNeedSignTrialDocCount: state => state.user.TotalNeedSignTrialDocCount,
|
||||
IsFirstSysDocNeedSign: state => state.user.IsFirstSysDocNeedSign,
|
||||
TrialStatusStr: state => state.user.TrialStatusStr
|
||||
}
|
||||
export default getters
|
||||
|
||||
+143
-56
@@ -35,26 +35,56 @@ 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 if (criterionType === 21) {
|
||||
// MRI-PDFF
|
||||
let isMeasurable = getQuestionAnswer(item.TableQuestions.Questions, 1105, answerObj)
|
||||
answerObj.isMeasurable = isMeasurable
|
||||
answerObj.mean = getQuestionAnswer(item.TableQuestions.Questions, 1104, answerObj)
|
||||
answerObj.saveTypeEnum = parseInt(isMeasurable) === 1 && isNaN(parseFloat(answerObj.mean)) ? 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 +100,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 +116,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 +145,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'
|
||||
@@ -483,6 +513,7 @@ const actions = {
|
||||
})
|
||||
},
|
||||
getMeasuredData({ state }, visitTaskId) {
|
||||
console.log('getMeasuredData')
|
||||
return new Promise(resolve => {
|
||||
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId)
|
||||
if (state.visitTaskList[index].measureDataInit) {
|
||||
@@ -499,6 +530,13 @@ const actions = {
|
||||
el.OtherMeasureData = JSON.parse(el.OtherMeasureData)
|
||||
el.OtherMeasureData.data.remark = el.OrderMarkName
|
||||
}
|
||||
// if (el.TableQuestionMarkList.length > 0) {
|
||||
// let list = el.TableQuestionMarkList.map(i=>{
|
||||
// i.MeasureData = i.MeasureData ? JSON.parse(i.MeasureData) : ''
|
||||
// return i
|
||||
// })
|
||||
// el.TableQuestionMarkList = list
|
||||
// }
|
||||
arr.push(el)
|
||||
})
|
||||
state.visitTaskList[index].MeasureData = arr
|
||||
@@ -582,6 +620,13 @@ const actions = {
|
||||
el.MeasureData = JSON.parse(el.MeasureData)
|
||||
el.MeasureData.data.remark = el.OrderMarkName
|
||||
}
|
||||
// if (el.TableQuestionMarkList.length > 0) {
|
||||
// let list = el.TableQuestionMarkList.map(i=>{
|
||||
// i.MeasureData = i.MeasureData ? JSON.parse(i.MeasureData) : ''
|
||||
// return i
|
||||
// })
|
||||
// el.TableQuestionMarkList = list
|
||||
// }
|
||||
arr.push(el)
|
||||
})
|
||||
state.visitTaskList[index].MeasureData = arr
|
||||
@@ -599,27 +644,40 @@ const actions = {
|
||||
resolve(noneDicomMeasureData)
|
||||
})
|
||||
},
|
||||
addMeasuredData({ state }, obj) {
|
||||
addMeasuredData({ state }, obj) {
|
||||
return new Promise(resolve => {
|
||||
const criterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
|
||||
var measureData = state.visitTaskList[index].MeasureData
|
||||
// var idx = measureData.findIndex(item => item.MeasureData.uuid === obj.data.MeasureData.data.uuid)
|
||||
var idx = measureData.findIndex(item => item.QuestionId === obj.data.QuestionId && item.RowIndex === obj.data.RowIndex)
|
||||
if (idx > -1) {
|
||||
for (const k in state.visitTaskList[index].MeasureData[idx]) {
|
||||
if (k !== 'Id' && obj.data[k]) {
|
||||
state.visitTaskList[index].MeasureData[idx][k] = obj.data[k]
|
||||
|
||||
if (criterionType === 21) {
|
||||
let i = measureData.findIndex(i=>i.TableQuestionId === obj.data.TableQuestionId)
|
||||
if (i > -1) {
|
||||
for (const k in state.visitTaskList[index].MeasureData[i]) {
|
||||
if (k !== 'Id' && obj.data[k]) {
|
||||
state.visitTaskList[index].MeasureData[i][k] = obj.data[k]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
state.visitTaskList[index].MeasureData.push(obj.data)
|
||||
}
|
||||
|
||||
// state.visitTaskList[index].MeasureData[idx].MeasureData = obj.data.MeasureData
|
||||
console.log('更新标记成功', idx)
|
||||
} else {
|
||||
state.visitTaskList[index].MeasureData.push(obj.data)
|
||||
console.log('新增标记成功')
|
||||
var idx = measureData.findIndex(item => item.QuestionId === obj.data.QuestionId && item.RowIndex === obj.data.RowIndex)
|
||||
if (idx > -1) {
|
||||
for (const k in state.visitTaskList[index].MeasureData[idx]) {
|
||||
if (k !== 'Id' && obj.data[k]) {
|
||||
state.visitTaskList[index].MeasureData[idx][k] = obj.data[k]
|
||||
}
|
||||
}
|
||||
console.log('更新标记成功', idx)
|
||||
} else {
|
||||
state.visitTaskList[index].MeasureData.push(obj.data)
|
||||
console.log('新增标记成功')
|
||||
}
|
||||
}
|
||||
|
||||
// sessionStorage.setItem('visitTaskList', state.visitTaskList.length > 0 ? JSON.stringify(state.visitTaskList) : '')
|
||||
console.log(state.visitTaskList)
|
||||
resolve()
|
||||
})
|
||||
},
|
||||
@@ -714,32 +772,45 @@ const actions = {
|
||||
return new Promise(resolve => {
|
||||
var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
|
||||
var measureData = state.visitTaskList[index].MeasureData
|
||||
|
||||
// var uuid = obj.measureData.data.uuid
|
||||
// var idx = measureData.findIndex(item => item.MeasureData && item.MeasureData.data && item.MeasureData.data.uuid === uuid)
|
||||
var idx = measureData.findIndex(item => item.QuestionId === obj.questionId && item.RowIndex === obj.rowIndex)
|
||||
if (idx > -1) {
|
||||
if (measureData[idx].FristAddTaskId) {
|
||||
measureData[idx].MeasureData = ''
|
||||
console.log('清除标记成功', idx)
|
||||
} else {
|
||||
measureData.splice(idx, 1)
|
||||
console.log('移除标记成功', idx)
|
||||
}
|
||||
state.visitTaskList[index].MeasureData = measureData
|
||||
} else if (obj.orderMarkName) {
|
||||
const criterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||
if (criterionType === 21) {
|
||||
const i = measureData.findIndex(item => item.QuestionId === obj.questionId && item.OrderMarkName === obj.orderMarkName)
|
||||
if (i > -1) {
|
||||
if (measureData[i].FristAddTaskId) {
|
||||
measureData[i].MeasureData = ''
|
||||
console.log('清除标记成功', i)
|
||||
} else {
|
||||
measureData.splice(i, 1)
|
||||
console.log('移除标记成功', i)
|
||||
if (i > -1) {
|
||||
if (measureData[i].FristAddTaskId) {
|
||||
measureData[i].MeasureData = ''
|
||||
console.log('清除标记成功', i)
|
||||
} else {
|
||||
measureData.splice(i, 1)
|
||||
console.log('移除标记成功', i)
|
||||
}
|
||||
}
|
||||
}
|
||||
state.visitTaskList[index].MeasureData = measureData
|
||||
} else {
|
||||
var idx = measureData.findIndex(item => item.QuestionId === obj.questionId && item.RowIndex === obj.rowIndex)
|
||||
if (idx > -1) {
|
||||
if (measureData[idx].FristAddTaskId) {
|
||||
measureData[idx].MeasureData = ''
|
||||
console.log('清除标记成功', idx)
|
||||
} else {
|
||||
measureData.splice(idx, 1)
|
||||
console.log('移除标记成功', idx)
|
||||
}
|
||||
state.visitTaskList[index].MeasureData = measureData
|
||||
} else if (obj.orderMarkName) {
|
||||
const i = measureData.findIndex(item => item.QuestionId === obj.questionId && item.OrderMarkName === obj.orderMarkName)
|
||||
if (i > -1) {
|
||||
if (measureData[i].FristAddTaskId) {
|
||||
measureData[i].MeasureData = ''
|
||||
console.log('清除标记成功', i)
|
||||
} else {
|
||||
measureData.splice(i, 1)
|
||||
console.log('移除标记成功', i)
|
||||
}
|
||||
}
|
||||
state.visitTaskList[index].MeasureData = measureData
|
||||
}
|
||||
}
|
||||
|
||||
// if (idx > -1) {
|
||||
// measureData.splice(idx, 1)
|
||||
|
||||
@@ -811,9 +882,22 @@ 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 if (study.IsCriticalSequence && instance.KeyFramesList.length === 0) {
|
||||
// 兼容保存标记数据未存NumberOfFrames的情况,按序列展示
|
||||
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)
|
||||
}
|
||||
} 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 {
|
||||
@@ -1003,7 +1087,7 @@ const actions = {
|
||||
}
|
||||
},
|
||||
setImageloadedInfo({ state }, obj) {
|
||||
console.log('setImageloadedInfo', obj)
|
||||
// console.log('setImageloadedInfo', obj)
|
||||
// if(obj.instance === '20dd8fc9-51b0-ec63-942b-cb3006c72650')
|
||||
// var index = state.visitTaskList.findIndex(i => i.VisitTaskId === obj.visitTaskId)
|
||||
// // const prefetchInstanceCount = state.visitTaskList[index].StudyList[obj.studyIndex].SeriesList[obj.seriesIndex].prefetchInstanceCount
|
||||
@@ -1053,7 +1137,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,7 +9,7 @@ const getDefaultState = () => {
|
||||
studyListQuery: null,
|
||||
unlock: false,
|
||||
config: {},
|
||||
uploadTip: '0.00kb/s',
|
||||
uploadTip: '0.00KB/s',
|
||||
timer: null,
|
||||
whiteList: [],
|
||||
checkTaskId: null
|
||||
|
||||
+132
-25
@@ -1,5 +1,6 @@
|
||||
import { getToken, setToken, removeToken, setName, removeName } from '@/utils/auth'
|
||||
import { login, loginOut, getUserMenuTree, getUserPermissions } from '@/api/user'
|
||||
import { login, loginOut, getUserMenuTree, getUserPermissions, getUserLoginRoleList, loginSelectUserRole } from '@/api/user'
|
||||
import { getUser } from '@/api/admin'
|
||||
|
||||
import { resetRouter } from '@/router'
|
||||
import md5 from 'js-md5'
|
||||
@@ -7,22 +8,29 @@ const getDefaultState = () => {
|
||||
return {
|
||||
token: getToken(),
|
||||
name: '',
|
||||
userTypeShortName: "",
|
||||
userName: '',
|
||||
userId: '',
|
||||
identityUserId: '',
|
||||
avatar: '',
|
||||
permissions: [],
|
||||
tree: [],
|
||||
/* eslint-disable */
|
||||
TotalNeedSignSystemDocCount: eval(process.env.VUE_APP_WORD_FOR_PERMISSION) ? null : 0,
|
||||
TotalNeedSignTrialDocCount: eval(process.env.VUE_APP_WORD_FOR_PERMISSION) ? null : 0,
|
||||
IsFirstSysDocNeedSign: false,
|
||||
TrialStatusStr: null,
|
||||
isTestUser: false
|
||||
isTestUser: false,
|
||||
roles: []
|
||||
}
|
||||
}
|
||||
|
||||
const state = getDefaultState()
|
||||
|
||||
const mutations = {
|
||||
SET_ROLES: (state, roles) => {
|
||||
state.roles = roles
|
||||
},
|
||||
RESET_STATE: (state) => {
|
||||
Object.assign(state, getDefaultState())
|
||||
},
|
||||
@@ -34,6 +42,9 @@ const mutations = {
|
||||
SET_NAME: (state, name) => {
|
||||
state.name = name
|
||||
},
|
||||
SET_USERTYPESHORTNAME: (state, userTypeShortName) => {
|
||||
state.userTypeShortName = userTypeShortName
|
||||
},
|
||||
SET_USERNAME: (state, name) => {
|
||||
state.userName = name
|
||||
},
|
||||
@@ -49,9 +60,16 @@ const mutations = {
|
||||
SET_USERID: (state, id) => {
|
||||
state.userId = id
|
||||
},
|
||||
SET_IDENTITYUSERID: (state, id) => {
|
||||
state.identityUserId = id
|
||||
},
|
||||
SET_ISTESTUSER: (state, isTestUser) => {
|
||||
state.isTestUser = eval(isTestUser)
|
||||
},
|
||||
SET_IS_FIRST_SYSTEM_DOC_SIGN: (state, IsFirstSysDocNeedSign) => {
|
||||
zzSessionStorage.setItem('IsFirstSysDocNeedSign', IsFirstSysDocNeedSign)
|
||||
state.IsFirstSysDocNeedSign = IsFirstSysDocNeedSign
|
||||
},
|
||||
SET_NEED_SIGN_SYSTEM_DOC_COUNT: (state, TotalNeedSignSystemDocCount) => {
|
||||
/* eslint-disable */
|
||||
if (eval(process.env.VUE_APP_WORD_FOR_PERMISSION) && !state.isTestUser) {
|
||||
@@ -78,6 +96,9 @@ const mutations = {
|
||||
}
|
||||
|
||||
const actions = {
|
||||
setRoles({ commit }, roles) {
|
||||
commit('SET_ROLES', roles)
|
||||
},
|
||||
changeUserName({ commit }, userName) {
|
||||
commit('SET_USERNAME', userName)
|
||||
},
|
||||
@@ -91,13 +112,15 @@ const actions = {
|
||||
if (UserId) {
|
||||
data.UserId = UserId;
|
||||
}
|
||||
login(data).then(async response => {
|
||||
getUserLoginRoleList(data).then(async response => {
|
||||
if (response.IsSuccess) {
|
||||
zzSessionStorage.removeItem('lastWorkbench')
|
||||
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
|
||||
commit('SET_ROLES', data.BasicInfo.AccountList)
|
||||
if (data.BasicInfo.IsFirstAdd || data.BasicInfo.LoginState === 1) {
|
||||
try {
|
||||
zzSessionStorage.setItem('userId', data.BasicInfo.Id)
|
||||
@@ -113,25 +136,24 @@ const actions = {
|
||||
zzSessionStorage.setItem('IsReviewer', data.BasicInfo.IsReviewer)
|
||||
zzSessionStorage.setItem('userName', data.BasicInfo.UserName)
|
||||
commit('SET_TOKEN', data.JWTStr)
|
||||
commit('SET_NAME', data.BasicInfo.RealName)
|
||||
zzSessionStorage.setItem('realName', data.BasicInfo.RealName)
|
||||
// commit('SET_NAME', data.BasicInfo.UserName)
|
||||
zzSessionStorage.setItem('isTestUser', data.BasicInfo.IsTestUser)
|
||||
commit('SET_ISTESTUSER', data.BasicInfo.IsTestUser)
|
||||
commit('SET_USERNAME', data.BasicInfo.UserName)
|
||||
commit('SET_USERID', data.BasicInfo.Id)
|
||||
setToken(data.JWTStr)
|
||||
setName(data.BasicInfo.RealName)
|
||||
const userString = decodeURIComponent(escape(window.atob(data.JWTStr.split('.')[1].replace(/-/g, '+').replace(/_/g, '/'))))
|
||||
const user = JSON.parse(userString)
|
||||
zzSessionStorage.setItem('userTypeShortName', user.userTypeShortName)
|
||||
zzSessionStorage.setItem('userId', user.id)
|
||||
zzSessionStorage.setItem('userTypeEnumInt', user.userTypeEnumInt)
|
||||
var permissions = await getUserPermissions()
|
||||
var menuTree = await getUserMenuTree()
|
||||
commit('SET_TREE', menuTree.Result)
|
||||
commit('SET_PERMISSIONS', permissions.Result)
|
||||
zzSessionStorage.setItem('newTree', JSON.stringify(menuTree.Result))
|
||||
zzSessionStorage.setItem('permissions', JSON.stringify(permissions.Result))
|
||||
// setName(data.BasicInfo.RealName)
|
||||
// const userString = decodeURIComponent(escape(window.atob(data.JWTStr.split('.')[1].replace(/-/g, '+').replace(/_/g, '/'))))
|
||||
// const user = JSON.parse(userString)
|
||||
// zzSessionStorage.setItem('userId', user.identityUserId)
|
||||
// commit('SET_IDENTITYUSERID', user.identityUserId)
|
||||
// zzSessionStorage.setItem('identityUserId', user.identityUserId)
|
||||
// zzSessionStorage.setItem('userTypeEnumInt', user.userTypeEnumInt)
|
||||
// var permissions = await getUserPermissions()
|
||||
// var menuTree = await getUserMenuTree()
|
||||
// commit('SET_TREE', menuTree.Result)
|
||||
// commit('SET_PERMISSIONS', permissions.Result)
|
||||
// zzSessionStorage.setItem('newTree', JSON.stringify(menuTree.Result))
|
||||
// zzSessionStorage.setItem('permissions', JSON.stringify(permissions.Result))
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
@@ -145,6 +167,51 @@ const actions = {
|
||||
})
|
||||
})
|
||||
},
|
||||
loginByRole({ commit }, userInfo) {
|
||||
const { userRoleId } = userInfo
|
||||
let params = {
|
||||
userRoleId
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
loginSelectUserRole(params).then(async response => {
|
||||
if (response.IsSuccess) {
|
||||
const data = response.Result
|
||||
|
||||
try {
|
||||
commit('SET_TOKEN', data)
|
||||
setToken(data)
|
||||
commit('SET_USERID', userRoleId)
|
||||
zzSessionStorage.setItem('userId', userRoleId)
|
||||
const userString = decodeURIComponent(escape(window.atob(data.split('.')[1].replace(/-/g, '+').replace(/_/g, '/'))))
|
||||
const user = JSON.parse(userString)
|
||||
zzSessionStorage.setItem('userTypeShortName', user.userTypeShortName)
|
||||
commit('SET_USERTYPESHORTNAME', user.userTypeShortName)
|
||||
commit('SET_NAME', user.fullName)
|
||||
setName(user.fullName)
|
||||
commit('SET_IDENTITYUSERID', user.identityUserId)
|
||||
zzSessionStorage.setItem('identityUserId', user.identityUserId)
|
||||
zzSessionStorage.setItem('userTypeEnumInt', user.userTypeEnumInt)
|
||||
var permissions = await getUserPermissions()
|
||||
var menuTree = await getUserMenuTree()
|
||||
commit('SET_TREE', menuTree.Result)
|
||||
commit('SET_PERMISSIONS', permissions.Result)
|
||||
zzSessionStorage.setItem('newTree', JSON.stringify(menuTree.Result))
|
||||
zzSessionStorage.setItem('permissions', JSON.stringify(permissions.Result))
|
||||
zzSessionStorage.removeItem('lastWorkbench')
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
resolve(response.Result)
|
||||
|
||||
} else {
|
||||
reject(response.ErrorMessage)
|
||||
}
|
||||
}).catch(() => {
|
||||
reject()
|
||||
})
|
||||
})
|
||||
},
|
||||
setTree({ commit }, tree) {
|
||||
commit('SET_TREE', tree)
|
||||
},
|
||||
@@ -154,6 +221,9 @@ const actions = {
|
||||
setTotalNeedSignSystemDocCount({ commit }, TotalNeedSignSystemDocCount) {
|
||||
commit('SET_NEED_SIGN_SYSTEM_DOC_COUNT', TotalNeedSignSystemDocCount)
|
||||
},
|
||||
setIsFirstSysDocNeedSign({ commit }, IsFirstSysDocNeedSign) {
|
||||
commit('SET_IS_FIRST_SYSTEM_DOC_SIGN', IsFirstSysDocNeedSign)
|
||||
},
|
||||
setTotalNeedSignTrialDocCount({ commit }, TotalNeedSignTrialDocCount) {
|
||||
commit('SET_NEED_SIGN_TRIALS_DOC_COUNT', TotalNeedSignTrialDocCount)
|
||||
},
|
||||
@@ -169,32 +239,69 @@ const actions = {
|
||||
commit('SET_PERMISSIONS', JSON.parse(zzSessionStorage.getItem('permissions')))
|
||||
commit('SET_ISTESTUSER', zzSessionStorage.getItem('isTestUser'))
|
||||
const user = JSON.parse(userString)
|
||||
commit('SET_NAME', zzSessionStorage.getItem('realName'))
|
||||
commit('SET_USERID', user.id)
|
||||
commit('SET_NAME', zzSessionStorage.getItem('Name'))
|
||||
commit('SET_USERTYPESHORTNAME', user.userTypeShortName)
|
||||
commit('SET_IDENTITYUSERID', user.identityUserId)
|
||||
commit('SET_USERID', user.userRoleId)
|
||||
commit('SET_USERNAME', zzSessionStorage.getItem('userName'))
|
||||
commit('SET_NEED_SIGN_SYSTEM_DOC_COUNT', parseInt(zzSessionStorage.getItem('TotalNeedSignSystemDocCount')))
|
||||
commit('SET_NEED_SIGN_TRIALS_DOC_COUNT', parseInt(zzSessionStorage.getItem('TotalNeedSignTrialDocCount')))
|
||||
console.log(zzSessionStorage.getItem('TotalNeedSignSystemDocCount'))
|
||||
console.log(zzSessionStorage.getItem('TotalNeedSignTrialDocCount'))
|
||||
commit('SET_IS_FIRST_SYSTEM_DOC_SIGN', zzSessionStorage.getItem('IsFirstSysDocNeedSign'))
|
||||
// console.log(zzSessionStorage.getItem('TotalNeedSignSystemDocCount'))
|
||||
// console.log(zzSessionStorage.getItem('TotalNeedSignTrialDocCount'))
|
||||
zzSessionStorage.setItem('userName', user.name)
|
||||
zzSessionStorage.setItem('userId', user.id)
|
||||
zzSessionStorage.setItem('userId', user.userRoleId)
|
||||
zzSessionStorage.setItem('identityUserId', user.identityUserId)
|
||||
zzSessionStorage.setItem('userTypeShortName', user.userTypeShortName)
|
||||
zzSessionStorage.setItem('userTypeEnumInt', user.userTypeEnumInt)
|
||||
return user
|
||||
},
|
||||
updateInfo({ commit, state }) {
|
||||
commit('SET_NAME', zzSessionStorage.getItem('realName'))
|
||||
commit('SET_NAME', zzSessionStorage.getItem('Name'))
|
||||
},
|
||||
// 获取用户信息
|
||||
getUserInfo({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getUser().then(res => {
|
||||
if (res.Result) {
|
||||
commit('SET_ROLES', res.Result.AccountList)
|
||||
}
|
||||
resolve(res.Result)
|
||||
}).catch(err => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
},
|
||||
// user logout
|
||||
async logout({ commit, state }) {
|
||||
try {
|
||||
removeToken() // must remove token first
|
||||
await loginOut({
|
||||
Userd: zzSessionStorage.getItem('userId')
|
||||
UserRoleId: zzSessionStorage.getItem('userId'),
|
||||
IdentityUserId: zzSessionStorage.getItem('identityUserId'),
|
||||
})
|
||||
resetRouter()
|
||||
removeName()
|
||||
let lang = zzSessionStorage.getItem('lang')
|
||||
zzSessionStorage.clear()
|
||||
zzSessionStorage.setItem('lang', lang)
|
||||
commit('RESET_STATE')
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async resetData({ commit, state }) {
|
||||
try {
|
||||
removeToken() // must remove token first
|
||||
// await loginOut({
|
||||
// UserRoleId: zzSessionStorage.getItem('userId'),
|
||||
// IdentityUserId: zzSessionStorage.getItem('identityUserId'),
|
||||
// })
|
||||
resetRouter()
|
||||
removeName()
|
||||
let lang = zzSessionStorage.getItem('lang')
|
||||
zzSessionStorage.clear()
|
||||
zzSessionStorage.setItem('lang', lang)
|
||||
commit('RESET_STATE')
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
|
||||
@@ -47,3 +47,6 @@
|
||||
.el-range-separator {
|
||||
box-sizing: content-box;
|
||||
}
|
||||
.el-select-dropdown__wrap{
|
||||
max-height: 350px;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
@import "./variables.scss";
|
||||
@import "./variables.module.scss";
|
||||
@import "./mixin.scss";
|
||||
@import "./transition.scss";
|
||||
@import "./element-ui.scss";
|
||||
@@ -149,6 +149,7 @@ body .el-table th.gutter {
|
||||
}
|
||||
|
||||
.el-dialog__body {
|
||||
margin-top: 15px;
|
||||
height: calc(100% - 70px);
|
||||
padding: 0 20px;
|
||||
|
||||
@@ -347,6 +348,7 @@ body .el-table th.gutter {
|
||||
background: #000;
|
||||
z-index: 3999;
|
||||
}
|
||||
.el-message-box__wrapper{
|
||||
|
||||
.el-message-box__wrapper {
|
||||
z-index: 9999 !important;
|
||||
}
|
||||
+24
-4
@@ -71,29 +71,49 @@ $sideBarWidth: 200px;
|
||||
border: none;
|
||||
height: 100%;
|
||||
width: 100% !important;
|
||||
background-color: $menuBg;
|
||||
}
|
||||
|
||||
// menu hover
|
||||
.submenu-title-noDropdown,
|
||||
.el-submenu__title {
|
||||
color: $menuText !important;
|
||||
&:hover {
|
||||
background-color: $menuHover !important;
|
||||
color: $menuActiveText !important;
|
||||
}
|
||||
}
|
||||
|
||||
.is-active>.el-submenu__title {
|
||||
color: $subMenuActiveText !important;
|
||||
}
|
||||
|
||||
& .nest-menu .el-submenu>.el-submenu__title,
|
||||
& .el-submenu .el-menu-item {
|
||||
.el-menu-item {
|
||||
color: $menuText !important;
|
||||
}
|
||||
.el-menu-item:focus,
|
||||
.el-menu-item:hover {
|
||||
background-color: $subMenuBg !important;
|
||||
color: $menuActiveText !important;
|
||||
}
|
||||
.el-submenu .el-menu-item {
|
||||
min-width: $sideBarWidth !important;
|
||||
background-color: $subMenuBg !important;
|
||||
|
||||
|
||||
&:hover {
|
||||
background-color: $subMenuHover !important;
|
||||
|
||||
}
|
||||
}
|
||||
// &.nest-menu .el-submenu>.el-submenu__title,
|
||||
// &.el-submenu .el-menu-item {
|
||||
// min-width: $sideBarWidth !important;
|
||||
// background-color: $subMenuBg !important;
|
||||
|
||||
// &:hover {
|
||||
// background-color: $subMenuHover !important;
|
||||
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
.hideSidebar {
|
||||
|
||||
+3
-2
@@ -40,8 +40,9 @@ Vue.directive('dialogDrag', {
|
||||
styL = +styL.replace(/\px/g, '')
|
||||
styT = +styT.replace(/\px/g, '')
|
||||
}
|
||||
|
||||
const oldMousemove = document.onmousemove
|
||||
document.onmousemove = function(e) {
|
||||
oldMousemove(e)
|
||||
// 通过事件委托,计算移动的距离
|
||||
let left = e.clientX - disX
|
||||
let top = e.clientY - disY
|
||||
@@ -63,7 +64,7 @@ Vue.directive('dialogDrag', {
|
||||
}
|
||||
|
||||
document.onmouseup = function(e) {
|
||||
document.onmousemove = null
|
||||
document.onmousemove = oldMousemove
|
||||
document.onmouseup = null
|
||||
}
|
||||
return false
|
||||
|
||||
@@ -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;
|
||||
@@ -14,7 +14,7 @@ export function AWSclose() {
|
||||
if (timer) {
|
||||
clearInterval(timer);
|
||||
timer = null;
|
||||
store.state.trials.uploadTip = '0kb/s'
|
||||
store.state.trials.uploadTip = '0KB/s'
|
||||
}
|
||||
bytesReceivedPerSecond = {};
|
||||
}
|
||||
@@ -28,7 +28,7 @@ export async function exist(s3, bucket, fileInformation, progressFn, changeStatu
|
||||
// 设置每一片的大小,shardSize 指定上传的每个分片的大小,范围为100 KB~5 GB。
|
||||
// 分片标准为5MB,文件总大小大于5GB分片为20MB
|
||||
let shardSize = 5 * 1024 * 1024;
|
||||
if (uploadFileSize < partSize) {
|
||||
if (uploadFileSize < shardSize) {
|
||||
shardSize = uploadFileSize;
|
||||
}
|
||||
if (uploadFileSize > 5 * 1024 * 1024 * 1024) {
|
||||
@@ -45,8 +45,8 @@ export async function exist(s3, bucket, fileInformation, progressFn, changeStatu
|
||||
//判断sharding里面是否有东西,有东西证明已经上传过分片了,不需要再进行检测
|
||||
if (fileInformation.sharding.length === 0) {
|
||||
let existBucket = await existInBucket({ s3, bucket, fileInformation: fileInformation });
|
||||
console.log("existBucket", existBucket)
|
||||
if (existBucket === 'true') {
|
||||
progressFn(1, fileInformation.file, 0);
|
||||
changeStatus(fileInformation.path, 'success');//直接告诉前端,状态
|
||||
return;
|
||||
} else if (existBucket === 'same key') {
|
||||
@@ -126,13 +126,13 @@ async function uploadFile({ s3, fileInformation, uploadId, bucket, changeStatus,
|
||||
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;
|
||||
bytesReceivedPerSecond[bytesTime] += fileInformation.file.size * (percentage - lastPercentage);
|
||||
} else {
|
||||
console.log("未查询到时间")
|
||||
if (timeList.length > 0) {
|
||||
bytesReceivedPerSecond[timeList[timeList.length - 1]] += fileInformation.file.size * percentage;
|
||||
bytesReceivedPerSecond[timeList[timeList.length - 1]] += fileInformation.file.size * (percentage - lastPercentage);
|
||||
} else {
|
||||
bytesReceivedPerSecond[time] = fileInformation.file.size * percentage;
|
||||
bytesReceivedPerSecond[time] = fileInformation.file.size * (percentage - lastPercentage);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -183,7 +183,6 @@ async function existInBucket({ s3, bucket, fileInformation }) {
|
||||
}
|
||||
}
|
||||
let bucketFileBufferArray = new Uint8Array(bucketFileUniArray);
|
||||
console.log("bucketFileBufferArray.buffer", bucketFileBufferArray.buffer)
|
||||
// 将传入文件的fileReader 转成 arrayBuffer
|
||||
let fileArrayBuff = null;
|
||||
fileArrayBuff = await new Promise((resolve) => {
|
||||
@@ -287,7 +286,6 @@ async function existUpload({ s3, bucket, fileInformation }) {
|
||||
|
||||
//计算arrayBuffer的md5值
|
||||
async function getMD5({ arrayBuffer }) {
|
||||
console.log("arrayBuffer", arrayBuffer)
|
||||
return await new Promise((resolve) => {
|
||||
const spark = new SparkMD5.ArrayBuffer();
|
||||
spark.append(arrayBuffer);
|
||||
@@ -442,10 +440,10 @@ function setTimer() {
|
||||
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';
|
||||
let unit = 'KB/s';
|
||||
if (totalBytes > 1024) {
|
||||
totalBytes = totalBytes / 1024;
|
||||
unit = "mb/s";
|
||||
unit = "MB/s";
|
||||
}
|
||||
store.state.trials.uploadTip = totalBytes.toFixed(2) + unit;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ export function OSSclose() {
|
||||
if (timer) {
|
||||
clearInterval(timer);
|
||||
timer = null;
|
||||
store.state.trials.uploadTip = '0kb/s'
|
||||
store.state.trials.uploadTip = '0KB/s'
|
||||
}
|
||||
bytesReceivedPerSecond = {};
|
||||
savaData = {};
|
||||
@@ -57,13 +57,13 @@ async function multipartUpload(OSSclient, partSize, saveFileId, uploadFile, data
|
||||
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;
|
||||
bytesReceivedPerSecond[bytesTime] += data.file.size * (percentage - checkData[saveFileId]);
|
||||
} else {
|
||||
console.log("未查询到时间")
|
||||
// console.log("未查询到时间")
|
||||
if (timeList.length > 0) {
|
||||
bytesReceivedPerSecond[timeList[timeList.length - 1]] += data.file.size * percentage;
|
||||
bytesReceivedPerSecond[timeList[timeList.length - 1]] += data.file.size * (percentage - checkData[saveFileId]);
|
||||
} else {
|
||||
bytesReceivedPerSecond[time] = data.file.size * percentage;
|
||||
bytesReceivedPerSecond[time] = data.file.size * (percentage - checkData[saveFileId]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -92,10 +92,15 @@ async function multipartUpload(OSSclient, partSize, saveFileId, uploadFile, data
|
||||
// 重新去掉某个缓存进行设置
|
||||
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");
|
||||
@@ -136,13 +141,14 @@ function initPage() {
|
||||
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';
|
||||
let unit = 'KB/s';
|
||||
if (totalBytes > 1024) {
|
||||
totalBytes = totalBytes / 1024;
|
||||
unit = "mb/s";
|
||||
unit = "MB/s";
|
||||
}
|
||||
store.state.trials.uploadTip = totalBytes.toFixed(2) + unit;
|
||||
}
|
||||
|
||||
+118
-89
@@ -15,7 +15,15 @@ Vue.prototype.OSSclientConfig = {
|
||||
|
||||
|
||||
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
|
||||
@@ -26,19 +34,10 @@ async function ossGenerateSTS() {
|
||||
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 config = await getSTSToken(Vue.prototype.OSSclientConfig.Expiration);
|
||||
if (config) {
|
||||
Vue.prototype.OSSclientConfig = { ...config.Result[res.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 = objectName.split('/')
|
||||
@@ -60,14 +59,15 @@ async function ossGenerateSTS() {
|
||||
}
|
||||
})
|
||||
},
|
||||
multipartUpload: (data, progress) => {
|
||||
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);
|
||||
let config = await getSTSToken(Vue.prototype.OSSclientConfig.expiration);
|
||||
if (config) {
|
||||
Vue.prototype.OSSclientConfig = { ...config.Result[res.Result.ObjectStoreUse] }
|
||||
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
|
||||
@@ -85,7 +85,7 @@ async function ossGenerateSTS() {
|
||||
if (res) {
|
||||
resolve({
|
||||
name: data.path,
|
||||
url: Vue.prototype.OSSclientConfig.viewEndpoint + res.name
|
||||
url: Vue.prototype.OSSclientConfig.viewEndpoint + decodeUtf8(res.name)
|
||||
})
|
||||
} else {
|
||||
reject()
|
||||
@@ -142,78 +142,32 @@ async function ossGenerateSTS() {
|
||||
}
|
||||
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: (data, progress) => {
|
||||
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[res.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 S3Client(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('/')
|
||||
}
|
||||
await exist(OSSclient, Vue.prototype.OSSclientConfig.bucket, data, progress, (res) => {
|
||||
if (res) {
|
||||
resolve({
|
||||
name: data.path,
|
||||
url: Vue.prototype.OSSclientConfig.viewEndpoint + res.name
|
||||
})
|
||||
} else {
|
||||
reject()
|
||||
}
|
||||
});
|
||||
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
multipartUpload: async (data, progress) => {
|
||||
aws = await RefreshClient(aws);
|
||||
return uploadAWS(aws, data, progress);
|
||||
},
|
||||
close: () => {
|
||||
AWSclose();
|
||||
@@ -222,6 +176,80 @@ async function ossGenerateSTS() {
|
||||
}
|
||||
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('/');
|
||||
@@ -237,7 +265,7 @@ let loading = false;
|
||||
function getSTSToken(credentials) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let isExpired = isCredentialsExpired(credentials);
|
||||
if (!isExpired) {
|
||||
if (isExpired) {
|
||||
if (loading) {
|
||||
queue.push({ resolve, reject })
|
||||
}
|
||||
@@ -245,6 +273,7 @@ function getSTSToken(credentials) {
|
||||
loading = true;
|
||||
let res = await GetObjectStoreToken();
|
||||
loading = false;
|
||||
localStorage.setItem('stsToken', JSON.stringify(res))
|
||||
resolve(res)
|
||||
let p = queue.shift();
|
||||
while (p) {
|
||||
@@ -254,7 +283,7 @@ function getSTSToken(credentials) {
|
||||
}
|
||||
|
||||
} else {
|
||||
console.log("凭证未过期");
|
||||
// console.log("凭证未过期");
|
||||
resolve(false)
|
||||
}
|
||||
|
||||
@@ -267,7 +296,7 @@ function isCredentialsExpired(credentials) {
|
||||
if (!credentials) {
|
||||
return true;
|
||||
}
|
||||
const expireDate = new Date(credentials.Expiration);
|
||||
const expireDate = new Date(credentials);
|
||||
const now = new Date();
|
||||
// 如果有效期不足五分钟,视为过期。
|
||||
return expireDate.getTime() - now.getTime() <= 300000;
|
||||
|
||||
@@ -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}`
|
||||
}
|
||||
@@ -90,9 +89,9 @@ service.interceptors.response.use(
|
||||
})
|
||||
store.dispatch('user/logout').then(() => {
|
||||
router.push(`/login`)
|
||||
this.$i18n.locale = 'zh'
|
||||
this.setLanguage('zh')
|
||||
this.$updateDictionary()
|
||||
//this.$i18n.locale = 'zh'
|
||||
//this.setLanguage('zh')
|
||||
// this.$updateDictionary()
|
||||
})
|
||||
}
|
||||
} else {
|
||||
|
||||
+36
-11
@@ -2,9 +2,10 @@ import axios from 'axios'
|
||||
import { Message, MessageBox, Alert } from 'element-ui'
|
||||
import store from '@/store'
|
||||
import router from '@/router'
|
||||
import Vue from 'vue'
|
||||
import WHITELIST from "./whiteList"
|
||||
import moment from 'moment-timezone';
|
||||
console.log(moment.tz.guess())
|
||||
import { encryptConfig } from "@/utils/encrypt"
|
||||
const ROUTER = require('@/router');
|
||||
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 === '/researchDetail_m' || path === '/researchLogin_m' || 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,10 +91,20 @@ 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(() => {
|
||||
let _vm = ROUTER.default.app
|
||||
try {
|
||||
if (_vm.$msgbox && _vm.$msgbox.close) {
|
||||
_vm.$msgbox.close();
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
router.push(`/login`)
|
||||
this.$i18n.locale = 'zh'
|
||||
this.setLanguage('zh')
|
||||
this.$updateDictionary()
|
||||
// if (!this.$i18n.locale) {
|
||||
// //this.$i18n.locale = 'zh'
|
||||
// //this.setLanguage('zh')
|
||||
// }
|
||||
// this.$updateDictionary()
|
||||
})
|
||||
}
|
||||
switch (status) {
|
||||
@@ -113,9 +134,9 @@ service.interceptors.response.use(
|
||||
}
|
||||
store.dispatch('user/logout').then(() => {
|
||||
router.push(`/login`)
|
||||
this.$i18n.locale = 'zh'
|
||||
this.setLanguage('zh')
|
||||
this.$updateDictionary()
|
||||
// //this.$i18n.locale = 'zh'
|
||||
// //this.setLanguage('zh')
|
||||
// this.$updateDictionary()
|
||||
})
|
||||
} else {
|
||||
setTimer({
|
||||
@@ -129,6 +150,7 @@ service.interceptors.response.use(
|
||||
setTimer([message, store.state.lang.language === 'en' ? 'Warning' : '警告', {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
confirmButtonText: store.state.lang.language === 'en' ? 'ok' : "确定",
|
||||
callback: action => { }
|
||||
}], 'confirm')
|
||||
}
|
||||
@@ -139,6 +161,7 @@ service.interceptors.response.use(
|
||||
[store.state.lang.language === 'en' ? 'Please check your network,and try again later!' : '请检查网络,稍后重试!', store.state.lang.language === 'en' ? 'Warning' : '警告', {
|
||||
type: 'warning',
|
||||
showCancelButton: false,
|
||||
confirmButtonText: store.state.lang.language === 'en' ? 'ok' : "确定",
|
||||
callback: action => { }
|
||||
}], "confirm"
|
||||
)
|
||||
@@ -157,6 +180,8 @@ const setTimer = (obj, type) => {
|
||||
Message(obj)
|
||||
}
|
||||
if (type === 'confirm') {
|
||||
obj[2].closeOnClickModal = false
|
||||
obj[2].closeOnPressEscape = false
|
||||
MessageBox.confirm(...obj)
|
||||
}
|
||||
clearTimeout(timer);
|
||||
|
||||
+93
-35
@@ -1,48 +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) {
|
||||
console.log("同步下载打包开始时间:" + new Date());
|
||||
// 创建压缩文件输出流
|
||||
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 {
|
||||
const { name, url } = fileInfo.value;
|
||||
return fetch(url).then(res => {
|
||||
ctrl.enqueue({
|
||||
name,
|
||||
stream: () => res.body
|
||||
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)
|
||||
}
|
||||
});
|
||||
if (window.WritableStream && readableZipStream.pipeTo) {
|
||||
// 开始下载
|
||||
readableZipStream
|
||||
.pipeTo(zipFileOutputStream)
|
||||
.then(() => console.log("同步下载打包结束时间:" + new Date()));
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
// 下载文件并修改名称
|
||||
async function updateFile(file, name) {
|
||||
try {
|
||||
const fileOutputStream = streamSaver.createWriteStream(name);
|
||||
let res = await fetch(file);
|
||||
res.body.pipeTo(fileOutputStream);
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
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)
|
||||
}
|
||||
})
|
||||
}
|
||||
export function downLoadFile(file, name, type = 'file') {
|
||||
if (type === 'zip') return zipFiles(name, file);
|
||||
return updateFile(file, name)
|
||||
// 同名文件修改名称
|
||||
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,168 +0,0 @@
|
||||
import Vue from 'vue';
|
||||
import store from "@/store";
|
||||
import {
|
||||
requestPackageAndAnonymizImage,
|
||||
} from "@/api/load.js";
|
||||
import streamSaver from "streamsaver";
|
||||
import "streamsaver/examples/zip-stream.js"
|
||||
let flag = {};
|
||||
export const resetFlag = () => {
|
||||
flag = {};
|
||||
store.state.trials.uploadTip = null;
|
||||
if (store.state.trials.timer) {
|
||||
clearInterval(store.state.trials.timer);
|
||||
store.state.trials.timer = null;
|
||||
}
|
||||
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'));
|
||||
if (flag[`${id2}_${IsDicom}`]) return false;
|
||||
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"))
|
||||
let message = Vue.prototype.$t('trials:upload:tip:uploading').replace("xxx", res.OtherInfo.FileName);
|
||||
store.state.trials.uploadTip = message;
|
||||
if (!store.state.trials.timer) {
|
||||
store.state.trials.timer = setInterval(() => {
|
||||
downloadImage(id, id2, IsDicom);
|
||||
}, 2000);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (store.state.trials.timer) {
|
||||
clearInterval(store.state.trials.timer);
|
||||
store.state.trials.timer = null;
|
||||
}
|
||||
let fileName = res.Result.split("/").pop();
|
||||
let href = Vue.prototype.OSSclientConfig.basePath + res.Result;
|
||||
if (fileName !== res.OtherInfo.FileName) {
|
||||
let message = Vue.prototype.$t('trials:upload:tip:uploading').replace("xxx", res.OtherInfo.FileName);
|
||||
store.state.trials.uploadTip = message;
|
||||
// Vue.prototype.$message.success(Vue.prototype.$t("trials:upload:message:startUpload"));
|
||||
return download(href, res.OtherInfo.FileName, { id2, IsDicom });
|
||||
|
||||
}
|
||||
let a = document.createElement("a");
|
||||
a.download = res.OtherInfo.FileName;
|
||||
a.href = href;
|
||||
a.click();
|
||||
URL.revokeObjectURL(href);
|
||||
let timer = setTimeout(() => {
|
||||
a = null;
|
||||
href = null;
|
||||
timer = null;
|
||||
}, 500)
|
||||
store.state.trials.uploadTip = null;
|
||||
return true;
|
||||
} else {
|
||||
flag[`${id2}_${IsDicom}`] = false;
|
||||
return false;
|
||||
}
|
||||
} catch (err) {
|
||||
flag[`${id2}_${IsDicom}`] = false;
|
||||
console.log(err);
|
||||
}
|
||||
};
|
||||
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.state.trials.uploadTip = null;
|
||||
store.dispatch("trials/setUnLock", false);
|
||||
saveAsB(blob, downloadFileName);
|
||||
return true;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
// 前端流式打包下载
|
||||
const handleBatchDown = async (item, zip) => {
|
||||
return new Promise((resolve) => {
|
||||
console.log("同步下载打包开始时间:" + new Date());
|
||||
// 创建压缩文件输出流
|
||||
const zipFileOutputStream = streamSaver.createWriteStream(zipName);
|
||||
// 创建下载文件流
|
||||
const fileIterator = files.values();
|
||||
const readableZipStream = new window.ZIP({
|
||||
async pull(ctrl) {
|
||||
const fileInfo = fileIterator.next();
|
||||
if (fileInfo.done) {//迭代终止
|
||||
ctrl.close();
|
||||
} else {
|
||||
const { name, url } = fileInfo.value;
|
||||
return fetch(url).then(res => {
|
||||
ctrl.enqueue({
|
||||
name,
|
||||
stream: () => res.body
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
if (window.WritableStream && readableZipStream.pipeTo) {
|
||||
// 开始下载
|
||||
readableZipStream
|
||||
.pipeTo(zipFileOutputStream)
|
||||
.then(() => { console.log("同步下载打包结束时间:" + new Date()); resolve(true) })
|
||||
} else {
|
||||
resolve(false);
|
||||
}
|
||||
})
|
||||
|
||||
};
|
||||
@@ -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
|
||||
@@ -17,7 +17,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="是否内部角色: " prop="IsInternal">
|
||||
<el-radio-group v-model="form.IsInternal">
|
||||
<el-radio v-for="item of $d.YesOrNo" :label="item.value">{{ item.label }}</el-radio>
|
||||
<el-radio v-for="item of $d.YesOrNo" :key="`IsInternal${item.value}`" :label="item.value">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
:model="user"
|
||||
:rules="userFormRules"
|
||||
label-width="150px"
|
||||
style="width:800px;"
|
||||
style="width: 800px"
|
||||
>
|
||||
<el-card class="Basic" shadow="never" size="small">
|
||||
<div slot="header" class="clearfix">
|
||||
@@ -25,7 +25,7 @@
|
||||
<el-form-item label="Given Name: " prop="FirstName">
|
||||
<el-input v-model="user.FirstName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Gender: " prop="Sex" style="margin-right:40px;">
|
||||
<el-form-item label="Gender: " prop="Sex" style="margin-right: 40px">
|
||||
<el-radio-group v-model="user.Sex">
|
||||
<el-radio :label="1">Male</el-radio>
|
||||
<el-radio :label="0">Female</el-radio>
|
||||
@@ -37,13 +37,24 @@
|
||||
<el-form-item label="Phone: " prop="Phone">
|
||||
<el-input v-model="user.Phone" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="type==1" label="Disable:">
|
||||
<el-switch v-model="user.Status" :active-value="0" :inactive-value="1" />
|
||||
<el-form-item v-if="type == 1" label="Disable:">
|
||||
<el-switch
|
||||
v-model="user.Status"
|
||||
:active-value="0"
|
||||
:inactive-value="1"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="User Type: " prop="UserTypeId">
|
||||
<el-select ref="userType" v-model="user.UserTypeId" size="small" placeholder="Please select" style="width:100%;" :disabled="user.CanEditUserType === false">
|
||||
<el-select
|
||||
ref="userType"
|
||||
v-model="user.UserTypeId"
|
||||
size="small"
|
||||
placeholder="Please select"
|
||||
style="width: 100%"
|
||||
:disabled="user.CanEditUserType === false"
|
||||
>
|
||||
<el-option
|
||||
v-for="(userType,key) of userTypeOptions"
|
||||
v-for="(userType, key) of userTypeOptions"
|
||||
:key="key"
|
||||
:label="userType.UserType"
|
||||
:value="userType.Id"
|
||||
@@ -52,17 +63,28 @@
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
|
||||
<el-card class="Affiliation" shadow="never" style="margin-top:10px;" size="small">
|
||||
<el-card
|
||||
class="Affiliation"
|
||||
shadow="never"
|
||||
style="margin-top: 10px"
|
||||
size="small"
|
||||
>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>Affiliation</span>
|
||||
</div>
|
||||
<el-form-item prop="IsZhiZhun">
|
||||
<el-radio-group v-model="user.IsZhiZhun" @change="OrgnizationTypeChanged">
|
||||
<el-radio-group
|
||||
v-model="user.IsZhiZhun"
|
||||
@change="OrgnizationTypeChanged"
|
||||
>
|
||||
<el-radio :label="true">Internal</el-radio>
|
||||
<el-radio :label="false">External</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="user.IsZhiZhun === false" label="Organization Name: ">
|
||||
<el-form-item
|
||||
v-show="user.IsZhiZhun === false"
|
||||
label="Organization Name: "
|
||||
>
|
||||
<el-input v-model="user.OrganizationName" />
|
||||
</el-form-item>
|
||||
|
||||
@@ -78,19 +100,24 @@
|
||||
type="primary"
|
||||
size="small"
|
||||
:disabled="isDisabled"
|
||||
style="margin:10px 15px"
|
||||
style="margin: 10px 15px"
|
||||
@click="handleSave"
|
||||
>Save</el-button>
|
||||
>Save</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
import { getUser, addUser, updateUser, getUserTypeListByUserType } from '@/api/admin.js'
|
||||
import {
|
||||
getUser,
|
||||
addUser,
|
||||
updateUser,
|
||||
getUserTypeListByUserType,
|
||||
} from '@/api/admin.js'
|
||||
export default {
|
||||
name: 'UserInfo',
|
||||
props: {
|
||||
userId: { type: String, default: '' }
|
||||
userId: { type: String, default: '' },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -105,60 +132,69 @@ export default {
|
||||
IsZhiZhun: '',
|
||||
OrganizationName: '',
|
||||
DepartmentName: '',
|
||||
PositionName: ''
|
||||
PositionName: '',
|
||||
},
|
||||
userFormRules: {
|
||||
UserName: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{ max: 50, message: 'The maximum length is 50' }
|
||||
{ max: 50, message: 'The maximum length is 50' },
|
||||
],
|
||||
UserTypeId: [
|
||||
{ required: true, message: 'Please Select', trigger: ['blur', 'change'] }
|
||||
{
|
||||
required: true,
|
||||
message: 'Please Select',
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
IsZhiZhun: [
|
||||
{ required: true, message: 'Please Select', trigger: ['blur', 'change'] }
|
||||
{
|
||||
required: true,
|
||||
message: 'Please Select',
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
OrganizationName: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' }
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
],
|
||||
LastName: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{ max: 50, message: 'The maximum length is 50' }
|
||||
{ max: 50, message: 'The maximum length is 50' },
|
||||
],
|
||||
FirstName: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{ max: 50, message: 'The maximum length is 50' }
|
||||
{ max: 50, message: 'The maximum length is 50' },
|
||||
],
|
||||
Phone: [
|
||||
{ max: 20, min: 7, message: 'The length is 7 to 20', trigger: ['blur'] }
|
||||
{
|
||||
max: 20,
|
||||
min: 7,
|
||||
message: 'The length is 7 to 20',
|
||||
trigger: ['blur'],
|
||||
},
|
||||
],
|
||||
EMail: [
|
||||
{
|
||||
required: true,
|
||||
message: 'Please input the email address',
|
||||
trigger: 'blur'
|
||||
trigger: 'blur',
|
||||
},
|
||||
{
|
||||
type: 'email',
|
||||
message: 'Please input the correct email address',
|
||||
trigger: ['blur']
|
||||
trigger: ['blur'],
|
||||
},
|
||||
{ max: 50, message: 'The maximum length is 50' }
|
||||
],
|
||||
Sex: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' }
|
||||
{ max: 50, message: 'The maximum length is 50' },
|
||||
],
|
||||
Sex: [{ required: true, message: 'Please specify', trigger: 'blur' }],
|
||||
Status: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' }
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
],
|
||||
DepartmentName: [
|
||||
{ max: 50, message: 'The maximum length is 50' }],
|
||||
PositionName: [{ max: 50, message: 'The maximum length is 50' }
|
||||
]
|
||||
DepartmentName: [{ max: 50, message: 'The maximum length is 50' }],
|
||||
PositionName: [{ max: 50, message: 'The maximum length is 50' }],
|
||||
},
|
||||
userTypeOptions: [],
|
||||
isDisabled: false,
|
||||
type: 0 // 1为编辑,0为新增
|
||||
type: 0, // 1为编辑,0为新增
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -172,46 +208,58 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleSave() {
|
||||
this.$refs.userForm.validate(valid => {
|
||||
this.$refs.userForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.isDisabled = true
|
||||
const selectedUserType = this.userTypeOptions.filter(item => item.Id === this.user.UserTypeId)
|
||||
const selectedUserType = this.userTypeOptions.filter(
|
||||
(item) => item.Id === this.user.UserTypeId
|
||||
)
|
||||
if (selectedUserType.length > 0) {
|
||||
this.user.UserTypeEnum = selectedUserType[0].UserTypeEnum
|
||||
}
|
||||
if (this.user.Id) {
|
||||
updateUser(this.user).then(res => {
|
||||
this.isDisabled = false
|
||||
this.$message.success('Updated successfully')
|
||||
}).catch(() => { this.isDisabled = false })
|
||||
updateUser(this.user)
|
||||
.then((res) => {
|
||||
this.isDisabled = false
|
||||
this.$message.success('Updated successfully')
|
||||
})
|
||||
.catch(() => {
|
||||
this.isDisabled = false
|
||||
})
|
||||
} else {
|
||||
addUser(this.user).then(res => {
|
||||
this.isDisabled = false
|
||||
this.user.Id = res.Result.Id
|
||||
this.user.UserCode = res.Result.UserCode
|
||||
this.$emit('getUserId', res.Result.Id)
|
||||
this.$message.success('Added successfully')
|
||||
this.$router.push({ path: '/system/user/list' })
|
||||
}).catch(() => { this.isDisabled = false })
|
||||
addUser(this.user)
|
||||
.then((res) => {
|
||||
this.isDisabled = false
|
||||
this.user.Id = res.Result.Id
|
||||
this.user.UserCode = res.Result.UserCode
|
||||
this.$emit('getUserId', res.Result.Id)
|
||||
this.$message.success('Added successfully')
|
||||
this.$router.push({ path: '/system/user/list' })
|
||||
})
|
||||
.catch(() => {
|
||||
this.isDisabled = false
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getUserTypeList() {
|
||||
getUserTypeListByUserType(0).then(res => {
|
||||
getUserTypeListByUserType(0).then((res) => {
|
||||
if (res.IsSuccess) {
|
||||
this.userTypeOptions = res.Result
|
||||
}
|
||||
})
|
||||
},
|
||||
getUserInfo() {
|
||||
getUser(this.userId).then(res => {
|
||||
getUser({
|
||||
IdentityUserId: this.userId,
|
||||
}).then((res) => {
|
||||
this.user = res.Result
|
||||
})
|
||||
},
|
||||
OrgnizationTypeChanged(val) {
|
||||
this.user.OrganizationName = ''
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -27,7 +27,7 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-collapse-item__header{
|
||||
::v-deep .el-collapse-item__header{
|
||||
background-color: #e9eef1;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .el-collapse-item__header{
|
||||
::v-deep .el-collapse-item__header{
|
||||
background-color: #e9eef1;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
@@ -131,8 +131,8 @@ export default {
|
||||
.then(() => {
|
||||
this.$store.dispatch('user/logout').then(res => {
|
||||
this.$router.push(`/login`)
|
||||
this.$i18n.locale = 'zh'
|
||||
this.setLanguage('zh')
|
||||
//this.$i18n.locale = 'zh'
|
||||
//this.setLanguage('zh')
|
||||
this.$updateDictionary()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<div
|
||||
v-show="item.instanceCount"
|
||||
style="padding: 1px;"
|
||||
>{{ item.modality }} : {{ item.instanceCount }} Series
|
||||
>{{ item.modality }} : {{ item.instanceCount }} image
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -67,6 +67,8 @@ import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
|
||||
// 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,
|
||||
|
||||
@@ -52,10 +52,14 @@
|
||||
</div>
|
||||
<div v-if="item.isExistMutiFrames && item.instanceCount > 1">
|
||||
<el-popover
|
||||
placement="right"
|
||||
trigger="hover"
|
||||
v-model="item.isShowPopper"
|
||||
placement="right-start"
|
||||
trigger="manual"
|
||||
popper-class="instance_frame_wrapper"
|
||||
>
|
||||
<div style="text-align: right;">
|
||||
<i class="el-icon-circle-close" style="font-size: 20px;cursor: pointer;color:#ddd;" @click="item.isShowPopper = false" />
|
||||
</div>
|
||||
<div class="frame_list">
|
||||
<div
|
||||
v-for="(instance, idx) in item.instanceInfoList"
|
||||
@@ -66,11 +70,27 @@
|
||||
>
|
||||
<div>
|
||||
<div>{{ instance.InstanceNumber }}</div>
|
||||
<div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div>
|
||||
<div>
|
||||
{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}
|
||||
</div>
|
||||
<div v-if="showDelete">
|
||||
<span>{{ $t('trials:audit:table:isDelete') }}</span>
|
||||
<el-switch
|
||||
v-model="instance.IsDeleted"
|
||||
size="mini"
|
||||
@change="changeInstanceDeleteStatus($event, item, instance)"
|
||||
/>
|
||||
<span style="margin-left:10px;">{{ $t('trials:audit:table:isReading') }}</span>
|
||||
<el-switch
|
||||
v-model="instance.IsReading"
|
||||
size="mini"
|
||||
@change="changeInstanceReadingStatus($event, item, instance)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;" />
|
||||
<i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;" @click="popperClick(seriesList, item)" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</div>
|
||||
@@ -138,11 +158,13 @@ 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, getPatientSeriesList, setSeriesStatus } from '@/api/trials'
|
||||
import { getInstanceList, getPatientSeriesList, setSeriesStatus, setInstanceStatus } 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,
|
||||
@@ -251,7 +273,7 @@ export default {
|
||||
},
|
||||
async loadPatientStudy() {
|
||||
try {
|
||||
let data = await getPatientSeriesList(this.studyId);
|
||||
const data = await getPatientSeriesList(this.studyId)
|
||||
if (data.IsSuccess) {
|
||||
const { Result } = data
|
||||
var seriesList = []
|
||||
@@ -294,7 +316,8 @@ export default {
|
||||
tpCode: this.tpCode,
|
||||
loadStatus: false,
|
||||
imageloadedArr: [],
|
||||
isExistMutiFrames: item.IsExistMutiFrames
|
||||
isExistMutiFrames: item.IsExistMutiFrames,
|
||||
isShowPopper: false
|
||||
})
|
||||
})
|
||||
this.seriesList = seriesList
|
||||
@@ -353,7 +376,8 @@ export default {
|
||||
tpCode: this.tpCode,
|
||||
loadStatus: false,
|
||||
imageloadedArr: [],
|
||||
isExistMutiFrames: item.IsExistMutiFrames
|
||||
isExistMutiFrames: item.IsExistMutiFrames,
|
||||
isShowPopper: false
|
||||
})
|
||||
})
|
||||
this.seriesList = seriesList
|
||||
@@ -382,8 +406,8 @@ export default {
|
||||
if (!res.Result || (res.Result && res.Result.length === 0)) return
|
||||
var seriesInstanceUid = res.Result[0].SeriesInstanceUid
|
||||
var sliceThickness = res.Result[0].SliceThickness
|
||||
var isReading = res.Result[0].IsReading
|
||||
var isDeleted = res.Result[0].IsDeleted
|
||||
var isReading = res.OtherInfo.IsReading
|
||||
var isDeleted = res.OtherInfo.IsDeleted
|
||||
var seriesList = []
|
||||
var imageIds = []
|
||||
let isExistMutiFrames = false
|
||||
@@ -401,7 +425,7 @@ export default {
|
||||
imageIds.push(path)
|
||||
imageId = path
|
||||
}
|
||||
instanceInfoList.push({ Id: instance.Id, InstanceNumber: instance.InstanceNumber, NumberOfFrames: instance.NumberOfFrames, Path: instance.Path, ImageId: imageId })
|
||||
instanceInfoList.push({ Id: instance.Id, InstanceNumber: instance.InstanceNumber, NumberOfFrames: instance.NumberOfFrames, Path: instance.Path, ImageId: imageId, IsDeleted: instance.IsDeleted, IsReading: instance.IsReading })
|
||||
})
|
||||
seriesList.push({
|
||||
trialId,
|
||||
@@ -422,7 +446,8 @@ export default {
|
||||
prefetchInstanceCount: 0,
|
||||
loadStatus: false,
|
||||
imageloadedArr: [],
|
||||
isExistMutiFrames: isExistMutiFrames
|
||||
isExistMutiFrames: isExistMutiFrames,
|
||||
isShowPopper: false
|
||||
})
|
||||
this.seriesList = seriesList
|
||||
if (this.seriesList.length > 0) {
|
||||
@@ -571,7 +596,8 @@ export default {
|
||||
hasLabel: seriesInfo.HasLabel,
|
||||
keySeries: seriesInfo.KeySeries,
|
||||
loadStatus: false,
|
||||
imageloadedArr: []
|
||||
imageloadedArr: [],
|
||||
isShowPopper: false
|
||||
})
|
||||
this.seriesList = seriesList
|
||||
if (this.seriesList.length > 0) {
|
||||
@@ -669,6 +695,81 @@ export default {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async changeInstanceReadingStatus(callback, series, instance) {
|
||||
let statusStr = ''
|
||||
if (callback) {
|
||||
statusStr = this.$t('trials:audit:label:setSeriesReading')
|
||||
instance.IsReading = false
|
||||
} else {
|
||||
statusStr = this.$t('trials:audit:label:setSeriesNotReading')
|
||||
instance.IsReading = true
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !instance.IsReading))
|
||||
const confirm = await this.$confirm(
|
||||
message,
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
const state = instance.IsReading ? 1 : 2
|
||||
this.loading = true
|
||||
try {
|
||||
const res = await setInstanceStatus(series.trialId, series.subjectVisitId, series.seriesId, instance.Id, state)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
instance.IsReading = !instance.IsReading
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async changeInstanceDeleteStatus(callback, series, instance) {
|
||||
let statusStr = ''
|
||||
if (callback) {
|
||||
statusStr = this.$t('trials:audit:label:setSeriesDeleted')
|
||||
instance.IsDeleted = false
|
||||
} else {
|
||||
statusStr = this.$t('trials:audit:label:setSeriesNotDelete')
|
||||
instance.IsDeleted = true
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !instance.IsDeleted))
|
||||
const confirm = await this.$confirm(
|
||||
message,
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
const state = instance.IsDeleted ? 5 : 4
|
||||
this.loading = true
|
||||
try {
|
||||
const res = await setInstanceStatus(series.trialId, series.subjectVisitId, series.seriesId, instance.Id, state)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
instance.IsDeleted = !instance.IsDeleted
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
popperClick(seriesList, series) {
|
||||
for (let i = 0; i < seriesList.length; i++) {
|
||||
if (seriesList[i].isShowPopper) {
|
||||
seriesList[i].isShowPopper = false
|
||||
}
|
||||
}
|
||||
series.isShowPopper = !series.isShowPopper
|
||||
},
|
||||
loadAllImages() {
|
||||
const seriesIndex = this.seriesList.findIndex(i => i.loadStatus === false)
|
||||
if (seriesIndex === -1) return
|
||||
@@ -946,8 +1047,8 @@ export default {
|
||||
background: #d0d0d0;
|
||||
}
|
||||
.frame_content{
|
||||
height: 50px;
|
||||
padding: 5px;
|
||||
/* height: 50px; */
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
color: #ddd;
|
||||
|
||||
@@ -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;">
|
||||
@@ -59,34 +59,56 @@
|
||||
<div>#{{ series.seriesNumber }}</div>
|
||||
<div v-if="series.isExistMutiFrames && series.instanceCount > 1">
|
||||
<el-popover
|
||||
placement="right"
|
||||
trigger="hover"
|
||||
v-model="series.isShowPopper"
|
||||
placement="right-start"
|
||||
trigger="manual"
|
||||
popper-class="instance_frame_wrapper"
|
||||
>
|
||||
<div
|
||||
v-for="(instance, idx) in series.instanceInfoList"
|
||||
:key="instance.Id"
|
||||
class="frame_content"
|
||||
:style="{'margin-bottom':idx<series.instanceInfoList.length-1? '5px':'0px'}"
|
||||
@click="showMultiFrames(index,series, i, instance)"
|
||||
>
|
||||
<!-- <div>
|
||||
<img
|
||||
class="image-preview"
|
||||
:src="series.previewImageUrl"
|
||||
crossorigin="anonymous"
|
||||
alt=""
|
||||
style="width: 40px;height:40px;"
|
||||
fit="fill"
|
||||
>
|
||||
</div> -->
|
||||
<div>
|
||||
<div>{{ instance.InstanceNumber }}</div>
|
||||
<div>{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}</div>
|
||||
</div>
|
||||
|
||||
<div style="text-align: right;">
|
||||
<i class="el-icon-circle-close" style="font-size: 20px;cursor: pointer;color:#ddd;" @click="series.isShowPopper = false" />
|
||||
</div>
|
||||
<i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;" />
|
||||
<div class="frame_list">
|
||||
<div
|
||||
v-for="(instance, idx) in series.instanceInfoList"
|
||||
:key="instance.Id"
|
||||
class="frame_content"
|
||||
:style="{'margin-bottom':idx<series.instanceInfoList.length-1? '5px':'0px'}"
|
||||
@click="showMultiFrames(index,series, i, instance)"
|
||||
>
|
||||
<!-- <div>
|
||||
<img
|
||||
class="image-preview"
|
||||
:src="series.previewImageUrl"
|
||||
crossorigin="anonymous"
|
||||
alt=""
|
||||
style="width: 40px;height:40px;"
|
||||
fit="fill"
|
||||
>
|
||||
</div> -->
|
||||
<div>
|
||||
<div>{{ instance.InstanceNumber }}</div>
|
||||
<div>
|
||||
{{ `${instance.NumberOfFrames > 0 ? instance.NumberOfFrames : 1} frame` }}
|
||||
</div>
|
||||
<div v-if="showDelete">
|
||||
<span>{{ $t('trials:audit:table:isDelete') }}</span>
|
||||
<el-switch
|
||||
v-model="instance.IsDeleted"
|
||||
size="mini"
|
||||
@change="changeInstanceDeleteStatus($event, series, instance)"
|
||||
/>
|
||||
<span style="margin-left:10px;">{{ $t('trials:audit:table:isReading') }}</span>
|
||||
<el-switch
|
||||
v-model="instance.IsReading"
|
||||
size="mini"
|
||||
@change="changeInstanceReadingStatus($event, series, instance)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<i slot="reference" class="el-icon-connection" style="font-size: 15px;cursor: pointer;" @click="popperClick(studyList, series)" />
|
||||
</el-popover>
|
||||
</div>
|
||||
|
||||
@@ -143,7 +165,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 v-if="!visitTaskId" :label="$t('trials:dicom-show:relatedVisit')" name="relation-study" class="pane-relation-wrapper">
|
||||
<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}`">
|
||||
@@ -196,8 +218,8 @@
|
||||
<div v-else>#{{ seriesItem.seriesNumber }}</div>
|
||||
<div v-if="seriesItem.isExistMutiFrames && seriesItem.instanceCount > 1">
|
||||
<el-popover
|
||||
placement="right"
|
||||
trigger="hover"
|
||||
placement="right-start"
|
||||
trigger="click"
|
||||
popper-class="instance_frame_wrapper"
|
||||
>
|
||||
<div class="frame_list">
|
||||
@@ -260,10 +282,13 @@ import * as cornerstone from 'cornerstone-core'
|
||||
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 { setSeriesStatus, setInstanceStatus } 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,
|
||||
@@ -301,7 +326,9 @@ export default {
|
||||
relationActiveName: [],
|
||||
showSeriesList: [],
|
||||
currentLoadIns: [],
|
||||
isFromCRCUpload: false
|
||||
isFromCRCUpload: false,
|
||||
visitTaskId: null,
|
||||
page: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -318,6 +345,8 @@ export default {
|
||||
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)
|
||||
@@ -338,7 +367,14 @@ export default {
|
||||
async getStudiesInfo() {
|
||||
this.studyList = []
|
||||
try {
|
||||
const res = await getVisitStudyList(this.trialId, this.subjectVisitId, this.isReading)
|
||||
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 = {}
|
||||
@@ -385,7 +421,8 @@ export default {
|
||||
prefetchInstanceCount: 0,
|
||||
loadStatus: false,
|
||||
imageloadedArr: [],
|
||||
isExistMutiFrames: series.IsExistMutiFrames
|
||||
isExistMutiFrames: series.IsExistMutiFrames,
|
||||
isShowPopper: false
|
||||
})
|
||||
})
|
||||
data.SeriesList = seriesList
|
||||
@@ -581,6 +618,83 @@ export default {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async changeInstanceReadingStatus(callback, series, instance) {
|
||||
let statusStr = ''
|
||||
if (callback) {
|
||||
statusStr = this.$t('trials:audit:label:setSeriesReading')
|
||||
instance.IsReading = false
|
||||
} else {
|
||||
statusStr = this.$t('trials:audit:label:setSeriesNotReading')
|
||||
instance.IsReading = true
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !instance.IsReading))
|
||||
const confirm = await this.$confirm(
|
||||
message,
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
const state = instance.IsReading ? 1 : 2
|
||||
this.loading = true
|
||||
try {
|
||||
const res = await setInstanceStatus(series.trialId, series.subjectVisitId, series.seriesId, instance.Id, state)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
instance.IsReading = !instance.IsReading
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async changeInstanceDeleteStatus(callback, series, instance) {
|
||||
let statusStr = ''
|
||||
if (callback) {
|
||||
statusStr = this.$t('trials:audit:label:setSeriesDeleted')
|
||||
instance.IsDeleted = false
|
||||
} else {
|
||||
statusStr = this.$t('trials:audit:label:setSeriesNotDelete')
|
||||
instance.IsDeleted = true
|
||||
}
|
||||
var message = this.$t('trials:audit:message:changeSeriesStatus').replace('xxx', statusStr)
|
||||
message = message.replace('yyy', this.$fd('YesOrNo', !instance.IsDeleted))
|
||||
const confirm = await this.$confirm(
|
||||
message,
|
||||
{
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true
|
||||
}
|
||||
)
|
||||
if (confirm !== 'confirm') return
|
||||
|
||||
const state = instance.IsDeleted ? 5 : 4
|
||||
this.loading = true
|
||||
try {
|
||||
const res = await setInstanceStatus(series.trialId, series.subjectVisitId, series.seriesId, instance.Id, state)
|
||||
this.loading = false
|
||||
if (res.IsSuccess) {
|
||||
instance.IsDeleted = !instance.IsDeleted
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
window.opener.postMessage({ type: 'refreshSeriesList', data: '' }, window.location)
|
||||
}
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
popperClick(studyList, series) {
|
||||
for (let i = 0; i < studyList.length; i++) {
|
||||
for (let j = 0; j < studyList[i].SeriesList.length; j++) {
|
||||
if (studyList[i].SeriesList[j].isShowPopper) {
|
||||
studyList[i].SeriesList[j].isShowPopper = false
|
||||
}
|
||||
}
|
||||
}
|
||||
series.isShowPopper = !series.isShowPopper
|
||||
},
|
||||
// 切换关联检查Tab时获取关联检查信息
|
||||
async handleTabClick(tab, event) {
|
||||
if (tab.name === 'relation-study' && this.relationStudyList.length <= 0) {
|
||||
@@ -657,7 +771,8 @@ export default {
|
||||
keySeries: item.KeySeries,
|
||||
loadStatus: false,
|
||||
imageloadedArr: [],
|
||||
isExistMutiFrames: item.IsExistMutiFrames
|
||||
isExistMutiFrames: item.IsExistMutiFrames,
|
||||
isShowPopper: false
|
||||
})
|
||||
})
|
||||
scope.relationStudyList[index].seriesCount = seriesList.length
|
||||
@@ -964,9 +1079,21 @@ 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;
|
||||
/* height: 50px; */
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
color: #ddd;
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
</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" :key="`IsDeleted${item.value}`" :label="item.value">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述">
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
label="更新时间"
|
||||
label="上传时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
<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" :key="`IsDeleted${item.value}`" :label="item.value">{{ item.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述">
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
label="更新时间"
|
||||
label="上传时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<el-form-item>
|
||||
<!-- 查询 -->
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||
{{ $t("common:button:search") }}
|
||||
{{ $t('common:button:search') }}
|
||||
</el-button>
|
||||
<!-- 重置 -->
|
||||
<el-button
|
||||
@@ -34,7 +34,7 @@
|
||||
icon="el-icon-refresh-left"
|
||||
@click="handleReset"
|
||||
>
|
||||
{{ $t("common:button:reset") }}
|
||||
{{ $t('common:button:reset') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-button
|
||||
@@ -44,7 +44,7 @@
|
||||
size="small"
|
||||
@click="handleAdd"
|
||||
>
|
||||
{{ $t("common:button:new") }}
|
||||
{{ $t('common:button:new') }}
|
||||
</el-button>
|
||||
</el-form>
|
||||
</template>
|
||||
@@ -74,7 +74,7 @@
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
$fd(
|
||||
"Common_File_BusinessScenario",
|
||||
'Common_File_BusinessScenario',
|
||||
scope.row.BusinessScenarioEnum
|
||||
)
|
||||
}}
|
||||
@@ -106,10 +106,10 @@
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||
$fd("YesOrNo", scope.row.IsDeleted)
|
||||
$fd('YesOrNo', scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
<el-tag v-else type="primary">{{
|
||||
$fd("YesOrNo", scope.row.IsDeleted)
|
||||
$fd('YesOrNo', scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -122,14 +122,17 @@
|
||||
|
||||
<el-table-column :label="$t('common:action:action')">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="PreviewFile(scope.row)">
|
||||
{{ $t('common:button:preview') }}
|
||||
</el-button>
|
||||
<el-button type="text" @click="handleDownload(scope.row)">
|
||||
{{ $t("common:button:download") }}
|
||||
{{ $t('common:button:download') }}
|
||||
</el-button>
|
||||
<el-button type="text" @click="handleEdit(scope.row)">
|
||||
{{ $t("common:button:edit") }}
|
||||
{{ $t('common:button:edit') }}
|
||||
</el-button>
|
||||
<el-button type="text" @click="handleDelete(scope.row)">
|
||||
{{ $t("common:button:delete") }}
|
||||
{{ $t('common:button:delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -166,22 +169,22 @@ import {
|
||||
getCommonDocumentList,
|
||||
DownloadCommonDoc,
|
||||
deleteCommonDocument,
|
||||
} from "@/api/dictionary";
|
||||
import BaseContainer from "@/components/BaseContainer";
|
||||
import Pagination from "@/components/Pagination";
|
||||
import TemplateForm from "./TemplateForm";
|
||||
const FileTypeEnum = 2;
|
||||
} from '@/api/dictionary'
|
||||
import BaseContainer from '@/components/BaseContainer'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import TemplateForm from './TemplateForm'
|
||||
const FileTypeEnum = 2
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
FileTypeEnum: FileTypeEnum,
|
||||
BusinessScenarioEnum: null,
|
||||
Name: "",
|
||||
Name: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20,
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: "ExportTemplate",
|
||||
name: 'ExportTemplate',
|
||||
components: { BaseContainer, Pagination, TemplateForm },
|
||||
data() {
|
||||
return {
|
||||
@@ -189,86 +192,97 @@ export default {
|
||||
list: [],
|
||||
total: 0,
|
||||
currentRow: {},
|
||||
editDialog: { title: "", visible: false },
|
||||
editDialog: { title: '', visible: false },
|
||||
loading: false,
|
||||
};
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
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(
|
||||
this.$t("dictionary:attachment:export:confirm:delete")
|
||||
this.$t('dictionary:attachment:export:confirm:delete')
|
||||
).then(() => {
|
||||
deleteCommonDocument(row.Id).then(() => {
|
||||
this.$message.success(this.$t("common:message:deletedSuccessfully"));
|
||||
this.getList();
|
||||
});
|
||||
});
|
||||
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||
this.getList()
|
||||
})
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.loading = true
|
||||
getCommonDocumentList(this.searchData)
|
||||
.then((res) => {
|
||||
this.loading = false;
|
||||
this.list = res.Result.CurrentPageData;
|
||||
this.total = res.Result.TotalCount;
|
||||
this.loading = false
|
||||
this.list = res.Result.CurrentPageData
|
||||
this.total = res.Result.TotalCount
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.editDialog.title = "Add";
|
||||
this.currentRow = { FileTypeEnum: FileTypeEnum };
|
||||
this.editDialog.visible = true;
|
||||
this.editDialog.title = 'Add'
|
||||
this.currentRow = { FileTypeEnum: FileTypeEnum }
|
||||
this.editDialog.visible = true
|
||||
},
|
||||
// 下载
|
||||
handleDownload(row) {
|
||||
this.loading = true;
|
||||
this.loading = true
|
||||
DownloadCommonDoc(row.Code)
|
||||
.then((data) => {
|
||||
this.loading = false;
|
||||
this.loading = false
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 编辑
|
||||
handleEdit(row) {
|
||||
this.editDialog.title = "Edit";
|
||||
this.currentRow = { ...row };
|
||||
this.editDialog.visible = true;
|
||||
this.editDialog.title = 'Edit'
|
||||
this.currentRow = { ...row }
|
||||
this.editDialog.visible = true
|
||||
},
|
||||
handleSearch() {
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
handleReset() {
|
||||
this.searchData = searchDataDefault();
|
||||
this.getList();
|
||||
this.searchData = searchDataDefault()
|
||||
this.getList()
|
||||
},
|
||||
closeDialog() {
|
||||
this.editDialog.visible = false;
|
||||
this.editDialog.visible = false
|
||||
},
|
||||
// 排序
|
||||
handleSortChange(column) {
|
||||
if (column.order === "ascending") {
|
||||
this.searchData.Asc = true;
|
||||
if (column.order === 'ascending') {
|
||||
this.searchData.Asc = true
|
||||
} else {
|
||||
this.searchData.Asc = false;
|
||||
this.searchData.Asc = false
|
||||
}
|
||||
this.searchData.SortField = column.prop;
|
||||
this.searchData.PageIndex = 1;
|
||||
this.getList();
|
||||
this.searchData.SortField = column.prop
|
||||
this.searchData.PageIndex = 1
|
||||
this.getList()
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .search{
|
||||
::v-deep .search {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -3,16 +3,19 @@
|
||||
ref="sysAttachmentFrom"
|
||||
v-loading="loading"
|
||||
:model="form"
|
||||
label-width="170px"
|
||||
label-width="190px"
|
||||
size="small"
|
||||
:rules="rules"
|
||||
class="upload-temporary-file"
|
||||
>
|
||||
<div class="base-dialog-body">
|
||||
<el-form-item label="文件类型: " prop="FileTypeId">
|
||||
<el-form-item
|
||||
:label="$t('dictionary:signature:form:FileTypeId')"
|
||||
prop="FileTypeId"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.FileTypeId"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
filterable
|
||||
>
|
||||
@@ -25,7 +28,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="文件: ">
|
||||
<el-form-item :label="$t('dictionary:signature:form:File')">
|
||||
<div class="upload-container">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
@@ -41,21 +44,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"
|
||||
>{{ $t('common:button:check') }}</el-button
|
||||
>
|
||||
(must be in pdf format)
|
||||
<span slot="tip" style="margin-left: 10px" class="el-upload__tip">
|
||||
({{ $t('trials:signature:label:mustBepdf') }})
|
||||
</span>
|
||||
</el-upload>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="需要签署的用户类型: " prop="NeedConfirmedUserTypeIdList">
|
||||
<el-form-item
|
||||
:label="$t('dictionary:signature:form:NeedConfirmedUserTypeIdList')"
|
||||
prop="NeedConfirmedUserTypeIdList"
|
||||
>
|
||||
<el-select
|
||||
v-model="form.NeedConfirmedUserTypeIdList"
|
||||
style="width:100%;"
|
||||
style="width: 100%"
|
||||
multiple
|
||||
>
|
||||
<el-option
|
||||
@@ -66,7 +74,21 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="查看最短时间(分钟): " prop="SignViewMinimumMinutes">
|
||||
<el-form-item
|
||||
:label="$t('dictionary:signature:form:DocUserSignType')"
|
||||
prop="DocUserSignType"
|
||||
>
|
||||
<el-switch
|
||||
v-model="form.DocUserSignType"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
>
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('dictionary:signature:form:SignViewMinimumMinutes')"
|
||||
prop="SignViewMinimumMinutes"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="form.SignViewMinimumMinutes"
|
||||
controls-position="right"
|
||||
@@ -81,9 +103,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"
|
||||
>{{ $t('common:button:save') }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
@@ -96,8 +125,10 @@ export default {
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default() { return {} }
|
||||
}
|
||||
default() {
|
||||
return {}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
@@ -108,19 +139,38 @@ 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: this.$t('common:ruleMessage:select'),
|
||||
trigger: ['blur'],
|
||||
},
|
||||
],
|
||||
SignViewMinimumMinutes: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:specify'),
|
||||
trigger: ['change'],
|
||||
},
|
||||
],
|
||||
NeedConfirmedUserTypeIdList: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('common:ruleMessage:select'),
|
||||
trigger: ['blur'],
|
||||
},
|
||||
],
|
||||
},
|
||||
fileList: [],
|
||||
userTypeOptions: [],
|
||||
btnLoading: false,
|
||||
saveBtnLoading: false,
|
||||
loading: false,
|
||||
dictionaryList: {}
|
||||
dictionaryList: {},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -137,8 +187,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 +197,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) {
|
||||
// 检测文件类型是否符合要求
|
||||
@@ -173,7 +229,7 @@ export default {
|
||||
this.fileList = []
|
||||
return true
|
||||
} else {
|
||||
this.$alert('must be in pdf format')
|
||||
this.$alert(this.$t('trials:signature:label:mustBepdf'))
|
||||
|
||||
return false
|
||||
}
|
||||
@@ -181,28 +237,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.')
|
||||
this.$alert(this.$t('trials:signature:message:selectFile'))
|
||||
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(this.$t('common:message:updatedSuccessfully'))
|
||||
})
|
||||
.catch(() => {
|
||||
this.saveBtnLoading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
handleRemoveFile() {
|
||||
@@ -216,23 +281,25 @@ export default {
|
||||
}
|
||||
},
|
||||
handleExceed(files, fileList) {
|
||||
this.$message.warning(`Upload is currently limited to 1 file`)
|
||||
this.$message.warning(this.$t('upload:rule:maxFile1'))
|
||||
},
|
||||
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 +312,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-form-item :label="$t('dictionary:signature:search:FileTypeId')">
|
||||
<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-form-item :label="$t('dictionary:signature:search:Name')">
|
||||
<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; margin-bottom: 10px"
|
||||
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
|
||||
@@ -58,81 +53,99 @@
|
||||
<el-table-column type="index" width="40" />
|
||||
<el-table-column
|
||||
prop="FileType"
|
||||
label="文件类型"
|
||||
:label="$t('dictionary:signature:table:FileType')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="Name"
|
||||
label="文件名称"
|
||||
:label="$t('dictionary:signature:table:Name')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="SignViewMinimumMinutes"
|
||||
label="查看最短时间(分钟)"
|
||||
:label="$t('dictionary:signature:table:SignViewMinimumMinutes')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
min-width="110"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="NeedConfirmedUserTypes"
|
||||
label="需要签署的用户类型"
|
||||
:label="$t('dictionary:signature:table:NeedConfirmedUserTypes')"
|
||||
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
|
||||
prop="IsDeleted"
|
||||
label="是否废除"
|
||||
:label="$t('dictionary:signature:table:IsDeleted')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.IsDeleted?'Yes':'No' }}
|
||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||
$fd('TrainingStatus', scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
<el-tag v-else type="primary">{{
|
||||
$fd('TrainingStatus', scope.row.IsDeleted)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="UpdateTime"
|
||||
label="更新时间"
|
||||
prop="DocUserSignType"
|
||||
:label="$t('dictionary:signature:table:DocUserSignType')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
min-width="90"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $fd('ReadingYesOrNo', Number(scope.row.DocUserSignType)) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="CreateTime"
|
||||
:label="$t('dictionary:signature:table:CreateTime')"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
<el-table-column label="Action">
|
||||
<el-table-column :label="$t('common:action:action')" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handlePreview(scope.row)"
|
||||
>
|
||||
预览
|
||||
<el-button type="text" @click="handlePreview(scope.row)">
|
||||
{{ $t('common:button:preview') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleEdit(scope.row)"
|
||||
>
|
||||
编辑
|
||||
<el-button type="text" @click="handleEdit(scope.row)">
|
||||
{{ $t('common:button:edit') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
:disabled="scope.row.IsDeleted"
|
||||
type="text"
|
||||
@click="handleRepeal(scope.row)"
|
||||
>
|
||||
废除
|
||||
{{ $t('common:button:revoke') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
>
|
||||
删除
|
||||
<el-button type="text" @click="handleDelete(scope.row)">
|
||||
{{ $t('common:button:delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination class="page" :total="total" :page.sync="searchData.PageIndex" :limit.sync="searchData.PageSize" @pagination="getList" />
|
||||
<pagination
|
||||
class="page"
|
||||
:total="total"
|
||||
:page.sync="searchData.PageIndex"
|
||||
:limit.sync="searchData.PageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 新增/编辑 -->
|
||||
<el-dialog
|
||||
@@ -143,7 +156,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 +172,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 +198,7 @@ const searchDataDefault = () => {
|
||||
FileTypeId: '',
|
||||
Name: '',
|
||||
PageIndex: 1,
|
||||
PageSize: 20
|
||||
PageSize: 20,
|
||||
}
|
||||
}
|
||||
export default {
|
||||
@@ -193,7 +216,7 @@ export default {
|
||||
editVisible: false,
|
||||
previewVisible: false,
|
||||
title: '',
|
||||
loading: false
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -203,22 +226,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 +255,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
|
||||
},
|
||||
// 编辑
|
||||
@@ -241,42 +268,52 @@ export default {
|
||||
},
|
||||
// 废除
|
||||
handleRepeal(row) {
|
||||
this.$confirm('是否确认废除此文件?', {
|
||||
this.$confirm(this.$t('dictionary:signature:confirm:delFile'), {
|
||||
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(
|
||||
this.$t('common:message:deletedSuccessfully')
|
||||
)
|
||||
}
|
||||
})
|
||||
.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 +342,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,42 +101,46 @@
|
||||
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="上传时间"
|
||||
show-overflow-tooltip
|
||||
sortable="custom"
|
||||
/>
|
||||
|
||||
<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%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="模块">
|
||||
<el-select v-model="queryParams.ModuleTypeId" placeholder="模块" clearable size="small">
|
||||
<el-option v-for="item of dict.type.ModuleType" :value="item.value" :label="item.raw.ValueCN" />
|
||||
<el-option v-for="item of dict.type.ModuleType" :key="`ModuleTypeId${item.value}`" :value="item.value" :label="item.raw.ValueCN" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@@ -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="请输入字段英文" />
|
||||
@@ -164,28 +169,28 @@
|
||||
<el-col v-show="form.ConfigType === 'M' && title !== '复制'" :span="12">
|
||||
<el-form-item label="功能模块" prop="menuType">
|
||||
<el-select v-model="form.ModuleTypeId" placeholder="模块" clearable size="small" @change="changeModule">
|
||||
<el-option v-for="item of dict.type.ModuleType" :value="item.value" :label="item.raw.ValueCN" />
|
||||
<el-option v-for="item of dict.type.ModuleType" :key="`ModuleType${item.value}`" :value="item.value" :label="item.raw.ValueCN" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-show="form.ConfigType === 'M' && title !== '复制'" :span="12">
|
||||
<el-form-item label="操作类型" prop="menuType">
|
||||
<el-select v-model="form.OptTypeId" placeholder="操作类型" clearable size="small" @change="changeDescription">
|
||||
<el-option v-for="item of dict.type.OptType" :value="item.value" :label="item.raw.ValueCN" />
|
||||
<el-option v-for="item of dict.type.OptType" :key="`OptTypeId${item.value}`" :value="item.value" :label="item.raw.ValueCN" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-show="form.ConfigType === 'M' && title !== '复制'" :span="12">
|
||||
<el-form-item label="对象类型" prop="menuType">
|
||||
<el-select v-model="form.ObjectTypeId" placeholder="对象类型" clearable size="small" @change="changeDescription">
|
||||
<el-option v-for="item of dict.type.ObjectType" v-if="ChildGroup === item.raw.ChildGroup" :value="item.value" :label="item.raw.ValueCN" />
|
||||
<el-option v-for="item of dict.type.ObjectType" :key="`ObjectType${item.value}`" v-if="ChildGroup === item.raw.ChildGroup" :value="item.value" :label="item.raw.ValueCN" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-show="form.ConfigType === 'M' && title !== '复制'" :span="12">
|
||||
<el-form-item label="数据类型" prop="menuType">
|
||||
<el-select v-model="form.ChildrenTypeId" placeholder="操作子类" clearable size="small" @change="changeDescription">
|
||||
<el-option v-for="item of dict.type.ChildrenType" :value="item.value" :label="item.raw.ValueCN" />
|
||||
<el-option v-for="item of dict.type.ChildrenType" :key="`ChildrenType${item.value}`" :value="item.value" :label="item.raw.ValueCN" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -290,7 +295,7 @@
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show="form.DataType === 'Router'" v-if="form.UrlConfig && form.UrlConfig.IsHaveParameters" v-for="(item,index) of form.UrlConfig ? form.UrlConfig.ParameterList : []">
|
||||
<el-row v-show="form.DataType === 'Router'" v-if="form.UrlConfig && form.UrlConfig.IsHaveParameters" v-for="(item,index) of form.UrlConfig ? form.UrlConfig.ParameterList : []" :key="`Router${index}`">
|
||||
<el-col :span="10">
|
||||
<el-form-item>
|
||||
<span slot="label">
|
||||
@@ -666,11 +671,11 @@
|
||||
<div style="padding: 0 40px;display: flex;flex-direction: column">
|
||||
<div style="text-align: right;height: 50px;">
|
||||
<el-select v-model="copeParams.FromItemId" collapse-tags filterable placeholder="完全拷贝对象" clearable size="small">
|
||||
<el-option v-for="item of list" v-if="drawer_cfg.drawerChild && item.ConfigType === 'M' && item.ObjectTypeId === selectRow.ObjectTypeId && item.OptTypeId && item.ChildrenTypeId " :value="item.Id" :label="item.DescriptionCN" />
|
||||
<el-option v-for="item of list" :key="item.Id" v-if="drawer_cfg.drawerChild && item.ConfigType === 'M' && item.ObjectTypeId === selectRow.ObjectTypeId && item.OptTypeId && item.ChildrenTypeId " :value="item.Id" :label="item.DescriptionCN" />
|
||||
</el-select>
|
||||
<el-button type="primary" size="mini" style="margin-right: 10px" @click="handleOverCope(selectRow)">完全拷贝</el-button>
|
||||
<el-select v-model="copeParams.DataSourceGuids" multiple collapse-tags filterable placeholder="拷贝对象" clearable size="small">
|
||||
<el-option v-for="item of list" v-if="drawer_cfg.drawerChild && item.ConfigType === 'M' && item.ObjectTypeId === selectRow.ObjectTypeId && item.OptTypeId && item.ChildrenTypeId " :value="item.Id" :label="item.DescriptionCN" />
|
||||
<el-option v-for="item of list" :key="item.Id" v-if="drawer_cfg.drawerChild && item.ConfigType === 'M' && item.ObjectTypeId === selectRow.ObjectTypeId && item.OptTypeId && item.ChildrenTypeId " :value="item.Id" :label="item.DescriptionCN" />
|
||||
</el-select>
|
||||
<el-button type="primary" size="mini" @click="handleCope(selectRow)">拷贝</el-button>
|
||||
<el-button type="primary" size="mini" @click="handleAdd(selectRow)">新建</el-button>
|
||||
@@ -686,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
|
||||
@@ -1143,6 +1149,7 @@ export default {
|
||||
IsShowParent: 0,
|
||||
Sort: 0,
|
||||
Code: null,
|
||||
CodeEn: null,
|
||||
Value: null,
|
||||
ValueCN: null,
|
||||
EnumType: '',
|
||||
|
||||
@@ -1,411 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container my_menu">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="操作名">
|
||||
<el-input
|
||||
v-model="queryParams.menuName"
|
||||
placeholder="请输入操作名"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="模块">
|
||||
<el-select v-model="queryParams.visible" placeholder="模块" clearable size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div>
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
icon="el-icon-sort"
|
||||
size="mini"
|
||||
@click="toggleExpandAll"
|
||||
>展开/折叠</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-if="refreshTable"
|
||||
v-loading="loading"
|
||||
:data="menuList"
|
||||
:default-expand-all="isExpandAll"
|
||||
row-key="Id"
|
||||
:tree-props="{children: 'Children', hasChildren: 'hasChildren'}"
|
||||
>
|
||||
<el-table-column prop="ModuleTypeValueCN" label="模块" align="left" min-width="230px" />
|
||||
<el-table-column prop="OptTypeValueCN" label="操作类型" min-width="120px" />
|
||||
<el-table-column prop="ChildrenTypeValueCN" label="操作子类" min-width="120px" show-overflow-tooltip />
|
||||
<el-table-column prop="Description" label="操作名称" :show-overflow-tooltip="true" min-width="200px" />
|
||||
<el-table-column prop="Code" 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 label="启用" align="center" prop="CreateTime" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsEnable" size="success">启用</el-tag>
|
||||
<el-tag v-else size="danger">禁用</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否使用父数据" align="center" prop="CreateTime" min-width="130">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.IsShowParent" size="success">父数据</el-tag>
|
||||
<el-tag v-else size="danger">子数据</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="180" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.ConfigType === 'M'"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd(scope.row)"
|
||||
>新增</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 添加或修改菜单对话框 -->
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="680px" append-to-body>
|
||||
<el-form ref="form" :model="form" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="选择操作">
|
||||
<treeselect
|
||||
v-model="form.ParentId"
|
||||
:options="menuOptions"
|
||||
:normalizer="normalizer"
|
||||
:show-count="true"
|
||||
placeholder="选择上级操作"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-show="form.ConfigType === 'M'">
|
||||
<el-form-item label="模块" prop="menuType">
|
||||
<el-select v-model="form.ModuleTypeId" placeholder="模块" clearable size="small" @change="changeDescription">
|
||||
<el-option v-for="item of dict.type.ModuleType" :value="item.value" :label="item.raw.ValueCN"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-show="form.ConfigType === 'M'">
|
||||
<el-form-item label="操作类型" prop="menuType">
|
||||
<el-select v-model="form.OptTypeId" placeholder="操作类型" clearable size="small" @change="changeDescription">
|
||||
<el-option v-for="item of dict.type.OptType" :value="item.value" :label="item.raw.ValueCN"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-show="form.ConfigType === 'M'">
|
||||
<el-form-item label="操作子类" prop="menuType">
|
||||
<el-select v-model="form.ChildrenTypeId" placeholder="操作子类" clearable size="small" @change="changeDescription">
|
||||
<el-option v-for="item of dict.type.ChildrenType" :value="item.value" :label="item.raw.ValueCN"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-show="form.ConfigType == 'M'">
|
||||
<el-form-item label="名称" prop="Description">
|
||||
<el-input v-model="form.Description" placeholder="请输入名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="显示排序" prop="ShowOrder">
|
||||
<el-input-number v-model="form.Sort" controls-position="right" :min="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item>
|
||||
<span slot="label">
|
||||
是否启用
|
||||
</span>
|
||||
<el-switch
|
||||
v-model="form.IsEnable"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-show="form.ConfigType === 'C'">
|
||||
<el-form-item>
|
||||
<span slot="label">
|
||||
继承父数据
|
||||
</span>
|
||||
<el-switch
|
||||
v-model="form.IsShowParent"
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-show="form.ConfigType === 'C'">
|
||||
<el-form-item label="字段key">
|
||||
<el-input v-model="form.Code" placeholder="请输入字段key" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-show="form.ConfigType === 'C'">
|
||||
<el-form-item label="字段英文">
|
||||
<el-input v-model="form.Value" placeholder="请输入字段英文" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" v-show="form.ConfigType === 'C'">
|
||||
<el-form-item label="字段中文">
|
||||
<el-input v-model="form.ValueCN" placeholder="请输入字段中文" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-show="form.ConfigType === 'C'">
|
||||
<el-form-item label="枚举类型">
|
||||
<el-radio-group v-model="form.EnumType">
|
||||
<el-radio :label="null">无</el-radio>
|
||||
<el-radio label="E">枚举</el-radio>
|
||||
<el-radio label="D">字典</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-show="form.ConfigType === 'C' && form.EnumType === 'E'">
|
||||
<el-form-item label="枚举">
|
||||
<el-input v-model="form.EnumList" placeholder="请输入枚举" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" v-show="form.ConfigType === 'C' && form.EnumType === 'D'">
|
||||
<el-form-item label="字典code">
|
||||
<el-input v-model="form.dictionaryKey" placeholder="请输入字典code" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getFrontAuditConfigList, addOrUpdateFrontAuditConfig, deleteFrontAuditConfig } from '@/api/dictionary/checkConfig'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import IconSelect from '@/components/IconSelect'
|
||||
|
||||
export default {
|
||||
name: 'checkConfig',
|
||||
dicts: [ 'OptType', 'ModuleType', 'ChildrenType' ],
|
||||
components: { Treeselect, IconSelect },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 菜单表格树数据
|
||||
menuList: [],
|
||||
// 菜单树选项
|
||||
menuOptions: [],
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 菜单状态数据字典
|
||||
visibleOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
menuName: undefined,
|
||||
visible: undefined,
|
||||
},
|
||||
// 是否展开,默认全部折叠
|
||||
isExpandAll: false,
|
||||
// 重新渲染表格状态
|
||||
refreshTable: true,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
MenuName: [
|
||||
{ required: true, message: '菜单名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
ShowOrder: [
|
||||
{ required: true, message: '菜单顺序不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
// this.getDicts("sys_show_hide").then(response => {
|
||||
// this.visibleOptions = response.data;
|
||||
// });
|
||||
},
|
||||
methods: {
|
||||
toggleExpandAll() {
|
||||
this.refreshTable = false
|
||||
this.isExpandAll = !this.isExpandAll
|
||||
this.$nextTick(() => {
|
||||
this.refreshTable = true
|
||||
})
|
||||
},
|
||||
normalizer(node) {
|
||||
if (node.Children && !node.Children.length) {
|
||||
delete node.Children
|
||||
}
|
||||
return {
|
||||
id: node.Id,
|
||||
label: node.Description,
|
||||
children: node.Children
|
||||
}
|
||||
},
|
||||
toTree(arr, ParentId) {
|
||||
function loop(ParentId) {
|
||||
const res = []
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
const item = arr[i]
|
||||
item.hasChildren = false
|
||||
if (item.ParentId !== ParentId) {
|
||||
continue
|
||||
}
|
||||
item.Children = loop(item.Id)
|
||||
res.push(item)
|
||||
}
|
||||
return res
|
||||
}
|
||||
return loop(ParentId)
|
||||
},
|
||||
// 选择图标
|
||||
selected(name) {
|
||||
this.form.MenuIcon = name
|
||||
},
|
||||
/** 查询菜单列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
getFrontAuditConfigList(this.queryParams).then(res => {
|
||||
this.menuList = this.toTree(res.Result, '00000000-0000-0000-0000-000000000000')
|
||||
const menu = { Id: '00000000-0000-0000-0000-000000000000', Description: '操作', Children: [] }
|
||||
menu.Children = this.menuList
|
||||
this.menuOptions = Object.assign([], [menu])
|
||||
this.loading = false
|
||||
}).catch(function() {})
|
||||
},
|
||||
/** 查询菜单下拉树结构 */
|
||||
getTreeselect() {
|
||||
this.loading = true
|
||||
getFrontAuditConfigList({}).then(res => {
|
||||
const menu = { Id: '00000000-0000-0000-0000-000000000000', Description: '操作', Children: [] }
|
||||
menu.Children = this.toTree(res.Result, '00000000-0000-0000-0000-000000000000')
|
||||
this.menuOptions = Object.assign([], [menu])
|
||||
this.loading = false
|
||||
}).catch(function() {})
|
||||
},
|
||||
// 菜单显示状态字典翻译
|
||||
visibleFormat(row, column) {
|
||||
if (row.MenuType === 'F') {
|
||||
return ''
|
||||
}
|
||||
return this.selectDictLabel(this.visibleOptions, row.visible)
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
Id: null,
|
||||
ParentId: null,
|
||||
ConfigType: 'M',
|
||||
Description: null,
|
||||
IsEnable: true,
|
||||
ModuleTypeId: null,
|
||||
OptTypeId: null,
|
||||
ChildrenTypeId: null,
|
||||
IsShowParent: false,
|
||||
Sort: 0,
|
||||
Code: null,
|
||||
Value: null,
|
||||
ValueCN: null,
|
||||
EnumType: null
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
findName (id, dict, type) {
|
||||
if (id) {
|
||||
return this.dict.type[dict].find(v => {
|
||||
return v.value === id
|
||||
}).raw[type]
|
||||
}
|
||||
return ''
|
||||
},
|
||||
changeDescription () {
|
||||
this.form.Description = this.findName(this.form.OptTypeId, 'OptType', 'ValueCN') + this.findName(this.form.ModuleTypeId, 'ModuleType', 'ValueCN') + this.findName(this.form.ChildrenTypeId, 'ChildrenType', 'ValueCN')
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.getList()
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd(row) {
|
||||
this.reset()
|
||||
this.getTreeselect()
|
||||
if (row != null) {
|
||||
this.form.ParentId = row.Id
|
||||
this.form.ModuleTypeId = row.ModuleTypeId
|
||||
this.form.OptTypeId = row.OptTypeId
|
||||
this.form.ChildrenTypeId = row.ChildrenTypeId
|
||||
if (row.ModuleTypeId && row.OptTypeId && row.ChildrenTypeId) {
|
||||
this.form.ConfigType = 'C'
|
||||
}
|
||||
this.form.Description = row.OptTypeValueCN + row.ModuleTypeValueCN + row.ChildrenTypeValueCN
|
||||
}
|
||||
this.open = true
|
||||
this.title = '添加'
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
this.getTreeselect()
|
||||
this.form = Object.assign({}, row)
|
||||
this.open = true
|
||||
this.title = '修改'
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
addOrUpdateFrontAuditConfig(this.form).then(response => {
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$confirm('是否确认删除名称为"' + row.Description + '"的数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(function() {
|
||||
return deleteFrontAuditConfig(row.Id)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$message.success('删除成功')
|
||||
}).catch(function() {})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.vue-treeselect div{
|
||||
line-height: 40px;
|
||||
}
|
||||
</style>
|
||||
@@ -73,13 +73,13 @@
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-edit-outline"
|
||||
title="编辑"
|
||||
:title="$t('common:button:edit')"
|
||||
@click="handleEdit(scope.row)"
|
||||
/>
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-delete"
|
||||
title="删除"
|
||||
:title="$t('common:button:delete')"
|
||||
@click="handleDelete(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -9,8 +9,19 @@
|
||||
>
|
||||
<div class="base-dialog-body">
|
||||
<el-form-item label="Site: ">
|
||||
<el-select v-model="form.SiteId" style="width: 100%" clearable filterable @change="siteChange">
|
||||
<el-option v-for="item of siteList" :value="item.Id" :key="item.Id" :label="item.SiteName">
|
||||
<el-select
|
||||
v-model="form.SiteId"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
filterable
|
||||
@change="siteChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item of siteList"
|
||||
:value="item.Id"
|
||||
:key="item.Id"
|
||||
:label="item.SiteName"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -20,10 +31,16 @@
|
||||
<el-form-item label="Hospital EN: " prop="HospitalName">
|
||||
<el-input v-model="form.HospitalName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Affiliated University CN: " prop="UniversityAffiliatedCN">
|
||||
<el-form-item
|
||||
label="Affiliated University CN: "
|
||||
prop="UniversityAffiliatedCN"
|
||||
>
|
||||
<el-input v-model="form.UniversityAffiliatedCN" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Affiliated University EN: " prop="UniversityAffiliated">
|
||||
<el-form-item
|
||||
label="Affiliated University EN: "
|
||||
prop="UniversityAffiliated"
|
||||
>
|
||||
<el-input v-model="form.UniversityAffiliated" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Country CN: " prop="CountryCN">
|
||||
@@ -45,10 +62,22 @@
|
||||
<el-input v-model="form.City" />
|
||||
</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>
|
||||
@@ -63,14 +92,14 @@ export default {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
},
|
||||
model: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -87,23 +116,36 @@ export default {
|
||||
Province: '',
|
||||
ProvinceCN: '',
|
||||
City: '',
|
||||
CityCN: ''
|
||||
CityCN: '',
|
||||
},
|
||||
siteList: [],
|
||||
rules: {
|
||||
HospitalNameCN: [{ required: true, message: 'Please specify', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
|
||||
UniversityAffiliated: [{ max: 100, message: 'The maximum length is 100' }],
|
||||
UniversityAffiliatedCN: [{ max: 100, message: 'The maximum length is 100' }],
|
||||
Country: [{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{ max: 50, message: 'The maximum length is 50' }],
|
||||
CountryCN: [{ max: 50, message: 'The maximum length is 50' }],
|
||||
Province: [{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{ max: 50, message: 'The maximum length is 50' }],
|
||||
ProvinceCN: [{ max: 50, message: 'The maximum length is 50' }],
|
||||
City: [{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{ max: 50, message: 'The maximum length is 50' }],
|
||||
CityCN: [{ max: 50, message: 'The maximum length is 50' }]
|
||||
}
|
||||
HospitalNameCN: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{ max: 50, message: 'The maximum length is 50' },
|
||||
],
|
||||
UniversityAffiliated: [
|
||||
{ max: 100, message: 'The maximum length is 100' },
|
||||
],
|
||||
UniversityAffiliatedCN: [
|
||||
{ max: 100, message: 'The maximum length is 100' },
|
||||
],
|
||||
Country: [{ max: 50, message: 'The maximum length is 50' }],
|
||||
CountryCN: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{ max: 50, message: 'The maximum length is 50' },
|
||||
],
|
||||
Province: [{ max: 50, message: 'The maximum length is 50' }],
|
||||
ProvinceCN: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{ max: 50, message: 'The maximum length is 50' },
|
||||
],
|
||||
City: [{ max: 50, message: 'The maximum length is 50' }],
|
||||
CityCN: [
|
||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||
{ max: 50, message: 'The maximum length is 50' },
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -114,7 +156,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
siteChange(v) {
|
||||
this.siteList.forEach(o => {
|
||||
this.siteList.forEach((o) => {
|
||||
if (o.Id === v) {
|
||||
this.form.CityCN = o.City
|
||||
this.form.HospitalNameCN = o.SiteNameCN
|
||||
@@ -125,34 +167,37 @@ export default {
|
||||
})
|
||||
},
|
||||
getAllSiteList() {
|
||||
getAllSiteList().then(res => {
|
||||
this.siteList = res.Result
|
||||
console.log(this.siteList)
|
||||
}).catch(() => {
|
||||
reject()
|
||||
})
|
||||
getAllSiteList()
|
||||
.then((res) => {
|
||||
this.siteList = res.Result
|
||||
console.log(this.siteList)
|
||||
})
|
||||
.catch(() => {
|
||||
reject()
|
||||
})
|
||||
},
|
||||
handleSave() {
|
||||
this.$refs.hospitalForm.validate(valid => {
|
||||
this.$refs.hospitalForm.validate((valid) => {
|
||||
if (!valid) return
|
||||
this.btnLoading = true
|
||||
addOrUpdateHospital(this.form).then(res => {
|
||||
this.btnLoading = false
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success('Saved successfully')
|
||||
this.$refs['hospitalForm'].resetFields()
|
||||
this.$emit('getList')
|
||||
this.$emit('close')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.btnLoading = false
|
||||
})
|
||||
addOrUpdateHospital(this.form)
|
||||
.then((res) => {
|
||||
this.btnLoading = false
|
||||
if (res.IsSuccess) {
|
||||
this.$message.success('Saved successfully')
|
||||
this.$refs['hospitalForm'].resetFields()
|
||||
this.$emit('getList')
|
||||
this.$emit('close')
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.btnLoading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.$emit('close')
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -113,13 +113,13 @@
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-edit-outline"
|
||||
title="编辑"
|
||||
:title="$t('common:button:edit')"
|
||||
@click="handleEdit(scope.row)"
|
||||
/>
|
||||
/>
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-delete"
|
||||
title="删除"
|
||||
:title="$t('common:button:delete')"
|
||||
@click="handleDelete(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -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)'" prop="SiteNameCN">
|
||||
<el-form-item
|
||||
:label="$t('trials:customSite:form:siteName') + '(CN)'"
|
||||
prop="SiteNameCN"
|
||||
>
|
||||
<el-input v-model="form.SiteNameCN" />
|
||||
</el-form-item>
|
||||
|
||||
@@ -26,9 +32,9 @@
|
||||
<el-input v-model="form.AliasName" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="组织机构代码: ">
|
||||
<!-- <el-form-item label="组织机构代码: ">
|
||||
<el-input v-model="form.UniqueCode" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
|
||||
<el-form-item label="Country: " prop="Country">
|
||||
<el-input v-model="form.Country" />
|
||||
@@ -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>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user