|
99 | 99 | {{ row.lastRecordTime }} |
100 | 100 | </template> |
101 | 101 | </el-table-column> |
102 | | - <el-table-column :min-width="80" :label="$t('setting.backupAccount')" prop="defaultDownload"> |
| 102 | + <el-table-column :min-width="80" :label="$t('setting.backupAccount')"> |
103 | 103 | <template #default="{ row }"> |
104 | 104 | <span v-if="!hasBackup(row.type)">-</span> |
105 | 105 | <div v-else> |
106 | | - <div v-for="(item, index) of row.backupAccounts?.split(',')" :key="index"> |
| 106 | + <div v-for="(item, index) of row.sourceAccounts" :key="index"> |
107 | 107 | <div v-if="row.accountExpand || (!row.accountExpand && index < 3)"> |
108 | | - <span v-if="row.backupAccounts"> |
109 | | - <span> |
110 | | - {{ $t('setting.' + item) }} |
| 108 | + <div v-if="row.expand || (!row.expand && index < 3)"> |
| 109 | + <span type="info"> |
| 110 | + <span> |
| 111 | + {{ loadName(item) }} |
| 112 | + </span> |
| 113 | + <el-icon |
| 114 | + v-if="item === row.downloadAccount" |
| 115 | + size="12" |
| 116 | + class="relative top-px left-1" |
| 117 | + > |
| 118 | + <Star /> |
| 119 | + </el-icon> |
111 | 120 | </span> |
112 | | - <el-icon |
113 | | - size="12" |
114 | | - v-if="item === row.defaultDownload" |
115 | | - class="relative top-px left-1" |
116 | | - > |
117 | | - <Star /> |
118 | | - </el-icon> |
119 | | - </span> |
120 | | - <span v-else>-</span> |
| 121 | + </div> |
121 | 122 | </div> |
122 | 123 | </div> |
123 | | - <div v-if="!row.accountExpand && row.backupAccounts?.split(',').length > 3"> |
| 124 | + <div v-if="!row.accountExpand && row.sourceAccounts?.length > 3"> |
124 | 125 | <el-button type="primary" link @click="row.accountExpand = true"> |
125 | 126 | {{ $t('commons.button.expand') }}... |
126 | 127 | </el-button> |
127 | 128 | </div> |
128 | | - <div v-if="row.accountExpand && row.backupAccounts?.split(',').length > 3"> |
| 129 | + <div v-if="row.accountExpand && row.sourceAccounts?.length > 3"> |
129 | 130 | <el-button type="primary" link @click="row.accountExpand = false"> |
130 | 131 | {{ $t('commons.button.collapse') }} |
131 | 132 | </el-button> |
@@ -209,18 +210,6 @@ const search = async (column?: any) => { |
209 | 210 | .then((res) => { |
210 | 211 | loading.value = false; |
211 | 212 | data.value = res.data.items || []; |
212 | | - for (const item of data.value) { |
213 | | - let itemAccounts = item.backupAccounts.split(',') || []; |
214 | | - let accounts = []; |
215 | | - for (const account of itemAccounts) { |
216 | | - if (account == item.defaultDownload) { |
217 | | - accounts.unshift(account); |
218 | | - } else { |
219 | | - accounts.push(account); |
220 | | - } |
221 | | - } |
222 | | - item.itemAccounts = accounts.join(','); |
223 | | - } |
224 | 213 | paginationConfig.total = res.data.total; |
225 | 214 | }) |
226 | 215 | .catch(() => { |
@@ -364,6 +353,11 @@ const loadDetail = (row: any) => { |
364 | 353 | dialogRecordRef.value!.acceptParams(params); |
365 | 354 | }; |
366 | 355 |
|
| 356 | +const loadName = (from: any) => { |
| 357 | + let items = from.split(' - '); |
| 358 | + return i18n.global.t('setting.' + items[0]) + ' ' + items[1]; |
| 359 | +}; |
| 360 | +
|
367 | 361 | const buttons = [ |
368 | 362 | { |
369 | 363 | label: i18n.global.t('commons.button.handle'), |
|
0 commit comments