国际化优化
continuous-integration/drone/push Build is passing Details

uat_us
熊飞 2024-01-18 16:50:28 +08:00
parent 756544e88a
commit 1fde994bc9
2 changed files with 32 additions and 8 deletions

View File

@ -9,6 +9,16 @@
:visible.sync="drawer"
direction="rtl"
size="80%">
<div style="width: 320px">
<el-form
label-width="100px"
size="small"
>
<el-form-item label="关键字">
<el-input v-model="key" @input="keyChange"/>
</el-form-item>
</el-form>
</div>
<el-table
:data="tableData"
v-adaptive="{bottomOffset:50}"
@ -53,7 +63,7 @@
</template>
<script>
import { batchAddOrUpdateFrontInternationalization } from '@/api/dictionary/dictionary'
import { batchAddOrUpdateFrontInternationalization, getFrontInternationalizationList } from '@/api/dictionary/dictionary'
import Vue from "vue";
import i18n from "./lang";
export default {
@ -62,7 +72,9 @@ export default {
return {
drawer: false,
tableData: [],
show: false
show: false,
key: null,
arr: []
}
},
mounted() {
@ -72,10 +84,19 @@ export default {
changeValue(target, attr, e) {
this.$set(target, attr, e)
},
keyChange(v) {
if (this.key) {
this.tableData = Object.assign([], this.arr.filter(v => ~v.Code.indexOf(this.key) || ~v.Value.indexOf(this.key) || ~v.ValueCN.indexOf(this.key)))
} else {
this.tableData = Object.assign([], this.arr)
}
},
handleSave() {
this.$confirm('确定修改当前页面国际化内容?').then(() => {
batchAddOrUpdateFrontInternationalization(this.tableData).then(res => {
batchAddOrUpdateFrontInternationalization(this.tableData).then(async res => {
var zhMessages = {}, enMessages = {}
var Internationalization = await getFrontInternationalizationList()
Vue.prototype.$tl = Internationalization.Result
this.tableData.forEach(v => {
// zhMessages[v.Description + '_' + v.Code] = v.ValueCN
// enMessages[v.Description + '_' + v.Code] = v.Value
@ -91,6 +112,7 @@ export default {
},
openI18n() {
this.tableData = []
this.key = null
this.drawer = true
let arr = []
let tableData = this.$tl.map(v => {
@ -119,7 +141,12 @@ export default {
})
}
})
this.tableData = Object.assign([], arr)
this.arr = arr
if (this.key) {
this.tableData = Object.assign([], this.arr.filter(v => ~v.Code.indexOf(this.key) || ~v.Value.indexOf(this.key) || ~v.ValueCN.indexOf(this.key)))
} else {
this.tableData = Object.assign([], this.arr)
}
console.log(JSON.stringify(this.$path))
console.log(JSON.stringify(this.tableData))
}

View File

@ -267,7 +267,7 @@
<span v-if="!scope.row.dicomInfo.failedFileCount">{{$t('trials:uploadDicomList:table:status1')}}</span>
<span v-else-if="scope.row.dicomInfo.failedFileCount < scope.row.dicomInfo.fileCount && !scope.row.uploadState.record">{{$t('trials:uploadDicomList:table:status2')}}</span>
<span v-else-if="scope.row.dicomInfo.failedFileCount === scope.row.dicomInfo.fileCount">{{$t('trials:uploadDicomList:table:status3')}}</span>
<span v-else>{{ $t('trials:uploadDicomList:label:uploadFailed') }}</span>
<span v-else>{{ $t('trials:uploadDicomList:table:Failed') }}</span>
</template>
</el-table-column>
<el-table-column
@ -1116,7 +1116,6 @@ export default {
let thumbnailPath = `/${params.trialId}/Image/${params.siteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${v.seriesUid}/${v.seriesUid}.png`
let OSSclient = scope.OSSclient
let seriesRes = await OSSclient.put(thumbnailPath, blob)
console.log('seriesRes', seriesRes)
if (seriesRes && seriesRes.url) {
ImageResizePath = scope.$getObjectName(seriesRes.url)
}
@ -1186,10 +1185,8 @@ export default {
ImageResizePath: ImageResizePath,
})
}
console.log(Record)
let text = JSON.stringify(Record)
let logJsonBlob = scope.generateTxtFile(text)
console.log(logJsonBlob)
let logJsonObjectName = `/${params.trialId}/Image/${params.siteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${params.studyMonitorId}.txt`
let logRes = await scope.OSSclient.put(logJsonObjectName, logJsonBlob)
if (logRes && logRes.url) {