国际化不区分路由

uat_us
熊飞 2024-01-11 10:21:45 +08:00
parent 4421a1900e
commit 631f79e219
8 changed files with 322 additions and 31 deletions

268
package-lock.json generated
View File

@ -3084,6 +3084,7 @@
"dev": true,
"optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
},
@ -4092,6 +4093,13 @@
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
"dev": true
},
"@zxing/text-encoding": {
"version": "0.9.0",
"resolved": "https://registry.npmmirror.com/@zxing/text-encoding/-/text-encoding-0.9.0.tgz",
"integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==",
"dev": true,
"optional": true
},
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/abbrev/-/abbrev-1.1.1.tgz",
@ -4595,6 +4603,87 @@
"resolved": "https://registry.npmmirror.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
"integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw=="
},
"aws-sdk": {
"version": "2.1532.0",
"resolved": "https://registry.npmmirror.com/aws-sdk/-/aws-sdk-2.1532.0.tgz",
"integrity": "sha512-4QVQs01LEAxo7UpSHlq/HaO+SJ1WrYF8W1otO2WhKpVRYXkSxXIgZgfYaK+sQ762XTtB6tSuD2ZS2HGsKNXVLw==",
"dev": true,
"requires": {
"buffer": "4.9.2",
"events": "1.1.1",
"ieee754": "1.1.13",
"jmespath": "0.16.0",
"querystring": "0.2.0",
"sax": "1.2.1",
"url": "0.10.3",
"util": "^0.12.4",
"uuid": "8.0.0",
"xml2js": "0.5.0"
},
"dependencies": {
"buffer": {
"version": "4.9.2",
"resolved": "https://registry.npmmirror.com/buffer/-/buffer-4.9.2.tgz",
"integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==",
"dev": true,
"requires": {
"base64-js": "^1.0.2",
"ieee754": "^1.1.4",
"isarray": "^1.0.0"
}
},
"events": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/events/-/events-1.1.1.tgz",
"integrity": "sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==",
"dev": true
},
"ieee754": {
"version": "1.1.13",
"resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.1.13.tgz",
"integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==",
"dev": true
},
"punycode": {
"version": "1.3.2",
"resolved": "https://registry.npmmirror.com/punycode/-/punycode-1.3.2.tgz",
"integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==",
"dev": true
},
"sax": {
"version": "1.2.1",
"resolved": "https://registry.npmmirror.com/sax/-/sax-1.2.1.tgz",
"integrity": "sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==",
"dev": true
},
"url": {
"version": "0.10.3",
"resolved": "https://registry.npmmirror.com/url/-/url-0.10.3.tgz",
"integrity": "sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==",
"dev": true,
"requires": {
"punycode": "1.3.2",
"querystring": "0.2.0"
}
},
"uuid": {
"version": "8.0.0",
"resolved": "https://registry.npmmirror.com/uuid/-/uuid-8.0.0.tgz",
"integrity": "sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==",
"dev": true
},
"xml2js": {
"version": "0.5.0",
"resolved": "https://registry.npmmirror.com/xml2js/-/xml2js-0.5.0.tgz",
"integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==",
"dev": true,
"requires": {
"sax": ">=0.6.0",
"xmlbuilder": "~11.0.0"
}
}
}
},
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmmirror.com/aws-sign2/-/aws-sign2-0.7.0.tgz",
@ -4997,6 +5086,16 @@
"resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz",
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA=="
},
"bindings": {
"version": "1.5.0",
"resolved": "https://registry.npmmirror.com/bindings/-/bindings-1.5.0.tgz",
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"dev": true,
"optional": true,
"requires": {
"file-uri-to-path": "1.0.0"
}
},
"bl": {
"version": "4.1.0",
"resolved": "https://registry.npmmirror.com/bl/-/bl-4.1.0.tgz",
@ -5027,6 +5126,28 @@
"inherits": "~2.0.0"
}
},
"block-stream2": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/block-stream2/-/block-stream2-2.1.0.tgz",
"integrity": "sha512-suhjmLI57Ewpmq00qaygS8UgEq2ly2PCItenIyhMqVjo4t4pGzqMvfgJuX8iWTeSDdfSSqS6j38fL4ToNL7Pfg==",
"dev": true,
"requires": {
"readable-stream": "^3.4.0"
},
"dependencies": {
"readable-stream": {
"version": "3.6.2",
"resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"dev": true,
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
}
}
},
"bluebird": {
"version": "3.7.2",
"resolved": "https://registry.npmmirror.com/bluebird/-/bluebird-3.7.2.tgz",
@ -5164,6 +5285,12 @@
"resolved": "https://registry.npmmirror.com/brorand/-/brorand-1.1.0.tgz",
"integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w=="
},
"browser-or-node": {
"version": "2.1.1",
"resolved": "https://registry.npmmirror.com/browser-or-node/-/browser-or-node-2.1.1.tgz",
"integrity": "sha512-8CVjaLJGuSKMVTxJ2DpBl5XnlNDiT4cQFeuCJJrvJmts9YrTZDizTX7PjC2s6W4x+MBGZeEY6dGMrF04/6Hgqg==",
"dev": true
},
"browserify-aes": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/browserify-aes/-/browserify-aes-1.2.0.tgz",
@ -8333,6 +8460,15 @@
"integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
"dev": true
},
"fast-xml-parser": {
"version": "4.3.3",
"resolved": "https://registry.npmmirror.com/fast-xml-parser/-/fast-xml-parser-4.3.3.tgz",
"integrity": "sha512-coV/D1MhrShMvU6D0I+VAK3umz6hUaxxhL0yp/9RjfiYUfAv14rDhGQL+PLForhMdr0wq3PiV07WtkkNjJjNHg==",
"dev": true,
"requires": {
"strnum": "^1.0.5"
}
},
"fastest-levenshtein": {
"version": "1.0.16",
"resolved": "https://registry.npmmirror.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz",
@ -8406,6 +8542,13 @@
"resolved": "https://registry.npmmirror.com/file-saver/-/file-saver-2.0.5.tgz",
"integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA=="
},
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
"dev": true,
"optional": true
},
"filesize": {
"version": "3.6.1",
"resolved": "https://registry.npmmirror.com/filesize/-/filesize-3.6.1.tgz",
@ -10330,6 +10473,12 @@
"integrity": "sha512-JVAfqNPTvNq3sB/VHQJAFxN/sPgKnsKrCwyRt15zwNCdrMMJDdcEOdubuy+DuJYYdm0ox1J4uzEuYKkN+9yhVg==",
"dev": true
},
"jmespath": {
"version": "0.16.0",
"resolved": "https://registry.npmmirror.com/jmespath/-/jmespath-0.16.0.tgz",
"integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==",
"dev": true
},
"js-base64": {
"version": "2.6.4",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
@ -10400,6 +10549,12 @@
"integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
"dev": true
},
"json-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/json-stream/-/json-stream-1.0.0.tgz",
"integrity": "sha512-H/ZGY0nIAg3QcOwE1QN/rK/Fa7gJn7Ii5obwp6zyPO4xiPNwpIMjqy2gwjBEGqzkF/vSWEIBQCBuN19hYiL6Qg==",
"dev": true
},
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
@ -11202,6 +11357,84 @@
"resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="
},
"minio": {
"version": "7.1.3",
"resolved": "https://registry.npmmirror.com/minio/-/minio-7.1.3.tgz",
"integrity": "sha512-xPrLjWkTT5E7H7VnzOjF//xBp9I40jYB4aWhb2xTFopXXfw+Wo82DDWngdUju7Doy3Wk7R8C4LAgwhLHHnf0wA==",
"dev": true,
"requires": {
"async": "^3.2.4",
"block-stream2": "^2.1.0",
"browser-or-node": "^2.1.1",
"buffer-crc32": "^0.2.13",
"fast-xml-parser": "^4.2.2",
"ipaddr.js": "^2.0.1",
"json-stream": "^1.0.0",
"lodash": "^4.17.21",
"mime-types": "^2.1.35",
"query-string": "^7.1.3",
"through2": "^4.0.2",
"web-encoding": "^1.1.5",
"xml": "^1.0.1",
"xml2js": "^0.5.0"
},
"dependencies": {
"filter-obj": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/filter-obj/-/filter-obj-1.1.0.tgz",
"integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==",
"dev": true
},
"query-string": {
"version": "7.1.3",
"resolved": "https://registry.npmmirror.com/query-string/-/query-string-7.1.3.tgz",
"integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==",
"dev": true,
"requires": {
"decode-uri-component": "^0.2.2",
"filter-obj": "^1.1.0",
"split-on-first": "^1.0.0",
"strict-uri-encode": "^2.0.0"
}
},
"readable-stream": {
"version": "3.6.2",
"resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"dev": true,
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
},
"strict-uri-encode": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
"integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==",
"dev": true
},
"through2": {
"version": "4.0.2",
"resolved": "https://registry.npmmirror.com/through2/-/through2-4.0.2.tgz",
"integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==",
"dev": true,
"requires": {
"readable-stream": "3"
}
},
"xml2js": {
"version": "0.5.0",
"resolved": "https://registry.npmmirror.com/xml2js/-/xml2js-0.5.0.tgz",
"integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==",
"dev": true,
"requires": {
"sax": ">=0.6.0",
"xmlbuilder": "~11.0.0"
}
}
}
},
"minipass": {
"version": "3.3.6",
"resolved": "https://registry.npmmirror.com/minipass/-/minipass-3.3.6.tgz",
@ -13999,6 +14232,12 @@
"strict-uri-encode": "^1.0.0"
}
},
"querystring": {
"version": "0.2.0",
"resolved": "https://registry.npmmirror.com/querystring/-/querystring-0.2.0.tgz",
"integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==",
"dev": true
},
"querystring-es3": {
"version": "0.2.1",
"resolved": "https://registry.npmmirror.com/querystring-es3/-/querystring-es3-0.2.1.tgz",
@ -15421,6 +15660,12 @@
}
}
},
"split-on-first": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/split-on-first/-/split-on-first-1.1.0.tgz",
"integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==",
"dev": true
},
"split-string": {
"version": "3.1.0",
"resolved": "https://registry.npmmirror.com/split-string/-/split-string-3.1.0.tgz",
@ -15685,6 +15930,12 @@
"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
"dev": true
},
"strnum": {
"version": "1.0.5",
"resolved": "https://registry.npmmirror.com/strnum/-/strnum-1.0.5.tgz",
"integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==",
"dev": true
},
"stylehacks": {
"version": "4.0.3",
"resolved": "https://registry.npmmirror.com/stylehacks/-/stylehacks-4.0.3.tgz",
@ -17507,6 +17758,7 @@
"dev": true,
"optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
},
@ -17636,6 +17888,16 @@
"defaults": "^1.0.3"
}
},
"web-encoding": {
"version": "1.1.5",
"resolved": "https://registry.npmmirror.com/web-encoding/-/web-encoding-1.1.5.tgz",
"integrity": "sha512-HYLeVCdJ0+lBYV2FvNZmv3HJ2Nt0QYXqZojk3d9FJOLkwnuhzM9tmamh8d7HPM8QqjKH8DeHkFTx+CFlWpZZDA==",
"dev": true,
"requires": {
"@zxing/text-encoding": "0.9.0",
"util": "^0.12.3"
}
},
"webgl-constants": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/webgl-constants/-/webgl-constants-1.1.1.tgz",
@ -18369,6 +18631,12 @@
"word": "~0.3.0"
}
},
"xml": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/xml/-/xml-1.0.1.tgz",
"integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==",
"dev": true
},
"xml2js": {
"version": "0.6.2",
"resolved": "https://registry.npmmirror.com/xml2js/-/xml2js-0.6.2.tgz",

View File

@ -75,12 +75,14 @@
"@vue/cli-plugin-eslint": "~4.5.4",
"@vue/cli-service": "~4.5.4",
"autoprefixer": "^9.5.1",
"aws-sdk": "^2.1532.0",
"babel-eslint": "^10.1.0",
"chalk": "2.4.2",
"connect": "3.6.6",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"html-webpack-plugin": "3.2.0",
"minio": "^7.1.3",
"node-xlsx": "^0.21.0",
"runjs": "^4.3.2",
"script-ext-html-webpack-plugin": "2.1.3",

View File

@ -19,15 +19,15 @@
label="标签"
width="300">
</el-table-column>
<el-table-column
prop="Description"
label="路由"
show-overflow-tooltip
width="180">
<template slot-scope="scope">
{{scope.row.Description}}
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- prop="Description"-->
<!-- label="路由"-->
<!-- show-overflow-tooltip-->
<!-- width="180">-->
<!-- <template slot-scope="scope">-->
<!-- {{scope.row.Description}}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
prop="Value"
label="英文">
@ -71,13 +71,14 @@ export default {
this.$set(target, attr, e)
},
handleSave() {
console.log(this.tableData)
this.$confirm('确定修改当前页面国际化内容?').then(() => {
batchAddOrUpdateFrontInternationalization(this.tableData).then(res => {
var zhMessages = {}, enMessages = {}
this.tableData.forEach(v => {
zhMessages[v.Description + '_' + v.Code] = v.ValueCN
enMessages[v.Description + '_' + v.Code] = v.Value
// zhMessages[v.Description + '_' + v.Code] = v.ValueCN
// enMessages[v.Description + '_' + v.Code] = v.Value
zhMessages[v.Code] = v.ValueCN
enMessages[v.Code] = v.Value
})
i18n.mergeLocaleMessage('zh', zhMessages)
i18n.mergeLocaleMessage('en', enMessages)
@ -91,13 +92,14 @@ export default {
this.drawer = true
let tableData = this.$tl.map(v => {
let a = {...v}
if (!a.Description) {
a.Description = this.$route.path
}
// if (!a.Description) {
// a.Description = this.$route.path
// }
return a
})
tableData = tableData.filter(v => {
return ~this.$path.indexOf(v.Description + '_' + v.Code)
// return ~this.$path.indexOf(v.Description + '_' + v.Code)
return ~this.$path.indexOf(v.Code)
})
this.tableData = Object.assign([], tableData)
console.log(this.tableData)

View File

@ -167,8 +167,10 @@ async function VueInit () {
Vue.prototype.$tl = Internationalization.Result
let zhMessages = {}, enMessages = {}
Vue.prototype.$tl.forEach(v => {
zhMessages[v.Description + '_' + v.Code] = v.ValueCN
enMessages[v.Description + '_' + v.Code] = v.Value
// zhMessages[v.Description + '_' + v.Code] = v.ValueCN
// enMessages[v.Description + '_' + v.Code] = v.Value
zhMessages[v.Code] = v.ValueCN
enMessages[v.Code] = v.Value
})
i18n.mergeLocaleMessage('zh', zhMessages)
i18n.mergeLocaleMessage('en', enMessages)
@ -238,8 +240,13 @@ async function VueInit () {
}
Vue.prototype.$path = []
var t = function (key) {
Vue.prototype.$path.push(Vue.prototype.toPath + '_' + key)
return i18n.t(Vue.prototype.toPath + '_' + key)
// if (![Vue.prototype.toPath + '_' + key].includes(Vue.prototype.$path)) {
if (![key].includes(Vue.prototype.$path)) {
// Vue.prototype.$path.push(Vue.prototype.toPath + '_' + key)
Vue.prototype.$path.push(key)
}
// return i18n.t(Vue.prototype.toPath + '_' + key)
return i18n.t(key)
}
Vue.prototype.$t = t
_vm = new Vue({

View File

@ -1,4 +1,5 @@
const OSS = require('ali-oss')
import Minio from 'minio'
import Vue from 'vue'
const { GenerateSTS, GetObjectStoreToken } = require('../api/user.js')
import { getToken } from '@/utils/auth'
@ -11,13 +12,15 @@ async function ossGenerateSTS() {
let res = await GetObjectStoreToken()
Vue.prototype.OSSclientConfig = { ...res.Result[res.Result.ObjectStoreUse] }
Vue.prototype.OSSclientConfig.basePath = Vue.prototype.OSSclientConfig.viewEndpoint
// let minioClient = new Minio.Client(Vue.prototype.OSSclientConfig);
switch (res.Result.ObjectStoreUse) {
case 'AliyunOSS':
Vue.prototype.OSSclientConfig.bucket = Vue.prototype.OSSclientConfig.bucketName
Vue.prototype.OSSclient = new OSS(Vue.prototype.OSSclientConfig)
break
case 'MinIO':
Vue.prototype.OSSclient = new OSS(Vue.prototype.OSSclientConfig)
let minioClient = new Minio.Client(Vue.prototype.OSSclientConfig);
// Vue.prototype.OSSclient = new OSS(Vue.prototype.OSSclientConfig)
break
}
return

View File

@ -61,7 +61,7 @@
sortable="custom"
>
<template slot-scope="scope">
{{ dict.type.NoteType.find(v => {return v.raw.Code * 1 === scope.row.NoticeTypeEnum}) ? dict.type.NoteType.find(v => {return v.raw.Code * 1 === scope.row.NoticeTypeEnum}).label : '' }}
{{ $fd('NoteType', scope.row.NoticeTypeEnum) }}
</template>
</el-table-column>
@ -80,7 +80,7 @@
>
<template slot-scope="scope">
<el-tag :type="scope.row.ActualNoticeStateEnum === 0 ? 'info' : scope.row.ActualNoticeStateEnum === 1 ? 'success' : 'error'">
{{ dict.type.NoticeState.find(v => {return v.raw.Code * 1 === scope.row.ActualNoticeStateEnum}) ? dict.type.NoticeState.find(v => {return v.raw.Code * 1 === scope.row.ActualNoticeStateEnum}).label : '' }}
{{ $fd('NoticeState', scope.row.ActualNoticeStateEnum) }}
</el-tag>
</template>
</el-table-column>
@ -187,7 +187,7 @@ export default {
}).catch(() => { this.loading = false })
},
showDetail(row) {
var currentNoticeType = this.dict.type.NoteType.find(v => { return v.raw.Code * 1 === row.NoticeTypeEnum }) ? this.dict.type.NoteType.find(v => { return v.raw.Code * 1 === row.NoticeTypeEnum }).label : ''
var currentNoticeType = this.$fd('NoteType', row.NoticeTypeEnum)
if (row.IsRead || row.ActualNoticeStateEnum !== 1) {
this.$alert(row.NoticeContent, currentNoticeType, {
showConfirmButton: false

View File

@ -496,14 +496,22 @@
min-width="100"
:label="$t('trials:auditRecord:table:funcModule')"
show-overflow-tooltip
/>
>
<template slot-scope="scope">
{{$i18n.locale === 'zh' ? scope.row.ModuleTypeNameCN : scope.row.ModuleTypeName}}
</template>
</el-table-column>
<!-- 操作名 -->
<el-table-column
prop="Description"
min-width="140"
:label="$t('trials:auditRecord:table:operationName')"
show-overflow-tooltip
/>
>
<template slot-scope="scope">
{{$i18n.locale === 'zh' ? scope.row.DescriptionCN : scope.row.Description}}
</template>
</el-table-column>
<!-- 修改原因 -->
<el-table-column
prop="Reason"
@ -1128,7 +1136,8 @@ export default {
GeneralId: n ? this.currentRow.GeneralId : null
})
//
this.model_cfg2.title = `${this.$t('trials:auditRecord:title:viewRelationOperations')}--${this.currentRow.Description}`
this.model_cfg2.title = `${this.$t('trials:auditRecord:title:viewRelationOperations')}--${this.$i18n.locale === 'en' ? this.currentRow.Description : this.currentRow.DescriptionCN}`
this.loading = true
getInspectionList(searchData).then((res) => {
this.list2 = res.CurrentPageData
@ -1155,7 +1164,7 @@ export default {
Value: row.SignText
})
}
this.model_cfg3.title = row.Description
this.model_cfg3.title = this.$i18n.locale === 'en' ? row.Description : row.DescriptionCN
this.model_cfg3.visible = true
})
},
@ -1177,7 +1186,7 @@ export default {
Value: row.SignText
})
}
this.model_cfg.title = row.Description
this.model_cfg.title = this.$i18n.locale === 'en' ? row.Description : row.DescriptionCN
this.model_cfg.visible = true
})
},

View File

@ -17,7 +17,7 @@ const name = defaultSettings.title || 'IRCIS' // page title
// eslint-disable-next-line no-undef
module.exports = {
lintOnSave: false,
transpileDependencies: ['@cornerstonejs'],
transpileDependencies: ['@cornerstonejs', 'minio'],
// publicPath: process.env.NODE_ENV === 'development' || process.env.VUE_APP_OSS_CONFIG_BUCKET === 'zyypacs-usa' ? process.env.VUE_APP_BASE_PATH : `${process.env.VUE_FILE_PATH}${process.env.VUE_APP_OSS_PATH}${distDate}/`,
publicPath: '/',
outputDir: 'dist',