国际化优化
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
756544e88a
commit
1fde994bc9
35
src/App.vue
35
src/App.vue
|
@ -9,6 +9,16 @@
|
||||||
:visible.sync="drawer"
|
:visible.sync="drawer"
|
||||||
direction="rtl"
|
direction="rtl"
|
||||||
size="80%">
|
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
|
<el-table
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
v-adaptive="{bottomOffset:50}"
|
v-adaptive="{bottomOffset:50}"
|
||||||
|
@ -53,7 +63,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { batchAddOrUpdateFrontInternationalization } from '@/api/dictionary/dictionary'
|
import { batchAddOrUpdateFrontInternationalization, getFrontInternationalizationList } from '@/api/dictionary/dictionary'
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
import i18n from "./lang";
|
import i18n from "./lang";
|
||||||
export default {
|
export default {
|
||||||
|
@ -62,7 +72,9 @@ export default {
|
||||||
return {
|
return {
|
||||||
drawer: false,
|
drawer: false,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
show: false
|
show: false,
|
||||||
|
key: null,
|
||||||
|
arr: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -72,10 +84,19 @@ export default {
|
||||||
changeValue(target, attr, e) {
|
changeValue(target, attr, e) {
|
||||||
this.$set(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() {
|
handleSave() {
|
||||||
this.$confirm('确定修改当前页面国际化内容?').then(() => {
|
this.$confirm('确定修改当前页面国际化内容?').then(() => {
|
||||||
batchAddOrUpdateFrontInternationalization(this.tableData).then(res => {
|
batchAddOrUpdateFrontInternationalization(this.tableData).then(async res => {
|
||||||
var zhMessages = {}, enMessages = {}
|
var zhMessages = {}, enMessages = {}
|
||||||
|
var Internationalization = await getFrontInternationalizationList()
|
||||||
|
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
|
||||||
|
@ -91,6 +112,7 @@ export default {
|
||||||
},
|
},
|
||||||
openI18n() {
|
openI18n() {
|
||||||
this.tableData = []
|
this.tableData = []
|
||||||
|
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 => {
|
||||||
|
@ -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.$path))
|
||||||
console.log(JSON.stringify(this.tableData))
|
console.log(JSON.stringify(this.tableData))
|
||||||
}
|
}
|
||||||
|
|
|
@ -267,7 +267,7 @@
|
||||||
<span v-if="!scope.row.dicomInfo.failedFileCount">{{$t('trials:uploadDicomList:table:status1')}}</span>
|
<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 && !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-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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<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 thumbnailPath = `/${params.trialId}/Image/${params.siteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${v.seriesUid}/${v.seriesUid}.png`
|
||||||
let OSSclient = scope.OSSclient
|
let OSSclient = scope.OSSclient
|
||||||
let seriesRes = await OSSclient.put(thumbnailPath, blob)
|
let seriesRes = await OSSclient.put(thumbnailPath, blob)
|
||||||
console.log('seriesRes', seriesRes)
|
|
||||||
if (seriesRes && seriesRes.url) {
|
if (seriesRes && seriesRes.url) {
|
||||||
ImageResizePath = scope.$getObjectName(seriesRes.url)
|
ImageResizePath = scope.$getObjectName(seriesRes.url)
|
||||||
}
|
}
|
||||||
|
@ -1186,10 +1185,8 @@ export default {
|
||||||
ImageResizePath: ImageResizePath,
|
ImageResizePath: ImageResizePath,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log(Record)
|
|
||||||
let text = JSON.stringify(Record)
|
let text = JSON.stringify(Record)
|
||||||
let logJsonBlob = scope.generateTxtFile(text)
|
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 logJsonObjectName = `/${params.trialId}/Image/${params.siteId}/${params.subjectId}/${params.subjectVisitId}/${dicomInfo.studyUid}/${params.studyMonitorId}.txt`
|
||||||
let logRes = await scope.OSSclient.put(logJsonObjectName, logJsonBlob)
|
let logRes = await scope.OSSclient.put(logJsonObjectName, logJsonBlob)
|
||||||
if (logRes && logRes.url) {
|
if (logRes && logRes.url) {
|
||||||
|
|
Loading…
Reference in New Issue