<template>
  <div class="app-order">
    {{ $t('pages.payApplication.word.comingSoon') }}
    <!-- <div class="filter-container">
      <el-input
        v-model.trim="listQuery.userId"
        v-number
        placeholder="长UID"
        style="width: 200px;"
        class="filter-item"
      />
      <el-button
        class="filter-item"
        type="primary"
        icon="el-icon-edit"
        @click="handleSearch"
      >
        添加
      </el-button>
      <el-button
        class="filter-item"
        type="primary"
        icon="el-icon-search"
        @click="handleSearch"
      >
        搜索
      </el-button>
    </div>

    <el-table
      v-loading="listLoading"
      :data="list"
      element-loading-text="Loading"
      fit
      highlight-current-row
    >
      <el-table-column label="渠道Code" align="center" />
      <el-table-column label="渠道名称" align="center" />
      <el-table-column prop="open" label="渠道Icon" align="center" />
      <el-table-column prop="open" label="渠道类型" align="center" />
      <el-table-column prop="open" label="创建时间" align="center" />
      <el-table-column fixed="right" label="操作" align="center" width="150">
        <template slot-scope="scope">
          <el-button type="text" @click="clickEdit(scope.row)">编辑</el-button>
          <el-button type="text" @click="clickEdit(scope.row)">关联渠道</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="listQuery.cursor"
      :limit.sync="listQuery.limit"
      @pagination="renderData"
    /> -->

  </div>
</template>
<script>
import { pageSysCountryCode } from '@/api/sys-dictionary'
import Pagination from '@/components/Pagination'
export default {
  name: 'CountryCodeInfo',
  components: { Pagination },
  data() {
    return {
      formVisible: false,
      textOptTitle: '',
      list: [],
      total: 0,
      listQuery: {
        cursor: 1,
        limit: 30,
        countryName: '',
        aliasName: ''
      },
      listLoading: true,
      uploadLoading: false
    }
  },
  created() {
    this.renderData()
  },
  methods: {
    renderData(isClean) {
      const that = this
      that.listLoading = true
      if (isClean === true) {
        that.list = []
        that.listQuery.cursor = 1
      }
      pageSysCountryCode(that.listQuery).then(res => {
        const { body } = res
        that.total = body.total || 0
        that.list = body.records
        that.listLoading = false
      })
    },
    handleSearch() {
      this.renderData(true)
    },
    handleClose() {
      // 去除校验
      this.$refs.form.clearValidate()
      this.formVisible = false
    },
    clickEdit() {
      const that = this
      that.$prompt(this.$t('pages.payApplication.prompt.inputExchangeRate'), this.$t('pages.payApplication.prompt.title'), {
        confirmButtonText: this.$t('pages.payApplication.action.confirm'),
        cancelButtonText: this.$t('pages.payApplication.action.cancel'),
        inputPattern: /^\d{1,5}(\.\d{0,2})?$/,
        inputErrorMessage: this.$t('pages.payApplication.validation.exchangeRateRange'),
        closeOnClickModal: false
      }).then(({ value }) => {
        this.$message({
          type: 'success',
          message: this.$t('pages.payApplication.message.inputValue', { value })
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: this.$t('pages.payApplication.message.inputCanceled')
        })
      })
    }
  }
}
</script>
<style scoped lang="scss">
  .bottom {
    color: #666;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 25px;
    .line {
      display: flex;
      >div {
        width: 100%;
      }
    }
  }

</style>
