File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed
ui/src/views/compute/backup Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ export default {
9999 default: false
100100 },
101101 dataSource: {
102- type: Object ,
102+ type: Array ,
103103 required: true
104104 },
105105 deleteFn: {
@@ -128,6 +128,7 @@ export default {
128128 dataIndex: ' intervaltype'
129129 },
130130 {
131+ key: ' time' ,
131132 title: this .$t (' label.time' ),
132133 dataIndex: ' schedule'
133134 },
Original file line number Diff line number Diff line change 3535 v-model:value =" form.intervaltype"
3636 button-style =" solid"
3737 @change =" handleChangeIntervalType" >
38- <a-radio-button value =" hourly" >
38+ <a-radio-button value =" hourly" :disabled = " handleVisibleInterval('HOURLY') " >
3939 {{ $t('label.hourly') }}
4040 </a-radio-button >
41- <a-radio-button value =" daily" >
41+ <a-radio-button value =" daily" :disabled = " handleVisibleInterval('DAILY') " >
4242 {{ $t('label.daily') }}
4343 </a-radio-button >
44- <a-radio-button value =" weekly" >
44+ <a-radio-button value =" weekly" :disabled = " handleVisibleInterval('WEEKLY') " >
4545 {{ $t('label.weekly') }}
4646 </a-radio-button >
47- <a-radio-button value =" monthly" >
47+ <a-radio-button value =" monthly" :disabled = " handleVisibleInterval('MONTHLY') " >
4848 {{ $t('label.monthly') }}
4949 </a-radio-button >
5050 </a-radio-group >
@@ -180,6 +180,10 @@ export default {
180180 type: Boolean ,
181181 default: false
182182 },
183+ dataSource: {
184+ type: Array ,
185+ required: true
186+ },
183187 resource: {
184188 type: Object ,
185189 required: true
@@ -287,6 +291,16 @@ export default {
287291 break
288292 }
289293 },
294+ handleVisibleInterval (intervalType ) {
295+ if (this .dataSource ? .length === 0 ) {
296+ return false
297+ }
298+ const dataSource = this .dataSource .filter (item => item .intervaltype === intervalType)
299+ if (dataSource && dataSource .length > 0 ) {
300+ return true
301+ }
302+ return false
303+ },
290304 handleSubmit (e ) {
291305 if (this .actionLoading ) return
292306 this .formRef .value .validate ().then (() => {
You can’t perform that action at this time.
0 commit comments