| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
446104c834 | 修改翻页组件内部国际化实现 | 3 years ago |
|
|
1d13695cfa | 初步增加组件内国际化实现 | 3 years ago |
| @@ -2922,3 +2922,5 @@ cpu_num = CPU数 | |||||
| memory = 内存 | memory = 内存 | ||||
| shared_memory = 共享内存 | shared_memory = 共享内存 | ||||
| [mirror] | |||||
| imageMirror = 云脑镜像 | |||||
| @@ -315,15 +315,28 @@ | |||||
| </div> | </div> | ||||
| {{template "base/footer" .}} | {{template "base/footer" .}} | ||||
| <script> | <script> | ||||
| function getParams(){ | |||||
| const params = new URLSearchParams(window.location.search) | |||||
| let jobType = !params.get('jobType')? '{{.i18n.Tr "admin.cloudbrain.all_task_types"}}' : params.get('jobType') | |||||
| let listType = !params.get('listType')? '{{.i18n.Tr "admin.cloudbrain.all_computing_resources"}}' : params.get('listType') | |||||
| let jobStatus = !params.get('jobStatus')? '{{.i18n.Tr "admin.cloudbrain.all_status"}}' : params.get('jobStatus').toUpperCase() | |||||
| const dropdownValueArray = [jobType,listType,jobStatus] | |||||
| $('#adminCloud .default.text ').each(function(index,e){ | |||||
| $(e).text(dropdownValueArray[index]) | |||||
| }) | |||||
| } | |||||
| getParams() | |||||
| import Vue from 'vue'; | |||||
| import enLocale from 'element-ui/lib/locale/lang/en' | |||||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | |||||
| import locale from 'element-ui/lib/locale' | |||||
| var text_langName = document.getElementById("langName").innerText | |||||
| if (text_langName == '简体中文'){ | |||||
| locale.use(zhLocale) | |||||
| } | |||||
| else if (text_langName == 'English'){ | |||||
| locale.use(enLocale) | |||||
| } | |||||
| function getParams(){ | |||||
| const params = new URLSearchParams(window.location.search) | |||||
| let jobType = !params.get('jobType')? '{{.i18n.Tr "admin.cloudbrain.all_task_types"}}' : params.get('jobType') | |||||
| let listType = !params.get('listType')? '{{.i18n.Tr "admin.cloudbrain.all_computing_resources"}}' : params.get('listType') | |||||
| let jobStatus = !params.get('jobStatus')? '{{.i18n.Tr "admin.cloudbrain.all_status"}}' : params.get('jobStatus').toUpperCase() | |||||
| const dropdownValueArray = [jobType,listType,jobStatus] | |||||
| $('#adminCloud .default.text ').each(function(index,e){ | |||||
| $(e).text(dropdownValueArray[index]) | |||||
| }) | |||||
| } | |||||
| getParams() | |||||
| </script> | </script> | ||||
| @@ -21,7 +21,7 @@ | |||||
| <div class="header item">{{.i18n.Tr "custom.foot.help"}}</div> | <div class="header item">{{.i18n.Tr "custom.foot.help"}}</div> | ||||
| <div class="ui language bottom floating slide up dropdown link item"> | <div class="ui language bottom floating slide up dropdown link item"> | ||||
| <i class="world icon"></i> | <i class="world icon"></i> | ||||
| <div class="text">{{.LangName}}</div> | |||||
| <div class="text" id ='langName'>{{.LangName}}</div> | |||||
| <div class="menu"> | <div class="menu"> | ||||
| {{range .AllLangs}} | {{range .AllLangs}} | ||||
| <a lang="{{.Lang}}" class="item {{if eq $.Lang .Lang}}active selected{{end}}" href="{{if eq $.Lang .Lang}}#{{else}}{{$.Link}}?lang={{.Lang}}{{end}}">{{.Name}}</a> | <a lang="{{.Lang}}" class="item {{if eq $.Lang .Lang}}active selected{{end}}" href="{{if eq $.Lang .Lang}}#{{else}}{{$.Link}}?lang={{.Lang}}{{end}}">{{.Name}}</a> | ||||
| @@ -50,3 +50,4 @@ | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </footer> | </footer> | ||||
| @@ -19,7 +19,7 @@ | |||||
| <div class="header item">{{.i18n.Tr "custom.foot.help"}}</div> | <div class="header item">{{.i18n.Tr "custom.foot.help"}}</div> | ||||
| <div class="ui language bottom floating slide up dropdown link item"> | <div class="ui language bottom floating slide up dropdown link item"> | ||||
| <i class="world icon"></i> | <i class="world icon"></i> | ||||
| <div class="text">{{.LangName}}</div> | |||||
| <div class="text" id ='langName'>{{.LangName}}</div> | |||||
| <div class="menu"> | <div class="menu"> | ||||
| {{range .AllLangs}} | {{range .AllLangs}} | ||||
| <a lang="{{.Lang}}" class="item {{if eq $.Lang .Lang}}active selected{{end}}" href="{{if eq $.Lang .Lang}}#{{else}}{{$.Link}}?lang={{.Lang}}{{end}}">{{.Name}}</a> | <a lang="{{.Lang}}" class="item {{if eq $.Lang .Lang}}active selected{{end}}" href="{{if eq $.Lang .Lang}}#{{else}}{{$.Link}}?lang={{.Lang}}{{end}}">{{.Name}}</a> | ||||
| @@ -135,4 +135,19 @@ | |||||
| </el-dialog> | </el-dialog> | ||||
| </div> | |||||
| </div> | |||||
| <script> | |||||
| import Vue from 'vue'; | |||||
| import enLocale from 'element-ui/lib/locale/lang/en' | |||||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | |||||
| import locale from 'element-ui/lib/locale' | |||||
| var text_langName = document.getElementById("langName").innerText | |||||
| if (text_langName == '简体中文'){ | |||||
| locale.use(zhLocale) | |||||
| } | |||||
| else if (text_langName == 'English'){ | |||||
| locale.use(enLocale) | |||||
| } | |||||
| </script> | |||||
| @@ -8,8 +8,11 @@ | |||||
| <style> | <style> | ||||
| .full.height { | .full.height { | ||||
| display: flex; | |||||
| flex-flow: column wrap; | |||||
| padding-bottom:0px; | |||||
| /* flex-grow: 1; */ | /* flex-grow: 1; */ | ||||
| padding-bottom: 53px; | |||||
| /* padding-bottom: 53px; */ | |||||
| } | } | ||||
| </style> | </style> | ||||
| @@ -216,3 +216,18 @@ | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| {{template "base/footer" .}} | {{template "base/footer" .}} | ||||
| <script> | |||||
| import Vue from 'vue'; | |||||
| import enLocale from 'element-ui/lib/locale/lang/en' | |||||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | |||||
| import locale from 'element-ui/lib/locale' | |||||
| var text_langName = document.getElementById("langName").innerText | |||||
| if (text_langName == '简体中文'){ | |||||
| locale.use(zhLocale) | |||||
| } | |||||
| else if (text_langName == 'English'){ | |||||
| locale.use(enLocale) | |||||
| } | |||||
| </script> | |||||
| @@ -344,3 +344,18 @@ | |||||
| {{template "base/delete_modal_actions" .}} | {{template "base/delete_modal_actions" .}} | ||||
| </div> | </div> | ||||
| {{template "base/footer" .}} | {{template "base/footer" .}} | ||||
| <script> | |||||
| import Vue from 'vue'; | |||||
| import enLocale from 'element-ui/lib/locale/lang/en' | |||||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | |||||
| import locale from 'element-ui/lib/locale' | |||||
| var text_langName = document.getElementById("langName").innerText | |||||
| if (text_langName == '简体中文'){ | |||||
| locale.use(zhLocale) | |||||
| } | |||||
| else if (text_langName == 'English'){ | |||||
| locale.use(enLocale) | |||||
| } | |||||
| </script> | |||||
| @@ -36,7 +36,20 @@ | |||||
| </div> | </div> | ||||
| </template> | </template> | ||||
| <script> | <script> | ||||
| import Vue from 'vue'; | |||||
| import enLocale from 'element-ui/lib/locale/lang/en' | |||||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | |||||
| import locale from 'element-ui/lib/locale' | |||||
| var text_langName = document.getElementById("langName").innerText | |||||
| if (text_langName == '简体中文'){ | |||||
| locale.use(zhLocale) | |||||
| } | |||||
| else if (text_langName == 'English'){ | |||||
| locale.use(enLocale) | |||||
| } | |||||
| const {AppSubUrl, StaticUrlPrefix, csrf} = window.config; | const {AppSubUrl, StaticUrlPrefix, csrf} = window.config; | ||||
| @@ -1,5 +1,5 @@ | |||||
| <template> | <template> | ||||
| <div style="height:100%"> | |||||
| <div style="height:100%;flex:1" > | |||||
| <el-tabs tab-position="left" v-model="activeName" style="height:100%" @tab-click="handleClick" > | <el-tabs tab-position="left" v-model="activeName" style="height:100%" @tab-click="handleClick" > | ||||
| <el-tab-pane label="概览" name="first" > | <el-tab-pane label="概览" name="first" > | ||||
| <span slot="label"> | <span slot="label"> | ||||
| @@ -130,5 +130,8 @@ | |||||
| /deep/ .el-image{ | /deep/ .el-image{ | ||||
| filter:grayscale(100%) | filter:grayscale(100%) | ||||
| } | } | ||||
| /deep/ .el-pagination { | |||||
| padding-bottom: 30px; | |||||
| } | |||||
| </style> | </style> | ||||
| @@ -256,12 +256,23 @@ | |||||
| </template> | </template> | ||||
| <script> | |||||
| const {_AppSubUrl, _StaticUrlPrefix, csrf} = window.config; | |||||
| <script> | |||||
| import Vue from 'vue'; | |||||
| import enLocale from 'element-ui/lib/locale/lang/en' | |||||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | |||||
| import locale from 'element-ui/lib/locale' | |||||
| var text_langName = document.getElementById("langName").innerText | |||||
| if (text_langName == '简体中文'){ | |||||
| locale.use(zhLocale) | |||||
| } | |||||
| else if (text_langName == 'English'){ | |||||
| locale.use(enLocale) | |||||
| } | |||||
| const {_AppSubUrl, _StaticUrlPrefix, csrf} = window.config; | |||||
| export default { | export default { | ||||
| components: { | components: { | ||||
| @@ -421,6 +432,8 @@ export default { | |||||
| } | } | ||||
| }; | }; | ||||
| </script> | </script> | ||||
| <style scoped> | <style scoped> | ||||
| @@ -131,8 +131,22 @@ | |||||
| </template> | </template> | ||||
| <script> | <script> | ||||
| import Vue from 'vue'; | |||||
| import enLocale from 'element-ui/lib/locale/lang/en' | |||||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | |||||
| import locale from 'element-ui/lib/locale' | |||||
| var text_langName = document.getElementById("langName").innerText | |||||
| if (text_langName == '简体中文'){ | |||||
| locale.use(zhLocale) | |||||
| } | |||||
| else if (text_langName == 'English'){ | |||||
| locale.use(enLocale) | |||||
| } | |||||
| const {_AppSubUrl, _StaticUrlPrefix, csrf} = window.config; | const {_AppSubUrl, _StaticUrlPrefix, csrf} = window.config; | ||||
| export default { | export default { | ||||
| @@ -159,6 +159,19 @@ | |||||
| </template> | </template> | ||||
| <script> | <script> | ||||
| import Vue from 'vue'; | |||||
| import enLocale from 'element-ui/lib/locale/lang/en' | |||||
| import zhLocale from 'element-ui/lib/locale/lang/zh-CN' | |||||
| import locale from 'element-ui/lib/locale' | |||||
| var text_langName = document.getElementById("langName").innerText | |||||
| if (text_langName == '简体中文'){ | |||||
| locale.use(zhLocale) | |||||
| } | |||||
| else if (text_langName == 'English'){ | |||||
| locale.use(enLocale) | |||||
| } | |||||
| import { export2Excel } from '../excel/util.js' | import { export2Excel } from '../excel/util.js' | ||||
| export default{ | export default{ | ||||
| name:'UserAnalysis', | name:'UserAnalysis', | ||||
| @@ -468,7 +481,9 @@ | |||||
| /deep/ .el-range-separator{ | /deep/ .el-range-separator{ | ||||
| width: 20% !important; | width: 20% !important; | ||||
| } | } | ||||
| /deep/ .el-pagination { | |||||
| padding-bottom: 30px; | |||||
| } | |||||
| .colorChange { | .colorChange { | ||||
| background-color: #1684FC; | background-color: #1684FC; | ||||
| color: #FFFF; | color: #FFFF; | ||||