fix: backup 国际化
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
width: calc(100% / 7);
|
||||
.el-checkbox-button__inner{
|
||||
width: 100%;
|
||||
padding: 11px 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
background: $--button-primary-color;
|
||||
border: 1px solid #DEDEDE;
|
||||
border-radius: 2px;
|
||||
width: 30px;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
.table-operation-button {
|
||||
@@ -22,10 +22,11 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 22px;
|
||||
width: 130px;
|
||||
// width: 130px;
|
||||
max-width: 98px;
|
||||
min-width: 74px;
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
// border-radius: $--button-border-radius;
|
||||
// outline: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
.system {
|
||||
padding-top: 40px;
|
||||
.system-config-backup{
|
||||
width: 100% !important;
|
||||
}
|
||||
.system-config-form {
|
||||
padding-bottom: 20px;
|
||||
.system-title {
|
||||
@@ -22,8 +25,6 @@
|
||||
.items-button {
|
||||
background: $--color-warning;
|
||||
border-radius: 2px;
|
||||
width: 98px;
|
||||
height: 30px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 14px;
|
||||
color: $--license-left-title-color;
|
||||
|
||||
@@ -17,21 +17,21 @@
|
||||
label-width="120px"
|
||||
ref="backupsForm"
|
||||
>
|
||||
<el-form-item label="schedule" prop="type">
|
||||
<el-form-item :label="$t('backup.schedule')" prop="type">
|
||||
<el-tabs
|
||||
v-model="editBackup.type"
|
||||
@tab-click="datasourceChange"
|
||||
type="card"
|
||||
class="backups-info-tab"
|
||||
>
|
||||
<el-tab-pane label="One time only" name="1"> </el-tab-pane>
|
||||
<el-tab-pane label="Daily" name="2"> </el-tab-pane>
|
||||
<el-tab-pane label="Weekly" name="3"> </el-tab-pane>
|
||||
<el-tab-pane label="Monthly" name="4"> </el-tab-pane>
|
||||
<el-tab-pane :label="$t('backup.only')" name="1"> </el-tab-pane>
|
||||
<el-tab-pane :label="$t('backup.Daily')" name="2"> </el-tab-pane>
|
||||
<el-tab-pane :label="$t('backup.Weekly')" name="3"> </el-tab-pane>
|
||||
<el-tab-pane :label="$t('backup.Monthly')" name="4"> </el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="Start at"
|
||||
:label="$t('backup.start')"
|
||||
prop="datepicker"
|
||||
v-if="whoshow"
|
||||
class="start_at"
|
||||
@@ -40,7 +40,7 @@
|
||||
v-model="editBackup.datepicker[0]"
|
||||
type="date"
|
||||
:format="timeFormatStrToDatePickFormat(dateFormatStr)"
|
||||
placeholder="选择日期"
|
||||
:placeholder="$t('backup.SelectData')"
|
||||
>
|
||||
</my-date-picker>
|
||||
|
||||
@@ -48,12 +48,13 @@
|
||||
:value-format="'HH:mm:ss'"
|
||||
:format="'HH:mm:ss'"
|
||||
v-model="editBackup.datepicker[1]"
|
||||
placeholder="选择时间"
|
||||
:placeholder="$t('backup.SelectTime')"
|
||||
>
|
||||
</el-time-picker>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="Enable"
|
||||
:label="$t('backup.Enable')"
|
||||
|
||||
prop="status"
|
||||
class="form-item__switch"
|
||||
v-if="whoshow !== 2 ? true : false"
|
||||
@@ -66,7 +67,7 @@
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="Every day of the months"
|
||||
:label="$t('backup.DayOfMonth')"
|
||||
prop="checkDays"
|
||||
v-if="whoshow === 4 ? true : false"
|
||||
class="check-month_box"
|
||||
@@ -84,7 +85,8 @@
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="Backup Retention"
|
||||
:label="$t('backup.backupRetention')"
|
||||
|
||||
prop="retention"
|
||||
v-if="whoshow !== 2 ? true : false"
|
||||
>
|
||||
@@ -97,7 +99,7 @@
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="Week on"
|
||||
:label="$t('backup.WeekOn')"
|
||||
prop="checkDay"
|
||||
v-if="whoshow === 3 ? true : false"
|
||||
class="check_box"
|
||||
@@ -115,7 +117,7 @@
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="Repeat every"
|
||||
:label="$t('backup.RepeatEvery')"
|
||||
prop="repeat"
|
||||
v-if="whoshow === 2 || whoshow === 3 ? true : false"
|
||||
>
|
||||
@@ -126,7 +128,7 @@
|
||||
id="chart-box-title"
|
||||
@change="inputchange"
|
||||
>
|
||||
<template slot="append">week</template>
|
||||
<template slot="append">{{$t('backup.week')}}</template>
|
||||
</el-input>
|
||||
<el-input
|
||||
v-if="whoshow === 2 ? true : false"
|
||||
@@ -135,7 +137,7 @@
|
||||
id="chart-box-title"
|
||||
@change="inputchange"
|
||||
>
|
||||
<template slot="append">days</template>
|
||||
<template slot="append">{{$t('backup.day')}}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -242,7 +244,7 @@ export default {
|
||||
],
|
||||
checkDay: [{ validator: arrLength, trigger: "blur" }],
|
||||
},
|
||||
week: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
|
||||
week: [this.$t('week.Mon'),this.$t('week.Tue'),this.$t('week.Wed'),this.$t('week.Thu'),this.$t('week.Fri'),this.$t('week.Sat'),this.$t('week.Sun'),],
|
||||
month: [
|
||||
1,
|
||||
2,
|
||||
@@ -336,8 +338,6 @@ export default {
|
||||
save() {
|
||||
this.$refs.backupsForm.validate((valid) => {
|
||||
if (valid) {
|
||||
console.log(this.editBackup);
|
||||
|
||||
this.editBackup.stime = this.editBackup.datepicker.join(" ");
|
||||
this.editBackup.stime = this.timezoneToUtcTime(this.editBackup.stime); // 将本地时间转 utc时间
|
||||
put("/sys/backup", {
|
||||
@@ -352,6 +352,7 @@ export default {
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.esc(true);
|
||||
console.log(this.editBackup);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
v-if="isConfigurations"
|
||||
>
|
||||
<button class="table-operation-button" @click="backupNow(scope.row)">
|
||||
backup now
|
||||
{{$t('backup.backupNow')}}
|
||||
</button>
|
||||
<el-dropdown size="medium" trigger="click" @command="tableOperation">
|
||||
<div class="table-operation-item table-operation-item--more">
|
||||
@@ -68,7 +68,7 @@
|
||||
</div>
|
||||
<div slot-scope="scope" v-else class="table-operation-items">
|
||||
<button class="table-operation-button" @click="Restore(scope.row)">
|
||||
Restore
|
||||
{{$t('backup.Restore')}}
|
||||
</button>
|
||||
<button class="table-operation-del" @click="del(scope.row)">
|
||||
<i class="nz-icon nz-icon-delete"></i>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="system">
|
||||
<div class="system-config-form">
|
||||
<div class="system-title">backup configurations</div>
|
||||
<div class="system-config-form system-config-backup">
|
||||
<div class="system-title">{{$t('backup.configurations')}}</div>
|
||||
<nz-data-list
|
||||
ref="dataList"
|
||||
id="modelTable"
|
||||
@@ -22,8 +22,8 @@
|
||||
</nz-data-list>
|
||||
</div>
|
||||
|
||||
<div class="system-config-form">
|
||||
<div class="system-title">Recent backup</div>
|
||||
<div class="system-config-form system-config-backup">
|
||||
<div class="system-title">{{$t('backup.recent')}}</div>
|
||||
<nz-data-list
|
||||
ref="dataList"
|
||||
id="modelTable"
|
||||
@@ -61,16 +61,16 @@ export default {
|
||||
|
||||
url: '/sys/backup/list',
|
||||
customTableTitle: [
|
||||
{ label: 'Frequency', prop: 'repeat' },
|
||||
{ label: 'Backup Retention', prop: 'retention' },
|
||||
{ label: 'Last backup at', prop: 'last' },
|
||||
{ label: 'Enable', prop: 'state' }
|
||||
{ label: this.$t('backup.frequency'), prop: 'repeat' },
|
||||
{ label: this.$t('backup.backupRetention'), prop: 'retention' },
|
||||
{ label: this.$t('backup.last'), prop: 'last' },
|
||||
{ label: this.$t('backup.Enable'), prop: 'state' }
|
||||
],
|
||||
customTableTitle2: [
|
||||
{ label: 'Date', prop: 'time' },
|
||||
{ label: 'File', prop: 'fileName' },
|
||||
{ label: 'Size', prop: 'size' },
|
||||
{ label: 'Description', prop: 'Description' }
|
||||
{ label: this.$t('backup.Date'), prop: 'time' },
|
||||
{ label: this.$t('backup.File'), prop: 'fileName' },
|
||||
{ label: this.$t('backup.size'), prop: 'size' },
|
||||
{ label: this.$t('backup.Description'), prop: 'Description' }
|
||||
],
|
||||
tableData: [
|
||||
{
|
||||
@@ -101,7 +101,7 @@ export default {
|
||||
methods: {
|
||||
edit (row) {
|
||||
this.object = { ...row }
|
||||
this.object.name = 'Edit backup configurations'
|
||||
this.object.name = this.$t('backup.edit')
|
||||
if (this.object.schedule) {
|
||||
for (const i in this.object.schedule) {
|
||||
this.object[i] = this.object.schedule[i]
|
||||
|
||||
Reference in New Issue
Block a user