|
|
@ -186,9 +186,9 @@ |
|
|
|
<el-form-item |
|
|
|
<el-form-item |
|
|
|
v-if="dialogData.rowData!.type === 'website' || dialogData.rowData!.type === 'cutWebsiteLog'" |
|
|
|
v-if="dialogData.rowData!.type === 'website' || dialogData.rowData!.type === 'cutWebsiteLog'" |
|
|
|
:label="dialogData.rowData!.type === 'website' ? $t('cronjob.website'):$t('website.website')" |
|
|
|
:label="dialogData.rowData!.type === 'website' ? $t('cronjob.website'):$t('website.website')" |
|
|
|
prop="website" |
|
|
|
prop="websiteList" |
|
|
|
> |
|
|
|
> |
|
|
|
<el-select class="selectClass" v-model="dialogData.rowData!.website"> |
|
|
|
<el-select class="selectClass" multiple v-model="dialogData.rowData!.websiteList"> |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
:disabled="websiteOptions.length === 0" |
|
|
|
:disabled="websiteOptions.length === 0" |
|
|
|
:label="$t('commons.table.all')" |
|
|
|
:label="$t('commons.table.all')" |
|
|
@ -212,8 +212,8 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<div v-if="dialogData.rowData!.type === 'app'"> |
|
|
|
<div v-if="dialogData.rowData!.type === 'app'"> |
|
|
|
<el-form-item :label="$t('cronjob.app')" prop="appID"> |
|
|
|
<el-form-item :label="$t('cronjob.app')" prop="appIdList"> |
|
|
|
<el-select class="selectClass" clearable v-model="dialogData.rowData!.appID"> |
|
|
|
<el-select class="selectClass" multiple clearable v-model="dialogData.rowData!.appIdList"> |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
:disabled="appOptions.length === 0" |
|
|
|
:disabled="appOptions.length === 0" |
|
|
|
:label="$t('commons.table.all')" |
|
|
|
:label="$t('commons.table.all')" |
|
|
@ -239,8 +239,8 @@ |
|
|
|
<el-radio value="postgresql">PostgreSQL</el-radio> |
|
|
|
<el-radio value="postgresql">PostgreSQL</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="$t('cronjob.database')" prop="dbName"> |
|
|
|
<el-form-item :label="$t('cronjob.database')" prop="dbNameList"> |
|
|
|
<el-select class="selectClass" clearable v-model="dialogData.rowData!.dbName"> |
|
|
|
<el-select class="selectClass" multiple clearable v-model="dialogData.rowData!.dbNameList"> |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
:disabled="dbInfo.dbs.length === 0" |
|
|
|
:disabled="dbInfo.dbs.length === 0" |
|
|
|
:label="$t('commons.table.all')" |
|
|
|
:label="$t('commons.table.all')" |
|
|
@ -378,6 +378,7 @@ import { listContainer } from '@/api/modules/container'; |
|
|
|
import { Database } from '@/api/interface/database'; |
|
|
|
import { Database } from '@/api/interface/database'; |
|
|
|
import { ListAppInstalled } from '@/api/modules/app'; |
|
|
|
import { ListAppInstalled } from '@/api/modules/app'; |
|
|
|
import { loadDefaultSpec, specOptions, transObjToSpec, transSpecToObj, weekOptions } from './../helper'; |
|
|
|
import { loadDefaultSpec, specOptions, transObjToSpec, transSpecToObj, weekOptions } from './../helper'; |
|
|
|
|
|
|
|
|
|
|
|
const router = useRouter(); |
|
|
|
const router = useRouter(); |
|
|
|
|
|
|
|
|
|
|
|
interface DialogProps { |
|
|
|
interface DialogProps { |
|
|
@ -385,6 +386,7 @@ interface DialogProps { |
|
|
|
rowData?: Cronjob.CronjobInfo; |
|
|
|
rowData?: Cronjob.CronjobInfo; |
|
|
|
getTableList?: () => Promise<any>; |
|
|
|
getTableList?: () => Promise<any>; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const title = ref<string>(''); |
|
|
|
const title = ref<string>(''); |
|
|
|
const drawerVisible = ref(false); |
|
|
|
const drawerVisible = ref(false); |
|
|
|
const dialogData = ref<DialogProps>({ |
|
|
|
const dialogData = ref<DialogProps>({ |
|
|
@ -408,6 +410,15 @@ const acceptParams = (params: DialogProps): void => { |
|
|
|
if (dialogData.value.rowData.backupAccounts) { |
|
|
|
if (dialogData.value.rowData.backupAccounts) { |
|
|
|
dialogData.value.rowData.backupAccountList = dialogData.value.rowData.backupAccounts.split(','); |
|
|
|
dialogData.value.rowData.backupAccountList = dialogData.value.rowData.backupAccounts.split(','); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (dialogData.value.rowData.appID) { |
|
|
|
|
|
|
|
dialogData.value.rowData.appIdList = dialogData.value.rowData.appID.split(','); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (dialogData.value.rowData.website) { |
|
|
|
|
|
|
|
dialogData.value.rowData.websiteList = dialogData.value.rowData.website.split(','); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (dialogData.value.rowData.dbName) { |
|
|
|
|
|
|
|
dialogData.value.rowData.dbNameList = dialogData.value.rowData.dbName.split(','); |
|
|
|
|
|
|
|
} |
|
|
|
dialogData.value.rowData!.command = dialogData.value.rowData!.command || 'sh'; |
|
|
|
dialogData.value.rowData!.command = dialogData.value.rowData!.command || 'sh'; |
|
|
|
dialogData.value.rowData!.isCustom = |
|
|
|
dialogData.value.rowData!.isCustom = |
|
|
|
dialogData.value.rowData!.command !== 'sh' && |
|
|
|
dialogData.value.rowData!.command !== 'sh' && |
|
|
@ -718,6 +729,17 @@ const onSubmit = async (formEl: FormInstance | undefined) => { |
|
|
|
specs.push(itemSpec); |
|
|
|
specs.push(itemSpec); |
|
|
|
} |
|
|
|
} |
|
|
|
dialogData.value.rowData.backupAccounts = dialogData.value.rowData.backupAccountList.join(','); |
|
|
|
dialogData.value.rowData.backupAccounts = dialogData.value.rowData.backupAccountList.join(','); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (dialogData.value.rowData.appIdList) { |
|
|
|
|
|
|
|
dialogData.value.rowData.appID = dialogData.value.rowData.appIdList.join(','); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (dialogData.value.rowData.websiteList) { |
|
|
|
|
|
|
|
dialogData.value.rowData.website = dialogData.value.rowData.websiteList.join(','); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (dialogData.value.rowData.dbNameList) { |
|
|
|
|
|
|
|
dialogData.value.rowData.dbName = dialogData.value.rowData.dbNameList.join(','); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
dialogData.value.rowData.spec = specs.join(','); |
|
|
|
dialogData.value.rowData.spec = specs.join(','); |
|
|
|
if (!formEl) return; |
|
|
|
if (!formEl) return; |
|
|
|
formEl.validate(async (valid) => { |
|
|
|
formEl.validate(async (valid) => { |
|
|
@ -750,40 +772,49 @@ defineExpose({ |
|
|
|
.specClass { |
|
|
|
.specClass { |
|
|
|
width: 20% !important; |
|
|
|
width: 20% !important; |
|
|
|
margin-left: 20px; |
|
|
|
margin-left: 20px; |
|
|
|
|
|
|
|
|
|
|
|
.append { |
|
|
|
.append { |
|
|
|
width: 20px; |
|
|
|
width: 20px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@media only screen and (max-width: 1000px) { |
|
|
|
@media only screen and (max-width: 1000px) { |
|
|
|
.specClass { |
|
|
|
.specClass { |
|
|
|
width: 100% !important; |
|
|
|
width: 100% !important; |
|
|
|
margin-top: 20px; |
|
|
|
margin-top: 20px; |
|
|
|
margin-left: 0; |
|
|
|
margin-left: 0; |
|
|
|
|
|
|
|
|
|
|
|
.append { |
|
|
|
.append { |
|
|
|
width: 43px; |
|
|
|
width: 43px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.specTypeClass { |
|
|
|
.specTypeClass { |
|
|
|
width: 22% !important; |
|
|
|
width: 22% !important; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@media only screen and (max-width: 1000px) { |
|
|
|
@media only screen and (max-width: 1000px) { |
|
|
|
.specTypeClass { |
|
|
|
.specTypeClass { |
|
|
|
width: 100% !important; |
|
|
|
width: 100% !important; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.selectClass { |
|
|
|
.selectClass { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.tagClass { |
|
|
|
.tagClass { |
|
|
|
float: right; |
|
|
|
float: right; |
|
|
|
margin-right: 10px; |
|
|
|
margin-right: 10px; |
|
|
|
font-size: 12px; |
|
|
|
font-size: 12px; |
|
|
|
margin-top: 5px; |
|
|
|
margin-top: 5px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.logText { |
|
|
|
.logText { |
|
|
|
line-height: 22px; |
|
|
|
line-height: 22px; |
|
|
|
font-size: 12px; |
|
|
|
font-size: 12px; |
|
|
|
|
|
|
|
|
|
|
|
.link { |
|
|
|
.link { |
|
|
|
font-size: 12px; |
|
|
|
font-size: 12px; |
|
|
|
margin-top: -3px; |
|
|
|
margin-top: -3px; |
|
|
|