| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <template>
- <page-list
- :list="list"
- :columns="columns"
- show-sync
- :export-data-options="exportDataOptions"
- :placeholder="this.$t('common.text00014')" />
- </template>
- <script>
- import {
- getTimeRangeFilter,
- } from '@/utils/common/tableFilter'
- import {
- getStatusTableColumn,
- } from '@/utils/common/tableColumn'
- import WindowsMixin from '@/mixins/windows'
- import ListMixin from '@/mixins/list'
- export default {
- name: 'BillSyncForCloudaccountSidepage',
- mixins: [WindowsMixin, ListMixin],
- props: {
- id: String,
- resId: String,
- data: Object,
- getParams: [Function, Object],
- },
- data () {
- return {
- columns: [
- {
- field: 'type',
- title: this.$t('cloudenv.text_425'),
- minWidth: 100,
- slots: {
- default: ({ row }) => {
- return this.$t('cloudenv.bill_sync')
- },
- },
- },
- getStatusTableColumn({ statusModule: 'scheduledtaskBillSync', minWidth: 90 }),
- {
- field: 'created_at',
- title: this.$t('cloudenv.text_461'),
- minWidth: 200,
- showOverflow: 'title',
- formatter: ({ row }) => {
- return row.created_at ? this.$moment(row.created_at).format('YYYY-MM-DD HH:mm:ss') : '-'
- },
- },
- {
- field: 'updated_at',
- title: this.$t('cloudenv.text_462'),
- minWidth: 200,
- showOverflow: 'title',
- formatter: ({ row }) => {
- return row.updated_at ? this.$moment(row.updated_at).format('YYYY-MM-DD HH:mm:ss') : '-'
- },
- },
- ],
- list: this.$list.createList(this, {
- id: this.id,
- apiVersion: 'v1',
- resource: 'progresses',
- getParams: this.getParam,
- filterOptions: {
- created_at: getTimeRangeFilter({ label: this.$t('cloudenv.text_461'), field: 'created_at' }),
- updated_at: getTimeRangeFilter({ label: this.$t('cloudenv.text_462'), field: 'updated_at' }),
- },
- }),
- exportDataOptions: {
- items: [
- { label: this.$t('cloudenv.text_425'), key: 'type' },
- { label: this.$t('cloudenv.text_98'), key: 'status' },
- { label: this.$t('cloudenv.text_461'), key: 'created_at' },
- { label: this.$t('cloudenv.text_462'), key: 'updated_at' },
- ],
- },
- }
- },
- created () {
- this.list.fetchData()
- },
- methods: {
- refresh () {
- this.list.fetchData()
- },
- getParam () {
- const ret = {
- details: true,
- type: 'pull',
- account_id: this.resId,
- }
- return ret
- },
- },
- }
- </script>
|