
export default {
  data() {
    return {}
  },
  methods: {
    synchronizationClick() {
      const resultMap = this.tableData.reduce((result, current, currentIndex) => {
        const { name, socialCreditCode } = current
        if (!result[name]) {
          if (name) {
            result[name] = {
              socialCreditCode: socialCreditCode,
              files: this.$refs.commTable.$refs[`idcardStorage${currentIndex}`].getFileLists
            }
          }
        }
        return result
      }, {})
      this.tableData = this.tableData.map(item => {
        const { name } = item
        return {
          ...item,
          ...resultMap[name]
        }
      })
    }
  }
}
