|
@@ -2025,7 +2025,9 @@
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">关闭</button>
|
|
<button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">关闭</button>
|
|
- <button type="button" class="btn btn-sm btn-success" >刷新显示</button>
|
|
|
|
|
|
+ <% if (hadMap) { %>
|
|
|
|
+ <button type="button" class="btn btn-sm btn-success" onclick="window.location.reload()" >刷新显示</button>
|
|
|
|
+ <% } %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -2085,10 +2087,9 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-<script src="/public/js/map/turf.min.js"></script>
|
|
|
|
|
|
+
|
|
<script>
|
|
<script>
|
|
const hadMap = parseInt(<%- hadMap %>);
|
|
const hadMap = parseInt(<%- hadMap %>);
|
|
- const tenderMapList = JSON.parse(unescape('<%- escape(JSON.stringify(tenderMapList)) %>'));
|
|
|
|
$(function () {
|
|
$(function () {
|
|
$('body').on('click', '#bd-set-11 .select-map', function () {
|
|
$('body').on('click', '#bd-set-11 .select-map', function () {
|
|
// const val = parseInt($(this).data('value'));
|
|
// const val = parseInt($(this).data('value'));
|
|
@@ -2157,8 +2158,6 @@
|
|
$('.save-map').attr('data-mid', id);
|
|
$('.save-map').attr('data-mid', id);
|
|
// 加载sjs
|
|
// 加载sjs
|
|
const mapInfo = _.find(tenderMapList, { id });
|
|
const mapInfo = _.find(tenderMapList, { id });
|
|
- console.log(mapInfo);
|
|
|
|
- // mapInfo.map_json = [{ tip: 'K100~101', lng: 123.45, lat: 23.45}];
|
|
|
|
$('#map-name').val(mapInfo.name);
|
|
$('#map-name').val(mapInfo.name);
|
|
$('#map-color').val(mapInfo.color);
|
|
$('#map-color').val(mapInfo.color);
|
|
SpreadJsObj.loadSheetData(mapSpread.getActiveSheet(), SpreadJsObj.DataType.Data, (mapInfo.map_json ? JSON.parse(unescape(escape(mapInfo.map_json))) : []));
|
|
SpreadJsObj.loadSheetData(mapSpread.getActiveSheet(), SpreadJsObj.DataType.Data, (mapInfo.map_json ? JSON.parse(unescape(escape(mapInfo.map_json))) : []));
|
|
@@ -2181,8 +2180,8 @@
|
|
const curRow = info.row;
|
|
const curRow = info.row;
|
|
info.sheet.zh_data[curRow] = {
|
|
info.sheet.zh_data[curRow] = {
|
|
tip: info.sheet.getText(curRow, 0),
|
|
tip: info.sheet.getText(curRow, 0),
|
|
- x: info.sheet.getText(curRow, 1) !== '' ? _.toNumber(info.sheet.getText(curRow, 1)) : '',
|
|
|
|
- y: info.sheet.getText(curRow, 2) !== '' ? _.toNumber(info.sheet.getText(curRow, 2)) : '',
|
|
|
|
|
|
+ lng: info.sheet.getText(curRow, 1) !== '' ? _.toNumber(info.sheet.getText(curRow, 1)) : '',
|
|
|
|
+ lat: info.sheet.getText(curRow, 2) !== '' ? _.toNumber(info.sheet.getText(curRow, 2)) : '',
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -2212,8 +2211,8 @@
|
|
const curRow = range.row + iRow;
|
|
const curRow = range.row + iRow;
|
|
info.sheet.zh_data[curRow] = {
|
|
info.sheet.zh_data[curRow] = {
|
|
tip: info.sheet.getText(curRow, 0),
|
|
tip: info.sheet.getText(curRow, 0),
|
|
- x: info.sheet.getText(curRow, 1) !== '' ? _.toNumber(info.sheet.getText(curRow, 1)) : '',
|
|
|
|
- y: info.sheet.getText(curRow, 2) !== '' ? _.toNumber(info.sheet.getText(curRow, 2)) : '',
|
|
|
|
|
|
+ lng: info.sheet.getText(curRow, 1) !== '' ? _.toNumber(info.sheet.getText(curRow, 1)) : '',
|
|
|
|
+ lat: info.sheet.getText(curRow, 2) !== '' ? _.toNumber(info.sheet.getText(curRow, 2)) : '',
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|