{
  template: '${tmpl}',
    data: function() {
      return {
        selected: 0,
        myTask: ['待付款', '已付款', '已完成'],
        /*index一级标题控制导航高亮,index1付款状态控制 */
        index: null,
        index1: null,
        /*idlists请求列表,states付款状态id以及付款状态 */
        idLists: null,
        states: null,
        title: ['商标信息', '专利信息', '版权信息', '其他订单'],
        obj: {
          page_index: 1,
          page_size: 10,
          productonetypeid_list: ["62"],
          flow_status: "1"
        },
        listData: null,
      }
    },
  mounted: function() {
    if (this.$route.query) {
      let { index, index1, idLists, states } = this.$route.query;
      this.index = index;
      this.index1 = index1;
      this.idLists = JSON.parse(idLists);
      this.states = JSON.parse(states);
      /**付款状态 */
      this.selected = Number(this.index1);
      if (index > 2) {
        this.obj.productonetypeid_list = this.idLists.slice(index);
      } else {
        this.obj.productonetypeid_list = this.idLists.slice(index, index + 1);
      }
      this.obj.flow_status = this.states[index1].flow_status;
      this.getOrderTotal(this.obj);
      console.log(this.obj, this.index1, ".......................");
      console.log(this.$route.query);
    } else {
      this.getOrderTotal(this.obj)
    }

  },
  watch: {
    selected(n){
      switch (n) {
        case 0:
          this.obj.flow_status = this.states[n].flow_status;
          this.getOrderTotal(this.obj);
          break;
        case 1:
          this.obj.flow_status = this.states[n].flow_status;
          this.getOrderTotal(this.obj);

          break;
        case 2:
          this.obj.flow_status = this.states[n].flow_status;
          this.getOrderTotal(this.obj);
          break;
      };
    },
  },
  created: function() {

  },
  methods: {

    goDetail(item, index){
      console.log(item, index, "bbbbbbbbbbbbbbbbbbbbbbbbbbbb");
      this.$router.push({ path: "/mobilemyindentdetail", query: { active: this.selected, code: item.code } });
    },



    getOrderTotal(obj, id){

      this.$root.postReq('/web/orderCtl/getOrderListByStatus', obj).then((res) => {
        console.log(res, "////////////////////////////////");
        if (res.code == 1) {
          this.listData = res.data;
          console.log(this.listData);
        } else {
          this.listData = [];
        }

      });
    },
  },
  vname: "gsb-mobilemyindent"
}
