You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

2.3 KiB

调用

<listview :source="getBillList" :page-size="8"></listview>
  • source可以为一个url,或一个方法。如果是url,直接从该url请求数据。如果是一个方法,该方法接收一个param参数,包含页码等信息。方法必须返回一个promise对象,resolve一个指定格式的列表数据

工单列表组件的数据由三部分组成

  1. 查询表单
  2. 列表项
  3. 页码信息

基础的数据格式如下:

工单列表页渲染组件(\resource\components\mobile\bill\ListView.js)

{
	"queryForm":[],//工单查询条件,详见[列表表单组件]
	"resultList":[],//工单列表数据,详见列表项数据格式
	"totalCount":48,//工单总条目数
	"pageCount":3//工单总页数
}

列表项数据格式如下:

列表项渲染组件(\resource\components\mobile\bill\ListItem.js)

{
	"title":"451000201815",//工单标题
	"subTitle":"",//工单副标题
	"icon":"resource/images/openBills/open_01.png",//工单显示图标
	"tags":[//工单的属性标记   type:normal,warn,error 分别为绿色,黄色,红色  value:true显示,false不显示
        {"name":"待回单","type":"normal","value":"true"},
        {"name":"催装0次","type":"warn","value":"false"}
	],
	"props":[//工单属性列表,icon样式见font-awesome
        {"icon":"fa fa-home","value":"哈尔滨市香坊区鼎园明府小区2号楼2单元802室"}
	],
	"extend":[//工单扩展属性列表
        {"key":"上门","value":""},
        {"key":"预约","value":"2017-05-16 14:58:56"},
        {"key":"截至","value":"2017-05-17 23:59:59"}
	],
	"methods":{//工单操作,分三类:tel:拨打电话 map:打开地图定位 menu:打开菜单
        "tel":"18004667853",//电话号码
        "map":"xxxxxx",//客户地址
        "menu":"xxxxxx"//菜单项接口地址。 菜单配置 详见[工单菜单配置]
	},
	"detail":"/openBill/detail?DispatchSn=xxxxxxxx&MainSn=xxxxxxxx",//工单详情地址
	"data":{//工单原始数据
        "DispatchSn":"xxxxxxxx",
        "MainSn":"xxxxxxxx",
        "ClogCode":"xxxxxxxx",
        "NativeNetId":"xxxxxxxx",
        "WorkType":"新装",
        "WorkAction":"装",
        "SpecialtyId":"xxxxxxxx",
        "Contactor":"xxxxxxxx",
        "ContactPhone":"xxxxxxxx",
        "Applytime":"2017-05-15 09:34:18",
        "ReqRepairTime":"2017-05-17 23:59:59",
        "InstAddress":"xxxxxxxx"
	}
}