<template>

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

    <modal :show.sync="stat.isUpload" width="500px" title="文件导入" v-ref:modal large backdrop="false">
      <article slot="modal-body" class="modal-body">
        <file-upload class="my-file-uploader " name="UploadFile" class="btn btn-success" style="border-radius: 2px;"
                     action="rs/file/uploadFile" tagname="导入抄表册" v-ref:file :headers="headers" multiple></file-upload>
      </article>
      <footer slot="modal-footer" class="modal-footer">
      </footer>
    </modal>

  </app-base>
</template>

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

export default {
  data() {
    return {
      // show: false
      stat: null
    }
  },

  events: {
    onFileUpload: function (file, res) {
      let data = {
        filepath: res.f_downloadpath
      }
      new HttpResetClass().load('POST','/rs/logic/upLoadBookFile', {data: data}, {
        resolveMsg: '导入成功',
        rejectMsg: '导入失败'
      }).then((res) => {
        this.stat.isUpload = false
      })
    }
  },
  ready() {

      // 设置模板为测试,,
      global.canvas = "TestDataComponent";
      global.myjson = Object.assign(global.myjson, {
        TestDataComponent:
          {"template":{"type":"Grid","Column":"@300,1*","Row":"@1*","Background":"@#f5f7f9","children":[{"StrokeStyle":"@#dce0e3","Classes":"@BorderRect","children":[{"PaddingBottom":"@4","Row":"@*,*","PaddingRight":"@5","Pos":"@Top","PaddingLeft":"@5","StrokeStyle":"@#dce0e3","type":"Grid","Name":"@上边","PaddingTop":"@3","Column":"@*,*","Classes":"@BorderRect","Bottom":"@1","children":[{"type":"Button","Text":"@查询","@Click":"stat.Popup($SearchPlan$,stat,this,e.draw)","Slots":{"item":{"Path":"this.MouseIn:$searchhover$,$searchnormal$","Classes":"@SearchButtonImg","type":"Image"}}},{"type":"Stack","PaddingTop":"@8","PaddingBottom":"@4"}]},{"children":[{"type":"Scroll","Slots":{"item":{"Slots":{"item":{"PaddingBottom":"@1","children":[{"@Drop":"stat.Call($moveOneBook$,data.id,stat.GetDrag())","type":"Grid","PaddingBottom":"@20","PaddingRight":"@10","PaddingTop":"@20","Column":"@42,1*,42,1*","PaddingLeft":"@10","children":[{"Text":"data.f_book_name","ColSpan":"@2","type":"Text","Font":"@15px 微软雅黑"},{"Classes":"@BorderRound","@Click":"stat.Call($editBook$,data.self),stat.ShowModal($upPlan$,$编辑抄表册$,$editBookSave$,$cancel$)","Slots":{"item":{"Path":"@edit","type":"Image","Name":"Button_Image"}},"type":"Button","Name":"@编辑"},{"Slots":{"item":{"type":"Image","Path":"@delete","Name":"Button_Image"}},"type":"Button","Classes":"@BorderRound","Name":"@删除","@Click":"stat.Call($deleteBook$,data.self),stat.ShowModal($deleteMsg$,$$,$delete$,$cancel$)"},{"type":"Text","ColSpan":"@2","Top":"@12","FillStyle":"@#4792de","Text":"$所属公司：{data.f_filiale_name}$"},{"Top":"@10","children":[{"PaddingLeft":"@5","StrokeStyle":"@#cfdce8","type":"Text","PaddingRight":"@5","Font":"@12px 微软雅黑","Background":"@#ffffff","Radius":"@8","FillStyle":"@#4792de","PaddingTop":"@2","PaddingBottom":"@2","ColSpan":"@3","Text":"$抄表员：{data.f_inputtor}$","Classes":"@BorderRound"}],"type":"Stack","ColSpan":"@2","HAlign":"@Right"},{"Classes":"@NormalFontLighter","Text":"$创建人: {data.f_operator}$","Top":"@12","ColSpan":"@2","type":"Text"},{"Left":"@10","Classes":"@NormalFontLighter","type":"Text","Text":"@人数","Top":"@12"},{"Classes":"@NormalFontHeavy","type":"Text","ColSpan":"@1","Name":"@总数","HAlign":"@Center","Text":"data.num","Top":"@12"},{"Classes":"@NormalFontLighter","Text":"@公司","Top":"@12","type":"Text"},{"type":"Text","Text":"data.f_orgname","Left":"@5","Classes":"@NormalFontHeavy","Top":"@12"},{"Text":"@部门","Classes":"@NormalFontLighter","Left":"@10","Top":"@12","type":"Text"},{"Text":"data.f_depname","Top":"@12","Classes":"@NormalFontHeavy","type":"Text","HAlign":"@Right"},{"type":"Text","Top":"@12","Text":"$抄表周期：{data.f_period}$","ColSpan":"@4"},{"type":"Text","Top":"@12","Text":"@备注"},{"type":"Text","Top":"@12","Text":"data.f_book_remark","ColSpan":"@3"}],"@DragOver":"stat.DragOver()","Row":"@*,*,*,*,*,*"},{"Left":"@5","Right":"@5","type":"Stack","StrokeStyle":"@#dce0e3","Classes":"@BorderRect"}],"type":"Stack","Width":"@300","Original":"@V","Background":"data.id==stat.Data.selectBook.id: $#d8eafb$, this.MouseIn: $#f5f6f7$, $$"}},"type":"List","Name":"@安检计划","Data":"stat.Data.meterbook.list.data","@Change":"stat.Call($openBook$, e.Value.self)"}}},{"Right":"@5","StrokeStyle":"@#dfe4e7","type":"Stack","Classes":"@BorderRect","Left":"@5"},{"Column":"@1*,1*","Row":"@1*","PaddingLeft":"@20","PaddingRight":"@20","PaddingTop":"@10","PaddingBottom":"@10","children":[{"type":"Text","Text":"$共{stat.Data.meterbook.list.count}条$"},{"HAlign":"@Right","@Click":"stat.Call($loadMore$,$meterbook$)","Slots":{"item":{"children":[{"type":"Image","VAlign":"@Bottom","Path":"@doubledown"},{"Text":"@更多","Left":"@4","type":"Text"}],"type":"Stack","Name":"LoadMoreButton_Stack"}},"type":"Button","FillStyle":"this.MouseIn:$#000000$,$#666666$"}],"type":"Grid"},{"Classes":"@BorderRect","StrokeStyle":"@#dfe4e7","Right":"@5","Left":"@5","type":"Stack"},{"@Click":"stat.ShowModal($NewPlan$,$添加抄表册$,$addNewBook$,$cancel$)","Slots":{"item":{"Path":"this.MouseIn:$addnewhover$,$addnew$","type":"Image","Name":"Button_Image"}},"type":"Button","Bottom":"@20","HAlign":"@Center","Top":"@20","Classes":"@BorderRound"}],"type":"Grid","Column":"@1*","Row":"@1*,0,*,0,*","Pos":"@Center","Classes":"@NormalFontlight"}],"type":"Dock","Name":"@左边","Background":"@#ffffff"},{"children":[{"type":"Grid","Pos":"@Top","Row":"@1*","Column":"@*,1*,*","children":[{"type":"Text","VAlign":"@Center","PaddingLeft":"@40","Text":"stat.Data.selectBook.f_book_name","HAlign":"@Center"},{"type":"Text","Text":"@"},{"type":"Stack","Bottom":"@4","Top":"@4","children":[{"type":"Button","Text":"@导出","Classes":"@Button2","Right":"@24","@Click":"stat.Call($downFile$)"},{"type":"Button","Classes":"@Button2","Right":"@10","Text":"@导入","@Click":"stat.Call($upLoad$)"}]}]},{"type":"Grid","Row":"@1*,1*","Column":"@1*","Pos":"@Center","children":[{"Classes":"@BorderRect","PaddingLeft":"@10","children":[{"type":"Stack","Bottom":"@17","children":[{"type":"Text","Text":"@册内用户","VAlign":"@Center"},{"Left":"@10","PlaceHolder":"@用户编号","Value":"stat.Data.bookuser.search.model.f_userinfo_code","@Change":"stat.Call($setProperty$, $bookuser$, $f_userinfo_code$, e.Value)","type":"Input","Width":"@130"},{"type":"Input","PlaceHolder":"@客户姓名","Classes":"@BorderRect","Value":"stat.Data.bookuser.search.model.f_user_name","Left":"@10","Width":"@130","@Change":"stat.Call($setProperty$, $bookuser$, $f_user_name$, e.Value)"},{"Classes":"@BorderRect","PlaceHolder":"@客户地址","Value":"stat.Data.bookuser.search.model.f_address","@Change":"stat.Call($setProperty$, $bookuser$, $f_address$, e.Value)","type":"Input","Left":"@10","Width":"@130"},{"type":"Input","Classes":"@BorderRect","PlaceHolder":"@气价名称","Value":"stat.Data.bookuser.search.model.f_price_name","Width":"@100","Left":"@10","@Change":"stat.Call($setProperty$, $bookuser$, $f_price_name$, e.Value)"},{"type":"Select","Width":"@120","Left":"@10","Data":"stat.Data.estate","Selected":"stat.Data.bookuser.search.model.f_residential_area","Classes":"@SelectWhite BorderRound","@Change":"stat.Call($setProperty$, $bookuser$, $f_residential_area$, e.Value)"},{"type":"Input","Value":"stat.Data.bookuser.search.model.f_building","Classes":"@BorderRect","Left":"@10","Width":"@130","PlaceHolder":"@楼栋号","@Change":"stat.Call($setProperty$, $bookuser$, $f_building$, e.Value)"},{"Value":"stat.Data.bookuser.search.model.f_unit","Classes":"@BorderRect","@Change":"stat.Call($setProperty$, $bookuser$, $f_unit$, e.Value)","type":"Input","Left":"@10","Width":"@130","PlaceHolder":"@单元"},{"@Change":"stat.Call($setProperty$, $bookuser$, $f_adjustable_id$, e.Value)","type":"Input","Value":"stat.Data.bookuser.search.model.f_adjustable_id","Width":"@100","Left":"@10","Classes":"@BorderRect","PlaceHolder":"@调压箱编号"},{"@Click":"stat.Call($searchBookUser$)","Slots":{"item":{"Classes":"@SearchButtonImg","type":"Image","Name":"SearchButton_Image"}},"type":"Button","Classes":"@SearchButton BorderRound","Left":"@10"},{"Text":"@展开/收起","@Click":"stat.Call($checkShow$,1)","type":"Button","VAlign":"@Center","Left":"@10","Classes":"@SearchButton BorderRound"}]},{"type":"Stack","if":"stat.Data.topShow","children":[{"PlaceHolder":"@客户电话","Value":"stat.Data.bookuser.search.model.f_user_phone","@Change":"stat.Call($setProperty$, $bookuser$, $f_user_phone$, e.Value)","type":"Input","Width":"@130","Left":"@65","Height":"@30","Bottom":"@5"},{"@Change":"stat.Call($setProperty$, $bookuser$, $f_user_type$, e.Value)","type":"Input","Width":"@130","Left":"@10","Bottom":"@5","Value":"stat.Data.bookuser.search.model.f_user_type","PlaceHolder":"@客户类型"},{"type":"Input","PlaceHolder":"@用气性质","Width":"@130","Value":"stat.Data.bookuser.search.model.f_gasproperties","Bottom":"@5","Left":"@10","@Change":"stat.Call($setProperty$, $bookuser$, $f_gasproperties$, e.Value)"},{"Value":"stat.Data.bookuser.search.model.f_meter_brand","@Change":"stat.Call($setProperty$, $bookuser$, $f_meter_brand$, e.Value)","type":"Input","Bottom":"@5","PlaceHolder":"@气表品牌","Width":"@130","Left":"@10"},{"Value":"stat.Data.bookuser.search.model.f_meter_style","Bottom":"@5","Width":"@120","Left":"@10","@Change":"stat.Call($setProperty$, $bookuser$, $f_meter_style$, e.Value)","type":"Input","PlaceHolder":"@气表型号"}]},{"type":"Stack","if":"!stat.Data.topShow"},{"Column":"@100,100,100,270,130,100,100,100,100,100,100","Data":"stat.Data.bookuser.list.data","@DragStart":"stat.SetDrag($in$)","@DragOver":"stat.DragOver()","@Drop":"stat.Call($userInToBook$,stat.Data.selectBook.id,stat.GetDrag())","Slots":{"head":{"children":[{"children":[{"type":"CheckBox","@Change":"stat.Call($setCheckAll$, $bookuser$)"},{"Left":"@9","type":"Text","Text":"@全选"}],"type":"Stack","HAlign":"@Center","Classes":"@DataGridHead"},{"type":"Text","Classes":"@DataGridHead","Text":"@用户编号","Name":"@用户编号"},{"Text":"@客户姓名","type":"Text","Classes":"@DataGridHead"},{"Text":"@客户地址","Classes":"@DataGridHead","type":"Text"},{"Text":"@气价名称","Classes":"@DataGridHead","type":"Text"},{"type":"Text","Text":"@调压箱编号","Classes":"@DataGridHead"},{"type":"Text","Classes":"@DataGridHead","Text":"@册内序号"},{"Classes":"@DataGridHead","type":"Text","Text":"@用户类型"},{"type":"Text","Classes":"@DataGridHead","Text":"@用气类型"},{"Text":"@气表品牌","Classes":"@DataGridHead","type":"Text"},{"Text":"@气表型号","type":"Text","Classes":"@DataGridHead"}],"type":"Grid","Row":"@1*"},"item":{"Row":"@1*","children":[{"type":"CheckBox","IsSelected":"stat.Data.bookuser.check.Call($isChecked$, data.f_userfiles_id)","Classes":"@DataGridBody","HAlign":"@Center","@Change":"stat.Call($setCheck$, $bookuser$, data.f_userfiles_id)"},{"Classes":"@DataGridBody","Text":"data.f_userinfo_code","Name":"@用户编号","type":"Text"},{"Text":"data.f_user_name","Classes":"@DataGridBody","type":"Text"},{"Text":"data.f_address","Classes":"@DataGridBody","type":"Text"},{"Classes":"@DataGridBody","type":"Text","Text":"data.f_price_name"},{"Classes":"@DataGridBody","type":"Text","Text":"data.f_adjustable_id"},{"Classes":"@DataGridBody","type":"Text","Text":"data.f_meter_book_sort"},{"Text":"data.f_user_type","Classes":"@DataGridBody","type":"Text"},{"Text":"data.f_gasproperties","type":"Text","Classes":"@DataGridBody"},{"Text":"data.f_meter_brand","type":"Text","Classes":"@DataGridBody"},{"Text":"data.f_meter_style","type":"Text","Classes":"@DataGridBody"}],"type":"Grid"}},"type":"DataGrid","Classes":"@BorderRect"},{"Top":"@12","Row":"@1*","Column":"@*,*,1*,*","PaddingTop":"@5","Classes":"@NormalFontlight","children":[{"type":"Text","Text":"@"},{"type":"Text","Text":"$共{stat.Data.bookuser.list.count}条$","Left":"@20","VAlign":"@Center"},{"type":"Text","Text":"@ "},{"type":"Button","FillStyle":"this.MouseIn:$#000000$,$#666666$","@Click":"stat.Call($loadMore$,$bookuser$)","Slots":{"item":{"children":[{"type":"Image","VAlign":"@Bottom","Path":"@doubledown"},{"type":"Text","Left":"@4","Text":"@更多"}],"type":"Stack","Name":"LoadMoreButton_Stack"}}}],"type":"Grid"}],"Column":"@1*","PaddingTop":"@12","StrokeStyle":"@#dfe4e7","PaddingRight":"@24","PaddingBottom":"@20","Row":"@*,*,1*,*","type":"Grid"},{"type":"Grid","PaddingLeft":"@10","Column":"@1*","PaddingRight":"@24","Classes":"@BorderRect","children":[{"type":"Stack","Bottom":"@17","children":[{"type":"Text","Text":"@未在册内用户","VAlign":"@Center"},{"type":"Input","Value":"stat.Data.notinbookuser.search.model.f_userinfo_code","Width":"@120","Left":"@10","PlaceHolder":"@用户编号","@Change":"stat.Call($setProperty$, $notinbookuser$, $f_userinfo_code$, e.Value)"},{"Width":"@125","@Change":"stat.Call($setProperty$, $notinbookuser$, $f_user_name$, e.Value)","type":"Input","PlaceHolder":"@客户姓名","Value":"stat.Data.notinbookuser.search.model.f_user_name","Classes":"@BorderRect","Left":"@10"},{"Left":"@10","@Change":"stat.Call($setProperty$, $notinbookuser$, $f_address$, e.Value)","type":"Input","Width":"@125","PlaceHolder":"@客户地址","Value":"stat.Data.notinbookuser.search.model.f_address","Classes":"@BorderRect"},{"type":"Input","Value":"stat.Data.notinbookuser.search.model.f_price_name","Width":"@100","Left":"@10","Classes":"@BorderRect","PlaceHolder":"@气价名称","@Change":"stat.Call($setProperty$, $notinbookuser$, $f_price_name$, e.Value)"},{"type":"Select","Width":"@160","Left":"@10","Selected":"stat.Data.notinbookuser.search.model.f_residential_area","Data":"stat.Data.estate","Classes":"@SelectWhite BorderRound","@Change":"stat.Call($setProperty$, $notinbookuser$, $f_residential_area$, e.Value)"},{"type":"Input","Value":"stat.Data.notinbookuser.search.model.f_building","Width":"@130","Left":"@10","Height":"@30","PlaceHolder":"@楼栋号","@Change":"stat.Call($setProperty$, $notinbookuser$, $f_building$, e.Value)"},{"PlaceHolder":"@单元","@Change":"stat.Call($setProperty$, $notinbookuser$, $f_unit$, e.Value)","type":"Input","Value":"stat.Data.notinbookuser.search.model.f_unit","Width":"@130","Height":"@30","Left":"@10"},{"Value":"stat.Data.notinbookuser.search.model.f_adjustable_id","Width":"@100","Height":"@30","@Change":"stat.Call($setProperty$, $notinbookuser$, $f_adjustable_id$, e.Value)","type":"Input","Left":"@10","PlaceHolder":"@调压箱编号"},{"type":"Button","Left":"@10","Classes":"@SearchButton BorderRound","@Click":"stat.Call($searchNotInBookUser$)","Slots":{"item":{"Classes":"@SearchButtonImg","type":"Image","Name":"SearchButton_Image"}}},{"type":"Button","VAlign":"@Center","Classes":"@SearchButton BorderRound","Left":"@10","Text":"@展开/收起","@Click":"stat.Call($checkShow$,2)"}]},{"type":"Stack","if":"stat.Data.footShow","children":[{"Bottom":"@5","Value":"stat.Data.notinbookuser.search.model.f_user_phone","@Change":"stat.Call($setProperty$, $notinbookuser$, $f_user_phone$, e.Value)","type":"Input","Left":"@90","Width":"@125","PlaceHolder":"@客户电话","Height":"@30"},{"Width":"@125","Left":"@10","PlaceHolder":"@客户类型","Bottom":"@5","Value":"stat.Data.notinbookuser.search.model.f_user_type","@Change":"stat.Call($setProperty$, $notinbookuser$, $f_user_type$, e.Value)","type":"Input"},{"@Change":"stat.Call($setProperty$, $notinbookuser$, $f_gasproperties$, e.Value)","type":"Input","Width":"@130","Bottom":"@5","Left":"@10","PlaceHolder":"@用气性质","Value":"stat.Data.notinbookuser.search.model.f_gasproperties"},{"Width":"@130","Left":"@10","@Change":"stat.Call($setProperty$, $notinbookuser$, $f_meter_brand$, e.Value)","type":"Input","Bottom":"@5","PlaceHolder":"@气表品牌","Value":"stat.Data.notinbookuser.search.model.f_meter_brand"},{"Left":"@10","PlaceHolder":"@气表型号","Bottom":"@5","Value":"stat.Data.notinbookuser.search.model.f_meter_style","Width":"@130","@Change":"stat.Call($setProperty$, $notinbookuser$, $f_meter_style$, e.Value)","type":"Input"}]},{"type":"Stack","if":"!stat.Data.footShow"},{"@Drop":"stat.Call($userOutBook$,stat.Data.selectBook.id,stat.GetDrag())","Slots":{"head":{"type":"Grid","Row":"@*","children":[{"Classes":"@DataGridHead","children":[{"@Change":"stat.Call($setCheckAll$, $notinbookuser$)","type":"CheckBox"},{"type":"Text","Left":"@9","Text":"@全选"}],"type":"Stack"},{"Name":"@用户编号","Classes":"@DataGridHead","Text":"@用户编号","type":"Text"},{"type":"Text","Text":"@客户姓名","Classes":"@DataGridHead"},{"Text":"@客户地址","type":"Text","Classes":"@DataGridHead"},{"Text":"@气价名称","Classes":"@DataGridHead","type":"Text"},{"Text":"@调压箱编号","Classes":"@DataGridHead","type":"Text"},{"type":"Text","Classes":"@DataGridHead","Text":"@客户电话"},{"Text":"@客户类型","type":"Text","Classes":"@DataGridHead"},{"type":"Text","Text":"@用气类型","Classes":"@DataGridHead"},{"type":"Text","Text":"@气表品牌","Classes":"@DataGridHead"},{"Classes":"@DataGridHead","type":"Text","Text":"@气表型号"}]},"item":{"Row":"@*","children":[{"HAlign":"@Center","@Change":"stat.Call($setCheck$, $notinbookuser$, data.f_userfiles_id)","type":"CheckBox","IsSelected":"stat.Data.notinbookuser.check.Call($isChecked$, data.f_userfiles_id)","Classes":"@DataGridBody","VAlign":"@Center"},{"type":"Text","Text":"data.f_userinfo_code","Name":"@用户编号","Classes":"@DataGridBody"},{"Classes":"@DataGridBody","Text":"data.f_user_name","type":"Text"},{"Text":"data.f_address","Classes":"@DataGridBody","type":"Text"},{"Classes":"@DataGridBody","Text":"data.f_price_name","type":"Text"},{"Classes":"@DataGridBody","type":"Text","Text":"data.f_adjustable_id"},{"Text":"data.f_user_phone","type":"Text","Classes":"@DataGridBody"},{"Text":"data.f_user_type","Classes":"@DataGridBody","type":"Text"},{"type":"Text","Text":"data.f_gasproperties","Classes":"@DataGridBody"},{"Text":"data.f_meter_brand","type":"Text","Classes":"@DataGridBody"},{"Classes":"@DataGridBody","Text":"data.f_meter_style","type":"Text"}],"type":"Grid"}},"type":"DataGrid","Classes":"@BorderRect","Data":"stat.Data.notinbookuser.list.data","Column":"@100,100,100,270,130,100,150,100,100,100,100","@DragStart":"stat.SetDrag($out$)","@DragOver":"stat.DragOver()"},{"children":[{"type":"Text","Text":"@"},{"type":"Text","Text":"$共{stat.Data.notinbookuser.list.count}条$","Left":"@20"},{"type":"Text","Text":"@ "},{"Text":"@加载更多","@Click":"stat.Call($loadMore$,$notinbookuser$)","Slots":{"item":{"children":[{"type":"Image","Path":"@doubledown","VAlign":"@Bottom"},{"Text":"@更多","type":"Text","Left":"@4"}],"type":"Stack"}},"type":"Button","FillStyle":"this.MouseIn:$#000000$,$#666666$"}],"type":"Grid","Column":"@*,*,1*,*","Classes":"@NormalFontlight","Top":"@12","Row":"@1*"}],"PaddingTop":"@12","StrokeStyle":"@#dfe4e7","PaddingBottom":"@20","Row":"@*,*,1*,*"}]}],"type":"Dock","Name":"@右边","Background":"@#f5f7f9","Classes":"@BorderRect"}]},"Drag":{"upPlan":{"children":[{"PaddingLeft":"@20","Row":"@*,*,*","PaddingBottom":"@20","type":"Grid","children":[{"VAlign":"@Center","Text":"@* 抄表册名","Right":"@10","type":"Text","HAlign":"@Right"},{"Value":"stat.Data.editBookInfo.f_book_name","@Change":"stat.Call($editBookInfos$,$f_book_name$,e.Value)","type":"Input"},{"VAlign":"@Center","type":"Text","Text":"@抄表员","Right":"@10","HAlign":"@Right"},{"@Change":"stat.Call($editBookInfos$,$f_inputtor$,e.Value)","type":"Select","Selected":"stat.Data.editBookInfo.f_inputtor","Data":"stat.Data.inputtorInfo","Classes":"@SelectWhite BorderRound"},{"Top":"@10","Text":"@所属公司","Right":"@10","HAlign":"@Right","VAlign":"@Center","type":"Text"},{"Data":"stat.Data.orgInfo","Classes":"@SelectWhite BorderRound","Top":"@10","@Change":"stat.Call($editBookInfos$,$f_filiale_name$,e.Value)","type":"Select","Selected":"stat.Data.editBookInfo.f_filiale_name"},{"Text":"@备注","Right":"@10","HAlign":"@Right","VAlign":"@Center","Top":"@10","type":"Text"},{"Top":"@10","Value":"stat.Data.editBookInfo.f_book_remark","@Change":"stat.Call($editBookInfos$,$f_book_remark$,e.Value)","type":"Input"},{"VAlign":"@Center","Text":"@抄表周期","Top":"@10","Right":"@10","type":"Text","HAlign":"@Right"},{"Classes":"@SelectWhite BorderRound","Top":"@10","Data":"stat.Data.bookPeriod","@Change":"stat.Call($editBookInfos$,$f_period$,e.Value)","type":"Select","Selected":"stat.Data.editBookInfo.f_period"},{"Top":"@10","Right":"@10","type":"Text","HAlign":"@Right","VAlign":"@Center","Text":"@执行时间"},{"Classes":"@SelectWhite BorderRound","Top":"@10","@Change":"stat.Call($editBookInfos$,$f_hand_begin_date$,e.Value)","type":"DateInput","ShowDateAndTime":"@All","Date":"stat.Data.editBookInfo.f_hand_begin_date"}],"Classes":"@NormalFontlight","Background":"@#ffffff","PaddingTop":"@20","PaddingRight":"@36","Column":"@80,170,80,170"}],"type":"Grid","Row":"@*","Column":"@*"},"SearchPlan":{"children":[{"PaddingLeft":"@10","Row":"@*,*,*,*,*,*","PaddingTop":"@10","Classes":"@BorderRound NormalFont PopupSearch","PaddingBottom":"@10","children":[{"type":"Text","Text":"@抄表册名","PaddingBottom":"@6","Classes":"@GridLabel"},{"type":"Input","Value":"stat.Data.meterbook.search.model.f_book_name","@Change":"stat.Call($setProperty$, $meterbook$, $f_book_name$, e.Value)"},{"PaddingTop":"@6","Text":"@抄表员","Classes":"@GridLabel","type":"Text","PaddingBottom":"@6"},{"type":"Input","PaddingTop":"@6","Value":"stat.Data.meterbook.search.model.f_inputtor","@Change":"stat.Call($setProperty$, $meterbook$, $f_inputtor$, e.Value)"},{"type":"Text","PaddingTop":"@6","PaddingBottom":"@6","Classes":"@GridLabel","Text":"@抄表周期"},{"Classes":"@SelectWhite BorderRound","@Change":"stat.Call($setProperty$, $meterbook$, $f_period$, e.Value)","type":"Select","Top":"@10","Data":"stat.Data.searchBookPeriod","Selected":"stat.Data.meterbook.search.model.f_period"},{"HAlign":"@Center","Top":"@20","children":[{"@Click":"stat.RestorePopup(this,e.draw)","type":"Button","Classes":"@Button2","Right":"@50","Text":"@取消"},{"@Click":"stat.Call($searchMeterBook$),stat.RestorePopup(this,e.draw)","type":"Button","Text":"@查询","FillStyle":"@#ffffff","Classes":"@Button"}],"type":"Stack","ColSpan":"@2"}],"type":"Grid","PaddingRight":"@20","Column":"@70,170"}],"type":"Grid","Column":"@1*","Classes":"@PopupSearch PopupShadow","Row":"@1*"},"drag":{"Text":"@","type":"Text"},"start":{"Path":"@drag","type":"Image"},"NewPlan":{"children":[{"Background":"@#ffffff","Pos":"@Center","PaddingRight":"@36","Row":"@*,*,*","children":[{"Right":"@10","Text":"@* 抄表册名称","HAlign":"@Right","VAlign":"@Center","type":"Text"},{"type":"Input","@Change":"stat.Call($addNewBookInfo$, $f_book_name$, e.Value)"},{"Right":"@10","Text":"@抄表员","HAlign":"@Right","VAlign":"@Center","type":"Text"},{"@Change":"stat.Call($addNewBookInfo$, $f_inputtor$, e.Value)","type":"Select","Data":"stat.Data.inputtorInfo","Classes":"@SelectWhite BorderRound"},{"VAlign":"@Center","Right":"@10","type":"Text","Text":"@所属公司","HAlign":"@Right"},{"Data":"stat.Data.orgInfo","Selected":"stat.Data.newBookInfo.f_filiale_name","@Change":"stat.Call($addNewBookInfo$, $f_filiale_name$, e.Value)","type":"Select","Classes":"@SelectWhite BorderRound"},{"VAlign":"@Center","type":"Text","PaddingTop":"@6","PaddingBottom":"@6","Right":"@10","Text":"@公司","Top":"@10","HAlign":"@Right"},{"HAlign":"@Center","VAlign":"@Center","Top":"@10","Text":"stat.Data.loginInfo.orgs","type":"Text"},{"type":"Text","Top":"@10","Right":"@10","Text":"@部门","HAlign":"@Right","VAlign":"@Center"},{"HAlign":"@Center","VAlign":"@Center","Top":"@10","type":"Text","Text":"stat.Data.loginInfo.deps"},{"type":"Text","VAlign":"@Center","Right":"@10","Top":"@10","Text":"@登陆人","HAlign":"@Right"},{"type":"Text","Top":"@10","HAlign":"@Center","VAlign":"@Center","Text":"stat.Data.loginInfo.name"},{"HAlign":"@Right","VAlign":"@Center","Text":"@抄表周期","Top":"@10","Right":"@10","PaddingTop":"@6","type":"Text","PaddingBottom":"@6"},{"Data":"stat.Data.bookPeriod","Selected":"$1$","Classes":"@SelectWhite BorderRound","Top":"@10","@Change":"stat.Call($addNewBookInfo$, $f_period$, e.Value)","type":"Select"},{"Top":"@10","Right":"@10","HAlign":"@Right","VAlign":"@Center","Text":"@执行时间","type":"Text"},{"Date":"stat.Data.bookBeginDate","@Change":"stat.Call($addNewBookInfo$, $f_hand_begin_date$, e.Value)","type":"DateInput","ShowDateAndTime":"@All","Classes":"@SelectWhite BorderRound","Top":"@10"},{"type":"Text","PaddingTop":"@6","PaddingBottom":"@6","HAlign":"@Right","VAlign":"@Center","Right":"@10","Top":"@10","Text":"@备注"},{"@Change":"stat.Call($addNewBookInfo$, $f_book_remark$, e.Value)","type":"Input","ColSpan":"@1","Top":"@10"}],"PaddingTop":"@20","PaddingLeft":"@20","Column":"@80,170,80,170,80,170","Classes":"@NormalFontlight","PaddingBottom":"@20","type":"Grid"}],"type":"Grid","Column":"@*","Row":"@*"},"deleteMsg":{"Row":"@*","children":[{"Background":"@#ffffff","Classes":"@NormalFontlight","HAlign":"@Center","VAlign":"@Center","Row":"@*","children":[{"PaddingTop":"@70","PaddingBottom":"@70","VAlign":"@Center","Text":"$确认删除{stat.Data.deleteBookInfo.f_book_name}？$","HAlign":"@Center","PaddingLeft":"@100","PaddingRight":"@100","type":"Text"}],"type":"Grid","Column":"@*"}],"type":"Grid","Column":"@*"}}}
      });
      let imgs = ["drag.png"];
      global.getImages(imgs, "./images/meterBook/");
      loadWasm().then(() => {
        global.stat = new Comp()
        this.stat = global.stat
        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.changeMethed = () => {
          this.show = !this.show
        }
        global.stat.ready().then(() => {
          console.log(global.stat)
          console.log('开始的上传组件'+global.stat.isUpload)
          console.log('开始的上传组件'+this.stat.isUpload)
          run()
        })

      })
    }


}
</script>
