<template>
  <app-base>
    <div id="content"></div>

  </app-base>
</template>

<script>
import Comp from "./comp"
import {HttpResetClass} from 'vue-client'

export default {

    ready() {

      // 设置模板为测试,,
      global.canvas = "TestDataComponent";
      global.myjson = Object.assign(global.myjson, {
        TestDataComponent:{"template":{"type":"Dock","children":[{"Original":"@V","Pos":"@Left","children":[{"Column":"@110,110,110,110,110,110,110,110","Slots":{"head":{"Row":"@*","Column":"@110,110,110,110,110,110,110,110","children":[{"type":"Stack","Classes":"@DataGridHead","children":[{"type":"CheckBox","@Change":"stat.Call($Checkon$)"},{"Left":"@9","type":"Text","Text":"@全选"}]},{"type":"Text","Classes":"@DataGridHead","Text":"@欠费累计金额"},{"Text":"@欠费累计气量","Classes":"@DataGridHead","type":"Text"},{"type":"Text","Text":"@应交金额","Classes":"@DataGridHead"},{"type":"Text","Text":"@优惠金额","Classes":"@DataGridHead"},{"Classes":"@DataGridHead","Text":"@减免状态","type":"Text"},{"type":"Text","Text":"@截止日期","Classes":"@DataGridHead"},{"type":"Text","Text":"@本期实际结余","Classes":"@DataGridHead"}],"type":"Grid"},"item":{"children":[{"@Change":"stat.Call($Check$, data.id)","type":"CheckBox","IsSelected":"stat.Data.hand.check.Call($isChecked$, data.id)","Classes":"@DataGridBody","HAlign":"@Center"},{"type":"Text","Classes":"@DataGridBody","Text":"date.f_totalowe_fee"},{"Text":"data.f_totalowe_gas","type":"Text","Classes":"@DataGridBody"},{"type":"Text","Classes":"@DataGridBody","Text":"data.f_oughtfee"},{"Classes":"@DataGridBody","type":"Text","Text":"data.f_reduce_fee"},{"type":"Text","Classes":"@DataGridBody","Text":"data.f_overdue_status"},{"Text":"data.f_end_date","type":"Text","Classes":"@DataGridBody"},{"Classes":"@DataGridBody","Text":"data.f_curbalance","type":"Text"}],"type":"Grid","Row":"@*"}},"type":"DataGrid","Data":"stat.Data.hand.list.data","Height":"500"},{"type":"Grid","Row":"@*","Top":"@15","Column":"@*,*,1*,*","children":[{"type":"Text","Text":"当前显示{global.Length(stat.Data.hand.list)}行"},{"Text":"共{stat.Data.hand.list.count}行","type":"Text","Left":"@20"},{"type":"Text","Text":"@ "},{"Slots":{"item":{"children":[{"Path":"@doubledown","VAlign":"@Bottom","type":"Image"},{"Left":"@4","type":"Text","Text":"@更多"}],"type":"Stack","Name":"LoadMoreButton_Stack","FillStyle":"this.MouseIn:$#000000$,$#666666$"}},"type":"Button","@Click":"stat.Call($Loadmore$)"}]}],"type":"Stack"},{"Pos":"@Center","Width":"@50","Column":"@*","Row":"@40","children":[{"Height":"@20","Text":"@更新","@Click":"stat.Call($update$)","type":"Button","Classes":"@Button"}],"type":"Grid"}]},"Drag":{"NewPlan":{"Row":"@*","Column":"@*","children":[{"Background":"@#ffffff","Row":"@*,*","type":"Grid","Column":"@80,170,80,170,80,170","children":[{"Text":"@* 计划名称","HAlign":"@Right","VAlign":"@Center","type":"Text","Right":"@10"},{"@Change":"stat.Call($setNewPlan$, $f_plan_name$, e.Value)","type":"Input"},{"Right":"@10","Text":"@计划年份","HAlign":"@Right","VAlign":"@Center","type":"Text"},{"Classes":"@SelectWhite BorderRound","Data":"stat.Call($years$)","@Change":"stat.Call($setNewPlan$, $f_plan_year$, e.Value)","type":"Select"},{"type":"Text","HAlign":"@Right","VAlign":"@Center","Right":"@10","Text":"@计划月份"},{"type":"Select","Data":"stat.Call($months$)","Classes":"@SelectWhite BorderRound","@Change":"stat.Call($setNewPlan$, $f_plan_month$, e.Value)"},{"Top":"@10","type":"Text","HAlign":"@Right","VAlign":"@Center","Right":"@10","Text":"@是否共享"},{"Selected":"stat.Data.newPlan.f_share","Data":"stat.Data.isAndNot","Original":"@H","@Change":"stat.Call($setNewPlan$, $f_share$, e.Value),stat.Call($flush$)","type":"Select","TemplateName":"@RadioButton"},{"Right":"@10","type":"Text","if":"stat.Data.newPlan.f_share==$否$:true,false","Text":"@安检员","HAlign":"@Right","VAlign":"@Center","Top":"@10"},{"if":"stat.Data.newPlan.f_share==$否$:true,false","@Change":"stat.Call($setNewPlan$, $f_checker$, e.Value)","type":"Select","Classes":"@SelectWhite BorderRound","Top":"@10"}],"PaddingBottom":"@20","Classes":"@NormalFontlight","PaddingRight":"@36","Pos":"@Center","PaddingLeft":"@20","PaddingTop":"@20"}],"type":"Grid"},"upPlan":{"Row":"@*","Column":"@*","children":[{"PaddingTop":"@20","children":[{"type":"Text","VAlign":"@Center","Text":"@* 计划名称","Right":"@10","HAlign":"@Right"},{"type":"Input","Value":"stat.Data.plan.f_plan_name","@Change":"stat.Data.Call($setPlan$,$f_plan_name$,e.Value) "},{"Text":"@安检员","Right":"@10","type":"Text","HAlign":"@Right","VAlign":"@Center"},{"type":"Select","Classes":"@SelectWhite BorderRound","Selected":"stat.Data.plan.checker","@Change":"stat.Data.Call($setPlan$,$f_checker$,e.Value) "},{"type":"Text","Right":"@10","HAlign":"@Right","VAlign":"@Center","Top":"@10","Text":"@计划年份"},{"Classes":"@SelectWhite BorderRound","Top":"@10","Selected":"stat.Data.plan.f_plan_year","@Change":"stat.Data.Call($setPlan$,$f_plan_year$,e.Value) ","type":"Select"},{"type":"Text","Top":"@10","Text":"@计划月份","Right":"@10","HAlign":"@Right","VAlign":"@Center"},{"type":"Select","Top":"@10","Selected":"stat.Data.plan.f_plan_month","Classes":"@SelectWhite BorderRound","@Change":"stat.Data.Call($setPlan$,$f_plan_month$,e.Value) "}],"PaddingBottom":"@20","PaddingRight":"@36","PaddingLeft":"@20","Row":"@*,*","Classes":"@NormalFontlight","Column":"@80,170,80,170","Background":"@#ffffff","type":"Grid"}],"type":"Grid"},"SearchPlan":{"type":"Grid","Row":"@1*","Column":"@1*","Classes":"@PopupSearch PopupShadow","children":[{"Classes":"@BorderRound NormalFont PopupSearch","children":[{"PaddingBottom":"@6","Classes":"@GridLabel","type":"Text","Text":"@计划名称"},{"Value":"stat.Data.checkplan.search.model.f_plan_name","@Change":"stat.Call($setProperty$, $checkplan$, $f_plan_name$, e.Value)","type":"Input"},{"type":"Text","Text":"@计划年份","Classes":"@GridLabel"},{"Data":"stat.Call($years$)","@Change":"stat.Call($setProperty$, $checkplan$, $f_plan_year$, e.Value)","type":"Select","Top":"@10","Selected":"stat.Data.checkplan.search.model.f_plan_year","Classes":"@SelectWhite BorderRound"},{"Classes":"@GridLabel","type":"Text","Text":"@计划月份"},{"Selected":"stat.Data.checkplan.search.model.f_plan_month","Bottom":"@1","Classes":"@SelectWhite BorderRound","@Change":"stat.Call($setProperty$, $checkplan$, $f_plan_month$, e.Value)","type":"Select","Data":"stat.Call($months$)","Top":"@10"},{"Text":"@是否共享","Classes":"@GridLabel","type":"Text"},{"Original":"@H","VAlign":"@Center","@Change":"stat.Call($isAndNotChange$, e.Value)","type":"Select","Data":"stat.Data.isAndNot","TemplateName":"@RadioButton","Selected":"stat.Data.sIsAndNotSelect"},{"Text":"@安检员","type":"Text","Classes":"@GridLabel"},{"Classes":"@SelectWhite BorderRound","type":"Select","Top":"@10"},{"ColSpan":"@2","HAlign":"@Center","Top":"@20","children":[{"Right":"@50","Text":"@取消","Classes":"@Button2","@Click":"stat.RestorePopup(this,e.draw)","type":"Button"},{"type":"Button","Text":"@查询","FillStyle":"@#ffffff","Classes":"@Button","@Click":"stat.Call($loadCheckPlan$,$$),stat.RestorePopup(this,e.draw)"}],"type":"Stack"}],"PaddingTop":"@10","Column":"@70,170","PaddingBottom":"@10","Row":"@*,*,*,*,*,*","type":"Grid","PaddingRight":"@20","PaddingLeft":"@10"}]},"start":{"type":"Image","Path":"@drag"},"drag":{"type":"Text","Text":"@ "}}}
        });
      let imgs = ["drag.png"];
      global.getImages(imgs, "../../static/images/meterBook/");
      loadWasm().then(() => {
        global.stat = new Comp()
        if (this.$login) {
          global.stat.loginInfo = this.$login.f
          console.log('登录信息', this.$login.f)
          console.log('stat',global.stat)
          console.log('login',global.stat.loginInfo)
        }

        global.stat.ready().then(() => {
          console.log(global.stat)
          run()
        })

      })
    }


}
</script>
