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

<script>
import Comp from "./comp"
import TestData from "./TestData"
export default {

  ready() {
    if (this.$login) {
      //tag
      global.login=this.$login.f
    }

    //tag
    // 设置模板为测试,,
    global.canvas = "TestDataComponent";
    global.myjson = Object.assign(global.myjson, {
      TestDataComponent:{"template":{"Column":"@1*,200","children":[{"type":"Dock","children":[{"PaddingBottom":"@20","PaddingTop":"@20","type":"Grid","StrokeStyle":"@#dfe4e7","PaddingRight":"@20","Row":"@*,1*,*","PaddingLeft":"@20","children":[{"type":"Stack","Bottom":"@20","children":[{"type":"Text","Font":"@16px PingFang-SC-Bold","Text":"@用户信息查询","VAlign":"@Center"},{"Width":"@150","PlaceHolder":"@用户编号","Left":"@10","@Change":"stat.Data.Call($changeField$,$user$,$userinfocode$,e.Value)","type":"Input"},{"Left":"@10","Width":"@150","PlaceHolder":"@用户名称","@Change":"stat.Data.Call($changeField$,$user$,$username$,e.Value)","type":"Input"},{"type":"Input","Width":"@150","Left":"@10","PlaceHolder":"@用户地址","@Change":"stat.Data.Call($changeField$,$user$,$useraddress$,e.Value)"},{"Classes":"@SearchButton BorderRound","@Click":"stat.Call($searchUser$)","Slots":{"item":{"type":"Image","Name":"SearchButton_Image","Classes":"@SearchButtonImg"}},"type":"Button","Left":"@10"}]},{"type":"DataGrid","Data":"stat.Data.user.list.data","Column":"@100,150,250,150,150,1*","Slots":{"head":{"Row":"@1*","children":[{"Classes":"@DataGridHead","Text":"@用户编号","type":"Text"},{"Classes":"@DataGridHead","Text":"@用户名称","type":"Text"},{"Classes":"@DataGridHead","Text":"@用户地址","type":"Text"},{"Classes":"@DataGridHead","type":"Text","Text":"@最近一次安检日期"},{"Text":"@最近一次安检状态","type":"Text","Classes":"@DataGridHead"},{"type":"Text","Text":"@最近一次安检结果","Classes":"@DataGridHead"}],"type":"Grid"},"item":{"@Click":"stat.Call($getCheckSend$,data.id)","children":[{"type":"Text","Classes":"@DataGridBody","Text":"data.f_userinfo_code"},{"type":"Text","Text":"data.f_user_name","Classes":"@DataGridBody"},{"type":"Text","Text":"data.f_address","Classes":"@DataGridBody"},{"type":"Text","Text":"data.f_last_check_date","Classes":"@DataGridBody"},{"type":"Text","Classes":"@DataGridBody","Text":"data.f_last_check_state"},{"type":"Text","Text":"data.f_last_check_result==$$:$$,stat.Data.Call($getResult$,data.f_last_check_result)","Classes":"@DataGridBody"}],"type":"Grid","Row":"@1*"}}},{"children":[{"type":"Text","Text":"@显示1~20行"},{"type":"Text","Text":"$共{stat.Data.user.list.count}$"},{"type":"Text","Text":"@"},{"type":"Button","@Click":"stat.Call($loadMore$,$user$)","Slots":{"item":{"children":[{"type":"Image","Path":"@doubledown","VAlign":"@Bottom"},{"Left":"@4","type":"Text","Text":"@加载更多"}],"type":"Stack","Name":"LoadMoreButton_Stack","StrokeStyle":"@this.MouseIn:$#333333$,$#666666$"}}}],"type":"Grid","Row":"@1*","Column":"@*,*,1*,*","Top":"@10"}],"Pos":"@Center","Column":"@1*"}]},{"type":"Dock","children":[{"PaddingRight":"@20","children":[{"type":"Text","Font":"@16px 微软雅黑","Pos":"@Center","Text":"@历史安检记录"}],"type":"Stack","PaddingTop":"@25","PaddingBottom":"@25","Pos":"@Top","PaddingLeft":"@20"},{"type":"Grid","Row":"@1*","Pos":"@Center","Column":"@1*","children":[{"type":"Scroll","Slots":{"item":{"Data":"stat.Data.checkSend.list.data","Slots":{"item":{"type":"Stack","children":[{"type":"Grid","Row":"@*,*","Column":"@1*","Pos":"@Center","children":[{"Text":"data.f_date","type":"Text","Left":"@20"},{"type":"Text","Text":"${data.f_name}{data.f_service_acitivity_type}给{data.f_meetunit}$","Left":"@20"},{"Slots":{"item":{"type":"Stack"}},"type":"DateLine","Data":"stat.Data.checkSend.list.data"},{"Data":"stat.Data.checkSend.list.data","Slots":{"item":{"type":"Stack"}},"type":"DateLine"}]},{"type":"Stack"}]}},"type":"List"}}}]}]}],"type":"Grid","Background":"@#f5f7f9","Row":"@1*"},"Drag":{}}
    });
    loadWasm().then(()=> {
      global.stat = new Comp()
        //tag
        run()
    })
  }
  /*{"Drag":{"NewPlan":{"Column":"@*","children":[{"PaddingRight":"@36","Pos":"@Center","PaddingTop":"@20","PaddingBottom":"@20","children":[{"type":"Text","Right":"@10","Text":"@* 计划名称","HAlign":"@Right","VAlign":"@Center"},{"type":"Input","@Change":"stat.Call($setNewPlan$, $f_plan_name$, e.Value)"},{"Right":"@10","Text":"@计划年份","HAlign":"@Right","type":"Text","VAlign":"@Center"},{"Classes":"@SelectWhite BorderRound","@Change":"stat.Call($setNewPlan$, $f_plan_year$, e.Value)","type":"Select","Data":"stat.Call($years$)"},{"Text":"@计划月份","HAlign":"@Right","type":"Text","VAlign":"@Center","Right":"@10"},{"Data":"stat.Call($months$)","Classes":"@SelectWhite BorderRound","@Change":"stat.Call($setNewPlan$, $f_plan_month$, e.Value)","type":"Select"},{"Top":"@10","HAlign":"@Right","VAlign":"@Center","Right":"@10","type":"Text","Text":"@是否共享"},{"TemplateName":"@RadioButton","Data":"stat.Data.isAndNot","type":"Select","Original":"@H"},{"type":"Text","VAlign":"@Center","Top":"@10","Right":"@10","Text":"@安检员","HAlign":"@Right"},{"Top":"@10","Classes":"@SelectWhite BorderRound","type":"Select"}],"Column":"@80,170,80,170,80,170","type":"Grid","PaddingLeft":"@20","Classes":"@NormalFontlight","Row":"@*,*"}],"type":"Grid","Row":"@*"},"SearchPlan":{"Row":"@1*","children":[{"children":[{"Text":"@计划名称","PaddingBottom":"@6","type":"Text","Classes":"@GridLabel"},{"type":"Input","@Change":"stat.Call($setProperty$, $checkplan$, $f_plan_name$, e.Value)"},{"Classes":"@GridLabel","type":"Text","Text":"@计划年份"},{"type":"Select","Classes":"@SelectWhite BorderRound","Top":"@10"},{"type":"Text","Classes":"@GridLabel","Text":"@计划月份"},{"type":"Select","Top":"@10","Bottom":"@1","Classes":"@SelectWhite BorderRound"},{"Text":"@是否共享","type":"Text","Classes":"@GridLabel"},{"Original":"@H","type":"Select","Data":"stat.Data.isAndNot","TemplateName":"@RadioButton"},{"Text":"@安检员","type":"Text","Classes":"@GridLabel"},{"Top":"@10","type":"Select","Classes":"@SelectWhite BorderRound"},{"Top":"@20","children":[{"type":"Button","Classes":"@Button2","Right":"@50","Text":"@取消","@Click":"global.RestorePopup(this.Level-1,e.draw)"},{"type":"Button","FillStyle":"@#ffffff","Classes":"@Button","Text":"@查询","@Click":"stat.Call($loadCheckPlan$)"}],"type":"Stack","ColSpan":"@2","HAlign":"@Center"}],"PaddingRight":"@20","type":"Grid","PaddingLeft":"@10","PaddingBottom":"@10","Classes":"@BorderRound NormalFont PopupSearch","Column":"@70,170","PaddingTop":"@10","Row":"@*,*,*,*,*,*"}],"type":"Grid","Column":"@1*","Classes":"@PopupSearch PopupShadow"}},"template":{"Column":"@200,1*","Row":"@1*","children":[{"Classes":"@BorderRect","Name":"@左边","children":[{"PaddingTop":"@3","StrokeStyle":"@#dce0e3","Bottom":"@1","Column":"@*,1*","PaddingLeft":"@5","PaddingRight":"@5","Name":"@上边","children":[{"type":"Button","Text":"@查询","@MouseDown":"stat.Popup($SearchPlan$,stat,this,e.draw)","@Click":"stat.Popup($SearchPlan$,stat,this,e.draw)","Slots":{"item":{"Path":"this.MouseIn:$searchhover$,$searchnormal$","Classes":"@SearchButtonImg","type":"Image"}}},{"type":"Select","Classes":"@SelectGray BorderRound","Left":"@10"}],"type":"Grid","Classes":"@BorderRect","PaddingBottom":"@4","Pos":"@Top","Row":"@*"},{"Classes":"@NormalFontlight","Column":"@1*","Row":"@1*,0,*,0,*","children":[{"type":"Scroll","Slots":{"item":{"type":"List","Name":"@安检计划","Data":"stat.Data.checkplan.list.data","@Change":"stat.Call($openPlan$, e.Value.self)","Slots":{"item":{"Original":"@V","PaddingBottom":"@1","children":[{"PaddingLeft":"@15","@Drop":"stat.Call($dragtoPlanItem$,data.id,stat.getDrag())","type":"Grid","PaddingTop":"@20","PaddingRight":"@15","PaddingBottom":"@20","children":[{"Font":"@15px 微软雅黑","Text":"data.f_plan_name","type":"Text","ColSpan":"@4"},{"type":"Text","Top":"@12","Text":"@已下载"},{"children":[{"PaddingTop":"@2","Text":"data.f_checker!=$$:data.f_checker,$共享","Radius":"@8","type":"Text","Background":"@#ffffff","PaddingBottom":"@2","FillStyle":"@#4792de","Classes":"@BorderRound","PaddingLeft":"@5","StrokeStyle":"@#cfdce8","Font":"@12px 微软雅黑","PaddingRight":"@5","ColSpan":"@3"}],"type":"Stack","HAlign":"@Right","Top":"@10","ColSpan":"@3"},{"type":"Text","Top":"@12","ColSpan":"@2","Text":"${data.f_plan_year}-{data.f_plan_month}$","Classes":"@NormalFontLighter"},{"Classes":"@NormalFontLighter","Text":"@总","Top":"@12","type":"Text","Left":"@10"},{"HAlign":"@Right","type":"Text","Text":"stat.Call($getSumItem$, data.self)","Top":"@12","Classes":"@NormalFontHeavy","Name":"@总数"},{"type":"Text","Classes":"@NormalFontLighter","Text":"@已检","Top":"@12"},{"Text":"stat.Call($getChecked$, data.self)","Left":"@5","Classes":"@NormalFontHeavy","Top":"@12","type":"Text"},{"type":"Text","Classes":"@NormalFontLighter","Left":"@10","Top":"@12","Text":"@未检"},{"HAlign":"@Right","Top":"@12","Classes":"@NormalFontHeavy","Text":"stat.Call($getNotChecked$, data.self)","type":"Text"}],"Column":"@42,1*,42,1*","Row":"@*,*,*,*"},{"type":"Stack","Classes":"@BorderRect","Left":"@5","Right":"@5","StrokeStyle":"@#dce0e3"}],"type":"Stack","Width":"@200"}}}}},{"Left":"@5","type":"Stack","Right":"@5","StrokeStyle":"@#dfe4e7","Classes":"@BorderRect"},{"PaddingBottom":"@10","Column":"@1*,1*","children":[{"type":"Text","Text":"$共{stat.Data.checkplan.list.count}条$"},{"type":"Button","FillStyle":"this.MouseIn:$#000000$,$#666666$","HAlign":"@Right","Slots":{"item":{"Name":"LoadMoreButton_Stack","children":[{"type":"Image","VAlign":"@Bottom","Path":"@doubledown"},{"Text":"@更多","type":"Text","Left":"@4"}],"type":"Stack"}}}],"type":"Grid","Row":"@1*","PaddingLeft":"@20","PaddingRight":"@20","PaddingTop":"@10"},{"Classes":"@BorderRect","type":"Stack","StrokeStyle":"@#dfe4e7","Right":"@5","Left":"@5"},{"HAlign":"@Center","@Click":"stat.ShowModal($NewPlan$,$生成计划$,$addNewPlan$,$cancel$)","Slots":{"item":{"Path":"this.MouseIn:$addnewhover$,$addnew$","type":"Image","Name":"Button_Image"}},"type":"Button","Top":"@20","Classes":"@BorderRound","Bottom":"@20"}],"type":"Grid","Pos":"@Center"}],"type":"Dock","Background":"@#ffffff","StrokeStyle":"@#dce0e3"},{"type":"Dock","Classes":"@BorderRect","Name":"@右边","Background":"@#f5f7f9","children":[{"type":"Stack","Pos":"@Top","Background":"@#ffffff","StrokeStyle":"@#dce0e3","Name":"@工具条","Classes":"@BorderRect","HAlign":"@Right","children":[{"Top":"@4","Bottom":"@4","children":[{"Text":"@删除","type":"Button","Right":"@10","Classes":"@Button2"},{"Right":"@10","Text":"@打印","Classes":"@Button2","type":"Button"},{"type":"Button","Classes":"@Button2","Right":"@24","Text":"@导出"}],"type":"Stack"}]},{"type":"Grid","Row":"@1*,1*","Column":"@1*","Pos":"@Center","children":[{"type":"Grid","PaddingTop":"@12","Classes":"@BorderRect","PaddingRight":"@24","StrokeStyle":"@#dfe4e7","children":[{"type":"Stack","Bottom":"@17","children":[{"type":"Text","Text":"@计划信息","VAlign":"@Center"},{"PlaceHolder":"@用户编号","type":"Input","Classes":"@BorderRect","Left":"@10","Width":"@150"},{"Width":"@150","Classes":"@BorderRect","type":"Input","PlaceHolder":"@其他条件","Left":"@10"},{"Classes":"@DropDownButton BorderRound","Slots":{"item":{"type":"Image","Name":"DropDownButton_Image","Classes":"@DropDownButtonImg"}},"type":"Button","Left":"@10"},{"type":"Button","Left":"@10","Classes":"@SearchButton BorderRound","Slots":{"item":{"type":"Image","Name":"SearchButton_Image","Classes":"@SearchButtonImg"}}}]},{"Slots":{"item":{"type":"Grid","Row":"@1*","children":[{"type":"CheckBox","Classes":"@DataGridBody","HAlign":"@Center","@Change":"stat.Call($addParam$, $checkplanitems$, data.itemid)"},{"Text":"data.f_userinfo_code","type":"Text","Classes":"@DataGridBody"},{"type":"Text","Classes":"@DataGridBody","Text":"data.f_user_name"},{"type":"Text","Text":"data.f_user_type","Classes":"@DataGridBody"},{"Text":"data.f_residential_area","type":"Text","Classes":"@DataGridBody"},{"type":"Text","Classes":"@DataGridBody","Text":"data.f_address"},{"type":"Text","Classes":"@DataGridBody","Text":"data.f_state"}]},"head":{"type":"Grid","Row":"@1*","children":[{"children":[{"type":"CheckBox"},{"type":"Text","Text":"@全选","Left":"@9"}],"type":"Stack","HAlign":"@Center","Classes":"@DataGridHead"},{"type":"Text","Classes":"@DataGridHead","Text":"@用户编号"},{"type":"Text","Classes":"@DataGridHead","Text":"@用户名称"},{"Text":"@用户类型","Classes":"@DataGridHead","type":"Text"},{"Classes":"@DataGridHead","type":"Text","Text":"@小区名称"},{"Text":"@地址","type":"Text","Classes":"@DataGridBody"},{"Text":"@状态","Classes":"@DataGridHead","type":"Text"}]}},"type":"DataGrid","Column":"@100,100,100,100,100,100,1*","Data":"stat.Data.checkplanitems.list.data","Classes":"@BorderRect"},{"type":"Grid","Classes":"@NormalFontlight","Top":"@12","Row":"@1*","Column":"@*,*,1*,*","PaddingTop":"@5","children":[{"VAlign":"@Center","type":"Text","Text":"@显示1~22行"},{"type":"Text","VAlign":"@Center","Text":"$共{stat.Data.checkplanitems.list.count}条$","Left":"@20"},{"type":"Text","Text":"@ "},{"type":"Button","FillStyle":"this.MouseIn:$#000000$,$#666666$","Slots":{"item":{"children":[{"Path":"@doubledown","type":"Image","VAlign":"@Bottom"},{"Text":"@更多","type":"Text","Left":"@4"}],"type":"Stack","Name":"LoadMoreButton_Stack"}}}]}],"PaddingLeft":"@10","Column":"@1*","Row":"@*,1*,*","PaddingBottom":"@20"},{"Row":"@*,1*,*","PaddingBottom":"@20","PaddingRight":"@24","Classes":"@BorderRect","PaddingLeft":"@10","PaddingTop":"@12","StrokeStyle":"@#dfe4e7","Column":"@1*","children":[{"type":"Stack","Bottom":"@17","children":[{"Text":"@用户信息","VAlign":"@Center","type":"Text"},{"type":"Input","Width":"@150","PlaceHolder":"@用户编号","Classes":"@BorderRect","Left":"@10"},{"type":"Input","Classes":"@BorderRect","Left":"@10","Width":"@150","PlaceHolder":"@其它条件"},{"Classes":"@DropDownButton BorderRound","Slots":{"item":{"Name":"DropDownButton_Image","Classes":"@DropDownButtonImg","type":"Image"}},"type":"Button","Left":"@10"},{"@Click":"stat.Call($searchUser$)","Slots":{"item":{"type":"Image","Name":"SearchButton_Image","Classes":"@SearchButtonImg"}},"type":"Button","Classes":"@SearchButton BorderRound","Left":"@10"}]},{"type":"DataGrid","Classes":"@BorderRect","Column":"@100,100,100,100,100,1*","Data":"stat.Data.user.list.data","@Drop":"stat.Call($delPlanItem$)","@DragStart":"stat.setDrag($user$)","Slots":{"item":{"children":[{"IsSelected":"stat.Data.user.check.Call($isChecked$, data.f_userinfo_code)","@Change":"stat.Call($addParam$, $user$, data.f_userinfo_code)","type":"CheckBox","HAlign":"@Center","Classes":"@DataGridBody","VAlign":"@Center"},{"Text":"data.f_userinfo_code","type":"Text","Classes":"@DataGridBody"},{"type":"Text","Text":"data.f_user_name","Classes":"@DataGridBody"},{"type":"Text","Classes":"@DataGridBody","Text":"@无"},{"Text":"data.f_residential_area","type":"Text","Classes":"@DataGridBody"},{"type":"Text","Text":"data.f_address","Classes":"@DataGridBody"}],"type":"Grid","Row":"@*"},"head":{"Row":"@*","children":[{"children":[{"type":"CheckBox","@Change":"stat.Call($changeCheckAll$, $user$)"},{"Text":"@全选","type":"Text","Left":"@9"}],"type":"Stack","Classes":"@DataGridHead"},{"Text":"@用户编号","type":"Text","Classes":"@DataGridHead"},{"Classes":"@DataGridHead","Text":"@用户名称","type":"Text"},{"Classes":"@DataGridHead","Text":"@用户类型","type":"Text"},{"Classes":"@DataGridHead","type":"Text","Text":"@区/县"},{"Classes":"@DataGridHead","type":"Text","Text":"@地址"}],"type":"Grid"}}},{"type":"Grid","Top":"@12","Row":"@1*","Column":"@*,*,1*,*","Classes":"@NormalFontlight","children":[{"type":"Text","Text":"@显示2~22行"},{"Text":"$共{stat.Data.user.list.count}条$","type":"Text","Left":"@20"},{"type":"Text","Text":"@ "},{"Slots":{"item":{"children":[{"type":"Image","Path":"@doubledown","VAlign":"@Bottom"},{"type":"Text","Left":"@4","Text":"@更多"}],"type":"Stack"}},"type":"Button","FillStyle":"this.MouseIn:$#000000$,$#666666$","Text":"@加载更多"}]}],"type":"Grid"}]}]}],"type":"Grid","Background":"@#f5f7f9"}}
    */
}
</script>
