<div id="mechanismList">
<table width="100%" cellspacing="0">
<thead>
<tr>
<th width="5%" align="center">地区</th>
<th width="15%" align="center" >调解组织名称</th>
<th width="10%" align="center" >电话</th>
<th width="20%" align="center" >地址</th>
<th width="10%" align="center" >工作时间</th>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
$("#searchMechanism").click(function () {
var provinceId = $("#province").val();
var cityId = $("#city").val();
$.ajax({
url:"/Fos/getList?provinceId=" + provinceId + "&cityId=" + cityId,
contentType: "application/json;charset=utf-8", // 明确指定了 UTF-8 字符集
success:function(result){
data = $.parseJSON(result);
const tbodyHtml = document.getElementById("tbody");
tbodyHtml.innerHTML = ''; // 直接清空所有子元素
// 动态生成 表格带分页并且根据市合并单元格
}
});
});
[{"id":"36","0":"36","provinceId":"13","1":"13","cityId":"16","2":"16","fosname":"\u6d59\u6c5f\u8c03\u89e3\u7ec4\u7ec71","3":"\u6d59\u6c5f\u8c03\u89e3\u7ec4\u7ec71","phone":"021-60431319","4":"021-60431319","address":"\u90d1\u5dde\u5e02","5":"\u90d1\u5dde\u5e02","email":null,"6":null,"worktime":"08:30-12:00 14:00-18:00","7":"08:30-12:00 14:00-18:00","listorder":"0","8":"0","create_time":null,"9":null,"update_time":null,"10":null,"province":"\u6d59\u6c5f\u7701","city":"\u91d1\u534e\u5e02"},{"id":"33","0":"33","provinceId":"236","1":"236","cityId":"246","2":"246","fosname":"\u9655\u897f\u91d1\u878d\u6d88\u8d39\u7ea0\u7eb7\u8c03\u89e3\u4e2d\u5fc3\u9655\u897f\u91d1\u878d\u6d88\u8d39\u7ea0\u7eb7\u8c03\u89e3\u4e2d\u5fc3\u9655\u897f\u91d1\u878d\u6d88\u8d39\u7ea0\u7eb7\u8c03\u89e3\u4e2d\u5fc3","3":"\u9655\u897f\u91d1\u878d\u6d88\u8d39\u7ea0\u7eb7\u8c03\u89e3\u4e2d\u5fc3\u9655\u897f\u91d1\u878d\u6d88\u8d39\u7ea0\u7eb7\u8c03\u89e3\u4e2d\u5fc3\u9655\u897f\u91d1\u878d\u6d88\u8d39\u7ea0\u7eb7\u8c03\u89e3\u4e2d\u5fc3","phone":"021-60431319","4":"021-60431319","address":"\u9655\u897f\u7701\u897f\u5b89\u5e02\u65b0\u57ce\u533a\u89e3\u653e\u8def159\u53f7\u9655\u897f\u7701\u897f\u5b89\u5e02\u65b0\u57ce\u533a\u89e3\u653e\u8def159\u53f7\u9655\u897f\u7701\u897f\u5b89\u5e02\u65b0\u57ce\u533a\u89e3\u653e\u8def159\u53f7","5":"\u9655\u897f\u7701\u897f\u5b89\u5e02\u65b0\u57ce\u533a\u89e3\u653e\u8def159\u53f7\u9655\u897f\u7701\u897f\u5b89\u5e02\u65b0\u57ce\u533a\u89e3\u653e\u8def159\u53f7\u9655\u897f\u7701\u897f\u5b89\u5e02\u65b0\u57ce\u533a\u89e3\u653e\u8def159\u53f7","email":"","6":"","worktime":"08:00-12:00 14:00-19:00","7":"08:00-12:00 14:00-19:00","listorder":"2","8":"2","create_time":null,"9":null,"update_time":null,"10":null,"province":"\u9655\u897f\u7701","city":"\u897f\u5b89\u5e02"},{"id":"35","0":"35","provinceId":"301","1":"301","cityId":"303","2":"303","fosname":"\u5c71\u897f\u8fd0\u57ce\u8c03\u89e3\u7ec4\u7ec7","3":"\u5c71\u897f\u8fd0\u57ce\u8c03\u89e3\u7ec4\u7ec7","phone":"12345532","4":"12345532","address":"\u76d0\u6e56\u533a","5":"\u76d0\u6e56\u533a","email":null,"6":null,"worktime":"09:00-11:00 14:00-17:00","7":"09:00-11:00 14:00-17:00","listorder":"0","8":"0","create_time":null,"9":null,"update_time":null,"10":null,"province":"\u5c71\u897f\u7701","city":"\u8fd0\u57ce\u5e02"},{"id":"34","0":"34","provinceId":"598","1":"598","cityId":"599","2":"599","fosname":"\u90d1\u5dde\u8c03\u89e3\u7ec4\u7ec7\u540d\u79f018","3":"\u90d1\u5dde\u8c03\u89e3\u7ec4\u7ec7\u540d\u79f018","phone":"021-60431319","4":"021-60431319","address":"\u90d1\u5dde\u5e02","5":"\u90d1\u5dde\u5e02","email":null,"6":null,"worktime":"08:00-12:00 14:00-18:00","7":"08:00-12:00 14:00-18:00","listorder":"1","8":"1","create_time":null,"9":null,"update_time":null,"10":null,"province":"\u6cb3\u5357\u7701","city":"\u90d1\u5dde\u5e02"}]
我的后端返回数据是这样的,帮我动态生成 表格带分页并且根据市合并单元格
最新发布