usa环境软件标题修改
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2024-06-26 13:37:55 +08:00
parent fa6c552149
commit 64a0e68448
3 changed files with 163 additions and 105 deletions

View File

@ -1,169 +1,213 @@
<template> <template>
<div id="app" style="position: relative"> <div id="app" style="position: relative">
<router-view /> <router-view />
<div v-show="show" v-adaptive @click="openI18n" style="position: fixed;bottom: 50px;left: 50px;z-index: 100000;width: 50px;height: 50px;background: #409eff88;line-height: 50px;text-align: center;color:#fff;border-radius: 50%;cursor: pointer"> <div
v-show="show"
v-adaptive
@click="openI18n"
style="
position: fixed;
bottom: 50px;
left: 50px;
z-index: 100000;
width: 50px;
height: 50px;
background: #409eff88;
line-height: 50px;
text-align: center;
color: #fff;
border-radius: 50%;
cursor: pointer;
"
>
i18n i18n
</div> </div>
<el-drawer <el-drawer title="国际化" :visible.sync="drawer" direction="rtl" size="80%">
title="国际化"
:visible.sync="drawer"
direction="rtl"
size="80%">
<div style="width: 320px"> <div style="width: 320px">
<el-form <el-form label-width="100px" @submit.native.prevent size="small">
label-width="100px"
@submit.native.prevent
size="small"
>
<el-form-item label="关键字"> <el-form-item label="关键字">
<el-input v-model="key" @input="keyChange"/> <el-input v-model="key" @input="keyChange" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<el-table <el-table
:data="tableData" :data="tableData"
v-adaptive="{bottomOffset:50}" v-adaptive="{ bottomOffset: 50 }"
height="100" height="100"
style="width: 100%"> style="width: 100%"
<el-table-column >
prop="Code" <el-table-column prop="Code" label="标签" width="300">
label="标签"
width="300">
</el-table-column> </el-table-column>
<!-- <el-table-column--> <!-- <el-table-column-->
<!-- prop="Description"--> <!-- prop="Description"-->
<!-- label="路由"--> <!-- label="路由"-->
<!-- show-overflow-tooltip--> <!-- show-overflow-tooltip-->
<!-- width="180">--> <!-- width="180">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- {{scope.row.Description}}--> <!-- {{scope.row.Description}}-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<el-table-column <el-table-column prop="Value" label="英文">
prop="Value"
label="英文">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.Value" @input="(e) => {$set(scope.row, 'Value', e)}" size="mini"></el-input> <el-input
v-model="scope.row.Value"
@input="
(e) => {
$set(scope.row, 'Value', e);
}
"
size="mini"
></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="ValueCN" label="中文">
prop="ValueCN"
label="中文">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.ValueCN" @input="(e) => {$set(scope.row, 'ValueCN', e)}" size="mini"></el-input> <el-input
v-model="scope.row.ValueCN"
@input="
(e) => {
$set(scope.row, 'ValueCN', e);
}
"
size="mini"
></el-input>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="text-align: right;padding-top: 10px;padding-right: 10px;"> <div style="text-align: right; padding-top: 10px; padding-right: 10px">
<el-button size="mini" @click="drawer = false">取消 <el-button size="mini" @click="drawer = false">取消 </el-button>
</el-button> <el-button size="mini" type="primary" @click="handleSave"
<el-button size="mini" type="primary" @click="handleSave"></el-button> >保存</el-button
>
</div> </div>
</el-drawer> </el-drawer>
</div> </div>
</template> </template>
<script> <script>
import { batchAddOrUpdateFrontInternationalization, getFrontInternationalizationList } 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 {
name: 'App', name: "App",
data () { data() {
return { return {
drawer: false, drawer: false,
tableData: [], tableData: [],
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";
}, },
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) {
this.tableData = Object.assign([], this.arr.filter(v => ~v.Code.indexOf(this.key) || ~v.Value.indexOf(this.key) || ~v.ValueCN.indexOf(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 { } 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(async res => { batchAddOrUpdateFrontInternationalization(this.tableData).then(
var zhMessages = {}, enMessages = {} async (res) => {
var Internationalization = await getFrontInternationalizationList() var zhMessages = {},
Vue.prototype.$tl = Internationalization.Result enMessages = {};
this.tableData.forEach(v => { var Internationalization = await getFrontInternationalizationList();
Vue.prototype.$tl = Internationalization.Result;
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.arr.filter(v => ~v.Code.indexOf(this.key) || ~v.Value.indexOf(this.key) || ~v.ValueCN.indexOf(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 { } 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">
.el-tooltip__popper{ $light_gray: #606266;
.el-tooltip__popper {
max-width: 400px; max-width: 400px;
} }
.my_multiple{ .my_multiple {
.el-input--medium .el-input__inner{ .el-input--medium .el-input__inner {
height: 36px!important; height: 36px !important;
} }
.el-select__tags{ .el-select__tags {
flex-wrap: nowrap; flex-wrap: nowrap;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
@ -180,21 +224,29 @@ input[type="number"] {
-moz-appearance: textfield !important; -moz-appearance: textfield !important;
} }
.viewer-fixed.viewer-container{ .viewer-fixed.viewer-container {
z-index: 10000; z-index: 10000;
} }
textarea{ textarea {
white-space: break-spaces; white-space: break-spaces;
word-break: normal; word-break: normal;
} }
*{ * {
word-break: normal!important; word-break: normal !important;
} }
.box-body .el-button.is-circle:not(.is-disabled) i:before{ .box-body .el-button.is-circle:not(.is-disabled) i:before {
color: #428bca; color: #428bca;
} }
.box-body .el-button.is-circle i.el-icon-question:before{ .box-body .el-button.is-circle i.el-icon-question:before {
color: #fff; color: #fff;
} }
.system-title {
font-size: 35px;
color: $light_gray;
text-align: center;
font-weight: bold;
font-family: 'Times New Roman';
text-shadow:1px 0.5px 1.5px #666;
}
</style> </style>

View File

@ -17,7 +17,8 @@
<div class="login-r"> <div class="login-r">
<div class="title-container"> <div class="title-container">
<!-- IRC Management System --> <!-- IRC Management System -->
<div class="title">{{ $t("login:title:system") }}</div> <div class="system-title" v-if="NODE_ENV==='usa'">{{ $t("login:title:system_title") }}</div>
<div class="title" v-else>{{ $t("login:title:system") }}</div>
</div> </div>
<el-form <el-form
ref="loginForm" ref="loginForm"
@ -153,8 +154,9 @@
" "
> >
<h1 style="text-align: center; margin-bottom: 20px">关于</h1> <h1 style="text-align: center; margin-bottom: 20px">关于</h1>
<p style="margin-bottom: 20px">IRC Imaging System</p> <p style="margin-bottom: 20px" v-if="NODE_ENV==='usa'">{{ $t("login:title:system_title") }}</p>
<p style="margin-bottom: 20px">V1.5.0.001</p> <p style="margin-bottom: 20px" v-else>{{ $t("login:title:system") }}</p>
<p style="margin-bottom: 20px">V1.5.1.001</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() }} 上海展影医疗科技有限公司
版权所有 版权所有

View File

@ -4,7 +4,11 @@
<img v-if="language === 'zh'" src="@/assets/zzlogo2.png" alt=""> <img v-if="language === 'zh'" src="@/assets/zzlogo2.png" alt="">
<img v-else-if="NODE_ENV === 'usa'" src="@/assets/zzlogo-usa.png" alt="" /> <img v-else-if="NODE_ENV === 'usa'" src="@/assets/zzlogo-usa.png" alt="" />
<img v-else src="@/assets/zzlogo4.png" alt=""> <img v-else src="@/assets/zzlogo4.png" alt="">
<span style="white-space:nowrap;"> <span style="white-space:nowrap;" class="system-title" v-if="NODE_ENV==='usa'">
<!-- 中心影像系统EICS -->
{{ $t('trials:trials:title:eics_title') }}
</span>
<span style="white-space:nowrap;" v-else>
<!-- 中心影像系统EICS --> <!-- 中心影像系统EICS -->
{{ $t('trials:trials:title:eics') }} {{ $t('trials:trials:title:eics') }}
</span> </span>