vue iview遠端搜尋

2021-09-28 17:45:41 字數 892 閱讀 9724

利用遠端搜尋來實時從資料庫中調取資料,不必查出所有資料,在資料庫內資料龐大的情況下可以顯著提高查詢效率

html介面**:

js**:

getequipmentlistsuc(data),

/*** 遠端搜尋

*/remotemethod(query)

callajaxpost(url,data,this.getequipmentlistsuc);

//依據輸入框內容生成下拉框資料

this.equipmentlist = this.equipmentlist.filter(item => );

}, 100);

} else

}

後端**:

controller層

/**

* 查詢裝備資訊和id集合

* * @return 裝備資訊和id集合

*/public listselectequipmentlistbyequipname(@requestbody string str)

select

id,equip_name

from

equipment

where

state = 'a'

//模糊查詢

and locate(#,equip_name)

order by

id

service層實現類

@override

public listselectequipmentlistbyequipname(string str)

專案小結(vue iview)

import cryptojs from crypto js let psd cryptojs.sha256 this userform.password.trim tostring cryptojs.enc.base64 before upload handleupload show upload...

vue iview 時間元件限制

開始時間不能大於結束時間 結束時間不能小於開始時間 template中 type date placement bottom end placeholder 時間篩選 style width 100px v model starttime options startoption datepicker...

Vue iview 動態顯示表頭資訊

大部分遇到的表頭都是固定的,但如果要求後端給你什麼表頭資訊你就顯示什麼呢?接下來告訴你方法!一般vue靜態頁面table為 columns data data table div 這裡的columns指的就是表頭,data指的就是表的資料資訊 js裡靜態設定表頭為 columns 這裡面的內容我就不...