• 
    <ul id="o6k0g"></ul>
    <ul id="o6k0g"></ul>

    一種基于BootstrapTable平臺可選擇數(shù)據(jù)導(dǎo)出的方法技術(shù)

    技術(shù)編號:18894932 閱讀:35 留言:0更新日期:2018-09-08 11:10
    本發(fā)明專利技術(shù)涉及BootstrapTable平臺技術(shù)領(lǐng)域,特別涉及一種基于BootstrapTable平臺不經(jīng)過后臺數(shù)據(jù)查詢就能從前臺快速地、可選擇性地導(dǎo)出數(shù)據(jù)的方法。本發(fā)明專利技術(shù)的方法是在前端集成了BootstrapTable的頁面中加入tableExport插件,導(dǎo)出的時候根據(jù)用戶所選擇的數(shù)據(jù)進(jìn)行判斷,如果所選擇的數(shù)據(jù)長度大于0,則表示選中的數(shù)據(jù)要導(dǎo)出,然后拼裝成json數(shù)據(jù),使用load方法重新加載到table中,否則提示用戶是否導(dǎo)出全部還是當(dāng)前頁面的數(shù)據(jù),如果選擇全部導(dǎo)出,使用refresh方法重新加載全部數(shù)據(jù),接著使用getData方法獲得數(shù)據(jù),最后使用tableExport方法導(dǎo)出。本發(fā)明專利技術(shù)解決了用戶從后臺導(dǎo)出數(shù)據(jù)緩慢、不能根據(jù)自己所需選擇數(shù)據(jù)導(dǎo)出的問題。

    A method of selecting data export based on BootstrapTable platform

    The invention relates to the technical field of the BootstrapTable platform, in particular to a method for rapidly and selectively exporting data from the foreground without background data query based on the BootstrapTable platform. The method of the present invention is to add a tableExport plug-in into the front-end integrated page of BootstrapTable. When the data is exported, it is judged according to the data selected by the user. If the selected data length is greater than 0, the selected data will be exported, and then assembled into JSON data, and reloaded into the table using the load method. Otherwise, prompt the user whether to export all or the current page data, if you choose to export all, use refresh method to reload all the data, then use getData method to get the data, and finally use the tableExport method to export. The invention solves the problem that the user can export data slowly from the background and can not export data according to the selected data he needs.

    【技術(shù)實(shí)現(xiàn)步驟摘要】
    一種基于BootstrapTable平臺可選擇數(shù)據(jù)導(dǎo)出的方法
    本專利技術(shù)涉及BootstrapTable平臺
    ,特別涉及一種基于BootstrapTable平臺不經(jīng)過后臺數(shù)據(jù)查詢就能從前臺快速地、可選擇性地導(dǎo)出數(shù)據(jù)的方法。
    技術(shù)介紹
    在BootstrapTable平臺上如果從后臺查詢數(shù)據(jù)庫然后導(dǎo)出數(shù)據(jù),容易導(dǎo)致數(shù)據(jù)加載緩慢、中間斷網(wǎng)數(shù)據(jù)不全且不能快速地選擇自己所需導(dǎo)出數(shù)據(jù)的問題;為了解決這些問題,需要在前端使用腳本來封裝一個快速導(dǎo)出頁面數(shù)據(jù)的方法來實(shí)現(xiàn)。
    技術(shù)實(shí)現(xiàn)思路
    本專利技術(shù)解決的技術(shù)問題在于提供一種基于BootstrapTable平臺不經(jīng)過后臺數(shù)據(jù)查詢就能從前臺快速地、可選擇性地導(dǎo)出數(shù)據(jù)的方法;解決了用戶從后臺導(dǎo)出數(shù)據(jù)緩慢、不能根據(jù)自己所需選擇數(shù)據(jù)導(dǎo)出的問題。本專利技術(shù)解決上述技術(shù)問題的技術(shù)方案是:在前端集成了BootstrapTable的頁面中加入tableExport插件,導(dǎo)出的時候根據(jù)用戶所選擇的數(shù)據(jù)進(jìn)行判斷,如果所選擇的數(shù)據(jù)長度大于0,則表示選中的數(shù)據(jù)要導(dǎo)出,然后拼裝成json數(shù)據(jù),使用load方法重新加載到table中,否則提示用戶是否導(dǎo)出全部還是當(dāng)前頁面的數(shù)據(jù),如果選擇全部導(dǎo)出,使用refresh方法重新加載全部數(shù)據(jù),接著使用getData方法獲得數(shù)據(jù),最后使用tableExport方法導(dǎo)出。從而解決了用戶從后臺導(dǎo)出數(shù)據(jù)緩慢、不能根據(jù)自己所需選擇數(shù)據(jù)導(dǎo)出的問題。所述的方法具體包括如下步驟:步驟一、創(chuàng)建一個BootstrapTable前端頁面,并添加tableExport插件,然后從服務(wù)器加載數(shù)據(jù)填充表格;步驟二、在表格上方的toolbar添加按鈕,并給其綁定導(dǎo)出事件exportList,參數(shù)有table及tilte;步驟三、在導(dǎo)出事件中,根據(jù)getAllSelections方法獲得用戶選擇的數(shù)據(jù)長度,如果大于0,把選擇的數(shù)據(jù)拼裝成json數(shù)據(jù),使用load方法重新加載到table中,接著使用tableExport方法導(dǎo)出數(shù)據(jù);步驟四、如果選擇的數(shù)據(jù)等于0,則提示用戶是否導(dǎo)出當(dāng)前頁還是全部數(shù)據(jù),如果選擇”導(dǎo)出全部”,則使用refresh方法重新加載全部數(shù)據(jù);步驟五、最后使用getData方法獲得數(shù)據(jù)并使用tableExport方法導(dǎo)出。本專利技術(shù)的有益效果:當(dāng)在前端集成了BootstrapTable的頁面中加入tableExport插件,導(dǎo)出的時候根據(jù)用戶所選擇的數(shù)據(jù)進(jìn)行判斷,如果所選擇的數(shù)據(jù)長度大于0,則表示選中的數(shù)據(jù)要導(dǎo)出,然后拼裝成json數(shù)據(jù),使用load方法重新加載到table中,否則提示用戶是否導(dǎo)出全部還是當(dāng)前頁面的數(shù)據(jù),如果選擇全部導(dǎo)出,使用refresh方法重新加載全部數(shù)據(jù),接著使用getData方法獲得數(shù)據(jù),最后使用tableExport方法導(dǎo)出,從而達(dá)到快速地、可選擇性地導(dǎo)出數(shù)據(jù)的目的。有效解決用戶從后臺導(dǎo)出數(shù)據(jù)緩慢、不能根據(jù)自己所需選擇數(shù)據(jù)的問題。附圖說明下面結(jié)合附圖對本專利技術(shù)進(jìn)一步說明:圖1為本專利技術(shù)的流程圖。具體實(shí)施方式如圖1所示,本專利技術(shù)采用如下步驟:步驟一、創(chuàng)建一個BootstrapTable前端頁面,并添加tableExport插件,然后從服務(wù)器加載數(shù)據(jù)填充表格;如:&lt;scripttype="text/javascript"src="${path}/js/bootstrap-table-export.js"&gt;&lt;/script&gt;&lt;scripttype="text/javascript"src="${path}/js/tableExport.js"&gt;&lt;/script&gt;&lt;divclass="table-responsive"&gt;&lt;formaction=""id="listForm"class="form-inlineform-search"&gt;&lt;tableid="table"class="table-stripedtable-hovertable-condensed"data-mobile-responsive="true"&gt;&lt;/table&gt;&lt;/form&gt;&lt;/div&gt;&lt;scripttype="text/javascript"&gt;$(function(){initBootstrapTable('#table',{url:"${path}/list.action",toolbar:'#toolbar',showToggle:true,showColumns:true,pagination:true,……columns:[{field:'id',checkbox:true},……]});}&lt;/script&gt;步驟二、在表格上方的toolbar添加按鈕,并給其綁定導(dǎo)出事件exportList,參數(shù)有table及tilte;如:&lt;divid="toolbar"class="btn-groupnoprint"role="group"&gt;&lt;buttonid="btnExport"type="button"class="btnbtn-default"&gt;&lt;iclass="iconfonticon-daochu"&gt;&lt;/i&gt;導(dǎo)出&lt;/button&gt;&lt;/div&gt;&lt;scripttype="text/javascript"&gt;$(function(){//導(dǎo)出$("#btnExport").click(function(){exportList($('#table'),'導(dǎo)出數(shù)據(jù)');});});&lt;/script&gt;步驟三、在導(dǎo)出事件中,根據(jù)getAllSelections方法獲得用戶選擇的數(shù)據(jù)長度,如果大于0,把選擇的數(shù)據(jù)拼裝成json數(shù)據(jù),使用load方法重新加載到table中;如:functionexportList(table,title){varselectedData=table.bootstrapTable('getAllSelections');if(selectedData.length&gt;0){varjsonData={"total":selectedData.length,"rows":selectedData};table.bootstrapTable('load',jsonData);}}步驟四、如果選擇的數(shù)據(jù)等于0,則提示用戶是否導(dǎo)出當(dāng)前頁還是全部數(shù)據(jù),如果選擇”導(dǎo)出全部”,則使用refresh方法重新加載全部數(shù)據(jù);如:functionexportList(table,title){varselectedData=table.bootstrapTable('getAllSelections');if(selectedDa本文檔來自技高網(wǎng)...

    【技術(shù)保護(hù)點(diǎn)】
    1.一種基于BootstrapTable平臺不經(jīng)過后臺數(shù)據(jù)查詢就能從前臺快速地、可選擇性地導(dǎo)出數(shù)據(jù)的方法,其特征在于:先在前端集成了BootstrapTable的頁面中加入tableExport插件,導(dǎo)出的時候根據(jù)用戶所選擇的數(shù)據(jù)進(jìn)行判斷,如果所選擇的數(shù)據(jù)長度大于0,則表示選中的數(shù)據(jù)要導(dǎo)出,把選擇的數(shù)據(jù)拼裝成json數(shù)據(jù),使用load方法重新加載到table中,否則提示用戶是否導(dǎo)出全部還是當(dāng)前頁面的數(shù)據(jù),如果選擇全部導(dǎo)出,使用refresh方法重新加載全部數(shù)據(jù),接著使用getData方法獲得數(shù)據(jù),最后使用tableExport方法導(dǎo)出,從而解決了用戶從后臺導(dǎo)出數(shù)據(jù)緩慢、不能根據(jù)自己所需選擇數(shù)據(jù)導(dǎo)出的問題。

    【技術(shù)特征摘要】
    1.一種基于BootstrapTable平臺不經(jīng)過后臺數(shù)據(jù)查詢就能從前臺快速地、可選擇性地導(dǎo)出數(shù)據(jù)的方法,其特征在于:先在前端集成了BootstrapTable的頁面中加入tableExport插件,導(dǎo)出的時候根據(jù)用戶所選擇的數(shù)據(jù)進(jìn)行判斷,如果所選擇的數(shù)據(jù)長度大于0,則表示選中的數(shù)據(jù)要導(dǎo)出,把選擇的數(shù)據(jù)拼裝成json數(shù)據(jù),使用load方法重新加載到table中,否則提示用戶是否導(dǎo)出全部還是當(dāng)前頁面的數(shù)據(jù),如果選擇全部導(dǎo)出,使用refresh方法重新加載全部數(shù)據(jù),接著使用getData方法獲得數(shù)據(jù),最后使用tableExport方法導(dǎo)出,從而解決了用戶從后臺導(dǎo)出數(shù)據(jù)緩慢、不能根據(jù)自己所需選擇數(shù)據(jù)導(dǎo)出的問題。2.根據(jù)權(quán)利要求1所述的不經(jīng)過后臺數(shù)據(jù)查詢就能從前臺快速地、可選擇性地導(dǎo)出數(shù)據(jù)的方法,...

    【專利技術(shù)屬性】
    技術(shù)研發(fā)人員:陳林張來卿龐嚴(yán)冬
    申請(專利權(quán))人:珠海橫琴盛達(dá)兆業(yè)科技投資有限公司
    類型:發(fā)明
    國別省市:廣東,44

    網(wǎng)友詢問留言 已有0條評論
    • 還沒有人留言評論。發(fā)表了對其他瀏覽者有用的留言會獲得科技券。

    1
    主站蜘蛛池模板: 无码人妻精品一区二区三区在线| 久久午夜无码鲁丝片| 亚洲av无码片vr一区二区三区| 69天堂人成无码麻豆免费视频| 国产精品无码AV天天爽播放器| 人妻少妇AV无码一区二区| 无码乱码av天堂一区二区| 国产a v无码专区亚洲av| 制服在线无码专区| 亚洲中文久久精品无码ww16| av色欲无码人妻中文字幕| 无码无遮挡又大又爽又黄的视频| 国产色无码精品视频国产| 久久精品国产亚洲AV无码偷窥| 亚洲中文字幕久久精品无码喷水 | 国产午夜无码福利在线看网站| 国精无码欧精品亚洲一区| 亚洲AⅤ永久无码精品AA | 一区二区三区无码高清| 亚洲AV无码久久久久网站蜜桃| 国产免费无码一区二区| 亚洲Av无码乱码在线观看性色 | 国产精品无码专区AV在线播放 | 久久中文精品无码中文字幕| 九九无码人妻一区二区三区| 亚洲中文字幕久久精品无码VA| 国产成人无码精品一区二区三区| 波多野42部无码喷潮在线| 亚洲av无码国产精品色在线看不卡 | 亚洲爆乳无码专区www| 亚洲AV无码专区在线亚| 91精品久久久久久无码| 日韩精品无码一区二区三区免费| 自慰无码一区二区三区| 日韩精品无码免费专区网站| 一区二区三区人妻无码| 亚洲AV综合色区无码一区| 久久精品无码一区二区无码| 无码精品A∨在线观看十八禁 | 极品无码国模国产在线观看| 亚洲AV日韩AV无码污污网站|