fix: 登入页面国际化

This commit is contained in:
chenjianxing 2021-12-17 17:15:38 +08:00 committed by BugKing
parent df432e3593
commit 04f10bf9fb
6 changed files with 271 additions and 252 deletions

View File

@ -15,6 +15,7 @@ export const TEST_PLAN_SCENARIO_CASE = 'test_plan_scenario_case'
export const TokenKey = 'Admin-Token';
export const LicenseKey = 'License';
export const DEFAULT_LANGUAGE = 'default_language';
export const CURRENT_LANGUAGE = 'current_language';
export const ROLE_ADMIN = 'admin';
export const ROLE_ORG_ADMIN = 'org_admin';

View File

@ -388,6 +388,9 @@ export default {
version:'Version',
is_new:"Is new"
},
login: {
normal_Login: "Normal Login",
},
license: {
title: 'Authorization management',
corporation: 'corporation',

View File

@ -7,6 +7,7 @@ import zh_TWLocale from "element-ui/lib/locale/lang/zh-TW";
import zh_CN from "./zh-CN";
import en_US from "./en-US";
import zh_TW from "./zh-TW";
import {CURRENT_LANGUAGE} from "@/common/js/constants";
Vue.use(VueI18n);
@ -37,6 +38,7 @@ function setI18nLanguage(lang) {
i18n.locale = lang;
axios.defaults.headers.common['Accept-Language'] = lang.replace("_", "-");
document.querySelector('html').setAttribute('lang', lang);
localStorage.setItem(CURRENT_LANGUAGE, lang);
return lang;
}

View File

@ -390,6 +390,9 @@ export default {
version: '版本',
is_new: "是否新建"
},
login: {
normal_Login: "普通登录",
},
license: {
title: '授权管理',
corporation: '客户名称',

View File

@ -57,7 +57,7 @@ export default {
confirm: '確定',
cancel: '取消',
scenario: '場景',
scenario_warning: '當前場景沒有環境,需要先設自身環境',
scenario_warning: '當前場景沒有環境,需要先設自身環境',
confirm_info: '未保存,是否確認關閉?',
track: '用例',
actuator: '執行器',
@ -73,11 +73,11 @@ export default {
input_password: '請輸入密碼',
test: '測試',
create_time: '創建時間',
update_user_id:'更新人ID',
update_user_id: '更新人ID',
update_time: '更新時間',
delete_time: '刪除時間',
delete_user: '刪除人',
delete_user_id:'刪除人ID',
delete_user_id: '刪除人ID',
add: '添加',
preview: '預覽',
member: '成員',
@ -100,8 +100,8 @@ export default {
test_resource_pool: '測試資源池',
system_setting: '系統設置',
api: '接口測試',
encode: '编码',
follow_api: '跟隨API定義',
encode: '編碼',
response_time_delay: '響應延遲時間',
performance: '性能測試',
enable_settings: '啟用設置',
@ -189,7 +189,7 @@ export default {
mock: "Mock 設置",
encrypted: "不加密",
no_corresponding: "無對應的",
code_template: "代模版",
code_template: "代模版",
api_case: "接口用例",
scenario_case: "場景用例",
task_center: "任務中心",
@ -204,17 +204,17 @@ export default {
create_user_id: '創建人ID',
run_message: "任務執行中,請到任務中心查看詳情",
executor: "執行人",
edit_info: "編輯詳情",
enable_scene: "啟用場景環境",
enable_scene_info: "啟用場景環境:當前步驟使用場景原始環境配寘運行",
execute_history: "執行歷史",
debug_history: "調試歷史",
testing: "測試中",
edit_info: "編輯詳情",
enable_scene: "啟用場景環境",
enable_scene_info: "啟用場景環境:當前步驟使用場景原始環境配置運行",
environment: "運行環境",
run_success: "執行成功",
run_completed: "執行完成",
run_warning: "正在運行中,請稍後查看",
run_stop: "當前任務已停止,無法查看報告",
run_stop: "The current task has been stopped and the report cannot be viewed",
run_fail: "執行失敗",
follow_success: "關註成功",
cancel_follow_success: "取消關註成功",
@ -376,19 +376,22 @@ export default {
system_project: "項目",
user_unit: "人",
workspace_unit: "個",
dash_board:'儀表盤',
all_project:'全部項目',
to_be_completed:'待完成',
pending_upgrade:'待更新',
information:'信息',
nick_name:'昵稱',
resourceId:'資源ID',
level:'級別',
num:'數量',
original_state:'原始狀態',
custom_num:'自定義編號',
version:'版本',
is_new:"是否新建"
dash_board: '儀表盤',
all_project: '全部項目',
to_be_completed: '待完成',
pending_upgrade: '待更新',
information: '信息',
nick_name: '昵稱',
resourceId: '資源ID',
level: '級別',
num: '數量',
original_state: '原始狀態',
custom_num: '自定義編號',
version: '版本',
is_new: "是否新建"
},
login: {
normal_Login: "普通登錄",
},
license: {
title: '授權管理',
@ -406,25 +409,25 @@ export default {
invalid: '無效',
expired: '已過期',
},
workstation:{
workstation: {
dash_board: '我的儀表盤',
upcoming: '我的待辦',
focus: '我的關註',
creation: '我創建的',
creation_case:'我創建的用例',
creation_issue:'我創建的缺陷',
creation_case_tip:'暫時還沒有創建用例,馬上創建',
creation_issue_tip:'暫時還沒有創建缺陷,馬上創建',
table_name:{
track_case:'功能用例',
track_plan:'測試計劃',
track_review:'用例評審',
track_issue:'缺陷管理',
api_definition:'接口定義',
api_automation:'接口自動化',
api_case:'接口用例',
performance:'性能測試',
scenario_case:'場景用例'
creation_case: '我創建的用例',
creation_issue: '我創建的缺陷',
creation_case_tip: '暫時還沒有創建用例,馬上創建',
creation_issue_tip: '暫時還沒有創建缺陷,馬上創建',
table_name: {
track_case: '功能用例',
track_plan: '測試計劃',
track_review: '用例評審',
track_issue: '缺陷管理',
api_definition: '接口定義',
api_automation: '接口自動化',
api_case: '接口用例',
performance: '性能測試',
scenario_case: '場景用例'
}
},
display: {
@ -486,7 +489,7 @@ export default {
option_value_check: '請填寫完整選項值',
},
workspace: {
id:'工作空間ID',
id: '工作空間ID',
create: '創建工作空間',
update: '修改工作空間',
delete: '刪除工作空間',
@ -608,10 +611,10 @@ export default {
zentao_request: '請求方式',
input_zentao_request: '請輸入Zentao請求方式',
input_zentao_url: '請輸入Zentao地址http://xx.xx.xx.xx/zentao/',
zentao_info:'禪道信息',
zentao_account:'禪道賬戶',
zentao_password:'禪道密碼',
zentao_prompt_information:'該信息為通過禪道提交缺陷的的用戶名、密碼,若未填寫,則使用工作空間中配置的默認信息',
zentao_info: '禪道信息',
zentao_account: '禪道賬戶',
zentao_password: '禪道密碼',
zentao_prompt_information: '該信息為通過禪道提交缺陷的的用戶名、密碼,若未填寫,則使用工作空間中配置的默認信息',
use_tip: '使用指引:',
use_tip_tapd: 'Tapd Basic Auth 賬號信息在"公司管理-安全與集成-開放平臺"中查詢',
use_tip_jira: 'Jira software server 認證信息為 賬號密碼Jira software cloud 認證信息為 賬號+令牌(賬戶設置-安全-創建API令牌)',
@ -638,11 +641,11 @@ export default {
input_azure_url: '請輸入 Azure Devops 地址',
input_azure_organization_id: '請輸入 Azure 組織ID',
use_tip_azure: 'Azure Devops 地址+令牌(賬戶設置-個人訪問令牌-創建令牌)',
jira_prompt_information:'該信息為通過Jira提交缺陷的用戶認證信息若未填寫則使用工作空間中配置的默認信息'
jira_prompt_information: '該信息為通過Jira提交缺陷的用戶認證信息若未填寫則使用工作空間中配置的默認信息'
}
},
project: {
id:'項目ID',
id: '項目ID',
recent: '最近的項目',
create: '創建項目',
edit: '編輯項目',
@ -670,9 +673,10 @@ export default {
no_data: '無數據',
select: '選擇項目',
repeatable: '接口定義URL可重復',
repeatable_info: '接口定義URL可重復 \n 啟用後接口定義重復性校驗將不校驗URL',
repeatable_info: '啟用後接口定義重復性校驗將不校驗URL',
case_public: '公共用例庫',
public_info: '啟動公共用例庫 \n 可以使用公共用例庫數據,也可以自行添加用例至公共用例庫',
public: '啟動公共用例庫',
public_info: '可以使用公共用例庫數據,也可以自行添加用例至公共用例庫',
upload_file_again: '重新上傳',
code_segment: {
code_segment: "自定義代碼片段",
@ -717,9 +721,9 @@ export default {
log_desc: '項目全部操作過程',
code_segment_desc: '自定義代碼片段',
test_case_custom_id: '測試用例自定義ID',
test_case_custom_id_info: '測試用例自定義ID \n 用例ID默認為系統自增ID',
test_case_custom_id_info: '用例ID默認為系統自增ID',
scenario_custom_id: '場景自定義ID',
scenario_custom_id_info: '場景自定義ID \n 場景用例ID默認為系統自增ID',
scenario_custom_id_info: '場景用例ID默認為系統自增ID',
},
member: {
create: '添加成員',
@ -746,7 +750,7 @@ export default {
no_such_user: '無此用戶信息, 請輸入正確的用戶 ID 或者 用戶郵箱!',
},
user: {
id:'用戶ID',
id: '用戶ID',
create: '創建用戶',
modify: '修改用戶',
input_name: '請輸入用戶姓名',
@ -816,7 +820,7 @@ export default {
add: '添加角色',
},
report: {
id:'報告ID',
id: '報告ID',
api_test_report: '接口測試報告',
load_test_report: '性能測試報告',
test_plan_report: '測試計劃報告',
@ -863,12 +867,12 @@ export default {
delete_batch_confirm: '確認批量刪除報告',
response_time: '響應時間(s)',
max_users: '並發數',
file_id:'文件ID',
avg_response_time:'平均響應時間',
tps:'每秒傳輸的事物處理個數'
file_id: '文件ID',
avg_response_time: '平均響應時間',
tps: '每秒傳輸的事物處理個數'
},
load_test: {
id:'測試ID',
id: '測試ID',
concurrency_thread_group: '並發讀取組',
thread_group: '線程組',
completed_test_report: '已完成測試報告',
@ -991,7 +995,7 @@ export default {
LatencyChart: '延遲',
BytesThroughputChart: '字節數',
Network: '網絡',
url:'路徑'
url: '路徑'
},
project_file_update_type_error: '更新的文件類型必須一致',
add_monitor: '添加監控',
@ -1048,7 +1052,7 @@ export default {
update_time: "更新時間"
},
expect_detail: "期望詳情",
request_condition:"請求觸發條件",
request_condition: "請求觸發條件",
base_info: "基本信息",
req_param: "請求參數",
rsp_param: "響應內容",
@ -1059,9 +1063,9 @@ export default {
},
definition: {
api_quick_button: '接口定義快捷添加按鈕',
id: '接口定義ID',
api_all: '全部接口',
unplanned_api: '未規劃接口',
id: '接口定義ID',
api_title: "接口列表",
case_title: "用例列表",
doc_title: "文檔",
@ -1080,7 +1084,7 @@ export default {
create_tip: "註: 詳細的接口信息可以在編輯頁面填寫",
api_import: "接口導入",
check_select: "請勾選接口",
api_project:"所屬項目",
api_project: "所屬項目",
select_comp: {
no_data: "無數據",
add_data: "去添加"
@ -1201,7 +1205,7 @@ export default {
none: "無"
},
},
case_reduction_error_text:"請先恢復"
case_reduction_error_text: "請先恢復"
},
automation: {
open_expansion: "一鍵展開",
@ -1239,7 +1243,7 @@ export default {
update_time: "最後更新時間",
step: "步驟數",
last_result: "最後結果",
last_result_id:'最後結果ID',
last_result_id: '最後結果ID',
passing_rate: "通過率",
success: "通過",
fail: "失敗",
@ -1263,9 +1267,9 @@ export default {
select_table: "選擇可見數據",
select_all: "選擇全部數據",
check_case: "請勾選場景用例",
api_none:"原始API不存在",
case_none:"原始CASE不存在",
num_none:"原始場景不存在"
api_none: "原始API不存在",
case_none: "原始CASE不存在",
num_none: "原始場景不存在"
},
report_name_info: '請輸入報告名稱',
save_case_info: '請先保存用例',
@ -1282,7 +1286,7 @@ export default {
generate_report: "生成報告",
},
environment: {
id:'環境ID',
id: '環境ID',
create: '創建環境',
name: "環境名稱",
socket: "環境域名",
@ -1306,7 +1310,7 @@ export default {
response_timeout: "響應超時",
},
scenario: {
id:"場景ID",
id: "場景ID",
scenario: "場景",
dubbo: "Dubbo配置",
config: "場景配置",
@ -1330,12 +1334,12 @@ export default {
clone: "復製",
cant_reference: '歷史測試文件,重新保存後才可被引用',
share_cookie: '共享cookie',
module_id:'場景模塊ID',
module_id: '場景模塊ID',
level: '級別',
version:"場景版本",
warning_context:"暫不支持批量添加所有場景到測試計劃!",
jmx_file_set:"場景JMX文件集",
error_report_jmx:"導出JMX文件失敗",
version: "場景版本",
warning_context: "暫不支持批量添加所有場景到測試計劃!",
jmx_file_set: "場景JMX文件集",
error_report_jmx: "導出JMX文件失敗",
},
request: {
debug: "調試",
@ -1386,54 +1390,54 @@ export default {
condition_variable: "變量,例如: ${var}",
wait: "等待",
all_name:"名字",
all_url:"網址",
boolean:"布林值",
capitalize:"大寫字母開頭",
cfirst:"姓(中文)",
character:"字元",
city:"都市",
clast:"名(中文)",
cname:"中文名",
color:"顏色",
county:"縣",
ctitle:"中文標題",
dataImage:"數據影像",
date:"日期",
datetime:"日期時間",
domain:"域",
email:"電子郵件",
first:"姓",
float:"浮點數",
guid:"指南",
hex:"十六進位",
hsl:"hsl",
id:"身份證件",
img:"圖片地址",
increment:"增量",
integer:"整數",
ip:"知識產權",
last:"名",
lower:"小寫字母",
natural:"自然數",
now:"當前時間",
paragraph:"段",
pick:"選擇",
protocol:"協定",
province:"省",
range:"範圍",
region:"地區",
rgb:"rgb",
rgba:"rgba",
sentence:"句子",
shuffle:"洗牌",
string:"字串",
time:"時間",
title:"標題",
tld:"tld",
upper:"大寫字母",
word:"詞",
zip:"郵遞區號",
all_name: "名字",
all_url: "url",
boolean: "布爾值",
capitalize: "大寫字母開頭",
cfirst: "姓(中文)",
character: "字符",
city: "城市",
clast: "名(中文)",
cname: "中文名",
color: "顏色",
county: "縣",
ctitle: "中文標題",
dataImage: "數據圖像",
date: "日期",
datetime: "日期時間",
domain: "域",
email: "電子郵件",
first: "姓",
float: "浮點數",
guid: "guid",
hex: "十六進製",
hsl: "hsl",
id: "id",
img: "圖片地址",
increment: "增量",
integer: "整數",
ip: "知識產權",
last: "名",
lower: "小寫字母",
natural: "自然數",
now: "當前時間",
paragraph: "段",
pick: "選擇",
protocol: "協議",
province: "省",
range: "範圍",
region: "地區",
rgb: "rgb",
rgba: "rgba",
sentence: "句子",
shuffle: "洗牌",
string: "字串",
time: "時間",
title: "標題",
tld: "tld",
upper: "大寫字母",
word: "詞",
zip: "郵政編碼",
assertions: {
label: "斷言",
@ -1466,19 +1470,19 @@ export default {
set_failure_status: "設置失敗狀態",
set_failure_msg: "設置失敗消息",
suggest_tip: "點擊便簽添加JSONPath斷言",
regex_info: '特殊字元“$* + . [ ] \\ ^ { } |”需轉義為“\\”+“特殊字元”,如“\\$”',
regex_info: '特殊字符"$ ( ) * + . [ ] \\ ^ { } |"需轉義為"\\ "+"特殊字符",如"\\$"',
regular_match: '正則匹配',
none: '不校驗[]',
value_eq: '值-等於[value=]',
value_not_eq: '值-不等於[value=]',
value_not_eq: '值-不等於[value!=]',
value_in: '值-包含[include=]',
length_eq: '長度-等於[length=]',
length_not_eq: '長度-不等於[length=]',
length_not_eq: '長度-不等於[length!=]',
length_gt: '長度-大於[length>]',
length_lt: '長度-小於[length<]',
must_contain: '必含',
type_verification: '類型校驗',
content_verification: '容校驗',
content_verification: '容校驗',
expected_results: '預期結果',
check: '校驗組內元素',
add_check: '添加校驗',
@ -1566,10 +1570,10 @@ export default {
title: "接口測試導入",
data_format: "數據格式",
file_size_limit: "文件大小不超過 50 M",
support_format: "支持p12,jks,pfx格式",
tip: "說明",
export_tip: "導出方法",
ms_tip: "支持 MeterSphere json 格式",
support_format: "支持p12,jks,pfx格式",
ms_export_tip: "通過 MeterSphere 接口測試頁面或者瀏覽器插件導出 json 格式文件",
har_export_tip: "通過 瀏覽器的開發者工具 導出 HAR 格式文件",
esb_export_tip: "暫時不支持ESB文件的導出",
@ -1813,9 +1817,9 @@ export default {
performance_test_case: "性能測試用例",
scenario_test_case: "場景測試用例",
report_statistics: "報告統計",
sort:'種類',
other_test_name:'其他測試名稱',
automatic_status_update:"自動狀態更新",
sort: '種類',
other_test_name: '其他測試名稱',
automatic_status_update: "自動狀態更新",
case: {
list: "列表",
minder: "腦圖",
@ -1903,10 +1907,10 @@ export default {
upload_tip: "只能上傳jpg、jpeg、png、docx、doc、pdf、xlsx、txt文件",
attachment: "附件",
upload_time: "上傳時間",
total:"用例總數",
node_id:"節點ID",
node_path:"節點路徑",
match_rule:"測試用例匹配規則",
total: "用例總數",
node_id: "節點ID",
node_path: "節點路徑",
match_rule: "測試用例匹配規則",
import: {
import: "導入用例",
case_import: "導入測試用例",
@ -1938,12 +1942,12 @@ export default {
export_tip: "請切換成接口列表勾選用例導出!"
},
case_desc: "用例描述",
passing_rate:'用例通過率'
passing_rate: '用例通過率'
},
plan: {
test_plan: "測試計劃",
test_plan_id:'測試計劃Id',
test_plan_id: '測試計劃Id',
create_plan: "創建測試計劃",
edit_plan: "編輯測試計劃",
plan_name: "計劃名稱",
@ -1980,10 +1984,10 @@ export default {
api_case: "接口測試用例",
scenario_case: "場景測試用例",
execute_result: "執行結果",
execute_time:'執行時間',
is_api_case_executing:"是否執行接口用例",
is_scenario_executing:'是否執行場景',
is_performance_executing:'是否執行性能',
execute_time: '執行時間',
is_api_case_executing: "是否執行接口用例",
is_scenario_executing: '是否執行場景',
is_performance_executing: '是否執行性能',
test_plan_test_case_count: "功能用例數",
test_plan_api_case_count: "接口用例數",
test_plan_api_scenario_count: "場景用例數",
@ -2000,11 +2004,11 @@ export default {
report_not_found: "報告不存在",
}
},
demand:{
id:'需求ID',
name:'需求名稱'
demand: {
id: '需求ID',
name: '需求名稱'
},
step_model:'步驟模型',
step_model: '步驟模型',
review: {
test_review: "用例評審",
create_review: "創建用例評審",
@ -2052,7 +2056,7 @@ export default {
execute_result: "評審結果",
},
module: {
id:'模塊ID',
id: '模塊ID',
search: "搜索模塊",
rename: "重命名",
add_submodule: "添加子模塊",
@ -2095,7 +2099,7 @@ export default {
relevance_test_case: "關聯測試用例",
cancel_all_relevance: "取消全部關聯",
executor: "執行人",
executor_match_rule:"執行者匹配規則",
executor_match_rule: "執行者匹配規則",
execute_result: "執行結果",
pass: "通過",
not_pass: "不通過",
@ -2120,7 +2124,7 @@ export default {
submit_issues: "提缺陷",
operate_step: "操作步驟",
edit_component: "編輯組件",
component:"組件",
component: "組件",
base_info: "基礎信息",
mock_info: "Mock服務",
test_result: "測試結果",
@ -2160,7 +2164,7 @@ export default {
title: "缺陷標題",
description: "缺陷描述",
status: "缺陷狀態",
issue_project:"所屬項目",
issue_project: "所屬項目",
platform: "平臺",
operate: "操作",
close: "關閉缺陷",
@ -2171,8 +2175,8 @@ export default {
status_new: '新建',
status_resolved: '已解決',
status_closed: '已關閉',
status_active:'激活',
status_delete:'刪除',
status_active: '激活',
status_delete: '刪除',
please_choose_current_owner: "請選擇處理人",
tapd_current_owner: "Tapd 處理人",
zentao_bug_build: "禪道 影響版本",
@ -2196,11 +2200,11 @@ export default {
automation: "自動觸發",
},
},
reporter:'報告人',
lastmodify:'最後更改'
reporter: '報告人',
lastmodify: '最後更改'
},
test_resource_pool: {
id:"測試資源池ID",
id: "測試資源池ID",
type: '類型',
enable_disable: '啟用/禁用',
search_by_name: '根據名稱搜索',
@ -2289,7 +2293,7 @@ export default {
not_set: "未設置",
test_name: '測試名稱',
running_rule: '運行規則',
job:'任務',
job: '任務',
job_status: '任務狀態',
running_task: '運行中的任務',
next_execution_time: "下次執行時間",
@ -2395,7 +2399,7 @@ export default {
preview: "預覽",
add_custom: "添加自定義屬性",
json_warning: "導入的數據非JSON格式",
json_schema_warning: '導入的數據非JSON-SCHEMA格式',
json_schema_warning: '導入的數據非JSON-SCHEMA 格式',
},
loop: {
loops_title: "次數循環",
@ -2425,7 +2429,7 @@ export default {
},
module: {
title: '模塊管理',
path:'模塊路徑'
path: '模塊路徑'
},
table: {
header_display_field: '表頭顯示字段',
@ -2497,8 +2501,8 @@ export default {
'PERFORMANCE_TEST_TASK': '性能測試',
'PERFORMANCE_REPORT_TASK': '性能測試報告',
'TRACK_TEST_CASE_TASK': '測試用例',
'TRACK_HOME_TASK': '測試跟首頁',
'TRACK_REPORT_TASK': '測試跟報告',
'TRACK_HOME_TASK': '測試跟首頁',
'TRACK_REPORT_TASK': '測試跟報告',
},
result: {
'EXECUTE_SUCCESSFUL': '成功',
@ -2518,18 +2522,18 @@ export default {
edit_password: "修改密碼"
},
system_workspace: {
name: "工作空",
read: "查詢工作空",
create: "創建工作空",
edit: "編輯工作空",
delete: "刪除工作空",
name: "工作空",
read: "查詢工作空",
create: "創建工作空",
edit: "編輯工作空",
delete: "刪除工作空",
},
system_group: {
name: "用戶组与权限",
read: "查詢用戶组与权限",
create: "創建用戶",
edit: "編輯用戶",
setting_permission: "设置权限",
name: "用戶組與權限",
read: "查詢用戶組與權限",
create: "創建用戶",
edit: "編輯用戶",
setting_permission: "設置權限",
delete: "刪除"
},
system_test_pool: {
@ -2556,7 +2560,7 @@ export default {
},
system_operation_log: {
name: "操作日誌",
read: "查詢操作日"
read: "查詢操作日"
},
workspace_user: {
name: "成員",
@ -2583,30 +2587,30 @@ export default {
custom: "自定義字段"
},
workspace_project_manager: {
name: "目管理",
read: "查詢目",
create: "創建目",
edit: "編輯目",
delete: "刪除目",
upload_jar: "上jar包",
name: "目管理",
read: "查詢目",
create: "創建目",
edit: "編輯目",
delete: "刪除目",
upload_jar: "上jar包",
},
workspace_project_environment: {
name: "环境设置",
name: "環境設置",
read: "查詢",
create: "創建境",
edit: "編輯境",
delete: "刪除境",
copy: "複製环境",
import: "導入境",
export: "導出境",
create_group: "創建环境组",
edit_group: "編輯环境组",
copy_group: "複製环境组",
delete_group: "刪除环境组",
create: "創建境",
edit: "編輯境",
delete: "刪除境",
copy: "復製環境",
import: "導入境",
export: "導出境",
create_group: "創建環境組",
edit_group: "編輯環境組",
copy_group: "復製環境組",
delete_group: "刪除環境組",
},
workspace_operation_log: {
name: "操作日",
read: "查詢操作日"
name: "操作日",
read: "查詢操作日"
},
project_user: {
name: "成員",
@ -2616,47 +2620,47 @@ export default {
delete: "移除成員",
},
project_manager: {
name: "目管理",
read: "查詢目",
edit: "編輯目"
name: "目管理",
read: "查詢目",
edit: "編輯目"
},
project_group: {
name: "用戶组与权限",
read: "查詢用戶组与权限",
create: "創建用戶组与权限",
edit: "編輯用戶组与权限",
delete: "刪除用戶组与权限",
setting_permission: "设置权限",
name: "用戶組與權限",
read: "查詢用戶組與權限",
create: "創建用戶組與權限",
edit: "編輯用戶組與權限",
delete: "刪除用戶組與權限",
setting_permission: "設置權限",
},
project_environment: {
name: "环境设置",
read: "查詢境",
create: "創建境",
edit: "編輯境",
delete: "刪除境",
copy: "複製环境",
import: "導入境",
export: "導出境",
name: "環境設置",
read: "查詢境",
create: "創建境",
edit: "編輯境",
delete: "刪除境",
copy: "復製環境",
import: "導入境",
export: "導出境",
},
project_operation_log: {
name: "操作日",
read: "查詢操作日"
name: "操作日",
read: "查詢操作日"
},
project_custom_code: {
name: "自定義代片段",
name: "自定義代片段",
read: "查詢",
create: "創建",
edit: "編輯",
delete: "刪除",
copy: "製",
copy: "製",
},
project_file: {
name: "文件管理",
jar: "查詢jar包",
upload_jar: "上jar包",
upload_jar: "上jar包",
delete_jar: "刪除jar包",
read: "查詢文件",
upload_file: "上文件",
upload_file: "上文件",
delete_file: "刪除文件",
},
project_track_case: {
@ -2665,10 +2669,10 @@ export default {
create: "創建用例",
edit: "編輯用例",
delete: "刪除用例",
copy: "製用例",
copy: "製用例",
import: "導入用例",
export: "導出用例",
recover: "恢用例",
recover: "恢用例",
},
project_track_review: {
name: "測試評審",
@ -2687,13 +2691,13 @@ export default {
create: "創建測試計劃",
edit: "編輯測試計劃",
delete: "刪除測試計劃",
copy: "製測試計劃",
run: "行測試計劃",
batch_run: "批量行用例",
copy: "製測試計劃",
run: "行測試計劃",
batch_run: "批量行用例",
batch_edit: "批量編輯用例",
schedule: "定时任务",
schedule: "定時任務",
relevance_or_cancel: "關聯/取消關聯用例",
batch_delete: "批量取消关联用例",
batch_delete: "批量取消關聯用例",
},
project_track_issue: {
name: "缺陷",
@ -2709,40 +2713,40 @@ export default {
export: "導出報告",
},
project_api_definition: {
name: "接口定",
name: "接口定",
read: "查詢接口",
create_api: "創建接口",
edit_api: "編輯接口",
delete_api: "刪除接口",
copy_api: "製接口",
copy_api: "製接口",
create_case: "添加用例",
edit_case: "編輯用例",
delete_case: "刪除用例",
copy_case: "製用例",
copy_case: "製用例",
import_api: "導入接口",
export_api: "導出接口",
timing_sync: "定同步",
timing_sync: "定同步",
create_performance: "創建性能測試",
run: "行",
debug: "调试",
mock: "MOCK置",
run: "行",
debug: "調試",
mock: "MOCK置",
},
project_api_scenario: {
name: "接口自化",
name: "接口自化",
read: "查詢場景",
create: "創建場景",
edit: "編輯場景",
delete: "刪除場景",
copy: "製場景",
run: "行場景",
debug: "调试場景",
schedule: "定时任务",
copy: "製場景",
run: "行場景",
debug: "調試場景",
schedule: "定時任務",
import: "導入場景",
export: "導出場景",
move_batch: "批量移",
move_batch: "批量移",
create_performance: "創建性能測試",
create_performance_batch: "批量創建性能測試",
batch_copy: "批量製",
batch_copy: "批量製",
},
project_api_report: {
name: "測試報告",
@ -2756,31 +2760,31 @@ export default {
create: "創建測試",
edit: "編輯測試",
delete: "刪除測試",
copy: "製測試",
run: "行",
schedule: "定时任务",
copy: "製測試",
run: "行",
schedule: "定時任務",
},
project_performance_report: {
name: "報告",
read: "查詢報告",
delete: "刪除報告",
export: "導出報告",
compare: "比報告",
compare: "比報告",
},
project_report_analysis: {
name: "報表",
read: "查看",
export: "導出",
update: "保存",
create: "另存",
create: "另存",
},
project_enterprise_report: {
name: "目報告",
export: "发送邮件",
name: "目報告",
export: "發送郵件",
create: "創建報告",
delete: "刪除報告",
copy: "製報告",
schedule: "定时发送",
copy: "製報告",
schedule: "定時發送",
edit: "修改報告",
},
@ -2791,12 +2795,11 @@ export default {
read: "查看腳本",
},
other: {
track: "測試跟",
track: "測試跟",
api: "接口測試",
performance: "性能測試",
project: "項目設置",
report: "報表統計"
}
}
};

View File

@ -8,7 +8,7 @@
<img :src="'/display/file/loginLogo'" alt="">
</div>
<div class="welcome">
<span>{{ loginTitle }}</span>
<span>{{ $t("commons.welcome") }}</span>
</div>
</div>
<div class="form">
@ -16,7 +16,7 @@
<el-form-item v-slot:default>
<el-radio-group v-model="form.authenticate" @change="redirectAuth(form.authenticate)">
<el-radio label="LDAP" size="mini" v-if="openLdap">LDAP</el-radio>
<el-radio label="LOCAL" size="mini" v-if="openLdap">普通登录</el-radio>
<el-radio label="LOCAL" size="mini" v-if="openLdap">{{ $t('login.normal_Login') }}</el-radio>
<el-radio :label="auth.id" size="mini" v-for="auth in authSources" :key="auth.id">{{ auth.type }}
{{ auth.name }}
</el-radio>
@ -59,7 +59,7 @@
<script>
import {publicKeyEncrypt, saveLocalStorage} from '@/common/js/utils';
import {DEFAULT_LANGUAGE, PRIMARY_COLOR} from "@/common/js/constants";
import {CURRENT_LANGUAGE, DEFAULT_LANGUAGE, PRIMARY_COLOR} from "@/common/js/constants";
const requireComponent = require.context('@/business/components/xpack/', true, /\.vue$/);
const display = requireComponent.keys().length > 0 ? requireComponent("./display/Display.vue") : {};
@ -76,19 +76,10 @@ export default {
password: '',
authenticate: 'LOCAL'
},
rules: {
username: [
{required: true, message: this.$t('commons.input_login_username'), trigger: 'blur'},
],
password: [
{required: true, message: this.$t('commons.input_password'), trigger: 'blur'},
{min: 6, max: 30, message: this.$t('commons.input_limit', [6, 30]), trigger: 'blur'}
]
},
rules: this.getDefaultRules(),
msg: '',
ready: false,
openLdap: false,
loginTitle: this.$t("commons.welcome"),
authSources: [],
loginUrl: 'signin',
};
@ -119,6 +110,11 @@ export default {
this.ready = true;
//
localStorage.setItem("publicKey", response.data.message);
let lang = localStorage.getItem(CURRENT_LANGUAGE);
if (lang) {
this.$setLang(lang);
this.rules = this.getDefaultRules();
}
} else {
let user = response.data.data;
saveLocalStorage(response.data);
@ -207,6 +203,17 @@ export default {
if (auth.default) {
auth.default.redirectAuth(this, authId);
}
},
getDefaultRules() { //
return {
username: [
{required: true, message: this.$t('commons.input_login_username'), trigger: 'blur'},
],
password: [
{required: true, message: this.$t('commons.input_password'), trigger: 'blur'},
{min: 6, max: 30, message: this.$t('commons.input_limit', [6, 30]), trigger: 'blur'}
]
};
}
}
};