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>
<div id="app" style="position: relative">
<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
</div>
<el-drawer
title="国际化"
:visible.sync="drawer"
direction="rtl"
size="80%">
<el-drawer title="国际化" :visible.sync="drawer" direction="rtl" size="80%">
<div style="width: 320px">
<el-form
label-width="100px"
@submit.native.prevent
size="small"
>
<el-form label-width="100px" @submit.native.prevent size="small">
<el-form-item label="关键字">
<el-input v-model="key" @input="keyChange"/>
<el-input v-model="key" @input="keyChange" />
</el-form-item>
</el-form>
</div>
<el-table
:data="tableData"
v-adaptive="{bottomOffset:50}"
v-adaptive="{ bottomOffset: 50 }"
height="100"
style="width: 100%">
<el-table-column
prop="Code"
label="标签"
width="300">
style="width: 100%"
>
<el-table-column prop="Code" 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="Value"
label="英文">
<!-- <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="英文">
<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>
</el-table-column>
<el-table-column
prop="ValueCN"
label="中文">
<el-table-column prop="ValueCN" label="中文">
<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>
</el-table-column>
</el-table>
<div style="text-align: right;padding-top: 10px;padding-right: 10px;">
<el-button size="mini" @click="drawer = false">取消
</el-button>
<el-button size="mini" type="primary" @click="handleSave"></el-button>
<div style="text-align: right; padding-top: 10px; padding-right: 10px">
<el-button size="mini" @click="drawer = false">取消 </el-button>
<el-button size="mini" type="primary" @click="handleSave"
>保存</el-button
>
</div>
</el-drawer>
</div>
</template>
<script>
import { batchAddOrUpdateFrontInternationalization, getFrontInternationalizationList } from '@/api/dictionary/dictionary'
import {
batchAddOrUpdateFrontInternationalization,
getFrontInternationalizationList,
} from "@/api/dictionary/dictionary";
import Vue from "vue";
import i18n from "./lang";
export default {
name: 'App',
data () {
name: "App",
data() {
return {
drawer: false,
tableData: [],
show: false,
key: null,
arr: []
}
arr: [],
};
},
mounted() {
this.show = process.env.VUE_APP_OSS_PATH === '/test/dist'
this.show = process.env.VUE_APP_OSS_PATH === "/test/dist";
},
methods: {
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)))
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)
this.tableData = Object.assign([], this.arr);
}
},
handleSave() {
this.$confirm('确定修改当前页面国际化内容?').then(() => {
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
zhMessages[v.Code] = v.ValueCN
enMessages[v.Code] = v.Value
})
i18n.mergeLocaleMessage('zh', zhMessages)
i18n.mergeLocaleMessage('en', enMessages)
this.drawer = false
this.$message.success('国际化修改成功')
})
})
this.$confirm("确定修改当前页面国际化内容?").then(() => {
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
zhMessages[v.Code] = v.ValueCN;
enMessages[v.Code] = v.Value;
});
i18n.mergeLocaleMessage("zh", zhMessages);
i18n.mergeLocaleMessage("en", enMessages);
this.drawer = false;
this.$message.success("国际化修改成功");
}
);
});
},
openI18n() {
this.tableData = []
this.key = null
this.drawer = true
let arr = []
let tableData = this.$tl.map(v => {
let a = {...v}
this.tableData = [];
this.key = null;
this.drawer = true;
let arr = [];
let tableData = this.$tl.map((v) => {
let a = { ...v };
// if (!a.Description) {
// a.Description = this.$route.path
// }
return a
})
tableData = tableData.filter(v => {
return a;
});
tableData = tableData.filter((v) => {
// return ~this.$path.indexOf(v.Description + '_' + v.Code)
return ~this.$path.indexOf(v.Code)
})
this.$path.forEach(v => {
let o = tableData.find(a => {
return a.Code === v
})
return ~this.$path.indexOf(v.Code);
});
this.$path.forEach((v) => {
let o = tableData.find((a) => {
return a.Code === v;
});
if (o) {
arr.push(o)
arr.push(o);
} else {
arr.push({
Code: v,
Description: null,
Value: null,
ValueCN: null
})
ValueCN: null,
});
}
})
this.arr = 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)))
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)
this.tableData = Object.assign([], this.arr);
}
// console.log(JSON.stringify(this.$path))
// console.log(JSON.stringify(this.tableData))
}
}
}
},
},
};
</script>
<style lang="scss">
.el-tooltip__popper{
$light_gray: #606266;
.el-tooltip__popper {
max-width: 400px;
}
.my_multiple{
.el-input--medium .el-input__inner{
height: 36px!important;
.my_multiple {
.el-input--medium .el-input__inner {
height: 36px !important;
}
.el-select__tags{
.el-select__tags {
flex-wrap: nowrap;
overflow: hidden;
white-space: nowrap;
@ -180,21 +224,29 @@ input[type="number"] {
-moz-appearance: textfield !important;
}
.viewer-fixed.viewer-container{
.viewer-fixed.viewer-container {
z-index: 10000;
}
textarea{
textarea {
white-space: break-spaces;
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;
}
.box-body .el-button.is-circle i.el-icon-question:before{
.box-body .el-button.is-circle i.el-icon-question:before {
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>

View File

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

View File

@ -4,7 +4,11 @@
<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 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 -->
{{ $t('trials:trials:title:eics') }}
</span>