|
|
|
@ -14,6 +14,14 @@
|
|
|
|
|
<label>场所名称:</label>
|
|
|
|
|
<input type="text" name="placeName"></input>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<label>登记人员:</label>
|
|
|
|
|
<input type="text" name="registName"></input>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<label>登记日期:</label>
|
|
|
|
|
<input type="text" class="time-input" placeholder="请选择登记日期" name="registTime"/>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
|
|
|
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
|
|
|
@ -45,23 +53,6 @@
|
|
|
|
|
var editFlag = [[${@permission.hasPermi('system:placeRegist:edit')}]];
|
|
|
|
|
var removeFlag = [[${@permission.hasPermi('system:placeRegist:remove')}]];
|
|
|
|
|
var prefix = ctx + "system/placeRegist";
|
|
|
|
|
var placeCache = {};
|
|
|
|
|
|
|
|
|
|
// 预加载数据函数
|
|
|
|
|
function loadPlacesData() {
|
|
|
|
|
var apiUrl = ctx + 'system/place/getList';
|
|
|
|
|
return $.ajax({
|
|
|
|
|
url: apiUrl,
|
|
|
|
|
method: 'POST',
|
|
|
|
|
dataType: 'json'
|
|
|
|
|
}).done(function(data) {
|
|
|
|
|
data.data.forEach(function(item) {
|
|
|
|
|
placeCache[item.id] = item.placeName;
|
|
|
|
|
});
|
|
|
|
|
}).fail(function(xhr, status, error) {
|
|
|
|
|
console.error('预加载数据失败:', error);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
$(function() {
|
|
|
|
|
var options = {
|
|
|
|
|
url: prefix + "/list",
|
|
|
|
@ -86,9 +77,6 @@
|
|
|
|
|
{
|
|
|
|
|
field: 'placeName',
|
|
|
|
|
title: '场所名称',
|
|
|
|
|
formatter:function (value, row, index){
|
|
|
|
|
return placeCache[value] || '加载中...';
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'registName',
|
|
|
|
@ -161,11 +149,6 @@
|
|
|
|
|
};
|
|
|
|
|
$.table.init(options);
|
|
|
|
|
});
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
loadPlacesData().done(function() {
|
|
|
|
|
$('#bootstrap-table').bootstrapTable('refresh');
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|