Compare commits
575 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 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 | |||
| 2303c04857 | |||
| beeadfbdeb | |||
| b866ffdd49 | |||
| 8ad50b5618 | |||
| e517556808 | |||
| 1a8653b47e | |||
| bfe86e6868 | |||
| f0eda2bc66 | |||
| 8f274aad89 | |||
| 709063a26e | |||
| 9e786c53b8 | |||
| 37520fccb6 | |||
| f3b36b9127 | |||
| 870354b4b2 | |||
| f838df51a5 | |||
| 0a6a98c33c | |||
| 28c357a702 |
Generated
+1943
-8
File diff suppressed because it is too large
Load Diff
@@ -14,6 +14,7 @@
|
|||||||
"i18n:en": "node i18nGenerate.js lang=en keyCol=5 valCol=7"
|
"i18n:en": "node i18nGenerate.js lang=en keyCol=5 valCol=7"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@aws-sdk/client-s3": "^3.370.0",
|
||||||
"@cornerstonejs/calculate-suv": "^1.1.0",
|
"@cornerstonejs/calculate-suv": "^1.1.0",
|
||||||
"@cornerstonejs/core": "^1.27.4",
|
"@cornerstonejs/core": "^1.27.4",
|
||||||
"@cornerstonejs/dicom-image-loader": "^1.27.4",
|
"@cornerstonejs/dicom-image-loader": "^1.27.4",
|
||||||
@@ -23,6 +24,9 @@
|
|||||||
"@ffmpeg/ffmpeg": "^0.10.1",
|
"@ffmpeg/ffmpeg": "^0.10.1",
|
||||||
"@microsoft/signalr": "^6.0.8",
|
"@microsoft/signalr": "^6.0.8",
|
||||||
"@riophae/vue-treeselect": "0.4.0",
|
"@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",
|
"ali-oss": "^6.17.1",
|
||||||
"axios": "0.18.1",
|
"axios": "0.18.1",
|
||||||
"babel-eslint": "7.2.3",
|
"babel-eslint": "7.2.3",
|
||||||
@@ -32,6 +36,7 @@
|
|||||||
"cornerstone-math": "^0.1.10",
|
"cornerstone-math": "^0.1.10",
|
||||||
"cornerstone-tools": "^6.0.10",
|
"cornerstone-tools": "^6.0.10",
|
||||||
"cornerstone-wado-image-loader": "^4.13.2",
|
"cornerstone-wado-image-loader": "^4.13.2",
|
||||||
|
"crypto-js": "^4.2.0",
|
||||||
"dcmjs": "^0.29.8",
|
"dcmjs": "^0.29.8",
|
||||||
"dicom-parser": "^1.8.9",
|
"dicom-parser": "^1.8.9",
|
||||||
"dicomedit": "^0.1.0",
|
"dicomedit": "^0.1.0",
|
||||||
@@ -42,6 +47,7 @@
|
|||||||
"hammerjs": "^2.0.8",
|
"hammerjs": "^2.0.8",
|
||||||
"html2canvas": "^1.4.1",
|
"html2canvas": "^1.4.1",
|
||||||
"js-md5": "^0.7.3",
|
"js-md5": "^0.7.3",
|
||||||
|
"jsencrypt": "^3.3.2",
|
||||||
"jszip": "^3.7.1",
|
"jszip": "^3.7.1",
|
||||||
"moment": "^2.27.0",
|
"moment": "^2.27.0",
|
||||||
"node-polyfill-webpack-plugin": "^2.0.1",
|
"node-polyfill-webpack-plugin": "^2.0.1",
|
||||||
@@ -62,6 +68,7 @@
|
|||||||
"vue-clipboard2": "^0.3.1",
|
"vue-clipboard2": "^0.3.1",
|
||||||
"vue-contextmenujs": "^1.3.13",
|
"vue-contextmenujs": "^1.3.13",
|
||||||
"vue-count-to": "^1.0.13",
|
"vue-count-to": "^1.0.13",
|
||||||
|
"vue-demi": "^0.14.6",
|
||||||
"vue-i18n": "^8.7.0",
|
"vue-i18n": "^8.7.0",
|
||||||
"vue-pdf": "^4.3.0",
|
"vue-pdf": "^4.3.0",
|
||||||
"vue-puzzle-vcode": "^1.1.10",
|
"vue-puzzle-vcode": "^1.1.10",
|
||||||
|
|||||||
+9
-4
@@ -23,8 +23,8 @@
|
|||||||
<img src="./error_assets/zzlogo2.png" alt="">
|
<img src="./error_assets/zzlogo2.png" alt="">
|
||||||
<img v-show="false" src="./error_assets/zzlogo3.png" alt="">
|
<img v-show="false" src="./error_assets/zzlogo3.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="login-image">
|
<div class="login-image login-image-usa">
|
||||||
<img src="./error_assets/login-bg.png">
|
<img src="./error_assets/login-bg.svg" style="max-width: 500px;max-height: 300px;">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="login-r">
|
<div class="login-r">
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
left: 50%;
|
left: 50%;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translate(-50%,-50%);
|
transform: translate(-50%,-50%);
|
||||||
width: 1200px;
|
width: 1100px;
|
||||||
height: 600px;
|
height: 600px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: rgb(255, 255, 255);
|
background: rgb(255, 255, 255);
|
||||||
@@ -179,7 +179,12 @@
|
|||||||
.login-container .login-body .login-l .login-image img{
|
.login-container .login-body .login-l .login-image img{
|
||||||
height: 100%;
|
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{
|
.login-container .login-body .login-r{
|
||||||
position: relative;
|
position: relative;
|
||||||
float: left;
|
float: left;
|
||||||
|
|||||||
+9
-4
@@ -23,8 +23,8 @@
|
|||||||
<img src="./error_assets/zzlogo3.png" alt="">
|
<img src="./error_assets/zzlogo3.png" alt="">
|
||||||
<img v-show="false" src="./error_assets/zzlogo3.png" alt="">
|
<img v-show="false" src="./error_assets/zzlogo3.png" alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="login-image">
|
<div class="login-image login-image-usa">
|
||||||
<img src="./error_assets/login-bg.png">
|
<img src="./error_assets/login-bg.svg" style="max-width: 500px;max-height: 300px;">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="login-r">
|
<div class="login-r">
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
left: 50%;
|
left: 50%;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translate(-50%,-50%);
|
transform: translate(-50%,-50%);
|
||||||
width: 1200px;
|
width: 1100px;
|
||||||
height: 600px;
|
height: 600px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: rgb(255, 255, 255);
|
background: rgb(255, 255, 255);
|
||||||
@@ -135,7 +135,12 @@
|
|||||||
.login-container .login-body .login-l .login-image img{
|
.login-container .login-body .login-l .login-image img{
|
||||||
height: 100%;
|
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{
|
.login-container .login-body .login-r{
|
||||||
position: relative;
|
position: relative;
|
||||||
float: left;
|
float: left;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 98 KiB |
@@ -5,6 +5,7 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<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 name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||||
<meta http-equiv="pragram" content="no-cache">
|
<meta http-equiv="pragram" content="no-cache">
|
||||||
|
<meta name="autocomplete" content="off">
|
||||||
<meta http-equiv="Expires" content="0">
|
<meta http-equiv="Expires" content="0">
|
||||||
<meta http-equiv="Pragma" content="no-cache">
|
<meta http-equiv="Pragma" content="no-cache">
|
||||||
<meta http-equiv="Cache-control" content="no-store,no-cache,must-revalidate">
|
<meta http-equiv="Cache-control" content="no-store,no-cache,must-revalidate">
|
||||||
|
|||||||
@@ -0,0 +1,167 @@
|
|||||||
|
<!--
|
||||||
|
mitm.html is the lite "man in the middle"
|
||||||
|
|
||||||
|
This is only meant to signal the opener's messageChannel to
|
||||||
|
the service worker - when that is done this mitm can be closed
|
||||||
|
but it's better to keep it alive since this also stops the sw
|
||||||
|
from restarting
|
||||||
|
|
||||||
|
The service worker is capable of intercepting all request and fork their
|
||||||
|
own "fake" response - wish we are going to craft
|
||||||
|
when the worker then receives a stream then the worker will tell the opener
|
||||||
|
to open up a link that will start the download
|
||||||
|
-->
|
||||||
|
<script>
|
||||||
|
// This will prevent the sw from restarting
|
||||||
|
let keepAlive = () => {
|
||||||
|
keepAlive = () => {}
|
||||||
|
var ping = location.href.substr(0, location.href.lastIndexOf('/')) + '/ping'
|
||||||
|
var interval = setInterval(() => {
|
||||||
|
if (sw) {
|
||||||
|
sw.postMessage('ping')
|
||||||
|
} else {
|
||||||
|
fetch(ping).then(res => res.text(!res.ok && clearInterval(interval)))
|
||||||
|
}
|
||||||
|
}, 10000)
|
||||||
|
}
|
||||||
|
|
||||||
|
// message event is the first thing we need to setup a listner for
|
||||||
|
// don't want the opener to do a random timeout - instead they can listen for
|
||||||
|
// the ready event
|
||||||
|
// but since we need to wait for the Service Worker registration, we store the
|
||||||
|
// message for later
|
||||||
|
let messages = []
|
||||||
|
window.onmessage = evt => messages.push(evt)
|
||||||
|
|
||||||
|
let sw = null
|
||||||
|
let scope = ''
|
||||||
|
|
||||||
|
function registerWorker() {
|
||||||
|
return navigator.serviceWorker.getRegistration('./').then(swReg => {
|
||||||
|
return swReg || navigator.serviceWorker.register('sw.js', { scope: './' })
|
||||||
|
}).then(swReg => {
|
||||||
|
const swRegTmp = swReg.installing || swReg.waiting
|
||||||
|
|
||||||
|
scope = swReg.scope
|
||||||
|
|
||||||
|
return (sw = swReg.active) || new Promise(resolve => {
|
||||||
|
swRegTmp.addEventListener('statechange', fn = () => {
|
||||||
|
if (swRegTmp.state === 'activated') {
|
||||||
|
swRegTmp.removeEventListener('statechange', fn)
|
||||||
|
sw = swReg.active
|
||||||
|
resolve()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now that we have the Service Worker registered we can process messages
|
||||||
|
function onMessage (event) {
|
||||||
|
let { data, ports, origin } = event
|
||||||
|
|
||||||
|
// It's important to have a messageChannel, don't want to interfere
|
||||||
|
// with other simultaneous downloads
|
||||||
|
if (!ports || !ports.length) {
|
||||||
|
throw new TypeError("[StreamSaver] You didn't send a messageChannel")
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof data !== 'object') {
|
||||||
|
throw new TypeError("[StreamSaver] You didn't send a object")
|
||||||
|
}
|
||||||
|
|
||||||
|
// the default public service worker for StreamSaver is shared among others.
|
||||||
|
// so all download links needs to be prefixed to avoid any other conflict
|
||||||
|
data.origin = origin
|
||||||
|
|
||||||
|
// if we ever (in some feature versoin of streamsaver) would like to
|
||||||
|
// redirect back to the page of who initiated a http request
|
||||||
|
data.referrer = data.referrer || document.referrer || origin
|
||||||
|
|
||||||
|
// pass along version for possible backwards compatibility in sw.js
|
||||||
|
data.streamSaverVersion = new URLSearchParams(location.search).get('version')
|
||||||
|
|
||||||
|
if (data.streamSaverVersion === '1.2.0') {
|
||||||
|
console.warn('[StreamSaver] please update streamsaver')
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @since v2.0.0 */
|
||||||
|
if (!data.headers) {
|
||||||
|
console.warn("[StreamSaver] pass `data.headers` that you would like to pass along to the service worker\nit should be a 2D array or a key/val object that fetch's Headers api accepts")
|
||||||
|
} else {
|
||||||
|
// test if it's correct
|
||||||
|
// should thorw a typeError if not
|
||||||
|
new Headers(data.headers)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @since v2.0.0 */
|
||||||
|
if (typeof data.filename === 'string') {
|
||||||
|
console.warn("[StreamSaver] You shouldn't send `data.filename` anymore. It should be included in the Content-Disposition header option")
|
||||||
|
// Do what File constructor do with fileNames
|
||||||
|
data.filename = data.filename.replace(/\//g, ':')
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @since v2.0.0 */
|
||||||
|
if (data.size) {
|
||||||
|
console.warn("[StreamSaver] You shouldn't send `data.size` anymore. It should be included in the content-length header option")
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @since v2.0.0 */
|
||||||
|
if (data.readableStream) {
|
||||||
|
console.warn("[StreamSaver] You should send the readableStream in the messageChannel, not throught mitm")
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @since v2.0.0 */
|
||||||
|
if (!data.pathname) {
|
||||||
|
console.warn("[StreamSaver] Please send `data.pathname` (eg: /pictures/summer.jpg)")
|
||||||
|
data.pathname = Math.random().toString().slice(-6) + '/' + data.filename
|
||||||
|
}
|
||||||
|
|
||||||
|
// remove all leading slashes
|
||||||
|
data.pathname = data.pathname.replace(/^\/+/g, '')
|
||||||
|
|
||||||
|
// remove protocol
|
||||||
|
let org = origin.replace(/(^\w+:|^)\/\//, '')
|
||||||
|
|
||||||
|
// set the absolute pathname to the download url.
|
||||||
|
data.url = new URL(`${scope + org}/${data.pathname}`).toString()
|
||||||
|
|
||||||
|
if (!data.url.startsWith(`${scope + org}/`)) {
|
||||||
|
throw new TypeError('[StreamSaver] bad `data.pathname`')
|
||||||
|
}
|
||||||
|
|
||||||
|
// This sends the message data as well as transferring
|
||||||
|
// messageChannel.port2 to the service worker. The service worker can
|
||||||
|
// then use the transferred port to reply via postMessage(), which
|
||||||
|
// will in turn trigger the onmessage handler on messageChannel.port1.
|
||||||
|
|
||||||
|
const transferable = data.readableStream
|
||||||
|
? [ ports[0], data.readableStream ]
|
||||||
|
: [ ports[0] ]
|
||||||
|
|
||||||
|
if (!(data.readableStream || data.transferringReadable)) {
|
||||||
|
keepAlive()
|
||||||
|
}
|
||||||
|
|
||||||
|
return sw.postMessage(data, transferable)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window.opener) {
|
||||||
|
// The opener can't listen to onload event, so we need to help em out!
|
||||||
|
// (telling them that we are ready to accept postMessage's)
|
||||||
|
window.opener.postMessage('StreamSaver::loadedPopup', '*')
|
||||||
|
}
|
||||||
|
|
||||||
|
if (navigator.serviceWorker) {
|
||||||
|
registerWorker().then(() => {
|
||||||
|
window.onmessage = onMessage
|
||||||
|
messages.forEach(window.onmessage)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// FF v102 just started to supports transferable streams, but still needs to ping sw.js
|
||||||
|
// even tough the service worker dose not have to do any kind of work and listen to any
|
||||||
|
// messages... #305
|
||||||
|
keepAlive()
|
||||||
|
|
||||||
|
</script>
|
||||||
+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' })
|
||||||
|
}
|
||||||
+81
-71
@@ -37,7 +37,12 @@
|
|||||||
height="100"
|
height="100"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-table-column prop="Code" label="标签" width="300">
|
<el-table-column
|
||||||
|
prop="Code"
|
||||||
|
label="标签"
|
||||||
|
width="300"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column-->
|
<!-- <el-table-column-->
|
||||||
<!-- prop="Description"-->
|
<!-- prop="Description"-->
|
||||||
@@ -54,7 +59,7 @@
|
|||||||
v-model="scope.row.Value"
|
v-model="scope.row.Value"
|
||||||
@input="
|
@input="
|
||||||
(e) => {
|
(e) => {
|
||||||
$set(scope.row, 'Value', e);
|
$set(scope.row, 'Value', e)
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
size="mini"
|
size="mini"
|
||||||
@@ -67,7 +72,7 @@
|
|||||||
v-model="scope.row.ValueCN"
|
v-model="scope.row.ValueCN"
|
||||||
@input="
|
@input="
|
||||||
(e) => {
|
(e) => {
|
||||||
$set(scope.row, 'ValueCN', e);
|
$set(scope.row, 'ValueCN', e)
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
size="mini"
|
size="mini"
|
||||||
@@ -90,13 +95,13 @@
|
|||||||
import {
|
import {
|
||||||
batchAddOrUpdateFrontInternationalization,
|
batchAddOrUpdateFrontInternationalization,
|
||||||
getFrontInternationalizationList,
|
getFrontInternationalizationList,
|
||||||
} from "@/api/dictionary/dictionary";
|
} from '@/api/dictionary/dictionary'
|
||||||
import { getTrialExtralConfig } from "@/api/trials";
|
import { getTrialExtralConfig } from '@/api/trials'
|
||||||
import feedBack from "@/views/trials/trials-layout/components/feedBack";
|
import feedBack from '@/views/trials/trials-layout/components/feedBack'
|
||||||
import Vue from "vue";
|
import Vue from 'vue'
|
||||||
import i18n from "./lang";
|
import i18n from './lang'
|
||||||
export default {
|
export default {
|
||||||
name: "App",
|
name: 'App',
|
||||||
components: { feedBack },
|
components: { feedBack },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -105,38 +110,43 @@ export default {
|
|||||||
show: false,
|
show: false,
|
||||||
key: null,
|
key: null,
|
||||||
arr: [],
|
arr: [],
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.show = process.env.VUE_APP_OSS_PATH === "/test/dist";
|
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,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
// 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: {
|
methods: {
|
||||||
changeValue(target, attr, e) {
|
changeValue(target, attr, e) {
|
||||||
this.$set(target, attr, e);
|
this.$set(target, attr, e)
|
||||||
},
|
},
|
||||||
keyChange(v) {
|
keyChange(v) {
|
||||||
if (this.key) {
|
if (this.key) {
|
||||||
@@ -148,65 +158,65 @@ export default {
|
|||||||
~v.Value.indexOf(this.key) ||
|
~v.Value.indexOf(this.key) ||
|
||||||
~v.ValueCN.indexOf(this.key)
|
~v.ValueCN.indexOf(this.key)
|
||||||
)
|
)
|
||||||
);
|
)
|
||||||
} else {
|
} else {
|
||||||
this.tableData = Object.assign([], this.arr);
|
this.tableData = Object.assign([], this.arr)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$confirm("确定修改当前页面国际化内容?").then(() => {
|
this.$confirm('确定修改当前页面国际化内容?').then(() => {
|
||||||
batchAddOrUpdateFrontInternationalization(this.tableData).then(
|
batchAddOrUpdateFrontInternationalization(this.tableData).then(
|
||||||
async (res) => {
|
async (res) => {
|
||||||
var zhMessages = {},
|
var zhMessages = {},
|
||||||
enMessages = {};
|
enMessages = {}
|
||||||
var Internationalization = await getFrontInternationalizationList();
|
var Internationalization = await getFrontInternationalizationList()
|
||||||
Vue.prototype.$tl = Internationalization.Result;
|
Vue.prototype.$tl = Internationalization.Result
|
||||||
this.tableData.forEach((v) => {
|
this.tableData.forEach((v) => {
|
||||||
// zhMessages[v.Description + '_' + v.Code] = v.ValueCN
|
// zhMessages[v.Description + '_' + v.Code] = v.ValueCN
|
||||||
// enMessages[v.Description + '_' + v.Code] = v.Value
|
// enMessages[v.Description + '_' + v.Code] = v.Value
|
||||||
zhMessages[v.Code] = v.ValueCN;
|
zhMessages[v.Code] = v.ValueCN
|
||||||
enMessages[v.Code] = v.Value;
|
enMessages[v.Code] = v.Value
|
||||||
});
|
})
|
||||||
i18n.mergeLocaleMessage("zh", zhMessages);
|
i18n.mergeLocaleMessage('zh', zhMessages)
|
||||||
i18n.mergeLocaleMessage("en", enMessages);
|
i18n.mergeLocaleMessage('en', enMessages)
|
||||||
this.drawer = false;
|
this.drawer = false
|
||||||
this.$message.success("国际化修改成功");
|
this.$message.success('国际化修改成功')
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
openI18n() {
|
openI18n() {
|
||||||
this.tableData = [];
|
this.tableData = []
|
||||||
this.key = null;
|
this.key = null
|
||||||
this.drawer = true;
|
this.drawer = true
|
||||||
let arr = [];
|
let arr = []
|
||||||
let tableData = this.$tl.map((v) => {
|
let tableData = this.$tl.map((v) => {
|
||||||
let a = { ...v };
|
let a = { ...v }
|
||||||
// if (!a.Description) {
|
// if (!a.Description) {
|
||||||
// a.Description = this.$route.path
|
// a.Description = this.$route.path
|
||||||
// }
|
// }
|
||||||
return a;
|
return a
|
||||||
});
|
})
|
||||||
tableData = tableData.filter((v) => {
|
tableData = tableData.filter((v) => {
|
||||||
// return ~this.$path.indexOf(v.Description + '_' + v.Code)
|
// return ~this.$path.indexOf(v.Description + '_' + v.Code)
|
||||||
return ~this.$path.indexOf(v.Code);
|
return ~this.$path.indexOf(v.Code)
|
||||||
});
|
})
|
||||||
this.$path.forEach((v) => {
|
this.$path.forEach((v) => {
|
||||||
let o = tableData.find((a) => {
|
let o = tableData.find((a) => {
|
||||||
return a.Code === v;
|
return a.Code === v
|
||||||
});
|
})
|
||||||
if (o) {
|
if (o) {
|
||||||
arr.push(o);
|
arr.push(o)
|
||||||
} else {
|
} else {
|
||||||
arr.push({
|
arr.push({
|
||||||
Code: v,
|
Code: v,
|
||||||
Description: null,
|
Description: null,
|
||||||
Value: null,
|
Value: null,
|
||||||
ValueCN: null,
|
ValueCN: null,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
this.arr = arr;
|
this.arr = arr
|
||||||
if (this.key) {
|
if (this.key) {
|
||||||
this.tableData = Object.assign(
|
this.tableData = Object.assign(
|
||||||
[],
|
[],
|
||||||
@@ -216,15 +226,15 @@ export default {
|
|||||||
~v.Value.indexOf(this.key) ||
|
~v.Value.indexOf(this.key) ||
|
||||||
~v.ValueCN.indexOf(this.key)
|
~v.ValueCN.indexOf(this.key)
|
||||||
)
|
)
|
||||||
);
|
)
|
||||||
} else {
|
} else {
|
||||||
this.tableData = Object.assign([], this.arr);
|
this.tableData = Object.assign([], this.arr)
|
||||||
}
|
}
|
||||||
// console.log(JSON.stringify(this.$path))
|
// console.log(JSON.stringify(this.$path))
|
||||||
// console.log(JSON.stringify(this.tableData))
|
// console.log(JSON.stringify(this.tableData))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@@ -249,7 +259,7 @@ input::-webkit-inner-spin-button {
|
|||||||
-webkit-appearance: none !important;
|
-webkit-appearance: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type="number"] {
|
input[type='number'] {
|
||||||
-moz-appearance: textfield !important;
|
-moz-appearance: textfield !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -275,7 +285,7 @@ textarea {
|
|||||||
color: $light_gray;
|
color: $light_gray;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-family: "Times New Roman";
|
font-family: 'Times New Roman';
|
||||||
text-shadow: 1px 0.5px 1.5px #666;
|
text-shadow: 1px 0.5px 1.5px #666;
|
||||||
}
|
}
|
||||||
.title-logo {
|
.title-logo {
|
||||||
|
|||||||
@@ -293,3 +293,27 @@ export function batchUpdateInternationalInfo(data) {
|
|||||||
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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -1045,4 +1045,28 @@ export function getExploreRecommentInfo(params) {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
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
|
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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
+67
-3
@@ -8,11 +8,11 @@ export function requestPackageAndAnonymizImage(params) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 获取影像上传列表
|
// 获取影像上传列表
|
||||||
export function getSubjectImageUploadList(params) {
|
export function getSubjectImageUploadList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/DownloadAndUpload/getSubjectImageUploadList',
|
url: '/DownloadAndUpload/getSubjectImageUploadList',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 预上传
|
// 预上传
|
||||||
@@ -39,4 +39,68 @@ export function deleteTaskStudy(params) {
|
|||||||
method: 'delete',
|
method: 'delete',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
// 获取iqc下载文件信息
|
||||||
|
export function getCRCUploadedStudyInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/DownloadAndUpload/getCRCUploadedStudyInfo',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取ir阅片和任务列表
|
||||||
|
export function getSubjectImageDownloadSelectList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/DownloadAndUpload/getSubjectImageDownloadSelectList',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取ir阅片和任务下载文件信息
|
||||||
|
export function getIRReadingDownloadStudyInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/DownloadAndUpload/getIRReadingDownloadStudyInfo',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取ir阅片和任务非dicom上传列表
|
||||||
|
export function getIRUploadTaskNoneDicomStudyList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/DownloadAndUpload/getIRUploadTaskNoneDicomStudyList',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 校验上传影像
|
||||||
|
export function verifyIRStudyAllowUpload(data) {
|
||||||
|
return request({
|
||||||
|
url: '/DownloadAndUpload/verifyIRStudyAllowUpload',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 影像下载成功确认
|
||||||
|
export function downloadImageSuccess(params) {
|
||||||
|
return request({
|
||||||
|
url: '/DownloadAndUpload/downloadImageSuccess',
|
||||||
|
method: 'post',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 影像下载记录列表
|
||||||
|
export function getTrialDownloadList(data) {
|
||||||
|
return request({
|
||||||
|
url: '/DownloadAndUpload/getTrialDownloadList',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 修改后处理检查类型
|
||||||
|
export function updateTaskStudyModality(params) {
|
||||||
|
return request({
|
||||||
|
url: '/DownloadAndUpload/updateTaskStudyModality',
|
||||||
|
method: 'put',
|
||||||
|
params
|
||||||
|
})
|
||||||
}
|
}
|
||||||
+60
-3
@@ -1,5 +1,5 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
import requestDownload from '@/utils/request-download'
|
||||||
export function addBaseLineLesion(param) {
|
export function addBaseLineLesion(param) {
|
||||||
return request({
|
return request({
|
||||||
url: '/report/addBaseLineLesion',
|
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({
|
return request({
|
||||||
url: `/SubjectVisit/getVisitStudyList/${trialId}/${subjectVisitId}/${isReading}`,
|
url: url,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -194,3 +196,58 @@ export function resetReadingTask(param) {
|
|||||||
data: 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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
+2
-1
@@ -12,7 +12,8 @@ export function verifySendCode(param) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/TrialSiteSurvey/verifySendCode',
|
url: '/TrialSiteSurvey/verifySendCode',
|
||||||
method: 'post',
|
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({
|
return request({
|
||||||
url: `/trialExperience/getTrialExperience/${doctorId}`,
|
url: `/trialExperience/getTrialExperience`,
|
||||||
method: 'get'
|
method: 'post',
|
||||||
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -236,10 +237,14 @@ export function downloadByAttachmentId(doctorId, attachmentIds) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getDetail(doctorId) {
|
export function getDetail(doctorId, TrialId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/doctor/getDetail/${doctorId}`,
|
url: `/doctor/getDetail`,
|
||||||
method: 'get'
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
DoctorId: doctorId,
|
||||||
|
TrialId
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,3 +295,75 @@ export function verifyEmialGetDoctorInfo(param) {
|
|||||||
data: 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
|
||||||
|
})
|
||||||
|
}
|
||||||
+14
-5
@@ -286,10 +286,11 @@ export function trialSiteUserSummaryListExport(param) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getVisitStageList(trialId) {
|
export function getVisitStageList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/visitPlan/getVisitStageList/${trialId}`,
|
url: `/visitPlan/getVisitStageList`,
|
||||||
method: 'get'
|
method: 'post',
|
||||||
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1364,9 +1365,9 @@ export function getForwardList(param) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getNoneDicomStudyList(subjectVisitId, sudyId = '', isFilterZip = false) {
|
export function getNoneDicomStudyList(subjectVisitId, sudyId = '', isFilterZip = false, visitTaskId = '') {
|
||||||
return request({
|
return request({
|
||||||
url: `/NoneDicomStudy/getNoneDicomStudyList?subjectVisitId=${subjectVisitId}&nonedicomStudyId=${sudyId}&isFilterZip=${isFilterZip}`,
|
url: `/NoneDicomStudy/getNoneDicomStudyList?subjectVisitId=${subjectVisitId}&nonedicomStudyId=${sudyId}&isFilterZip=${isFilterZip}&visitTaskId=${visitTaskId}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -3905,4 +3906,12 @@ export function setTaskValid(data) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
// 一致性分析临床数据设置任务为有效
|
||||||
|
export function getVisitClinicalDataName(data) {
|
||||||
|
return request({
|
||||||
|
url: `/ReadingClinicalData/getVisitClinicalDataName`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
}
|
}
|
||||||
+9
-1
@@ -4,7 +4,8 @@ export function login(data) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/user/login',
|
url: '/user/login',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data,
|
||||||
|
ENCRYPT: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function loginOut(params) {
|
export function loginOut(params) {
|
||||||
@@ -185,3 +186,10 @@ export function sendMFAEmail(params) {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 获取公钥
|
||||||
|
export function getPublicKey() {
|
||||||
|
return request({
|
||||||
|
url: `/user/getPublicKey`,
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
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 |
@@ -8,10 +8,11 @@
|
|||||||
:visible.sync="config.visible"
|
:visible.sync="config.visible"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:show-close="config.showClose"
|
:show-close="config.showClose"
|
||||||
|
:top="config.top"
|
||||||
:width="config.width"
|
:width="config.width"
|
||||||
:fullscreen="config.fullscreen"
|
:fullscreen="config.fullscreen"
|
||||||
>
|
>
|
||||||
<div class="base-modal-body">
|
<div class="base-modal-body" :style="config.bodyStyle">
|
||||||
<slot name="dialog-body" />
|
<slot name="dialog-body" />
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="base-modal-footer">
|
<div slot="footer" class="base-modal-footer">
|
||||||
@@ -22,24 +23,26 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "BaseDialog",
|
name: 'BaseDialog',
|
||||||
props: {
|
props: {
|
||||||
config: {
|
config: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {
|
default: () => {
|
||||||
return {
|
return {
|
||||||
visible: false,
|
visible: false,
|
||||||
title: "",
|
title: '',
|
||||||
closeOnClickModal: false,
|
closeOnClickModal: false,
|
||||||
showClose: true,
|
showClose: true,
|
||||||
appendToBody: false,
|
appendToBody: false,
|
||||||
width: "100px",
|
width: '100px',
|
||||||
fullscreen: false,
|
fullscreen: false,
|
||||||
};
|
top: '15vh',
|
||||||
|
bodyStyle: '',
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.base-model-wrapper {
|
.base-model-wrapper {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col class="m-b-10" :span="24">
|
<el-col class="m-b-10" :span="24">
|
||||||
<el-table
|
<el-table
|
||||||
v-adaptive="{bottomOffset}"
|
v-adaptive="{ bottomOffset }"
|
||||||
:data="list"
|
:data="list"
|
||||||
:height="tableHeight"
|
:height="tableHeight"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
@@ -15,15 +15,44 @@
|
|||||||
>
|
>
|
||||||
<template v-for="(column, index) in columns">
|
<template v-for="(column, index) in columns">
|
||||||
<slot name="front-slot" />
|
<slot name="front-slot" />
|
||||||
|
<el-table-column v-if="column.type === 'tip'" :key="index" width="35">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="column.slot">
|
||||||
|
<!-- 具名slot -->
|
||||||
|
<slot v-if="column.slot" :name="column.slot" :scope="scope" />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<!-- 序号 -->
|
<!-- 序号 -->
|
||||||
<el-table-column v-if="column.type === 'selection'" :key="index" type="selection" width="55" />
|
<el-table-column
|
||||||
|
v-else-if="column.type === 'selection'"
|
||||||
|
:key="index"
|
||||||
|
type="selection"
|
||||||
|
width="55"
|
||||||
|
/>
|
||||||
<!-- 复选框 -->
|
<!-- 复选框 -->
|
||||||
<el-table-column v-else-if="column.type === 'index'" :key="index" type="index" width="50" />
|
<el-table-column
|
||||||
|
v-else-if="column.type === 'index'"
|
||||||
|
:key="index"
|
||||||
|
type="index"
|
||||||
|
width="50"
|
||||||
|
/>
|
||||||
<!-- 具体内容 -->
|
<!-- 具体内容 -->
|
||||||
<el-table-column v-else :key="index" align="left" :label="column.label" :width="column.width" :min-width="column.minWidth" :show-overflow-tooltip="column.showOverflowTooltip || false" :sortable="column.sortable || false" :prop="column.prop">
|
<el-table-column
|
||||||
|
v-else
|
||||||
|
:key="index"
|
||||||
|
align="left"
|
||||||
|
:label="column.label"
|
||||||
|
:width="column.width"
|
||||||
|
:min-width="column.minWidth"
|
||||||
|
:show-overflow-tooltip="column.showOverflowTooltip || false"
|
||||||
|
:sortable="column.sortable || false"
|
||||||
|
:prop="column.prop"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<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'">
|
<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)">
|
<!-- <a v-for="(operate, i) in column.operates" :key="i" href="javascript:void(0)" class="operate-button" @click="handleClick(operate, scope.row)">
|
||||||
@@ -31,7 +60,13 @@
|
|||||||
|
|
||||||
</a> -->
|
</a> -->
|
||||||
<span v-for="(operate, i) in column.operates" :key="i">
|
<span v-for="(operate, i) in column.operates" :key="i">
|
||||||
<el-button :size="operate.size || 'mini'" :type="operate.type || 'primary'" style="margin-right:5px;" @click="handleClick(operate, scope.row)">{{ operate.name }}</el-button>
|
<el-button
|
||||||
|
:size="operate.size || 'mini'"
|
||||||
|
:type="operate.type || 'primary'"
|
||||||
|
style="margin-right: 5px"
|
||||||
|
@click="handleClick(operate, scope.row)"
|
||||||
|
>{{ operate.name }}</el-button
|
||||||
|
>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
@@ -52,7 +87,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<!-- 分页部分 -->
|
<!-- 分页部分 -->
|
||||||
<el-col v-if="!hiddenPage" :span="24" class="page">
|
<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-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
@@ -96,45 +136,44 @@ export default {
|
|||||||
// 核心数据
|
// 核心数据
|
||||||
list: {
|
list: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => [],
|
||||||
},
|
},
|
||||||
|
|
||||||
// columns
|
// columns
|
||||||
columns: {
|
columns: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true,
|
required: true,
|
||||||
default: () => []
|
default: () => [],
|
||||||
},
|
},
|
||||||
// is hidden page for table
|
// is hidden page for table
|
||||||
hiddenPage: {
|
hiddenPage: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false,
|
||||||
},
|
},
|
||||||
bottomOffset: {
|
bottomOffset: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 45
|
default: 45,
|
||||||
},
|
},
|
||||||
searchData: {
|
searchData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {}
|
default: () => {},
|
||||||
},
|
},
|
||||||
total: {
|
total: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0
|
default: 0,
|
||||||
},
|
},
|
||||||
highlightCurrentRow: {
|
highlightCurrentRow: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
tableHeight() {
|
tableHeight() {
|
||||||
return 100
|
return 100
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 处理点击事件
|
// 处理点击事件
|
||||||
@@ -157,12 +196,12 @@ export default {
|
|||||||
},
|
},
|
||||||
pagination() {
|
pagination() {
|
||||||
this.$emit('getList')
|
this.$emit('getList')
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.page{
|
.page {
|
||||||
padding-top: 3px;
|
padding-top: 3px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,16 +81,25 @@
|
|||||||
<!-- <div v-show="stack.firstImageLoading" class="load-indicator">
|
<!-- <div v-show="stack.firstImageLoading" class="load-indicator">
|
||||||
Loading Series #{{ stack.seriesNumber }}...
|
Loading Series #{{ stack.seriesNumber }}...
|
||||||
</div>-->
|
</div>-->
|
||||||
|
<el-dialog
|
||||||
|
v-if="dcmTag.visible"
|
||||||
|
:visible.sync="dcmTag.visible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:title="dcmTag.title"
|
||||||
|
width="1000px"
|
||||||
|
custom-class="base-dialog-wrapper"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<DicomTags :image-id="stack.imageIds[stack.currentImageIdIndex]" @close="dcmTag.visible = false" />
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Vue from 'vue'
|
|
||||||
import Contextmenu from 'vue-contextmenujs'
|
|
||||||
Vue.use(Contextmenu)
|
|
||||||
import * as cornerstone from 'cornerstone-core'
|
import * as cornerstone from 'cornerstone-core'
|
||||||
import * as cornerstoneMath from 'cornerstone-math'
|
import * as cornerstoneMath from 'cornerstone-math'
|
||||||
import * as cornerstoneTools from 'cornerstone-tools'
|
import * as cornerstoneTools from 'cornerstone-tools'
|
||||||
|
|
||||||
const scroll = cornerstoneTools.import('util/scrollToIndex')
|
const scroll = cornerstoneTools.import('util/scrollToIndex')
|
||||||
import Hammer from 'hammerjs'
|
import Hammer from 'hammerjs'
|
||||||
import getOrientationString from '@/views/trials/trials-panel/reading/dicoms/tools/OrientationMarkers/getOrientationString'
|
import getOrientationString from '@/views/trials/trials-panel/reading/dicoms/tools/OrientationMarkers/getOrientationString'
|
||||||
@@ -108,8 +117,10 @@ cornerstoneTools.toolColors.setActiveColor('rgb(0, 255, 0)')
|
|||||||
// cornerstoneTools.init({ showSVGCursors: true })
|
// cornerstoneTools.init({ showSVGCursors: true })
|
||||||
cornerstoneTools.init()
|
cornerstoneTools.init()
|
||||||
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
const ToolStateManager = cornerstoneTools.globalImageIdSpecificToolStateManager
|
||||||
|
import DicomTags from './DicomTags'
|
||||||
export default {
|
export default {
|
||||||
name: 'DicomCanvas',
|
name: 'DicomCanvas',
|
||||||
|
components: { DicomTags },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -164,7 +175,8 @@ export default {
|
|||||||
mousePosition: { x: '', y: '', mo: '' },
|
mousePosition: { x: '', y: '', mo: '' },
|
||||||
markers: { top: '', right: '', bottom: '', left: '' },
|
markers: { top: '', right: '', bottom: '', left: '' },
|
||||||
orientationMarkers: [],
|
orientationMarkers: [],
|
||||||
originalMarkers: []
|
originalMarkers: [],
|
||||||
|
dcmTag: { visible: false, title: this.$t('trials:dicom-tag:title') }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -215,7 +227,7 @@ export default {
|
|||||||
cornerstoneTools.stopClip(this.canvas)
|
cornerstoneTools.stopClip(this.canvas)
|
||||||
this.toolState.clipPlaying = false
|
this.toolState.clipPlaying = false
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|
||||||
cornerstone.loadAndCacheImage(this.stack.imageIds[this.stack.currentImageIdIndex])
|
cornerstone.loadAndCacheImage(this.stack.imageIds[this.stack.currentImageIdIndex])
|
||||||
.then(image => {
|
.then(image => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
@@ -250,7 +262,13 @@ export default {
|
|||||||
apiTool
|
apiTool
|
||||||
)
|
)
|
||||||
if (!toolAlreadyAddedToElement) {
|
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
|
// Setup button listener
|
||||||
@@ -310,7 +328,7 @@ export default {
|
|||||||
// cornerstoneTools.addStackStateManager(this.canvas, ['stack', 'stackPrefetch', 'playClip'])
|
// cornerstoneTools.addStackStateManager(this.canvas, ['stack', 'stackPrefetch', 'playClip'])
|
||||||
cornerstoneTools.addToolState(this.canvas, 'stack', this.stack)
|
cornerstoneTools.addToolState(this.canvas, 'stack', this.stack)
|
||||||
// cornerstoneTools.stackPrefetch.enable(this.canvas)
|
// cornerstoneTools.stackPrefetch.enable(this.canvas)
|
||||||
cornerstone.updateImage(element, true)
|
cornerstone.updateImage(element, true)
|
||||||
// cornerstoneTools.stackPrefetch.setConfiguration({ maxImagesToPrefetch: Infinity,
|
// cornerstoneTools.stackPrefetch.setConfiguration({ maxImagesToPrefetch: Infinity,
|
||||||
// preserveExistingPool: true })
|
// preserveExistingPool: true })
|
||||||
// cornerstoneTools.stackPrefetch.enable(this.canvas)
|
// cornerstoneTools.stackPrefetch.enable(this.canvas)
|
||||||
@@ -364,8 +382,8 @@ export default {
|
|||||||
if (this.dicomInfo.thick) {
|
if (this.dicomInfo.thick) {
|
||||||
this.dicomInfo.thick = this.dicomInfo.thick.toFixed(2)
|
this.dicomInfo.thick = this.dicomInfo.thick.toFixed(2)
|
||||||
}
|
}
|
||||||
let newImageIdIndex = this.stack.imageIds.findIndex(i=>i===e.detail.image.imageId)
|
const newImageIdIndex = this.stack.imageIds.findIndex(i => i === e.detail.image.imageId)
|
||||||
if(newImageIdIndex === -1) return
|
if (newImageIdIndex === -1) return
|
||||||
this.stack.currentImageIdIndex = newImageIdIndex
|
this.stack.currentImageIdIndex = newImageIdIndex
|
||||||
this.stack.imageIdIndex = newImageIdIndex
|
this.stack.imageIdIndex = newImageIdIndex
|
||||||
this.series.imageIdIndex = newImageIdIndex
|
this.series.imageIdIndex = newImageIdIndex
|
||||||
@@ -441,7 +459,7 @@ export default {
|
|||||||
if (!markers) {
|
if (!markers) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.orientationMarkers = [oppositeColumn, row, column, oppositeRow]
|
this.orientationMarkers = [oppositeColumn, row, column, oppositeRow]
|
||||||
this.originalMarkers = [oppositeColumn, row, column, oppositeRow]
|
this.originalMarkers = [oppositeColumn, row, column, oppositeRow]
|
||||||
this.setMarkers()
|
this.setMarkers()
|
||||||
@@ -636,7 +654,7 @@ export default {
|
|||||||
enabledElement.renderingTools.renderCanvasData = renderCanvasData
|
enabledElement.renderingTools.renderCanvasData = renderCanvasData
|
||||||
},
|
},
|
||||||
scrollPage(offset) {
|
scrollPage(offset) {
|
||||||
if(this.loading) return
|
if (this.loading) return
|
||||||
var index = this.stack.currentImageIdIndex + offset
|
var index = this.stack.currentImageIdIndex + offset
|
||||||
if (index < 0) index = 0
|
if (index < 0) index = 0
|
||||||
else if (index >= this.stack.imageIds.length) {
|
else if (index >= this.stack.imageIds.length) {
|
||||||
@@ -648,7 +666,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
toggleClipPlay() {
|
toggleClipPlay() {
|
||||||
if(this.loading) return
|
if (this.loading) return
|
||||||
if (this.toolState.clipPlaying) {
|
if (this.toolState.clipPlaying) {
|
||||||
cornerstoneTools.stopClip(this.canvas)
|
cornerstoneTools.stopClip(this.canvas)
|
||||||
this.toolState.clipPlaying = false
|
this.toolState.clipPlaying = false
|
||||||
@@ -668,7 +686,7 @@ export default {
|
|||||||
resetWwwc() {
|
resetWwwc() {
|
||||||
this.toolState.viewportInvert = false
|
this.toolState.viewportInvert = false
|
||||||
var viewport = cornerstone.getViewport(this.canvas)
|
var viewport = cornerstone.getViewport(this.canvas)
|
||||||
viewport.invert = false
|
// viewport.invert = false
|
||||||
var image = cornerstone.getImage(this.canvas)
|
var image = cornerstone.getImage(this.canvas)
|
||||||
viewport.voi.windowWidth = image.windowWidth
|
viewport.voi.windowWidth = image.windowWidth
|
||||||
viewport.voi.windowCenter = image.windowCenter
|
viewport.voi.windowCenter = image.windowCenter
|
||||||
@@ -707,7 +725,7 @@ export default {
|
|||||||
this.orientationMarkers = [...this.originalMarkers]
|
this.orientationMarkers = [...this.originalMarkers]
|
||||||
this.setMarkers()
|
this.setMarkers()
|
||||||
}
|
}
|
||||||
|
|
||||||
var viewport = cornerstone.getViewport(this.canvas)
|
var viewport = cornerstone.getViewport(this.canvas)
|
||||||
viewport.hflip = false
|
viewport.hflip = false
|
||||||
viewport.vflip = false
|
viewport.vflip = false
|
||||||
@@ -747,6 +765,9 @@ export default {
|
|||||||
var uid = cornerstone.getImage(this.canvas).data.string('x00080018')
|
var uid = cornerstone.getImage(this.canvas).data.string('x00080018')
|
||||||
cornerstoneTools.SaveAs(this.canvas, `${uid}.png`)
|
cornerstoneTools.SaveAs(this.canvas, `${uid}.png`)
|
||||||
},
|
},
|
||||||
|
showTags() {
|
||||||
|
this.dcmTag.visible = true
|
||||||
|
},
|
||||||
fitToWindow() {
|
fitToWindow() {
|
||||||
if (this.stack.seriesNumber) {
|
if (this.stack.seriesNumber) {
|
||||||
cornerstone.fitToWindow(this.canvas)
|
cornerstone.fitToWindow(this.canvas)
|
||||||
|
|||||||
@@ -0,0 +1,288 @@
|
|||||||
|
<template>
|
||||||
|
<div class="dcm-tag">
|
||||||
|
<el-input
|
||||||
|
v-model="search"
|
||||||
|
size="mini"
|
||||||
|
:placeholder="$t('trials:dicom-tag:keywords')"
|
||||||
|
style="width:200px"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
:data="filterList(list)"
|
||||||
|
row-key="id"
|
||||||
|
default-expand-all
|
||||||
|
:tree-props="{children: 'child', hasChildren: 'hasChildren'}"
|
||||||
|
:default-sort="{prop: 'tagCode', order: 'ascending'}"
|
||||||
|
height="500"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
prop="tagCode"
|
||||||
|
label="Tag"
|
||||||
|
min-width="120"
|
||||||
|
sortable
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="tagName"
|
||||||
|
label="Description"
|
||||||
|
min-width="150"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="vr"
|
||||||
|
label="VR"
|
||||||
|
min-width="50"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="tagLength"
|
||||||
|
label="Length"
|
||||||
|
min-width="80"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="value"
|
||||||
|
label="Value"
|
||||||
|
min-width="200"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable
|
||||||
|
/>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import TAG_DICT from './dataDictionary'
|
||||||
|
import * as cornerstone from 'cornerstone-core'
|
||||||
|
import dicomParser from 'dicom-parser'
|
||||||
|
export default {
|
||||||
|
name: 'DicomTags',
|
||||||
|
props: {
|
||||||
|
imageId: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
list: [],
|
||||||
|
idx: 0,
|
||||||
|
search: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async mounted() {
|
||||||
|
const image = await cornerstone.loadAndCacheImage(this.imageId)
|
||||||
|
var dataSet = dicomParser.parseDicom(image.data.byteArray)
|
||||||
|
var output = []
|
||||||
|
this.dumpDataSet(dataSet, output)
|
||||||
|
this.list = output
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
filterList(list) {
|
||||||
|
if (list.length === 0) return []
|
||||||
|
if (!this.search) {
|
||||||
|
return list
|
||||||
|
} else {
|
||||||
|
const search = isNaN(parseFloat(this.search)) ? this.search.toLowerCase() : String(this.search)
|
||||||
|
const arr = list.filter(data => {
|
||||||
|
if (data.tagCode && data.tagCode.toLowerCase().includes(search)) {
|
||||||
|
return data
|
||||||
|
} else if (data.tagName && data.tagName.toLowerCase().includes(search)) {
|
||||||
|
return data
|
||||||
|
} else if (data.value) {
|
||||||
|
let v = ''
|
||||||
|
if (!isNaN(parseFloat(data.value))) {
|
||||||
|
v = String(data.value)
|
||||||
|
} else {
|
||||||
|
v = data.value.toLowerCase()
|
||||||
|
}
|
||||||
|
if (v.includes(search)) {
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return arr
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dumpDataSet(dataSet, output) {
|
||||||
|
try {
|
||||||
|
for (const propertyName in dataSet.elements) {
|
||||||
|
const elementObject = {}
|
||||||
|
const element = dataSet.elements[propertyName]
|
||||||
|
const tag = this.getTag(element.tag)
|
||||||
|
elementObject.id = `${this.idx++}${new Date().getTime()}`
|
||||||
|
if (!tag) {
|
||||||
|
const group = element.tag.substring(1, 5)
|
||||||
|
const el = element.tag.substring(5, 9)
|
||||||
|
elementObject.tagCode = ('(' + group + ',' + el + ')').toUpperCase()
|
||||||
|
} else {
|
||||||
|
elementObject.tagCode = tag ? tag.tag : ''
|
||||||
|
elementObject.tagName = tag ? tag.name : ''
|
||||||
|
}
|
||||||
|
|
||||||
|
elementObject.tagLength = element.length
|
||||||
|
elementObject.value = ''
|
||||||
|
elementObject.child = []
|
||||||
|
|
||||||
|
if (element.items) {
|
||||||
|
element.items.forEach(item => {
|
||||||
|
const childOutput = []
|
||||||
|
this.dumpDataSet(item.dataSet, childOutput)
|
||||||
|
elementObject.child.push(...childOutput)
|
||||||
|
})
|
||||||
|
} else if (element.fragments) {
|
||||||
|
// 多帧处理
|
||||||
|
} else {
|
||||||
|
var vr
|
||||||
|
if (element.vr !== undefined) {
|
||||||
|
vr = element.vr
|
||||||
|
} else {
|
||||||
|
if (tag !== undefined) {
|
||||||
|
vr = tag.vr
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elementObject.vr = vr
|
||||||
|
if (element.length < 128) {
|
||||||
|
// const str = dataSet.string(propertyName)
|
||||||
|
// if (elementObject.tagCode === 'x00280010') {
|
||||||
|
// console.log(str)
|
||||||
|
// }
|
||||||
|
// const stringIsAscii = this.isASCII(str)
|
||||||
|
// if (stringIsAscii && str !== undefined) {
|
||||||
|
// elementObject.value = str
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (element.vr === undefined && tag === undefined) {
|
||||||
|
if (element.length === 2) {
|
||||||
|
elementObject.value = dataSet.uint16(propertyName)
|
||||||
|
} else if (element.length === 4) {
|
||||||
|
elementObject.value = dataSet.uint32(propertyName)
|
||||||
|
}
|
||||||
|
const str = dataSet.string(propertyName)
|
||||||
|
const stringIsAscii = this.isASCII(str)
|
||||||
|
|
||||||
|
if (stringIsAscii) {
|
||||||
|
if (str !== undefined) {
|
||||||
|
elementObject.value = str
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (element.length !== 2 && element.length !== 4) {
|
||||||
|
// elementObject.value = 'binary data'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (this.isStringVr(vr)) {
|
||||||
|
const str = dataSet.string(propertyName)
|
||||||
|
const stringIsAscii = this.isASCII(str)
|
||||||
|
|
||||||
|
if (stringIsAscii) {
|
||||||
|
if (str !== undefined) {
|
||||||
|
elementObject.value = str
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
elementObject.value = dataSet.string(propertyName)
|
||||||
|
// if (element.length !== 2 && element.length !== 4) {
|
||||||
|
// // elementObject.value = 'binary data'
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
} else if (vr === 'US') {
|
||||||
|
let text = dataSet.uint16(propertyName)
|
||||||
|
for (let i = 1; i < dataSet.elements[propertyName].length / 2; i++) {
|
||||||
|
text += '\\' + dataSet.uint16(propertyName, i)
|
||||||
|
}
|
||||||
|
elementObject.value = text
|
||||||
|
} else if (vr === 'SS') {
|
||||||
|
let text = dataSet.int16(propertyName)
|
||||||
|
for (let i = 1; i < dataSet.elements[propertyName].length / 2; i++) {
|
||||||
|
text += '\\' + dataSet.int16(propertyName, i)
|
||||||
|
}
|
||||||
|
elementObject.value = text
|
||||||
|
} else if (vr === 'UL') {
|
||||||
|
let text = dataSet.uint32(propertyName)
|
||||||
|
for (let i = 1; i < dataSet.elements[propertyName].length / 4; i++) {
|
||||||
|
text += '\\' + dataSet.uint32(propertyName, i)
|
||||||
|
}
|
||||||
|
elementObject.value = text
|
||||||
|
} else if (vr === 'SL') {
|
||||||
|
let text = dataSet.int32(propertyName)
|
||||||
|
for (let i = 1; i < dataSet.elements[propertyName].length / 4; i++) {
|
||||||
|
text += '\\' + dataSet.int32(propertyName, i)
|
||||||
|
}
|
||||||
|
elementObject.value = text
|
||||||
|
} else if (vr === 'FD') {
|
||||||
|
let text = dataSet.double(propertyName)
|
||||||
|
for (let i = 1; i < dataSet.elements[propertyName].length / 8; i++) {
|
||||||
|
text += '\\' + dataSet.double(propertyName, i)
|
||||||
|
}
|
||||||
|
elementObject.value = text
|
||||||
|
} else if (vr === 'FL') {
|
||||||
|
let text = dataSet.float(propertyName)
|
||||||
|
for (let i = 1; i < dataSet.elements[propertyName].length / 4; i++) {
|
||||||
|
text += '\\' + dataSet.float(propertyName, i)
|
||||||
|
}
|
||||||
|
elementObject.value = text
|
||||||
|
} else if (vr === 'OB' || vr === 'OW' || vr === 'UN' || vr === 'OF' || vr === 'UT') {
|
||||||
|
if (element.length === 2) {
|
||||||
|
elementObject.value = dataSet.uint16(propertyName)
|
||||||
|
} else if (element.length === 4) {
|
||||||
|
elementObject.value = dataSet.uint32(propertyName)
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
} else if (vr === 'AT') {
|
||||||
|
// var group = dataSet.uint16(propertyName, 0);
|
||||||
|
// var groupHexStr = ("0000" + group.toString(16)).substr(-4);
|
||||||
|
// var element = dataSet.uint16(propertyName, 1);
|
||||||
|
// var elementHexStr = ("0000" + element.toString(16)).substr(-4);
|
||||||
|
// text += "x" + groupHexStr + elementHexStr;
|
||||||
|
} else if (vr === 'SQ') {
|
||||||
|
} else {
|
||||||
|
// no display code for VR yet, sorry!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
output.push(elementObject)
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
const ex = {
|
||||||
|
exception: err,
|
||||||
|
output: output
|
||||||
|
}
|
||||||
|
console.log(ex)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getTag(tag) {
|
||||||
|
var group = tag.substring(1, 5)
|
||||||
|
var element = tag.substring(5, 9)
|
||||||
|
var tagIndex = ('(' + group + ',' + element + ')').toUpperCase()
|
||||||
|
var attr = TAG_DICT[tagIndex]
|
||||||
|
return attr
|
||||||
|
},
|
||||||
|
isASCII(str) {
|
||||||
|
return /^[\x00-\x7F]*$/.test(str)
|
||||||
|
},
|
||||||
|
isStringVr(vr) {
|
||||||
|
if (vr === 'AT' || vr === 'FL' || vr === 'FD' || vr === 'OB' || vr === 'OF' || vr === 'OW' || vr === 'SI' || vr === 'SQ' || vr === 'SS' || vr === 'UL' || vr === 'US') {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.dcm-tag{
|
||||||
|
// user-select: none;
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 8px;
|
||||||
|
height: 15px;
|
||||||
|
}
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
border-radius: 10px;
|
||||||
|
background: #d0d0d0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -182,7 +182,7 @@
|
|||||||
<svg-icon icon-class="fitToImage" style="font-size:20px;" />
|
<svg-icon icon-class="fitToImage" style="font-size:20px;" />
|
||||||
</button>
|
</button>
|
||||||
<!-- <button title="旋转" class="btn-link dropdown" data-tool="Rotate" @click="setToolActive($event,'Rotate')"> -->
|
<!-- <button title="旋转" class="btn-link dropdown" data-tool="Rotate" @click="setToolActive($event,'Rotate')"> -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 测量标注 -->
|
<!-- 测量标注 -->
|
||||||
@@ -233,6 +233,10 @@
|
|||||||
<button :title="$t('trials:dicom-show:image')" class="btn-link" @click="currentDicomCanvas.saveImage()">
|
<button :title="$t('trials:dicom-show:image')" class="btn-link" @click="currentDicomCanvas.saveImage()">
|
||||||
<svg-icon icon-class="image" style="font-size:20px;" />
|
<svg-icon icon-class="image" style="font-size:20px;" />
|
||||||
</button>
|
</button>
|
||||||
|
<!-- 标签 -->
|
||||||
|
<button :title="$t('trials:dicom-show:tags')" class="btn-link" @click="currentDicomCanvas.showTags()">
|
||||||
|
<svg-icon icon-class="dictionary" style="font-size:20px;" />
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="measureTool-wrapper">
|
<div class="measureTool-wrapper">
|
||||||
@@ -405,7 +409,7 @@ export default {
|
|||||||
loadImageStack(dicomSeries) {
|
loadImageStack(dicomSeries) {
|
||||||
this.currentDicomCanvas.toolState.clipPlaying = false
|
this.currentDicomCanvas.toolState.clipPlaying = false
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
let series = Object.assign({}, dicomSeries)
|
const series = Object.assign({}, dicomSeries)
|
||||||
this.currentDicomCanvas.loadImageStack(series)
|
this.currentDicomCanvas.loadImageStack(series)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -416,7 +420,7 @@ export default {
|
|||||||
Array.from(elements).forEach((element, index) => {
|
Array.from(elements).forEach((element, index) => {
|
||||||
const canvasIndex = element.getAttribute('data-index')
|
const canvasIndex = element.getAttribute('data-index')
|
||||||
if (index < seriesList.length && element.style.display !== 'none') {
|
if (index < seriesList.length && element.style.display !== 'none') {
|
||||||
let series = Object.assign({}, seriesList[index])
|
const series = Object.assign({}, seriesList[index])
|
||||||
this.$refs[`dicomCanvas${canvasIndex}`].loadImageStack(series)
|
this.$refs[`dicomCanvas${canvasIndex}`].loadImageStack(series)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,7 @@
|
|||||||
/>
|
/>
|
||||||
<!-- <embed v-else-if="fileType.indexOf('pdf') !== -1" :src="filePath+'#toolbar=0'" style="width: 100%; height: 100%"> -->
|
<!-- <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="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-->
|
<!-- <pdf-->
|
||||||
<!-- v-else-if="fileType.indexOf('pdf') !== -1"-->
|
<!-- v-else-if="fileType.indexOf('pdf') !== -1"-->
|
||||||
<!-- :src="`/static/pdfjs/web/viewer.html?file=${filePath}`">-->
|
<!-- :src="`/static/pdfjs/web/viewer.html?file=${filePath}`">-->
|
||||||
@@ -40,7 +40,8 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
currentUser: zzSessionStorage.getItem('userName')
|
currentUser: zzSessionStorage.getItem('userName'),
|
||||||
|
COMPANY:process.env.VUE_APP_COMPANY_NAME
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ export default {
|
|||||||
inputChange(v) {
|
inputChange(v) {
|
||||||
this.resultFilter = this.options.filter((o) => {
|
this.resultFilter = this.options.filter((o) => {
|
||||||
var reg = new RegExp(v, 'ig')
|
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() {
|
getTrialList() {
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export default {
|
|||||||
this.btnDisabled = false
|
this.btnDisabled = false
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.fileList[0].id = res.Result[0].Id
|
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)
|
this.$emit('getFileList', res.Result[0].Id, res.Result[0].Path)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -113,13 +113,13 @@ export default {
|
|||||||
if (isValidFile) {
|
if (isValidFile) {
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
} else {
|
} else {
|
||||||
this.$alert('must be in pdf format')
|
this.$alert(this.$t('upload:rule:MUSTPDF'))
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeRemove(file, fileList) {
|
beforeRemove(file, fileList) {
|
||||||
if (file && file.status === 'success') {
|
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) {
|
handleRemoveFile(file, fileList) {
|
||||||
@@ -146,7 +146,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleExceed(files, fileList) {
|
handleExceed(files, fileList) {
|
||||||
this.$message.warning(`Upload is currently limited to 1 file`)
|
this.$message.warning(this.$t('upload:rule:maxFile1'))
|
||||||
},
|
},
|
||||||
fileValid(fileName, typeArr) {
|
fileValid(fileName, typeArr) {
|
||||||
var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
|
var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
|
||||||
|
|||||||
@@ -9,37 +9,51 @@
|
|||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
:accept="accept"
|
: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>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getAttachmentByType, uploadFile, saveAttachments, deleteAttachment } from '@/api/attachment'
|
import {
|
||||||
|
getAttachmentByType,
|
||||||
|
uploadFile,
|
||||||
|
saveAttachments,
|
||||||
|
deleteAttachment,
|
||||||
|
} from '@/api/attachment'
|
||||||
export default {
|
export default {
|
||||||
name: 'UploadFiles',
|
name: 'UploadFiles',
|
||||||
props: {
|
props: {
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true,
|
||||||
},
|
},
|
||||||
doctorId: {
|
doctorId: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true,
|
||||||
},
|
},
|
||||||
accept: {
|
accept: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fileList: [],
|
fileList: [],
|
||||||
repeat: false,
|
repeat: false,
|
||||||
isDisabled: false
|
isDisabled: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
doctorId() {
|
||||||
|
if (this.doctorId) {
|
||||||
|
this.initFileList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if(!this.doctorId) return
|
if (!this.doctorId) return
|
||||||
this.initFileList()
|
this.initFileList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -49,24 +63,28 @@ export default {
|
|||||||
lock: true,
|
lock: true,
|
||||||
text: 'Loading',
|
text: 'Loading',
|
||||||
spinner: 'el-icon-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 => {
|
getAttachmentByType(this.doctorId, this.type)
|
||||||
loading.close()
|
.then((res) => {
|
||||||
if (res.IsSuccess) {
|
loading.close()
|
||||||
if (res.Result.length > 0) {
|
if (res.IsSuccess) {
|
||||||
this.fileList = this.formatterFileList(res.Result)
|
if (res.Result.length > 0) {
|
||||||
this.$emit('getFileList', this.fileList)
|
this.fileList = this.formatterFileList(res.Result)
|
||||||
} else {
|
this.$emit('getFileList', this.fileList)
|
||||||
this.fileList = []
|
} else {
|
||||||
|
this.fileList = []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
}).catch(() => { loading.close() })
|
.catch(() => {
|
||||||
|
loading.close()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
formatterFileList(list) {
|
formatterFileList(list) {
|
||||||
var arr = []
|
var arr = []
|
||||||
list.forEach(item => {
|
list.forEach((item) => {
|
||||||
const data = {
|
const data = {
|
||||||
DoctorId: item.DoctorId,
|
DoctorId: item.DoctorId,
|
||||||
Type: item.Type,
|
Type: item.Type,
|
||||||
@@ -74,7 +92,7 @@ export default {
|
|||||||
FullPath: item.FullPath,
|
FullPath: item.FullPath,
|
||||||
FileName: item.FileName,
|
FileName: item.FileName,
|
||||||
CreateTime: item.CreateTime,
|
CreateTime: item.CreateTime,
|
||||||
Id: item.Id
|
Id: item.Id,
|
||||||
}
|
}
|
||||||
arr.push(data)
|
arr.push(data)
|
||||||
})
|
})
|
||||||
@@ -85,32 +103,42 @@ export default {
|
|||||||
// 检测文件后缀名
|
// 检测文件后缀名
|
||||||
if (this.checkFileSuffix(param.file.name)) {
|
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) {
|
if (isRepeat) {
|
||||||
this.$confirm('Override the existing resume?', {
|
this.$confirm(
|
||||||
type: 'warning',
|
this.$t('curriculumVitae:resume:message:existingResume'),
|
||||||
distinguishCancelAndClose: true,
|
{
|
||||||
confirmButtonText: 'OK',
|
type: 'warning',
|
||||||
cancelButtonText: 'Cancel'
|
distinguishCancelAndClose: true,
|
||||||
})
|
}
|
||||||
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// 重名覆盖
|
// 重名覆盖
|
||||||
this.repeat = true
|
this.repeat = true
|
||||||
this.uploadFile(param.file)
|
this.uploadFile(param.file)
|
||||||
})
|
})
|
||||||
.catch(action => {})
|
.catch((action) => {})
|
||||||
} else {
|
} else {
|
||||||
this.uploadFile(param.file)
|
this.uploadFile(param.file)
|
||||||
}
|
}
|
||||||
} else {
|
} 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) {
|
async uploadFile(file) {
|
||||||
this.isDisabled = true
|
this.isDisabled = true
|
||||||
var fileName = file.name
|
var fileName = file.name
|
||||||
file = await this.fileToBlob(file)
|
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) {
|
if (this.repeat) {
|
||||||
const index = this.fileList.findIndex((item, index) => {
|
const index = this.fileList.findIndex((item, index) => {
|
||||||
return item.FileName === fileName
|
return item.FileName === fileName
|
||||||
@@ -124,52 +152,60 @@ export default {
|
|||||||
Type: this.type,
|
Type: this.type,
|
||||||
Path: this.$getObjectName(res.url),
|
Path: this.$getObjectName(res.url),
|
||||||
FullPath: this.$getObjectName(res.url),
|
FullPath: this.$getObjectName(res.url),
|
||||||
FileName: fileName
|
FileName: fileName,
|
||||||
}
|
}
|
||||||
this.fileList.push(fileData)
|
this.fileList.push(fileData)
|
||||||
}
|
}
|
||||||
this.saveUploadFiles()
|
this.saveUploadFiles()
|
||||||
},
|
},
|
||||||
saveUploadFiles() {
|
saveUploadFiles() {
|
||||||
saveAttachments(this.fileList).then(res => {
|
saveAttachments(this.fileList)
|
||||||
this.fileList = this.formatterFileList(res.Result)
|
.then((res) => {
|
||||||
this.isDisabled = false
|
this.fileList = this.formatterFileList(res.Result)
|
||||||
this.$message.success('Uploaded successfully')
|
this.isDisabled = false
|
||||||
this.$emit('getFileList', this.fileList)
|
this.$message.success(
|
||||||
}).catch(() => {
|
this.$t('trials:uploadDicomList:table:Uploaded')
|
||||||
this.isDisabled = false
|
)
|
||||||
})
|
this.$emit('getFileList', this.fileList)
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.isDisabled = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleDeleteFile(file) {
|
handleDeleteFile(file) {
|
||||||
this.$confirm('Sure to remove?', {
|
this.$confirm(this.$t('system:reviewer:confirm:delete'), {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
|
})
|
||||||
}).then(() => {
|
.then(() => {
|
||||||
deleteAttachment(file.Id, file.Path)
|
deleteAttachment(file.Id, file.Path).then((res) => {
|
||||||
.then(res => {
|
|
||||||
if (res.IsSuccess) {
|
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.$emit('getFileList', this.fileList)
|
||||||
this.$message({
|
this.$message({
|
||||||
message: this.$t('common:message:deletedSuccessfully'),
|
message: this.$t('common:message:deletedSuccessfully'),
|
||||||
type: 'success'
|
type: 'success',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(action => {})
|
.catch((action) => {})
|
||||||
},
|
},
|
||||||
checkFileSuffix(fileName) {
|
checkFileSuffix(fileName) {
|
||||||
var index = fileName.lastIndexOf('.')
|
var index = fileName.lastIndexOf('.')
|
||||||
var suffix = fileName.substring(index + 1, fileName.length)
|
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>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.uploadFiles-container{
|
.uploadFiles-container {
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
}
|
}
|
||||||
.uploadFiles-container .el-upload--text {
|
.uploadFiles-container .el-upload--text {
|
||||||
|
|||||||
@@ -180,10 +180,10 @@
|
|||||||
<template v-if="question.Unit" slot="append">{{ question.Unit }}</template>
|
<template v-if="question.Unit" slot="append">{{ question.Unit }}</template>
|
||||||
</el-input>
|
</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">
|
<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>
|
||||||
<span v-if="question.CustomCalculateMark === 10 && question.ClinicalQuestionType === 'number' && questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId]" style="margin-left: 10px">
|
<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>
|
||||||
<!-- 生日不能大于截止日期 -->
|
<!-- 生日不能大于截止日期 -->
|
||||||
<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">
|
<span v-if="question.CustomCalculateMark === 11 && question.ClinicalQuestionType === 'number'" v-show="questionForm[JSON.parse(question.CalculateQuestions)[0].TableQuestionId] > questionForm[JSON.parse(question.CalculateQuestions)[0].QuestionId]" style="margin-left: 10px;font-size: 12px;color:#f66">
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="close"
|
@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') }}
|
{{ $t('common:button:cancel') }}
|
||||||
</el-button>
|
</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"
|
class="el-icon-warning-outline"
|
||||||
style="color: #f56c6c; font-size: 24px"
|
style="color: #f56c6c; font-size: 24px"
|
||||||
></i>
|
></i>
|
||||||
<span>{{ $t("feedBack:imgfail:tip") }}</span>
|
<span>{{ $t('feedBack:imgfail:tip') }}</span>
|
||||||
</p>
|
</p>
|
||||||
<!-- 问题反馈 -->
|
<!-- 问题反馈 -->
|
||||||
<el-form-item
|
<el-form-item
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
<div slot="footer" v-if="type !== 'detail' || isImgfail">
|
<div slot="footer" v-if="type !== 'detail' || isImgfail">
|
||||||
<!-- 取消 -->
|
<!-- 取消 -->
|
||||||
<el-button size="small" @click.stop="cancel">
|
<el-button size="small" @click.stop="cancel">
|
||||||
{{ $t("feedBack:button:cancel") }}
|
{{ $t('feedBack:button:cancel') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 保存 -->
|
<!-- 保存 -->
|
||||||
<el-button
|
<el-button
|
||||||
@@ -149,21 +149,21 @@
|
|||||||
@click.stop="save"
|
@click.stop="save"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
>
|
>
|
||||||
{{ $t("feedBack:button:save") }}
|
{{ $t('feedBack:button:save') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import uploadImage from "./uploadImage.vue";
|
import uploadImage from './uploadImage.vue'
|
||||||
import {
|
import {
|
||||||
addOrUpdateUserFeedBack,
|
addOrUpdateUserFeedBack,
|
||||||
getUserFeedBackInfo,
|
getUserFeedBackInfo,
|
||||||
batchUpdateFeedBackState,
|
batchUpdateFeedBackState,
|
||||||
} from "@/api/trials.js";
|
} from '@/api/trials.js'
|
||||||
export default {
|
export default {
|
||||||
name: "FB",
|
name: 'FB',
|
||||||
components: { uploadImage },
|
components: { uploadImage },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -195,131 +195,131 @@ export default {
|
|||||||
QuestionType: [
|
QuestionType: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t("common:ruleMessage:specify"),
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
QuestionDescription: [
|
QuestionDescription: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t("common:ruleMessage:specify"),
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
if (value.length < 5) {
|
if (value.length < 5) {
|
||||||
callback(
|
callback(
|
||||||
new Error(this.$t("feedBack:ruleMessage:lengthLimitMin5"))
|
new Error(this.$t('feedBack:ruleMessage:lengthLimitMin5'))
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
callback();
|
callback()
|
||||||
},
|
},
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
isUpload: false,
|
isUpload: false,
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
level() {
|
level() {
|
||||||
if (this.hasPermi(["role:dev", "role:admin"])) {
|
if (this.hasPermi(['role:dev', 'role:admin'])) {
|
||||||
return 9;
|
return 9
|
||||||
}
|
}
|
||||||
if (this.hasPermi(["role:pm"])) {
|
if (this.hasPermi(['role:pm', 'role:apm'])) {
|
||||||
return 8;
|
return 8
|
||||||
}
|
}
|
||||||
if (this.hasPermi(["role:ir", "role:crc"])) {
|
if (this.hasPermi(['role:ir', 'role:crc'])) {
|
||||||
return 7;
|
return 7
|
||||||
}
|
}
|
||||||
return 0;
|
return 0
|
||||||
},
|
},
|
||||||
QuestionTypeOptions() {
|
QuestionTypeOptions() {
|
||||||
if (this.level > 7) {
|
if (this.level > 7) {
|
||||||
return [
|
return [
|
||||||
...this.$d.FeedBackTypeToCRC.filter((item) => item.value > 0),
|
...this.$d.FeedBackTypeToCRC.filter((item) => item.value > 0),
|
||||||
...this.$d.FeedBackTypeToIR,
|
...this.$d.FeedBackTypeToIR,
|
||||||
];
|
]
|
||||||
}
|
}
|
||||||
if (this.hasPermi(["role:ir"])) {
|
if (this.hasPermi(['role:ir'])) {
|
||||||
return this.$d.FeedBackTypeToIR;
|
return this.$d.FeedBackTypeToIR
|
||||||
}
|
}
|
||||||
if (this.hasPermi(["role:crc"])) {
|
if (this.hasPermi(['role:crc'])) {
|
||||||
return this.$d.FeedBackTypeToCRC;
|
return this.$d.FeedBackTypeToCRC
|
||||||
}
|
}
|
||||||
return [];
|
return []
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open(data) {
|
open(data) {
|
||||||
let { type, trialId, Id, visitTaskId, SubjectVisitId } = data;
|
let { type, trialId, Id, visitTaskId, SubjectVisitId } = data
|
||||||
this.type = type;
|
this.type = type
|
||||||
this.trialId = trialId;
|
this.trialId = trialId
|
||||||
this.Id = Id;
|
this.Id = Id
|
||||||
this.visitTaskId = visitTaskId;
|
this.visitTaskId = visitTaskId
|
||||||
this.SubjectVisitId = SubjectVisitId;
|
this.SubjectVisitId = SubjectVisitId
|
||||||
if (visitTaskId) {
|
if (visitTaskId) {
|
||||||
this.isImgfail = true;
|
this.isImgfail = true
|
||||||
}
|
}
|
||||||
this.setTypeOption();
|
this.setTypeOption()
|
||||||
if (!Id) {
|
if (!Id) {
|
||||||
this.title = this.setTitle();
|
this.title = this.setTitle()
|
||||||
}
|
}
|
||||||
if (Id || visitTaskId) {
|
if (Id || visitTaskId) {
|
||||||
this.getInfo(Id, visitTaskId);
|
this.getInfo(Id, visitTaskId)
|
||||||
}
|
}
|
||||||
this.visible = true;
|
this.visible = true
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.visible = false;
|
this.visible = false
|
||||||
this.$emit("closed");
|
this.$emit('closed')
|
||||||
},
|
},
|
||||||
async save() {
|
async save() {
|
||||||
try {
|
try {
|
||||||
let validate = await this.$refs.feedBackForm.validate();
|
let validate = await this.$refs.feedBackForm.validate()
|
||||||
if (!validate) return;
|
if (!validate) return
|
||||||
if (this.trialId) {
|
if (this.trialId) {
|
||||||
this.form.TrialId = this.trialId;
|
this.form.TrialId = this.trialId
|
||||||
}
|
}
|
||||||
if (this.visitTaskId) {
|
if (this.visitTaskId) {
|
||||||
this.form.VisitTaskId = this.visitTaskId;
|
this.form.VisitTaskId = this.visitTaskId
|
||||||
}
|
}
|
||||||
if (this.SubjectVisitId) {
|
if (this.SubjectVisitId) {
|
||||||
this.form.SubjectVisitId = this.SubjectVisitId;
|
this.form.SubjectVisitId = this.SubjectVisitId
|
||||||
}
|
}
|
||||||
if (this.Id) {
|
if (this.Id) {
|
||||||
this.form.Id = this.Id;
|
this.form.Id = this.Id
|
||||||
}
|
}
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
let res = await addOrUpdateUserFeedBack(this.form);
|
let res = await addOrUpdateUserFeedBack(this.form)
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.$emit("success");
|
this.$emit('success')
|
||||||
this.$message.success(this.$t("feedBack:save:success"));
|
this.$message.success(this.$t('feedBack:save:success'))
|
||||||
this.cancel();
|
this.cancel()
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
console.log(err);
|
console.log(err)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 修改状态
|
// 修改状态
|
||||||
async changeState() {
|
async changeState() {
|
||||||
if (this.isImgfail) return;
|
if (this.isImgfail) return
|
||||||
try {
|
try {
|
||||||
let data = {
|
let data = {
|
||||||
IdList: [this.Id],
|
IdList: [this.Id],
|
||||||
State: this.form.State,
|
State: this.form.State,
|
||||||
};
|
}
|
||||||
let res = await batchUpdateFeedBackState(data);
|
let res = await batchUpdateFeedBackState(data)
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.$message.success(this.$t("feedBack:changeState:success"));
|
this.$message.success(this.$t('feedBack:changeState:success'))
|
||||||
this.$emit("success");
|
this.$emit('success')
|
||||||
// this.cancel();
|
// this.cancel();
|
||||||
this.getInfo(this.Id, this.visitTaskId);
|
this.getInfo(this.Id, this.visitTaskId)
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取反馈详情
|
// 获取反馈详情
|
||||||
@@ -328,56 +328,56 @@ export default {
|
|||||||
let data = {
|
let data = {
|
||||||
Id,
|
Id,
|
||||||
visitTaskId,
|
visitTaskId,
|
||||||
};
|
}
|
||||||
let res = await getUserFeedBackInfo(data);
|
let res = await getUserFeedBackInfo(data)
|
||||||
if (res.IsSuccess && res.Result) {
|
if (res.IsSuccess && res.Result) {
|
||||||
this.form = res.Result;
|
this.form = res.Result
|
||||||
this.Id = res.Result.Id;
|
this.form.ScreenshotList = this.form.ScreenshotList || []
|
||||||
|
this.Id = res.Result.Id
|
||||||
if (res.Result.State > 0) {
|
if (res.Result.State > 0) {
|
||||||
this.isStateChange = false;
|
this.isStateChange = false
|
||||||
}
|
}
|
||||||
if (res.Result.VisitTaskId) {
|
if (res.Result.VisitTaskId) {
|
||||||
this.visitTaskId = res.Result.VisitTaskId;
|
this.visitTaskId = res.Result.VisitTaskId
|
||||||
}
|
}
|
||||||
if (res.Result.SubjectVisitId) {
|
if (res.Result.SubjectVisitId) {
|
||||||
this.SubjectVisitId = res.Result.SubjectVisitId;
|
this.SubjectVisitId = res.Result.SubjectVisitId
|
||||||
}
|
}
|
||||||
let code = this.$fd("UserType", res.Result.UserTypeEnum);
|
let code = this.$fd('UserType', res.Result.UserTypeEnum)
|
||||||
this.title = this.setTitle(code, res.Result.FeedBackFullName);
|
this.title = this.setTitle(code, res.Result.FeedBackFullName)
|
||||||
if (visitTaskId) {
|
if (visitTaskId) {
|
||||||
code = `${res.Result.SubjectCode}-${res.Result.SubjectVisitName}`;
|
code = `${res.Result.SubjectCode}-${res.Result.SubjectVisitName}`
|
||||||
this.title = this.setTitle(code, res.Result.FeedBackFullName);
|
this.title = this.setTitle(code, res.Result.FeedBackFullName)
|
||||||
}
|
}
|
||||||
this.$refs.uploadImage.initFileList(res.Result.ScreenshotList);
|
this.$refs.uploadImage.initFileList(res.Result.ScreenshotList)
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setTypeOption() {
|
setTypeOption() {
|
||||||
if (!this.trialId) return (this.options = []);
|
if (!this.trialId) return (this.options = [])
|
||||||
if (this.hasPermi(["role:ir"]))
|
if (this.hasPermi(['role:ir']))
|
||||||
return (this.option = this.$d.FeedBackTypeToIR);
|
return (this.option = this.$d.FeedBackTypeToIR)
|
||||||
if (this.hasPermi(["role:crc"]))
|
if (this.hasPermi(['role:crc']))
|
||||||
return (this.option = this.$d.FeedBackTypeToCRC);
|
return (this.option = this.$d.FeedBackTypeToCRC)
|
||||||
},
|
},
|
||||||
setTitle(code, name) {
|
setTitle(code, name) {
|
||||||
console.log(code, name);
|
if (this.hasPermi(['role:pm']) && this.visitTaskId) {
|
||||||
if (this.hasPermi(["role:pm"]) && this.visitTaskId) {
|
return `${this.$t('feedBack:form:title:pm2')}(${code}/${name})`
|
||||||
return `${this.$t("feedBack:form:title:pm2")}(${code}/${name})`;
|
|
||||||
}
|
}
|
||||||
if (this.hasPermi(["role:pm", "role:dev", "role:admin"])) {
|
if (this.hasPermi(['role:pm', 'role:dev', 'role:admin'])) {
|
||||||
return `${this.$t("feedBack:form:title:pm")}(${code},${name})`;
|
return `${this.$t('feedBack:form:title:pm')}(${code},${name})`
|
||||||
}
|
}
|
||||||
if (this.hasPermi(["role:ir", "role:crc"]) && this.type === "detail") {
|
if (this.hasPermi(['role:ir', 'role:crc']) && this.type === 'detail') {
|
||||||
return `${this.$t("feedBack:form:detail:title")}`;
|
return `${this.$t('feedBack:form:detail:title')}`
|
||||||
}
|
}
|
||||||
if (this.hasPermi(["role:ir", "role:crc"])) {
|
if (this.hasPermi(['role:ir', 'role:crc'])) {
|
||||||
return `${this.$t("feedBack:form:title")}`;
|
return `${this.$t('feedBack:form:title')}`
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.tip {
|
.tip {
|
||||||
|
|||||||
@@ -58,14 +58,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
const type = "Statement of Work";
|
const type = 'Statement of Work'
|
||||||
export default {
|
export default {
|
||||||
name: "UploadImage",
|
name: 'UploadImage',
|
||||||
props: {
|
props: {
|
||||||
path: {
|
path: {
|
||||||
required: true,
|
required: true,
|
||||||
default: () => {
|
default: () => {
|
||||||
return [];
|
return []
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
disabled: {
|
disabled: {
|
||||||
@@ -78,14 +78,14 @@ export default {
|
|||||||
},
|
},
|
||||||
trialId: {
|
trialId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: '',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fileList: [],
|
fileList: [],
|
||||||
btnDisabled: false,
|
btnDisabled: false,
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
remove(file, fileList) {
|
remove(file, fileList) {
|
||||||
@@ -93,115 +93,113 @@ export default {
|
|||||||
},
|
},
|
||||||
fileToBlob(file) {
|
fileToBlob(file) {
|
||||||
// 创建 FileReader 对象
|
// 创建 FileReader 对象
|
||||||
const reader = new FileReader();
|
const reader = new FileReader()
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
// FileReader 添加 load 事件
|
// FileReader 添加 load 事件
|
||||||
reader.addEventListener("load", (e) => {
|
reader.addEventListener('load', (e) => {
|
||||||
let blob;
|
let blob
|
||||||
if (typeof e.target.result === "object") {
|
if (typeof e.target.result === 'object') {
|
||||||
blob = new Blob([e.target.result]);
|
blob = new Blob([e.target.result])
|
||||||
} else {
|
} else {
|
||||||
blob = e.target.result;
|
blob = e.target.result
|
||||||
}
|
}
|
||||||
resolve(blob);
|
resolve(blob)
|
||||||
});
|
})
|
||||||
// FileReader 以 ArrayBuffer 格式 读取 File 对象中数据
|
// FileReader 以 ArrayBuffer 格式 读取 File 对象中数据
|
||||||
reader.readAsArrayBuffer(file);
|
reader.readAsArrayBuffer(file)
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 上传oss
|
// 上传oss
|
||||||
async uploadToOSS(name, file) {
|
async uploadToOSS(name, file) {
|
||||||
try {
|
try {
|
||||||
let defaultPath = "/System/FeedBack/";
|
let defaultPath = '/System/FeedBack/'
|
||||||
if (this.trialId) {
|
if (this.trialId) {
|
||||||
defaultPath = `/${this.trialId}/FeedBack/`;
|
defaultPath = `/${this.trialId}/FeedBack/`
|
||||||
}
|
}
|
||||||
let res = await this.OSSclient.put(`${defaultPath}${name}`, file);
|
let res = await this.OSSclient.put(`${defaultPath}${name}`, file)
|
||||||
return res;
|
return res
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err)
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
initFileList(list) {
|
initFileList(list) {
|
||||||
if (list && list.length > 0) {
|
if (list && list.length > 0) {
|
||||||
this.fileList = [];
|
this.fileList = []
|
||||||
list.forEach((item, index) => {
|
list.forEach((item, index) => {
|
||||||
let name = item.split("/");
|
let name = item.split('/')
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
name: name[name.length - 1],
|
name: name[name.length - 1],
|
||||||
path: item,
|
path: item,
|
||||||
fullPath: this.OSSclientConfig.basePath + item,
|
fullPath: this.OSSclientConfig.basePath + item,
|
||||||
url: this.OSSclientConfig.basePath + item,
|
url: this.OSSclientConfig.basePath + item,
|
||||||
uid: `${name[name.length - 1]}${index}`,
|
uid: `${name[name.length - 1]}${index}`,
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
console.log(this.fileList);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async uploadFile(param) {
|
async uploadFile(param) {
|
||||||
var fileName = param.file.name;
|
var fileName = param.file.name
|
||||||
this.$emit("update:isUpload", true);
|
this.$emit('update:isUpload', true)
|
||||||
this.btnDisabled = true;
|
this.btnDisabled = true
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
url: param.file.url,
|
url: param.file.url,
|
||||||
path: fileName,
|
path: fileName,
|
||||||
uid: param.file.uid,
|
uid: param.file.uid,
|
||||||
});
|
})
|
||||||
let file = await this.fileToBlob(param.file);
|
let file = await this.fileToBlob(param.file)
|
||||||
let res = await this.uploadToOSS(fileName, file);
|
let res = await this.uploadToOSS(fileName, file)
|
||||||
this.btnDisabled = false;
|
this.btnDisabled = false
|
||||||
let index = this.fileList.findIndex(
|
let index = this.fileList.findIndex((item) => item.uid === param.file.uid)
|
||||||
(item) => item.uid === param.file.uid
|
|
||||||
);
|
|
||||||
if (!res) {
|
if (!res) {
|
||||||
if (index >= 0) {
|
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;
|
let name = this.$getObjectName(res.url)
|
||||||
this.fileList[index].path = res.name;
|
this.fileList[index].url = this.OSSclientConfig.basePath + name
|
||||||
this.$emit("update:path", [...this.path, res.name]);
|
this.fileList[index].path = name
|
||||||
this.$emit("update:isUpload", false);
|
this.$emit('update:path', [...this.path, res.name])
|
||||||
return false;
|
this.$emit('update:isUpload', false)
|
||||||
|
return false
|
||||||
},
|
},
|
||||||
beforeUpload(file, fileList) {
|
beforeUpload(file, fileList) {
|
||||||
const isValidFile = this.fileValid(file.name, ["png", "jpg", "jpeg"]);
|
const isValidFile = this.fileValid(file.name, ['png', 'jpg', 'jpeg'])
|
||||||
if (isValidFile) {
|
if (isValidFile) {
|
||||||
// this.fileList = [];
|
// this.fileList = [];
|
||||||
} else {
|
} else {
|
||||||
this.$alert(this.$t("feedBack:uploadImg:format"));
|
this.$alert(this.$t('feedBack:uploadImg:format'))
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handlePreview(file) {
|
handlePreview(file) {
|
||||||
file.fullPath ? window.open(file.fullPath, "_blank") : "";
|
file.fullPath ? window.open(file.fullPath, '_blank') : ''
|
||||||
},
|
},
|
||||||
handleExceed(files, fileList) {
|
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) {
|
fileValid(fileName, typeArr) {
|
||||||
var extendName = fileName
|
var extendName = fileName
|
||||||
.substring(fileName.lastIndexOf(".") + 1)
|
.substring(fileName.lastIndexOf('.') + 1)
|
||||||
.toLocaleLowerCase();
|
.toLocaleLowerCase()
|
||||||
if (typeArr.indexOf(extendName) > -1) {
|
if (typeArr.indexOf(extendName) > -1) {
|
||||||
return true;
|
return true
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handlePictureCardPreview(file) {
|
handlePictureCardPreview(file) {
|
||||||
this.$refs[file.url].$viewer.show();
|
this.$refs[file.url].$viewer.show()
|
||||||
},
|
},
|
||||||
handleRemove(file) {
|
handleRemove(file) {
|
||||||
let index = this.fileList.findIndex((item) => item.uid === file.uid);
|
let index = this.fileList.findIndex((item) => item.uid === file.uid)
|
||||||
this.fileList.splice(index, 1);
|
this.fileList.splice(index, 1)
|
||||||
let arr = this.fileList.map((item) => item.path);
|
let arr = this.fileList.map((item) => item.path)
|
||||||
this.$emit("update:path", arr);
|
this.$emit('update:path', arr)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.upload-container .el-upload--text {
|
.upload-container .el-upload--text {
|
||||||
|
|||||||
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 uploadList from "./components/upload-list.vue";
|
||||||
import studyView from "./components/study-view.vue";
|
import studyView from "./components/study-view.vue";
|
||||||
import { getSubjectImageUploadList, deleteTaskStudy } from "@/api/load.js";
|
import { getSubjectImageUploadList, deleteTaskStudy } from "@/api/load.js";
|
||||||
import { downloadImage } from "@/utils/uploadZip.js";
|
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
export default {
|
export default {
|
||||||
name: "uploadImage",
|
name: "uploadImage",
|
||||||
@@ -591,7 +590,7 @@ export default {
|
|||||||
files.push(obj);
|
files.push(obj);
|
||||||
}
|
}
|
||||||
store.dispatch("trials/setUnLock", true);
|
store.dispatch("trials/setUnLock", true);
|
||||||
let res = await downloadImage(zipName, files);
|
// let res = await downloadImage(zipName, files);
|
||||||
store.dispatch("trials/setUnLock", false);
|
store.dispatch("trials/setUnLock", false);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
+80
-32
@@ -15,7 +15,7 @@ import '@/styles/index.scss' // global css
|
|||||||
import App from './App'
|
import App from './App'
|
||||||
import store from './store'
|
import store from './store'
|
||||||
import router from './router'
|
import router from './router'
|
||||||
|
import WHITELIST from "./utils/whiteList"
|
||||||
import '@/icons' // icon
|
import '@/icons' // icon
|
||||||
import '@/permission' // permission control
|
import '@/permission' // permission control
|
||||||
import md5 from 'js-md5'
|
import md5 from 'js-md5'
|
||||||
@@ -28,25 +28,22 @@ Vue.use(permission)
|
|||||||
|
|
||||||
import Viewer from 'v-viewer'
|
import Viewer from 'v-viewer'
|
||||||
import './assets/css/viewer.css'
|
import './assets/css/viewer.css'
|
||||||
|
|
||||||
Vue.use(Viewer)
|
|
||||||
Viewer.setDefaults({
|
Viewer.setDefaults({
|
||||||
Options: {
|
// navbar: true, //底部缩略图
|
||||||
'inline': true,
|
toolbar: {
|
||||||
'button': true,
|
zoomIn: true,
|
||||||
'navbar': true,
|
zoomOut: true,
|
||||||
'title': true,
|
reset: true,
|
||||||
'toolbar': true,
|
prev: true,
|
||||||
'tooltip': true,
|
next: true,
|
||||||
'movable': true,
|
rotateLeft: true,
|
||||||
'zoomable': true,
|
rotateRight: true,
|
||||||
'rotatable': true,
|
flipHorizontal: true,
|
||||||
'scalable': true,
|
flipVertical: true,
|
||||||
'transition': true,
|
|
||||||
'keyboard': true,
|
|
||||||
'url': 'data-source'
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Vue.use(Viewer)
|
||||||
|
|
||||||
|
|
||||||
import hasPermi from './directive/permission'
|
import hasPermi from './directive/permission'
|
||||||
Vue.use(hasPermi)
|
Vue.use(hasPermi)
|
||||||
@@ -148,6 +145,12 @@ Vue.config.productionTip = false
|
|||||||
Vue.prototype.$upload = () => {
|
Vue.prototype.$upload = () => {
|
||||||
_vm.$forceUpdate()
|
_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) => {
|
Vue.prototype.fileToBlob = (file) => {
|
||||||
// 创建 FileReader 对象
|
// 创建 FileReader 对象
|
||||||
const reader = new FileReader()
|
const reader = new FileReader()
|
||||||
@@ -252,6 +255,19 @@ async function VueInit() {
|
|||||||
} catch (e) {
|
} 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.$updateDictionary = function () {
|
||||||
Vue.prototype.$d = function (code) {
|
Vue.prototype.$d = function (code) {
|
||||||
var dictInfo = res.Result
|
var dictInfo = res.Result
|
||||||
@@ -279,13 +295,20 @@ async function VueInit() {
|
|||||||
}
|
}
|
||||||
Vue.prototype.$path = []
|
Vue.prototype.$path = []
|
||||||
var t = function (key) {
|
var t = function (key) {
|
||||||
// if (![Vue.prototype.toPath + '_' + key].includes(Vue.prototype.$path)) {
|
|
||||||
if (!~Vue.prototype.$path.indexOf(key)) {
|
if (!~Vue.prototype.$path.indexOf(key)) {
|
||||||
// Vue.prototype.$path.push(Vue.prototype.toPath + '_' + key)
|
|
||||||
Vue.prototype.$path.push(key)
|
Vue.prototype.$path.push(key)
|
||||||
}
|
}
|
||||||
// return i18n.t(Vue.prototype.toPath + '_' + key)
|
let text = i18n.t(key)
|
||||||
return 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
|
Vue.prototype.$t = t
|
||||||
_vm = new Vue({
|
_vm = new Vue({
|
||||||
@@ -296,7 +319,8 @@ async function VueInit() {
|
|||||||
data: {
|
data: {
|
||||||
unlock: {
|
unlock: {
|
||||||
my_username: null,
|
my_username: null,
|
||||||
my_password: null
|
my_password: null,
|
||||||
|
view: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
render: h => h(App)
|
render: h => h(App)
|
||||||
@@ -307,7 +331,7 @@ async function VueInit() {
|
|||||||
if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) {
|
if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) {
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
|
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
|
return
|
||||||
}
|
}
|
||||||
if (_vm.$store.state.user.userId !== zzSessionStorage.getItem('userId')) {
|
if (_vm.$store.state.user.userId !== zzSessionStorage.getItem('userId')) {
|
||||||
@@ -368,10 +392,10 @@ async function VueInit() {
|
|||||||
// process.env.VUE_APP_LOGOUT_FOR_TIME
|
// process.env.VUE_APP_LOGOUT_FOR_TIME
|
||||||
// eval(process.env.VUE_APP_LOCK_FOR_PERMISSION)
|
// eval(process.env.VUE_APP_LOCK_FOR_PERMISSION)
|
||||||
// process.env.VUE_APP_LOCK_FOR_TIME
|
// 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) ? () => {
|
waitOperate(eval(process.env.VUE_APP_LOGOUT_FOR_PERMISSION) ? () => {
|
||||||
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
|
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;
|
count = 0;
|
||||||
localStorage.setItem('count', '0')
|
localStorage.setItem('count', '0')
|
||||||
return
|
return
|
||||||
@@ -400,7 +424,7 @@ async function VueInit() {
|
|||||||
} : () => { }, process.env.VUE_APP_LOGOUT_FOR_TIME,
|
} : () => { }, process.env.VUE_APP_LOGOUT_FOR_TIME,
|
||||||
eval(process.env.VUE_APP_LOCK_FOR_PERMISSION) ? () => {
|
eval(process.env.VUE_APP_LOCK_FOR_PERMISSION) ? () => {
|
||||||
var lang = zzSessionStorage.getItem('lang') ? zzSessionStorage.getItem('lang') : 'zh'
|
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;
|
count = 0;
|
||||||
localStorage.setItem('count', '0')
|
localStorage.setItem('count', '0')
|
||||||
if (_vm.$route.path === '/login') {
|
if (_vm.$route.path === '/login') {
|
||||||
@@ -422,11 +446,11 @@ async function VueInit() {
|
|||||||
beforeClose: (action, instance, done) => {
|
beforeClose: (action, instance, done) => {
|
||||||
if (action === 'confirm') {
|
if (action === 'confirm') {
|
||||||
if (!_vm.unlock.my_username) {
|
if (!_vm.unlock.my_username) {
|
||||||
_vm.$alert(_vm.$t("env:lock:msgBox:iupUser"))
|
_vm.$message.warning(_vm.$t("env:lock:msgBox:iupUser"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!_vm.unlock.my_password) {
|
if (!_vm.unlock.my_password) {
|
||||||
_vm.$alert(_vm.$t("env:lock:msgBox:inpPassword"))
|
_vm.$message.warning(_vm.$t("env:lock:msgBox:inpPassword"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var my_username = zzSessionStorage.getItem('my_username')
|
var my_username = zzSessionStorage.getItem('my_username')
|
||||||
@@ -440,7 +464,8 @@ async function VueInit() {
|
|||||||
_vm.$message.success(_vm.$t("env:lock:msgBox:lockSuccess"))
|
_vm.$message.success(_vm.$t("env:lock:msgBox:lockSuccess"))
|
||||||
_vm.unlock = {
|
_vm.unlock = {
|
||||||
my_username: null,
|
my_username: null,
|
||||||
my_password: null
|
my_password: null,
|
||||||
|
view: false
|
||||||
}
|
}
|
||||||
isOpen = false
|
isOpen = false
|
||||||
count = 0;
|
count = 0;
|
||||||
@@ -504,16 +529,21 @@ async function VueInit() {
|
|||||||
]),
|
]),
|
||||||
h('el-form-item', {
|
h('el-form-item', {
|
||||||
props: { label: _vm.$t("env:lock:msgBox:form:Password") },
|
props: { label: _vm.$t("env:lock:msgBox:form:Password") },
|
||||||
|
attrs: {
|
||||||
|
style: "position: relative;"
|
||||||
|
}
|
||||||
}, [
|
}, [
|
||||||
h('input', {
|
h('input', {
|
||||||
props: {
|
props: {
|
||||||
value: _vm.unlock.my_password
|
value: _vm.unlock.my_password
|
||||||
},
|
},
|
||||||
|
ref: "unlock_my_password_input",
|
||||||
attrs: {
|
attrs: {
|
||||||
id: 'my_password',
|
id: 'my_password',
|
||||||
class: 'el-input__inner',
|
class: 'el-input__inner',
|
||||||
type: 'password',
|
type: _vm.unlock.view ? 'text' : 'password',
|
||||||
autocomplete: 'new-password'
|
autocomplete: 'new-password',
|
||||||
|
style: "padding-right:25px"
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
change: (event) => {
|
change: (event) => {
|
||||||
@@ -523,7 +553,24 @@ async function VueInit() {
|
|||||||
_vm.unlock.my_password = event.target.value
|
_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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}),
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
@@ -549,3 +596,4 @@ VueInit()
|
|||||||
// });
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
export default _vm
|
||||||
+46
-9
@@ -6,17 +6,55 @@ import 'nprogress/nprogress.css'
|
|||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { OSSclient } from './utils/oss'
|
import { OSSclient } from './utils/oss'
|
||||||
|
import WHITELIST from "./utils/whiteList"
|
||||||
|
import { getTrialExtralConfig } from '@/api/trials'
|
||||||
// import getPageTitle from '@/utils/get-page-title'
|
// import getPageTitle from '@/utils/get-page-title'
|
||||||
|
|
||||||
NProgress.configure({ showSpinner: false })
|
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;
|
store.state.trials.whiteList = whiteList;
|
||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
NProgress.start()
|
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
|
||||||
|
) {
|
||||||
|
console.log(to.query.path)
|
||||||
|
let res = await getTrialExtralConfig({
|
||||||
|
TrialId: to.query.trialId,
|
||||||
|
})
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
store.dispatch('trials/setConfig', {
|
||||||
|
trialId: to.query.trialId,
|
||||||
|
...res.Result,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!to.query.trialId) {
|
||||||
|
store.dispatch('trials/setConfig', {})
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
to.query.trialId &&
|
||||||
|
to.query.trialId !==
|
||||||
|
store.state.trials.config.trialId
|
||||||
|
) {
|
||||||
|
let res = await getTrialExtralConfig({
|
||||||
|
TrialId: to.query.trialId,
|
||||||
|
})
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
store.dispatch('trials/setConfig', {
|
||||||
|
trialId: to.query.trialId,
|
||||||
|
...res.Result,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
// 确定用户是否已登录
|
// 确定用户是否已登录
|
||||||
const hasToken = getToken()
|
const hasToken = getToken()
|
||||||
Vue.prototype.toPath = to.path
|
Vue.prototype.toPath = to.path
|
||||||
@@ -24,16 +62,16 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
if (hasToken) {
|
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 === '/login' || to.path === '/recompose' || to.path === '/email-recompose' || to.path === '/error' || to.path === '/ReviewersResearchForm' || to.path === '/ReviewersResearch') {
|
||||||
if (to.path === '/ReviewersResearch') {
|
if (to.path === '/ReviewersResearch') {
|
||||||
await this.$store.dispatch('user/logout')
|
await OSSclient()
|
||||||
OSSclient()
|
await store.dispatch('user/logout')
|
||||||
}
|
}
|
||||||
if (to.path === '/ReviewersResearchForm') {
|
if (to.path === '/ReviewersResearchForm') {
|
||||||
OSSclient()
|
await OSSclient()
|
||||||
}
|
}
|
||||||
next()
|
next()
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
} else {
|
} else {
|
||||||
OSSclient()
|
await OSSclient()
|
||||||
const hasGetUserInfo = store.getters.userId
|
const hasGetUserInfo = store.getters.userId
|
||||||
if (hasGetUserInfo) {
|
if (hasGetUserInfo) {
|
||||||
next()
|
next()
|
||||||
@@ -56,7 +94,6 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
/* has no token*/
|
/* has no token*/
|
||||||
if (whiteList.indexOf(to.path) !== -1) {
|
if (whiteList.indexOf(to.path) !== -1) {
|
||||||
if (to.path === '/researchLogin') {
|
if (to.path === '/researchLogin') {
|
||||||
console.log(to)
|
|
||||||
const flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
|
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) {
|
if (flag) {
|
||||||
next(`/researchLogin_m?trialId=${to.query.trialId}&lang=${to.query.lang}`)
|
next(`/researchLogin_m?trialId=${to.query.trialId}&lang=${to.query.lang}`)
|
||||||
@@ -66,7 +103,7 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
} else {
|
} else {
|
||||||
// 在免登录whiteList中,直接进入
|
// 在免登录whiteList中,直接进入
|
||||||
if (to.path === '/readingDicoms' || to.path === '/noneDicomReading') {
|
if (to.path === '/readingDicoms' || to.path === '/noneDicomReading') {
|
||||||
OSSclient()
|
await OSSclient()
|
||||||
}
|
}
|
||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,6 +223,11 @@ export const constantRoutes = [
|
|||||||
component: () => import('@/views/reviewers/ReviewersResearch'),
|
component: () => import('@/views/reviewers/ReviewersResearch'),
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/curriculumVitae',
|
||||||
|
component: () => import('@/views/reviewers/curriculumVitae/index'),
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/ReviewersResearchForm',
|
path: '/ReviewersResearchForm',
|
||||||
component: () => import('@/views/reviewers/ReviewersResearchForm'),
|
component: () => import('@/views/reviewers/ReviewersResearchForm'),
|
||||||
|
|||||||
@@ -35,26 +35,50 @@ const getDefaultState = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getQuestions(questions) {
|
function getQuestions(questions) {
|
||||||
|
const criterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||||
questions.forEach(item => {
|
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 => {
|
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'
|
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) {
|
if (answerObj.RowId) {
|
||||||
var idx = item.TableQuestions.Questions.findIndex(i => i.QuestionMark === 11)
|
if (criterionType === 10) {
|
||||||
if (idx > -1) {
|
|
||||||
// pcwg
|
// pcwg
|
||||||
|
var lesionNum = getQuestionAnswer(item.TableQuestions.Questions, 11, answerObj)
|
||||||
|
answerObj.lesionNum = lesionNum
|
||||||
answerObj.saveTypeEnum = isNaN(parseInt(answerObj.lesionNum)) ? 1 : 2
|
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 {
|
} 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
|
answerObj.saveTypeEnum = isNaN(parseInt(answerObj.lesionState)) ? 1 : 2
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -70,7 +94,7 @@ function getQuestions(questions) {
|
|||||||
}
|
}
|
||||||
function findQuestionAndRemoveLesion(questions, obj) {
|
function findQuestionAndRemoveLesion(questions, obj) {
|
||||||
for (var i = 0; i < questions.length; i++) {
|
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))
|
var idx = questions[i].TableQuestions.Answers.findIndex(i => String(i.RowIndex) === String(obj.rowIndex))
|
||||||
if (idx > -1) {
|
if (idx > -1) {
|
||||||
questions[i].TableQuestions.Answers.splice(idx, 1)
|
questions[i].TableQuestions.Answers.splice(idx, 1)
|
||||||
@@ -86,7 +110,7 @@ function findQuestionAndRemoveLesion(questions, obj) {
|
|||||||
function findQuestionAndUpdateLesion(questions, obj) {
|
function findQuestionAndUpdateLesion(questions, obj) {
|
||||||
for (var i = 0; i < questions.length; i++) {
|
for (var i = 0; i < questions.length; i++) {
|
||||||
var item = questions[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)
|
var idx = item.TableQuestions.Answers.findIndex(i => i.RowIndex === obj.rowIndex)
|
||||||
item.TableQuestions.Answers[idx].isLymphLesion = obj.isLymphLesion
|
item.TableQuestions.Answers[idx].isLymphLesion = obj.isLymphLesion
|
||||||
item.TableQuestions.Answers[idx].loctation = obj.lesionOrgan
|
item.TableQuestions.Answers[idx].loctation = obj.lesionOrgan
|
||||||
@@ -115,10 +139,10 @@ function findQuestionAndUpdateLesion(questions, obj) {
|
|||||||
}
|
}
|
||||||
function findQuestionAndAddLesion(questions, obj) {
|
function findQuestionAndAddLesion(questions, obj) {
|
||||||
for (var i = 0; i < questions.length; i++) {
|
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 = {}
|
var sourceObj = {}
|
||||||
questions[i].TableQuestions.Questions.forEach(item => {
|
questions[i].TableQuestions.Questions.forEach(item => {
|
||||||
sourceObj[item.Id] = ''
|
sourceObj[item.Id] = null
|
||||||
})
|
})
|
||||||
var targetObj = Object.assign(sourceObj, obj.lesionObj)
|
var targetObj = Object.assign(sourceObj, obj.lesionObj)
|
||||||
targetObj.IsCurrentTaskAdd = 'True'
|
targetObj.IsCurrentTaskAdd = 'True'
|
||||||
@@ -811,9 +835,16 @@ const actions = {
|
|||||||
// }
|
// }
|
||||||
series.InstanceInfoList.forEach(instance => {
|
series.InstanceInfoList.forEach(instance => {
|
||||||
if (instance.NumberOfFrames && instance.NumberOfFrames > 1) {
|
if (instance.NumberOfFrames && instance.NumberOfFrames > 1) {
|
||||||
for (let i = 0; i < instance.NumberOfFrames; i++) {
|
if (study.IsCriticalSequence && instance.KeyFramesList.length > 0) {
|
||||||
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}`
|
instance.KeyFramesList.map(i => {
|
||||||
imageIds.push(imageId)
|
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}`
|
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 {
|
} else {
|
||||||
@@ -1053,7 +1084,10 @@ const actions = {
|
|||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
var isReadingTaskViewInOrder = localStorage.getItem('isReadingTaskViewInOrder')
|
var isReadingTaskViewInOrder = localStorage.getItem('isReadingTaskViewInOrder')
|
||||||
if (parseInt(isReadingTaskViewInOrder) === 2) {
|
if (parseInt(isReadingTaskViewInOrder) === 2) {
|
||||||
if (!state.lastCanvasTaskId) state.lastCanvasTaskId = taskId
|
if (!state.lastCanvasTaskId) {
|
||||||
|
console.log('setLastCanvasTaskId')
|
||||||
|
state.lastCanvasTaskId = taskId
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
state.lastCanvasTaskId = taskId
|
state.lastCanvasTaskId = taskId
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const getDefaultState = () => {
|
|||||||
studyListQuery: null,
|
studyListQuery: null,
|
||||||
unlock: false,
|
unlock: false,
|
||||||
config: {},
|
config: {},
|
||||||
uploadTip: null,
|
uploadTip: '0.00KB/s',
|
||||||
timer: null,
|
timer: null,
|
||||||
whiteList: [],
|
whiteList: [],
|
||||||
checkTaskId: null
|
checkTaskId: null
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ const actions = {
|
|||||||
zzSessionStorage.setItem('my_username', username.trim())
|
zzSessionStorage.setItem('my_username', username.trim())
|
||||||
zzSessionStorage.setItem('my_password', md5(password))
|
zzSessionStorage.setItem('my_password', md5(password))
|
||||||
zzSessionStorage.setItem('my_EMail', response.Result.BasicInfo.EMail)
|
zzSessionStorage.setItem('my_EMail', response.Result.BasicInfo.EMail)
|
||||||
|
localStorage.setItem('CompanyInfo', JSON.stringify(response.Result.CompanyInfo))
|
||||||
const data = response.Result
|
const data = response.Result
|
||||||
if (data.BasicInfo.IsFirstAdd || data.BasicInfo.LoginState === 1) {
|
if (data.BasicInfo.IsFirstAdd || data.BasicInfo.LoginState === 1) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -149,6 +149,7 @@ body .el-table th.gutter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-dialog__body {
|
.el-dialog__body {
|
||||||
|
margin-top: 15px;
|
||||||
height: calc(100% - 70px);
|
height: calc(100% - 70px);
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
|
|
||||||
@@ -347,6 +348,7 @@ body .el-table th.gutter {
|
|||||||
background: #000;
|
background: #000;
|
||||||
z-index: 3999;
|
z-index: 3999;
|
||||||
}
|
}
|
||||||
.el-message-box__wrapper{
|
|
||||||
|
.el-message-box__wrapper {
|
||||||
z-index: 9999 !important;
|
z-index: 9999 !important;
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { anonymization } from './anonymization'
|
import { anonymization } from './anonymization'
|
||||||
export const dcmUpload = async function (name, file, config) {
|
export const dcmUpload = async function (data, config, progressFn) {
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
try {
|
try {
|
||||||
// let blob = await encoder(file, config)
|
// let blob = await encoder(file, config)
|
||||||
let blob = await fileToBlob(file)
|
let blob = await fileToBlob(data.file)
|
||||||
if (config) {
|
if (config) {
|
||||||
blob = await anonymization(file, config)
|
blob = await anonymization(data.file, config)
|
||||||
}
|
}
|
||||||
let res = await Vue.prototype.OSSclient.put(name, blob.blob)
|
let res = await Vue.prototype.OSSclient.multipartUpload(Object.assign(data, { file: blob.blob }), progressFn)
|
||||||
resolve({
|
resolve({
|
||||||
...res,
|
...res,
|
||||||
image: blob.pixelDataElement
|
image: blob.pixelDataElement
|
||||||
@@ -19,7 +19,7 @@ export const dcmUpload = async function (name, file, config) {
|
|||||||
|
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(file, 'warning')
|
console.log(data.file, 'warning')
|
||||||
resolve(false)
|
resolve(false)
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
// crypto.js
|
||||||
|
import CryptoJS from 'crypto-js';
|
||||||
|
import { JSEncrypt } from "jsencrypt";
|
||||||
|
import { getPublicKey } from "@/api/user.js"
|
||||||
|
export const Crypto = {
|
||||||
|
AES: {
|
||||||
|
encrypt: function (plaintext, secretKey) {
|
||||||
|
return CryptoJS.AES.encrypt(plaintext, CryptoJS.enc.Utf8.parse(secretKey), {
|
||||||
|
mode: CryptoJS.mode.ECB,
|
||||||
|
padding: CryptoJS.pad.Pkcs7,
|
||||||
|
iv: ''
|
||||||
|
}).ciphertext.toString(CryptoJS.enc.Base64);
|
||||||
|
},
|
||||||
|
decrypt: function (ciphertext, secretKey) {
|
||||||
|
const bytes = CryptoJS.AES.decrypt(ciphertext, secretKey);
|
||||||
|
return bytes.toString(CryptoJS.enc.Utf8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
export const Encrypt = {
|
||||||
|
encrypt: async function (plaintext) {
|
||||||
|
let PublicKey = null;
|
||||||
|
if (sessionStorage.getItem('PublicKey')) {
|
||||||
|
PublicKey = atob(sessionStorage.getItem('PublicKey'));
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
let res = await getPublicKey();
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
PublicKey = atob(res.Result)
|
||||||
|
sessionStorage.setItem('PublicKey', res.Result)
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let encryptor = new JSEncrypt()
|
||||||
|
encryptor.setPublicKey(PublicKey)
|
||||||
|
return encryptor.encrypt(plaintext)
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
import { Encrypt, Crypto } from "./crypto";
|
||||||
|
export const encryptConfig = async (config) => {
|
||||||
|
let secretKey = randomRange(32, 32);
|
||||||
|
let encryptSecretKey = await Encrypt.encrypt(secretKey); // 密钥进行非对称加密
|
||||||
|
if (encryptSecretKey) {
|
||||||
|
config.headers['X-Encrypted-Key'] = encryptSecretKey;
|
||||||
|
}
|
||||||
|
if (config.data && Object.prototype.toString.call(config.data) === '[object Object]') {
|
||||||
|
Object.keys(config.data).forEach(async key => {
|
||||||
|
config.data[key] = Crypto.AES.encrypt(config.data[key], secretKey)
|
||||||
|
console.log(config.data[key], 'KEY')
|
||||||
|
// config.data[key] = await Encrypt.encrypt(config.data[key])
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return config;
|
||||||
|
}
|
||||||
|
const randomRange = (min, max, charStr) => {
|
||||||
|
var returnStr = "",
|
||||||
|
range;
|
||||||
|
if (typeof max == 'string') {
|
||||||
|
charStr = max;
|
||||||
|
}
|
||||||
|
range = ((max && typeof max == 'number') ? Math.round(Math.random() * (max - min)) + min : min);
|
||||||
|
charStr = charStr || 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
||||||
|
for (var i = 0; i < range; i++) {
|
||||||
|
var index = Math.round(Math.random() * (charStr.length - 1));
|
||||||
|
returnStr += charStr.substring(index, index + 1);
|
||||||
|
}
|
||||||
|
return returnStr;
|
||||||
|
}
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
|
||||||
|
function parseImageId(imageId) {
|
||||||
|
// build a url by parsing out the url scheme and frame index from the imageId
|
||||||
|
const firstColonIndex = imageId.indexOf(':');
|
||||||
|
|
||||||
|
let url = imageId.substring(firstColonIndex + 1);
|
||||||
|
const frameIndex = url.indexOf('frame=');
|
||||||
|
|
||||||
|
let frame;
|
||||||
|
|
||||||
|
if (frameIndex !== -1) {
|
||||||
|
const frameStr = url.substr(frameIndex + 6);
|
||||||
|
|
||||||
|
frame = parseInt(frameStr, 10);
|
||||||
|
url = url.substr(0, frameIndex - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
scheme: imageId.substr(0, firstColonIndex),
|
||||||
|
url,
|
||||||
|
frame,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
function getNumberValues(dataSet, tag, minimumLength) {
|
||||||
|
const values = [];
|
||||||
|
const valueAsString = dataSet.string(tag);
|
||||||
|
|
||||||
|
if (!valueAsString) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const split = valueAsString.split('\\');
|
||||||
|
|
||||||
|
if (minimumLength && split.length < minimumLength) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (let i = 0; i < split.length; i++) {
|
||||||
|
values.push(parseFloat(split[i]));
|
||||||
|
}
|
||||||
|
|
||||||
|
return values;
|
||||||
|
}
|
||||||
|
function metaDataProvider(type, imageId) {
|
||||||
|
const parsedImageId = parseImageId(imageId);
|
||||||
|
const dataSet = cornerstoneWADOImageLoader.wadouri.dataSetCacheManager.get(parsedImageId.url);
|
||||||
|
|
||||||
|
if (!dataSet) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (type === 'imagePlaneModule') {
|
||||||
|
const imageOrientationPatient = getNumberValues(dataSet, 'x00200037', 6);
|
||||||
|
const imagePositionPatient = getNumberValues(dataSet, 'x00200032', 3);
|
||||||
|
const pixelSpacing = getNumberValues(dataSet, 'x00280030', 2);
|
||||||
|
const imagePixelSpacing = getNumberValues(dataSet, 'x00181164', 2);
|
||||||
|
const estimatedRadiographicMagnificationFactor = getNumberValues(dataSet, 'x00181114', 2);
|
||||||
|
let columnPixelSpacing = null;
|
||||||
|
|
||||||
|
let rowPixelSpacing = null;
|
||||||
|
|
||||||
|
if (pixelSpacing) {
|
||||||
|
rowPixelSpacing = pixelSpacing[0];
|
||||||
|
columnPixelSpacing = pixelSpacing[1];
|
||||||
|
} else if (imagePixelSpacing && estimatedRadiographicMagnificationFactor) {
|
||||||
|
rowPixelSpacing = imagePixelSpacing[0] / estimatedRadiographicMagnificationFactor[0];
|
||||||
|
columnPixelSpacing = imagePixelSpacing[1] / estimatedRadiographicMagnificationFactor[1];
|
||||||
|
} else if (imagePixelSpacing && !estimatedRadiographicMagnificationFactor) {
|
||||||
|
rowPixelSpacing = imagePixelSpacing[0];
|
||||||
|
columnPixelSpacing = imagePixelSpacing[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
let rowCosines = null;
|
||||||
|
|
||||||
|
let columnCosines = null;
|
||||||
|
|
||||||
|
if (imageOrientationPatient) {
|
||||||
|
rowCosines = [
|
||||||
|
parseFloat(imageOrientationPatient[0]),
|
||||||
|
parseFloat(imageOrientationPatient[1]),
|
||||||
|
parseFloat(imageOrientationPatient[2]),
|
||||||
|
];
|
||||||
|
columnCosines = [
|
||||||
|
parseFloat(imageOrientationPatient[3]),
|
||||||
|
parseFloat(imageOrientationPatient[4]),
|
||||||
|
parseFloat(imageOrientationPatient[5]),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
frameOfReferenceUID: dataSet.string('x00200052'),
|
||||||
|
rows: dataSet.uint16('x00280010'),
|
||||||
|
columns: dataSet.uint16('x00280011'),
|
||||||
|
imageOrientationPatient,
|
||||||
|
rowCosines,
|
||||||
|
columnCosines,
|
||||||
|
imagePositionPatient,
|
||||||
|
sliceThickness: dataSet.floatString('x00180050'),
|
||||||
|
sliceLocation: dataSet.floatString('x00201041'),
|
||||||
|
pixelSpacing,
|
||||||
|
rowPixelSpacing,
|
||||||
|
columnPixelSpacing,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default metaDataProvider;
|
||||||
@@ -0,0 +1,457 @@
|
|||||||
|
const {
|
||||||
|
CreateMultipartUploadCommand,
|
||||||
|
UploadPartCommand,
|
||||||
|
CompleteMultipartUploadCommand,
|
||||||
|
ListMultipartUploadsCommand,//bucket中正在上传的文件列表
|
||||||
|
ListPartsCommand,//列出文件已上传的分片
|
||||||
|
GetObjectCommand,//获取文件
|
||||||
|
} = require("@aws-sdk/client-s3");
|
||||||
|
import SparkMD5 from "./spark-md5.min.js";
|
||||||
|
import store from "@/store";
|
||||||
|
let timer = null, // 网速定时器
|
||||||
|
bytesReceivedPerSecond = {}; // 时间节点上传文件总量
|
||||||
|
export function AWSclose() {
|
||||||
|
if (timer) {
|
||||||
|
clearInterval(timer);
|
||||||
|
timer = null;
|
||||||
|
store.state.trials.uploadTip = '0KB/s'
|
||||||
|
}
|
||||||
|
bytesReceivedPerSecond = {};
|
||||||
|
}
|
||||||
|
//查询文件是否存在于bucket或者正在上传
|
||||||
|
export async function exist(s3, bucket, fileInformation, progressFn, changeStatus) {
|
||||||
|
// 拿到上传到的file
|
||||||
|
const File = fileInformation.file;
|
||||||
|
// 拿到上传的size
|
||||||
|
const uploadFileSize = File.size; // 这里拿到的单位是字节(uploadFileSize/ 1024 / 1024
|
||||||
|
// = 多少兆)
|
||||||
|
// 设置每一片的大小,shardSize 指定上传的每个分片的大小,范围为100 KB~5 GB。
|
||||||
|
// 分片标准为5MB,文件总大小大于5GB分片为20MB
|
||||||
|
let shardSize = 5 * 1024 * 1024;
|
||||||
|
if (uploadFileSize < shardSize) {
|
||||||
|
shardSize = uploadFileSize;
|
||||||
|
}
|
||||||
|
if (uploadFileSize > 5 * 1024 * 1024 * 1024) {
|
||||||
|
shardSize = 20 * 1024 * 1024;
|
||||||
|
}
|
||||||
|
fileInformation = Object.assign({
|
||||||
|
shardSize,
|
||||||
|
sharding: []
|
||||||
|
}, fileInformation)
|
||||||
|
if (fileInformation.speed) {
|
||||||
|
setTimer();
|
||||||
|
}
|
||||||
|
// 1、查询该文件是否已上传到bucket
|
||||||
|
//判断sharding里面是否有东西,有东西证明已经上传过分片了,不需要再进行检测
|
||||||
|
if (fileInformation.sharding.length === 0) {
|
||||||
|
let existBucket = await existInBucket({ s3, bucket, fileInformation: fileInformation });
|
||||||
|
if (existBucket === 'true') {
|
||||||
|
progressFn(1, fileInformation.file, 0);
|
||||||
|
changeStatus(fileInformation.path, 'success');//直接告诉前端,状态
|
||||||
|
return;
|
||||||
|
} else if (existBucket === 'same key') {
|
||||||
|
console.log(fileInformation.path + " bucket中存在同名不同内容的文件");
|
||||||
|
} else if (existBucket === 'not exist') {
|
||||||
|
console.log(fileInformation.path + " bucket中不存在该文件");
|
||||||
|
}
|
||||||
|
//2、查询该文件是否存在上传事件
|
||||||
|
let upload = await existUpload({ s3, bucket: bucket, fileInformation: fileInformation });
|
||||||
|
if (upload.code === 0) {
|
||||||
|
//存在该上传事件并且已经上传了多个分片
|
||||||
|
console.log(fileInformation.path + " 存在上传事件,并已经上传多个分片");
|
||||||
|
//将分片存入sharding
|
||||||
|
const uploadId = upload.uploadId;
|
||||||
|
let parts = upload.parts;
|
||||||
|
let SIZE = 0;
|
||||||
|
for (let i = 0; i < parts.length; i++) {
|
||||||
|
SIZE += parts[i].Size;
|
||||||
|
fileInformation.sharding.push({ ETag: parts[i].ETag, PartNumber: parts[i].PartNumber, Size: parts[i].Size, UploadId: uploadId });
|
||||||
|
}
|
||||||
|
progressFn(SIZE / uploadFileSize, { fileSize: uploadFileSize }, 0);//告诉前端,加入分片
|
||||||
|
//重新上传
|
||||||
|
await uploadFile({ fileInformation: fileInformation, uploadId: uploadId, bucket, changeStatus, getSuspend, progressFn });
|
||||||
|
} else if (upload.code === 1) {
|
||||||
|
// //重名但是不同文件
|
||||||
|
console.log('err 重名文件')
|
||||||
|
changeStatus(fileInformation.path, 'same key');
|
||||||
|
} else if (upload.code === 2) {
|
||||||
|
//没有上传事件
|
||||||
|
console.log(fileInformation.path + " 不存在上传事件");
|
||||||
|
//建立分段上传事件
|
||||||
|
const connect = await createMultipartUpload({ s3, bucket: bucket, key: fileInformation.path, type: fileInformation.file.type });
|
||||||
|
//上传整个文件
|
||||||
|
await uploadFile({ s3, fileInformation: fileInformation, uploadId: connect.UploadId, bucket: bucket, changeStatus, progressFn });
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//分片组里面有东西
|
||||||
|
//重新上传
|
||||||
|
await uploadFile({ s3, fileInformation: fileInformation, uploadId: fileInformation.sharding[0].UploadId, bucket, changeStatus, progressFn });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//上传文件未上传的所有分片
|
||||||
|
async function uploadFile({ s3, fileInformation, uploadId, bucket, changeStatus, progressFn }) {// file:上传文件, uploadId parts:已上传的分片
|
||||||
|
const chunkCount = Math.ceil(fileInformation.file.size / fileInformation.shardSize)//总分片数
|
||||||
|
//循环切片并上传
|
||||||
|
for (let i = 0; i < chunkCount; i++) {
|
||||||
|
let start = i * fileInformation.shardSize;//文件分片开始位置
|
||||||
|
let end = Math.min(fileInformation.file.size, start + fileInformation.shardSize)//文件分片结束位置
|
||||||
|
let _chunkFile = fileInformation.file.slice(start, end);//切片文件 即 待上传文件分片
|
||||||
|
//判断parts中是否存在该分片
|
||||||
|
let res1 = fileInformation.sharding.filter((part) => {
|
||||||
|
return part.PartNumber === (i + 1);
|
||||||
|
});
|
||||||
|
if (res1.length === 0) {
|
||||||
|
//不包含该分片
|
||||||
|
const upload = await uploadPart({ s3, f: _chunkFile, uploadId: uploadId, key: fileInformation.path, bucket: bucket, num: i + 1 });//将分片上传
|
||||||
|
//判断sharding中是否存在该分片,如果不存在的话,才判错
|
||||||
|
let res2 = fileInformation.sharding.filter((part) => {
|
||||||
|
return part.PartNumber === (i + 1);
|
||||||
|
});
|
||||||
|
if (res2.length === 0) {
|
||||||
|
if (upload !== 'err') {//上传分片成功,并且没有暂停上传
|
||||||
|
//判断是否存在该分片
|
||||||
|
//判断parts中是否存在该分片
|
||||||
|
let res3 = fileInformation.sharding.filter((part) => {
|
||||||
|
return part.PartNumber === (i + 1);
|
||||||
|
});
|
||||||
|
if (res3.length === 0) {
|
||||||
|
let LASTSIZE = fileInformation.sharding.reduce((sum, item) => sum + item.Size, 0)
|
||||||
|
fileInformation.sharding.push({ ETag: upload.ETag, PartNumber: i + 1, Size: _chunkFile.size, UploadId: uploadId });//上传成功,存到sharding
|
||||||
|
let SIZE = fileInformation.sharding.reduce((sum, item) => sum + item.Size, 0)
|
||||||
|
let lastPercentage = LASTSIZE / fileInformation.file.size, percentage = SIZE / fileInformation.file.size;
|
||||||
|
progressFn(percentage, fileInformation.file, lastPercentage);
|
||||||
|
if (fileInformation.speed) {
|
||||||
|
let time = new Date().getTime();
|
||||||
|
let timeList = Object.keys(bytesReceivedPerSecond).sort((a, b) => a - b);
|
||||||
|
let bytesTime = timeList.find(item => time - item < 1000);
|
||||||
|
if (bytesTime) {
|
||||||
|
bytesReceivedPerSecond[bytesTime] += fileInformation.file.size * (percentage - lastPercentage);
|
||||||
|
} else {
|
||||||
|
console.log("未查询到时间")
|
||||||
|
if (timeList.length > 0) {
|
||||||
|
bytesReceivedPerSecond[timeList[timeList.length - 1]] += fileInformation.file.size * (percentage - lastPercentage);
|
||||||
|
} else {
|
||||||
|
bytesReceivedPerSecond[time] = fileInformation.file.size * (percentage - lastPercentage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (upload === 'err') {
|
||||||
|
changeStatus(fileInformation.path, 'err');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}//for
|
||||||
|
if (fileInformation.sharding.length === chunkCount) {
|
||||||
|
//合并分片
|
||||||
|
const complete = await completeMultipartUpload({ s3, bucket: bucket, key: fileInformation.path, sharding: fileInformation.sharding, uploadId: uploadId });
|
||||||
|
if (complete !== 'err') {
|
||||||
|
changeStatus(fileInformation.path, 'success');//通知前端,上传成功
|
||||||
|
} else {
|
||||||
|
changeStatus(fileInformation.path, 'err');//通知前端,上传失败
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断该文件是否已经存在于bucket
|
||||||
|
// bucket file:上传文件
|
||||||
|
// 返回值 'same key':同名不同文件 'not exist':不存在该文件 'true':该文件已存在bucket中
|
||||||
|
async function existInBucket({ s3, bucket, fileInformation }) {
|
||||||
|
if (s3 === null) {
|
||||||
|
return console.log("未创建s3客户端,请先调用init事件");
|
||||||
|
}
|
||||||
|
//getObject 每次最多传回767448b的数据,所以要分段请求
|
||||||
|
let bucketFileUniArray = [];
|
||||||
|
// 分段
|
||||||
|
let count = Math.ceil(fileInformation.file.size / 767448);
|
||||||
|
if (count > 4) {
|
||||||
|
count = 4;
|
||||||
|
}
|
||||||
|
for (let i = 0; i < count; i++) {
|
||||||
|
const obj = await getObject({ s3, bucket: bucket, fileInformation: fileInformation, count: i });
|
||||||
|
if (obj !== 'err') {
|
||||||
|
//获取文件的文件体 计算某个分片的md5
|
||||||
|
const fileBody = obj.Body;
|
||||||
|
let fileUnitArray = await fileBody.transformToByteArray();
|
||||||
|
bucketFileUniArray = [...bucketFileUniArray, ...fileUnitArray];
|
||||||
|
} else {
|
||||||
|
return 'not exist';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let bucketFileBufferArray = new Uint8Array(bucketFileUniArray);
|
||||||
|
// 将传入文件的fileReader 转成 arrayBuffer
|
||||||
|
let fileArrayBuff = null;
|
||||||
|
fileArrayBuff = await new Promise((resolve) => {
|
||||||
|
let fileReader = new FileReader();
|
||||||
|
fileReader.readAsArrayBuffer(fileInformation.file.slice(0, count * 767448));
|
||||||
|
fileReader.onload = (e) => {
|
||||||
|
resolve(e.target.result);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
if (fileArrayBuff.byteLength > count * 767448) {
|
||||||
|
fileArrayBuff = fileArrayBuff.slice(0, count * 767448);
|
||||||
|
}
|
||||||
|
let bodyMD5 = await getMD5({ arrayBuffer: bucketFileBufferArray.buffer });
|
||||||
|
let fileMD5 = await getMD5({ arrayBuffer: fileArrayBuff });
|
||||||
|
if (bodyMD5 === fileMD5) {
|
||||||
|
//证明是同一个文件 秒传
|
||||||
|
return 'true';
|
||||||
|
} else {
|
||||||
|
return 'same key';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//判断该文件是否正在上传
|
||||||
|
// bucket:bucket file:上传文件
|
||||||
|
//返回值 'not exist upload':不存在上传事件 'same key':同名不同文件
|
||||||
|
async function existUpload({ s3, bucket, fileInformation }) {
|
||||||
|
//判断该文件是否有上传事件
|
||||||
|
const listUploads = await listMultipartUploadsCommand({ s3, bucket: bucket, key: fileInformation.path });
|
||||||
|
if (listUploads !== 'err') {
|
||||||
|
if (listUploads.Uploads !== undefined && listUploads.Uploads.length > 0) {
|
||||||
|
//存在上传事件 获取上传的第一个分片的eTag,计算传入文件md5,相比较是否相同
|
||||||
|
const uploads = listUploads.Uploads;
|
||||||
|
for (const one in uploads) {//可能存在多个连接
|
||||||
|
let uploadOne = uploads[one];
|
||||||
|
const uploadId = uploadOne.UploadId;//UploadId
|
||||||
|
const key = uploadOne.Key;//key
|
||||||
|
//查询该文件已上传分片
|
||||||
|
const listParts = await listPartsCommand({ s3, bucket: bucket, key: key, uploadId: uploadId });
|
||||||
|
if (listParts !== 'err') {
|
||||||
|
if (listParts.Parts !== undefined && listParts.Parts.length !== 0) {
|
||||||
|
//存在分片
|
||||||
|
let etag = listParts.Parts[0].ETag;
|
||||||
|
//计算文件的第一个分片的md5
|
||||||
|
let fileSlice = null;
|
||||||
|
if (fileInformation.file.size > fileInformation.shardSize) {
|
||||||
|
fileSlice = fileInformation.file.slice(0, fileInformation.shardSize);
|
||||||
|
} else {
|
||||||
|
fileSlice = fileInformation.file;
|
||||||
|
}
|
||||||
|
let fileMD5 = await new Promise((resolve) => {
|
||||||
|
const fileReader = new FileReader();
|
||||||
|
var spark = new SparkMD5.ArrayBuffer();
|
||||||
|
fileReader.readAsArrayBuffer(fileSlice);
|
||||||
|
fileReader.onload = (e) => {
|
||||||
|
spark.append(e.target.result);
|
||||||
|
var m = spark.end();
|
||||||
|
resolve(m);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
if (etag.split('"')[1] === fileMD5) {
|
||||||
|
//是同一个文件上传
|
||||||
|
return {
|
||||||
|
code: 0,
|
||||||
|
message: 'true',
|
||||||
|
uploadId: uploadId,
|
||||||
|
key: key,
|
||||||
|
parts: listParts.Parts
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//同名不同文件
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//该文件有进行上传,但没有上传完成一个分片
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//有连接,没上传分片
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}//for
|
||||||
|
return {
|
||||||
|
code: 1,
|
||||||
|
message: 'same key'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//无连接
|
||||||
|
return {
|
||||||
|
code: 2,
|
||||||
|
message: 'not exist upload'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//无连接
|
||||||
|
return {
|
||||||
|
code: 2,
|
||||||
|
message: 'not exist upload'
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//计算arrayBuffer的md5值
|
||||||
|
async function getMD5({ arrayBuffer }) {
|
||||||
|
return await new Promise((resolve) => {
|
||||||
|
const spark = new SparkMD5.ArrayBuffer();
|
||||||
|
spark.append(arrayBuffer);
|
||||||
|
const m = spark.end();
|
||||||
|
resolve(m);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//建立文件上传事件
|
||||||
|
async function createMultipartUpload({ s3, bucket, key, type }) {//bucket:bucket key:文件名 type:文件类型
|
||||||
|
if (s3 === null) {
|
||||||
|
return console.log("未创建s3客户端,请先调用init事件");
|
||||||
|
}
|
||||||
|
const params = {
|
||||||
|
Bucket: bucket,
|
||||||
|
Key: key,
|
||||||
|
ContentType: type
|
||||||
|
};
|
||||||
|
const res = async () => {
|
||||||
|
try {
|
||||||
|
return await s3.send(new CreateMultipartUploadCommand(params));
|
||||||
|
} catch (err) {
|
||||||
|
console.log('建立上传事件失败:', err.message)
|
||||||
|
return 'err';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res();
|
||||||
|
}
|
||||||
|
|
||||||
|
//上传一个分片
|
||||||
|
async function uploadPart({ s3, f, uploadId, key, bucket, num }) { //f:文件分片,num:分片标号
|
||||||
|
if (s3 === null) {
|
||||||
|
return console.log("未创建s3客户端,请先调用init事件");
|
||||||
|
}
|
||||||
|
const params = {
|
||||||
|
Bucket: bucket,
|
||||||
|
Key: key,
|
||||||
|
PartNumber: num,
|
||||||
|
UploadId: uploadId,
|
||||||
|
Body: f,
|
||||||
|
// ContentDisposition: "attachment; filename=hahaha.dcm"
|
||||||
|
};
|
||||||
|
const res = async () => {
|
||||||
|
try {
|
||||||
|
return await s3.send(new UploadPartCommand(params));
|
||||||
|
} catch (err) {
|
||||||
|
console.log('上传分片第 ' + num + ' 片错误信息', err.message)
|
||||||
|
return 'err';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res();
|
||||||
|
}
|
||||||
|
//将分片合并
|
||||||
|
async function completeMultipartUpload({ s3, bucket, key, sharding, uploadId }) {
|
||||||
|
if (s3 === null) {
|
||||||
|
return console.log("未创建s3客户端,请先调用init事件");
|
||||||
|
}
|
||||||
|
let parts = [];
|
||||||
|
for (let i = 0; i < sharding.length; i++) {
|
||||||
|
parts.push({
|
||||||
|
"ETag": sharding[i].ETag,
|
||||||
|
"PartNumber": sharding[i].PartNumber,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const params = {
|
||||||
|
Bucket: bucket,
|
||||||
|
Key: key,
|
||||||
|
MultipartUpload: {
|
||||||
|
Parts: parts
|
||||||
|
},
|
||||||
|
UploadId: uploadId
|
||||||
|
};
|
||||||
|
const res = async () => {
|
||||||
|
try {
|
||||||
|
return await s3.send(new CompleteMultipartUploadCommand(params))
|
||||||
|
} catch (err) {
|
||||||
|
console.log("合并分片失败: ", err.message);
|
||||||
|
return 'err';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res();
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询某个文件已经上传的所有分片
|
||||||
|
async function listPartsCommand({ s3, bucket, key, uploadId }) {
|
||||||
|
if (s3 === null) {
|
||||||
|
return console.log("未创建s3客户端,请先调用init事件");
|
||||||
|
}
|
||||||
|
const params = {
|
||||||
|
Bucket: bucket,
|
||||||
|
Key: key,
|
||||||
|
UploadId: uploadId
|
||||||
|
};
|
||||||
|
const res = async () => {
|
||||||
|
try {
|
||||||
|
return await s3.send(new ListPartsCommand(params));
|
||||||
|
} catch (err) {
|
||||||
|
console.log("查询该文件已上传分片失败: " + err.message);
|
||||||
|
return 'err';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res();
|
||||||
|
}
|
||||||
|
//查询该文件是否存在上传事件
|
||||||
|
async function listMultipartUploadsCommand({ s3, bucket, key }) {
|
||||||
|
if (s3 === null) {
|
||||||
|
return console.log("未创建s3客户端,请先调用init事件");
|
||||||
|
}
|
||||||
|
const params = {
|
||||||
|
Bucket: bucket,
|
||||||
|
Delimiter: '',
|
||||||
|
MaxUploads: 1000,
|
||||||
|
Prefix: key
|
||||||
|
};
|
||||||
|
const res = async () => {
|
||||||
|
try {
|
||||||
|
return await s3.send(new ListMultipartUploadsCommand(params));
|
||||||
|
} catch (err) {
|
||||||
|
console.log("查询 " + key + " 文件是否存在上传事件失败: " + err.message);
|
||||||
|
return 'err';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res();
|
||||||
|
}
|
||||||
|
//获取文件
|
||||||
|
async function getObject({ s3, bucket, fileInformation, count }) {
|
||||||
|
//一次请求最多 767448
|
||||||
|
if (s3 === null) {
|
||||||
|
return console.log("未创建s3客户端,请先调用init事件");
|
||||||
|
}
|
||||||
|
let byte1 = ((count + 1) * 767448 - 1) > fileInformation.file.size ? fileInformation.file.size : ((count + 1) * 767448 - 1);
|
||||||
|
let byte2 = (count * 767448) > fileInformation.file.size ? fileInformation.file.size : (count * 767448);
|
||||||
|
let range = "bytes=" + byte2 + "-" + byte1;
|
||||||
|
const params = {
|
||||||
|
Bucket: bucket,
|
||||||
|
Key: fileInformation.path,
|
||||||
|
Range: range
|
||||||
|
};
|
||||||
|
const res = async () => {
|
||||||
|
try {
|
||||||
|
return await s3.send(new GetObjectCommand(params));
|
||||||
|
} catch (err) {
|
||||||
|
console.log('获取 ' + fileInformation.path + ' 文件失败:', err.message);
|
||||||
|
return 'err';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res();
|
||||||
|
}
|
||||||
|
function setTimer() {
|
||||||
|
if (timer) return false;
|
||||||
|
timer = setInterval(() => {
|
||||||
|
let timeList = Object.keys(bytesReceivedPerSecond).sort((a, b) => a - b);
|
||||||
|
if (timeList.length > 0) {
|
||||||
|
let totalBytes = timeList.reduce((sum, bytes) => sum + bytesReceivedPerSecond[bytes], 0) / (5 * 1024);
|
||||||
|
let unit = 'KB/s';
|
||||||
|
if (totalBytes > 1024) {
|
||||||
|
totalBytes = totalBytes / 1024;
|
||||||
|
unit = "MB/s";
|
||||||
|
}
|
||||||
|
store.state.trials.uploadTip = totalBytes.toFixed(2) + unit;
|
||||||
|
}
|
||||||
|
if (timeList.length >= 5) {
|
||||||
|
delete bytesReceivedPerSecond[timeList[0]]
|
||||||
|
}
|
||||||
|
let time = new Date().getTime();
|
||||||
|
bytesReceivedPerSecond[time] = 0;
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,161 @@
|
|||||||
|
import moment from "moment";
|
||||||
|
import store from "@/store";
|
||||||
|
let savaData = {},
|
||||||
|
checkData = {}, // 当前上传的节点文件和上一次提交进度
|
||||||
|
timer = null, // 网速定时器
|
||||||
|
bytesReceivedPerSecond = {}; // 时间节点上传文件总量
|
||||||
|
export function OSSclose() {
|
||||||
|
if (timer) {
|
||||||
|
clearInterval(timer);
|
||||||
|
timer = null;
|
||||||
|
store.state.trials.uploadTip = '0KB/s'
|
||||||
|
}
|
||||||
|
bytesReceivedPerSecond = {};
|
||||||
|
savaData = {};
|
||||||
|
checkData = {};
|
||||||
|
saveFinishedData(savaData);
|
||||||
|
}
|
||||||
|
export async function customerHttp(OSSclient, data, progressFn) {
|
||||||
|
// 拿到上传到的file
|
||||||
|
const uploadFile = data.file;
|
||||||
|
// 拿到上传的size
|
||||||
|
const uploadFileSize = uploadFile.size; // 这里拿到的单位是字节(uploadFileSize/ 1024 / 1024
|
||||||
|
// = 多少兆)
|
||||||
|
// 设置每一片的大小,partSize 指定上传的每个分片的大小,范围为100 KB~5 GB。
|
||||||
|
// 分片标准为5MB,文件总大小大于5GB分片为20MB
|
||||||
|
let partSize = 5 * 1024 * 1024;
|
||||||
|
if (uploadFileSize < partSize) {
|
||||||
|
partSize = uploadFileSize;
|
||||||
|
}
|
||||||
|
if (uploadFileSize > 5 * 1024 * 1024 * 1024) {
|
||||||
|
partSize = 20 * 1024 * 1024;
|
||||||
|
}
|
||||||
|
// 设置所有的文件上传所有的唯一的saveFileId
|
||||||
|
const saveFileId = `${uploadFileSize}_${data.path}`;
|
||||||
|
if (data.speed) {
|
||||||
|
setTimer();
|
||||||
|
}
|
||||||
|
initPage();
|
||||||
|
let res = await multipartUpload(OSSclient, partSize, saveFileId, uploadFile, data, progressFn);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function multipartUpload(OSSclient, partSize, saveFileId, uploadFile, data, progressFn) {
|
||||||
|
try {
|
||||||
|
// object-name目前我是用的uploadFile.name,其实也是要根据你们的项目而定,
|
||||||
|
// 有没有具体的规定, 要不要加项目名, 要不要加对应的环境;
|
||||||
|
// 上传的参数
|
||||||
|
const uploadParams = {
|
||||||
|
partSize,
|
||||||
|
progress: (percentage, checkpoint) => {
|
||||||
|
savaData[saveFileId] = checkpoint;
|
||||||
|
if (!checkData[saveFileId]) {
|
||||||
|
checkData[saveFileId] = 0
|
||||||
|
}
|
||||||
|
if (data.speed) {
|
||||||
|
let time = new Date().getTime();
|
||||||
|
let timeList = Object.keys(bytesReceivedPerSecond).sort((a, b) => a - b);
|
||||||
|
let bytesTime = timeList.find(item => time - item < 1000);
|
||||||
|
if (bytesTime) {
|
||||||
|
bytesReceivedPerSecond[bytesTime] += data.file.size * (percentage - checkData[saveFileId]);
|
||||||
|
} else {
|
||||||
|
// console.log("未查询到时间")
|
||||||
|
if (timeList.length > 0) {
|
||||||
|
bytesReceivedPerSecond[timeList[timeList.length - 1]] += data.file.size * (percentage - checkData[saveFileId]);
|
||||||
|
} else {
|
||||||
|
bytesReceivedPerSecond[time] = data.file.size * (percentage - checkData[saveFileId]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
savaData["lastSaveTime"] = new Date();
|
||||||
|
progressFn(percentage, data.file, checkData[saveFileId])
|
||||||
|
checkData[saveFileId] = percentage;
|
||||||
|
if (percentage === 1) {
|
||||||
|
delete checkData[saveFileId]
|
||||||
|
}
|
||||||
|
// 在上传过程中,把已经上传的数据存储下来
|
||||||
|
saveFinishedData(savaData);
|
||||||
|
},
|
||||||
|
// headers: {
|
||||||
|
// "Content-Disposition": `attachment; filename=hahaha.dcm`,
|
||||||
|
// "Cache-Control": "public, no-cache"
|
||||||
|
// }
|
||||||
|
};
|
||||||
|
// 断点续传
|
||||||
|
await resumeUpload(uploadParams, saveFileId);
|
||||||
|
const res = await OSSclient.multipartUpload(
|
||||||
|
data.path,
|
||||||
|
uploadFile,
|
||||||
|
uploadParams
|
||||||
|
);
|
||||||
|
if (res.res.status === 200) {
|
||||||
|
// 重新去掉某个缓存进行设置
|
||||||
|
delete savaData[saveFileId];
|
||||||
|
saveFinishedData(savaData);
|
||||||
|
} else if (res.res.status === 404) {
|
||||||
|
delete savaData[saveFileId];
|
||||||
|
saveFinishedData(savaData);
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e);
|
||||||
|
delete savaData[saveFileId];
|
||||||
|
saveFinishedData(savaData);
|
||||||
|
// 捕获超时异常。
|
||||||
|
if (e.code === "ConnectionTimeoutError") {
|
||||||
|
console.log("TimeoutError");
|
||||||
|
// do ConnectionTimeoutError operation
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
async function resumeUpload(uploadParams, saveFileId) {
|
||||||
|
if (localStorage.getItem("upload-function-name")) {
|
||||||
|
const obj = JSON.parse(localStorage.getItem("upload-function-name"));
|
||||||
|
if (Object.keys(obj).includes(saveFileId)) {
|
||||||
|
uploadParams.checkpoint = obj[saveFileId];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 存储到内存
|
||||||
|
function saveFinishedData(finishedData) {
|
||||||
|
localStorage.setItem(
|
||||||
|
"upload-function-name",
|
||||||
|
JSON.stringify(finishedData)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
function initPage() {
|
||||||
|
// 判断是不是有缓存
|
||||||
|
const localData = localStorage.getItem("upload-function-name");
|
||||||
|
if (!localData) return;
|
||||||
|
savaData = JSON.parse(localData);
|
||||||
|
// 当前时间 > 存储时间(1000 * 60 * 60表示1h,意思就是这些数据你要存多久,
|
||||||
|
// 可以是1h也可以是多少天,随意)
|
||||||
|
if (
|
||||||
|
moment(new Date()).diff(moment(savaData.lastSaveTime)) >
|
||||||
|
1000 * 60 * 60
|
||||||
|
) {
|
||||||
|
localStorage.removeItem("upload-function-name");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function setTimer() {
|
||||||
|
if (timer) return false;
|
||||||
|
timer = setInterval(() => {
|
||||||
|
// console.log(Object.assign({}, bytesReceivedPerSecond))
|
||||||
|
let timeList = Object.keys(bytesReceivedPerSecond).sort((a, b) => a - b);
|
||||||
|
if (timeList.length > 0) {
|
||||||
|
let totalBytes = timeList.reduce((sum, bytes) => sum + bytesReceivedPerSecond[bytes], 0) / (5 * 1024);
|
||||||
|
let unit = 'KB/s';
|
||||||
|
if (totalBytes > 1024) {
|
||||||
|
totalBytes = totalBytes / 1024;
|
||||||
|
unit = "MB/s";
|
||||||
|
}
|
||||||
|
store.state.trials.uploadTip = totalBytes.toFixed(2) + unit;
|
||||||
|
}
|
||||||
|
if (timeList.length >= 5) {
|
||||||
|
delete bytesReceivedPerSecond[timeList[0]]
|
||||||
|
}
|
||||||
|
let time = new Date().getTime();
|
||||||
|
bytesReceivedPerSecond[time] = 0;
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
+1
File diff suppressed because one or more lines are too long
+204
-41
@@ -3,30 +3,39 @@ const router = require('@/router');
|
|||||||
const Minio = require('minio')
|
const Minio = require('minio')
|
||||||
const stream = require('stream')
|
const stream = require('stream')
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
import { customerHttp, OSSclose } from "@/utils/multipartUpload/oss"
|
||||||
|
import { exist, AWSclose } from "@/utils/multipartUpload/aws"
|
||||||
const { GetObjectStoreToken } = require('../api/user.js')
|
const { GetObjectStoreToken } = require('../api/user.js')
|
||||||
|
const {
|
||||||
|
S3Client,
|
||||||
|
} = require("@aws-sdk/client-s3");
|
||||||
|
|
||||||
Vue.prototype.OSSclientConfig = {
|
Vue.prototype.OSSclientConfig = {
|
||||||
}
|
}
|
||||||
|
|
||||||
function blobToBuffer(blob, fileName) {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
const file = new File([blob], fileName);
|
|
||||||
resolve(file)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
async function ossGenerateSTS() {
|
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 = { ...res.Result[res.Result.ObjectStoreUse] }
|
||||||
Vue.prototype.OSSclientConfig.ObjectStoreUse = res.Result.ObjectStoreUse;
|
Vue.prototype.OSSclientConfig.ObjectStoreUse = res.Result.ObjectStoreUse;
|
||||||
Vue.prototype.OSSclientConfig.basePath = Vue.prototype.OSSclientConfig.viewEndpoint
|
Vue.prototype.OSSclientConfig.basePath = Vue.prototype.OSSclientConfig.viewEndpoint
|
||||||
switch (res.Result.ObjectStoreUse) {
|
switch (res.Result.ObjectStoreUse) {
|
||||||
case 'AliyunOSS':
|
case 'AliyunOSS':
|
||||||
Vue.prototype.OSSclientConfig.bucket = Vue.prototype.OSSclientConfig.bucketName
|
Vue.prototype.OSSclientConfig.bucket = Vue.prototype.OSSclientConfig.bucketName
|
||||||
|
Vue.prototype.OSSclientConfig.stsToken = Vue.prototype.OSSclientConfig.securityToken
|
||||||
Vue.prototype.OSSclientConfig.timeout = 10 * 60 * 1000
|
Vue.prototype.OSSclientConfig.timeout = 10 * 60 * 1000
|
||||||
let OSSclient = new OSS(Vue.prototype.OSSclientConfig)
|
let OSSclient = new OSS(Vue.prototype.OSSclientConfig)
|
||||||
Vue.prototype.OSSclient = {
|
Vue.prototype.OSSclient = {
|
||||||
put: function (objectName, object) {
|
put: async function (objectName, object) {
|
||||||
|
OSSclient = await RefreshClient(OSSclient)
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
let _vm = router.default.app
|
let _vm = router.default.app
|
||||||
@@ -49,6 +58,46 @@ async function ossGenerateSTS() {
|
|||||||
reject()
|
reject()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
multipartUpload: async (data, progress) => {
|
||||||
|
OSSclient = await RefreshClient(OSSclient)
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
try {
|
||||||
|
const { file, path } = data;
|
||||||
|
if (!file || !path) return reject('file and path be required');
|
||||||
|
let config = await getSTSToken(Vue.prototype.OSSclientConfig.expiration);
|
||||||
|
if (config) {
|
||||||
|
Vue.prototype.OSSclientConfig = { ...config.Result[config.Result.ObjectStoreUse] }
|
||||||
|
Vue.prototype.OSSclientConfig.ObjectStoreUse = config.Result.ObjectStoreUse;
|
||||||
|
Vue.prototype.OSSclientConfig.basePath = Vue.prototype.OSSclientConfig.viewEndpoint;
|
||||||
|
Vue.prototype.OSSclientConfig.bucket = Vue.prototype.OSSclientConfig.bucketName
|
||||||
|
Vue.prototype.OSSclientConfig.stsToken = Vue.prototype.OSSclientConfig.securityToken
|
||||||
|
Vue.prototype.OSSclientConfig.timeout = 10 * 60 * 1000
|
||||||
|
OSSclient = new OSS(Vue.prototype.OSSclientConfig);
|
||||||
|
}
|
||||||
|
let _vm = router.default.app
|
||||||
|
if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload') {
|
||||||
|
var objectItem = data.path.split('/')
|
||||||
|
objectItem[objectItem.length - 1] = new Date().getTime() + '_' + objectItem[objectItem.length - 1]
|
||||||
|
data.path = objectItem.join('/')
|
||||||
|
}
|
||||||
|
let res = await customerHttp(OSSclient, data, progress);
|
||||||
|
if (res) {
|
||||||
|
resolve({
|
||||||
|
name: data.path,
|
||||||
|
url: Vue.prototype.OSSclientConfig.viewEndpoint + decodeUtf8(res.name)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
reject()
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
reject(err)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close: () => {
|
||||||
|
OSSclose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
@@ -86,49 +135,121 @@ async function ossGenerateSTS() {
|
|||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
close: () => {
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 'AWS':
|
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 = {
|
Vue.prototype.OSSclient = {
|
||||||
put: function (objectName, object) {
|
put: async function (objectName, object) {
|
||||||
return new Promise(async (resolve, reject) => {
|
let data = {
|
||||||
try {
|
file: object,
|
||||||
var name = objectName.split('/')[objectName.split('/').length - 1]
|
path: objectName
|
||||||
let _vm = router.default.app
|
}
|
||||||
if (_vm._route.path !== '/trials/trials-panel/visit/crc-upload') {
|
aws = await RefreshClient(aws);
|
||||||
var objectItem = objectName.split('/')
|
return uploadAWS(aws, data, () => { });
|
||||||
objectItem[objectItem.length - 1] = new Date().getTime() + '_' + objectItem[objectItem.length - 1]
|
},
|
||||||
objectName = objectItem.join('/')
|
multipartUpload: async (data, progress) => {
|
||||||
}
|
aws = await RefreshClient(aws);
|
||||||
const reader = new FileReader();
|
return uploadAWS(aws, data, progress);
|
||||||
reader.onload = (ex) => {
|
},
|
||||||
const bufferStream = new stream.PassThrough()
|
close: () => {
|
||||||
bufferStream.end(Buffer.from(ex.target.result))
|
AWSclose();
|
||||||
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)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
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) {
|
function decodeUtf8(bytes) {
|
||||||
let str = bytes.split('?');
|
let str = bytes.split('?');
|
||||||
let str2 = str[0].split('/');
|
let str2 = str[0].split('/');
|
||||||
@@ -138,6 +259,48 @@ function decodeUtf8(bytes) {
|
|||||||
str2.pop();
|
str2.pop();
|
||||||
return str2.join("/") + '/' + name;
|
return str2.join("/") + '/' + name;
|
||||||
}
|
}
|
||||||
|
const queue = []
|
||||||
|
let loading = false;
|
||||||
|
// 获取凭证
|
||||||
|
function getSTSToken(credentials) {
|
||||||
|
return new Promise(async (resolve, reject) => {
|
||||||
|
let isExpired = isCredentialsExpired(credentials);
|
||||||
|
if (isExpired) {
|
||||||
|
if (loading) {
|
||||||
|
queue.push({ resolve, reject })
|
||||||
|
}
|
||||||
|
if (!loading) {
|
||||||
|
loading = true;
|
||||||
|
let res = await GetObjectStoreToken();
|
||||||
|
loading = false;
|
||||||
|
localStorage.setItem('stsToken', JSON.stringify(res))
|
||||||
|
resolve(res)
|
||||||
|
let p = queue.shift();
|
||||||
|
while (p) {
|
||||||
|
p.resolve(res)
|
||||||
|
p = queue.shift();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// console.log("凭证未过期");
|
||||||
|
resolve(false)
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* oss判断临时凭证是否到期。
|
||||||
|
**/
|
||||||
|
function isCredentialsExpired(credentials) {
|
||||||
|
if (!credentials) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
const expireDate = new Date(credentials);
|
||||||
|
const now = new Date();
|
||||||
|
// 如果有效期不足五分钟,视为过期。
|
||||||
|
return expireDate.getTime() - now.getTime() <= 300000;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
export const OSSclient = ossGenerateSTS
|
export const OSSclient = ossGenerateSTS
|
||||||
|
|||||||
@@ -113,10 +113,14 @@ export const parseDicom = (file, name = false) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
uintKey.forEach(key => {
|
uintKey.forEach(key => {
|
||||||
res[key] = data.uint16(dicom[key])
|
if (res.hasOwnProperty(key)) {
|
||||||
|
res[key] = data.uint16(dicom[key])
|
||||||
|
}
|
||||||
})
|
})
|
||||||
intStringKey.forEach(key => {
|
intStringKey.forEach(key => {
|
||||||
res[key] = data.intString(dicom[key])
|
if (res.hasOwnProperty(key)) {
|
||||||
|
res[key] = data.intString(dicom[key])
|
||||||
|
}
|
||||||
})
|
})
|
||||||
defaultKey.forEach(key => {
|
defaultKey.forEach(key => {
|
||||||
if (!res[key] && res.hasOwnProperty(key)) {
|
if (!res[key] && res.hasOwnProperty(key)) {
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ service.interceptors.request.use(
|
|||||||
config => {
|
config => {
|
||||||
config.headers['Content-Type'] = 'application/json;charset=UTF-8'
|
config.headers['Content-Type'] = 'application/json;charset=UTF-8'
|
||||||
var language = zzSessionStorage.getItem('lang')
|
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['Accept-Language'] = language === 'en'?'en-US,en;q=0.5':'zh-CN,zh;q=0.9'
|
||||||
console.log(config.headers)
|
|
||||||
if (store.getters.token) {
|
if (store.getters.token) {
|
||||||
config.headers.Authorization = `Bearer ${store.getters.token}`
|
config.headers.Authorization = `Bearer ${store.getters.token}`
|
||||||
}
|
}
|
||||||
|
|||||||
+19
-5
@@ -1,10 +1,11 @@
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
import _vm from '@/main'
|
||||||
import { Message, MessageBox, Alert } from 'element-ui'
|
import { Message, MessageBox, Alert } from 'element-ui'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import Vue from 'vue'
|
import WHITELIST from "./whiteList"
|
||||||
import moment from 'moment-timezone';
|
import moment from 'moment-timezone';
|
||||||
console.log(moment.tz.guess())
|
import { encryptConfig } from "@/utils/encrypt"
|
||||||
axios.defaults.withCredentials = false
|
axios.defaults.withCredentials = false
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: '/api',
|
baseURL: '/api',
|
||||||
@@ -16,18 +17,28 @@ var path
|
|||||||
// var lang = store.state.lang.language
|
// var lang = store.state.lang.language
|
||||||
|
|
||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
config => {
|
async config => {
|
||||||
path = router && router.app && router.app._route && router.app._route.path
|
path = router && router.app && router.app._route && router.app._route.path
|
||||||
config.headers['Content-Type'] = 'application/json;charset=UTF-8'
|
config.headers['Content-Type'] = 'application/json;charset=UTF-8'
|
||||||
var language = zzSessionStorage.getItem('lang')
|
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['Accept-Language'] = language === 'en' ? 'en-US,en;q=0.5' : 'zh-CN,zh;q=0.9'
|
||||||
config.headers['TimeZoneId'] = moment.tz.guess()
|
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}`
|
config.headers.Authorization = `Bearer ${store.getters.token}`
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (eval(process.env.VUE_APP_LOGIN_FOR_PERMISSION)) {
|
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
|
return config
|
||||||
}
|
}
|
||||||
if (store.state.user.userId !== zzSessionStorage.getItem('userId')) {
|
if (store.state.user.userId !== zzSessionStorage.getItem('userId')) {
|
||||||
@@ -80,6 +91,9 @@ service.interceptors.response.use(
|
|||||||
const status = error.response.status
|
const status = error.response.status
|
||||||
if (error.response.data && (error.response.data.Code === -1 || error.response.data.Code === -2)) {
|
if (error.response.data && (error.response.data.Code === -1 || error.response.data.Code === -2)) {
|
||||||
store.dispatch('user/logout').then(() => {
|
store.dispatch('user/logout').then(() => {
|
||||||
|
if (_vm.$msgbox) {
|
||||||
|
_vm.$msgbox.close();
|
||||||
|
}
|
||||||
router.push(`/login`)
|
router.push(`/login`)
|
||||||
this.$i18n.locale = 'zh'
|
this.$i18n.locale = 'zh'
|
||||||
this.setLanguage('zh')
|
this.setLanguage('zh')
|
||||||
|
|||||||
@@ -0,0 +1,106 @@
|
|||||||
|
import streamSaver from "streamsaver";
|
||||||
|
import "streamsaver/examples/zip-stream.js";
|
||||||
|
import store from '@/store'
|
||||||
|
streamSaver.mitm = `${window.location.origin}/mitm.html?version=2.0.0`
|
||||||
|
// 下载文件并压缩
|
||||||
|
function zipFiles(zipName, files) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
try {
|
||||||
|
console.log("同步下载打包开始时间:" + new Date());
|
||||||
|
store.dispatch('trials/setUnLock', true)
|
||||||
|
files = formatFiles(files)
|
||||||
|
// 创建压缩文件输出流
|
||||||
|
const zipFileOutputStream = streamSaver.createWriteStream(zipName);
|
||||||
|
// 创建下载文件流
|
||||||
|
const fileIterator = files.values();
|
||||||
|
const readableZipStream = new ZIP({
|
||||||
|
async pull(ctrl) {
|
||||||
|
const fileInfo = fileIterator.next();
|
||||||
|
if (fileInfo.done) {//迭代终止
|
||||||
|
ctrl.close();
|
||||||
|
} else {
|
||||||
|
let { name, url } = fileInfo.value;
|
||||||
|
url = decodeUtf8(url);
|
||||||
|
return fetch(url).then(res => {
|
||||||
|
ctrl.enqueue({
|
||||||
|
name,
|
||||||
|
stream: () => res.body
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (window.WritableStream && readableZipStream.pipeTo) {
|
||||||
|
// 开始下载
|
||||||
|
readableZipStream
|
||||||
|
.pipeTo(zipFileOutputStream)
|
||||||
|
.then(() => {
|
||||||
|
console.log("同步下载打包结束时间:" + new Date());
|
||||||
|
store.dispatch('trials/setUnLock', false)
|
||||||
|
resolve(true)
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
resolve(false)
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
resolve(false)
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
resolve(false)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
// 下载文件并修改名称
|
||||||
|
async function updateFile(file, name) {
|
||||||
|
return new Promise(async resolve => {
|
||||||
|
try {
|
||||||
|
store.dispatch('trials/setUnLock', true)
|
||||||
|
const fileOutputStream = streamSaver.createWriteStream(name);
|
||||||
|
file = decodeUtf8(file);
|
||||||
|
let res = await fetch(file);
|
||||||
|
res.body.pipeTo(fileOutputStream).then(() => {
|
||||||
|
store.dispatch('trials/setUnLock', true)
|
||||||
|
resolve(true)
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
resolve(false)
|
||||||
|
});
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
resolve(false)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 同名文件修改名称
|
||||||
|
function formatFiles(files) {
|
||||||
|
let fileObj = {};
|
||||||
|
files.forEach(file => {
|
||||||
|
let arr = Object.keys(fileObj);
|
||||||
|
if (!~arr.indexOf(file.name)) {
|
||||||
|
fileObj[file.name] = 1;
|
||||||
|
} else {
|
||||||
|
let name = file.name;
|
||||||
|
file.name = name.split(".")[0] + `(${fileObj[name]})` + name
|
||||||
|
.substring(name.lastIndexOf('.'))
|
||||||
|
.toLocaleLowerCase()
|
||||||
|
fileObj[name]++;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return files;
|
||||||
|
}
|
||||||
|
function decodeUtf8(bytes) {
|
||||||
|
let str = bytes.split('?');
|
||||||
|
let str2 = str[0].split('/');
|
||||||
|
let name = str2[str2.length - 1];
|
||||||
|
name = encodeURIComponent(name);
|
||||||
|
str.shift();
|
||||||
|
str2.pop();
|
||||||
|
return str2.join("/") + '/' + name;
|
||||||
|
}
|
||||||
|
export async function downLoadFile(file, name, type = 'file') {
|
||||||
|
if (type === 'zip') return await zipFiles(name, file);
|
||||||
|
return await updateFile(file, name)
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,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
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
<div
|
<div
|
||||||
v-show="item.instanceCount"
|
v-show="item.instanceCount"
|
||||||
style="padding: 1px;"
|
style="padding: 1px;"
|
||||||
>{{ item.modality }} : {{ item.instanceCount }} Series
|
>{{ item.modality }} : {{ item.instanceCount }} image
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -67,6 +67,8 @@ import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
|
|||||||
// import dicomStore from '@/utils/dicom-store'
|
// import dicomStore from '@/utils/dicom-store'
|
||||||
import dicomViewer from '@/components/Dicom/DicomViewer'
|
import dicomViewer from '@/components/Dicom/DicomViewer'
|
||||||
import dicomPreview from '@/components/Dicom/DicomPreview'
|
import dicomPreview from '@/components/Dicom/DicomPreview'
|
||||||
|
import metaDataProvider from '@/utils/metaDataProvider'
|
||||||
|
cornerstone.metaData.addProvider(metaDataProvider, { priority: 10 });
|
||||||
var config = {
|
var config = {
|
||||||
maxWebWorkers: 4,
|
maxWebWorkers: 4,
|
||||||
startWebWorkersOnDemand: true,
|
startWebWorkersOnDemand: true,
|
||||||
|
|||||||
@@ -143,6 +143,8 @@ import { getInstanceList, getPatientSeriesList, setSeriesStatus } from '@/api/tr
|
|||||||
import requestPoolManager from '@/utils/request-pool'
|
import requestPoolManager from '@/utils/request-pool'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { changeURLStatic } from '@/utils/history.js'
|
import { changeURLStatic } from '@/utils/history.js'
|
||||||
|
import metaDataProvider from '@/utils/metaDataProvider'
|
||||||
|
cornerstone.metaData.addProvider(metaDataProvider, { priority: 10 });
|
||||||
var config = {
|
var config = {
|
||||||
maxWebWorkers: 4,
|
maxWebWorkers: 4,
|
||||||
startWebWorkersOnDemand: true,
|
startWebWorkersOnDemand: true,
|
||||||
@@ -251,7 +253,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async loadPatientStudy() {
|
async loadPatientStudy() {
|
||||||
try {
|
try {
|
||||||
let data = await getPatientSeriesList(this.studyId);
|
const data = await getPatientSeriesList(this.studyId)
|
||||||
if (data.IsSuccess) {
|
if (data.IsSuccess) {
|
||||||
const { Result } = data
|
const { Result } = data
|
||||||
var seriesList = []
|
var seriesList = []
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<div class="sidePanelThumbs">
|
<div class="sidePanelThumbs">
|
||||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleTabClick">
|
<el-tabs v-model="activeName" type="border-card" @tab-click="handleTabClick">
|
||||||
<el-tab-pane :label="$t('trials:dicom-show:currentVisit')" name="current-study">
|
<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 }}
|
{{ visitInfo }}
|
||||||
</div>
|
</div>
|
||||||
<div class="viewerSidethumbs ps" style="position: relative;">
|
<div class="viewerSidethumbs ps" style="position: relative;">
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="$t('trials:dicom-show:relatedVisit')" name="relation-study" class="pane-relation-wrapper">
|
<el-tab-pane :label="$t('trials:dicom-show:relatedVisit')" name="relation-study" class="pane-relation-wrapper" v-if="!visitTaskId">
|
||||||
<div class="viewerSidethumbinner">
|
<div class="viewerSidethumbinner">
|
||||||
<el-collapse v-model="relationActiveName" @change="handelRelationActiveChange">
|
<el-collapse v-model="relationActiveName" @change="handelRelationActiveChange">
|
||||||
<el-collapse-item v-for="(study,studyIndex) in relationStudyList" :key="`${study.StudyId}`" :name="`${study.StudyId}`">
|
<el-collapse-item v-for="(study,studyIndex) in relationStudyList" :key="`${study.StudyId}`" :name="`${study.StudyId}`">
|
||||||
@@ -261,9 +261,12 @@ import * as cornerstoneWADOImageLoader from 'cornerstone-wado-image-loader'
|
|||||||
import dicomViewer from '@/components/Dicom/DicomViewer'
|
import dicomViewer from '@/components/Dicom/DicomViewer'
|
||||||
import { getVisitStudyList, getAllRelationStudyList, getSeriesList } from '@/api/reading'
|
import { getVisitStudyList, getAllRelationStudyList, getSeriesList } from '@/api/reading'
|
||||||
import { setSeriesStatus } from '@/api/trials'
|
import { setSeriesStatus } from '@/api/trials'
|
||||||
|
import { getTaskUploadedDicomStudyList } from '@/api/reading'
|
||||||
import requestPoolManager from '@/utils/request-pool'
|
import requestPoolManager from '@/utils/request-pool'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { changeURLStatic } from '@/utils/history.js'
|
import { changeURLStatic } from '@/utils/history.js'
|
||||||
|
import metaDataProvider from '@/utils/metaDataProvider'
|
||||||
|
cornerstone.metaData.addProvider(metaDataProvider, { priority: 10 });
|
||||||
// import * as cornerstoneTools from 'cornerstone-tools'
|
// import * as cornerstoneTools from 'cornerstone-tools'
|
||||||
var config = {
|
var config = {
|
||||||
maxWebWorkers: 4,
|
maxWebWorkers: 4,
|
||||||
@@ -301,7 +304,9 @@ export default {
|
|||||||
relationActiveName: [],
|
relationActiveName: [],
|
||||||
showSeriesList: [],
|
showSeriesList: [],
|
||||||
currentLoadIns: [],
|
currentLoadIns: [],
|
||||||
isFromCRCUpload: false
|
isFromCRCUpload: false,
|
||||||
|
visitTaskId: null,
|
||||||
|
page: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -318,6 +323,8 @@ export default {
|
|||||||
this.isReading = this.$router.currentRoute.query.isReading ? this.$router.currentRoute.query.isReading * 1 : 0
|
this.isReading = this.$router.currentRoute.query.isReading ? this.$router.currentRoute.query.isReading * 1 : 0
|
||||||
this.showDelete = parseInt(this.$router.currentRoute.query.showDelete)
|
this.showDelete = parseInt(this.$router.currentRoute.query.showDelete)
|
||||||
this.isFromCRCUpload = !!this.$router.currentRoute.query.isFromCRCUpload
|
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)
|
// cornerstone.events.addEventListener('cornerstoneimageloaded', this.cornerstoneImageLoaded)
|
||||||
this.getStudiesInfo()
|
this.getStudiesInfo()
|
||||||
cornerstone.events.addEventListener('cornerstoneimageloadprogress', this.cornerstoneimageloadprogress)
|
cornerstone.events.addEventListener('cornerstoneimageloadprogress', this.cornerstoneimageloadprogress)
|
||||||
@@ -338,7 +345,14 @@ export default {
|
|||||||
async getStudiesInfo() {
|
async getStudiesInfo() {
|
||||||
this.studyList = []
|
this.studyList = []
|
||||||
try {
|
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) {
|
if (res.IsSuccess) {
|
||||||
res.Result.forEach((study, studyIndex) => {
|
res.Result.forEach((study, studyIndex) => {
|
||||||
const data = {}
|
const data = {}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<el-form-item>
|
<el-form-item>
|
||||||
<!-- 查询 -->
|
<!-- 查询 -->
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
<el-button type="primary" icon="el-icon-search" @click="handleSearch">
|
||||||
{{ $t("common:button:search") }}
|
{{ $t('common:button:search') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 重置 -->
|
<!-- 重置 -->
|
||||||
<el-button
|
<el-button
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
icon="el-icon-refresh-left"
|
icon="el-icon-refresh-left"
|
||||||
@click="handleReset"
|
@click="handleReset"
|
||||||
>
|
>
|
||||||
{{ $t("common:button:reset") }}
|
{{ $t('common:button:reset') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
size="small"
|
size="small"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
>
|
>
|
||||||
{{ $t("common:button:new") }}
|
{{ $t('common:button:new') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{
|
{{
|
||||||
$fd(
|
$fd(
|
||||||
"Common_File_BusinessScenario",
|
'Common_File_BusinessScenario',
|
||||||
scope.row.BusinessScenarioEnum
|
scope.row.BusinessScenarioEnum
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
@@ -106,10 +106,10 @@
|
|||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||||
$fd("YesOrNo", scope.row.IsDeleted)
|
$fd('YesOrNo', scope.row.IsDeleted)
|
||||||
}}</el-tag>
|
}}</el-tag>
|
||||||
<el-tag v-else type="primary">{{
|
<el-tag v-else type="primary">{{
|
||||||
$fd("YesOrNo", scope.row.IsDeleted)
|
$fd('YesOrNo', scope.row.IsDeleted)
|
||||||
}}</el-tag>
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -122,14 +122,17 @@
|
|||||||
|
|
||||||
<el-table-column :label="$t('common:action:action')">
|
<el-table-column :label="$t('common:action:action')">
|
||||||
<template slot-scope="scope">
|
<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)">
|
<el-button type="text" @click="handleDownload(scope.row)">
|
||||||
{{ $t("common:button:download") }}
|
{{ $t('common:button:download') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="text" @click="handleEdit(scope.row)">
|
<el-button type="text" @click="handleEdit(scope.row)">
|
||||||
{{ $t("common:button:edit") }}
|
{{ $t('common:button:edit') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="text" @click="handleDelete(scope.row)">
|
<el-button type="text" @click="handleDelete(scope.row)">
|
||||||
{{ $t("common:button:delete") }}
|
{{ $t('common:button:delete') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -166,22 +169,22 @@ import {
|
|||||||
getCommonDocumentList,
|
getCommonDocumentList,
|
||||||
DownloadCommonDoc,
|
DownloadCommonDoc,
|
||||||
deleteCommonDocument,
|
deleteCommonDocument,
|
||||||
} from "@/api/dictionary";
|
} from '@/api/dictionary'
|
||||||
import BaseContainer from "@/components/BaseContainer";
|
import BaseContainer from '@/components/BaseContainer'
|
||||||
import Pagination from "@/components/Pagination";
|
import Pagination from '@/components/Pagination'
|
||||||
import TemplateForm from "./TemplateForm";
|
import TemplateForm from './TemplateForm'
|
||||||
const FileTypeEnum = 2;
|
const FileTypeEnum = 2
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
FileTypeEnum: FileTypeEnum,
|
FileTypeEnum: FileTypeEnum,
|
||||||
BusinessScenarioEnum: null,
|
BusinessScenarioEnum: null,
|
||||||
Name: "",
|
Name: '',
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
export default {
|
export default {
|
||||||
name: "ExportTemplate",
|
name: 'ExportTemplate',
|
||||||
components: { BaseContainer, Pagination, TemplateForm },
|
components: { BaseContainer, Pagination, TemplateForm },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -189,86 +192,97 @@ export default {
|
|||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
currentRow: {},
|
currentRow: {},
|
||||||
editDialog: { title: "", visible: false },
|
editDialog: { title: '', visible: false },
|
||||||
loading: false,
|
loading: false,
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
handleDelete(row) {
|
||||||
this.$confirm(
|
this.$confirm(
|
||||||
this.$t("dictionary:attachment:export:confirm:delete")
|
this.$t('dictionary:attachment:export:confirm:delete')
|
||||||
).then(() => {
|
).then(() => {
|
||||||
deleteCommonDocument(row.Id).then(() => {
|
deleteCommonDocument(row.Id).then(() => {
|
||||||
this.$message.success(this.$t("common:message:deletedSuccessfully"));
|
this.$message.success(this.$t('common:message:deletedSuccessfully'))
|
||||||
this.getList();
|
this.getList()
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
getCommonDocumentList(this.searchData)
|
getCommonDocumentList(this.searchData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
this.list = res.Result.CurrentPageData;
|
this.list = res.Result.CurrentPageData
|
||||||
this.total = res.Result.TotalCount;
|
this.total = res.Result.TotalCount
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 新增
|
// 新增
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.editDialog.title = "Add";
|
this.editDialog.title = 'Add'
|
||||||
this.currentRow = { FileTypeEnum: FileTypeEnum };
|
this.currentRow = { FileTypeEnum: FileTypeEnum }
|
||||||
this.editDialog.visible = true;
|
this.editDialog.visible = true
|
||||||
},
|
},
|
||||||
// 下载
|
// 下载
|
||||||
handleDownload(row) {
|
handleDownload(row) {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
DownloadCommonDoc(row.Code)
|
DownloadCommonDoc(row.Code)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 编辑
|
// 编辑
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
this.editDialog.title = "Edit";
|
this.editDialog.title = 'Edit'
|
||||||
this.currentRow = { ...row };
|
this.currentRow = { ...row }
|
||||||
this.editDialog.visible = true;
|
this.editDialog.visible = true
|
||||||
},
|
},
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.searchData.PageIndex = 1;
|
this.searchData.PageIndex = 1
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.searchData = searchDataDefault();
|
this.searchData = searchDataDefault()
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
this.editDialog.visible = false;
|
this.editDialog.visible = false
|
||||||
},
|
},
|
||||||
// 排序
|
// 排序
|
||||||
handleSortChange(column) {
|
handleSortChange(column) {
|
||||||
if (column.order === "ascending") {
|
if (column.order === 'ascending') {
|
||||||
this.searchData.Asc = true;
|
this.searchData.Asc = true
|
||||||
} else {
|
} else {
|
||||||
this.searchData.Asc = false;
|
this.searchData.Asc = false
|
||||||
}
|
}
|
||||||
this.searchData.SortField = column.prop;
|
this.searchData.SortField = column.prop
|
||||||
this.searchData.PageIndex = 1;
|
this.searchData.PageIndex = 1
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep .search{
|
::v-deep .search {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<el-form-item label="文件类型: " prop="FileTypeId">
|
<el-form-item label="文件类型: " prop="FileTypeId">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.FileTypeId"
|
v-model="form.FileTypeId"
|
||||||
style="width:100%;"
|
style="width: 100%"
|
||||||
size="small"
|
size="small"
|
||||||
filterable
|
filterable
|
||||||
>
|
>
|
||||||
@@ -41,21 +41,26 @@
|
|||||||
:on-exceed="handleExceed"
|
:on-exceed="handleExceed"
|
||||||
:disabled="form.Type === ''"
|
:disabled="form.Type === ''"
|
||||||
>
|
>
|
||||||
<el-button size="small" type="primary" :disabled="form.FileTypeId === ''" :loading="btnLoading">Select</el-button>
|
<el-button
|
||||||
<span
|
size="small"
|
||||||
slot="tip"
|
type="primary"
|
||||||
style="margin-left:10px;"
|
:disabled="form.FileTypeId === ''"
|
||||||
class="el-upload__tip"
|
:loading="btnLoading"
|
||||||
|
>Select</el-button
|
||||||
>
|
>
|
||||||
|
<span slot="tip" style="margin-left: 10px" class="el-upload__tip">
|
||||||
(must be in pdf format)
|
(must be in pdf format)
|
||||||
</span>
|
</span>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="需要签署的用户类型: " prop="NeedConfirmedUserTypeIdList">
|
<el-form-item
|
||||||
|
label="需要签署的用户类型: "
|
||||||
|
prop="NeedConfirmedUserTypeIdList"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.NeedConfirmedUserTypeIdList"
|
v-model="form.NeedConfirmedUserTypeIdList"
|
||||||
style="width:100%;"
|
style="width: 100%"
|
||||||
multiple
|
multiple
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
@@ -66,7 +71,18 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="查看最短时间(分钟): " prop="SignViewMinimumMinutes">
|
<el-form-item label="是否仅内部签署: " prop="DocUserSignType">
|
||||||
|
<el-switch
|
||||||
|
v-model="form.DocUserSignType"
|
||||||
|
:active-value="1"
|
||||||
|
:inactive-value="0"
|
||||||
|
>
|
||||||
|
</el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="查看最短时间(分钟): "
|
||||||
|
prop="SignViewMinimumMinutes"
|
||||||
|
>
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.SignViewMinimumMinutes"
|
v-model="form.SignViewMinimumMinutes"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
@@ -81,9 +97,16 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
</div>
|
</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 style="text-align:right;">
|
<el-form-item style="text-align: right">
|
||||||
<el-button size="small" type="primary" :disabled="form.FileTypeId === '' || form.Name === ''" :loading="saveBtnLoading" @click="handleSave">Save</el-button>
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
:disabled="form.FileTypeId === '' || form.Name === ''"
|
||||||
|
:loading="saveBtnLoading"
|
||||||
|
@click="handleSave"
|
||||||
|
>Save</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -96,8 +119,10 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() { return {} }
|
default() {
|
||||||
}
|
return {}
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
@@ -108,19 +133,26 @@ export default {
|
|||||||
Name: '',
|
Name: '',
|
||||||
Path: '',
|
Path: '',
|
||||||
IsDeleted: false,
|
IsDeleted: false,
|
||||||
SignViewMinimumMinutes: null
|
SignViewMinimumMinutes: null,
|
||||||
|
DocUserSignType: 0,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
FileTypeId: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
FileTypeId: [
|
||||||
SignViewMinimumMinutes: [{ required: true, message: 'Please specify', trigger: ['change'] }],
|
{ required: true, message: 'Please select', trigger: ['blur'] },
|
||||||
NeedConfirmedUserTypeIdList: [{ required: true, message: 'Please select', trigger: ['blur'] }]
|
],
|
||||||
|
SignViewMinimumMinutes: [
|
||||||
|
{ required: true, message: 'Please specify', trigger: ['change'] },
|
||||||
|
],
|
||||||
|
NeedConfirmedUserTypeIdList: [
|
||||||
|
{ required: true, message: 'Please select', trigger: ['blur'] },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
fileList: [],
|
fileList: [],
|
||||||
userTypeOptions: [],
|
userTypeOptions: [],
|
||||||
btnLoading: false,
|
btnLoading: false,
|
||||||
saveBtnLoading: false,
|
saveBtnLoading: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
dictionaryList: {}
|
dictionaryList: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -137,8 +169,8 @@ export default {
|
|||||||
{
|
{
|
||||||
name: this.data.Name,
|
name: this.data.Name,
|
||||||
url: this.data.Path,
|
url: this.data.Path,
|
||||||
path: this.data.Path
|
path: this.data.Path,
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
this.form.Id = this.data.Id
|
this.form.Id = this.data.Id
|
||||||
@@ -147,25 +179,31 @@ export default {
|
|||||||
this.form.Path = this.data.Path
|
this.form.Path = this.data.Path
|
||||||
this.form.IsDeleted = this.data.IsDeleted
|
this.form.IsDeleted = this.data.IsDeleted
|
||||||
this.form.SignViewMinimumMinutes = this.data.SignViewMinimumMinutes
|
this.form.SignViewMinimumMinutes = this.data.SignViewMinimumMinutes
|
||||||
|
this.form.DocUserSignType = this.data.DocUserSignType
|
||||||
}
|
}
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
// 获取文件类型下拉框
|
// 获取文件类型下拉框
|
||||||
getDicData() {
|
getDicData() {
|
||||||
getBasicDataSelects(['Sys_Document']).then(res => {
|
getBasicDataSelects(['Sys_Document'])
|
||||||
this.dictionaryList = { ...res.Result }
|
.then((res) => {
|
||||||
}).catch(() => {
|
this.dictionaryList = { ...res.Result }
|
||||||
|
})
|
||||||
})
|
.catch(() => {})
|
||||||
},
|
},
|
||||||
// 获取用户类型下拉数据
|
// 获取用户类型下拉数据
|
||||||
getUserType() {
|
getUserType() {
|
||||||
getTrialUserTypeList().then(res => {
|
getTrialUserTypeList()
|
||||||
this.userTypeOptions = res.Result
|
.then((res) => {
|
||||||
if (this.form.Id) {
|
this.userTypeOptions = res.Result
|
||||||
this.form.NeedConfirmedUserTypeIdList = this.data.NeedConfirmedUserTypeIds
|
if (this.form.Id) {
|
||||||
}
|
this.form.NeedConfirmedUserTypeIdList =
|
||||||
}).catch(() => { this.loading = false })
|
this.data.NeedConfirmedUserTypeIds
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
beforeUpload(file) {
|
beforeUpload(file) {
|
||||||
// 检测文件类型是否符合要求
|
// 检测文件类型是否符合要求
|
||||||
@@ -181,28 +219,37 @@ export default {
|
|||||||
async handleUploadFile(param) {
|
async handleUploadFile(param) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
var file = await this.fileToBlob(param.file)
|
var file = await this.fileToBlob(param.file)
|
||||||
const res = await this.OSSclient.put(`/System/DocumentToSign/${param.file.name}${new Date().getTime()}`, file)
|
const res = await this.OSSclient.put(
|
||||||
this.fileList.push({ name: param.file.name, path: this.$getObjectName(res.url), url: this.$getObjectName(res.url) })
|
`/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.Path = this.$getObjectName(res.url)
|
||||||
this.form.Name = param.file.name
|
this.form.Name = param.file.name
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs.sysAttachmentFrom.validate(valid => {
|
this.$refs.sysAttachmentFrom.validate((valid) => {
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
if (!this.form.Name) {
|
if (!this.form.Name) {
|
||||||
this.$alert('Please select file.')
|
this.$alert('Please select file.')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.saveBtnLoading = true
|
this.saveBtnLoading = true
|
||||||
addOrUpdateSystemDocument(this.form).then(res => {
|
addOrUpdateSystemDocument(this.form)
|
||||||
this.saveBtnLoading = false
|
.then((res) => {
|
||||||
this.$emit('closeDialog')
|
this.saveBtnLoading = false
|
||||||
this.$emit('getList')
|
this.$emit('closeDialog')
|
||||||
this.$message.success('Uploaded successfully')
|
this.$emit('getList')
|
||||||
}).catch(() => {
|
this.$message.success('Uploaded successfully')
|
||||||
this.saveBtnLoading = false
|
})
|
||||||
})
|
.catch(() => {
|
||||||
|
this.saveBtnLoading = false
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleRemoveFile() {
|
handleRemoveFile() {
|
||||||
@@ -220,19 +267,21 @@ export default {
|
|||||||
},
|
},
|
||||||
checkFileSuffix(fileName) {
|
checkFileSuffix(fileName) {
|
||||||
var typeArr = ['pdf']
|
var typeArr = ['pdf']
|
||||||
var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
|
var extendName = fileName
|
||||||
|
.substring(fileName.lastIndexOf('.') + 1)
|
||||||
|
.toLocaleLowerCase()
|
||||||
if (typeArr.indexOf(extendName) !== -1) {
|
if (typeArr.indexOf(extendName) !== -1) {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.upload-temporary-file{
|
.upload-temporary-file {
|
||||||
.upload-container .el-upload--text {
|
.upload-container .el-upload--text {
|
||||||
border: none;
|
border: none;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
@@ -245,8 +294,8 @@ export default {
|
|||||||
color: #428bca;
|
color: #428bca;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
.account_item_clear{
|
.account_item_clear {
|
||||||
.el-tag__close{
|
.el-tag__close {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,27 +2,18 @@
|
|||||||
<BaseContainer>
|
<BaseContainer>
|
||||||
<template slot="search-container">
|
<template slot="search-container">
|
||||||
<el-form :inline="true" size="small">
|
<el-form :inline="true" size="small">
|
||||||
|
|
||||||
<el-form-item label="文件类型:">
|
<el-form-item label="文件类型:">
|
||||||
<el-select
|
<el-select v-model="searchData.FileTypeId" style="width: 150px">
|
||||||
v-model="searchData.FileTypeId"
|
|
||||||
style="width:150px;"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item of dict.type.Sys_Document"
|
v-for="item of dict.type.Sys_Document"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文件名称">
|
<el-form-item label="文件名称">
|
||||||
<el-input
|
<el-input v-model="searchData.Name" style="width: 130px" clearable />
|
||||||
v-model="searchData.Name"
|
|
||||||
style="width:130px;"
|
|
||||||
clearable
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -31,7 +22,11 @@
|
|||||||
{{ $t('common:button:search') }}
|
{{ $t('common:button:search') }}
|
||||||
</el-button>
|
</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') }}
|
{{ $t('common:button:reset') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -39,7 +34,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
style="margin-left:auto;"
|
style="margin-left: auto"
|
||||||
size="small"
|
size="small"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
>
|
>
|
||||||
@@ -48,7 +43,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template slot="main-container">
|
<template slot="main-container">
|
||||||
<el-table
|
<el-table
|
||||||
v-adaptive="{bottomOffset:60}"
|
v-adaptive="{ bottomOffset: 60 }"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="list"
|
:data="list"
|
||||||
stripe
|
stripe
|
||||||
@@ -81,7 +76,11 @@
|
|||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.NeedConfirmedUserTypes?scope.row.NeedConfirmedUserTypes.join(', '):'' }}
|
{{
|
||||||
|
scope.row.NeedConfirmedUserTypes
|
||||||
|
? scope.row.NeedConfirmedUserTypes.join(', ')
|
||||||
|
: ''
|
||||||
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -91,7 +90,17 @@
|
|||||||
sortable="custom"
|
sortable="custom"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.IsDeleted?'Yes':'No' }}
|
{{ scope.row.IsDeleted ? 'Yes' : 'No' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="DocUserSignType"
|
||||||
|
label="是否仅内部签署"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ $fd('ReadingYesOrNo', Number(scope.row.DocUserSignType)) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -103,16 +112,10 @@
|
|||||||
|
|
||||||
<el-table-column label="Action">
|
<el-table-column label="Action">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button type="text" @click="handlePreview(scope.row)">
|
||||||
type="text"
|
|
||||||
@click="handlePreview(scope.row)"
|
|
||||||
>
|
|
||||||
预览
|
预览
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button type="text" @click="handleEdit(scope.row)">
|
||||||
type="text"
|
|
||||||
@click="handleEdit(scope.row)"
|
|
||||||
>
|
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
@@ -122,17 +125,20 @@
|
|||||||
>
|
>
|
||||||
废除
|
废除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button type="text" @click="handleDelete(scope.row)">
|
||||||
type="text"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</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
|
<el-dialog
|
||||||
@@ -143,7 +149,11 @@
|
|||||||
width="600px"
|
width="600px"
|
||||||
custom-class="base-dialog-wrapper"
|
custom-class="base-dialog-wrapper"
|
||||||
>
|
>
|
||||||
<TemplateForm :data="currentRow" @closeDialog="closeDialog" @getList="getList" />
|
<TemplateForm
|
||||||
|
:data="currentRow"
|
||||||
|
@closeDialog="closeDialog"
|
||||||
|
@getList="getList"
|
||||||
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 预览文件 -->
|
<!-- 预览文件 -->
|
||||||
@@ -155,10 +165,16 @@
|
|||||||
append-to-body
|
append-to-body
|
||||||
custom-class="base-dialog-wrapper"
|
custom-class="base-dialog-wrapper"
|
||||||
>
|
>
|
||||||
<div class="base-modal-body" style="border:2px solid #ccc;padding: 10px">
|
<div
|
||||||
<PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" />
|
class="base-modal-body"
|
||||||
|
style="border: 2px solid #ccc; padding: 10px"
|
||||||
|
>
|
||||||
|
<PreviewFile
|
||||||
|
v-if="previewVisible"
|
||||||
|
:file-path="currentPath"
|
||||||
|
:file-type="currentType"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
</BaseContainer>
|
</BaseContainer>
|
||||||
@@ -175,7 +191,7 @@ const searchDataDefault = () => {
|
|||||||
FileTypeId: '',
|
FileTypeId: '',
|
||||||
Name: '',
|
Name: '',
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20
|
PageSize: 20,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
@@ -193,7 +209,7 @@ export default {
|
|||||||
editVisible: false,
|
editVisible: false,
|
||||||
previewVisible: false,
|
previewVisible: false,
|
||||||
title: '',
|
title: '',
|
||||||
loading: false
|
loading: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -203,22 +219,24 @@ export default {
|
|||||||
// 获取系统文件数据
|
// 获取系统文件数据
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getSystemDocumentList(this.searchData).then(res => {
|
getSystemDocumentList(this.searchData)
|
||||||
this.loading = false
|
.then((res) => {
|
||||||
const { CurrentPageData, TotalCount } = res.Result
|
this.loading = false
|
||||||
CurrentPageData.forEach(item => {
|
const { CurrentPageData, TotalCount } = res.Result
|
||||||
item.NeedConfirmedUserTypes = []
|
CurrentPageData.forEach((item) => {
|
||||||
item.NeedConfirmedUserTypeIds = []
|
item.NeedConfirmedUserTypes = []
|
||||||
item.NeedConfirmedUserTypeList.forEach((i) => {
|
item.NeedConfirmedUserTypeIds = []
|
||||||
item.NeedConfirmedUserTypes.push(i.UserTypeShortName)
|
item.NeedConfirmedUserTypeList.forEach((i) => {
|
||||||
item.NeedConfirmedUserTypeIds.push(i.NeedConfirmUserTypeId)
|
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() {
|
handleAdd() {
|
||||||
@@ -230,7 +248,9 @@ export default {
|
|||||||
handlePreview(row) {
|
handlePreview(row) {
|
||||||
const { Name, FullFilePath } = row
|
const { Name, FullFilePath } = row
|
||||||
this.currentPath = FullFilePath
|
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
|
this.previewVisible = true
|
||||||
},
|
},
|
||||||
// 编辑
|
// 编辑
|
||||||
@@ -244,39 +264,47 @@ export default {
|
|||||||
this.$confirm('是否确认废除此文件?', {
|
this.$confirm('是否确认废除此文件?', {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
|
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
userAbandonDoc(row.Id, true)
|
userAbandonDoc(row.Id, true)
|
||||||
.then(res => {
|
.then((res) => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.getList()
|
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) {
|
handleDelete(row) {
|
||||||
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), {
|
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true
|
distinguishCancelAndClose: true,
|
||||||
|
}).then(() => {
|
||||||
|
this.loading = true
|
||||||
|
deleteSystemDocument(row.Id)
|
||||||
|
.then((res) => {
|
||||||
|
this.loading = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.list.splice(
|
||||||
|
this.list.findIndex((item) => item.Id === row.Id),
|
||||||
|
1
|
||||||
|
)
|
||||||
|
this.$message.success('删除成功!')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.then(() => {
|
|
||||||
this.loading = true
|
|
||||||
deleteSystemDocument(row.Id)
|
|
||||||
.then(res => {
|
|
||||||
this.loading = false
|
|
||||||
if (res.IsSuccess) {
|
|
||||||
this.list.splice(this.list.findIndex(item => item.Id === row.Id), 1)
|
|
||||||
this.$message.success('删除成功!')
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
@@ -305,7 +333,7 @@ export default {
|
|||||||
this.searchData.SortField = column.prop
|
this.searchData.SortField = column.prop
|
||||||
this.searchData.PageIndex = 1
|
this.searchData.PageIndex = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
ref="sysTemplateFrom"
|
ref="sysTemplateFrom"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:model="form"
|
:model="form"
|
||||||
label-width="90px"
|
label-width="140px"
|
||||||
size="small"
|
size="small"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
class="upload-temporary-file"
|
class="upload-temporary-file"
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<el-form-item label="业务场景: " prop="BusinessScenarioEnum">
|
<el-form-item label="业务场景: " prop="BusinessScenarioEnum">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.BusinessScenarioEnum"
|
v-model="form.BusinessScenarioEnum"
|
||||||
style="width:100%;"
|
style="width: 100%"
|
||||||
size="small"
|
size="small"
|
||||||
filterable
|
filterable
|
||||||
>
|
>
|
||||||
@@ -44,12 +44,14 @@
|
|||||||
:on-exceed="handleExceed"
|
:on-exceed="handleExceed"
|
||||||
:disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum"
|
:disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum"
|
||||||
>
|
>
|
||||||
<el-button size="small" type="primary" :disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum" :loading="btnLoading">Select</el-button>
|
<el-button
|
||||||
<span
|
size="small"
|
||||||
slot="tip"
|
type="primary"
|
||||||
style="margin-left:10px;"
|
:disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum"
|
||||||
class="el-upload__tip"
|
:loading="btnLoading"
|
||||||
|
>Select</el-button
|
||||||
>
|
>
|
||||||
|
<span slot="tip" style="margin-left: 10px" class="el-upload__tip">
|
||||||
(must be in xlsx/xls/doc/docx format)
|
(must be in xlsx/xls/doc/docx format)
|
||||||
</span>
|
</span>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
@@ -58,37 +60,61 @@
|
|||||||
<el-form-item label="文件名" prop="Name">
|
<el-form-item label="文件名" prop="Name">
|
||||||
<el-input v-model="form.Name" />
|
<el-input v-model="form.Name" />
|
||||||
</el-form-item>
|
</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-form-item v-if="form.Id !== ''" label="是否废除: ">
|
||||||
<el-radio-group v-model="form.IsDeleted">
|
<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-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="描述">
|
<el-form-item label="描述">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.Description"
|
v-model="form.Description"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:autosize="{ minRows: 2, maxRows: 4}"
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
placeholder="请输入内容"
|
placeholder="请输入内容"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</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 style="text-align:right;">
|
<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-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
:disabled="!form.FileTypeEnum || !form.BusinessScenarioEnum"
|
||||||
|
:loading="saveBtnLoading"
|
||||||
|
@click="handleSave"
|
||||||
|
>Save</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { addOrUpdateCommonDocument, uploadCommonDoc, Upload } from '@/api/dictionary'
|
import {
|
||||||
|
addOrUpdateCommonDocument,
|
||||||
|
uploadCommonDoc,
|
||||||
|
Upload,
|
||||||
|
} from '@/api/dictionary'
|
||||||
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
|
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
|
||||||
export default {
|
export default {
|
||||||
name: 'TemplateForm',
|
name: 'TemplateForm',
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() { return {} }
|
default() {
|
||||||
}
|
return {}
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
@@ -99,20 +125,30 @@ export default {
|
|||||||
FileTypeEnum: null,
|
FileTypeEnum: null,
|
||||||
BusinessScenarioEnum: null,
|
BusinessScenarioEnum: null,
|
||||||
Name: '',
|
Name: '',
|
||||||
|
NameCN: '',
|
||||||
Path: '',
|
Path: '',
|
||||||
Description: '',
|
Description: '',
|
||||||
IsDeleted: false
|
IsDeleted: false,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
Code: [{ required: true, message: 'Please specify', trigger: ['blur'] }],
|
Code: [
|
||||||
Name: [{ required: true, message: 'Please specify', trigger: ['blur'] }],
|
{ required: true, message: 'Please specify', trigger: ['blur'] },
|
||||||
BusinessScenarioEnum: [{ required: true, message: 'Please select', 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: [],
|
fileList: [],
|
||||||
btnLoading: false,
|
btnLoading: false,
|
||||||
saveBtnLoading: false,
|
saveBtnLoading: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
dictionaryList: {}
|
dictionaryList: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -128,8 +164,8 @@ export default {
|
|||||||
name: this.data.Name,
|
name: this.data.Name,
|
||||||
path: this.data.Path,
|
path: this.data.Path,
|
||||||
url: this.data.Path,
|
url: this.data.Path,
|
||||||
type: this.data.Type
|
type: this.data.Type,
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
for (const k in this.form) {
|
for (const k in this.form) {
|
||||||
@@ -142,12 +178,14 @@ export default {
|
|||||||
// 获取文件类型下拉框
|
// 获取文件类型下拉框
|
||||||
getDicData() {
|
getDicData() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getBasicDataSelects(['Common_File_ModuleType', 'Common_File_Type']).then(res => {
|
getBasicDataSelects(['Common_File_ModuleType', 'Common_File_Type'])
|
||||||
this.dictionaryList = { ...res.Result }
|
.then((res) => {
|
||||||
this.loading = false
|
this.dictionaryList = { ...res.Result }
|
||||||
}).catch(() => {
|
this.loading = false
|
||||||
this.loading = false
|
})
|
||||||
})
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
beforeUpload(file) {
|
beforeUpload(file) {
|
||||||
// 检测文件类型是否符合要求
|
// 检测文件类型是否符合要求
|
||||||
@@ -165,35 +203,43 @@ export default {
|
|||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append('file', param.file)
|
formData.append('file', param.file)
|
||||||
this.form.FileName = param.file.name
|
this.form.FileName = param.file.name
|
||||||
Upload(formData, 1).then(res => {
|
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.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.Path = res.Result.FilePath
|
||||||
this.form.Name = param.file.name
|
this.form.NameCN = param.file.name
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.btnLoading = false
|
this.btnLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs.sysTemplateFrom.validate(valid => {
|
this.$refs.sysTemplateFrom.validate((valid) => {
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
if (!this.form.Name) {
|
if (!this.form.Name) {
|
||||||
this.$alert('Please select file.')
|
this.$alert('Please select file.')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.saveBtnLoading = true
|
this.saveBtnLoading = true
|
||||||
addOrUpdateCommonDocument(this.form).then(res => {
|
addOrUpdateCommonDocument(this.form)
|
||||||
this.saveBtnLoading = false
|
.then((res) => {
|
||||||
this.$emit('closeDialog')
|
this.saveBtnLoading = false
|
||||||
this.$emit('getList')
|
this.$emit('closeDialog')
|
||||||
this.$message.success('Uploaded successfully')
|
this.$emit('getList')
|
||||||
}).catch(() => {
|
this.$message.success('Uploaded successfully')
|
||||||
this.saveBtnLoading = false
|
})
|
||||||
})
|
.catch(() => {
|
||||||
|
this.saveBtnLoading = false
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleRemoveFile() {
|
handleRemoveFile() {
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
this.form.Path = ''
|
this.form.Path = ''
|
||||||
|
this.form.NameCN = ''
|
||||||
this.form.Name = ''
|
this.form.Name = ''
|
||||||
},
|
},
|
||||||
handlePreview(file) {
|
handlePreview(file) {
|
||||||
@@ -206,19 +252,21 @@ export default {
|
|||||||
},
|
},
|
||||||
checkFileSuffix(fileName) {
|
checkFileSuffix(fileName) {
|
||||||
var typeArr = ['xls', 'xlsx', 'doc', 'docx']
|
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) {
|
if (typeArr.indexOf(extendName) !== -1) {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.upload-temporary-file{
|
.upload-temporary-file {
|
||||||
.upload-container .el-upload--text {
|
.upload-container .el-upload--text {
|
||||||
border: none;
|
border: none;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
@@ -231,8 +279,8 @@ export default {
|
|||||||
color: #428bca;
|
color: #428bca;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
.account_item_clear{
|
.account_item_clear {
|
||||||
.el-tag__close{
|
.el-tag__close {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<el-form-item label="业务场景">
|
<el-form-item label="业务场景">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchData.BusinessScenarioEnum"
|
v-model="searchData.BusinessScenarioEnum"
|
||||||
style="width:150px;"
|
style="width: 150px"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item of $d.Common_File_BusinessScenario"
|
v-for="item of $d.Common_File_BusinessScenario"
|
||||||
@@ -13,15 +13,10 @@
|
|||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="文件名称">
|
<el-form-item label="文件名称">
|
||||||
<el-input
|
<el-input v-model="searchData.Name" style="width: 130px" clearable />
|
||||||
v-model="searchData.Name"
|
|
||||||
style="width:130px;"
|
|
||||||
clearable
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -30,24 +25,28 @@
|
|||||||
{{ $t('common:button:search') }}
|
{{ $t('common:button:search') }}
|
||||||
</el-button>
|
</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') }}
|
{{ $t('common:button:reset') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</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-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>
|
||||||
<template slot="main-container">
|
<template slot="main-container">
|
||||||
<el-table
|
<el-table
|
||||||
v-adaptive="{bottomOffset:60}"
|
v-adaptive="{ bottomOffset: 60 }"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="list"
|
:data="list"
|
||||||
stripe
|
stripe
|
||||||
@@ -69,9 +68,13 @@
|
|||||||
sortable="custom"
|
sortable="custom"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd('Common_File_BusinessScenario',scope.row.BusinessScenarioEnum) }}
|
{{
|
||||||
|
$fd(
|
||||||
|
'Common_File_BusinessScenario',
|
||||||
|
scope.row.BusinessScenarioEnum
|
||||||
|
)
|
||||||
|
}}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -80,6 +83,12 @@
|
|||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
/>
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="NameCN"
|
||||||
|
:label="$t('dictionary:attachment:upload:table:nameCN')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
sortable="custom"
|
||||||
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="Description"
|
prop="Description"
|
||||||
label="描述"
|
label="描述"
|
||||||
@@ -92,8 +101,12 @@
|
|||||||
sortable="custom"
|
sortable="custom"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.IsDeleted" type="danger">{{ $fd('YesOrNo', scope.row.IsDeleted) }}</el-tag>
|
<el-tag v-if="scope.row.IsDeleted" type="danger">{{
|
||||||
<el-tag v-else type="primary">{{ $fd('YesOrNo', scope.row.IsDeleted) }}</el-tag>
|
$fd('YesOrNo', scope.row.IsDeleted)
|
||||||
|
}}</el-tag>
|
||||||
|
<el-tag v-else type="primary">{{
|
||||||
|
$fd('YesOrNo', scope.row.IsDeleted)
|
||||||
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -105,29 +118,29 @@
|
|||||||
|
|
||||||
<el-table-column label="Action">
|
<el-table-column label="Action">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button type="text" @click="PreviewFile(scope.row)">
|
||||||
type="text"
|
{{ $t('common:button:preview') }}
|
||||||
@click="handleDownload(scope.row)"
|
</el-button>
|
||||||
>
|
<el-button type="text" @click="handleDownload(scope.row)">
|
||||||
下载
|
下载
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button type="text" @click="handleEdit(scope.row)">
|
||||||
type="text"
|
|
||||||
@click="handleEdit(scope.row)"
|
|
||||||
>
|
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button type="text" @click="handleDelete(scope.row)">
|
||||||
type="text"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</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
|
<el-dialog
|
||||||
@@ -138,13 +151,21 @@
|
|||||||
width="600px"
|
width="600px"
|
||||||
custom-class="base-dialog-wrapper"
|
custom-class="base-dialog-wrapper"
|
||||||
>
|
>
|
||||||
<TemplateForm :data="currentRow" @closeDialog="closeDialog" @getList="getList" />
|
<TemplateForm
|
||||||
|
:data="currentRow"
|
||||||
|
@closeDialog="closeDialog"
|
||||||
|
@getList="getList"
|
||||||
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
</BaseContainer>
|
</BaseContainer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getCommonDocumentList, DownloadCommonDoc, deleteCommonDocument } from '@/api/dictionary'
|
import {
|
||||||
|
getCommonDocumentList,
|
||||||
|
DownloadCommonDoc,
|
||||||
|
deleteCommonDocument,
|
||||||
|
} from '@/api/dictionary'
|
||||||
import BaseContainer from '@/components/BaseContainer'
|
import BaseContainer from '@/components/BaseContainer'
|
||||||
import Pagination from '@/components/Pagination'
|
import Pagination from '@/components/Pagination'
|
||||||
import TemplateForm from './TemplateForm'
|
import TemplateForm from './TemplateForm'
|
||||||
@@ -155,7 +176,7 @@ const searchDataDefault = () => {
|
|||||||
BusinessScenarioEnum: null,
|
BusinessScenarioEnum: null,
|
||||||
Name: '',
|
Name: '',
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20
|
PageSize: 20,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
@@ -168,7 +189,7 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
currentRow: {},
|
currentRow: {},
|
||||||
editDialog: { title: '', visible: false },
|
editDialog: { title: '', visible: false },
|
||||||
loading: false
|
loading: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
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() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getCommonDocumentList(this.searchData).then(res => {
|
getCommonDocumentList(this.searchData)
|
||||||
this.loading = false
|
.then((res) => {
|
||||||
this.list = res.Result.CurrentPageData
|
this.loading = false
|
||||||
this.total = res.Result.TotalCount
|
this.list = res.Result.CurrentPageData
|
||||||
}).catch(() => {
|
this.total = res.Result.TotalCount
|
||||||
this.loading = false
|
})
|
||||||
})
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 新增
|
// 新增
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
@@ -202,9 +236,13 @@ export default {
|
|||||||
// 下载
|
// 下载
|
||||||
handleDownload(row) {
|
handleDownload(row) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
DownloadCommonDoc(row.Code).then(data => {
|
DownloadCommonDoc(row.Code)
|
||||||
this.loading = false
|
.then((data) => {
|
||||||
}).catch(() => { this.loading = false })
|
this.loading = false
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 编辑
|
// 编辑
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
@@ -233,7 +271,12 @@ export default {
|
|||||||
this.searchData.SortField = column.prop
|
this.searchData.SortField = column.prop
|
||||||
this.searchData.PageIndex = 1
|
this.searchData.PageIndex = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
::v-deep .search {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,14 +1,54 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="attachment-wrapper">
|
<div class="attachment-wrapper">
|
||||||
<el-tabs v-model="activeTab" @tab-click="clickTab">
|
<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)">
|
<el-tab-pane
|
||||||
<UploadTemplate v-if="activeTab === '1'" />
|
v-for="item in $d.Common_File_Type"
|
||||||
<ExportTemplate v-if="activeTab === '2'" />
|
:key="item.value"
|
||||||
<EmailTemplate v-if="activeTab === '3'" />
|
:label="item.label"
|
||||||
<CommonTemplate v-if="activeTab === '4'" />
|
:name="String(item.value)"
|
||||||
<SignatureTemplate v-if="activeTab === '5'" />
|
>
|
||||||
|
<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-tab-pane>
|
||||||
</el-tabs>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -17,6 +57,11 @@ import ExportTemplate from './components/ExportTemplate'
|
|||||||
import EmailTemplate from './components/EmailTemplate'
|
import EmailTemplate from './components/EmailTemplate'
|
||||||
import CommonTemplate from './components/CommonTemplate'
|
import CommonTemplate from './components/CommonTemplate'
|
||||||
import SignatureTemplate from './components/SignatureTemplate'
|
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 {
|
export default {
|
||||||
name: 'Attachment',
|
name: 'Attachment',
|
||||||
components: {
|
components: {
|
||||||
@@ -24,11 +69,35 @@ export default {
|
|||||||
ExportTemplate,
|
ExportTemplate,
|
||||||
EmailTemplate,
|
EmailTemplate,
|
||||||
CommonTemplate,
|
CommonTemplate,
|
||||||
SignatureTemplate
|
SignatureTemplate,
|
||||||
|
VueOfficeDocx,
|
||||||
|
VueOfficeExcel,
|
||||||
|
PreviewFile,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
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() {
|
mounted() {
|
||||||
@@ -40,25 +109,46 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickTab(tab, event) {
|
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>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.attachment-wrapper{
|
.attachment-wrapper {
|
||||||
.el-tabs{
|
.el-tabs {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
.el-tabs__header {
|
.el-tabs__header {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin-bottom:5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
.el-tabs__content{
|
.el-tabs__content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
.el-tab-pane{
|
.el-tab-pane {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
<el-table-column prop="Identification" label="标识" :show-overflow-tooltip="true" min-width="200px" />
|
<el-table-column prop="Identification" label="标识" :show-overflow-tooltip="true" min-width="200px" />
|
||||||
<el-table-column prop="OptTypeValueCN" label="操作类型" show-overflow-tooltip width="100px" />
|
<el-table-column prop="OptTypeValueCN" label="操作类型" show-overflow-tooltip width="100px" />
|
||||||
<el-table-column prop="ObjectTypeValueCN" label="对象类型" show-overflow-tooltip min-width="100px" />
|
<el-table-column prop="ObjectTypeValueCN" label="对象类型" show-overflow-tooltip min-width="100px" />
|
||||||
<el-table-column prop="ChildrenTypeValueCN" label="数据类型" show-overflow-tooltip min-width="100px" show-overflow-tooltip />
|
<el-table-column prop="ChildrenTypeValueCN" label="数据类型" show-overflow-tooltip min-width="100px"/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="Sort"
|
prop="Sort"
|
||||||
label="显示顺序"
|
label="显示顺序"
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
|
|
||||||
<!-- 添加或修改菜单对话框 -->
|
<!-- 添加或修改菜单对话框 -->
|
||||||
<el-dialog :title="title" top="100px" :close-on-click-modal="false" id="check_config" :visible.sync="open" :width="form.DataType === 'Table' ? '1280px' : '680px'" append-to-body>
|
<el-dialog :title="title" top="100px" :close-on-click-modal="false" id="check_config" :visible.sync="open" :width="form.DataType === 'Table' ? '1280px' : '680px'" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col v-show="title !== '复制'" :span="24">
|
<el-col v-show="title !== '复制'" :span="24">
|
||||||
<el-divider content-position="left">基本信息</el-divider>
|
<el-divider content-position="left">基本信息</el-divider>
|
||||||
@@ -142,11 +142,16 @@
|
|||||||
<el-input v-model="form.Identification" placeholder="请输入标识" />
|
<el-input v-model="form.Identification" placeholder="请输入标识" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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-form-item label="字段key">
|
||||||
<el-input v-model="form.Code" placeholder="请输入字段key" />
|
<el-input v-model="form.Code" placeholder="请输入字段key" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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-col v-show="form.ConfigType === 'C' && title !== '复制'" :span="12">
|
||||||
<el-form-item label="字段英文">
|
<el-form-item label="字段英文">
|
||||||
<el-input v-model="form.Value" placeholder="请输入字段英文" />
|
<el-input v-model="form.Value" placeholder="请输入字段英文" />
|
||||||
@@ -372,6 +377,16 @@
|
|||||||
<el-input :disabled="!scope.row.IsFixedColumn" v-model="scope.row.FixedColumnName" placeholder="固定列名"/>
|
<el-input :disabled="!scope.row.IsFixedColumn" v-model="scope.row.FixedColumnName" placeholder="固定列名"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="FixedColumnEnName"
|
||||||
|
min-width="120"
|
||||||
|
label="固定列名EN"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input :disabled="!scope.row.IsFixedColumn" v-model="scope.row.FixedColumnEnName" placeholder="固定列名EN"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="ColumnName"
|
prop="ColumnName"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
@@ -382,6 +397,16 @@
|
|||||||
<el-input :disabled="scope.row.IsFixedColumn" v-model="scope.row.ColumnName" placeholder="列字段名"/>
|
<el-input :disabled="scope.row.IsFixedColumn" v-model="scope.row.ColumnName" placeholder="列字段名"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="ColumnEnName"
|
||||||
|
min-width="120"
|
||||||
|
label="列字段名En"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input :disabled="scope.row.IsFixedColumn" v-model="scope.row.ColumnEnName" placeholder="列字段名En"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="ColumnValue"
|
prop="ColumnValue"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
@@ -415,6 +440,16 @@
|
|||||||
<el-input :disabled="!scope.row.IsMerge" v-model="scope.row.MergeColumnName" placeholder="合并组"/>
|
<el-input :disabled="!scope.row.IsMerge" v-model="scope.row.MergeColumnName" placeholder="合并组"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="MergeColumnEnName"
|
||||||
|
min-width="120"
|
||||||
|
label="合并组EN"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input :disabled="!scope.row.IsMerge" v-model="scope.row.MergeColumnEnName" placeholder="合并组EN"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="IsPicture"
|
prop="IsPicture"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
@@ -489,6 +524,14 @@
|
|||||||
<el-input v-model="form.ChildDataLabel" placeholder="请输入子数据Lable" />
|
<el-input v-model="form.ChildDataLabel" placeholder="请输入子数据Lable" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col v-show="form.ConfigType === 'C' && title !== '复制' && form.DataType === 'Array'" :span="12">
|
||||||
|
<el-form-item>
|
||||||
|
<span slot="label">
|
||||||
|
子数据LableEN
|
||||||
|
</span>
|
||||||
|
<el-input v-model="form.ChildDataEnLabel" placeholder="请输入子数据LableEN" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col v-show="form.ConfigType === 'C' && title !== '复制' && form.DataType === 'Array'" :span="12">
|
<el-col v-show="form.ConfigType === 'C' && title !== '复制' && form.DataType === 'Array'" :span="12">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
@@ -559,6 +602,11 @@
|
|||||||
<el-input v-model="form.ForeignKeyText" placeholder="请输入数据库字段to" />
|
<el-input v-model="form.ForeignKeyText" placeholder="请输入数据库字段to" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col v-show="form.ConfigType === 'C' && title !== '复制' && form.EnumType === 'Foreign'" :span="12">
|
||||||
|
<el-form-item label="字段toEN">
|
||||||
|
<el-input v-model="form.ForeignKeyEnText" placeholder="请输入数据库字段toEN" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col v-show="title !== '复制'" :span="24">
|
<el-col v-show="title !== '复制'" :span="24">
|
||||||
@@ -643,6 +691,7 @@
|
|||||||
height="100"
|
height="100"
|
||||||
>
|
>
|
||||||
<el-table-column prop="Code" label="字段名" min-width="120px" :show-overflow-tooltip="true" />
|
<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="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 prop="ValueCN" label="字段中文" min-width="120px" :show-overflow-tooltip="true" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -821,10 +870,13 @@ export default {
|
|||||||
ListName: null,
|
ListName: null,
|
||||||
IsFixedColumn: false,
|
IsFixedColumn: false,
|
||||||
FixedColumnName: null,
|
FixedColumnName: null,
|
||||||
|
FixedColumnEnName: null,
|
||||||
ColumnName: null,
|
ColumnName: null,
|
||||||
|
ColumnEnName: null,
|
||||||
ColumnValue: null,
|
ColumnValue: null,
|
||||||
IsMerge: false,
|
IsMerge: false,
|
||||||
MergeColumnName: null,
|
MergeColumnName: null,
|
||||||
|
MergeColumnEnName: null,
|
||||||
IsPicture: false,
|
IsPicture: false,
|
||||||
IsDynamicTranslate: false,
|
IsDynamicTranslate: false,
|
||||||
IsNeedTransalate: false,
|
IsNeedTransalate: false,
|
||||||
@@ -1097,6 +1149,7 @@ export default {
|
|||||||
IsShowParent: 0,
|
IsShowParent: 0,
|
||||||
Sort: 0,
|
Sort: 0,
|
||||||
Code: null,
|
Code: null,
|
||||||
|
CodeEn: null,
|
||||||
Value: null,
|
Value: null,
|
||||||
ValueCN: null,
|
ValueCN: null,
|
||||||
EnumType: '',
|
EnumType: '',
|
||||||
@@ -1111,6 +1164,7 @@ export default {
|
|||||||
IsSpecialType: false,
|
IsSpecialType: false,
|
||||||
DataType: '',
|
DataType: '',
|
||||||
ChildDataLabel: null,
|
ChildDataLabel: null,
|
||||||
|
ChildDataEnLabel: null,
|
||||||
ChildDataValue: null,
|
ChildDataValue: null,
|
||||||
DateType: null,
|
DateType: null,
|
||||||
DictionaryCode: null,
|
DictionaryCode: null,
|
||||||
@@ -1118,6 +1172,7 @@ export default {
|
|||||||
ForeignKeyTableName: null,
|
ForeignKeyTableName: null,
|
||||||
ForeignKeyValue: null,
|
ForeignKeyValue: null,
|
||||||
ForeignKeyText: null,
|
ForeignKeyText: null,
|
||||||
|
ForeignKeyEnText: null,
|
||||||
TableConfigList: [],
|
TableConfigList: [],
|
||||||
UrlConfig: {
|
UrlConfig: {
|
||||||
RoutePath: null,
|
RoutePath: null,
|
||||||
|
|||||||
@@ -14,11 +14,17 @@
|
|||||||
</el-form-item>
|
</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-input v-model="form.SiteName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 中心名称(CN) -->
|
<!-- 中心名称(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-input v-model="form.SiteNameCN" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@@ -46,7 +52,7 @@
|
|||||||
v-model="form.HospitalId"
|
v-model="form.HospitalId"
|
||||||
clearable
|
clearable
|
||||||
placeholder="Please select"
|
placeholder="Please select"
|
||||||
style="width:100%;"
|
style="width: 100%"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in hospitalList"
|
v-for="item in hospitalList"
|
||||||
@@ -73,10 +79,22 @@
|
|||||||
<el-input v-model="form.ContactPhone" />
|
<el-input v-model="form.ContactPhone" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</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-form-item>
|
||||||
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancel">Cancel</el-button>
|
<el-button
|
||||||
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">Save</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>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -91,8 +109,8 @@ export default {
|
|||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return {}
|
return {}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -111,50 +129,42 @@ export default {
|
|||||||
ContactName: '',
|
ContactName: '',
|
||||||
ContactPhone: '',
|
ContactPhone: '',
|
||||||
UniqueCode: '',
|
UniqueCode: '',
|
||||||
Address: ''
|
Address: '',
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
SiteName: [
|
SiteName: [
|
||||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||||
{ max: 50, message: 'The maximum length is 50' }
|
// { max: 50, message: 'The maximum length is 50' }
|
||||||
],
|
],
|
||||||
SiteNameCN: [
|
SiteNameCN: [
|
||||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||||
{ max: 50, message: 'The maximum length is 50' }
|
// { max: 50, message: 'The maximum length is 50' }
|
||||||
],
|
],
|
||||||
SiteCode: [
|
SiteCode: [
|
||||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||||
{ max: 50, message: 'The maximum length is 50' }
|
{ max: 50, message: 'The maximum length is 50' },
|
||||||
],
|
],
|
||||||
Country: [
|
Country: [
|
||||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||||
{ max: 50, message: 'The maximum length is 50' }
|
{ max: 50, message: 'The maximum length is 50' },
|
||||||
],
|
],
|
||||||
City: [
|
City: [
|
||||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||||
{ max: 50, message: 'The maximum length is 50' }
|
{ max: 50, message: 'The maximum length is 50' },
|
||||||
],
|
],
|
||||||
// HospitalId: [
|
// HospitalId: [
|
||||||
// { required: true, message: 'Please specify', trigger: 'blur' }
|
// { required: true, message: 'Please specify', trigger: 'blur' }
|
||||||
// ],
|
// ],
|
||||||
Address: [
|
Address: [
|
||||||
{ required: true, message: 'Please specify', trigger: 'blur' }
|
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
DirectorName: [
|
DirectorName: [{ max: 50, message: 'The maximum length is 50' }],
|
||||||
{ 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' }],
|
||||||
DirectorPhone: [
|
ContactPhone: [{ max: 50, message: 'The maximum length is 50' }],
|
||||||
{ 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,
|
loading: false,
|
||||||
show: false
|
show: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -163,20 +173,22 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs.siteForm.validate(valid => {
|
this.$refs.siteForm.validate((valid) => {
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
this.btnLoading = true
|
this.btnLoading = true
|
||||||
addOrUpdateSite(this.form).then(res => {
|
addOrUpdateSite(this.form)
|
||||||
this.btnLoading = false
|
.then((res) => {
|
||||||
if (res.IsSuccess) {
|
this.btnLoading = false
|
||||||
this.$message.success('Saved successfully')
|
if (res.IsSuccess) {
|
||||||
this.$refs['siteForm'].resetFields()
|
this.$message.success('Saved successfully')
|
||||||
this.$emit('getList')
|
this.$refs['siteForm'].resetFields()
|
||||||
this.$emit('close')
|
this.$emit('getList')
|
||||||
}
|
this.$emit('close')
|
||||||
}).catch(() => {
|
}
|
||||||
this.btnLoading = false
|
})
|
||||||
})
|
.catch(() => {
|
||||||
|
this.btnLoading = false
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
@@ -189,8 +201,7 @@ export default {
|
|||||||
if (Object.keys(this.data).length && this.data.Id) {
|
if (Object.keys(this.data).length && this.data.Id) {
|
||||||
this.form = { ...this.data }
|
this.form = { ...this.data }
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -213,7 +213,6 @@ export default {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.list = res.Result
|
this.list = res.Result
|
||||||
console.log(this.$d.GlobalAssessType)
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
@@ -265,7 +264,7 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style lang="scss" scoped>
|
||||||
/deep/ .el-form-item__content{
|
/deep/ .el-form-item__content{
|
||||||
width: calc(100% - 110px);
|
width: calc(100% - 110px);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div>
|
<div>
|
||||||
<el-radio-group v-model="scope.row.CrterionDictionaryGroup" @change="(v) => {crterionDictionaryGroupChange(v, scope.row)}" size="mini">
|
<el-radio-group v-model="scope.row.CrterionDictionaryGroup" @change="(v) => {crterionDictionaryGroupChange(v, scope.row)}" size="mini">
|
||||||
<el-radio-button v-for="item of $d.CrterionDictionaryGroup" :label="item.value">{{item.label}}</el-radio-button>
|
<el-radio-button v-for="item of $d.CrterionDictionaryGroup" :label="item.value" :key="item.id">{{item.label}}</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -158,7 +158,6 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList()
|
this.getList()
|
||||||
console.log(this.$d[this.parentCode])
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
crterionDictionaryGroupChange(v, row) {
|
crterionDictionaryGroupChange(v, row) {
|
||||||
@@ -231,7 +230,7 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style lang="scss" scoped>
|
||||||
/deep/ .el-form-item__content{
|
/deep/ .el-form-item__content{
|
||||||
width: calc(100% - 110px);
|
width: calc(100% - 110px);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,14 +13,14 @@
|
|||||||
{{ question.GroupName }}
|
{{ question.GroupName }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-else-if="question.Type==='table'"
|
v-else-if="question.Type==='table' || question.Type==='basicTable'"
|
||||||
style="font-weight: bold;font-size: 14px;margin: 5px 0px;"
|
style="font-weight: bold;font-size: 14px;margin: 5px 0px;"
|
||||||
>
|
>
|
||||||
{{ question.QuestionName }}
|
{{ question.QuestionName }}
|
||||||
</div>
|
</div>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="(question.ShowQuestion===1 && question.ParentTriggerValueList.includes(questionForm[question.ParentId])) || question.ShowQuestion===0"
|
v-if="(question.ShowQuestion===1 && question.ParentTriggerValueList.includes(String(questionForm[question.ParentId]))) || question.ShowQuestion===0"
|
||||||
:label="`${question.QuestionName}`"
|
:label="`${question.QuestionName}`"
|
||||||
:prop="question.Id"
|
:prop="question.Id"
|
||||||
:rules="[
|
:rules="[
|
||||||
@@ -139,14 +139,29 @@
|
|||||||
/>
|
/>
|
||||||
<!-- 数值 -->
|
<!-- 数值 -->
|
||||||
<!-- :precision="2" :step="0.1" :max="10" -->
|
<!-- :precision="2" :step="0.1" :max="10" -->
|
||||||
<el-input-number
|
<!-- <el-input-number
|
||||||
v-if="question.Type==='number'"
|
v-if="question.Type==='number'"
|
||||||
v-model="questionForm[question.Id]"
|
v-model="questionForm[question.Id]"
|
||||||
|
/> -->
|
||||||
|
<el-input
|
||||||
|
v-if="question.Type==='number'"
|
||||||
|
v-model="questionForm[question.Id]"
|
||||||
|
type="number"
|
||||||
|
:disabled="question.DataSource === 1"
|
||||||
|
>
|
||||||
|
<template v-if="question.Unit" slot="append">{{$fd('ValueUnit', question.Unit)}}</template>
|
||||||
|
</el-input>
|
||||||
|
<!-- 自动分类 -->
|
||||||
|
<el-input
|
||||||
|
v-if="question.Type==='calss'"
|
||||||
|
v-model="questionForm[question.Id]"
|
||||||
|
disabled
|
||||||
/>
|
/>
|
||||||
<!-- 上传图像 -->
|
<!-- 上传图像 -->
|
||||||
<el-upload
|
<el-upload
|
||||||
v-if="question.Type==='upload'"
|
v-if="question.Type==='upload'"
|
||||||
:action="accept"
|
action
|
||||||
|
:accept="question.FileType"
|
||||||
:limit="question.ImageCount"
|
:limit="question.ImageCount"
|
||||||
:on-preview="handlePictureCardPreview"
|
:on-preview="handlePictureCardPreview"
|
||||||
:before-upload="handleBeforeUpload"
|
:before-upload="handleBeforeUpload"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -107,7 +107,7 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
prop="IsShowInDicom"
|
prop="IsShowInDicom"
|
||||||
label="是否在阅片页面显示"
|
label="是否在阅片页面显示"
|
||||||
width="140"
|
width="150"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -115,13 +115,13 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 注释 -->
|
<!-- 注释 -->
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
prop="Remark"
|
prop="Remark"
|
||||||
:label="$t('trials:readingUnit:qsList:title:Remark')"
|
:label="$t('trials:readingUnit:qsList:title:Remark')"
|
||||||
width="140"
|
width="140"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="GlobalReadingShowType"
|
prop="GlobalReadingShowType"
|
||||||
label="是否在全局阅片显示"
|
label="是否在全局阅片显示"
|
||||||
@@ -132,6 +132,39 @@
|
|||||||
{{ $fd('GlobalReadingShowType', scope.row.GlobalReadingShowType) }}
|
{{ $fd('GlobalReadingShowType', scope.row.GlobalReadingShowType) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<!-- 导出标识 -->
|
||||||
|
<!-- <el-table-column
|
||||||
|
prop="ExportIdentification"
|
||||||
|
:label="$t('trials:readingUnit:qsList:title:ExportIdentification')"
|
||||||
|
width="160"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ $fd('ExportIdentification', scope.row.ExportIdentification) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<!-- 问题标识 -->
|
||||||
|
<el-table-column
|
||||||
|
prop="QuestionType"
|
||||||
|
label="问题标识"
|
||||||
|
width="140"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ $fd('QuestionType', scope.row.QuestionType) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- 导出目标表格 -->
|
||||||
|
<el-table-column
|
||||||
|
prop="ExportResult"
|
||||||
|
:label="$t('trials:readingUnit:qsList:title:ExportResult')"
|
||||||
|
width="160"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ getStringResult(scope.row.ExportResult, 'ExportResult') }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<!-- 限制编辑 -->
|
<!-- 限制编辑 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="LimitEdit"
|
prop="LimitEdit"
|
||||||
@@ -170,7 +203,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
:disabled="scope.row.Type !== 'table'"
|
:disabled="!(scope.row.Type === 'table' || scope.row.Type === 'basicTable')"
|
||||||
@click="handleConfig(scope.row)"
|
@click="handleConfig(scope.row)"
|
||||||
>
|
>
|
||||||
表格问题
|
表格问题
|
||||||
@@ -201,7 +234,7 @@
|
|||||||
:visible.sync="addOrEdit.visible"
|
:visible.sync="addOrEdit.visible"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:title="`${addOrEdit.title}`"
|
:title="`${addOrEdit.title}`"
|
||||||
width="600px"
|
width="650px"
|
||||||
append-to-body
|
append-to-body
|
||||||
custom-class="base-dialog-wrapper"
|
custom-class="base-dialog-wrapper"
|
||||||
>
|
>
|
||||||
@@ -209,6 +242,8 @@
|
|||||||
ref="addOrEdit"
|
ref="addOrEdit"
|
||||||
:data="rowData"
|
:data="rowData"
|
||||||
:type="type"
|
:type="type"
|
||||||
|
:criterionType="data.CriterionType"
|
||||||
|
:criterionId="data.Id"
|
||||||
@close="addOrEdit.visible = false"
|
@close="addOrEdit.visible = false"
|
||||||
@getList="getList"
|
@getList="getList"
|
||||||
/>
|
/>
|
||||||
@@ -241,6 +276,7 @@
|
|||||||
>
|
>
|
||||||
<TableQsList
|
<TableQsList
|
||||||
:criterion-id="criterionId"
|
:criterion-id="criterionId"
|
||||||
|
:criterionType="data.CriterionType"
|
||||||
:reading-question-id="rowData.Id"
|
:reading-question-id="rowData.Id"
|
||||||
:is-complete-config="data.IsCompleteConfig"
|
:is-complete-config="data.IsCompleteConfig"
|
||||||
:lesion-type="rowData.LesionType"
|
:lesion-type="rowData.LesionType"
|
||||||
@@ -316,7 +352,7 @@ export default {
|
|||||||
}).catch(() => { this.loading = false })
|
}).catch(() => { this.loading = false })
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.rowData = { ReadingQuestionCriterionSystemId: this.criterionId, Id: '' }
|
this.rowData = { ReadingQuestionCriterionSystemId: this.criterionId, Id: ''}
|
||||||
this.type = 'add'
|
this.type = 'add'
|
||||||
this.addOrEdit.title = '添加'
|
this.addOrEdit.title = '添加'
|
||||||
this.addOrEdit.visible = true
|
this.addOrEdit.visible = true
|
||||||
@@ -355,6 +391,11 @@ export default {
|
|||||||
this.config.title = `${this.$fd('LesionType', row.LesionType)}:${this.$t('trials:readingUnit:qsList:title:tableQs')}`
|
this.config.title = `${this.$fd('LesionType', row.LesionType)}:${this.$t('trials:readingUnit:qsList:title:tableQs')}`
|
||||||
this.config.visible = true
|
this.config.visible = true
|
||||||
},
|
},
|
||||||
|
getStringResult(arr, dictionaryCode) {
|
||||||
|
let newArr = arr.map(i => this.$fd(dictionaryCode, i))
|
||||||
|
let delimiter = this.$i18n.locale === 'zh' ? ',' : ', '
|
||||||
|
return newArr.join(delimiter)
|
||||||
|
},
|
||||||
// 查询
|
// 查询
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.getList()
|
this.getList()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-loading="loading" style="min-height:400px;">
|
<div v-loading="loading" style="min-height:400px;padding:20px">
|
||||||
<el-form
|
<el-form
|
||||||
v-if="isRender"
|
v-if="isRender"
|
||||||
ref="questions"
|
ref="questions"
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
>{{ item.label }}</el-radio>
|
>{{ item.label }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="序号">
|
<el-form-item label="序号" prop="ShowOrder">
|
||||||
<el-input v-model="form.ShowOrder" type="number" />
|
<el-input v-model="form.ShowOrder" type="number" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 描述 -->
|
<!-- 描述 -->
|
||||||
@@ -135,7 +135,8 @@ export default {
|
|||||||
Part: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] }],
|
Part: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] }],
|
||||||
TULOC: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] }],
|
TULOC: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] }],
|
||||||
Remark: [{ max: 500, message: `${this.$t('common:ruleMessage:maxLength')} 500`, trigger: ['blur', 'change'] }],
|
Remark: [{ max: 500, message: `${this.$t('common:ruleMessage:maxLength')} 500`, trigger: ['blur', 'change'] }],
|
||||||
IsLymphNodes: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] }]
|
IsLymphNodes: [{ required: true, message: this.$t('common:ruleMessage:select'), trigger: ['blur'] }],
|
||||||
|
ShowOrder: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] }]
|
||||||
},
|
},
|
||||||
lesionTypes: [],
|
lesionTypes: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<el-form :inline="true" size="mini">
|
<el-form :inline="true" size="mini">
|
||||||
<el-form-item label="器官类型">
|
<el-form-item label="器官类型">
|
||||||
<el-select v-model="searchData.OrganType" clearable style="width:130px;">
|
<el-select v-model="searchData.OrganType" clearable style="width:130px;">
|
||||||
<el-option v-for="item of CriterionDictionaryOrganTypeList.OrganType" :key="item.Id" :value="parseInt(item.Code)" :label="item.ValueCN" />
|
<el-option v-for="item of CriterionDictionaryOrganTypeList && CriterionDictionaryOrganTypeList.OrganType" :key="item.Id" :value="parseInt(item.Code)" :label="item.ValueCN" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="部位">
|
<el-form-item label="部位">
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -27,12 +27,12 @@
|
|||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="QuestionName"
|
prop="QuestionName"
|
||||||
label="名称"
|
label="问题名称"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="QuestionEnName"
|
prop="QuestionEnName"
|
||||||
label="名称(EN)"
|
label="问题名称(EN)"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
{{ $fd('Criterion_Question_Type',scope.row.Type) }}
|
{{ $fd('Criterion_Question_Type',scope.row.Type) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
prop="TableQuestionType"
|
prop="TableQuestionType"
|
||||||
label="选项类型"
|
label="选项类型"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
@@ -60,20 +60,7 @@
|
|||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
min-width="110"
|
min-width="110"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
-->
|
||||||
prop="DependShowOrder"
|
|
||||||
label="关联问题"
|
|
||||||
show-overflow-tooltip
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="DataTableColumn"
|
|
||||||
label="关联字段"
|
|
||||||
show-overflow-tooltip
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ $fd('OrganColumn',scope.row.DataTableColumn) }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="ShowQuestion"
|
prop="ShowQuestion"
|
||||||
label="是否显示"
|
label="是否显示"
|
||||||
@@ -94,7 +81,7 @@
|
|||||||
{{ $fd('QuestionRequired',scope.row.IsRequired) }}
|
{{ $fd('QuestionRequired',scope.row.IsRequired) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
prop="IsJudgeQuestion"
|
prop="IsJudgeQuestion"
|
||||||
label="是否裁判问题"
|
label="是否裁判问题"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
@@ -102,8 +89,8 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd('YesOrNo',scope.row.IsJudgeQuestion) }}
|
{{ $fd('YesOrNo',scope.row.IsJudgeQuestion) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
prop="ParentQuestionShowOrder"
|
prop="ParentQuestionShowOrder"
|
||||||
label="显示依赖父问题"
|
label="显示依赖父问题"
|
||||||
min-width="90"
|
min-width="90"
|
||||||
@@ -124,8 +111,64 @@
|
|||||||
prop="RelevanceValue"
|
prop="RelevanceValue"
|
||||||
label="必填触发值"
|
label="必填触发值"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
|
/> -->
|
||||||
|
<!-- 导出标识 -->
|
||||||
|
<!-- <el-table-column
|
||||||
|
prop="ExportIdentification"
|
||||||
|
:label="$t('trials:readingUnit:qsList:title:ExportIdentification')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ $fd('ExportIdentification', scope.row.ExportIdentification) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<!-- 问题标识 -->
|
||||||
|
<el-table-column
|
||||||
|
prop="QuestionMark"
|
||||||
|
label="问题标识"
|
||||||
|
width="140"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ $fd('QuestionMark', scope.row.QuestionMark) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- 导出目标表格 -->
|
||||||
|
<el-table-column
|
||||||
|
prop="ExportResult"
|
||||||
|
:label="$t('trials:readingUnit:qsList:title:ExportResult')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ getStringResult(scope.row.ExportResult, 'ExportResult') }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- 限制编辑 -->
|
||||||
|
<el-table-column
|
||||||
|
prop="LimitEdit"
|
||||||
|
:label="$t('trials:readingUnit:qsList:title:limitEdit')"
|
||||||
|
width="160"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ $fd('LimitEdit', scope.row.LimitEdit) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- <el-table-column
|
||||||
|
prop="DependShowOrder"
|
||||||
|
label="关联问题"
|
||||||
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
prop="DataTableColumn"
|
||||||
|
label="关联字段"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ $fd('OrganColumn',scope.row.DataTableColumn) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
|
<!-- <el-table-column
|
||||||
prop="ImageCount"
|
prop="ImageCount"
|
||||||
label="最大上传个数"
|
label="最大上传个数"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
@@ -134,6 +177,7 @@
|
|||||||
{{ scope.row.Type === 'upload'?scope.row.ImageCount:'' }}
|
{{ scope.row.Type === 'upload'?scope.row.ImageCount:'' }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="MaxRowCount"
|
prop="MaxRowCount"
|
||||||
label="最大行数"
|
label="最大行数"
|
||||||
@@ -184,7 +228,7 @@
|
|||||||
:visible.sync="addOrEdit.visible"
|
:visible.sync="addOrEdit.visible"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:title="addOrEdit.title"
|
:title="addOrEdit.title"
|
||||||
width="600px"
|
width="650px"
|
||||||
append-to-body
|
append-to-body
|
||||||
custom-class="base-dialog-wrapper"
|
custom-class="base-dialog-wrapper"
|
||||||
>
|
>
|
||||||
@@ -194,6 +238,7 @@
|
|||||||
:type="type"
|
:type="type"
|
||||||
:reading-question-id="readingQuestionId"
|
:reading-question-id="readingQuestionId"
|
||||||
:criterion-id="criterionId"
|
:criterion-id="criterionId"
|
||||||
|
:criterionType="criterionType"
|
||||||
@close="addOrEdit.visible = false"
|
@close="addOrEdit.visible = false"
|
||||||
@getList="getList"
|
@getList="getList"
|
||||||
/>
|
/>
|
||||||
@@ -225,7 +270,11 @@ export default {
|
|||||||
criterionId: {
|
criterionId: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
}
|
},
|
||||||
|
criterionType: {
|
||||||
|
type: Number,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -285,6 +334,11 @@ export default {
|
|||||||
}).catch(() => { this.loading = false })
|
}).catch(() => { this.loading = false })
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getStringResult(arr, dictionaryCode) {
|
||||||
|
let newArr = arr.map(i => this.$fd(dictionaryCode, i))
|
||||||
|
let delimiter = this.$i18n.locale === 'zh' ? ',' : ', '
|
||||||
|
return newArr.join(delimiter)
|
||||||
|
},
|
||||||
// 查询
|
// 查询
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.getList()
|
this.getList()
|
||||||
|
|||||||
@@ -23,6 +23,17 @@
|
|||||||
<el-input style="width: 300px" v-model="form.EmailTopic" />
|
<el-input style="width: 300px" v-model="form.EmailTopic" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="邮件延时发送s数" prop="EmailDelaySeconds">
|
||||||
|
<el-input
|
||||||
|
v-model.number="form.EmailDelaySeconds"
|
||||||
|
style="width: 300px"
|
||||||
|
type="number"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="业务层级" prop="BusinessLevelEnum">
|
<el-form-item label="业务层级" prop="BusinessLevelEnum">
|
||||||
<el-select v-model="form.BusinessLevelEnum" clearable class="mr">
|
<el-select v-model="form.BusinessLevelEnum" clearable class="mr">
|
||||||
@@ -59,7 +70,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if="systemLevel !== 1">
|
<el-col :span="12">
|
||||||
<el-form-item label="收件人" prop="ToUserTypeList">
|
<el-form-item label="收件人" prop="ToUserTypeList">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.ToUserTypeList"
|
v-model="form.ToUserTypeList"
|
||||||
@@ -76,7 +87,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if="!systemLevel">
|
<el-col :span="12">
|
||||||
<el-form-item label="抄送人" prop="CopyUserTypeList">
|
<el-form-item label="抄送人" prop="CopyUserTypeList">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.CopyUserTypeList"
|
v-model="form.CopyUserTypeList"
|
||||||
@@ -93,13 +104,13 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if="!systemLevel">
|
<el-col :span="12">
|
||||||
<el-form-item label="加急状态" prop="EmailUrgentEnum">
|
<el-form-item label="加急状态" prop="EmailUrgentEnum">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.EmailUrgentEnum"
|
v-model="form.EmailUrgentEnum"
|
||||||
@change="
|
@change="
|
||||||
(v) => {
|
(v) => {
|
||||||
v === 1 ? (form.EmailCron = null) : null;
|
v === 1 ? (form.EmailCron = null) : null
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
clearable
|
clearable
|
||||||
@@ -114,7 +125,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if="!systemLevel">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="发送周期和时间"
|
label="发送周期和时间"
|
||||||
v-if="form.EmailUrgentEnum !== 1"
|
v-if="form.EmailUrgentEnum !== 1"
|
||||||
@@ -124,7 +135,7 @@
|
|||||||
<el-button type="primary" @click="showDialog">生成 cron</el-button>
|
<el-button type="primary" @click="showDialog">生成 cron</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if="!systemLevel">
|
<el-col :span="12">
|
||||||
<el-form-item label="是否需要回执" prop="IsReturnRequired">
|
<el-form-item label="是否需要回执" prop="IsReturnRequired">
|
||||||
<el-radio-group v-model="form.IsReturnRequired">
|
<el-radio-group v-model="form.IsReturnRequired">
|
||||||
<el-radio :label="true">是</el-radio>
|
<el-radio :label="true">是</el-radio>
|
||||||
@@ -132,7 +143,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if="!systemLevel">
|
<el-col :span="12">
|
||||||
<el-form-item label="是否自动发送" prop="IsAutoSend">
|
<el-form-item label="是否自动发送" prop="IsAutoSend">
|
||||||
<el-radio-group v-model="form.IsAutoSend">
|
<el-radio-group v-model="form.IsAutoSend">
|
||||||
<el-radio :label="true">是</el-radio>
|
<el-radio :label="true">是</el-radio>
|
||||||
@@ -140,13 +151,13 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if="!systemLevel">
|
<el-col :span="12" v-if="systemLevel">
|
||||||
<el-form-item label="是否区分标准" prop="IsDistinguishCriteria">
|
<el-form-item label="是否区分标准" prop="IsDistinguishCriteria">
|
||||||
<el-radio-group
|
<el-radio-group
|
||||||
v-model="form.IsDistinguishCriteria"
|
v-model="form.IsDistinguishCriteria"
|
||||||
@change="
|
@change="
|
||||||
() => {
|
() => {
|
||||||
form.CriterionTypeEnum = null;
|
form.CriterionTypeEnum = null
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
@@ -155,7 +166,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if="!systemLevel">
|
<el-col :span="12">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('trials:auditRecord:table:criterion')"
|
:label="$t('trials:auditRecord:table:criterion')"
|
||||||
v-if="form.IsDistinguishCriteria"
|
v-if="form.IsDistinguishCriteria"
|
||||||
@@ -171,7 +182,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if="!systemLevel">
|
<el-col :span="12">
|
||||||
<el-form-item label="是否启用" prop="IsEnable">
|
<el-form-item label="是否启用" prop="IsEnable">
|
||||||
<el-radio-group v-model="form.IsEnable">
|
<el-radio-group v-model="form.IsEnable">
|
||||||
<el-radio :label="true">是</el-radio>
|
<el-radio :label="true">是</el-radio>
|
||||||
@@ -179,7 +190,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if="!systemLevel">
|
<el-col :span="12">
|
||||||
<el-form-item label="附件(CN)" prop="IsEnable">
|
<el-form-item label="附件(CN)" prop="IsEnable">
|
||||||
<el-upload
|
<el-upload
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
@@ -196,12 +207,12 @@
|
|||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
:disabled="fileListCN.length > 0"
|
:disabled="fileListCN.length > 0"
|
||||||
>{{ $t("common:button:upload") }}</el-button
|
>{{ $t('common:button:upload') }}</el-button
|
||||||
>
|
>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if="!systemLevel">
|
<el-col :span="12">
|
||||||
<el-form-item label="附件(EN)" prop="IsEnable">
|
<el-form-item label="附件(EN)" prop="IsEnable">
|
||||||
<el-upload
|
<el-upload
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
@@ -218,25 +229,49 @@
|
|||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
:disabled="fileListEN.length > 0"
|
:disabled="fileListEN.length > 0"
|
||||||
>{{ $t("common:button:upload") }}</el-button
|
>{{ $t('common:button:upload') }}</el-button
|
||||||
>
|
>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-form-item label="邮件内容模版(CN)" prop="EmailHtmlContentCN">
|
<el-form-item
|
||||||
|
label="邮件内容模版(CN)"
|
||||||
|
prop="EmailHtmlContentCN"
|
||||||
|
style="position: relative"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.EmailHtmlContentCN"
|
v-model="form.EmailHtmlContentCN"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:autosize="{ minRows: 8, maxRows: 8 }"
|
:autosize="{ minRows: 8, maxRows: 8 }"
|
||||||
/>
|
/>
|
||||||
|
<el-button
|
||||||
|
:disabled="!form.EmailHtmlContentCN"
|
||||||
|
type="text"
|
||||||
|
@click="PreviewHTML(form.EmailHtmlContentCN)"
|
||||||
|
style="position: absolute; left: -50px; top: 30px"
|
||||||
|
>
|
||||||
|
{{ $t('common:button:preview') }}
|
||||||
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="邮件内容模版(EN)" prop="EmailHtmlContent">
|
<el-form-item
|
||||||
|
label="邮件内容模版(EN)"
|
||||||
|
prop="EmailHtmlContent"
|
||||||
|
style="position: relative"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.EmailHtmlContent"
|
v-model="form.EmailHtmlContent"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
:autosize="{ minRows: 8, maxRows: 8 }"
|
:autosize="{ minRows: 8, maxRows: 8 }"
|
||||||
/>
|
/>
|
||||||
|
<el-button
|
||||||
|
:disabled="!form.EmailHtmlContent"
|
||||||
|
type="text"
|
||||||
|
@click="PreviewHTML(form.EmailHtmlContent)"
|
||||||
|
style="position: absolute; left: -50px; top: 30px"
|
||||||
|
>
|
||||||
|
{{ $t('common:button:preview') }}
|
||||||
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div
|
<div
|
||||||
class="base-dialog-footer"
|
class="base-dialog-footer"
|
||||||
@@ -259,219 +294,234 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { Upload, addOrUpdateEmailNoticeConfigList } from "@/api/dictionary";
|
import { Upload, addOrUpdateEmailNoticeConfigList } from '@/api/dictionary'
|
||||||
|
import vcrontab from 'vcrontab'
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default() {
|
default() {
|
||||||
return {};
|
return {}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
systemLevel: {
|
systemLevel: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default() {
|
default() {
|
||||||
return 0;
|
return 0
|
||||||
|
},
|
||||||
|
},
|
||||||
|
isDistinguishCriteria: {
|
||||||
|
type: Boolean,
|
||||||
|
default() {
|
||||||
|
return false
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
components: { vcrontab },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
expression: "",
|
expression: '',
|
||||||
showCron: false,
|
showCron: false,
|
||||||
form: {
|
form: {
|
||||||
Id: "",
|
Id: '',
|
||||||
Code: "",
|
Code: '',
|
||||||
EmailTopicCN: "",
|
EmailTopicCN: '',
|
||||||
EmailTopic: "",
|
EmailTopic: '',
|
||||||
BusinessLevelEnum: "",
|
BusinessLevelEnum: '',
|
||||||
BusinessModuleEnum: "",
|
BusinessModuleEnum: '',
|
||||||
ToUserTypeList: "",
|
ToUserTypeList: '',
|
||||||
CopyUserTypeList: "",
|
CopyUserTypeList: '',
|
||||||
EmailUrgentEnum: "",
|
EmailUrgentEnum: '',
|
||||||
EmailCron: "",
|
EmailCron: '',
|
||||||
BusinessScenarioEnum: null,
|
BusinessScenarioEnum: null,
|
||||||
EmailHtmlContentCN: "",
|
EmailHtmlContentCN: '',
|
||||||
EmailHtmlContent: "",
|
EmailHtmlContent: '',
|
||||||
AttachPath: "",
|
AttachPath: '',
|
||||||
AttachName: "",
|
AttachName: '',
|
||||||
AttachNameCN: "",
|
AttachNameCN: '',
|
||||||
AttachCNPath: "",
|
AttachCNPath: '',
|
||||||
IsDistinguishCriteria: true,
|
IsDistinguishCriteria: true,
|
||||||
IsReturnRequired: true,
|
IsReturnRequired: true,
|
||||||
IsUrgent: true,
|
IsUrgent: true,
|
||||||
IsEnable: true,
|
IsEnable: true,
|
||||||
IsAutoSend: true,
|
IsAutoSend: true,
|
||||||
CriterionTypeEnum: null,
|
CriterionTypeEnum: null,
|
||||||
|
EmailDelaySeconds: null,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
Code: [{ required: true, message: "Please select", trigger: ["blur"] }],
|
Code: [{ required: true, message: 'Please select', trigger: ['blur'] }],
|
||||||
BusinessScenarioEnum: [
|
BusinessScenarioEnum: [
|
||||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
{ required: true, message: 'Please select', trigger: ['blur'] },
|
||||||
],
|
],
|
||||||
EmailTopicCN: [
|
EmailTopicCN: [
|
||||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
{ required: true, message: 'Please select', trigger: ['blur'] },
|
||||||
],
|
],
|
||||||
EmailTopic: [
|
EmailTopic: [
|
||||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
{ required: true, message: 'Please select', trigger: ['blur'] },
|
||||||
],
|
],
|
||||||
BusinessLevelEnum: [
|
BusinessLevelEnum: [
|
||||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
{ required: true, message: 'Please select', trigger: ['blur'] },
|
||||||
],
|
|
||||||
ToUserTypeList: [
|
|
||||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
|
||||||
],
|
|
||||||
EmailCron: [
|
|
||||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
|
||||||
],
|
],
|
||||||
|
// ToUserTypeList: [
|
||||||
|
// { required: true, message: 'Please select', trigger: ['blur'] },
|
||||||
|
// ],
|
||||||
|
// EmailCron: [
|
||||||
|
// { required: true, message: 'Please select', trigger: ['blur'] },
|
||||||
|
// ],
|
||||||
EmailUrgentEnum: [
|
EmailUrgentEnum: [
|
||||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
{ required: true, message: 'Please select', trigger: ['blur'] },
|
||||||
],
|
],
|
||||||
EmailHtmlContentCN: [
|
EmailHtmlContentCN: [
|
||||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
{ required: true, message: 'Please select', trigger: ['blur'] },
|
||||||
],
|
],
|
||||||
EmailHtmlContent: [
|
EmailHtmlContent: [
|
||||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
{ required: true, message: 'Please select', trigger: ['blur'] },
|
||||||
],
|
],
|
||||||
CriterionTypeEnum: [
|
CriterionTypeEnum: [
|
||||||
{ required: true, message: "Please select", trigger: ["blur"] },
|
{ required: true, message: 'Please select', trigger: ['blur'] },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
scenarioOption: [],
|
scenarioOption: [],
|
||||||
fileListCN: [],
|
fileListCN: [],
|
||||||
fileListEN: [],
|
fileListEN: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initForm();
|
this.initForm()
|
||||||
if (this.systemLevel) {
|
if (this.systemLevel) {
|
||||||
if (this.systemLevel === 1) {
|
if (this.systemLevel === 1) {
|
||||||
this.form.ToUserTypeList = [];
|
this.form.ToUserTypeList = []
|
||||||
}
|
}
|
||||||
this.form.CopyUserTypeList = [];
|
this.form.CopyUserTypeList = []
|
||||||
this.form.EmailUrgentEnum = "3";
|
this.form.EmailUrgentEnum = 3
|
||||||
this.form.IsReturnRequired = false;
|
this.form.IsReturnRequired = false
|
||||||
this.form.IsDistinguishCriteria = false;
|
this.form.IsDistinguishCriteria = false
|
||||||
|
} else {
|
||||||
|
this.form.IsDistinguishCriteria = this.isDistinguishCriteria
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showDialog() {
|
showDialog() {
|
||||||
this.expression = this.form.EmailCron; //传入的 cron 表达式,可以反解析到 UI 上
|
this.expression = this.form.EmailCron //传入的 cron 表达式,可以反解析到 UI 上
|
||||||
this.showCron = true;
|
this.showCron = true
|
||||||
},
|
},
|
||||||
crontabFill(value) {
|
crontabFill(value) {
|
||||||
this.form.EmailCron = value;
|
this.form.EmailCron = value
|
||||||
},
|
},
|
||||||
handleRemoveFileCN() {
|
handleRemoveFileCN() {
|
||||||
this.form.AttachNameCN = null;
|
this.form.AttachNameCN = null
|
||||||
this.form.AttachCNPath = null;
|
this.form.AttachCNPath = null
|
||||||
this.fileListCN = [];
|
this.fileListCN = []
|
||||||
},
|
},
|
||||||
beforeUploadCN() {
|
beforeUploadCN() {
|
||||||
if (this.fileListCN.length > 0) {
|
if (this.fileListCN.length > 0) {
|
||||||
this.$alert("最多只能传一个附件");
|
this.$alert('最多只能传一个附件')
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handlePreviewCN(row, r2) {
|
handlePreviewCN(row, r2) {
|
||||||
if (row.fullPath) {
|
if (row.fullPath) {
|
||||||
window.open(row.fullPath, "_blank");
|
window.open(row.fullPath, '_blank')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleUploadFileCN(param) {
|
handleUploadFileCN(param) {
|
||||||
this.btnLoading = true;
|
this.btnLoading = true
|
||||||
const formData = new FormData();
|
const formData = new FormData()
|
||||||
formData.append("file", param.file);
|
formData.append('file', param.file)
|
||||||
this.form.AttachNameCN = param.file.name;
|
this.form.AttachNameCN = param.file.name
|
||||||
Upload(formData, 3).then((res) => {
|
Upload(formData, 3).then((res) => {
|
||||||
this.form.AttachCNPath = res.Result.FilePath;
|
this.form.AttachCNPath = res.Result.FilePath
|
||||||
this.btnLoading = false;
|
this.btnLoading = false
|
||||||
this.fileListCN.push({
|
this.fileListCN.push({
|
||||||
name: param.file.name,
|
name: param.file.name,
|
||||||
path: res.Result.FilePath,
|
path: res.Result.FilePath,
|
||||||
fullPath: res.Result.FullFilePath,
|
fullPath: res.Result.FullFilePath,
|
||||||
url: res.Result.FilePath,
|
url: res.Result.FilePath,
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleUploadFileEN(param) {
|
handleUploadFileEN(param) {
|
||||||
this.btnLoading = true;
|
this.btnLoading = true
|
||||||
const formData = new FormData();
|
const formData = new FormData()
|
||||||
formData.append("file", param.file);
|
formData.append('file', param.file)
|
||||||
this.form.AttachName = param.file.name;
|
this.form.AttachName = param.file.name
|
||||||
Upload(formData, 3).then((res) => {
|
Upload(formData, 3).then((res) => {
|
||||||
this.form.AttachPath = res.Result.FilePath;
|
this.form.AttachPath = res.Result.FilePath
|
||||||
this.btnLoading = false;
|
this.btnLoading = false
|
||||||
this.fileListEN.push({
|
this.fileListEN.push({
|
||||||
name: param.file.name,
|
name: param.file.name,
|
||||||
path: res.Result.FilePath,
|
path: res.Result.FilePath,
|
||||||
fullPath: res.Result.FullFilePath,
|
fullPath: res.Result.FullFilePath,
|
||||||
url: res.Result.FilePath,
|
url: res.Result.FilePath,
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleRemoveFileEN() {
|
handleRemoveFileEN() {
|
||||||
this.form.AttachName = null;
|
this.form.AttachName = null
|
||||||
this.form.AttachPath = null;
|
this.form.AttachPath = null
|
||||||
this.fileListEN = [];
|
this.fileListEN = []
|
||||||
},
|
},
|
||||||
beforeUploadEN() {
|
beforeUploadEN() {
|
||||||
if (this.fileListEN.length > 0) {
|
if (this.fileListEN.length > 0) {
|
||||||
this.$alert("最多只能传一个附件");
|
this.$alert('最多只能传一个附件')
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handlePreviewEN(row, r2) {
|
handlePreviewEN(row, r2) {
|
||||||
if (row.fullPath) {
|
if (row.fullPath) {
|
||||||
window.open(row.fullPath, "_blank");
|
window.open(row.fullPath, '_blank')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async initForm() {
|
async initForm() {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
// await this.getScenarios()
|
// await this.getScenarios()
|
||||||
for (const k in this.form) {
|
for (const k in this.form) {
|
||||||
if (this.data.hasOwnProperty(k)) {
|
if (this.data.hasOwnProperty(k)) {
|
||||||
this.form[k] = this.data[k];
|
this.form[k] = this.data[k]
|
||||||
}
|
}
|
||||||
if (k === "AttachPath" && this.form[k]) {
|
if (k === 'AttachPath' && this.form[k]) {
|
||||||
this.fileListEN.push({
|
this.fileListEN.push({
|
||||||
name: this.data.AttachName,
|
name: this.data.AttachName,
|
||||||
path: this.data.AttachPath,
|
path: this.data.AttachPath,
|
||||||
fullPath: this.data.AttachPath,
|
fullPath: this.data.AttachPath,
|
||||||
url: this.data.AttachPath,
|
url: this.data.AttachPath,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
if (k === "AttachCNPath" && this.form[k]) {
|
if (k === 'AttachCNPath' && this.form[k]) {
|
||||||
this.fileListCN.push({
|
this.fileListCN.push({
|
||||||
name: this.data.AttachNameCN,
|
name: this.data.AttachNameCN,
|
||||||
path: this.data.AttachCNPath,
|
path: this.data.AttachCNPath,
|
||||||
fullPath: this.data.AttachCNPath,
|
fullPath: this.data.AttachCNPath,
|
||||||
url: this.data.AttachCNPath,
|
url: this.data.AttachCNPath,
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
},
|
},
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs.emailForm.validate((valid) => {
|
this.$refs.emailForm.validate((valid) => {
|
||||||
if (!valid) return;
|
if (!valid) return
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
this.form.systemLevel = this.systemLevel;
|
this.form.systemLevel = this.systemLevel
|
||||||
addOrUpdateEmailNoticeConfigList(this.form)
|
addOrUpdateEmailNoticeConfigList(this.form)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
this.$emit("closeDialog");
|
this.$emit('closeDialog')
|
||||||
this.$emit("getList");
|
this.$emit('getList')
|
||||||
this.$message.success("Saved successfully");
|
this.$message.success('Saved successfully')
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
|
},
|
||||||
|
// 预览模板
|
||||||
|
PreviewHTML(html) {
|
||||||
|
this.$emit('PreviewHTML', html)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,13 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<box-content>
|
<box-content>
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<el-form
|
<el-form :inline="true" size="mini" class="base-search-form">
|
||||||
v-if="!systemLevel"
|
<el-form-item label="是否需要回执:" v-if="!systemLevel">
|
||||||
:inline="true"
|
|
||||||
size="mini"
|
|
||||||
class="base-search-form"
|
|
||||||
>
|
|
||||||
<el-form-item label="是否需要回执:">
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchData.IsReturnRequired"
|
v-model="searchData.IsReturnRequired"
|
||||||
clearable
|
clearable
|
||||||
@@ -21,7 +16,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否加急:">
|
<el-form-item label="是否加急:" v-if="!systemLevel">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchData.IsUrgent"
|
v-model="searchData.IsUrgent"
|
||||||
clearable
|
clearable
|
||||||
@@ -35,7 +30,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否启用:">
|
<el-form-item label="是否启用:" v-if="!systemLevel">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchData.IsEnable"
|
v-model="searchData.IsEnable"
|
||||||
clearable
|
clearable
|
||||||
@@ -51,7 +46,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('trials:auditRecord:table:criterion')"
|
:label="$t('trials:auditRecord:table:criterion')"
|
||||||
v-if="isDistinguishCriteria"
|
v-if="isDistinguishCriteria && !systemLevel"
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="searchData.CriterionTypeEnum"
|
v-model="searchData.CriterionTypeEnum"
|
||||||
@@ -66,12 +61,76 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('trials:emailManageCfg:form:BusinessModule')">
|
||||||
|
<el-select
|
||||||
|
v-model="searchData.BusinessModuleEnum"
|
||||||
|
clearable
|
||||||
|
style="width: 100px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item of $d.BusinessModule"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:key="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:emailManageCfg:form:BusinessScenario')"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="searchData.BusinessScenarioEnum"
|
||||||
|
clearable
|
||||||
|
style="width: 100px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item of $d.Email_BusinessScenario"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:key="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('trials:emailManageCfg:form:ToUserType')">
|
||||||
|
<el-select
|
||||||
|
v-model="searchData.ToUserType"
|
||||||
|
clearable
|
||||||
|
style="width: 100px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item of UserTypeList"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:key="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('trials:emailManageCfg:form:EmailUrgent')"
|
||||||
|
v-if="systemLevel === 1"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="searchData.EmailUrgentEnum"
|
||||||
|
clearable
|
||||||
|
style="width: 100px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item of $d.EmailUrgent"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:key="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="handleSearch">查询</el-button>
|
<el-button type="primary" @click="handleSearch">查询</el-button>
|
||||||
<el-button type="primary" @click="handleReset">重置</el-button>
|
<el-button type="primary" @click="handleReset">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span style="margin-left: auto">
|
<span style="margin-left: auto">
|
||||||
|
<el-button type="primary" size="mini" @click="handleExport">
|
||||||
|
{{ $t('common:button:export') }}
|
||||||
|
</el-button>
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="mini"
|
size="mini"
|
||||||
@@ -111,7 +170,7 @@
|
|||||||
min-width="120"
|
min-width="120"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd("CriterionType", scope.row.CriterionTypeEnum) }}
|
{{ $fd('CriterionType', scope.row.CriterionTypeEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -136,7 +195,7 @@
|
|||||||
min-width="100"
|
min-width="100"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd("BusinessLevel", scope.row.BusinessLevelEnum) }}
|
{{ $fd('BusinessLevel', scope.row.BusinessLevelEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -147,7 +206,7 @@
|
|||||||
min-width="100"
|
min-width="100"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd("BusinessModule", scope.row.BusinessModuleEnum) }}
|
{{ $fd('BusinessModule', scope.row.BusinessModuleEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -158,64 +217,62 @@
|
|||||||
min-width="130"
|
min-width="130"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd("Email_BusinessScenario", scope.row.BusinessScenarioEnum) }}
|
{{ $fd('Email_BusinessScenario', scope.row.BusinessScenarioEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 收件人 -->
|
<!-- 收件人v-if="systemLevel !== 1" -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="ToUserTypeList"
|
prop="ToUserTypeList"
|
||||||
:label="$t('trials:emailManageCfg:title:toUserTypeList')"
|
:label="$t('trials:emailManageCfg:title:toUserTypeList')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
min-width="100"
|
min-width="100"
|
||||||
v-if="systemLevel !== 1"
|
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{
|
{{
|
||||||
scope.row.ToUserTypeList.length > 0
|
scope.row.ToUserTypeList.length > 0
|
||||||
? scope.row.ToUserTypeList.map((v) => $fd("UserType", v)).join(
|
? scope.row.ToUserTypeList.map((v) => $fd('UserType', v)).join(
|
||||||
"、"
|
'、'
|
||||||
)
|
)
|
||||||
: ""
|
: ''
|
||||||
}}
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 抄送人 -->
|
<!-- 抄送人v-if="!systemLevel" -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="CopyUserTypeList"
|
prop="CopyUserTypeList"
|
||||||
:label="$t('trials:emailManageCfg:title:copyUserTypeList')"
|
:label="$t('trials:emailManageCfg:title:copyUserTypeList')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
min-width="100"
|
min-width="100"
|
||||||
v-if="!systemLevel"
|
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{
|
{{
|
||||||
scope.row.CopyUserTypeList.length > 0
|
scope.row.CopyUserTypeList.length > 0
|
||||||
? scope.row.CopyUserTypeList.map((v) => $fd("UserType", v)).join(
|
? scope.row.CopyUserTypeList.map((v) => $fd('UserType', v)).join(
|
||||||
"、"
|
'、'
|
||||||
)
|
)
|
||||||
: ""
|
: ''
|
||||||
}}
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<!---v-if="!systemLevel"-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="EmailUrgentEnum"
|
prop="EmailUrgentEnum"
|
||||||
label="加急状态"
|
label="加急状态"
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
min-width="100"
|
min-width="100"
|
||||||
v-if="!systemLevel"
|
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd("EmailUrgent", scope.row.EmailUrgentEnum) }}
|
{{ $fd('EmailUrgent', scope.row.EmailUrgentEnum) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<!---v-if="!systemLevel"-->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="EmailCron"
|
prop="EmailCron"
|
||||||
label="发送周期和时间"
|
label="发送周期和时间"
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
min-width="160"
|
min-width="160"
|
||||||
v-if="!systemLevel"
|
|
||||||
/>
|
/>
|
||||||
<!-- 附件 -->
|
<!-- 附件 -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -246,10 +303,10 @@
|
|||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.IsReturnRequired" type="danger">
|
<el-tag v-if="scope.row.IsReturnRequired" type="danger">
|
||||||
{{ $fd("YesOrNo", scope.row.IsReturnRequired) }}
|
{{ $fd('YesOrNo', scope.row.IsReturnRequired) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-else type="primary">{{
|
<el-tag v-else type="primary">{{
|
||||||
$fd("YesOrNo", scope.row.IsReturnRequired)
|
$fd('YesOrNo', scope.row.IsReturnRequired)
|
||||||
}}</el-tag>
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -264,10 +321,10 @@
|
|||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.IsAutoSend" type="danger">
|
<el-tag v-if="scope.row.IsAutoSend" type="danger">
|
||||||
{{ $fd("YesOrNo", scope.row.IsAutoSend) }}
|
{{ $fd('YesOrNo', scope.row.IsAutoSend) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-else type="primary">{{
|
<el-tag v-else type="primary">{{
|
||||||
$fd("YesOrNo", scope.row.IsAutoSend)
|
$fd('YesOrNo', scope.row.IsAutoSend)
|
||||||
}}</el-tag>
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -281,10 +338,10 @@
|
|||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.IsEnable" type="danger">
|
<el-tag v-if="scope.row.IsEnable" type="danger">
|
||||||
{{ $fd("YesOrNo", scope.row.IsEnable) }}
|
{{ $fd('YesOrNo', scope.row.IsEnable) }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-else type="primary">{{
|
<el-tag v-else type="primary">{{
|
||||||
$fd("YesOrNo", scope.row.IsEnable)
|
$fd('YesOrNo', scope.row.IsEnable)
|
||||||
}}</el-tag>
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -338,8 +395,10 @@
|
|||||||
<EmailForm
|
<EmailForm
|
||||||
:data="rowData"
|
:data="rowData"
|
||||||
:system-level="systemLevel"
|
:system-level="systemLevel"
|
||||||
|
:isDistinguishCriteria="isDistinguishCriteria"
|
||||||
@closeDialog="closeDialog"
|
@closeDialog="closeDialog"
|
||||||
@getList="getList"
|
@getList="getList"
|
||||||
|
@PreviewHTML="preview"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
@@ -359,131 +418,173 @@
|
|||||||
@getList="getList"
|
@getList="getList"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<!-- 预览模板 -->
|
||||||
|
<el-dialog
|
||||||
|
v-if="previewVisible"
|
||||||
|
:visible.sync="previewVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
title="预览"
|
||||||
|
fullscreen
|
||||||
|
custom-class="base-dialog-wrapper"
|
||||||
|
>
|
||||||
|
<div v-html="previewHTML"></div>
|
||||||
|
</el-dialog>
|
||||||
</box-content>
|
</box-content>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
getEmailNoticeConfigList,
|
getEmailNoticeConfigList,
|
||||||
deleteEmailNoticeConfig,
|
deleteEmailNoticeConfig,
|
||||||
} from "@/api/dictionary";
|
} from '@/api/dictionary'
|
||||||
import BoxContent from "@/components/BoxContent";
|
import { GetEmailNoticeConfigList_Export } from '@/api/export'
|
||||||
import Pagination from "@/components/Pagination";
|
import BoxContent from '@/components/BoxContent'
|
||||||
import EmailForm from "./EmailForm";
|
import Pagination from '@/components/Pagination'
|
||||||
import AttachmentList from "./AttachmentList";
|
import EmailForm from './EmailForm'
|
||||||
|
import AttachmentList from './AttachmentList'
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
IsReturnRequired: "",
|
IsReturnRequired: '',
|
||||||
IsUrgent: "",
|
IsUrgent: '',
|
||||||
IsEnable: "",
|
IsEnable: '',
|
||||||
CriterionTypeEnum: null,
|
CriterionTypeEnum: null,
|
||||||
|
BusinessModuleEnum: null,
|
||||||
|
BusinessScenarioEnum: null,
|
||||||
|
EmailUrgentEnum: null,
|
||||||
|
ToUserType: null,
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
};
|
SortField: 'Code',
|
||||||
};
|
Asc: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
export default {
|
export default {
|
||||||
name: "EmailList",
|
name: 'EmailList',
|
||||||
components: { BoxContent, Pagination, EmailForm, AttachmentList },
|
components: { BoxContent, Pagination, EmailForm, AttachmentList },
|
||||||
props: {
|
props: {
|
||||||
isDistinguishCriteria: {
|
isDistinguishCriteria: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default() {
|
default() {
|
||||||
return false;
|
return false
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
systemLevel: {
|
systemLevel: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default() {
|
default() {
|
||||||
return 0;
|
return 0
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeTab: "0",
|
activeTab: '0',
|
||||||
searchData: searchDataDefault(),
|
searchData: searchDataDefault(),
|
||||||
loading: false,
|
loading: false,
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
rowData: {},
|
rowData: {},
|
||||||
title: "",
|
title: '',
|
||||||
editVisible: false,
|
editVisible: false,
|
||||||
attachmentVisible: false,
|
attachmentVisible: false,
|
||||||
};
|
previewVisible: false,
|
||||||
|
previewHTML: null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
UserTypeList() {
|
||||||
|
if (this.systemLevel === 1) {
|
||||||
|
return this.$d.UserType
|
||||||
|
} else {
|
||||||
|
return this.$d.UserType.filter(
|
||||||
|
(item) => ![7, 31, 32, 21, 26, 27].includes(item.value)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取受试者列表
|
// 获取受试者列表
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria;
|
this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria
|
||||||
this.searchData.systemLevel = this.systemLevel;
|
this.searchData.systemLevel = this.systemLevel
|
||||||
getEmailNoticeConfigList(this.searchData)
|
getEmailNoticeConfigList(this.searchData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
this.list = res.Result.CurrentPageData;
|
this.list = res.Result.CurrentPageData
|
||||||
this.total = res.Result.TotalCount;
|
this.total = res.Result.TotalCount
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 新增
|
// 新增
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.rowData = {};
|
this.rowData = {}
|
||||||
this.title = "新增";
|
this.title = '新增'
|
||||||
this.editVisible = true;
|
this.editVisible = true
|
||||||
},
|
},
|
||||||
// 编辑
|
// 编辑
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
this.rowData = { ...row };
|
this.rowData = { ...row }
|
||||||
this.title = "编辑";
|
this.title = '编辑'
|
||||||
this.editVisible = true;
|
this.editVisible = true
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$confirm(this.$t("trials:staffResearch:message:confirmDel"), {
|
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), {
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteEmailNoticeConfig(row.Id).then((res) => {
|
deleteEmailNoticeConfig(row.Id).then((res) => {
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.getList();
|
this.getList()
|
||||||
this.$message.success("删除成功!");
|
this.$message.success('删除成功!')
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleDetail(row) {
|
handleDetail(row) {
|
||||||
this.rowData = { ...row };
|
this.rowData = { ...row }
|
||||||
this.attachmentVisible = true;
|
this.attachmentVisible = true
|
||||||
},
|
},
|
||||||
// 查询
|
// 查询
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.searchData.PageIndex = 1;
|
this.searchData.PageIndex = 1
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
// 重置
|
// 重置
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.searchData = searchDataDefault();
|
this.searchData = searchDataDefault()
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
// 排序
|
// 排序
|
||||||
handleSortByColumn(column) {
|
handleSortByColumn(column) {
|
||||||
if (column.order === "ascending") {
|
if (column.order === 'ascending') {
|
||||||
this.searchData.Asc = true;
|
this.searchData.Asc = true
|
||||||
} else {
|
} else {
|
||||||
this.searchData.Asc = false;
|
this.searchData.Asc = false
|
||||||
}
|
}
|
||||||
this.searchData.SortField = column.prop;
|
this.searchData.SortField = column.prop
|
||||||
this.searchData.PageIndex = 1;
|
this.searchData.PageIndex = 1
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
// 关闭新增、编辑框
|
// 关闭新增、编辑框
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
this.editVisible = false;
|
this.editVisible = false
|
||||||
|
},
|
||||||
|
preview(html) {
|
||||||
|
this.previewHTML = html
|
||||||
|
this.previewVisible = true
|
||||||
|
},
|
||||||
|
// 导出
|
||||||
|
handleExport() {
|
||||||
|
// this.searchData.IsDistinguishCriteria = this.isDistinguishCriteria
|
||||||
|
// this.searchData.systemLevel = this.systemLevel
|
||||||
|
// return GetEmailNoticeConfigList_Export(this.searchData)
|
||||||
|
return GetEmailNoticeConfigList_Export(this.searchData)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -29,13 +29,13 @@
|
|||||||
></EmailList>
|
></EmailList>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- 系统相关-分角色 -->
|
<!-- 系统相关-分角色 -->
|
||||||
<el-tab-pane :label="$t('trials:emailManageCfg:title:systemDisRole')" name="3">
|
<!-- <el-tab-pane :label="$t('trials:emailManageCfg:title:systemDisRole')" name="3">
|
||||||
<EmailList
|
<EmailList
|
||||||
v-if="activeTab === '3'"
|
v-if="activeTab === '3'"
|
||||||
:is-distinguish-criteria="false"
|
:is-distinguish-criteria="false"
|
||||||
:system-level="2"
|
:system-level="2"
|
||||||
></EmailList>
|
></EmailList>
|
||||||
</el-tab-pane>
|
</el-tab-pane> -->
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</box-content>
|
</box-content>
|
||||||
</template>
|
</template>
|
||||||
@@ -43,107 +43,107 @@
|
|||||||
import {
|
import {
|
||||||
getEmailNoticeConfigList,
|
getEmailNoticeConfigList,
|
||||||
deleteEmailNoticeConfig,
|
deleteEmailNoticeConfig,
|
||||||
} from "@/api/dictionary";
|
} from '@/api/dictionary'
|
||||||
import BoxContent from "@/components/BoxContent";
|
import BoxContent from '@/components/BoxContent'
|
||||||
import Pagination from "@/components/Pagination";
|
import Pagination from '@/components/Pagination'
|
||||||
import EmailList from "./components/EmailList";
|
import EmailList from './components/EmailList'
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
IsReturnRequired: "",
|
IsReturnRequired: '',
|
||||||
IsUrgent: "",
|
IsUrgent: '',
|
||||||
IsEnable: "",
|
IsEnable: '',
|
||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
export default {
|
export default {
|
||||||
name: "EmailListIndex",
|
name: 'EmailListIndex',
|
||||||
components: { BoxContent, Pagination, EmailList },
|
components: { BoxContent, Pagination, EmailList },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeTab: "0",
|
activeTab: '0',
|
||||||
searchData: searchDataDefault(),
|
searchData: searchDataDefault(),
|
||||||
loading: false,
|
loading: false,
|
||||||
list: [],
|
list: [],
|
||||||
total: 0,
|
total: 0,
|
||||||
rowData: {},
|
rowData: {},
|
||||||
title: "",
|
title: '',
|
||||||
editVisible: false,
|
editVisible: false,
|
||||||
attachmentVisible: false,
|
attachmentVisible: false,
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取受试者列表
|
// 获取受试者列表
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
getEmailNoticeConfigList(this.searchData)
|
getEmailNoticeConfigList(this.searchData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
this.list = res.Result.CurrentPageData;
|
this.list = res.Result.CurrentPageData
|
||||||
this.total = res.Result.TotalCount;
|
this.total = res.Result.TotalCount
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 新增
|
// 新增
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.rowData = {};
|
this.rowData = {}
|
||||||
this.title = "新增";
|
this.title = '新增'
|
||||||
this.editVisible = true;
|
this.editVisible = true
|
||||||
},
|
},
|
||||||
// 编辑
|
// 编辑
|
||||||
handleEdit(row) {
|
handleEdit(row) {
|
||||||
this.rowData = { ...row };
|
this.rowData = { ...row }
|
||||||
this.title = "编辑";
|
this.title = '编辑'
|
||||||
this.editVisible = true;
|
this.editVisible = true
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
this.$confirm(this.$t("trials:staffResearch:message:confirmDel"), {
|
this.$confirm(this.$t('trials:staffResearch:message:confirmDel'), {
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteEmailNoticeConfig(row.Id).then((res) => {
|
deleteEmailNoticeConfig(row.Id).then((res) => {
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.getList();
|
this.getList()
|
||||||
this.$message.success("删除成功!");
|
this.$message.success('删除成功!')
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleDetail(row) {
|
handleDetail(row) {
|
||||||
this.rowData = { ...row };
|
this.rowData = { ...row }
|
||||||
this.attachmentVisible = true;
|
this.attachmentVisible = true
|
||||||
},
|
},
|
||||||
// 查询
|
// 查询
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.searchData.PageIndex = 1;
|
this.searchData.PageIndex = 1
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
// 重置
|
// 重置
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.searchData = searchDataDefault();
|
this.searchData = searchDataDefault()
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
// 排序
|
// 排序
|
||||||
handleSortByColumn(column) {
|
handleSortByColumn(column) {
|
||||||
if (column.order === "ascending") {
|
if (column.order === 'ascending') {
|
||||||
this.searchData.Asc = true;
|
this.searchData.Asc = true
|
||||||
} else {
|
} else {
|
||||||
this.searchData.Asc = false;
|
this.searchData.Asc = false
|
||||||
}
|
}
|
||||||
this.searchData.SortField = column.prop;
|
this.searchData.SortField = column.prop
|
||||||
this.searchData.PageIndex = 1;
|
this.searchData.PageIndex = 1
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
// 关闭新增、编辑框
|
// 关闭新增、编辑框
|
||||||
closeDialog() {
|
closeDialog() {
|
||||||
this.editVisible = false;
|
this.editVisible = false
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,11 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="display: flex;justify-content: center">
|
<div style="display: flex; justify-content: center">
|
||||||
<div style="width: 600px;text-align: center;border: 1px solid #e6e6e6;margin-top:40px;padding:10px;">
|
<div
|
||||||
<div class="trial-myinfo-head" style="font-size: 30px;line-height: 120px;">
|
style="
|
||||||
|
width: 600px;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid #e6e6e6;
|
||||||
|
margin-top: 40px;
|
||||||
|
padding: 10px;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="trial-myinfo-head"
|
||||||
|
style="font-size: 30px; line-height: 120px"
|
||||||
|
>
|
||||||
<!-- 首次登录修改密码 -->
|
<!-- 首次登录修改密码 -->
|
||||||
{{ $t('recompose:title:init') }}
|
{{ $t('recompose:title:init') }}
|
||||||
</div>
|
</div>
|
||||||
<el-form ref="passwordForm" v-loading="loading" label-position="right" :model="password" :rules="passwordFormRules" label-width="200px">
|
<el-form
|
||||||
|
ref="passwordForm"
|
||||||
|
v-loading="loading"
|
||||||
|
label-position="right"
|
||||||
|
:model="password"
|
||||||
|
:rules="passwordFormRules"
|
||||||
|
:label-width="$i18n.locale == 'zh' ? '100px' : '200px'"
|
||||||
|
>
|
||||||
<!-- 邮箱 -->
|
<!-- 邮箱 -->
|
||||||
<el-form-item :label="$t('recompose:form:email')" prop="Email">
|
<el-form-item :label="$t('recompose:form:email')" prop="Email">
|
||||||
<el-input v-model="password.Email" disabled />
|
<el-input v-model="password.Email" disabled />
|
||||||
@@ -19,70 +37,135 @@
|
|||||||
<el-input v-model="password.NewUserName" />
|
<el-input v-model="password.NewUserName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 新密码 -->
|
<!-- 新密码 -->
|
||||||
<el-form-item :label="$t('recompose:form:newPassword')" prop="NewPassWord">
|
<el-form-item
|
||||||
<el-input v-model="password.NewPassWord" type="password" show-password auto-complete="new-password" />
|
:label="$t('recompose:form:newPassword')"
|
||||||
|
prop="NewPassWord"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="password.NewPassWord"
|
||||||
|
type="password"
|
||||||
|
show-password
|
||||||
|
auto-complete="new-password"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 确认密码 -->
|
<!-- 确认密码 -->
|
||||||
<el-form-item :label="$t('recompose:form:confirmPassword')" prop="ConfirmPassWord">
|
<el-form-item
|
||||||
<el-input v-model="password.ConfirmPassWord" type="password" show-password auto-complete="new-password" />
|
:label="$t('recompose:form:confirmPassword')"
|
||||||
|
prop="ConfirmPassWord"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="password.ConfirmPassWord"
|
||||||
|
type="password"
|
||||||
|
show-password
|
||||||
|
auto-complete="new-password"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="text-align:right">
|
<el-form-item style="text-align: right">
|
||||||
<!-- 取消 -->
|
<!-- 取消 -->
|
||||||
<el-button
|
<el-button size="small" @click="cancel">
|
||||||
size="small"
|
|
||||||
@click="cancel"
|
|
||||||
>
|
|
||||||
{{ $t('recompose:button:cancel') }}
|
{{ $t('recompose:button:cancel') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 保存 -->
|
<!-- 保存 -->
|
||||||
<el-button
|
<el-button type="primary" size="small" @click="save">
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
@click="save"
|
|
||||||
>
|
|
||||||
{{ $t('recompose:button:save') }}
|
{{ $t('recompose:button:save') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { initSetUserNameAndPwd } from '@/api/admin.js'
|
import { initSetUserNameAndPwd } from '@/api/admin.js'
|
||||||
import md5 from 'js-md5'
|
import md5 from 'js-md5'
|
||||||
import {mapGetters, mapMutations} from "vuex";
|
import { mapGetters, mapMutations } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
password: {
|
password: {
|
||||||
NewUserName: null,
|
NewUserName: null,
|
||||||
UserId: null
|
UserId: null,
|
||||||
},
|
},
|
||||||
passwordFormRules: {
|
passwordFormRules: {
|
||||||
NewUserName: [{ required: true, validator: (rule, value, callback) => {!value ? callback(new Error(this.$t('trials:researchForm:formRule:specify'))) : callback()}, trigger: 'blur' }],
|
NewUserName: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
var lang = zzSessionStorage.getItem('lang')
|
||||||
|
? zzSessionStorage.getItem('lang')
|
||||||
|
: 'zh'
|
||||||
|
/* eslint-disable */
|
||||||
|
var reg1 = /^[a-zA-Z0-9_]{4,16}$/ //密码必须是8位以上、必须含有字母、数字、特殊符号
|
||||||
|
console.log(!reg1.test(value))
|
||||||
|
if (!reg1.test(value)) {
|
||||||
|
callback(
|
||||||
|
lang === 'zh'
|
||||||
|
? new Error(
|
||||||
|
'1)新建账号,用户名字符长度最小为4个字符,最大为16个字符,只可使用字母、数字、下划线;'
|
||||||
|
)
|
||||||
|
: new Error(
|
||||||
|
'For a new account, the username must have:1) At least 4 characters;2) At most 16 characters;3)Only letters, numbers, and underscores are allowed.'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
NewPassWord: [
|
NewPassWord: [
|
||||||
{ required: true, validator: (rule, value, callback) => {!value ? callback(new Error(this.$t('trials:researchForm:formRule:specify'))) : callback()}, trigger: 'blur' },
|
{
|
||||||
|
required: true,
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
!value
|
||||||
|
? callback(
|
||||||
|
new Error(this.$t('trials:researchForm:formRule:specify'))
|
||||||
|
)
|
||||||
|
: callback()
|
||||||
|
},
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
validator: this.$validatePassword
|
validator: this.$validatePassword,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ConfirmPassWord: [
|
ConfirmPassWord: [
|
||||||
{ required: true, validator: (rule, value, callback) => {!value ? callback(new Error(this.$t('trials:researchForm:formRule:specify'))) : callback()}, trigger: 'blur' }
|
{
|
||||||
]
|
required: true,
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
!value
|
||||||
|
? callback(
|
||||||
|
new Error(this.$t('trials:researchForm:formRule:specify'))
|
||||||
|
)
|
||||||
|
: callback()
|
||||||
|
},
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
trigger: 'blur',
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
value !== this.password.NewPassWord
|
||||||
|
? callback(
|
||||||
|
new Error(
|
||||||
|
this.$t(
|
||||||
|
'trials:researchForm:formRule:NewPassWordAndConfirmPassWord'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
: callback()
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
userId: null,
|
userId: null,
|
||||||
loading: false
|
loading: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapGetters(['asyncRoutes', 'routes', 'language']),
|
||||||
'asyncRoutes',
|
|
||||||
'routes',
|
|
||||||
'language'
|
|
||||||
])
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.password.UserId = this.$route.query.UserId
|
this.password.UserId = this.$route.query.UserId
|
||||||
@@ -112,7 +195,7 @@ export default {
|
|||||||
this.$updateDictionary()
|
this.$updateDictionary()
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
this.$refs.passwordForm.validate(valid => {
|
this.$refs.passwordForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.password.NewPassWord !== this.password.ConfirmPassWord) {
|
if (this.password.NewPassWord !== this.password.ConfirmPassWord) {
|
||||||
// 两次密码输入不一致
|
// 两次密码输入不一致
|
||||||
@@ -123,26 +206,32 @@ export default {
|
|||||||
NewUserName: this.password.NewUserName,
|
NewUserName: this.password.NewUserName,
|
||||||
UserId: this.password.UserId,
|
UserId: this.password.UserId,
|
||||||
NewPwd: md5(this.password.NewPassWord),
|
NewPwd: md5(this.password.NewPassWord),
|
||||||
access_token: this.password.access_token
|
access_token: this.password.access_token,
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
initSetUserNameAndPwd(param).then(res => {
|
initSetUserNameAndPwd(param)
|
||||||
this.loading = false
|
.then((res) => {
|
||||||
if (res.IsSuccess) {
|
this.loading = false
|
||||||
// 修改成功,请重新登录账号
|
if (res.IsSuccess) {
|
||||||
this.$message.success(this.$t('recompose:message:updatedSuccessfully'))
|
// 修改成功,请重新登录账号
|
||||||
setTimeout(() => {
|
this.$message.success(
|
||||||
this.logout()
|
this.$t('recompose:message:updatedSuccessfully')
|
||||||
}, 500)
|
)
|
||||||
}
|
setTimeout(() => {
|
||||||
}).catch(() => { this.loading = false })
|
this.logout()
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.$refs['passwordForm'].resetFields()
|
this.$refs['passwordForm'].resetFields()
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
@@ -165,13 +254,16 @@ export default {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
input:-webkit-autofill {
|
input:-webkit-autofill {
|
||||||
-webkit-text-fill-color: #ededed !important;
|
-webkit-text-fill-color: #ededed !important;
|
||||||
box-shadow: 0 0 0px 1000px transparent inset !important;
|
box-shadow: 0 0 0px 1000px transparent inset !important;
|
||||||
background-color:transparent;
|
background-color: transparent;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
transition: background-color 50000s ease-in-out 0s;
|
transition: background-color 50000s ease-in-out 0s;
|
||||||
}
|
}
|
||||||
input {
|
input {
|
||||||
background-color:transparent;
|
background-color: transparent;
|
||||||
caret-color: #fff;
|
caret-color: #fff;
|
||||||
}
|
}
|
||||||
|
.el-form-item {
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
size="mini"
|
size="mini"
|
||||||
@click="getList"
|
@click="getList"
|
||||||
>
|
>
|
||||||
{{ $t("common:button:search") }}
|
{{ $t('common:button:search') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 重置 -->
|
<!-- 重置 -->
|
||||||
<el-button
|
<el-button
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
icon="el-icon-refresh-left"
|
icon="el-icon-refresh-left"
|
||||||
@click="handleReset"
|
@click="handleReset"
|
||||||
>
|
>
|
||||||
{{ $t("common:button:reset") }}
|
{{ $t('common:button:reset') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -141,7 +141,7 @@
|
|||||||
v-if="level > 7"
|
v-if="level > 7"
|
||||||
:disabled="tableSelectData.length <= 0"
|
:disabled="tableSelectData.length <= 0"
|
||||||
>
|
>
|
||||||
{{ $t("feedBack:button:resolve") }}
|
{{ $t('feedBack:button:resolve') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -257,7 +257,7 @@
|
|||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag :type="['danger', 'success'][scope.row.State]">{{
|
<el-tag :type="['danger', 'success'][scope.row.State]">{{
|
||||||
$fd("FeedBackStatus", scope.row.State)
|
$fd('FeedBackStatus', scope.row.State)
|
||||||
}}</el-tag>
|
}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -278,7 +278,7 @@
|
|||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" @click="getDetail(scope.row)">
|
<el-button size="mini" type="text" @click="getDetail(scope.row)">
|
||||||
{{ $t("common:button:view") }}
|
{{ $t('common:button:view') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -295,8 +295,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Pagination from "@/components/Pagination";
|
import Pagination from '@/components/Pagination'
|
||||||
import { batchUpdateFeedBackState, getUserFeedBackList } from "@/api/trials.js";
|
import { batchUpdateFeedBackState, getUserFeedBackList } from '@/api/trials.js'
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
TrialKeyInfo: null,
|
TrialKeyInfo: null,
|
||||||
@@ -312,23 +312,23 @@ const searchDataDefault = () => {
|
|||||||
PageIndex: 1,
|
PageIndex: 1,
|
||||||
PageSize: 20,
|
PageSize: 20,
|
||||||
Asc: false,
|
Asc: false,
|
||||||
SortField: "CreateTime",
|
SortField: 'CreateTime',
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination },
|
components: { Pagination },
|
||||||
props: {
|
props: {
|
||||||
trialId: {
|
trialId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "",
|
default: '',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dicts: [
|
dicts: [
|
||||||
"NoticeApplicableTrial",
|
'NoticeApplicableTrial',
|
||||||
"NoteLevel",
|
'NoteLevel',
|
||||||
"NoteType",
|
'NoteType',
|
||||||
"NoticeState",
|
'NoticeState',
|
||||||
"NoticeMode",
|
'NoticeMode',
|
||||||
],
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -340,100 +340,100 @@ export default {
|
|||||||
searchData: searchDataDefault(),
|
searchData: searchDataDefault(),
|
||||||
tableSelectData: [],
|
tableSelectData: [],
|
||||||
UserTypeOptins: [
|
UserTypeOptins: [
|
||||||
{ label: "CRC", value: 2 },
|
{ label: 'CRC', value: 2 },
|
||||||
{ label: "IR", value: 13 },
|
{ label: 'IR', value: 13 },
|
||||||
],
|
],
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
level() {
|
level() {
|
||||||
if (this.hasPermi(["role:dev", "role:admin"])) {
|
if (this.hasPermi(['role:dev', 'role:admin'])) {
|
||||||
return 9;
|
return 9
|
||||||
}
|
}
|
||||||
if (this.hasPermi(["role:pm"])) {
|
if (this.hasPermi(['role:pm', 'role:apm'])) {
|
||||||
return 8;
|
return 8
|
||||||
}
|
}
|
||||||
if (this.hasPermi(["role:ir", "role:crc"])) {
|
if (this.hasPermi(['role:ir', 'role:crc'])) {
|
||||||
return 7;
|
return 7
|
||||||
}
|
}
|
||||||
return 0;
|
return 0
|
||||||
},
|
},
|
||||||
QuestionTypeOptions() {
|
QuestionTypeOptions() {
|
||||||
if (this.level > 7) {
|
if (this.level > 7) {
|
||||||
return [
|
return [
|
||||||
...this.$d.FeedBackTypeToCRC.filter((item) => item.value > 0),
|
...this.$d.FeedBackTypeToCRC.filter((item) => item.value > 0),
|
||||||
...this.$d.FeedBackTypeToIR,
|
...this.$d.FeedBackTypeToIR,
|
||||||
];
|
]
|
||||||
}
|
}
|
||||||
if (this.hasPermi(["role:ir"])) {
|
if (this.hasPermi(['role:ir'])) {
|
||||||
return this.$d.FeedBackTypeToIR;
|
return this.$d.FeedBackTypeToIR
|
||||||
}
|
}
|
||||||
if (this.hasPermi(["role:crc"])) {
|
if (this.hasPermi(['role:crc'])) {
|
||||||
return this.$d.FeedBackTypeToCRC;
|
return this.$d.FeedBackTypeToCRC
|
||||||
}
|
}
|
||||||
return [];
|
return []
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 通过提交状态决定该行的 CheckBox 是否可以勾选
|
// 通过提交状态决定该行的 CheckBox 是否可以勾选
|
||||||
handleSelectTable(row) {
|
handleSelectTable(row) {
|
||||||
return row.State < 1;
|
return row.State < 1
|
||||||
},
|
},
|
||||||
async getList() {
|
async getList() {
|
||||||
try {
|
try {
|
||||||
if (this.trialId) {
|
if (this.trialId) {
|
||||||
this.searchData.TrialId = this.trialId;
|
this.searchData.TrialId = this.trialId
|
||||||
}
|
}
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
let res = await getUserFeedBackList(this.searchData);
|
let res = await getUserFeedBackList(this.searchData)
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.list = res.Result.CurrentPageData;
|
this.list = res.Result.CurrentPageData
|
||||||
this.total = res.Result.TotalCount;
|
this.total = res.Result.TotalCount
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
console.log(err);
|
console.log(err)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleDatetimeChange(val) {
|
handleDatetimeChange(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.searchData.BeginCreatime = val[0];
|
this.searchData.BeginCreatime = val[0]
|
||||||
this.searchData.EndCreatime = val[1];
|
this.searchData.EndCreatime = val[1]
|
||||||
} else {
|
} else {
|
||||||
this.searchData.BeginCreatime = "";
|
this.searchData.BeginCreatime = ''
|
||||||
this.searchData.EndCreatime = "";
|
this.searchData.EndCreatime = ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 重置列表查询
|
// 重置列表查询
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.datetimerange = null;
|
this.datetimerange = null
|
||||||
this.handleDatetimeChange();
|
this.handleDatetimeChange()
|
||||||
this.searchData = searchDataDefault();
|
this.searchData = searchDataDefault()
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
// 设为解决
|
// 设为解决
|
||||||
async resolve() {
|
async resolve() {
|
||||||
try {
|
try {
|
||||||
let confirm = await this.$confirm(this.$t("feedBack:resolve:tip"), {
|
let confirm = await this.$confirm(this.$t('feedBack:resolve:tip'), {
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
});
|
})
|
||||||
if (!confirm) return;
|
if (!confirm) return
|
||||||
let data = {
|
let data = {
|
||||||
IdList: this.tableSelectData.map((item) => item.Id),
|
IdList: this.tableSelectData.map((item) => item.Id),
|
||||||
state: 1,
|
state: 1,
|
||||||
};
|
}
|
||||||
let res = await batchUpdateFeedBackState(data);
|
let res = await batchUpdateFeedBackState(data)
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.$message.success(this.$t("feedBack:resolve:success"));
|
this.$message.success(this.$t('feedBack:resolve:success'))
|
||||||
this.getList();
|
this.getList()
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 导出
|
// 导出
|
||||||
@@ -441,32 +441,32 @@ export default {
|
|||||||
// 表格选择
|
// 表格选择
|
||||||
handleSelectChange(selection) {
|
handleSelectChange(selection) {
|
||||||
// console.log(selection, "handleSelectChange");
|
// console.log(selection, "handleSelectChange");
|
||||||
this.tableSelectData = selection;
|
this.tableSelectData = selection
|
||||||
},
|
},
|
||||||
// 排序
|
// 排序
|
||||||
handleSortByColumn(column) {
|
handleSortByColumn(column) {
|
||||||
if (column.order === "ascending") {
|
if (column.order === 'ascending') {
|
||||||
this.searchData.Asc = true;
|
this.searchData.Asc = true
|
||||||
} else {
|
} else {
|
||||||
this.searchData.Asc = false;
|
this.searchData.Asc = false
|
||||||
}
|
}
|
||||||
this.searchData.SortField = column.prop;
|
this.searchData.SortField = column.prop
|
||||||
this.searchData.PageIndex = 1;
|
this.searchData.PageIndex = 1
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
// 获取详情
|
// 获取详情
|
||||||
getDetail(row) {
|
getDetail(row) {
|
||||||
this.$FB({
|
this.$FB({
|
||||||
type: "detail",
|
type: 'detail',
|
||||||
Id: row.Id,
|
Id: row.Id,
|
||||||
callBack: () => {
|
callBack: () => {
|
||||||
this.getList();
|
this.getList()
|
||||||
this.$emit("success");
|
this.$emit('success')
|
||||||
},
|
},
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.role {
|
.role {
|
||||||
|
|||||||
@@ -61,16 +61,16 @@
|
|||||||
:disabled="form.VerificationCode === '' || form.EmailOrPhone === ''"
|
:disabled="form.VerificationCode === '' || form.EmailOrPhone === ''"
|
||||||
@click="verifyCode"
|
@click="verifyCode"
|
||||||
>
|
>
|
||||||
{{ $t("passwordReset:button:verify") }}
|
{{ $t('passwordReset:button:verify') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-wrapper" v-if="active === 1">
|
<div class="box-wrapper" v-show="active === 1">
|
||||||
<el-form
|
<el-form
|
||||||
ref="resetForm"
|
ref="resetForm2"
|
||||||
v-loading="formLoading"
|
v-loading="formLoading"
|
||||||
:model="form"
|
:model="form"
|
||||||
label-width="100px"
|
:label-width="$i18n.locale === 'en' ? '180px' : '100px'"
|
||||||
:rules="rules"
|
:rules="rules2"
|
||||||
class="demo-ruleForm"
|
class="demo-ruleForm"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
<div style="width: 50%; margin: auto; display: flex">
|
<div style="width: 50%; margin: auto; display: flex">
|
||||||
<!-- 取消 -->
|
<!-- 取消 -->
|
||||||
<el-button size="small" @click="onCancel" style="width: 46%">
|
<el-button size="small" @click="onCancel" style="width: 46%">
|
||||||
{{ $t("passwordReset:button:cancel") }}
|
{{ $t('passwordReset:button:cancel') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 提交 -->
|
<!-- 提交 -->
|
||||||
<el-button
|
<el-button
|
||||||
@@ -140,17 +140,17 @@
|
|||||||
@click="onSubmit"
|
@click="onSubmit"
|
||||||
style="width: 46%"
|
style="width: 46%"
|
||||||
>
|
>
|
||||||
{{ $t("passwordReset:button:submit") }}
|
{{ $t('passwordReset:button:submit') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box-wrapper flexBox" v-if="active === 3">
|
<div class="box-wrapper flexBox" v-if="active === 3">
|
||||||
<svg-icon icon-class="resetSuccess" style="width: 300px; height: 300px" />
|
<svg-icon icon-class="resetSuccess" style="width: 300px; height: 300px" />
|
||||||
<p style="width: 100%; text-align: center">
|
<p style="width: 100%; text-align: center">
|
||||||
{{ $t("resetPassword:successTip") }}
|
{{ $t('resetPassword:successTip') }}
|
||||||
</p>
|
</p>
|
||||||
<el-button size="small" type="primary" @click="goBack">
|
<el-button size="small" type="primary" @click="goBack">
|
||||||
{{ $t("passwordReset:button:back") }}
|
{{ $t('passwordReset:button:back') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -160,32 +160,30 @@ import {
|
|||||||
anonymousSendVerificationCode,
|
anonymousSendVerificationCode,
|
||||||
verifyAnonymousVerifyCode,
|
verifyAnonymousVerifyCode,
|
||||||
anonymousSetPassword,
|
anonymousSetPassword,
|
||||||
} from "@/api/user";
|
} from '@/api/user'
|
||||||
import md5 from "js-md5";
|
import md5 from 'js-md5'
|
||||||
import Img from "@/assets/icons/svg/resetSuccess.svg";
|
import Img from '@/assets/icons/svg/resetSuccess.svg'
|
||||||
var timer = "";
|
var timer = ''
|
||||||
var countdown = 60;
|
var countdown = 60
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
var validateEmail = (rule, value, callback) => {
|
var validateEmail = (rule, value, callback) => {
|
||||||
if (value === "") {
|
if (value === '') {
|
||||||
// 请输入邮箱
|
// 请输入邮箱
|
||||||
callback(new Error(this.$t("passwordReset:formRule:email")));
|
callback(new Error(this.$t('passwordReset:formRule:email')))
|
||||||
} else {
|
} else {
|
||||||
var reg =
|
var reg =
|
||||||
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/;
|
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
|
||||||
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
|
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
|
||||||
this.sendDisabled = false;
|
this.sendDisabled = false
|
||||||
callback();
|
callback()
|
||||||
} else {
|
} else {
|
||||||
// 邮箱无效
|
// 邮箱无效
|
||||||
callback(
|
callback(new Error(this.$t('passwordReset:formRule:passwordinvalid')))
|
||||||
new Error(this.$t("passwordReset:formRule:passwordinvalid"))
|
this.sendDisabled = true
|
||||||
);
|
|
||||||
this.sendDisabled = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
// var validatePass = (rule, value, callback) => {
|
// var validatePass = (rule, value, callback) => {
|
||||||
// if (value === '') {
|
// if (value === '') {
|
||||||
// // 请输入密码
|
// // 请输入密码
|
||||||
@@ -198,181 +196,206 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
var validatePass2 = (rule, value, callback) => {
|
var validatePass2 = (rule, value, callback) => {
|
||||||
if (value === "" || value === undefined) {
|
if (value === '' || value === undefined) {
|
||||||
// 请再次输入密码
|
// 请再次输入密码
|
||||||
callback(new Error(this.$t("passwordReset:formRule:confirmPassword")));
|
callback(new Error(this.$t('passwordReset:formRule:confirmPassword')))
|
||||||
} else if (value !== undefined && value !== this.form.NewPwd) {
|
} else if (value !== undefined && value !== this.form.NewPwd) {
|
||||||
// 两次密码不一致
|
// 两次密码不一致
|
||||||
callback(new Error(this.$t("passwordReset:formRule:passwordsDiffer")));
|
callback(new Error(this.$t('passwordReset:formRule:passwordsDiffer')))
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback()
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
return {
|
return {
|
||||||
active: 0,
|
active: 0,
|
||||||
Img,
|
Img,
|
||||||
form: {
|
form: {
|
||||||
EmailOrPhone: "",
|
EmailOrPhone: '',
|
||||||
VerificationCode: "",
|
VerificationCode: '',
|
||||||
NewPwd: "",
|
NewPwd: '',
|
||||||
UserId: "",
|
CheckPass: '',
|
||||||
UserType: "",
|
UserId: '',
|
||||||
|
UserType: '',
|
||||||
},
|
},
|
||||||
users: [],
|
users: [],
|
||||||
CheckPass: "",
|
CheckPass: '',
|
||||||
rules: {
|
rules: {
|
||||||
EmailOrPhone: [
|
EmailOrPhone: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
validator: validateEmail,
|
validator: validateEmail,
|
||||||
trigger: ["blur", "change"],
|
trigger: ['blur', 'change'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
VerificationCode: [
|
VerificationCode: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t("common:ruleMessage:specify"),
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
trigger: ["blur", "change"],
|
trigger: ['blur', 'change'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
NewPwd: [
|
NewPwd: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
validator: this.$validatePassword,
|
validator: this.$validatePassword,
|
||||||
trigger: ["blur", "change"],
|
trigger: ['blur', 'change'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
CheckPass: [
|
CheckPass: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
validator: validatePass2,
|
validator: validatePass2,
|
||||||
trigger: ["blur", "change"],
|
trigger: ['blur', 'change'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
UserId: [
|
UserId: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t("common:ruleMessage:select"),
|
message: this.$t('common:ruleMessage:select'),
|
||||||
trigger: ["blur", "change"],
|
trigger: ['blur', 'change'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
rules2: {
|
||||||
|
NewPwd: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
validator: this.$validatePassword,
|
||||||
|
trigger: ['blur', 'change'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
CheckPass: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
validator: validatePass2,
|
||||||
|
trigger: ['blur', 'change'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
UserId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('common:ruleMessage:select'),
|
||||||
|
trigger: ['blur', 'change'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
sendDisabled: true,
|
sendDisabled: true,
|
||||||
sendTitle: this.$t("passwordReset:button:send"),
|
sendTitle: this.$t('passwordReset:button:send'),
|
||||||
formLoading: false,
|
formLoading: false,
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
this.$refs["resetForm"].validate((valid) => {
|
this.$refs['resetForm2'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.formLoading = true;
|
this.formLoading = true
|
||||||
anonymousSetPassword(this.form.UserId, md5(this.form.NewPwd))
|
anonymousSetPassword(this.form.UserId, md5(this.form.NewPwd))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
// 修改成功
|
// 修改成功
|
||||||
this.$message.success(
|
this.$message.success(
|
||||||
this.$t("passwordReset:message:updatedSuccessfully")
|
this.$t('passwordReset:message:updatedSuccessfully')
|
||||||
);
|
)
|
||||||
this.formLoading = false;
|
this.formLoading = false
|
||||||
this.active = 3;
|
this.active = 3
|
||||||
// this.goBack();
|
// this.goBack();
|
||||||
} else {
|
} else {
|
||||||
this.$alert(res.ErrorMessage);
|
this.$alert(res.ErrorMessage)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.formLoading = false;
|
this.formLoading = false
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleSendCode() {
|
handleSendCode() {
|
||||||
const that = this;
|
const that = this
|
||||||
this.sendDisabled = true;
|
this.sendDisabled = true
|
||||||
// var isReviewer = JSON.parse(zzSessionStorage.getItem('IsReviewer'))
|
// var isReviewer = JSON.parse(zzSessionStorage.getItem('IsReviewer'))
|
||||||
anonymousSendVerificationCode(this.form.EmailOrPhone)
|
anonymousSendVerificationCode(this.form.EmailOrPhone)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
let msg = this.$t('passwordReset:message:tip:sendCode').replace("xxx", this.form.EmailOrPhone)
|
let msg = this.$t('passwordReset:message:tip:sendCode').replace(
|
||||||
|
'xxx',
|
||||||
|
this.form.EmailOrPhone
|
||||||
|
)
|
||||||
this.$message.success(msg)
|
this.$message.success(msg)
|
||||||
that.settime(that);
|
that.settime(that)
|
||||||
} else {
|
} else {
|
||||||
that.$alert(res.ErrorMessage);
|
that.$alert(res.ErrorMessage)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.sendDisabled = false;
|
this.sendDisabled = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
verifyCode() {
|
verifyCode() {
|
||||||
this.formLoading = true;
|
this.formLoading = true
|
||||||
verifyAnonymousVerifyCode(
|
verifyAnonymousVerifyCode(
|
||||||
this.form.EmailOrPhone,
|
this.form.EmailOrPhone,
|
||||||
this.form.VerificationCode
|
this.form.VerificationCode
|
||||||
)
|
)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.formLoading = false;
|
this.formLoading = false
|
||||||
this.users = res.Result;
|
this.users = res.Result
|
||||||
if (this.users.length === 1) {
|
if (this.users.length === 1) {
|
||||||
this.form.UserId = this.users[0].UserId;
|
this.form.UserId = this.users[0].UserId
|
||||||
this.form.UserType = this.users[0].UserType;
|
this.form.UserType = this.users[0].UserType
|
||||||
}
|
}
|
||||||
// 验证成功
|
// 验证成功
|
||||||
this.$message.success(
|
this.$message.success(
|
||||||
this.$t("passwordReset:message:verifiedSuccessfully")
|
this.$t('passwordReset:message:verifiedSuccessfully')
|
||||||
);
|
)
|
||||||
this.active = 1;
|
this.active = 1
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.formLoading = false;
|
this.formLoading = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleEmailChange() {
|
handleEmailChange() {
|
||||||
var reg =
|
var reg =
|
||||||
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/;
|
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
|
||||||
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
|
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
|
||||||
this.sendDisabled = false;
|
this.sendDisabled = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleUserChange(val) {
|
handleUserChange(val) {
|
||||||
const seleted = this.users.findIndex((user) => user.UserId === val);
|
const seleted = this.users.findIndex((user) => user.UserId === val)
|
||||||
if (seleted > -1) {
|
if (seleted > -1) {
|
||||||
this.form.UserType = this.users[seleted].UserType;
|
this.form.UserType = this.users[seleted].UserType
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
settime(obj) {
|
settime(obj) {
|
||||||
if (countdown === 0) {
|
if (countdown === 0) {
|
||||||
obj.sendDisabled = false;
|
obj.sendDisabled = false
|
||||||
obj.sendTitle = this.$t("passwordReset:button:send");
|
obj.sendTitle = this.$t('passwordReset:button:send')
|
||||||
countdown = 60;
|
countdown = 60
|
||||||
clearTimeout(timer);
|
clearTimeout(timer)
|
||||||
return;
|
return
|
||||||
} else {
|
} else {
|
||||||
obj.sendDisabled = true;
|
obj.sendDisabled = true
|
||||||
obj.sendTitle = `${this.$t(
|
obj.sendTitle = `${this.$t('passwordReset:button:wait')}(${countdown}s)`
|
||||||
"passwordReset:button:wait"
|
countdown--
|
||||||
)}(${countdown}s)`;
|
|
||||||
countdown--;
|
|
||||||
// eslint-disable-next-line no-self-assign
|
// eslint-disable-next-line no-self-assign
|
||||||
countdown = countdown;
|
countdown = countdown
|
||||||
timer = setTimeout(function () {
|
timer = setTimeout(function () {
|
||||||
obj.settime(obj);
|
obj.settime(obj)
|
||||||
}, 1000);
|
}, 1000)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onCancel() {
|
onCancel() {
|
||||||
this.$refs["resetForm"].resetFields();
|
this.$refs['resetForm'].resetFields()
|
||||||
Object.keys(this.form).forEach((key) => {
|
Object.keys(this.form).forEach((key) => {
|
||||||
this.form[key] = "";
|
this.form[key] = ''
|
||||||
});
|
})
|
||||||
this.active = 0;
|
this.active = 0
|
||||||
},
|
},
|
||||||
goBack() {
|
goBack() {
|
||||||
this.$router.push("/login");
|
this.$router.push('/login')
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.reset-wrapper {
|
.reset-wrapper {
|
||||||
|
|||||||
+202
-96
@@ -34,7 +34,7 @@
|
|||||||
style="width: 300px; height: 94px"
|
style="width: 300px; height: 94px"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="title" v-else>{{ $t("login:title:system") }}</div>
|
<div class="title" v-else>{{ $t('login:title:system') }}</div>
|
||||||
</div>
|
</div>
|
||||||
<el-form
|
<el-form
|
||||||
ref="loginForm"
|
ref="loginForm"
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
<svg-icon icon-class="password" />
|
<svg-icon icon-class="password" />
|
||||||
</span>
|
</span>
|
||||||
<!-- password -->
|
<!-- password -->
|
||||||
<el-input
|
<!-- <el-input
|
||||||
:key="passwordType"
|
:key="passwordType"
|
||||||
ref="password"
|
ref="password"
|
||||||
v-model="loginForm.password"
|
v-model="loginForm.password"
|
||||||
@@ -91,6 +91,8 @@
|
|||||||
:type="passwordType"
|
:type="passwordType"
|
||||||
:placeholder="$t('login:form:password')"
|
:placeholder="$t('login:form:password')"
|
||||||
name="password"
|
name="password"
|
||||||
|
auto-complete="new-password"
|
||||||
|
autocomplete="new-password"
|
||||||
tabindex="2"
|
tabindex="2"
|
||||||
@keyup.enter.native="handleLogin"
|
@keyup.enter.native="handleLogin"
|
||||||
/>
|
/>
|
||||||
@@ -98,6 +100,21 @@
|
|||||||
<svg-icon
|
<svg-icon
|
||||||
:icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"
|
:icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"
|
||||||
/>
|
/>
|
||||||
|
</span> -->
|
||||||
|
<el-input
|
||||||
|
:key="passwordType"
|
||||||
|
ref="password"
|
||||||
|
v-model="pwdCover"
|
||||||
|
size="small"
|
||||||
|
type="text"
|
||||||
|
:placeholder="$t('login:form:password')"
|
||||||
|
name="password"
|
||||||
|
@input="setPassword"
|
||||||
|
tabindex="2"
|
||||||
|
@keyup.enter.native="handleLogin"
|
||||||
|
/>
|
||||||
|
<span class="show-pwd" @click="hidePassword">
|
||||||
|
<svg-icon :icon-class="!isShowPassword ? 'eye' : 'eye-open'" />
|
||||||
</span>
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- Login -->
|
<!-- Login -->
|
||||||
@@ -112,7 +129,7 @@
|
|||||||
size="medium"
|
size="medium"
|
||||||
@click.native.prevent="handleLogin"
|
@click.native.prevent="handleLogin"
|
||||||
>
|
>
|
||||||
{{ $t("login:button:login") }}
|
{{ $t('login:button:login') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<TopLang
|
<TopLang
|
||||||
@@ -128,7 +145,7 @@
|
|||||||
@click.native.prevent="handleResetPwd"
|
@click.native.prevent="handleResetPwd"
|
||||||
style="color: rgb(0, 147, 221)"
|
style="color: rgb(0, 147, 221)"
|
||||||
>
|
>
|
||||||
{{ $t("login:button:forgetPassword") }}
|
{{ $t('login:button:forgetPassword') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -155,6 +172,14 @@
|
|||||||
<span style="color: #428bca">关于</span>
|
<span style="color: #428bca">关于</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="NODE_ENV === 'usa'" class="login-footer">
|
||||||
|
<span>
|
||||||
|
© {{ new Date().getFullYear() }} Elevate lmaging Inc. info@{{ host }}
|
||||||
|
</span>
|
||||||
|
<a @click="openAbout">
|
||||||
|
<span style="color: #428bca">About</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<Vcode
|
<Vcode
|
||||||
:show="isShow"
|
:show="isShow"
|
||||||
:fail-text="$t('login:button:failText')"
|
:fail-text="$t('login:button:failText')"
|
||||||
@@ -179,28 +204,42 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<h1 style="text-align: center; margin-bottom: 20px">关于</h1>
|
<h1
|
||||||
|
style="text-align: center; margin-bottom: 20px"
|
||||||
|
v-if="NODE_ENV === 'usa'"
|
||||||
|
>
|
||||||
|
About
|
||||||
|
</h1>
|
||||||
|
<h1 style="text-align: center; margin-bottom: 20px" v-else>关于</h1>
|
||||||
<p style="margin-bottom: 20px" v-if="NODE_ENV === 'usa'">
|
<p style="margin-bottom: 20px" v-if="NODE_ENV === 'usa'">
|
||||||
{{ $t("login:title:system_title") }}
|
{{ $t('login:title:system_title_about') }}
|
||||||
|
</p>
|
||||||
|
<p style="margin-bottom: 20px" v-else>{{ $t('login:title:system') }}</p>
|
||||||
|
<p style="margin-bottom: 20px">
|
||||||
|
V{{ $version.IsEnv_US ? $version.Version_US : $version.Version }}
|
||||||
</p>
|
</p>
|
||||||
<p style="margin-bottom: 20px" v-else>{{ $t("login:title:system") }}</p>
|
|
||||||
<p style="margin-bottom: 20px">V{{ $version.Version }}</p>
|
|
||||||
<p style="margin-bottom: 20px" v-if="language === 'zh'">
|
<p style="margin-bottom: 20px" v-if="language === 'zh'">
|
||||||
Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司
|
Copyright © {{ new Date().getFullYear() }} 上海展影医疗科技有限公司
|
||||||
版权所有
|
版权所有
|
||||||
</p>
|
</p>
|
||||||
|
<p style="margin-bottom: 20px" v-else-if="NODE_ENV === 'usa'">
|
||||||
|
© {{ new Date().getFullYear() }} Elevate Imaging Inc.
|
||||||
|
</p>
|
||||||
<p style="margin-bottom: 20px" v-else>
|
<p style="margin-bottom: 20px" v-else>
|
||||||
Copyright © {{ new Date().getFullYear() }} Shanghai Extensive Imaging
|
Copyright © {{ new Date().getFullYear() }} Shanghai Extensive Imaging
|
||||||
Inc.
|
Inc.
|
||||||
</p>
|
</p>
|
||||||
<div style="margin-bottom: 20px">
|
<div style="margin-bottom: 20px" v-if="NODE_ENV === 'usa'">
|
||||||
|
<img style="width: 180px" src="@/assets/zzlogo-usa.png" alt="" />
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 20px" v-else>
|
||||||
<img style="width: 180px" src="@/assets/zzlogo2.png" alt="" />
|
<img style="width: 180px" src="@/assets/zzlogo2.png" alt="" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" size="mini" @click="aboutVisible = false"
|
<el-button type="primary" size="mini" @click="aboutVisible = false">
|
||||||
>关闭</el-button
|
{{ $t('common:button:close') }}
|
||||||
>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<browserTip ref="browserTip" />
|
<browserTip ref="browserTip" />
|
||||||
@@ -208,14 +247,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters, mapMutations } from "vuex";
|
import { mapGetters, mapMutations } from 'vuex'
|
||||||
import TopLang from "./topLang";
|
import TopLang from './topLang'
|
||||||
// import NoticeMarquee from '../trials/trials-layout/components/noticeMarquee'
|
// import NoticeMarquee from '../trials/trials-layout/components/noticeMarquee'
|
||||||
import Vcode from "vue-puzzle-vcode";
|
import Vcode from 'vue-puzzle-vcode'
|
||||||
import browserTip from "@/views/dictionary/template/browser/tip.vue";
|
import browserTip from '@/views/dictionary/template/browser/tip.vue'
|
||||||
import Img1 from "@/assets/pic-2.png";
|
import Img1 from '@/assets/pic-2.png'
|
||||||
export default {
|
export default {
|
||||||
name: "Login",
|
name: 'Login',
|
||||||
components: { TopLang, Vcode, browserTip },
|
components: { TopLang, Vcode, browserTip },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -223,18 +262,18 @@ export default {
|
|||||||
VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION,
|
VUE_APP_OSS_CONFIG_REGION: process.env.VUE_APP_OSS_CONFIG_REGION,
|
||||||
aboutVisible: false,
|
aboutVisible: false,
|
||||||
loginForm: {
|
loginForm: {
|
||||||
username: "",
|
username: '',
|
||||||
password: "",
|
password: '',
|
||||||
UserId: null,
|
UserId: null,
|
||||||
},
|
},
|
||||||
loginRules: {
|
loginRules: {
|
||||||
username: [
|
username: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t("login:formRule:userName"),
|
message: this.$t('login:formRule:userName'),
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
{ max: 20, message: `${this.$t("common:ruleMessage:maxLength")} 20` },
|
{ max: 20, message: `${this.$t('common:ruleMessage:maxLength')} 20` },
|
||||||
],
|
],
|
||||||
password: [
|
password: [
|
||||||
// {
|
// {
|
||||||
@@ -244,29 +283,34 @@ export default {
|
|||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t("login:formRule:password"),
|
message: this.$t('login:formRule:password'),
|
||||||
trigger: "blur",
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
{ max: 20, message: `${this.$t("common:ruleMessage:maxLength")} 20` },
|
{ max: 20, message: `${this.$t('common:ruleMessage:maxLength')} 20` },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
passwordType: "password",
|
passwordType: 'password',
|
||||||
|
pwdCover: null,
|
||||||
|
isShowPassword: false,
|
||||||
loginType: null,
|
loginType: null,
|
||||||
location: null,
|
location: null,
|
||||||
isShow: false,
|
isShow: false,
|
||||||
showCode: false,
|
showCode: false,
|
||||||
Img1,
|
Img1,
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(["asyncRoutes", "routes", "language"]),
|
...mapGetters(['asyncRoutes', 'routes', 'language']),
|
||||||
|
host() {
|
||||||
|
return window.location.host
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
"$i18n.locale": {
|
'$i18n.locale': {
|
||||||
handler() {
|
handler() {
|
||||||
if (this.$refs.browserTip) {
|
if (this.$refs.browserTip) {
|
||||||
this.$refs.browserTip.open();
|
this.$refs.browserTip.open()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
@@ -274,88 +318,88 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loginType = this.$route.query.loginType;
|
this.loginType = this.$route.query.loginType
|
||||||
this.location = this.$route.query.location;
|
this.location = this.$route.query.location
|
||||||
zzSessionStorage.setItem("loginType", this.loginType);
|
zzSessionStorage.setItem('loginType', this.loginType)
|
||||||
localStorage.setItem("location", this.location);
|
localStorage.setItem('location', this.location)
|
||||||
if (process.env.VUE_APP_OSS_CONFIG_REGION === "oss-us-west-1") {
|
if (process.env.VUE_APP_OSS_CONFIG_REGION === 'oss-us-west-1') {
|
||||||
this.$i18n.locale = "en";
|
this.$i18n.locale = 'en'
|
||||||
this.setLanguage("en");
|
this.setLanguage('en')
|
||||||
this.$updateDictionary();
|
this.$updateDictionary()
|
||||||
} else {
|
} else {
|
||||||
if (this.location === "USA" || this.NODE_ENV === "usa") {
|
if (this.location === 'USA' || this.NODE_ENV === 'usa') {
|
||||||
this.$i18n.locale = "en";
|
this.$i18n.locale = 'en'
|
||||||
this.setLanguage("en");
|
this.setLanguage('en')
|
||||||
this.$updateDictionary();
|
this.$updateDictionary()
|
||||||
} else {
|
} else {
|
||||||
// this.$i18n.locale = 'zh'
|
// this.$i18n.locale = 'zh'
|
||||||
// this.setLanguage('zh')
|
// this.setLanguage('zh')
|
||||||
// this.$updateDictionary()
|
// this.$updateDictionary()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$refs.browserTip.open();
|
this.$refs.browserTip.open()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations({ setLanguage: "lang/setLanguage" }),
|
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
||||||
openAbout() {
|
openAbout() {
|
||||||
this.aboutVisible = true;
|
this.aboutVisible = true
|
||||||
},
|
},
|
||||||
showPwd() {
|
showPwd() {
|
||||||
if (this.passwordType === "password") {
|
if (this.passwordType === 'password') {
|
||||||
this.passwordType = "";
|
this.passwordType = ''
|
||||||
} else {
|
} else {
|
||||||
this.passwordType = "password";
|
this.passwordType = 'password'
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.password.focus();
|
this.$refs.password.focus()
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleLogin() {
|
handleLogin() {
|
||||||
this.loginType = this.$route.query.loginType;
|
this.loginType = this.$route.query.loginType
|
||||||
this.$refs.loginForm.validate((valid) => {
|
this.$refs.loginForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.showCode) {
|
if (this.showCode) {
|
||||||
this.isShow = true;
|
this.isShow = true
|
||||||
} else {
|
} else {
|
||||||
this.onSuccess();
|
this.onSuccess()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// console.log('error submit!!')
|
// console.log('error submit!!')
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
loginIn(Id) {
|
loginIn(Id) {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
this.showCode = false;
|
this.showCode = false
|
||||||
if (Id) this.loginForm.UserId = Id;
|
if (Id) this.loginForm.UserId = Id
|
||||||
this.$store
|
this.$store
|
||||||
.dispatch("user/login", this.loginForm)
|
.dispatch('user/login', this.loginForm)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.BasicInfo.IsFirstAdd) {
|
if (res.BasicInfo.IsFirstAdd) {
|
||||||
// 当前用户为首次登录,请先修改密码之后再次登录
|
// 当前用户为首次登录,请先修改密码之后再次登录
|
||||||
this.$message.success(this.$t("login:message:login1"));
|
this.$message.success(this.$t('login:message:login1'))
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: `/recompose?userName=${this.loginForm.username}`,
|
path: `/recompose?userName=${this.loginForm.username}`,
|
||||||
});
|
})
|
||||||
}, 500);
|
}, 500)
|
||||||
return;
|
return
|
||||||
} else if (res.BasicInfo.LoginState === 1) {
|
} else if (res.BasicInfo.LoginState === 1) {
|
||||||
// 请先修改密码后再登录!
|
// 请先修改密码后再登录!
|
||||||
this.$alert(
|
this.$alert(
|
||||||
this.$t("login:message:login3"),
|
this.$t('login:message:login3'),
|
||||||
this.$t("common:title:warning"),
|
this.$t('common:title:warning'),
|
||||||
{
|
{
|
||||||
callback: (action) => {
|
callback: (action) => {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: `/recompose?userName=${this.loginForm.username}`,
|
path: `/recompose?userName=${this.loginForm.username}`,
|
||||||
});
|
})
|
||||||
return;
|
return
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
return;
|
return
|
||||||
} else if (res.IsMFA) {
|
} else if (res.IsMFA) {
|
||||||
this.$MFA({
|
this.$MFA({
|
||||||
UserId: res.BasicInfo.Id,
|
UserId: res.BasicInfo.Id,
|
||||||
@@ -363,55 +407,117 @@ export default {
|
|||||||
username: this.loginForm.username,
|
username: this.loginForm.username,
|
||||||
callBack: this.loginIn,
|
callBack: this.loginIn,
|
||||||
cancelBack: () => {
|
cancelBack: () => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
},
|
},
|
||||||
});
|
})
|
||||||
return;
|
return
|
||||||
} else if (res.BasicInfo.LoginState === 2) {
|
} else if (res.BasicInfo.LoginState === 2) {
|
||||||
// 本次登录的IP或设备与上次不一致,请确认'
|
// 本次登录的IP或设备与上次不一致,请确认'
|
||||||
// this.$alert(this.$t('login:message:login4'), this.$t('common:title:warning'))
|
// this.$alert(this.$t('login:message:login4'), this.$t('common:title:warning'))
|
||||||
this.$message.warning(this.$t("login:message:login4"));
|
this.$message.warning(this.$t('login:message:login4'))
|
||||||
}
|
}
|
||||||
this.$store.dispatch("permission/generateRoutes").then((res) => {
|
this.$store.dispatch('permission/generateRoutes').then((res) => {
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
if (res && res.length > 0) {
|
if (res && res.length > 0) {
|
||||||
this.$store.dispatch("global/getNoticeList");
|
this.$store.dispatch('global/getNoticeList')
|
||||||
this.$router.addRoutes(res);
|
this.$router.addRoutes(res)
|
||||||
if (this.loginType === "DevOps") {
|
if (this.loginType === 'DevOps') {
|
||||||
this.$router.replace({ path: res[0].path });
|
this.$router.replace({ path: res[0].path })
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
if (this.hasPermi(["role:radmin"])) {
|
if (this.hasPermi(['role:radmin'])) {
|
||||||
this.$router.replace({ path: res[0].path });
|
this.$router.replace({ path: res[0].path })
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
this.hasPermi(["role:air", "role:rpm", "role:rcrc", "role:rir"])
|
this.hasPermi(['role:air', 'role:rpm', 'role:rcrc', 'role:rir'])
|
||||||
) {
|
) {
|
||||||
this.$router.replace({ path: "/trials/trials-list" });
|
this.$router.replace({ path: '/trials/trials-list' })
|
||||||
} else {
|
} else {
|
||||||
this.$router.replace({ path: "/trials" });
|
this.$router.replace({ path: '/trials' })
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 此账户暂未配置菜单权限,请联系管理员处理后再登录。
|
// 此账户暂未配置菜单权限,请联系管理员处理后再登录。
|
||||||
this.$message.warning(this.$t("login:message:login2"));
|
this.$message.warning(this.$t('login:message:login2'))
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.showCode = true;
|
this.showCode = true
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
onSuccess() {
|
onSuccess() {
|
||||||
this.isShow = false;
|
this.isShow = false
|
||||||
this.loginIn();
|
this.loginIn()
|
||||||
},
|
},
|
||||||
handleResetPwd() {
|
handleResetPwd() {
|
||||||
this.$router.push({ name: "Resetpassword" });
|
this.$router.push({ name: 'Resetpassword' })
|
||||||
|
},
|
||||||
|
// 输入框输入事件
|
||||||
|
setPassword(val) {
|
||||||
|
console.log(val)
|
||||||
|
if (this.isShowPassword) {
|
||||||
|
this.loginForm.password = val
|
||||||
|
} else {
|
||||||
|
let reg =
|
||||||
|
/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[-_.@^+\$!%#*?&\$~])[A-Za-z0-9-~_.@^+\$~!%#*?&]{8,32}$/g // 只允许输入字母和数字
|
||||||
|
let nDot = /[^●]/g // 非圆点字符
|
||||||
|
let index = -1 // 新输入的字符位置
|
||||||
|
let lastChar = void 0 // 新输入的字符
|
||||||
|
let realArr = this.loginForm.password.split('') // 真实密码数组
|
||||||
|
let coverArr = val.split('') // 文本框显示密码数组
|
||||||
|
let coverLen = val.length // 文本框字符串长度
|
||||||
|
let realLen = this.loginForm.password.length // 真实密码长度
|
||||||
|
// 找到新输入的字符及位置
|
||||||
|
coverArr.forEach((el, idx) => {
|
||||||
|
if (nDot.test(el)) {
|
||||||
|
index = idx
|
||||||
|
lastChar = el
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 判断输入的字符是否符合规范,不符合的话去掉该字符
|
||||||
|
// if (lastChar && !reg.test(lastChar)) {
|
||||||
|
// coverArr.splice(index, 1)
|
||||||
|
// this.pwdCover = coverArr.join('')
|
||||||
|
// console.log(111111111111111, lastChar)
|
||||||
|
// // return
|
||||||
|
// }
|
||||||
|
if (coverLen - realLen <= 2) {
|
||||||
|
if (realLen < coverLen) {
|
||||||
|
// 新增字符
|
||||||
|
realArr.splice(index, 0, lastChar)
|
||||||
|
} else if (coverLen <= realLen && index !== -1) {
|
||||||
|
// 替换字符(选取一个或多个字符直接替换)
|
||||||
|
realArr.splice(index, realLen - (coverLen - 1), lastChar)
|
||||||
|
} else {
|
||||||
|
// 删除字符,因为 val 全是 ● ,没有办法匹配,不知道是从末尾还是中间删除的字符,删除了几个,不好对 password 处理,所以可以通过光标的位置和 val 的长度来判断
|
||||||
|
let pos = document.getElementById('pwd').selectionEnd // 获取光标位置
|
||||||
|
realArr.splice(pos, realLen - coverLen)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将 pwdCover 替换成 ●
|
||||||
|
this.pwdCover = val.replace(/\S/g, '●')
|
||||||
|
let v = val.replace(/●/g, '')
|
||||||
|
this.loginForm.password =
|
||||||
|
coverLen - realLen >= 2 ? realArr.join('') + v : realArr.join('')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 点击右侧小眼睛控制显示隐藏
|
||||||
|
hidePassword() {
|
||||||
|
if (!this.isShowPassword) {
|
||||||
|
// console.log("显示");
|
||||||
|
this.isShowPassword = true
|
||||||
|
this.pwdCover = this.loginForm.password
|
||||||
|
} else {
|
||||||
|
// console.log("隐藏");
|
||||||
|
this.isShowPassword = false
|
||||||
|
this.pwdCover = this.pwdCover.replace(/\S/g, '●')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
@@ -2,52 +2,65 @@
|
|||||||
<div v-loading="loading" class="img-container">
|
<div v-loading="loading" class="img-container">
|
||||||
<el-card class="box-card left">
|
<el-card class="box-card left">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
{{$t('trials:none-dicom-show:fileList')}}
|
{{ $t('trials:none-dicom-show:fileList') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="left-content">
|
<div class="left-content">
|
||||||
<!-- 检查层级 -->
|
<!-- 检查层级 -->
|
||||||
<div v-for="(study,i) in studyList" :key="study.CodeView">
|
<div v-for="(study, i) in studyList" :key="study.CodeView">
|
||||||
<div class="study-desc">
|
<div class="study-desc">
|
||||||
<span>{{ study.CodeView }}</span>
|
<span>{{ study.CodeView }}</span>
|
||||||
<span style="margin:0 5px">{{ study.Modality }}</span>
|
<span style="margin: 0 5px">{{ study.Modality }}</span>
|
||||||
<span>{{ getBodyPart(study.BodyPart) }}</span>
|
<span>{{ getBodyPart(study.BodyPart) }}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- 文件层级 -->
|
<!-- 文件层级 -->
|
||||||
<div v-if="study.NoneDicomStudyFileList.length === 0" class="empty-text">
|
<div
|
||||||
<slot name="empty">暂无数据</slot>
|
v-if="study.NoneDicomStudyFileList.length === 0"
|
||||||
|
class="empty-text"
|
||||||
|
>
|
||||||
|
<slot name="empty">{{ $t('trials:audit:message:noData') }}</slot>
|
||||||
</div>
|
</div>
|
||||||
<div v-else id="imgList" style="height:100%;overflow: hidden">
|
<div v-else id="imgList" style="height: 100%; overflow: hidden">
|
||||||
<div
|
<div
|
||||||
v-for="(item,j) in study.NoneDicomStudyFileList"
|
v-for="(item, j) in study.NoneDicomStudyFileList"
|
||||||
:id="`img${item.Id}`"
|
:id="`img${item.Id}`"
|
||||||
:key="item.Id"
|
:key="item.Id"
|
||||||
:class="{
|
:class="{
|
||||||
'is-boxActive': item.Id === currentFileId
|
'is-boxActive': item.Id === currentFileId,
|
||||||
}"
|
}"
|
||||||
class="img-box"
|
class="img-box"
|
||||||
@click="selected(item,i,j,true)"
|
@click="selected(item, i, j, true)"
|
||||||
>
|
>
|
||||||
{{ `${j+1}. ${item.FileName}` }}
|
<div v-if="item.FileName.length < 15" class="img-text">
|
||||||
|
{{ `${j + 1}. ${item.FileName}` }}
|
||||||
|
</div>
|
||||||
|
<el-tooltip v-else :content="item.FileName" placement="bottom">
|
||||||
|
<div class="img-text">
|
||||||
|
{{ `${j + 1}. ${item.FileName}` }}
|
||||||
|
</div>
|
||||||
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- 预览图像 -->
|
<!-- 预览图像 -->
|
||||||
<el-card class="box-card right">
|
<el-card class="box-card right">
|
||||||
<div style="width:100%;height: 100%;">
|
<div style="width: 100%; height: 100%">
|
||||||
<Preview v-if="previewImage.imgList.length > 0" ref="previewImage" style="width:100%;" :preview-image="previewImage" :value="currentStudyFileIndex" @selectedImg="selectedImg" />
|
<Preview
|
||||||
|
v-if="previewImage.imgList.length > 0"
|
||||||
|
ref="previewImage"
|
||||||
|
style="width: 100%"
|
||||||
|
:preview-image="previewImage"
|
||||||
|
:value="currentStudyFileIndex"
|
||||||
|
@selectedImg="selectedImg"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<!-- <el-card class="box-card" style="width:300px;height:100%;padding: 10px;margin-left:10px;">
|
<!-- <el-card class="box-card" style="width:300px;height:100%;padding: 10px;margin-left:10px;">
|
||||||
<CheckForm />
|
<CheckForm />
|
||||||
</el-card> -->
|
</el-card> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -59,7 +72,7 @@ import Preview from './components/preview'
|
|||||||
export default {
|
export default {
|
||||||
name: 'Notice',
|
name: 'Notice',
|
||||||
components: {
|
components: {
|
||||||
Preview
|
Preview,
|
||||||
// CheckForm
|
// CheckForm
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -76,18 +89,18 @@ export default {
|
|||||||
popup: true, // 弹窗的显示隐藏
|
popup: true, // 弹窗的显示隐藏
|
||||||
studyCode: '',
|
studyCode: '',
|
||||||
modality: '',
|
modality: '',
|
||||||
bodyPart: ''
|
bodyPart: '',
|
||||||
},
|
},
|
||||||
previewVisible: false,
|
previewVisible: false,
|
||||||
studyList: [],
|
studyList: [],
|
||||||
subjectVisitId: '',
|
subjectVisitId: '',
|
||||||
sudyId: '',
|
sudyId: '',
|
||||||
loading: false,
|
loading: false,
|
||||||
bp:[]
|
bp: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async created(){
|
async created() {
|
||||||
this.bp = await this.$getBodyPart(this.$route.query.trialId);
|
this.bp = await this.$getBodyPart(this.$route.query.trialId)
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
if (this.$router.currentRoute.query.TokenKey) {
|
if (this.$router.currentRoute.query.TokenKey) {
|
||||||
@@ -112,31 +125,47 @@ export default {
|
|||||||
separator = ','
|
separator = ','
|
||||||
}
|
}
|
||||||
var arr = bodyPart.split(separator)
|
var arr = bodyPart.split(separator)
|
||||||
var newArr = arr.map(i => {
|
var newArr = arr.map((i) => {
|
||||||
return this.$fd('Bodypart', i.trim(),'Code',{Bodypart:this.bp},'Name')
|
return this.$fd(
|
||||||
|
'Bodypart',
|
||||||
|
i.trim(),
|
||||||
|
'Code',
|
||||||
|
{ Bodypart: this.bp },
|
||||||
|
'Name'
|
||||||
|
)
|
||||||
})
|
})
|
||||||
console.log(newArr,this.bp)
|
console.log(newArr, this.bp)
|
||||||
return newArr.join(' | ')
|
return newArr.join(' | ')
|
||||||
},
|
},
|
||||||
// 获取非Dicom检查信息
|
// 获取非Dicom检查信息
|
||||||
getNoneDicomList() {
|
getNoneDicomList() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getNoneDicomStudyList(this.subjectVisitId, this.studyId).then(res => {
|
getNoneDicomStudyList(
|
||||||
this.studyList = res.Result
|
this.subjectVisitId,
|
||||||
this.loading = false
|
this.studyId,
|
||||||
const studyIndex = this.studyList.findIndex(item => {
|
false,
|
||||||
return item.NoneDicomStudyFileList.length > 0
|
this.$route.query.visitTaskId
|
||||||
|
)
|
||||||
|
.then((res) => {
|
||||||
|
this.studyList = res.Result
|
||||||
|
this.loading = false
|
||||||
|
const studyIndex = this.studyList.findIndex((item) => {
|
||||||
|
return item.NoneDicomStudyFileList.length > 0
|
||||||
|
})
|
||||||
|
if (studyIndex > -1) {
|
||||||
|
var fileObj = this.studyList[studyIndex]['NoneDicomStudyFileList']
|
||||||
|
this.selected(fileObj[0], studyIndex, 0, true)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
})
|
})
|
||||||
if (studyIndex > -1) {
|
|
||||||
var fileObj = this.studyList[studyIndex]['NoneDicomStudyFileList']
|
|
||||||
this.selected(fileObj[0], studyIndex, 0, true)
|
|
||||||
}
|
|
||||||
}).catch(() => { this.loading = false })
|
|
||||||
},
|
},
|
||||||
selected(file, studyIndex, fileIndex, isChangeSub = false) {
|
selected(file, studyIndex, fileIndex, isChangeSub = false) {
|
||||||
this.currentFileId = file.Id
|
this.currentFileId = file.Id
|
||||||
this.currentStudyIndex = studyIndex
|
this.currentStudyIndex = studyIndex
|
||||||
this.previewImage.imgList = this.studyList[studyIndex].NoneDicomStudyFileList
|
this.previewImage.imgList =
|
||||||
|
this.studyList[studyIndex].NoneDicomStudyFileList
|
||||||
this.currentStudyFileIndex = fileIndex
|
this.currentStudyFileIndex = fileIndex
|
||||||
this.previewImage.index = fileIndex
|
this.previewImage.index = fileIndex
|
||||||
this.previewImage.studyCode = this.studyList[studyIndex].CodeView
|
this.previewImage.studyCode = this.studyList[studyIndex].CodeView
|
||||||
@@ -151,11 +180,17 @@ export default {
|
|||||||
selectedImg(fileIndex) {
|
selectedImg(fileIndex) {
|
||||||
if (this.studyList.length > 0) {
|
if (this.studyList.length > 0) {
|
||||||
this.currentStudyFileIndex = fileIndex
|
this.currentStudyFileIndex = fileIndex
|
||||||
this.currentFileId = this.studyList[this.currentStudyIndex].NoneDicomStudyFileList[fileIndex].Id
|
this.currentFileId =
|
||||||
|
this.studyList[this.currentStudyIndex].NoneDicomStudyFileList[
|
||||||
|
fileIndex
|
||||||
|
].Id
|
||||||
this.previewImage.index = fileIndex
|
this.previewImage.index = fileIndex
|
||||||
this.previewImage.studyCode = this.studyList[this.currentStudyIndex].CodeView
|
this.previewImage.studyCode =
|
||||||
this.previewImage.bodyPart = this.studyList[this.currentStudyIndex].BodyPart
|
this.studyList[this.currentStudyIndex].CodeView
|
||||||
this.previewImage.modality = this.studyList[this.currentStudyIndex].Modality
|
this.previewImage.bodyPart =
|
||||||
|
this.studyList[this.currentStudyIndex].BodyPart
|
||||||
|
this.previewImage.modality =
|
||||||
|
this.studyList[this.currentStudyIndex].Modality
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
const target = document.getElementById(`img${this.currentFileId}`)
|
const target = document.getElementById(`img${this.currentFileId}`)
|
||||||
const parent = document.getElementsByClassName('left-content')[0]
|
const parent = document.getElementsByClassName('left-content')[0]
|
||||||
@@ -165,14 +200,13 @@ export default {
|
|||||||
},
|
},
|
||||||
preview() {
|
preview() {
|
||||||
this.previewVisible = true
|
this.previewVisible = true
|
||||||
}
|
},
|
||||||
|
},
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.img-container{
|
.img-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -186,27 +220,27 @@ export default {
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background: #d0d0d0;
|
background: #d0d0d0;
|
||||||
}
|
}
|
||||||
/deep/ .el-card__body{
|
/deep/ .el-card__body {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.study-desc{
|
.study-desc {
|
||||||
padding: 15px 5px;
|
padding: 15px 5px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
background-color: #d5d5d5;
|
background-color: #d5d5d5;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.left{
|
.left {
|
||||||
width:220px;
|
width: 220px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
/deep/ .el-card__body{
|
/deep/ .el-card__body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
.title{
|
.title {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
border: 1ppx solid;
|
border: 1ppx solid;
|
||||||
@@ -215,7 +249,7 @@ export default {
|
|||||||
background-color: #4e4e4e;
|
background-color: #4e4e4e;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
.left-content{
|
.left-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
@@ -231,21 +265,26 @@ export default {
|
|||||||
// overflow-y: auto;
|
// overflow-y: auto;
|
||||||
// padding: 0;
|
// padding: 0;
|
||||||
// }
|
// }
|
||||||
.img-box{
|
.img-box {
|
||||||
// position: relative;
|
// position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-bottom: 2px solid #f3f3f3;
|
border-bottom: 2px solid #f3f3f3;
|
||||||
width: 180px;
|
|
||||||
height: 50px;
|
|
||||||
line-height: 50px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
// margin-bottom: 5px;
|
// margin-bottom: 5px;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
text-overflow:ellipsis;
|
}
|
||||||
|
.img-text {
|
||||||
|
display: inline-block;
|
||||||
|
width: 200px;
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis; /* 用省略号表示溢出的文本 */
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.img-box:nth-last-child(1){
|
.img-box:nth-last-child(1) {
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
}
|
}
|
||||||
.is-boxActive {
|
.is-boxActive {
|
||||||
@@ -256,14 +295,13 @@ export default {
|
|||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.right{
|
.right {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
/deep/ .el-card__body{
|
/deep/ .el-card__body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+123
-64
@@ -1,76 +1,130 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="display: flex;justify-content: center">
|
<div style="display: flex; justify-content: center">
|
||||||
<div style="width: 600px;text-align: center;border: 1px solid #e6e6e6;margin-top:40px;padding:10px;">
|
<div
|
||||||
<div class="trial-myinfo-head" style="font-size: 30px;line-height: 120px;">
|
style="
|
||||||
|
width: 600px;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid #e6e6e6;
|
||||||
|
margin-top: 40px;
|
||||||
|
padding: 10px;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="trial-myinfo-head"
|
||||||
|
style="font-size: 30px; line-height: 120px"
|
||||||
|
>
|
||||||
<!-- 首次登录修改密码 -->
|
<!-- 首次登录修改密码 -->
|
||||||
{{ $t('recompose:title:init') }}
|
{{ $t('recompose:title:init') }}
|
||||||
</div>
|
</div>
|
||||||
<el-form ref="passwordForm" v-loading="loading" label-position="right" :model="password" :rules="passwordFormRules" label-width="120px">
|
<el-form
|
||||||
|
ref="passwordForm"
|
||||||
|
v-loading="loading"
|
||||||
|
label-position="right"
|
||||||
|
:model="password"
|
||||||
|
:rules="passwordFormRules"
|
||||||
|
:label-width="$i18n.locale === 'en' ? '180px' : '120px'"
|
||||||
|
>
|
||||||
<!-- 用户名 -->
|
<!-- 用户名 -->
|
||||||
<el-form-item :label="$t('recompose:form:userName')" prop="NewUserName">
|
<el-form-item :label="$t('recompose:form:userName')" prop="NewUserName">
|
||||||
<el-input v-model="password.NewUserName" />
|
<el-input v-model="password.NewUserName" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 旧密码 -->
|
<!-- 旧密码 -->
|
||||||
<el-form-item :label="$t('recompose:form:oldPassword')" prop="OldPassWord">
|
<el-form-item
|
||||||
<el-input v-model="password.OldPassWord" type="password" show-password auto-complete="new-password" />
|
:label="$t('recompose:form:oldPassword')"
|
||||||
|
prop="OldPassWord"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="password.OldPassWord"
|
||||||
|
type="password"
|
||||||
|
show-password
|
||||||
|
auto-complete="new-password"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 新密码 -->
|
<!-- 新密码 -->
|
||||||
<el-form-item :label="$t('recompose:form:newPassword')" prop="NewPassWord">
|
<el-form-item
|
||||||
<el-input v-model="password.NewPassWord" type="password" show-password auto-complete="new-password" />
|
:label="$t('recompose:form:newPassword')"
|
||||||
|
prop="NewPassWord"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="password.NewPassWord"
|
||||||
|
type="password"
|
||||||
|
show-password
|
||||||
|
auto-complete="new-password"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 确认密码 -->
|
<!-- 确认密码 -->
|
||||||
<el-form-item :label="$t('recompose:form:confirmPassword')" prop="ConfirmPassWord">
|
<el-form-item
|
||||||
<el-input v-model="password.ConfirmPassWord" type="password" show-password auto-complete="new-password" />
|
:label="$t('recompose:form:confirmPassword')"
|
||||||
|
prop="ConfirmPassWord"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="password.ConfirmPassWord"
|
||||||
|
type="password"
|
||||||
|
show-password
|
||||||
|
auto-complete="new-password"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="text-align:right">
|
<el-form-item style="text-align: right">
|
||||||
<!-- 取消 -->
|
<!-- 取消 -->
|
||||||
<el-button
|
<el-button size="small" @click="cancel">
|
||||||
size="small"
|
|
||||||
@click="cancel"
|
|
||||||
>
|
|
||||||
{{ $t('recompose:button:cancel') }}
|
{{ $t('recompose:button:cancel') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 保存 -->
|
<!-- 保存 -->
|
||||||
<el-button
|
<el-button type="primary" size="small" @click="save">
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
@click="save"
|
|
||||||
>
|
|
||||||
{{ $t('recompose:button:save') }}
|
{{ $t('recompose:button:save') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { modifyPassword } from '@/api/admin.js'
|
import { modifyPassword } from '@/api/admin.js'
|
||||||
import md5 from 'js-md5'
|
import md5 from 'js-md5'
|
||||||
import {mapMutations} from "vuex";
|
import { mapMutations } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
password: {
|
password: {
|
||||||
NewUserName: null
|
NewUserName: null,
|
||||||
},
|
},
|
||||||
passwordFormRules: {
|
passwordFormRules: {
|
||||||
NewUserName: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
|
NewUserName: [
|
||||||
OldPassWord: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' }],
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
OldPassWord: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
NewPassWord: [
|
NewPassWord: [
|
||||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
validator: this.$validatePassword
|
validator: this.$validatePassword,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ConfirmPassWord: [
|
ConfirmPassWord: [
|
||||||
{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: 'blur' },
|
{
|
||||||
]
|
required: true,
|
||||||
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
userId: null,
|
userId: null,
|
||||||
loading: false
|
loading: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -78,7 +132,6 @@ export default {
|
|||||||
if (!this.password.NewUserName) {
|
if (!this.password.NewUserName) {
|
||||||
// 该页面只提供给首次进入系统的用户使用
|
// 该页面只提供给首次进入系统的用户使用
|
||||||
this.$alert(this.$t('recompose:message:warning'))
|
this.$alert(this.$t('recompose:message:warning'))
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -96,7 +149,7 @@ export default {
|
|||||||
this.$updateDictionary()
|
this.$updateDictionary()
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
this.$refs.passwordForm.validate(valid => {
|
this.$refs.passwordForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.password.NewPassWord !== this.password.ConfirmPassWord) {
|
if (this.password.NewPassWord !== this.password.ConfirmPassWord) {
|
||||||
// 两次密码输入不一致
|
// 两次密码输入不一致
|
||||||
@@ -106,58 +159,64 @@ export default {
|
|||||||
const param = {
|
const param = {
|
||||||
NewUserName: this.password.NewUserName,
|
NewUserName: this.password.NewUserName,
|
||||||
NewPassWord: md5(this.password.NewPassWord),
|
NewPassWord: md5(this.password.NewPassWord),
|
||||||
OldPassWord: md5(this.password.OldPassWord)
|
OldPassWord: md5(this.password.OldPassWord),
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
modifyPassword(param).then(res => {
|
modifyPassword(param)
|
||||||
this.loading = false
|
.then((res) => {
|
||||||
if (res.IsSuccess) {
|
this.loading = false
|
||||||
// 修改成功,请重新登录账号
|
if (res.IsSuccess) {
|
||||||
this.$message.success(this.$t('recompose:message:updatedSuccessfully'))
|
// 修改成功,请重新登录账号
|
||||||
setTimeout(() => {
|
this.$message.success(
|
||||||
this.logout()
|
this.$t('recompose:message:updatedSuccessfully')
|
||||||
}, 500)
|
)
|
||||||
}
|
setTimeout(() => {
|
||||||
}).catch(() => { this.loading = false })
|
this.logout()
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.$refs['passwordForm'].resetFields()
|
this.$refs['passwordForm'].resetFields()
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.reset-wrapper {
|
.reset-wrapper {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
.reset-wrapper .el-page-header {
|
.reset-wrapper .el-page-header {
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
border: 1px solid #ebeef5;
|
border: 1px solid #ebeef5;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
.reset-wrapper .box-wrapper {
|
.reset-wrapper .box-wrapper {
|
||||||
width: 60%;
|
width: 60%;
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
color: #303133;
|
color: #303133;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
::v-deep .is-error{
|
::v-deep .is-error {
|
||||||
margin-bottom: 40px;
|
margin-bottom: 40px;
|
||||||
}
|
}
|
||||||
input:-webkit-autofill {
|
input:-webkit-autofill {
|
||||||
-webkit-text-fill-color: #ededed !important;
|
-webkit-text-fill-color: #ededed !important;
|
||||||
box-shadow: 0 0 0px 1000px transparent inset !important;
|
box-shadow: 0 0 0px 1000px transparent inset !important;
|
||||||
background-color:transparent;
|
background-color: transparent;
|
||||||
background-image: none;
|
background-image: none;
|
||||||
transition: background-color 50000s ease-in-out 0s;
|
transition: background-color 50000s ease-in-out 0s;
|
||||||
}
|
}
|
||||||
input {
|
input {
|
||||||
background-color:transparent;
|
background-color: transparent;
|
||||||
caret-color: #fff;
|
caret-color: #fff;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
<div class="login_content">
|
<div class="login_content">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('trials:researchForm:form:siteName')"
|
:label="$t('trials:researchForm:form:siteName')"
|
||||||
prop="SiteId"
|
prop="TrialSiteId"
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.TrialSiteId"
|
v-model="form.TrialSiteId"
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<el-input v-model="form.IndicationType" disabled />
|
<el-input v-model="form.IndicationType" disabled />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 中心名称 -->
|
<!-- 中心名称 -->
|
||||||
<el-form-item :label="$t('trials:researchForm:form:siteName')" prop="SiteId">
|
<el-form-item :label="$t('trials:researchForm:form:siteName')" prop="TrialSiteId">
|
||||||
<el-select v-model="form.TrialSiteId" filterable style="width:100%;" @change="handleSiteChange">
|
<el-select v-model="form.TrialSiteId" filterable style="width:100%;" @change="handleSiteChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item,index) of siteOptions"
|
v-for="(item,index) of siteOptions"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="question-login-wrapper">
|
<div class="question-login-wrapper">
|
||||||
<div class="box-wrapper">
|
<div class="box-wrapper">
|
||||||
<h2 style="text-align:center;">
|
<h2 style="text-align: center">
|
||||||
<!-- 中心调研表 -->
|
<!-- 中心调研表 -->
|
||||||
<!-- 独立阅片人信息填写 -->
|
<!-- 独立阅片人信息填写 -->
|
||||||
{{$t("trials:researchForm:form:title")}}
|
{{ $t('trials:researchForm:form:title') }}
|
||||||
</h2>
|
</h2>
|
||||||
<el-card shadow="hover" style="padding-top: 40px">
|
<el-card shadow="hover" style="padding-top: 40px">
|
||||||
<el-form
|
<el-form
|
||||||
@@ -12,30 +12,45 @@
|
|||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:model="form"
|
:model="form"
|
||||||
label-width="150px"
|
label-width="150px"
|
||||||
style="width:80%;margin:0 auto;"
|
style="width: 80%; margin: 0 auto"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
class="demo-ruleForm"
|
class="demo-ruleForm"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
<!-- 联系邮箱 -->
|
<!-- 联系邮箱 -->
|
||||||
<el-form-item :label="$t('trials:researchForm:form:contactorEmail')" prop="EmailOrPhone">
|
<el-form-item
|
||||||
<el-input v-model="form.EmailOrPhone" autocomplete="new-password" @change="handleEmailChange" />
|
:label="$t('trials:researchForm:form:contactorEmail')"
|
||||||
|
prop="EmailOrPhone"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="form.EmailOrPhone"
|
||||||
|
autocomplete="new-password"
|
||||||
|
@change="handleEmailChange"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 验证码 -->
|
<!-- 验证码 -->
|
||||||
<el-form-item :label="$t('trials:researchForm:form:verifyCode')" required>
|
<el-form-item
|
||||||
|
:label="$t('trials:researchForm:form:verifyCode')"
|
||||||
|
required
|
||||||
|
>
|
||||||
<el-col :span="20">
|
<el-col :span="20">
|
||||||
<el-form-item prop="VerificationCode">
|
<el-form-item prop="VerificationCode">
|
||||||
<el-input v-model="form.VerificationCode" autocomplete="new-password" />
|
<el-input
|
||||||
|
v-model="form.VerificationCode"
|
||||||
|
autocomplete="new-password"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
style="width:100%;"
|
style="width: 100%"
|
||||||
:disabled="sendDisabled"
|
:disabled="sendDisabled"
|
||||||
@click="handleSendCode"
|
@click="handleSendCode"
|
||||||
>{{ sendTitle }}</el-button>
|
>{{ this.$t('trials:researchForm:button:send')
|
||||||
|
}}{{ count || count === 0 ? `(${count}s)` : '' }}</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@@ -44,10 +59,14 @@
|
|||||||
{{ $t('common:button:cancel') }}
|
{{ $t('common:button:cancel') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 提交 -->
|
<!-- 提交 -->
|
||||||
<el-button size="small" type="primary" :loading="btnLoading" @click="onSubmit">
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
:loading="btnLoading"
|
||||||
|
@click="onSubmit"
|
||||||
|
>
|
||||||
{{ $t('common:button:submit') }}
|
{{ $t('common:button:submit') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -55,17 +74,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { sendVerifyCode, verifySendCode, getTrialSurveyInitInfo } from '@/api/research'
|
import {
|
||||||
|
sendVerifyCode,
|
||||||
|
verifySendCode,
|
||||||
|
getTrialSurveyInitInfo,
|
||||||
|
} from '@/api/research'
|
||||||
import { verifyEmialGetDoctorInfo, sendEmialVerifyCode } from '@/api/reviewers'
|
import { verifyEmialGetDoctorInfo, sendEmialVerifyCode } from '@/api/reviewers'
|
||||||
import { login, getUserMenuTree, getUserPermissions } from '@/api/user'
|
import { login, getUserMenuTree, getUserPermissions } from '@/api/user'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { mapMutations } from 'vuex'
|
import { mapMutations } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
var checkPhone = (rule, value, callback) => {
|
var checkPhone = (rule, value, callback) => {
|
||||||
const phoneReg = /^1[3|4|5|7|8][0-9]{9}$/
|
const phoneReg = /^1[3|4|5|7|8][0-9]{9}$/
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return callback(new Error(this.$t('trials:researchForm:formRule:specify')))
|
return callback(
|
||||||
|
new Error(this.$t('trials:researchForm:formRule:specify'))
|
||||||
|
)
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (!Number.isInteger(+value)) {
|
if (!Number.isInteger(+value)) {
|
||||||
@@ -83,7 +108,8 @@ export default {
|
|||||||
if (value === '') {
|
if (value === '') {
|
||||||
callback(new Error(this.$t('trials:researchForm:formRule:specify')))
|
callback(new Error(this.$t('trials:researchForm:formRule:specify')))
|
||||||
} else {
|
} else {
|
||||||
var reg = /^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
|
var reg =
|
||||||
|
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
|
||||||
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
|
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
|
||||||
this.sendDisabled = false
|
this.sendDisabled = false
|
||||||
callback()
|
callback()
|
||||||
@@ -97,8 +123,12 @@ export default {
|
|||||||
if (value === '') {
|
if (value === '') {
|
||||||
callback(new Error(this.$t('trials:researchForm:formRule:specify')))
|
callback(new Error(this.$t('trials:researchForm:formRule:specify')))
|
||||||
} else {
|
} else {
|
||||||
var reg = /^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
|
var reg =
|
||||||
if (this.form.ReplaceUserEmailOrPhone && reg.test(this.form.ReplaceUserEmailOrPhone)) {
|
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
|
||||||
|
if (
|
||||||
|
this.form.ReplaceUserEmailOrPhone &&
|
||||||
|
reg.test(this.form.ReplaceUserEmailOrPhone)
|
||||||
|
) {
|
||||||
callback()
|
callback()
|
||||||
} else {
|
} else {
|
||||||
callback(new Error(this.$t('trials:researchForm:formRule:email')))
|
callback(new Error(this.$t('trials:researchForm:formRule:email')))
|
||||||
@@ -120,26 +150,51 @@ export default {
|
|||||||
TrialSiteCode: '',
|
TrialSiteCode: '',
|
||||||
IsUpdate: false,
|
IsUpdate: false,
|
||||||
ReplaceUserEmailOrPhone: '',
|
ReplaceUserEmailOrPhone: '',
|
||||||
VerificationCode: ''
|
VerificationCode: '',
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
SiteId: [
|
SiteId: [
|
||||||
{ required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: ['blur'] }
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('trials:researchForm:formRule:specify'),
|
||||||
|
trigger: ['blur'],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
UserName: [
|
UserName: [
|
||||||
{ required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: ['blur'] },
|
{
|
||||||
{ min: 0, max: 50, message: this.$t('trials:researchForm:formRule:maxLength'), trigger: 'blur' }
|
required: true,
|
||||||
],
|
message: this.$t('trials:researchForm:formRule:specify'),
|
||||||
Phone: [
|
trigger: ['blur'],
|
||||||
{ required: true, validator: checkPhone, trigger: ['blur'] }
|
},
|
||||||
|
{
|
||||||
|
min: 0,
|
||||||
|
max: 50,
|
||||||
|
message: this.$t('trials:researchForm:formRule:maxLength'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
Phone: [{ required: true, validator: checkPhone, trigger: ['blur'] }],
|
||||||
EmailOrPhone: [
|
EmailOrPhone: [
|
||||||
{ required: true, validator: validateEmail, trigger: ['blur', 'change'] }
|
{
|
||||||
|
required: true,
|
||||||
|
validator: validateEmail,
|
||||||
|
trigger: ['blur', 'change'],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
ReplaceUserEmailOrPhone: [
|
ReplaceUserEmailOrPhone: [
|
||||||
{ required: true, validator: validateReplaceEmail, trigger: ['blur'] }
|
{
|
||||||
|
required: true,
|
||||||
|
validator: validateReplaceEmail,
|
||||||
|
trigger: ['blur'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
VerificationCode: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('trials:researchForm:formRule:specify'),
|
||||||
|
trigger: ['blur'],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
VerificationCode: [{ required: true, message: this.$t('trials:researchForm:formRule:specify'), trigger: ['blur'] }]
|
|
||||||
},
|
},
|
||||||
siteOptions: [],
|
siteOptions: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -148,20 +203,19 @@ export default {
|
|||||||
sendTitle: this.$t('trials:researchForm:button:send'),
|
sendTitle: this.$t('trials:researchForm:button:send'),
|
||||||
count: '',
|
count: '',
|
||||||
timer: null,
|
timer: null,
|
||||||
isHaveSiteSurveyRecord: false
|
isHaveSiteSurveyRecord: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created() {
|
||||||
this.$i18n.locale = this.$route.query.lang
|
this.$i18n.locale = this.$route.query.lang
|
||||||
this.setLanguage(this.$route.query.lang)
|
this.setLanguage(this.$route.query.lang)
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {},
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
...mapMutations({ setLanguage: 'lang/setLanguage' }),
|
||||||
// 提交
|
// 提交
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
this.$refs['resetForm'].validate(valid => {
|
this.$refs['resetForm'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
// 登陆成功并跳转
|
// 登陆成功并跳转
|
||||||
this.btnLoading = true
|
this.btnLoading = true
|
||||||
@@ -173,21 +227,44 @@ export default {
|
|||||||
emailOrPhone: this.form.EmailOrPhone,
|
emailOrPhone: this.form.EmailOrPhone,
|
||||||
verificationCode: this.form.VerificationCode,
|
verificationCode: this.form.VerificationCode,
|
||||||
}
|
}
|
||||||
verifyEmialGetDoctorInfo(param).then(async res => {
|
if (this.$route.query.trialId) {
|
||||||
this.btnLoading = false
|
param.TrialId = this.$route.query.trialId
|
||||||
zzSessionStorage.clear()
|
}
|
||||||
store.dispatch('user/setToken', res.Result.Token)
|
verifyEmialGetDoctorInfo(param)
|
||||||
zzSessionStorage.setItem('TokenKey', res.Result.Token)
|
.then(async (res) => {
|
||||||
var permissions = await getUserPermissions()
|
this.btnLoading = false
|
||||||
var menuTree = await getUserMenuTree()
|
zzSessionStorage.clear()
|
||||||
store.dispatch('user/setTree', menuTree.Result)
|
store.dispatch('user/setToken', res.Result.Token)
|
||||||
store.dispatch('user/setPermissions', permissions.Result)
|
zzSessionStorage.setItem('TokenKey', res.Result.Token)
|
||||||
// this.$router.push({ path: `/researchForm?trialId=${this.trialId}&trialSiteSurveyId=${res.Result.TrialSiteSurveyId}` })
|
var permissions = await getUserPermissions()
|
||||||
this.$router.push({path: `/ReviewersResearchForm?Id=${res.Result.DoctorId ? res.Result.DoctorId : ''}&tabActive=BasicInfo&ReviewStatus=${res.Result.ReviewStatus}&lang=${this.$route.query.lang}`})
|
var menuTree = await getUserMenuTree()
|
||||||
}).catch(() => {
|
store.dispatch('user/setTree', menuTree.Result)
|
||||||
this.btnLoading = false
|
store.dispatch('user/setPermissions', permissions.Result)
|
||||||
this.sendDisabled = false
|
// this.$router.push({ path: `/researchForm?trialId=${this.trialId}&trialSiteSurveyId=${res.Result.TrialSiteSurveyId}` })
|
||||||
})
|
if (this.$route.query.trialId) {
|
||||||
|
this.$router.push({
|
||||||
|
path: `/curriculumVitae?Id=${
|
||||||
|
res.Result.DoctorId ? res.Result.DoctorId : ''
|
||||||
|
}&tabActive=BasicInfo&ReviewStatus=${
|
||||||
|
res.Result.ReviewStatus
|
||||||
|
}&trialId=${this.$route.query.trialId}&lang=${
|
||||||
|
this.$route.query.lang
|
||||||
|
}`,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$router.push({
|
||||||
|
path: `/curriculumVitae?Id=${
|
||||||
|
res.Result.DoctorId ? res.Result.DoctorId : ''
|
||||||
|
}&tabActive=BasicInfo&ReviewStatus=${
|
||||||
|
res.Result.ReviewStatus
|
||||||
|
}&lang=${this.$route.query.lang}`,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.btnLoading = false
|
||||||
|
this.sendDisabled = false
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@@ -197,21 +274,24 @@ export default {
|
|||||||
handleSendCode() {
|
handleSendCode() {
|
||||||
this.sendDisabled = true
|
this.sendDisabled = true
|
||||||
const param = {
|
const param = {
|
||||||
Email: this.form.EmailOrPhone
|
Email: this.form.EmailOrPhone,
|
||||||
}
|
}
|
||||||
sendEmialVerifyCode(param).then(res => {
|
sendEmialVerifyCode(param)
|
||||||
if (res.IsSuccess) {
|
.then((res) => {
|
||||||
this.getCode()
|
if (res.IsSuccess) {
|
||||||
} else {
|
this.getCode()
|
||||||
this.$alert(res.ErrorMessage)
|
} else {
|
||||||
}
|
this.$alert(res.ErrorMessage)
|
||||||
}).catch(() => {
|
}
|
||||||
this.sendDisabled = false
|
})
|
||||||
})
|
.catch(() => {
|
||||||
|
this.sendDisabled = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 邮箱change事件
|
// 邮箱change事件
|
||||||
handleEmailChange() {
|
handleEmailChange() {
|
||||||
var reg = /^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
|
var reg =
|
||||||
|
/^[A-Za-z0-9]+([_\.][A-Za-z0-9]+)*@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,6}$/
|
||||||
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
|
if (this.form.EmailOrPhone && reg.test(this.form.EmailOrPhone)) {
|
||||||
this.sendDisabled = false
|
this.sendDisabled = false
|
||||||
} else {
|
} else {
|
||||||
@@ -226,21 +306,24 @@ export default {
|
|||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
if (this.count > 0 && this.count <= TIME_COUNT) {
|
if (this.count > 0 && this.count <= TIME_COUNT) {
|
||||||
this.count--
|
this.count--
|
||||||
this.sendTitle = `${this.$t('trials:researchForm:button:send')}(${this.count}s)`
|
this.sendTitle = `${this.$t('trials:researchForm:button:send')}(${
|
||||||
|
this.count
|
||||||
|
}s)`
|
||||||
this.sendDisabled = true
|
this.sendDisabled = true
|
||||||
} else {
|
} else {
|
||||||
this.sendDisabled = false
|
this.sendDisabled = false
|
||||||
this.sendTitle = this.$t('trials:researchForm:button:send')
|
this.sendTitle = this.$t('trials:researchForm:button:send')
|
||||||
clearInterval(this.timer)
|
clearInterval(this.timer)
|
||||||
this.timer = null
|
this.timer = null
|
||||||
|
this.count = null
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onCancel() {
|
onCancel() {
|
||||||
this.$refs['resetForm'].resetFields()
|
this.$refs['resetForm'].resetFields()
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -1,45 +1,92 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-loading="loading" class="resumes-container">
|
<div v-loading="loading" class="resumes-container">
|
||||||
<div class="resume-content" v-if="!$route.query.ReviewStatus">
|
<div class="resume-content" v-if="!$route.query.ReviewStatus">
|
||||||
<p>{{$t('system:Agreements:title:Consultant Agreement')}}</p>
|
<p>{{ $t('system:Agreements:title:Consultant Agreement') }}</p>
|
||||||
<div class="upload-content">
|
<div class="upload-content">
|
||||||
<upload-files ref="uploadAgreement" :disabled="$route.query.ReviewStatus === '1'" :doctor-id="doctorId" type="Consultant Agreement" accept=".pdf" @getFileList="getFileList" />
|
<upload-files
|
||||||
|
ref="uploadAgreement"
|
||||||
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
|
:doctor-id="doctorId"
|
||||||
|
type="Consultant Agreement"
|
||||||
|
accept=".pdf"
|
||||||
|
@getFileList="getFileList"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<p>{{ $t('system:tip:file:pdf') }}</p>
|
<p>{{ $t('system:tip:file:pdf') }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!$route.query.ReviewStatus">
|
<div v-if="!$route.query.ReviewStatus">
|
||||||
<el-table :data="agreementList" size="small">
|
<el-table :data="agreementList" size="small">
|
||||||
<el-table-column type="index" width="40" />
|
<el-table-column type="index" width="40" />
|
||||||
<el-table-column prop="FileName" :label="$t('system:Agreements:table:Consultant Agreement')" width="300" />
|
<el-table-column
|
||||||
<el-table-column prop="CreateTime" :label="$t('system:Agreements:table:Upload Time')" width="150" />
|
prop="FileName"
|
||||||
|
:label="$t('system:Agreements:table:Consultant Agreement')"
|
||||||
|
width="300"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="CreateTime"
|
||||||
|
:label="$t('system:Agreements:table:Upload Time')"
|
||||||
|
width="150"
|
||||||
|
/>
|
||||||
<el-table-column :label="$t('common:action:action')" width="400">
|
<el-table-column :label="$t('common:action:action')" width="400">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="handlePreview(scope.row)">{{$t('trials:enrolledReviews:button:view')}}</el-button>
|
<el-button
|
||||||
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleRemoveFile(scope.row)">{{$t('common:button:delete')}}</el-button>
|
type="text"
|
||||||
|
size="small"
|
||||||
|
@click="handlePreview(scope.row)"
|
||||||
|
>{{ $t('trials:enrolledReviews:button:view') }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
|
@click="handleRemoveFile(scope.row)"
|
||||||
|
>{{ $t('common:button:delete') }}</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top:20px">
|
<div style="margin-top: 20px">
|
||||||
<span style="margin-right: 20px">
|
<span style="margin-right: 20px">
|
||||||
{{$t('trials:enrolledReviews:message:SOW')}}
|
{{ $t('trials:enrolledReviews:message:SOW') }}
|
||||||
</span>
|
</span>
|
||||||
<el-button size="small" type="primary" :disabled="$route.query.ReviewStatus === '1'" @click="addCol(0, $t('trials:enrolledReviews:message:SOW'))">
|
<el-button
|
||||||
{{ $t('common:button:upload') }}</el-button>
|
size="small"
|
||||||
<el-button size="small" type="primary" @click="handleDownload('Reviewer_SOW_Template')">
|
type="primary"
|
||||||
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
|
@click="addCol(0, $t('trials:enrolledReviews:message:SOW'))"
|
||||||
|
>
|
||||||
|
{{ $t('common:button:upload') }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleDownload('Reviewer_SOW_Template')"
|
||||||
|
>
|
||||||
<i class="el-icon-view el-icon-download"></i>
|
<i class="el-icon-view el-icon-download"></i>
|
||||||
{{ $t('common:button:template') }}
|
{{ $t('common:button:template') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="sowList" size="small">
|
<el-table :data="sowList" size="small">
|
||||||
<el-table-column type="index" width="40" />
|
<el-table-column type="index" width="40" />
|
||||||
<el-table-column :label="$t('system:Agreements:table:Criterion Type')" width="120">
|
<el-table-column
|
||||||
|
:label="$t('system:Agreements:table:Criterion Type')"
|
||||||
|
width="120"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.CriterionName }}
|
{{ scope.row.CriterionName }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="FileName" :label="$t('system:Agreements:table:Statement of Work')" width="400" />
|
<el-table-column
|
||||||
<el-table-column prop="IsEnable" :label="$t('system:Agreements:table:Is Enable')" width="100">
|
prop="FileName"
|
||||||
|
:label="$t('system:Agreements:table:Statement of Work')"
|
||||||
|
width="400"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="IsEnable"
|
||||||
|
:label="$t('system:Agreements:table:Is Enable')"
|
||||||
|
width="100"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="scope.row.IsEnable"
|
v-model="scope.row.IsEnable"
|
||||||
@@ -49,32 +96,81 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="Remark" :label="$t('system:Agreements:Remark')" width="200" />
|
<el-table-column
|
||||||
<el-table-column prop="CreateTime" :label="$t('system:Agreements:Upload Time')" width="150" />
|
prop="Remark"
|
||||||
|
:label="$t('system:Agreements:Remark')"
|
||||||
|
width="200"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="CreateTime"
|
||||||
|
:label="$t('system:Agreements:Upload Time')"
|
||||||
|
width="150"
|
||||||
|
/>
|
||||||
<el-table-column :label="$t('common:action:action')" width="400">
|
<el-table-column :label="$t('common:action:action')" width="400">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handlePreview3(scope.row)">{{$t('trials:enrolledReviews:button:view')}}</el-button>
|
<el-button
|
||||||
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleEditCol(scope.row, 0, $t('trials:enrolledReviews:message:SOW'))">
|
type="text"
|
||||||
{{ $t('common:button:edit') }}</el-button>
|
size="small"
|
||||||
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleRemoveFile3(scope.row)">{{ $t('common:button:delete') }}</el-button>
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
|
@click="handlePreview3(scope.row)"
|
||||||
|
>{{ $t('trials:enrolledReviews:button:view') }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
|
@click="
|
||||||
|
handleEditCol(
|
||||||
|
scope.row,
|
||||||
|
0,
|
||||||
|
$t('trials:enrolledReviews:message:SOW')
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ $t('common:button:edit') }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
|
@click="handleRemoveFile3(scope.row)"
|
||||||
|
>{{ $t('common:button:delete') }}</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div style="margin-top:20px" v-if="!$route.query.ReviewStatus">
|
<div style="margin-top: 20px" v-if="!$route.query.ReviewStatus">
|
||||||
<span style="margin-right: 20px">
|
<span style="margin-right: 20px">
|
||||||
{{$t('trials:enrolledReviews:message:EQC')}}
|
{{ $t('trials:enrolledReviews:message:EQC') }}
|
||||||
</span>
|
</span>
|
||||||
<el-button size="small" type="primary" :disabled="$route.query.ReviewStatus === '1'" @click="addCol(1, $t('trials:enrolledReviews:message:EQC'))">{{$t('common:button:upload')}}</el-button>
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
|
@click="addCol(1, $t('trials:enrolledReviews:message:EQC'))"
|
||||||
|
>{{ $t('common:button:upload') }}</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="ackSowList" size="small" v-if="!$route.query.ReviewStatus">
|
<el-table :data="ackSowList" size="small" v-if="!$route.query.ReviewStatus">
|
||||||
<el-table-column type="index" width="40" />
|
<el-table-column type="index" width="40" />
|
||||||
<el-table-column :label="$t('system:Agreements:table:Criterion Type')" width="120">
|
<el-table-column
|
||||||
|
:label="$t('system:Agreements:table:Criterion Type')"
|
||||||
|
width="120"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.CriterionName }}
|
{{ scope.row.CriterionName }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="FileName" :label="$t('system:Agreements:table:Acknowledgement of SOW')" width="400" />
|
<el-table-column
|
||||||
<el-table-column prop="IsEnable" :label="$t('system:Agreements:table:Is Enable')" width="100">
|
prop="FileName"
|
||||||
|
:label="$t('system:Agreements:table:Acknowledgement of SOW')"
|
||||||
|
width="400"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="IsEnable"
|
||||||
|
:label="$t('system:Agreements:table:Is Enable')"
|
||||||
|
width="100"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="scope.row.IsEnable"
|
v-model="scope.row.IsEnable"
|
||||||
@@ -84,13 +180,45 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="Remark" :label="$t('system:Agreements:table:Remark')" width="200" />
|
<el-table-column
|
||||||
<el-table-column prop="CreateTime" :label="$t('system:Agreements:table:Upload Time')" width="150" />
|
prop="Remark"
|
||||||
<el-table-column label="Action" width="400">
|
:label="$t('system:Agreements:table:Remark')"
|
||||||
|
width="200"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="CreateTime"
|
||||||
|
:label="$t('system:Agreements:table:Upload Time')"
|
||||||
|
width="150"
|
||||||
|
/>
|
||||||
|
<el-table-column :label="$t('common:action:action')" width="400">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handlePreview3(scope.row)">{{$t('common:button:view')}}</el-button>
|
<el-button
|
||||||
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleEditCol(scope.row, 1, $t('trials:enrolledReviews:message:EQC'))">{{$t('common:button:edit')}}</el-button>
|
type="text"
|
||||||
<el-button type="text" size="small" :disabled="$route.query.ReviewStatus === '1'" @click="handleRemoveFile3(scope.row)">{{$t('common:button:delete')}}</el-button>
|
size="small"
|
||||||
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
|
@click="handlePreview3(scope.row)"
|
||||||
|
>{{ $t('common:button:view') }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
|
@click="
|
||||||
|
handleEditCol(
|
||||||
|
scope.row,
|
||||||
|
1,
|
||||||
|
$t('trials:enrolledReviews:message:EQC')
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>{{ $t('common:button:edit') }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
|
@click="handleRemoveFile3(scope.row)"
|
||||||
|
>{{ $t('common:button:delete') }}</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -103,7 +231,10 @@
|
|||||||
label-width="120px"
|
label-width="120px"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
<el-form-item :label="$t('system:Agreements:label:Criterion Type')" prop="CriterionType">
|
<el-form-item
|
||||||
|
:label="$t('system:Agreements:label:Criterion Type')"
|
||||||
|
prop="CriterionType"
|
||||||
|
>
|
||||||
<el-select v-model="form.CriterionType">
|
<el-select v-model="form.CriterionType">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item of $d.CriterionType"
|
v-for="item of $d.CriterionType"
|
||||||
@@ -113,7 +244,10 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('system:Agreements:label:File')" prop="FilePath">
|
<el-form-item
|
||||||
|
:label="$t('system:Agreements:label:File')"
|
||||||
|
prop="FilePath"
|
||||||
|
>
|
||||||
<el-upload
|
<el-upload
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
action
|
action
|
||||||
@@ -123,14 +257,25 @@
|
|||||||
:on-remove="handleRemoveFile2"
|
:on-remove="handleRemoveFile2"
|
||||||
:show-file-list="true"
|
:show-file-list="true"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
|
accept=".pdf"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
>
|
>
|
||||||
<el-button size="small" type="primary" :disabled="fileList.length > 0">{{$t('common:button:upload')}}</el-button>
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
:disabled="fileList.length > 0"
|
||||||
|
>{{ $t('common:button:upload') }}</el-button
|
||||||
|
>
|
||||||
|
<span>{{ $t('system:tip:file:pdf') }}</span>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('system:Agreements:label:Remark')">
|
<el-form-item :label="$t('system:Agreements:label:Remark')">
|
||||||
<el-input v-model="form.Remark" type="textarea"
|
<el-input
|
||||||
:autosize="{ minRows: 2, maxRows: 4}"></el-input>
|
v-model="form.Remark"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||||
|
:maxlength="4000"
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('system:Agreements:label:Is Enable')">
|
<el-form-item :label="$t('system:Agreements:label:Is Enable')">
|
||||||
<el-switch
|
<el-switch
|
||||||
@@ -142,8 +287,20 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<template slot="dialog-footer">
|
<template slot="dialog-footer">
|
||||||
<el-button :disabled="btnLoading" size="small" type="primary" @click="handleCancle">{{ $t('common:button:cancel') }}</el-button>
|
<el-button
|
||||||
<el-button size="small" type="primary" :loading="btnLoading" @click="handleSave">{{ $t('common:button:save') }}</el-button>
|
:disabled="btnLoading"
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
@click="handleCancle"
|
||||||
|
>{{ $t('common:button:cancel') }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
:loading="btnLoading"
|
||||||
|
@click="handleSave"
|
||||||
|
>{{ $t('common:button:save') }}</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</BaseModel>
|
</BaseModel>
|
||||||
</div>
|
</div>
|
||||||
@@ -151,25 +308,43 @@
|
|||||||
<script>
|
<script>
|
||||||
import { uploadFile } from '@/api/attachment'
|
import { uploadFile } from '@/api/attachment'
|
||||||
import UploadFiles from '@/components/UploadFiles'
|
import UploadFiles from '@/components/UploadFiles'
|
||||||
import { getDoctorSowList, getDoctorAckSowList, addDoctorCriterionFile, deleteDoctorCriterionFile, getDoctorCriterionFile } from '@/api/reviewers'
|
import {
|
||||||
|
getDoctorSowList,
|
||||||
|
getDoctorAckSowList,
|
||||||
|
addDoctorCriterionFile,
|
||||||
|
deleteDoctorCriterionFile,
|
||||||
|
getDoctorCriterionFile,
|
||||||
|
} from '@/api/reviewers'
|
||||||
import BaseModel from '@/components/BaseModel'
|
import BaseModel from '@/components/BaseModel'
|
||||||
import { DownloadCommonDoc } from '@/api/dictionary'
|
import { DownloadCommonDoc } from '@/api/dictionary'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Agreements',
|
name: 'Agreements',
|
||||||
components: {
|
components: {
|
||||||
UploadFiles, BaseModel
|
UploadFiles,
|
||||||
|
BaseModel,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
reviewerId: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
doctorId: this.$route.query.Id,
|
doctorId: this.$route.query.Id || this.reviewerId,
|
||||||
agreementList: [],
|
agreementList: [],
|
||||||
sowList: [],
|
sowList: [],
|
||||||
ackSowList: [],
|
ackSowList: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
isOpen: false,
|
isOpen: false,
|
||||||
btnLoading: false,
|
btnLoading: false,
|
||||||
model_cfg: { visible: false, showClose: true, width: '600px', title: '', appendToBody: true },
|
model_cfg: {
|
||||||
|
visible: false,
|
||||||
|
showClose: true,
|
||||||
|
width: '600px',
|
||||||
|
title: '',
|
||||||
|
appendToBody: true,
|
||||||
|
},
|
||||||
form: {
|
form: {
|
||||||
Remark: null,
|
Remark: null,
|
||||||
FileType: null,
|
FileType: null,
|
||||||
@@ -177,24 +352,56 @@ export default {
|
|||||||
FilePath: null,
|
FilePath: null,
|
||||||
DoctorId: null,
|
DoctorId: null,
|
||||||
CriterionType: null,
|
CriterionType: null,
|
||||||
IsEnable: false
|
IsEnable: false,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
CriterionType: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] }],
|
Remark: [
|
||||||
FilePath: [{ required: true, message: this.$t('common:ruleMessage:specify'), trigger: ['blur'] }],
|
{
|
||||||
|
max: 4000,
|
||||||
|
message: this.$t('form:rules:maxLength:4000'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
CriterionType: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
|
trigger: ['blur'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
FilePath: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t('common:ruleMessage:specify'),
|
||||||
|
trigger: ['blur'],
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
fileList: []
|
fileList: [],
|
||||||
|
accept: '.pdf',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
reviewerId() {
|
||||||
|
if (this.reviewerId) {
|
||||||
|
this.doctorId = this.reviewerId
|
||||||
|
this.initSowList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initSowList()
|
this.initSowList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleDownload(code) {
|
handleDownload(code) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
DownloadCommonDoc(code).then(data => {
|
DownloadCommonDoc(code)
|
||||||
this.loading = false
|
.then((data) => {
|
||||||
}).catch(() => { this.loading = false })
|
this.loading = false
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleEditCol(row, fileType, title) {
|
handleEditCol(row, fileType, title) {
|
||||||
this.model_cfg.visible = true
|
this.model_cfg.visible = true
|
||||||
@@ -206,7 +413,7 @@ export default {
|
|||||||
handleRemoveFile3(row) {
|
handleRemoveFile3(row) {
|
||||||
this.$confirm('确定删除?').then(() => {
|
this.$confirm('确定删除?').then(() => {
|
||||||
deleteDoctorCriterionFile({
|
deleteDoctorCriterionFile({
|
||||||
Id: row.Id
|
Id: row.Id,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.initSowList()
|
this.initSowList()
|
||||||
this.$message.success('删除成功')
|
this.$message.success('删除成功')
|
||||||
@@ -218,41 +425,79 @@ export default {
|
|||||||
this.form.FilePath = null
|
this.form.FilePath = null
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
},
|
},
|
||||||
beforeUpload() {
|
beforeUpload(row) {
|
||||||
if (this.fileList.length > 0) {
|
if (this.fileList.length > 0) {
|
||||||
this.$alert('最多只能传一个附件')
|
this.$alert('最多只能传一个附件')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (!this.checkFileSuffix(row.name)) {
|
||||||
|
this.$message.warning(`Must be in .pdf format`)
|
||||||
|
return false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handlePreview3(row) {
|
handlePreview3(row) {
|
||||||
|
return this.$preview({
|
||||||
|
path: row.FilePath,
|
||||||
|
type: 'pdf',
|
||||||
|
title: row.FileName,
|
||||||
|
})
|
||||||
if (row.FilePath) {
|
if (row.FilePath) {
|
||||||
window.open(this.OSSclientConfig.basePath + row.FilePath, '_blank')
|
window.open(this.OSSclientConfig.basePath + row.FilePath, '_blank')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handlePreview2(row, r2) {
|
handlePreview2(row, r2) {
|
||||||
|
return this.$preview({
|
||||||
|
path: row.fullPath,
|
||||||
|
type: 'pdf',
|
||||||
|
title: row.FileName,
|
||||||
|
})
|
||||||
if (row.fullPath) {
|
if (row.fullPath) {
|
||||||
window.open(this.OSSclientConfig.basePath + row.fullPath, '_blank')
|
window.open(this.OSSclientConfig.basePath + row.fullPath, '_blank')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
checkFileSuffix(fileName) {
|
||||||
|
var index = fileName.lastIndexOf('.')
|
||||||
|
var suffix = fileName.substring(index + 1, fileName.length)
|
||||||
|
return (
|
||||||
|
this.accept.toLocaleLowerCase().search(suffix.toLocaleLowerCase()) === 1
|
||||||
|
)
|
||||||
|
},
|
||||||
async handleUploadFile(param) {
|
async handleUploadFile(param) {
|
||||||
this.btnLoading = true
|
try {
|
||||||
var fileName = param.file.name
|
this.btnLoading = true
|
||||||
let file = await this.fileToBlob(param.file)
|
var fileName = param.file.name
|
||||||
let res = await this.OSSclient.put(`/SystemData/reviewer/${this.form.FileType === 0 ? '既往阅片情况声明' : '入项资格确认书'}/${this.doctorId}/${fileName}`, file)
|
let file = await this.fileToBlob(param.file)
|
||||||
this.form.FileName = param.file.name
|
let res = await this.OSSclient.put(
|
||||||
this.form.FilePath = this.$getObjectName(res.url)
|
`/SystemData/reviewer/${
|
||||||
this.fileList[0] = { name: this.$getObjectName(res.url), path: this.$getObjectName(res.url), fullPath: this.$getObjectName(res.url), url: res.url }
|
this.form.FileType === 0 ? '既往阅片情况声明' : '入项资格确认书'
|
||||||
this.btnLoading = false
|
}/${this.doctorId}/${fileName}`,
|
||||||
|
file
|
||||||
|
)
|
||||||
|
this.form.FileName = param.file.name
|
||||||
|
this.form.FilePath = this.$getObjectName(res.url)
|
||||||
|
this.fileList[0] = {
|
||||||
|
name: this.$getObjectName(res.url),
|
||||||
|
path: this.$getObjectName(res.url),
|
||||||
|
fullPath: this.$getObjectName(res.url),
|
||||||
|
url: res.url,
|
||||||
|
}
|
||||||
|
this.btnLoading = false
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleCancle() {
|
handleCancle() {
|
||||||
this.model_cfg.visible = false
|
this.model_cfg.visible = false
|
||||||
},
|
},
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs['DictionaryTypeConfigForm'].validate(valid => {
|
this.$refs['DictionaryTypeConfigForm'].validate((valid) => {
|
||||||
if (!valid) return
|
if (!valid) return
|
||||||
this.form.DoctorId = this.doctorId
|
this.form.DoctorId = this.doctorId
|
||||||
this.form.CriterionName = this.$fd('CriterionType', this.form.CriterionType)
|
this.form.CriterionName = this.$fd(
|
||||||
addDoctorCriterionFile(this.form).then(res => {
|
'CriterionType',
|
||||||
|
this.form.CriterionType
|
||||||
|
)
|
||||||
|
addDoctorCriterionFile(this.form).then((res) => {
|
||||||
this.$message.success('添加成功')
|
this.$message.success('添加成功')
|
||||||
this.initSowList()
|
this.initSowList()
|
||||||
this.handleCancle()
|
this.handleCancle()
|
||||||
@@ -267,7 +512,8 @@ export default {
|
|||||||
FileName: null,
|
FileName: null,
|
||||||
FilePath: null,
|
FilePath: null,
|
||||||
DoctorId: null,
|
DoctorId: null,
|
||||||
CriterionType: null
|
CriterionType: null,
|
||||||
|
IsEnable: false,
|
||||||
}
|
}
|
||||||
this.handleRemoveFile2()
|
this.handleRemoveFile2()
|
||||||
this.form.FileType = fileType
|
this.form.FileType = fileType
|
||||||
@@ -277,18 +523,24 @@ export default {
|
|||||||
if (!this.doctorId) return
|
if (!this.doctorId) return
|
||||||
getDoctorCriterionFile({
|
getDoctorCriterionFile({
|
||||||
fileType: 0,
|
fileType: 0,
|
||||||
DoctorId: this.doctorId
|
DoctorId: this.doctorId,
|
||||||
}).then(res => {
|
}).then((res) => {
|
||||||
this.sowList = res.Result
|
this.sowList = res.Result
|
||||||
})
|
})
|
||||||
getDoctorCriterionFile({
|
getDoctorCriterionFile({
|
||||||
fileType: 1,
|
fileType: 1,
|
||||||
DoctorId: this.doctorId
|
DoctorId: this.doctorId,
|
||||||
}).then(res => {
|
}).then((res) => {
|
||||||
this.ackSowList = res.Result
|
this.ackSowList = res.Result
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handlePreview(row) {
|
handlePreview(row) {
|
||||||
|
console.log(row)
|
||||||
|
return this.$preview({
|
||||||
|
path: row.FullPath,
|
||||||
|
type: 'pdf',
|
||||||
|
title: row.FileName,
|
||||||
|
})
|
||||||
if (row.FullPath) {
|
if (row.FullPath) {
|
||||||
window.open(this.OSSclientConfig.basePath + row.FullPath, '_blank')
|
window.open(this.OSSclientConfig.basePath + row.FullPath, '_blank')
|
||||||
}
|
}
|
||||||
@@ -298,12 +550,12 @@ export default {
|
|||||||
},
|
},
|
||||||
getFileList(fileList) {
|
getFileList(fileList) {
|
||||||
this.agreementList = fileList
|
this.agreementList = fileList
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.resumes-container{
|
.resumes-container {
|
||||||
p {
|
p {
|
||||||
float: left;
|
float: left;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
@@ -314,5 +566,4 @@ export default {
|
|||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -15,31 +15,65 @@
|
|||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item v-if="basicInfo.ReviewerCode" :label="$t('system:reviewer:label:Id')">
|
<el-form-item
|
||||||
<el-input v-model="basicInfo.ReviewerCode" disabled size="small" />
|
v-if="basicInfo.ReviewerCode"
|
||||||
|
:label="$t('system:reviewer:label:Id')"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="basicInfo.ReviewerCode"
|
||||||
|
disabled
|
||||||
|
size="small"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('system:reviewer:label:LastName')" prop="LastName">
|
<el-form-item
|
||||||
<el-input v-model="basicInfo.LastName" :disabled="$route.query.ReviewStatus === '1'" size="small" />
|
:label="$t('system:reviewer:label:LastName')"
|
||||||
|
prop="LastName"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="basicInfo.LastName"
|
||||||
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
|
size="small"
|
||||||
|
:maxlength="400"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('system:reviewer:label:FirstName')" prop="FirstName">
|
<el-form-item
|
||||||
<el-input v-model="basicInfo.FirstName" :disabled="$route.query.ReviewStatus === '1'" size="small" />
|
:label="$t('system:reviewer:label:FirstName')"
|
||||||
|
prop="FirstName"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="basicInfo.FirstName"
|
||||||
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
|
size="small"
|
||||||
|
:maxlength="400"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('system:reviewer:label:NameCN')" prop="ChineseName">
|
<el-form-item
|
||||||
<el-input v-model="basicInfo.ChineseName" :disabled="$route.query.ReviewStatus === '1'" size="small" />
|
:label="$t('system:reviewer:label:NameCN')"
|
||||||
|
prop="ChineseName"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="basicInfo.ChineseName"
|
||||||
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
|
size="small"
|
||||||
|
:maxlength="400"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('system:reviewer:label:Gender')" prop="Sex">
|
<el-form-item
|
||||||
|
:label="$t('system:reviewer:label:Gender')"
|
||||||
|
prop="Sex"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="basicInfo.Sex"
|
v-model="basicInfo.Sex"
|
||||||
prop="Sex"
|
prop="Sex"
|
||||||
@@ -59,12 +93,23 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('system:reviewer:label:Phone')" prop="Phone">
|
<el-form-item
|
||||||
<el-input :disabled="$route.query.ReviewStatus === '1'" v-model="basicInfo.Phone" size="small" />
|
:label="$t('system:reviewer:label:Phone')"
|
||||||
|
prop="Phone"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
|
v-model="basicInfo.Phone"
|
||||||
|
size="small"
|
||||||
|
:maxlength="400"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('system:reviewer:label:Title')" prop="TitleIds">
|
<el-form-item
|
||||||
|
:label="$t('system:reviewer:label:Title')"
|
||||||
|
prop="TitleIds"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
:disabled="$route.query.ReviewStatus === '1'"
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
v-model="basicInfo.TitleIds[0]"
|
v-model="basicInfo.TitleIds[0]"
|
||||||
@@ -89,15 +134,23 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item :label="$t('system:reviewer:label:Email')" prop="EMail">
|
<el-form-item
|
||||||
<el-input v-model="basicInfo.EMail" :disabled="$route.query.ReviewStatus === '1'" size="small" />
|
:label="$t('system:reviewer:label:Email')"
|
||||||
|
prop="EMail"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="basicInfo.EMail"
|
||||||
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
|
size="small"
|
||||||
|
:maxlength="400"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="12">-->
|
<!-- <el-col :span="12">-->
|
||||||
<!-- <el-form-item label="WeChat: " prop="WeChat">-->
|
<!-- <el-form-item label="WeChat: " prop="WeChat">-->
|
||||||
<!-- <el-input v-model="basicInfo.WeChat" :disabled="$route.query.ReviewStatus === '1'" size="small" />-->
|
<!-- <el-input v-model="basicInfo.WeChat" :disabled="$route.query.ReviewStatus === '1'" size="small" />-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<!-- <el-form-item label="Payment Type: " prop="Nation">
|
<!-- <el-form-item label="Payment Type: " prop="Nation">
|
||||||
<el-radio-group v-model="basicInfo.Nation">
|
<el-radio-group v-model="basicInfo.Nation">
|
||||||
@@ -106,7 +159,10 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
|
|
||||||
<el-form-item :label="$t('system:reviewer:label:Country')" prop="Nation">
|
<el-form-item
|
||||||
|
:label="$t('system:reviewer:label:Country')"
|
||||||
|
prop="Nation"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
:disabled="$route.query.ReviewStatus === '1'"
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
v-model="basicInfo.Nation"
|
v-model="basicInfo.Nation"
|
||||||
@@ -114,13 +170,18 @@
|
|||||||
clearable
|
clearable
|
||||||
class="mr"
|
class="mr"
|
||||||
>
|
>
|
||||||
<el-option v-for="item of $d.AttendedReviewerType" :value="item.value" :label="item.label" :key="item.id"/>
|
<el-option
|
||||||
|
v-for="item of $d.AttendedReviewerType"
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:key="item.id"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- <el-row>-->
|
<!-- <el-row>-->
|
||||||
<!-- </el-row>-->
|
<!-- </el-row>-->
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item style="margin-left: 120px">
|
<el-form-item style="margin-left: 120px">
|
||||||
<el-button
|
<el-button
|
||||||
@@ -129,7 +190,9 @@
|
|||||||
:loading="isDisabled"
|
:loading="isDisabled"
|
||||||
size="small"
|
size="small"
|
||||||
@click="handleSave"
|
@click="handleSave"
|
||||||
> {{ $t('common:button:save') }}</el-button>
|
>
|
||||||
|
{{ $t('common:button:save') }}</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -142,6 +205,15 @@ import { getBasicInfo, addOrUpdateDoctorBasicInfo } from '@/api/reviewers'
|
|||||||
import { changeURLStatic } from '@/utils/history.js'
|
import { changeURLStatic } from '@/utils/history.js'
|
||||||
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
|
import { getBasicDataSelects } from '@/api/dictionary/dictionary'
|
||||||
export default {
|
export default {
|
||||||
|
props: {
|
||||||
|
reviewerId: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
isSystem: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
basicInfo: {
|
basicInfo: {
|
||||||
@@ -156,58 +228,86 @@ export default {
|
|||||||
EMail: '',
|
EMail: '',
|
||||||
WeChat: '',
|
WeChat: '',
|
||||||
Introduction: '',
|
Introduction: '',
|
||||||
Nation: 0
|
Nation: 0,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
FirstName: [
|
FirstName: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: 'Please enter FirstName',
|
message: 'Please enter FirstName',
|
||||||
trigger: 'blur'
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
max: 400,
|
||||||
|
message: this.$t('form:rules:maxLength:400'),
|
||||||
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
{ max: 50, message: 'The maximum length is 50' }
|
|
||||||
],
|
],
|
||||||
LastName: [
|
LastName: [
|
||||||
{ required: true, message: 'Please enter LastName', trigger: 'blur' },
|
{ required: true, message: 'Please enter LastName', trigger: 'blur' },
|
||||||
{ max: 50, message: 'The maximum length is 50' }
|
{
|
||||||
|
max: 400,
|
||||||
|
message: this.$t('form:rules:maxLength:400'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
ChineseName: [
|
||||||
|
{
|
||||||
|
max: 400,
|
||||||
|
message: this.$t('form:rules:maxLength:400'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
ChineseName: [{ max: 50, message: 'The maximum length is 50' }],
|
|
||||||
Sex: [
|
Sex: [
|
||||||
{ required: true, message: 'Please select gender', trigger: 'blur' }
|
{ required: true, message: 'Please select gender', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
TitleIds: [
|
TitleIds: [
|
||||||
{ required: true, message: 'Please select Title', trigger: 'blur' }
|
{ required: true, message: 'Please select Title', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
Phone: [
|
Phone: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: 'Please enter phone number',
|
message: 'Please enter phone number',
|
||||||
trigger: 'blur'
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
max: 400,
|
||||||
|
message: this.$t('form:rules:maxLength:400'),
|
||||||
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
{ max: 20, min: 7, message: 'The length is 7 to 20' }
|
|
||||||
],
|
],
|
||||||
EMail: [
|
EMail: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: 'Please input the email address',
|
message: 'Please input the email address',
|
||||||
trigger: 'blur'
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'email',
|
type: 'email',
|
||||||
message: 'Please input the correct email address',
|
message: 'Please input the correct email address',
|
||||||
trigger: 'blur,change'
|
trigger: 'blur,change',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
max: 400,
|
||||||
|
message: this.$t('form:rules:maxLength:400'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
WeChat: [
|
||||||
|
{
|
||||||
|
max: 400,
|
||||||
|
message: this.$t('form:rules:maxLength:400'),
|
||||||
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
{ max: 50, message: 'The maximum length is 50' }
|
|
||||||
],
|
],
|
||||||
WeChat: [{ max: 50, message: 'The maximum length is 50' }]
|
|
||||||
},
|
},
|
||||||
isDisabled: false,
|
isDisabled: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
genderOptions: [
|
genderOptions: [
|
||||||
{ label: 'Male', value: 0 },
|
{ label: 'Male', value: 0 },
|
||||||
{ label: 'Female', value: 1 }
|
{ label: 'Female', value: 1 },
|
||||||
],
|
],
|
||||||
dictionaryList: {}
|
dictionaryList: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -227,7 +327,12 @@ export default {
|
|||||||
this.$message.success('Saved successfully')
|
this.$message.success('Saved successfully')
|
||||||
if (!this.id) {
|
if (!this.id) {
|
||||||
this.basicInfo.Id = res.Result.Id
|
this.basicInfo.Id = res.Result.Id
|
||||||
changeURLStatic('Id', res.Result.Id)
|
if (this.isSystem) {
|
||||||
|
changeURLStatic('Id', res.Result.Id)
|
||||||
|
}
|
||||||
|
if (!this.reviewerId) {
|
||||||
|
this.$emit('update:reviewerId', res.Result.Id)
|
||||||
|
}
|
||||||
this.basicInfo.ReviewerCode = res.Result.ReviewerCode
|
this.basicInfo.ReviewerCode = res.Result.ReviewerCode
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -241,27 +346,29 @@ export default {
|
|||||||
async initForm() {
|
async initForm() {
|
||||||
await this.getDicData()
|
await this.getDicData()
|
||||||
|
|
||||||
const id = this.$route.query.Id
|
const id = this.$route.query.Id || this.reviewerId
|
||||||
if (id) {
|
if (id) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getBasicInfo(id).then((res) => {
|
getBasicInfo(id)
|
||||||
// eslint-disable-next-line no-unused-vars
|
.then((res) => {
|
||||||
const { TitleList, ...param } = res.Result
|
// eslint-disable-next-line no-unused-vars
|
||||||
this.basicInfo = param
|
const { TitleList, ...param } = res.Result
|
||||||
this.loading = false
|
this.basicInfo = param
|
||||||
}).catch(() => {
|
this.loading = false
|
||||||
this.loading = false
|
})
|
||||||
})
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getDicData() {
|
getDicData() {
|
||||||
getBasicDataSelects(['Title']).then(res => {
|
getBasicDataSelects(['Title'])
|
||||||
this.dictionaryList = { ...res.Result }
|
.then((res) => {
|
||||||
}).catch(() => {
|
this.dictionaryList = { ...res.Result }
|
||||||
|
})
|
||||||
})
|
.catch(() => {})
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -2,73 +2,90 @@
|
|||||||
<div class="credentials-container">
|
<div class="credentials-container">
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<el-card class="e-card">
|
<el-card class="e-card">
|
||||||
<p class="title">{{$t('system:Credentials:title:Diploma of the highest medical degree')}}
|
<p class="title">
|
||||||
|
{{
|
||||||
|
$t('system:Credentials:title:Diploma of the highest medical degree')
|
||||||
|
}}
|
||||||
</p>
|
</p>
|
||||||
<upload-file :doctor-id="doctorId" type="Diploma of the highest medical degree" />
|
<upload-file
|
||||||
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_DiplomaOfTheHighestMedicalDegree_Template')">-->
|
:doctor-id="doctorId"
|
||||||
<!-- <i class="el-icon-view el-icon-download"></i>-->
|
type="Diploma of the highest medical degree"
|
||||||
<!-- Template-->
|
/>
|
||||||
<!-- </el-button>-->
|
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_DiplomaOfTheHighestMedicalDegree_Template')">-->
|
||||||
|
<!-- <i class="el-icon-view el-icon-download"></i>-->
|
||||||
|
<!-- Template-->
|
||||||
|
<!-- </el-button>-->
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="e-card">
|
<el-card class="e-card">
|
||||||
<p class="title">{{$t('system:Credentials:title:Medical Qualification Certificate')}}
|
<p class="title">
|
||||||
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_MedicalQualificationCertificate_Template')">-->
|
{{ $t('system:Credentials:title:Medical Qualification Certificate') }}
|
||||||
<!-- <i class="el-icon-view el-icon-download"></i>-->
|
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_MedicalQualificationCertificate_Template')">-->
|
||||||
<!-- Template-->
|
<!-- <i class="el-icon-view el-icon-download"></i>-->
|
||||||
<!-- </el-button>-->
|
<!-- Template-->
|
||||||
|
<!-- </el-button>-->
|
||||||
</p>
|
</p>
|
||||||
<upload-file :doctor-id="doctorId" type="Medical Qualification Certificate" />
|
<upload-file
|
||||||
|
:doctor-id="doctorId"
|
||||||
|
type="Medical Qualification Certificate"
|
||||||
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="e-card">
|
<el-card class="e-card">
|
||||||
<p class="title">{{$t('system:Credentials:title:Practice License')}}
|
<p class="title">
|
||||||
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_PracticeLicense_Template')">-->
|
{{ $t('system:Credentials:title:Practice License') }}
|
||||||
<!-- <i class="el-icon-view el-icon-download"></i>-->
|
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_PracticeLicense_Template')">-->
|
||||||
<!-- Template-->
|
<!-- <i class="el-icon-view el-icon-download"></i>-->
|
||||||
<!-- </el-button>-->
|
<!-- Template-->
|
||||||
|
<!-- </el-button>-->
|
||||||
</p>
|
</p>
|
||||||
<upload-file :doctor-id="doctorId" type="Practice License" />
|
<upload-file :doctor-id="doctorId" type="Practice License" />
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
<h6 style="line-height:30px;font-size:13px;">{{$t('system:Credentials:title:Modality Certificate')}}</h6>
|
<h6 style="line-height: 30px; font-size: 13px">
|
||||||
|
{{ $t('system:Credentials:title:Modality Certificate') }}
|
||||||
|
</h6>
|
||||||
<div class="clearfix">
|
<div class="clearfix">
|
||||||
<el-card class="e-card">
|
<el-card class="e-card">
|
||||||
<p class="title">CT
|
<p class="title">
|
||||||
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_CT_Template')">-->
|
CT
|
||||||
<!-- <i class="el-icon-view el-icon-download"></i>-->
|
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_CT_Template')">-->
|
||||||
<!-- Template-->
|
<!-- <i class="el-icon-view el-icon-download"></i>-->
|
||||||
<!-- </el-button>-->
|
<!-- Template-->
|
||||||
|
<!-- </el-button>-->
|
||||||
</p>
|
</p>
|
||||||
<upload-file :doctor-id="doctorId" type="Modality Certificate(CT)" />
|
<upload-file :doctor-id="doctorId" type="Modality Certificate(CT)" />
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="e-card">
|
<el-card class="e-card">
|
||||||
<p class="title">MRI
|
<p class="title">
|
||||||
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_MRI_Template')">-->
|
MRI
|
||||||
<!-- <i class="el-icon-view el-icon-download"></i>-->
|
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_MRI_Template')">-->
|
||||||
<!-- Template-->
|
<!-- <i class="el-icon-view el-icon-download"></i>-->
|
||||||
<!-- </el-button>-->
|
<!-- Template-->
|
||||||
|
<!-- </el-button>-->
|
||||||
</p>
|
</p>
|
||||||
<upload-file :doctor-id="doctorId" type="Modality Certificate(MRI)" />
|
<upload-file :doctor-id="doctorId" type="Modality Certificate(MRI)" />
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="e-card">
|
<el-card class="e-card">
|
||||||
<p class="title">NM
|
<p class="title">
|
||||||
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_NM_Template')">-->
|
NM
|
||||||
<!-- <i class="el-icon-view el-icon-download"></i>-->
|
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_NM_Template')">-->
|
||||||
<!-- Template-->
|
<!-- <i class="el-icon-view el-icon-download"></i>-->
|
||||||
<!-- </el-button>-->
|
<!-- Template-->
|
||||||
|
<!-- </el-button>-->
|
||||||
</p>
|
</p>
|
||||||
<upload-file :doctor-id="doctorId" type="Modality Certificate(NM)" />
|
<upload-file :doctor-id="doctorId" type="Modality Certificate(NM)" />
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card class="e-card">
|
<el-card class="e-card">
|
||||||
<p class="title">US
|
<p class="title">
|
||||||
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_US_Template')">-->
|
US
|
||||||
<!-- <i class="el-icon-view el-icon-download"></i>-->
|
<!-- <el-button size="mini" type="primary" style="position: absolute;bottom:10px;right: 10px;" @click="handleDownload('Reviewer_US_Template')">-->
|
||||||
<!-- Template-->
|
<!-- <i class="el-icon-view el-icon-download"></i>-->
|
||||||
<!-- </el-button>-->
|
<!-- Template-->
|
||||||
|
<!-- </el-button>-->
|
||||||
</p>
|
</p>
|
||||||
<upload-file :doctor-id="doctorId" type="Modality Certificate(US)" />
|
<upload-file :doctor-id="doctorId" type="Modality Certificate(US)" />
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -80,41 +97,56 @@ import UploadFile from '@/components/UploadFile'
|
|||||||
import { DownloadCommonDoc } from '@/api/dictionary'
|
import { DownloadCommonDoc } from '@/api/dictionary'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
UploadFile
|
UploadFile,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
reviewerId: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
doctorId: this.$route.query.Id
|
doctorId: this.$route.query.Id || this.reviewerId,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
reviewerId() {
|
||||||
|
if (this.reviewerId) {
|
||||||
|
this.doctorId = this.reviewerId
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleDownload(code) {
|
handleDownload(code) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
DownloadCommonDoc(code).then(data => {
|
DownloadCommonDoc(code)
|
||||||
this.loading = false
|
.then((data) => {
|
||||||
}).catch(() => { this.loading = false })
|
this.loading = false
|
||||||
}
|
})
|
||||||
}
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.credentials-container{
|
.credentials-container {
|
||||||
.e-card {
|
.e-card {
|
||||||
width: 32.5%;
|
width: 32.5%;
|
||||||
height: 180px;
|
height: 180px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
position: relative;
|
position: relative;
|
||||||
float: left;
|
float: left;
|
||||||
margin: 0px 10px 5px 0px;
|
margin: 0px 10px 5px 0px;
|
||||||
.title{
|
.title {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
h6{
|
h6 {
|
||||||
margin:0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div style="width:80%;">
|
<div style="width: 80%">
|
||||||
<el-form
|
<el-form
|
||||||
ref="employmentForm"
|
ref="employmentForm"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
@@ -10,26 +10,28 @@
|
|||||||
class="demo-ruleForm"
|
class="demo-ruleForm"
|
||||||
label-width="150px"
|
label-width="150px"
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<el-form-item :label="$t('system:reviewer:label:Hospital')" prop="HospitalId">
|
<el-form-item
|
||||||
|
:label="$t('system:reviewer:label:Hospital')"
|
||||||
|
prop="HospitalId"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="employmentForm.HospitalId"
|
v-model="employmentForm.HospitalId"
|
||||||
placeholder="select"
|
placeholder="select"
|
||||||
:disabled="$route.query.ReviewStatus === '1'"
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
style="width:100%;"
|
style="width: 100%"
|
||||||
size="small"
|
size="small"
|
||||||
@change="handleHospitalChange"
|
@change="handleHospitalChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item,index) in hospitalList"
|
v-for="(item, index) in hospitalList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item.HospitalName"
|
:label="isEN ? item.HospitalName : item.HospitalNameCN"
|
||||||
:value="item.Id"
|
:value="item.Id"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
{{ item.HospitalName }}
|
{{ isEN ? item.HospitalName : item.HospitalNameCN }}
|
||||||
</span>
|
</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -39,13 +41,16 @@
|
|||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<el-form-item :label="$t('system:reviewer:label:AffiliatedUniversity')">
|
<el-form-item
|
||||||
|
:label="$t('system:reviewer:label:AffiliatedUniversity')"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
:disabled="$route.query.ReviewStatus === '1'"
|
disabled
|
||||||
v-model="UniversityAffiliated"
|
v-model="UniversityAffiliated"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
autosize
|
autosize
|
||||||
size="small"
|
size="small"
|
||||||
|
:maxlength="4000"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -53,33 +58,51 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<el-form-item :label="$t('system:reviewer:label:City')">
|
<el-form-item :label="$t('system:reviewer:label:City')">
|
||||||
<el-input :disabled="$route.query.ReviewStatus === '1'" v-model="City" size="small" />
|
<el-input
|
||||||
|
disabled
|
||||||
|
v-model="City"
|
||||||
|
size="small"
|
||||||
|
:maxlength="400"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<el-form-item :label="$t('system:reviewer:label:State/Province')">
|
<el-form-item :label="$t('system:reviewer:label:State/Province')">
|
||||||
<el-input :disabled="$route.query.ReviewStatus === '1'" v-model="Province" size="small" />
|
<el-input
|
||||||
|
disabled
|
||||||
|
v-model="Province"
|
||||||
|
size="small"
|
||||||
|
:maxlength="400"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<el-form-item :label="$t('system:reviewer:label:Country')">
|
<el-form-item :label="$t('system:reviewer:label:Country')">
|
||||||
<el-input :disabled="$route.query.ReviewStatus === '1'" v-model="Country" size="small" />
|
<el-input
|
||||||
|
disabled
|
||||||
|
v-model="Country"
|
||||||
|
size="small"
|
||||||
|
:maxlength="400"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<el-form-item :label="$t('system:reviewer:label:Department')" prop="DepartmentId">
|
<el-form-item
|
||||||
|
:label="$t('system:reviewer:label:Department')"
|
||||||
|
prop="DepartmentId"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="employmentForm.DepartmentId"
|
v-model="employmentForm.DepartmentId"
|
||||||
placeholder="select"
|
placeholder="select"
|
||||||
:disabled="$route.query.ReviewStatus === '1'"
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
style="width:100%;"
|
style="width: 100%"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
<!-- <el-option
|
<!-- <el-option
|
||||||
@@ -94,27 +117,40 @@
|
|||||||
:label="item.Value"
|
:label="item.Value"
|
||||||
:value="item.Id"
|
:value="item.Id"
|
||||||
/>
|
/>
|
||||||
<el-option label="Other" :value="otherId" />
|
<el-option
|
||||||
|
:label="$t('curriculumVitae:selectLabel:Other')"
|
||||||
|
:value="otherId"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item v-if="employmentForm.DepartmentId===otherId" class="other-item" prop="DepartmentOther">
|
<el-form-item
|
||||||
|
v-if="employmentForm.DepartmentId === otherId"
|
||||||
|
class="other-item"
|
||||||
|
prop="DepartmentOther"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
:disabled="$route.query.ReviewStatus === '1'"
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
v-model="employmentForm.DepartmentOther"
|
v-model="employmentForm.DepartmentOther"
|
||||||
placeholder="Please specify (required)"
|
placeholder="Please specify (required)"
|
||||||
size="small"
|
size="small"
|
||||||
|
:maxlength="400"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item v-if="employmentForm.DepartmentId===otherId" class="other-item" prop="DepartmentOtherCN">
|
<el-form-item
|
||||||
|
v-if="employmentForm.DepartmentId === otherId"
|
||||||
|
class="other-item"
|
||||||
|
prop="DepartmentOtherCN"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
:disabled="$route.query.ReviewStatus === '1'"
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
v-model="employmentForm.DepartmentOtherCN"
|
v-model="employmentForm.DepartmentOtherCN"
|
||||||
placeholder="请用中文注明"
|
placeholder="请用中文注明"
|
||||||
size="small"
|
size="small"
|
||||||
|
:maxlength="400"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -122,13 +158,16 @@
|
|||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<el-form-item :label="$t('system:reviewer:label:Rank')" prop="RankId">
|
<el-form-item
|
||||||
|
:label="$t('system:reviewer:label:Rank')"
|
||||||
|
prop="RankId"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
:disabled="$route.query.ReviewStatus === '1'"
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
v-model="employmentForm.RankId"
|
v-model="employmentForm.RankId"
|
||||||
placeholder="select"
|
placeholder="select"
|
||||||
@change="RankChange"
|
@change="RankChange"
|
||||||
style="width:100%;"
|
style="width: 100%"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
<!-- <el-option
|
<!-- <el-option
|
||||||
@@ -143,124 +182,93 @@
|
|||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
<!-- <el-option label="Other" :value="otherId" />-->
|
<!-- <el-option label="Other" :value="otherId" />-->
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item v-if="$fd('Rank', employmentForm.RankId, 'id') === '其它' || $fd('Rank', employmentForm.RankId, 'id') === 'Other'" class="other-item" prop="RankOther">
|
<el-form-item
|
||||||
|
v-if="
|
||||||
|
$fd('Rank', employmentForm.RankId, 'id') ===
|
||||||
|
$t('curriculumVitae:selectLabel:Other')
|
||||||
|
"
|
||||||
|
class="other-item"
|
||||||
|
prop="RankOther"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
:disabled="$route.query.ReviewStatus === '1'"
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
v-model="employmentForm.RankOther"
|
v-model="employmentForm.RankOther"
|
||||||
placeholder="Please specify"
|
placeholder="Please specify"
|
||||||
size="small"
|
size="small"
|
||||||
|
:maxlength="400"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-form-item v-if="$fd('Rank', employmentForm.RankId, 'id') === '其它' || $fd('Rank', employmentForm.RankId, 'id') === 'Other'" class="other-item" prop="RankOtherCN">
|
<el-form-item
|
||||||
|
v-if="
|
||||||
|
$fd('Rank', employmentForm.RankId, 'id') ===
|
||||||
|
$t('curriculumVitae:selectLabel:Other')
|
||||||
|
"
|
||||||
|
class="other-item"
|
||||||
|
prop="RankOtherCN"
|
||||||
|
>
|
||||||
<el-input
|
<el-input
|
||||||
:disabled="$route.query.ReviewStatus === '1'"
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
v-model="employmentForm.RankOtherCN"
|
v-model="employmentForm.RankOtherCN"
|
||||||
placeholder="请用中文注明"
|
placeholder="请用中文注明"
|
||||||
size="small"
|
size="small"
|
||||||
|
:maxlength="400"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="14">
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('system:reviewer:label:WorkPartTime')"
|
||||||
|
prop="WorkPartTime"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
|
v-model="employmentForm.WorkPartTime"
|
||||||
|
type="textarea"
|
||||||
|
:rows="2"
|
||||||
|
:placeholder="
|
||||||
|
$t('curriculumVitae:info:form:placeholder:partTimeJob')
|
||||||
|
"
|
||||||
|
size="small"
|
||||||
|
:maxlength="4000"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="14">
|
||||||
|
<el-form-item prop="WorkPartTimeEn">
|
||||||
|
<el-input
|
||||||
|
:disabled="$route.query.ReviewStatus === '1'"
|
||||||
|
v-model="employmentForm.WorkPartTimeEn"
|
||||||
|
type="textarea"
|
||||||
|
:rows="2"
|
||||||
|
:placeholder="
|
||||||
|
$t('curriculumVitae:info:form:placeholder:partTimeJobEN')
|
||||||
|
"
|
||||||
|
size="small"
|
||||||
|
:maxlength="4000"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- <el-row>-->
|
|
||||||
<!-- <el-col :span="14">-->
|
|
||||||
<!-- <el-form-item label="Physician: " prop="PhysicianId" >-->
|
|
||||||
<!-- <el-select-->
|
|
||||||
<!-- v-model="employmentForm.PhysicianId"-->
|
|
||||||
<!-- placeholder="select"-->
|
|
||||||
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
|
|
||||||
<!-- @change="PhysicianChange"-->
|
|
||||||
<!-- style="width:100%;"-->
|
|
||||||
<!-- size="small"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="item of $d.PhysicianOriginal"-->
|
|
||||||
<!-- :key="item.id"-->
|
|
||||||
<!-- :label="item.raw.Value"-->
|
|
||||||
<!-- :value="item.id"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="5">-->
|
|
||||||
<!-- <el-form-item v-if="$fd('PhysicianOriginal', employmentForm.PhysicianId, 'id') === '其它' || $fd('PhysicianOriginal', employmentForm.PhysicianId, 'id') === 'Other'" class="other-item" prop="Physician">-->
|
|
||||||
<!-- <el-input-->
|
|
||||||
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
|
|
||||||
<!-- v-model="employmentForm.Physician"-->
|
|
||||||
<!-- placeholder="Please specify"-->
|
|
||||||
<!-- size="small"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="5">-->
|
|
||||||
<!-- <el-form-item v-if="$fd('PhysicianOriginal', employmentForm.PhysicianId, 'id') === '其它' || $fd('PhysicianOriginal', employmentForm.PhysicianId, 'id') === 'Other'" class="other-item" prop="PhysicianCN">-->
|
|
||||||
<!-- <el-input-->
|
|
||||||
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
|
|
||||||
<!-- v-model="employmentForm.PhysicianCN"-->
|
|
||||||
<!-- placeholder="请用中文注明"-->
|
|
||||||
<!-- size="small"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- </el-row>-->
|
|
||||||
<!-- <el-row>-->
|
|
||||||
<!-- <el-col :span="14">-->
|
|
||||||
<!-- <el-form-item label="Position: " prop="PositionId">-->
|
|
||||||
<!-- <el-select-->
|
|
||||||
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
|
|
||||||
<!-- v-model="employmentForm.PositionId"-->
|
|
||||||
<!-- placeholder="select"-->
|
|
||||||
<!-- style="width:100%;"-->
|
|
||||||
<!-- size="small"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <!– <el-option-->
|
|
||||||
<!-- v-for="(key,value) of dictionaryList.Position"-->
|
|
||||||
<!-- :key="key"-->
|
|
||||||
<!-- :label="key"-->
|
|
||||||
<!-- :value="value"-->
|
|
||||||
<!-- /> –>-->
|
|
||||||
<!-- <el-option-->
|
|
||||||
<!-- v-for="item of dictionaryList.Position"-->
|
|
||||||
<!-- :key="item.Id"-->
|
|
||||||
<!-- :label="item.Value"-->
|
|
||||||
<!-- :value="item.Id"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- <el-option label="Other" :value="otherId" />-->
|
|
||||||
<!-- <el-option label="None" value="f30a074b-2b47-4a92-97ec-e15086d37883" />-->
|
|
||||||
<!-- </el-select>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="5">-->
|
|
||||||
<!-- <el-form-item v-if="employmentForm.PositionId===otherId" class="other-item" prop="PositionOther">-->
|
|
||||||
<!-- <el-input-->
|
|
||||||
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
|
|
||||||
<!-- v-model="employmentForm.PositionOther"-->
|
|
||||||
<!-- placeholder="Please specify"-->
|
|
||||||
<!-- size="small"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="5">-->
|
|
||||||
<!-- <el-form-item v-if="employmentForm.PositionId===otherId" class="other-item" prop="PositionOtherCN">-->
|
|
||||||
<!-- <el-input-->
|
|
||||||
<!-- :disabled="$route.query.ReviewStatus === '1'"-->
|
|
||||||
<!-- v-model="employmentForm.PositionOtherCN"-->
|
|
||||||
<!-- placeholder="请用中文注明"-->
|
|
||||||
<!-- size="small"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- </el-row>-->
|
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" :disabled="isDisabled || $route.query.ReviewStatus === '1'" size="small" @click="handleSave">{{ $t('common:button:save') }}</el-button>
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
:disabled="isDisabled || $route.query.ReviewStatus === '1'"
|
||||||
|
size="small"
|
||||||
|
@click="handleSave"
|
||||||
|
>{{ $t('common:button:save') }}</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -274,9 +282,14 @@ import store from '@/store'
|
|||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
export default {
|
export default {
|
||||||
name: 'Employment',
|
name: 'Employment',
|
||||||
|
props: {
|
||||||
|
reviewerId: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
const RankIndication = (rule, value, callback) => {
|
const RankIndication = (rule, value, callback) => {
|
||||||
if (value === '其它' || value === 'Other') {
|
if (value === this.$t('curriculumVitae:selectLabel:Other')) {
|
||||||
if (!this.trialForm.IndicationOther) {
|
if (!this.trialForm.IndicationOther) {
|
||||||
return callback(new Error('请输入适应症'))
|
return callback(new Error('请输入适应症'))
|
||||||
}
|
}
|
||||||
@@ -284,7 +297,7 @@ export default {
|
|||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
const PhysicianIndication = (rule, value, callback) => {
|
const PhysicianIndication = (rule, value, callback) => {
|
||||||
if (value === '其它' || value === 'Other') {
|
if (value === this.$t('curriculumVitae:selectLabel:Other')) {
|
||||||
if (!this.trialForm.IndicationOther) {
|
if (!this.trialForm.IndicationOther) {
|
||||||
return callback(new Error('请输入适应症'))
|
return callback(new Error('请输入适应症'))
|
||||||
}
|
}
|
||||||
@@ -293,7 +306,7 @@ export default {
|
|||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
employmentForm: {
|
employmentForm: {
|
||||||
Id: this.$route.query.Id,
|
Id: this.$route.query.Id || this.reviewerId,
|
||||||
DepartmentId: '',
|
DepartmentId: '',
|
||||||
DepartmentOther: '',
|
DepartmentOther: '',
|
||||||
DepartmentOtherCN: '',
|
DepartmentOtherCN: '',
|
||||||
@@ -307,49 +320,138 @@ export default {
|
|||||||
PhysicianId: '',
|
PhysicianId: '',
|
||||||
Physician: '',
|
Physician: '',
|
||||||
PhysicianCN: '',
|
PhysicianCN: '',
|
||||||
PhysicianOriginal: null
|
PhysicianOriginal: null,
|
||||||
|
WorkPartTime: null,
|
||||||
|
WorkPartTimeEn: null,
|
||||||
},
|
},
|
||||||
UniversityAffiliated: '',
|
UniversityAffiliated: '',
|
||||||
City: '',
|
City: '',
|
||||||
Province: '',
|
Province: '',
|
||||||
Country: '',
|
Country: '',
|
||||||
employmentRules: {
|
employmentRules: {
|
||||||
DepartmentId: [{ required: true, message: 'Please select department', trigger: 'blur' }],
|
DepartmentId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: 'Please select department',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
DepartmentOther: [
|
DepartmentOther: [
|
||||||
{ required: true, message: 'Please specify', trigger: 'blur' },
|
{ required: true, message: 'Please specify', trigger: 'blur' },
|
||||||
{ max: 50, message: 'The maximum length is 50' }
|
{
|
||||||
|
max: 400,
|
||||||
|
message: this.$t('form:rules:maxLength:400'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
DepartmentOtherCN: [
|
||||||
|
{
|
||||||
|
max: 400,
|
||||||
|
message: this.$t('form:rules:maxLength:400'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
RankId: [
|
||||||
|
{ required: true, message: 'Please select rank', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
RankOther: [
|
||||||
|
{ required: true, message: 'Please select rank', trigger: 'blur' },
|
||||||
|
{
|
||||||
|
max: 400,
|
||||||
|
message: this.$t('form:rules:maxLength:400'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
RankOtherCN: [
|
||||||
|
{ required: true, message: 'Please select rank', trigger: 'blur' },
|
||||||
|
{
|
||||||
|
max: 400,
|
||||||
|
message: this.$t('form:rules:maxLength:400'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
PhysicianId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: 'Please select Physician',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
Physician: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: 'Please select Physician',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
max: 400,
|
||||||
|
message: this.$t('form:rules:maxLength:400'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
PhysicianCN: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: 'Please select Physician',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
max: 400,
|
||||||
|
message: this.$t('form:rules:maxLength:400'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
PositionId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: 'Please select position',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
PositionOther: [
|
||||||
|
{
|
||||||
|
max: 400,
|
||||||
|
message: this.$t('form:rules:maxLength:400'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
PositionOtherCN: [
|
||||||
|
{
|
||||||
|
max: 400,
|
||||||
|
message: this.$t('form:rules:maxLength:400'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
HospitalId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: 'Please select hospital',
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
DepartmentOtherCN: [{ max: 50, message: 'The maximum length is 50' }],
|
|
||||||
RankId: [{ required: true, message: 'Please select rank', trigger: 'blur' }],
|
|
||||||
RankOther: [{ required: true, message: 'Please select rank', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
|
|
||||||
RankOtherCN: [{ required: true, message: 'Please select rank', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
|
|
||||||
PhysicianId: [{ required: true, message: 'Please select Physician', trigger: 'blur' }],
|
|
||||||
Physician: [{ required: true, message: 'Please select Physician', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
|
|
||||||
PhysicianCN: [{ required: true, message: 'Please select Physician', trigger: 'blur' }, { max: 50, message: 'The maximum length is 50' }],
|
|
||||||
PositionId: [{ required: true, message: 'Please select position', trigger: 'blur' }],
|
|
||||||
PositionOther: [{ max: 50, message: 'The maximum length is 50' }],
|
|
||||||
PositionOtherCN: [{ max: 50, message: 'The maximum length is 50' }],
|
|
||||||
HospitalId: [{ required: true, message: 'Please select hospital', trigger: 'blur' }]
|
|
||||||
},
|
},
|
||||||
isDisabled: false,
|
isDisabled: false,
|
||||||
selectId: '00000000-0000-0000-0000-000000000000',
|
selectId: '00000000-0000-0000-0000-000000000000',
|
||||||
otherId: 'ef84e9cb-f1a6-49d7-b6da-34be2c12abd5',
|
otherId: 'ef84e9cb-f1a6-49d7-b6da-34be2c12abd5',
|
||||||
loading: false,
|
loading: false,
|
||||||
dictionaryList: {}
|
dictionaryList: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['hospitalList'])
|
...mapGetters(['hospitalList']),
|
||||||
|
isEN() {
|
||||||
|
return this.$i18n.locale !== 'zh'
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initEmployment()
|
this.initEmployment()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
RankChange(val) {
|
RankChange(val) {
|
||||||
var o = this.$d.Rank.find(v => {
|
var o = this.$d.Rank.find((v) => {
|
||||||
return v.id === val
|
return v.id === val
|
||||||
})
|
})
|
||||||
if (o.label === '其它' || o.label === 'Other') {
|
if (o.label === this.$t('curriculumVitae:selectLabel:Other')) {
|
||||||
this.employmentForm.RankOther = ''
|
this.employmentForm.RankOther = ''
|
||||||
this.employmentForm.RankOtherCN = ''
|
this.employmentForm.RankOtherCN = ''
|
||||||
} else {
|
} else {
|
||||||
@@ -358,10 +460,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
PhysicianChange(val) {
|
PhysicianChange(val) {
|
||||||
var o = this.$d.PhysicianOriginal.find(v => {
|
var o = this.$d.PhysicianOriginal.find((v) => {
|
||||||
return v.id === val
|
return v.id === val
|
||||||
})
|
})
|
||||||
if (o.label === '其它' || o.label === 'Other') {
|
if (o.label === this.$t('curriculumVitae:selectLabel:Other')) {
|
||||||
this.employmentForm.Physician = ''
|
this.employmentForm.Physician = ''
|
||||||
this.employmentForm.PhysicianCN = ''
|
this.employmentForm.PhysicianCN = ''
|
||||||
} else {
|
} else {
|
||||||
@@ -370,7 +472,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSave() {
|
handleSave() {
|
||||||
this.$refs.employmentForm.validate(valid => {
|
this.$refs.employmentForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.isDisabled = true
|
this.isDisabled = true
|
||||||
@@ -378,67 +480,116 @@ export default {
|
|||||||
// var o = this.$d.PhysicianOriginal.find(v => {
|
// var o = this.$d.PhysicianOriginal.find(v => {
|
||||||
// return v.id === this.employmentForm.PhysicianId
|
// return v.id === this.employmentForm.PhysicianId
|
||||||
// })
|
// })
|
||||||
param.Id = this.$route.query.Id
|
param.Id = this.$route.query.Id || this.reviewerId
|
||||||
param.DepartmentId = this.employmentForm.DepartmentId
|
param.DepartmentId = this.employmentForm.DepartmentId
|
||||||
param.DepartmentOther = this.employmentForm.DepartmentId === this.otherId ? this.employmentForm.DepartmentOther : ''
|
param.WorkPartTime = this.employmentForm.WorkPartTime
|
||||||
param.DepartmentOtherCN = this.employmentForm.DepartmentId === this.otherId ? this.employmentForm.DepartmentOtherCN : ''
|
param.WorkPartTimeEn = this.employmentForm.WorkPartTimeEn
|
||||||
|
param.DepartmentOther =
|
||||||
|
this.employmentForm.DepartmentId === this.otherId
|
||||||
|
? this.employmentForm.DepartmentOther
|
||||||
|
: ''
|
||||||
|
param.DepartmentOtherCN =
|
||||||
|
this.employmentForm.DepartmentId === this.otherId
|
||||||
|
? this.employmentForm.DepartmentOtherCN
|
||||||
|
: ''
|
||||||
param.RankId = this.employmentForm.RankId
|
param.RankId = this.employmentForm.RankId
|
||||||
param.RankOther = this.employmentForm.RankId === this.otherId ? this.employmentForm.RankOther : ''
|
param.RankOther =
|
||||||
param.RankOtherCN = this.employmentForm.RankId === this.otherId ? this.employmentForm.RankOtherCN : ''
|
this.employmentForm.RankId === this.otherId
|
||||||
|
? this.employmentForm.RankOther
|
||||||
|
: ''
|
||||||
|
param.RankOtherCN =
|
||||||
|
this.employmentForm.RankId === this.otherId
|
||||||
|
? this.employmentForm.RankOtherCN
|
||||||
|
: ''
|
||||||
// param.PhysicianId = this.employmentForm.PhysicianId
|
// param.PhysicianId = this.employmentForm.PhysicianId
|
||||||
// param.Physician = o.label !== '其它' && o.label !== 'Other' ? o.raw.Value : this.employmentForm.Physician
|
// param.Physician = o.label !== '其它' && o.label !== 'Other' ? o.raw.Value : this.employmentForm.Physician
|
||||||
// param.PhysicianCN = o.label !== '其它' && o.label !== 'Other' ? o.raw.ValueCN : this.employmentForm.PhysicianCN
|
// param.PhysicianCN = o.label !== '其它' && o.label !== 'Other' ? o.raw.ValueCN : this.employmentForm.PhysicianCN
|
||||||
param.PositionId = this.employmentForm.PositionId
|
param.PositionId = this.employmentForm.PositionId
|
||||||
param.PositionOther = this.employmentForm.PositionId === this.otherId ? this.employmentForm.PositionOther : ''
|
param.PositionOther =
|
||||||
param.PositionOtherCN = this.employmentForm.PositionId === this.otherId ? this.employmentForm.PositionOtherCN : ''
|
this.employmentForm.PositionId === this.otherId
|
||||||
|
? this.employmentForm.PositionOther
|
||||||
|
: ''
|
||||||
|
param.PositionOtherCN =
|
||||||
|
this.employmentForm.PositionId === this.otherId
|
||||||
|
? this.employmentForm.PositionOtherCN
|
||||||
|
: ''
|
||||||
param.HospitalId = this.employmentForm.HospitalId
|
param.HospitalId = this.employmentForm.HospitalId
|
||||||
|
|
||||||
updateEmploymentInfo(param).then(res => {
|
updateEmploymentInfo(param)
|
||||||
this.isDisabled = false
|
.then((res) => {
|
||||||
this.loading = false
|
this.isDisabled = false
|
||||||
this.$message.success('Saved successfully')
|
this.loading = false
|
||||||
if (!this.id) {
|
this.$message.success('Saved successfully')
|
||||||
this.employmentForm.Id = res.Result
|
if (!this.id) {
|
||||||
}
|
this.employmentForm.Id = res.Result
|
||||||
}).catch(() => {
|
}
|
||||||
this.isDisabled = false
|
})
|
||||||
this.loading = false
|
.catch(() => {
|
||||||
})
|
this.isDisabled = false
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
initForm() {
|
initForm() {
|
||||||
const id = this.$route.query.Id
|
const id = this.$route.query.Id || this.reviewerId
|
||||||
if (id) {
|
if (id) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getEmploymentInfo(id).then(res => {
|
getEmploymentInfo(id)
|
||||||
const { PhysicianId, Physician, PhysicianCN, DepartmentId, DepartmentOther, DepartmentOtherCN, RankId, RankOther, RankOtherCN, PositionId, PositionOther, PositionOtherCN, HospitalId } = res.Result
|
.then((res) => {
|
||||||
this.employmentForm.Id = id
|
const {
|
||||||
this.employmentForm.DepartmentId = DepartmentId === this.selectId ? '' : DepartmentId
|
PhysicianId,
|
||||||
this.employmentForm.DepartmentOther = DepartmentOther
|
Physician,
|
||||||
this.employmentForm.DepartmentOtherCN = DepartmentOtherCN
|
PhysicianCN,
|
||||||
this.employmentForm.RankId = RankId === this.selectId ? '' : RankId
|
DepartmentId,
|
||||||
this.employmentForm.RankOther = RankOther
|
DepartmentOther,
|
||||||
this.employmentForm.RankOtherCN = RankOtherCN
|
DepartmentOtherCN,
|
||||||
this.employmentForm.PositionId = PositionId === this.selectId ? '' : PositionId
|
RankId,
|
||||||
this.employmentForm.PositionOther = PositionOther
|
RankOther,
|
||||||
this.employmentForm.PhysicianId = PhysicianId
|
RankOtherCN,
|
||||||
this.employmentForm.Physician = Physician
|
PositionId,
|
||||||
this.employmentForm.PhysicianCN = PhysicianCN
|
PositionOther,
|
||||||
this.employmentForm.PositionOtherCN = PositionOtherCN
|
PositionOtherCN,
|
||||||
this.employmentForm.HospitalId = HospitalId === this.selectId ? '' : HospitalId
|
HospitalId,
|
||||||
this.handleHospitalChange(this.employmentForm.HospitalId)
|
WorkPartTime,
|
||||||
this.loading = false
|
WorkPartTimeEn,
|
||||||
}).catch(() => { this.loading = false })
|
} = res.Result
|
||||||
|
this.employmentForm.WorkPartTime = WorkPartTime
|
||||||
|
this.employmentForm.WorkPartTimeEn = WorkPartTimeEn
|
||||||
|
this.employmentForm.Id = id
|
||||||
|
this.employmentForm.DepartmentId =
|
||||||
|
DepartmentId === this.selectId ? '' : DepartmentId
|
||||||
|
this.employmentForm.DepartmentOther = DepartmentOther
|
||||||
|
this.employmentForm.DepartmentOtherCN = DepartmentOtherCN
|
||||||
|
this.employmentForm.RankId = RankId === this.selectId ? '' : RankId
|
||||||
|
this.employmentForm.RankOther = RankOther
|
||||||
|
this.employmentForm.RankOtherCN = RankOtherCN
|
||||||
|
this.employmentForm.PositionId =
|
||||||
|
PositionId === this.selectId ? '' : PositionId
|
||||||
|
this.employmentForm.PositionOther = PositionOther
|
||||||
|
this.employmentForm.PhysicianId = PhysicianId
|
||||||
|
this.employmentForm.Physician = Physician
|
||||||
|
this.employmentForm.PhysicianCN = PhysicianCN
|
||||||
|
this.employmentForm.PositionOtherCN = PositionOtherCN
|
||||||
|
this.employmentForm.HospitalId =
|
||||||
|
HospitalId === this.selectId ? '' : HospitalId
|
||||||
|
this.handleHospitalChange(this.employmentForm.HospitalId)
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleHospitalChange(value) {
|
handleHospitalChange(value) {
|
||||||
const item = this.hospitalList.filter(item => item.Id === value)
|
const item = this.hospitalList.filter((item) => item.Id === value)
|
||||||
if (item.length) {
|
if (item.length) {
|
||||||
this.UniversityAffiliated = item[0].UniversityAffiliated
|
this.UniversityAffiliated = this.isEN
|
||||||
this.City = item[0].City
|
? item[0].UniversityAffiliated
|
||||||
this.Province = item[0].Province
|
: item[0].UniversityAffiliatedCN
|
||||||
this.Country = item[0].Country
|
this.City = this.isEN ? item[0].City : item[0].CityCN
|
||||||
|
this.Province = this.isEN ? item[0].Province : item[0].ProvinceCN
|
||||||
|
this.Country = this.isEN ? item[0].Country : item[0].CountryCN
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async initEmployment() {
|
async initEmployment() {
|
||||||
@@ -447,15 +598,15 @@ export default {
|
|||||||
this.initForm()
|
this.initForm()
|
||||||
},
|
},
|
||||||
getDicData() {
|
getDicData() {
|
||||||
getBasicDataSelects(['Department', 'Rank', 'Position']).then(res => {
|
getBasicDataSelects(['Department', 'Rank', 'Position']).then((res) => {
|
||||||
this.dictionaryList = { ...res.Result }
|
this.dictionaryList = { ...res.Result }
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.other-item .el-form-item__content{
|
.other-item .el-form-item__content {
|
||||||
margin-left: 80px !important;
|
margin-left: 80px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,11 +1,47 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="gcp-container">
|
<div class="gcp-container">
|
||||||
<el-radio-group v-model="GCP" style="margin-bottom:20px">
|
<el-radio-group v-model="GCP" style="margin-bottom: 20px">
|
||||||
<el-radio :label="1">{{ $t('system:GcpCertificate:radio:Yes') }}</el-radio>
|
<el-radio :label="1">{{
|
||||||
|
$t('system:GcpCertificate:radio:Yes')
|
||||||
|
}}</el-radio>
|
||||||
<el-radio :label="0">{{ $t('system:GcpCertificate:radio:No') }}</el-radio>
|
<el-radio :label="0">{{ $t('system:GcpCertificate:radio:No') }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
<el-form
|
||||||
|
ref="certificateFrom"
|
||||||
|
v-loading="saveBtnLoading"
|
||||||
|
:model="certificateForm"
|
||||||
|
:rules="certificateRules"
|
||||||
|
label-width="80px"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('curriculumVitae:clinicalTrials:form:CertificateTime')"
|
||||||
|
prop="GCPTime"
|
||||||
|
v-if="GCP"
|
||||||
|
>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="certificateForm.GCPTime"
|
||||||
|
type="date"
|
||||||
|
placeholder=""
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
format="yyyy-MM-dd"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('curriculumVitae:clinicalTrials:form:certificateHospital')"
|
||||||
|
prop="GCPAgencies"
|
||||||
|
v-if="GCP"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="certificateForm.GCPAgencies"
|
||||||
|
clearable
|
||||||
|
:maxlength="400"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
<div v-if="GCP" class="upload-container">
|
<div v-if="GCP" class="upload-container">
|
||||||
<!-- <upload-file :doctor-id="doctorId" type="GCP" />-->
|
<!-- <upload-file :doctor-id="doctorId" type="GCP" />-->
|
||||||
<el-upload
|
<el-upload
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
action
|
action
|
||||||
@@ -19,12 +55,23 @@
|
|||||||
:on-exceed="handleExceed"
|
:on-exceed="handleExceed"
|
||||||
accept=".pdf"
|
accept=".pdf"
|
||||||
>
|
>
|
||||||
<el-button size="small" type="primary" :loading="btnDisabled">{{ $t('system:GcpCertificate:upload:Upload') }}</el-button>
|
<el-button size="small" type="primary" :loading="btnDisabled">{{
|
||||||
<span slot="tip" style="margin-left:10px;" class="el-upload__tip">{{ $t('system:tip:file:pdf') }}</span>
|
$t('system:GcpCertificate:upload:Upload')
|
||||||
|
}}</el-button>
|
||||||
|
<span slot="tip" style="margin-left: 10px" class="el-upload__tip">{{
|
||||||
|
$t('system:tip:file:pdf')
|
||||||
|
}}</span>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button :loading="saveBtnLoading" :disabled="(fileList.length === 0 && GCP === 1)" type="primary" size="small" style="margin-top:20px" @click="handleSaveGCP">
|
<el-button
|
||||||
|
:loading="saveBtnLoading"
|
||||||
|
:disabled="fileList.length === 0 && GCP === 1"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
style="margin-top: 20px"
|
||||||
|
@click="handleSaveGCP"
|
||||||
|
>
|
||||||
{{ $t('common:button:save') }}
|
{{ $t('common:button:save') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,26 +79,43 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import UploadFile from '@/components/UploadFile'
|
import UploadFile from '@/components/UploadFile'
|
||||||
import { uploadFile, deleteAttachment, getAttachmentByType, saveAttachments } from '@/api/attachment'
|
import {
|
||||||
|
uploadFile,
|
||||||
|
deleteAttachment,
|
||||||
|
getAttachmentByType,
|
||||||
|
saveAttachments,
|
||||||
|
} from '@/api/attachment'
|
||||||
import { updateGcpExperience } from '@/api/reviewers'
|
import { updateGcpExperience } from '@/api/reviewers'
|
||||||
|
const defaultCertificateForm = () => {
|
||||||
|
return {
|
||||||
|
GCPTime: '',
|
||||||
|
GCPAgencies: '',
|
||||||
|
}
|
||||||
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'GcpCertificate',
|
name: 'GcpCertificate',
|
||||||
components: {
|
components: {
|
||||||
UploadFile
|
UploadFile,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
doctorId: {
|
doctorId: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true,
|
||||||
},
|
},
|
||||||
gcp: {
|
gcp: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0
|
default: 0,
|
||||||
},
|
},
|
||||||
gcpId: {
|
gcpId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: '',
|
||||||
}
|
},
|
||||||
|
DATA: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -59,7 +123,17 @@ export default {
|
|||||||
btnDisabled: false,
|
btnDisabled: false,
|
||||||
saveBtnLoading: false,
|
saveBtnLoading: false,
|
||||||
GCP: 0,
|
GCP: 0,
|
||||||
GCPID: ''
|
GCPID: '',
|
||||||
|
certificateForm: defaultCertificateForm(),
|
||||||
|
certificateRules: {
|
||||||
|
GCPAgencies: [
|
||||||
|
{
|
||||||
|
max: 400,
|
||||||
|
message: this.$t('form:rules:maxLength:400'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -68,7 +142,16 @@ export default {
|
|||||||
},
|
},
|
||||||
gcpId(val) {
|
gcpId(val) {
|
||||||
this.GCPID = val
|
this.GCPID = val
|
||||||
}
|
},
|
||||||
|
DATA: {
|
||||||
|
handler() {
|
||||||
|
Object.keys(this.certificateForm).forEach((key) => {
|
||||||
|
this.certificateForm[key] = this.DATA[key]
|
||||||
|
})
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initFileList()
|
this.initFileList()
|
||||||
@@ -76,48 +159,53 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
handleSaveGCP() {
|
handleSaveGCP() {
|
||||||
if (this.GCP && this.GCPID === '') {
|
if (this.GCP && this.GCPID === '') {
|
||||||
this.$message.info(this.$t('reviewers:GCPCertificate:message:uploadValid'))
|
this.$message.info(
|
||||||
|
this.$t('reviewers:GCPCertificate:message:uploadValid')
|
||||||
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const param = {
|
const param = {
|
||||||
Id: this.doctorId,
|
Id: this.doctorId,
|
||||||
GCP: this.GCP,
|
GCP: this.GCP,
|
||||||
GCPId: this.GCP ? this.GCPID : ''
|
GCPId: this.GCP ? this.GCPID : '',
|
||||||
|
GCPTime: this.GCP ? this.certificateForm.GCPTime : '',
|
||||||
|
GCPAgencies: this.GCP ? this.certificateForm.GCPAgencies : '',
|
||||||
}
|
}
|
||||||
this.saveBtnLoading = true
|
this.saveBtnLoading = true
|
||||||
updateGcpExperience(param).then(res => {
|
updateGcpExperience(param)
|
||||||
if (this.GCP === 0) {
|
.then((res) => {
|
||||||
this.fileList = []
|
if (this.GCP === 0) {
|
||||||
}
|
this.fileList = []
|
||||||
this.saveBtnLoading = false
|
}
|
||||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
this.saveBtnLoading = false
|
||||||
}).catch(() => {
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
this.saveBtnLoading = false
|
})
|
||||||
})
|
.catch(() => {
|
||||||
|
this.saveBtnLoading = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
initFileList() {
|
initFileList() {
|
||||||
if(!this.doctorId) return
|
if (!this.doctorId) return
|
||||||
getAttachmentByType(this.doctorId, 'GCP')
|
getAttachmentByType(this.doctorId, 'GCP').then((res) => {
|
||||||
.then(res => {
|
if (res.IsSuccess) {
|
||||||
if (res.IsSuccess) {
|
if (res.Result.length > 0) {
|
||||||
if (res.Result.length > 0) {
|
this.fileList = this.formatterFileList(res.Result)
|
||||||
this.fileList = this.formatterFileList(res.Result)
|
} else {
|
||||||
} else {
|
this.fileList = []
|
||||||
this.fileList = []
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
formatterFileList(list) {
|
formatterFileList(list) {
|
||||||
var arr = []
|
var arr = []
|
||||||
list.forEach(item => {
|
list.forEach((item) => {
|
||||||
var data = {
|
var data = {
|
||||||
name: item.FileName,
|
name: item.FileName,
|
||||||
path: item.Path,
|
path: item.Path,
|
||||||
fullPath: item.FullPath,
|
fullPath: item.FullPath,
|
||||||
id: item.Id,
|
id: item.Id,
|
||||||
type: item.Type
|
type: item.Type,
|
||||||
}
|
}
|
||||||
arr.push(data)
|
arr.push(data)
|
||||||
})
|
})
|
||||||
@@ -127,8 +215,17 @@ export default {
|
|||||||
var fileName = param.file.name
|
var fileName = param.file.name
|
||||||
this.btnDisabled = true
|
this.btnDisabled = true
|
||||||
const file = await this.fileToBlob(param.file)
|
const file = await this.fileToBlob(param.file)
|
||||||
const res = await this.OSSclient.put(`/SystemData/reviewer/GCP/${this.doctorId}/${fileName}`, file)
|
const res = await this.OSSclient.put(
|
||||||
this.fileList.push({ name: fileName, path: this.$getObjectName(res.url), fullPath: this.$getObjectName(res.url),url: this.$getObjectName(res.url), type: 'GCP' })
|
`/SystemData/reviewer/GCP/${this.doctorId}/${fileName}`,
|
||||||
|
file
|
||||||
|
)
|
||||||
|
this.fileList.push({
|
||||||
|
name: fileName,
|
||||||
|
path: this.$getObjectName(res.url),
|
||||||
|
fullPath: this.$getObjectName(res.url),
|
||||||
|
url: this.$getObjectName(res.url),
|
||||||
|
type: 'GCP',
|
||||||
|
})
|
||||||
this.saveFile()
|
this.saveFile()
|
||||||
},
|
},
|
||||||
// uploadFile(param) {
|
// uploadFile(param) {
|
||||||
@@ -147,15 +244,24 @@ export default {
|
|||||||
// },
|
// },
|
||||||
saveFile() {
|
saveFile() {
|
||||||
const { name, path, fullPath, type } = this.fileList[0]
|
const { name, path, fullPath, type } = this.fileList[0]
|
||||||
const param = [{ DoctorId: this.doctorId, Type: type, Path: path, FullPath: fullPath, FileName: name }]
|
const param = [
|
||||||
saveAttachments(param).then(res => {
|
{
|
||||||
this.btnDisabled = false
|
DoctorId: this.doctorId,
|
||||||
if (res.IsSuccess) {
|
Type: type,
|
||||||
this.fileList[0].id = res.Result[0].Id
|
Path: path,
|
||||||
this.GCPID = res.Result[0].Id
|
FullPath: fullPath,
|
||||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
FileName: name,
|
||||||
}
|
},
|
||||||
})
|
]
|
||||||
|
saveAttachments(param)
|
||||||
|
.then((res) => {
|
||||||
|
this.btnDisabled = false
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.fileList[0].id = res.Result[0].Id
|
||||||
|
this.GCPID = res.Result[0].Id
|
||||||
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
|
}
|
||||||
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
this.btnDisabled = false
|
this.btnDisabled = false
|
||||||
})
|
})
|
||||||
@@ -177,19 +283,19 @@ export default {
|
|||||||
handleRemoveFile(file, fileList) {
|
handleRemoveFile(file, fileList) {
|
||||||
if (file && file.status === 'success') {
|
if (file && file.status === 'success') {
|
||||||
if (file.id) {
|
if (file.id) {
|
||||||
deleteAttachment(file.id, file.path).then(res => {
|
deleteAttachment(file.id, file.path).then((res) => {
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
this.GCPID = ''
|
this.GCPID = ''
|
||||||
this.$message({
|
this.$message({
|
||||||
message: this.$t('common:message:deletedSuccessfully'),
|
message: this.$t('common:message:deletedSuccessfully'),
|
||||||
type: 'success'
|
type: 'success',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.fileList = []
|
this.fileList = []
|
||||||
this.GCPID = ''
|
this.GCPID = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -202,18 +308,20 @@ export default {
|
|||||||
this.$message.warning(`Upload is currently limited to 1 file`)
|
this.$message.warning(`Upload is currently limited to 1 file`)
|
||||||
},
|
},
|
||||||
fileValid(fileName, typeArr) {
|
fileValid(fileName, typeArr) {
|
||||||
var extendName = fileName.substring(fileName.lastIndexOf('.') + 1).toLocaleLowerCase()
|
var extendName = fileName
|
||||||
|
.substring(fileName.lastIndexOf('.') + 1)
|
||||||
|
.toLocaleLowerCase()
|
||||||
if (typeArr.indexOf(extendName) > -1) {
|
if (typeArr.indexOf(extendName) > -1) {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.gcp-container{
|
.gcp-container {
|
||||||
.upload-container .el-upload--text {
|
.upload-container .el-upload--text {
|
||||||
border: none;
|
border: none;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user