action.js 471 Bytes
Newer Older
何虹's avatar
何虹 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

export default{
  methods: {
    getSelectKeyList(parmsList, position, prop = 'id') {
      const data = this.layoutChagneDate[position]
      if (!data || !data.length) {
        this.$message.error('请勾选')
        return
      }
      const list = []
      this.layoutChagneDate[position].forEach(element => {
        if (element[prop]) list.push(element[prop])
      })
      parmsList.length = 0
      parmsList.push(...list)
      return parmsList
    }
  }
}