tableClass.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635
  1. //tableID前台被操作表格ID
  2. //sourceDataArray
  3. //columnsArray列数组
  4. //主键用户点击表格获取绑定数据源Object
  5. // 根据数据源动态创建表格
  6. // tableID创建表格名称
  7. // sourceDataArray数据源数组
  8. // columnsArray 需要显示列原始名称数组
  9. // columnDispalyNames列实际显示名称数组
  10. function dyCretateTableByArray(tableID,sourceDataArray,columnsArray,columnDispalyNames,bool_needHeadColumn,editButtons){
  11. var _row;
  12. var _cell;
  13. // tableID 表id table_AllProjects
  14. // sourceDataArray 数据数组
  15. // columnsArray 字段数组
  16. // columnDispalyNames null
  17. // bool_needHeadColumn true
  18. // editButtons true
  19. if(isEmptyValue(bool_needHeadColumn)){ //是否需要表头列
  20. bool_needHeadColumn = false;
  21. }
  22. if(isEmptyValue(columnsArray) == true){ //判断原始列是否存在
  23. columnsArray = [];
  24. for (var obj_Name in sourceDataArray[0]){
  25. if(obj_Name != "rn")
  26. columnsArray.push(obj_Name);
  27. }
  28. }
  29. var editTable = document.getElementById(tableID);
  30. editTable.innerHTML = "";
  31. // 添加表格表头
  32. if(bool_needHeadColumn){
  33. var tr = document.createElement("tr");
  34. if(isEmptyValue(columnDispalyNames)){
  35. for (var n=0; n<columnsArray.length;n++){
  36. var th = document.createElement("th");
  37. th.innerText = columnsArray[n];
  38. tr.appendChild(th);
  39. }
  40. }
  41. else{
  42. for (var n=0; n<columnDispalyNames.length;n++){
  43. var th = document.createElement("th");
  44. th.innerText = columnDispalyNames[n];
  45. tr.appendChild(th);
  46. }
  47. }
  48. if(isEmptyValue(editButtons) == false){
  49. var th = document.createElement("th");
  50. th.setAttribute("style","width:90px");
  51. th.innerText = "操作";
  52. tr.appendChild(th);
  53. }
  54. editTable.appendChild(tr);
  55. }
  56. if (isEmptyValue(sourceDataArray)){
  57. return;
  58. }
  59. for(var i = 0; i < sourceDataArray.length; i++) {
  60. var currentObject = sourceDataArray[i];
  61. _row = document.createElement("tr");
  62. _row.onclick = function (evt) {
  63. tableClickHandler(evt,sourceDataArray);
  64. };
  65. _row.ondblclick = function (evt) {
  66. tableClickHandler(evt,sourceDataArray);
  67. };
  68. editTable.appendChild(_row); //创建行
  69. for (var j = 0; j < columnsArray.length;j++){
  70. var columnName = columnsArray[j];
  71. for (var objName in currentObject){
  72. if(columnName == objName){ //判断预定义列与读取属性是否匹配
  73. _cell = document.createElement("td");
  74. _cell.innerText = currentObject[objName];
  75. _cell.setAttribute("class","tdclass");//设置文字超过表格列长度样式
  76. if(tableID == "statistics4Table"){
  77. _cell.setAttribute("style","height:40px");
  78. }
  79. _row.appendChild(_cell);
  80. // _cell.onmouseover = function (_cell) {
  81. // GetValueForToolTip(_cell);
  82. // };
  83. _row.appendChild(_cell);
  84. }
  85. }
  86. }
  87. if (isEmptyValue(editButtons) == false ){ //添加编辑删除按钮
  88. _cell = document.createElement("td");
  89. _cell.setAttribute("class","tdclass");//设置文字超过表格列长度样式
  90. _cell.setAttribute("align","center");
  91. var btnsh = document.createElement("button");
  92. btnsh.setAttribute("class","am-btn am-btn-success");
  93. btnsh.setAttribute("type","button");
  94. btnsh.innerText = "审核";
  95. btnsh.onclick = function (evt) {
  96. editButtonsClickHander(evt,sourceDataArray);
  97. };
  98. var btn = document.createElement("button");
  99. btn.setAttribute("class","am-btn am-btn-success");
  100. btn.setAttribute("style","margin-left:5px;");
  101. btn.setAttribute("type","button");
  102. btn.innerText = "编辑";
  103. btn.onclick = function (evt) {
  104. editButtonsClickHander(evt,sourceDataArray);
  105. };
  106. var btn2 = document.createElement("button");
  107. btn2.setAttribute("class","am-btn am-btn-success");
  108. btn2.setAttribute("style","margin-left:5px;");
  109. btn2.setAttribute("type","button");
  110. btn2.innerText = "删除";
  111. btn2.onclick = function (evt) {
  112. editButtonsClickHander(evt,sourceDataArray);
  113. };
  114. var btn3 = document.createElement("button");
  115. /* btn3.setAttribute("class","am-btn am-btn-success");*/
  116. btn3.setAttribute("class","button1");
  117. btn3.setAttribute("style","margin-left:5px;");
  118. btn3.setAttribute("type","button");
  119. btn3.innerText = "详情";
  120. btn3.onclick = function (evt) {
  121. editButtonsClickHander(evt,sourceDataArray);
  122. };
  123. if(tableID == "queryTable1"){
  124. _cell.appendChild(btn3);
  125. }
  126. if(tableID == "statistics2Table"){
  127. _cell.appendChild(btn3);
  128. }
  129. if(tableID == "statistics3Table"){
  130. _cell.appendChild(btn3);
  131. }
  132. _row.appendChild(_cell);
  133. }
  134. }
  135. }
  136. //把数据库返回结果变成 tableString
  137. function dyCretateTableStringByArray(sourceDataArray){
  138. var tabStr="<tr>";
  139. for (var obj_Name in sourceDataArray[0]){
  140. if(obj_Name != "rn")
  141. tabStr+="<td>"+ obj_Name+"</td>";
  142. }
  143. tabStr+="</tr>";
  144. for(var i = 0; i < sourceDataArray.length; i++) {
  145. tabStr+="<tr>";
  146. var currentObject = sourceDataArray[i];
  147. for (var objName in currentObject){
  148. tabStr+="<td>" +currentObject[objName]+"</td>"
  149. }
  150. tabStr+="</tr>"
  151. }
  152. return tabStr;
  153. }
  154. //权限列表内容加载
  155. function dyCretateAuthorityTableByArray(tableID,sourceDataArray,columnsArray,columnDispalyNames,bool_needHeadColumn){
  156. var _row;
  157. var _cell;
  158. if(isEmptyValue(bool_needHeadColumn)){ //是否需要表头列
  159. bool_needHeadColumn = false;
  160. }
  161. if(isEmptyValue(columnsArray) == true){ //判断原始列是否存在
  162. columnsArray = [];
  163. for (var obj_Name in sourceDataArray[0]){
  164. if(obj_Name != "rn")
  165. columnsArray.push(obj_Name);
  166. }
  167. }
  168. var editTable = document.getElementById(tableID);
  169. editTable.innerHTML = "";
  170. // 添加表格表头
  171. if(bool_needHeadColumn){
  172. var tr = document.createElement("tr");
  173. if(isEmptyValue(columnDispalyNames)){
  174. for (var n=0; n<columnsArray.length;n++){
  175. var th = document.createElement("th");
  176. th.innerText = columnsArray[n];
  177. tr.appendChild(th);
  178. }
  179. }
  180. else{
  181. for (var n=0; n<columnDispalyNames.length;n++){
  182. var th = document.createElement("th");
  183. th.innerText = columnDispalyNames[n];
  184. tr.appendChild(th);
  185. }
  186. }
  187. editTable.appendChild(tr);
  188. }
  189. if (isEmptyValue(sourceDataArray)){
  190. return;
  191. }
  192. for(var i = 0; i < sourceDataArray.length; i++) {
  193. var currentObject = sourceDataArray[i];
  194. _row = document.createElement("tr");
  195. _row.onclick = function (evt) {
  196. tableClickHandler(evt,sourceDataArray);
  197. };
  198. _row.ondblclick = function (evt) {
  199. tableClickHandler(evt,sourceDataArray);
  200. };
  201. editTable.appendChild(_row); //创建行
  202. for (var j = 0; j < columnsArray.length;j++){
  203. var columnName = columnsArray[j];
  204. var index = 0;
  205. for (var objName in currentObject){
  206. if(columnName == objName){ //判断预定义列与读取属性是否匹配
  207. _cell = document.createElement("td");
  208. if(columnName != "资源名称"){
  209. var check = document.createElement("input");
  210. check.setAttribute("type","checkbox");
  211. check.setAttribute("name",j+"_"+i);
  212. check.setAttribute("value",columnName);
  213. if(currentObject[objName] == "0")
  214. check.removeAttribute("checked");
  215. else
  216. check.setAttribute("checked",true);
  217. check.onclick = function (event) {
  218. refreshSourceData(event);
  219. };
  220. _cell.appendChild(check);
  221. }
  222. else{
  223. _cell.innerText = currentObject[objName];
  224. _cell.setAttribute("class","tdclass");//设置文字超过表格列长度样式
  225. _cell.onmouseover = function (_cell) {
  226. GetValueForToolTip(_cell);
  227. };
  228. }
  229. _row.appendChild(_cell);
  230. index++;
  231. }
  232. }
  233. if(columnName == "全选"){
  234. _cell = document.createElement("td");
  235. var check = document.createElement("input");
  236. check.setAttribute("type","checkbox");
  237. check.setAttribute("name",j);
  238. if(getRowCheckboxState(i))
  239. check.setAttribute("checked",true);
  240. else
  241. check.removeAttribute("checked");
  242. check.onclick = function (event) {
  243. checkboxSelectAll(event.currentTarget.parentElement.parentElement.rowIndex-1,event.currentTarget.checked);
  244. };
  245. _cell.appendChild(check);
  246. _row.appendChild(_cell);
  247. }
  248. }
  249. }
  250. }
  251. function refreshSourceData(event){
  252. var index = event.currentTarget.parentElement.parentElement.rowIndex;
  253. var check = event.currentTarget;
  254. authorityArray[index][check.value] = check.checked == true ?1:0;
  255. var checkRowAll = getCheckboxByName(index);
  256. if(isEmptyValue(checkRowAll) == false)
  257. checkRowAll.setAttribute("checked",getRowCheckboxState(index));
  258. }
  259. function dyCretateTableByArrayAndReturn(sourceDataArray,columnsArray,columnDispalyNames,bool_needHeadColumn){
  260. var _row;
  261. var _cell;
  262. if(isEmptyValue(bool_needHeadColumn)){ //是否需要表头列
  263. bool_needHeadColumn = false;
  264. }
  265. if(isEmptyValue(columnsArray) == true){ //判断原始列是否存在
  266. columnsArray = [];
  267. for (var obj_Name in sourceDataArray[0]){
  268. if(obj_Name != "rn")
  269. columnsArray.push(obj_Name);
  270. }
  271. }
  272. var div = document.createElement("div");
  273. var tableInfo = document.createElement("table");
  274. div.appendChild(tableInfo);
  275. tableInfo.setAttribute("class","am-table am-table-bordered am-table-radius am-table-striped am-table-hover");
  276. tableInfo.setAttribute("style","table-layout: fixed;width:100%;");
  277. var editTable = document.createElement("tbody");
  278. tableInfo.appendChild(editTable);
  279. editTable.innerHTML = "";
  280. // 添加表格表头
  281. if(bool_needHeadColumn){
  282. var tr = document.createElement("tr");
  283. if(isEmptyValue(columnDispalyNames)){
  284. for (var n=0; n<columnsArray.length;n++){
  285. var th = document.createElement("th");
  286. th.innerText = columnsArray[n];
  287. tr.appendChild(th);
  288. }
  289. }
  290. else{
  291. for (var n=0; n<columnDispalyNames.length;n++){
  292. var th = document.createElement("th");
  293. th.innerText = columnDispalyNames[n];
  294. tr.appendChild(th);
  295. }
  296. }
  297. editTable.appendChild(tr);
  298. }
  299. for(var i = 0; i < sourceDataArray.length; i++) {
  300. var currentObject = sourceDataArray[i];
  301. _row = document.createElement("tr");
  302. _row.onclick = function (evt) {
  303. tableClickHandler(evt,sourceDataArray);
  304. };
  305. _row.ondblclick = function (evt) {
  306. tableClickHandler(evt,sourceDataArray);
  307. };
  308. editTable.appendChild(_row); //创建行
  309. for (var j = 0; j < columnsArray.length;j++){
  310. var columnName = columnsArray[j];
  311. for (var objName in currentObject){
  312. if(columnName == objName){ //判断预定义列与读取属性是否匹配
  313. _cell = document.createElement("td");
  314. _cell.innerText = currentObject[objName];
  315. _cell.setAttribute("class","tdclass");//设置文字超过表格列长度样式
  316. _row.appendChild(_cell);
  317. _cell.onmouseover = function (_cell) {
  318. GetValueForToolTip(_cell);
  319. };
  320. _row.appendChild(_cell);
  321. }
  322. }
  323. }
  324. }
  325. return div;
  326. }
  327. //动态创建带有状态的表格 仅适用于青浦重大办项目
  328. function dyCretateTableWitdhStateByArray(tableID,sourceDataArray,columnsArray,columnDispalyName,primaryKey){
  329. var _row;
  330. var _cell;
  331. var primaryKeyIndex = -1;
  332. var bool_needHeadColumn = false; //是否需要表头列
  333. if(isEmptyValue(primaryKey) == false){
  334. if(isEmptyValue(columnsArray) == true){
  335. bool_needHeadColumn = false;
  336. columnsArray = [];
  337. for (var obj_Name in sourceDataArray[0]){
  338. columnsArray.push(obj_Name);
  339. }
  340. }
  341. for (var index=0; index<columnsArray.length;index++){
  342. if(columnsArray[index] == primaryKey){
  343. primaryKeyIndex = index;
  344. break;
  345. }
  346. }
  347. }
  348. var editTable = document.getElementById(tableID);
  349. editTable.innerHTML = "";
  350. if(bool_needHeadColumn){
  351. var tr = document.createElement("tr");
  352. for (var n=0; n<columnDispalyName.length;n++){
  353. var th = document.createElement("th");
  354. th.innerText = columnDispalyName[n];
  355. tr.appendChild(th);
  356. }
  357. editTable.appendChild(tr);
  358. }
  359. for(var i = 0; i < sourceDataArray.length; i++) {
  360. var currentObject = sourceDataArray[i];
  361. _row = document.createElement("tr");
  362. _row.onclick = function (evt) {
  363. tableClickHandler(evt,sourceDataArray);
  364. };
  365. _row.ondblclick = function (evt) {
  366. tableClickHandler(evt,sourceDataArray);
  367. };
  368. editTable.appendChild(_row); //创建行
  369. for (var j = 0; j < columnsArray.length;j++){
  370. var columnName = columnsArray[j];
  371. for (var objName in currentObject){
  372. if(columnName == objName){ //判断预定义列与读取属性是否匹配
  373. _cell = document.createElement("td");
  374. _cell.innerText = currentObject[objName];
  375. _cell.setAttribute("class","tdclass");//设置文字超过表格列长度样式
  376. _row.appendChild(_cell);
  377. _cell.onmouseover = function (_cell) {
  378. GetValueForToolTip(_cell);
  379. };
  380. _row.appendChild(_cell);
  381. }
  382. }
  383. }
  384. }
  385. }
  386. // 编辑 删除按钮点击事件
  387. function editButtonsClickHander(evt,sourceDataArray){
  388. var currentBtn = evt.currentTarget;
  389. var tableName = evt.currentTarget.parentElement.parentElement.parentElement.id;
  390. var selectObj = sourceDataArray[evt.currentTarget.parentElement.parentElement.rowIndex-1];
  391. switch (tableName){
  392. case "queryTable1":{
  393. if(currentBtn.innerHTML == "详情"){
  394. document.getElementById("queryReult1").style.display="none";
  395. document.getElementById("queryReult2").style.display="";
  396. document.getElementById("return").style.display="";
  397. document.getElementById("barcon1").style.display="none";
  398. document.getElementById("barcon2").style.display="";
  399. dyCretateTableByArray("queryTable2",selectObj.详情, ["属性","值"],["属性","值"],false);
  400. goPage(1, "queryTable2");
  401. }
  402. break;
  403. }
  404. case "statistics2Table":{
  405. if(currentBtn.innerHTML == "详情"){
  406. document.getElementById("statistics2").style.display = "none";
  407. document.getElementById("statistics3").style.display = "";
  408. var count=selectObj.名称+"共有"+selectObj.数量+"条数据";
  409. document.getElementById("statistics3Count").innerHTML=count;
  410. var options= document.getElementById("statistics1LayerSelect").options;
  411. var xmlDoc1 = xmlUtil.loadXmlFromFile("config/layerQueryName.xml");
  412. var layerXml = xmlDoc1.getElementsByTagName(options[options.selectedIndex].innerHTML);
  413. var mapNodes = layerXml[0].childNodes;
  414. var layerFieldname="";
  415. for (var i = 0; i < mapNodes.length; i++) {
  416. if (xmlUtil.getNodeTagName(mapNodes[i]) == "name") {
  417. layerFieldname = xmlUtil.getNodeValue(mapNodes[i])
  418. }
  419. }
  420. var list=[];
  421. for(var i=0;i<selectObj.图形集.length;i++){
  422. // selectObj.图形集[i].attributes.图形=selectObj.图形集[i]
  423. // list.push(selectObj.图形集[i].attributes)
  424. list.push({"名称":selectObj.图形集[i].attributes[layerFieldname],"图形":selectObj.图形集[i]})
  425. }
  426. dyCretateTableByArray("statistics3Table",list, ["名称"],["名称"],false,true);
  427. goPage(1, "statistics3Table");
  428. }
  429. break;
  430. }
  431. case "statistics3Table":{
  432. if(currentBtn.innerHTML == "详情"){
  433. document.getElementById("statistics3").style.display = "none";
  434. document.getElementById("statistics4").style.display = "";
  435. var list=[];
  436. for(var names in selectObj.图形.attributes){
  437. list.push({"属性":names,"值":selectObj.图形.attributes[names]})
  438. }
  439. dyCretateTableByArray("statistics4Table",list, ["属性","值"], ["属性","值"],false)
  440. }
  441. break;
  442. }
  443. }
  444. }
  445. //表格点击事件
  446. function tableClickHandler(evt,sourceArray){
  447. if(evt.type == "click"){
  448. boolZoom = false;
  449. }
  450. else{
  451. boolZoom = true;
  452. }
  453. var selectObj = sourceArray[evt.currentTarget.rowIndex-1];
  454. if(isEmptyValue(evt.currentTarget.parentElement) == false){
  455. switch (evt.currentTarget.parentElement.id){ //根据表格ID创建点击事件
  456. case "queryTable1":{
  457. m_view.popup.open({
  458. features: [selectObj.几何],
  459. featureMenuOpen: true,
  460. updateLocationEnabled: true
  461. });
  462. break;
  463. }
  464. case "statistics3Table":{
  465. m_view.goTo(selectObj.图形);
  466. m_view.popup.open({
  467. features: [selectObj.图形],
  468. featureMenuOpen: true,
  469. updateLocationEnabled: true
  470. });
  471. break;
  472. }
  473. case "resultListTable":{
  474. m_view.goTo(selectObj.几何);
  475. m_view.popup.open({
  476. features: [selectObj.几何],
  477. featureMenuOpen: true,
  478. updateLocationEnabled: true,
  479. dockEnabled:false
  480. });//dockEnabled:false 弹框在点上
  481. doFicker(selectObj.几何);
  482. break;
  483. }
  484. }
  485. }
  486. }
  487. function doFicker(graphic) {
  488. var timer;
  489. var timer1;
  490. timer1 = setInterval(function () {
  491. if(GraphicsLayer_fickerLayer.graphics.length>0){
  492. GraphicsLayer_fickerLayer.removeAll()
  493. }else{
  494. if(currentMapMode == "2D"){
  495. graphic.symbol={
  496. type: "simple-marker", // autocasts as new SimpleMarkerSymbol()
  497. style: "circle",
  498. color: [225,0,0],
  499. size: 10
  500. };
  501. }else{
  502. var verticalOffset = {
  503. screenLength: 40,
  504. maxWorldLength: 200,
  505. minWorldLength: 35
  506. };
  507. graphic.symbol = {
  508. type: "point-3d", // autocasts as new PointSymbol3D()
  509. symbolLayers: [{
  510. type: "icon", // autocasts as new IconSymbol3DLayer()
  511. resource: {
  512. primitive: "circle"
  513. },
  514. size: 10,
  515. material: {
  516. color: [225,0,0]
  517. }
  518. }],
  519. verticalOffset: verticalOffset,
  520. callout: {
  521. type: "line", // autocasts as new LineCallout3D()
  522. color: "white",
  523. size: 2,
  524. border: {
  525. color:"#40C2B4"
  526. }
  527. }
  528. };
  529. }
  530. GraphicsLayer_fickerLayer.add(graphic)
  531. }
  532. }, 500);
  533. timer = setTimeout(function () {
  534. clearInterval(timer1);
  535. GraphicsLayer_fickerLayer.removeAll()
  536. }, 5000);
  537. }
  538. function goPage(pno, tableId) {
  539. var itable = document.getElementById(tableId);
  540. var num = itable.rows.length;//表格所有行数(所有记录数)
  541. var totalPage = 0;//总页数
  542. var pageSize = 5;//每页显示行数
  543. //总共分几页
  544. if (num / pageSize > parseInt(num / pageSize)) {
  545. totalPage = parseInt(num / pageSize) + 1;
  546. } else {
  547. totalPage = parseInt(num / pageSize);
  548. }
  549. var currentPage = pno;//当前页数
  550. var startRow = (currentPage - 1) * pageSize + 1;//开始显示的行 31
  551. var endRow = currentPage * pageSize;//结束显示的行 40
  552. endRow = (endRow > num) ? num : endRow;
  553. // console.log(endRow);
  554. //遍历显示数据实现分页
  555. for (var i = 1; i < (num + 1); i++) {
  556. var irow = itable.rows[i - 1];
  557. if (i >= startRow && i <= endRow) {
  558. irow.style.display = "";
  559. } else {
  560. irow.style.display = "none";
  561. }
  562. }
  563. var tempStr = "共" + num + "条记录 共" + totalPage + "页 当前第" + currentPage + "页<br>";
  564. tempStr +=' <ul class="am-pagination am-pagination-centered" >';
  565. if (currentPage > 1) {
  566. tempStr += "<li id='firstBtn' class='am-disabled' onclick=\"goPage(" + (1) + ",'" + tableId + "')\"><a >首页</a></li>";
  567. tempStr += "<li id='beforeBtn' class='am-disabled' onclick=\"goPage(" + (currentPage - 1) + ",'" + tableId + "')\"><a ><上一页</a></li>"
  568. } else {
  569. tempStr += "首页";
  570. tempStr += "<上一页";
  571. }
  572. if (currentPage < totalPage) {
  573. tempStr += " <li id='nextBtn' class='am-disabled' onclick=\"goPage(" + (currentPage + 1) + ",'" + tableId + "')\"><a >下一页></a></li>";
  574. tempStr += " <li id='lastBtn' class='am-disabled' onclick=\"goPage(" + (totalPage) + ",'" + tableId + "')\"><a >尾页</a></li>";
  575. } else {
  576. tempStr += "下一页>";
  577. tempStr += "尾页";
  578. }
  579. tempStr += "</ul>";
  580. switch (tableId) {
  581. case "queryTable1":
  582. document.getElementById("barcon1").innerHTML = tempStr;
  583. break;
  584. case "queryTable2":
  585. document.getElementById("barcon2").innerHTML = tempStr;
  586. break;
  587. case "statistics3Table":
  588. document.getElementById("barcon3").innerHTML = tempStr;
  589. break;
  590. case "table10":
  591. document.getElementById("barcon10").innerHTML = tempStr;
  592. break;
  593. }
  594. }//分页,(起始页,表id)