<template>
  <div>
    {{ message }}
    <div v-for="modelData in modelDatas" :key="modelData.id">
      {{ modelData.id }},{{ modelData.data['a.assetNo'].displayValue[0] }},{{ modelData.data['a.name'].displayValue[0] }}
    </div>
  </div>
</template>

<script>


export default {

  components: {

  },
  data: function () {
    return {
      message: 'hello word!',
      modelDatas: [],
    };
  },

  mounted: function () {
    this.initData();
  },

  methods: {
    // 初始化数据
    initData: function () {
      var _self = this;
      var uuid = _self.$route.query.uuid;
      if (uuid != null) {
        var modelDatasStr = localStorage.getItem(uuid);
        if (modelDatasStr != null && modelDatasStr != 'undefined' && modelDatasStr != '') {
          var modelDatas = JSON.parse(modelDatasStr);
          console.log(modelDatas);
          for (var i = 0; i < modelDatas.length; i++) {
            _self.modelDatas.push(modelDatas[i]);
          }

        }
      }
    },
  },
};
</script>

<style>
</style>
