优化:后台新增中心库与习水库大屏一键直达、完善高精度三维标定坐标与引线输出、同步最新大屏静态资源
这个提交包含在:
@@ -151,6 +151,8 @@
|
|||||||
<el-button @click="openAddDialog('add', '')" size="small" type="primary" plain icon="el-icon-plus">添加
|
<el-button @click="openAddDialog('add', '')" size="small" type="primary" plain icon="el-icon-plus">添加
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button icon="el-icon-delete" type="danger" @click="del" size="small" plain>删除</el-button>
|
<el-button icon="el-icon-delete" type="danger" @click="del" size="small" plain>删除</el-button>
|
||||||
|
<el-button icon="el-icon-monitor" type="success" @click="openCenterScreen" size="small" plain>中心库大屏</el-button>
|
||||||
|
<el-button icon="el-icon-data-board" type="warning" @click="openXishuiScreen" size="small" plain>习水库大屏</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -40,7 +40,11 @@ class Index extends Api
|
|||||||
if ($site === 'xishui') {
|
if ($site === 'xishui') {
|
||||||
$query->where('storage', 'like', '%习水%');
|
$query->where('storage', 'like', '%习水%');
|
||||||
} else {
|
} else {
|
||||||
$query->where('storage', 'like', '%中心库%');
|
$query->where(function ($q) {
|
||||||
|
$q->where('storage', 'like', '%中心库%')
|
||||||
|
->whereOr('storage', 'not like', '%习水%')
|
||||||
|
->whereOr('storage', null);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
$list = $query->select();
|
$list = $query->select();
|
||||||
|
|
||||||
@@ -339,50 +343,66 @@ class Index extends Api
|
|||||||
{
|
{
|
||||||
if ($site === 'xishui') {
|
if ($site === 'xishui') {
|
||||||
return [
|
return [
|
||||||
'xishui_1' => ['top' => 45.2, 'left' => 19.8, 'x' => 19.8, 'y' => 45.2],
|
101 => ['top' => 47.5, 'left' => 26.4, 'x' => 26.4, 'y' => 47.5],
|
||||||
'xishui_2' => ['top' => 48.0, 'left' => 26.5, 'x' => 26.5, 'y' => 48.0],
|
102 => ['top' => 48.0, 'left' => 39.6, 'x' => 39.6, 'y' => 48.0],
|
||||||
'xishui_3' => ['top' => 51.5, 'left' => 33.2, 'x' => 33.2, 'y' => 51.5],
|
103 => ['top' => 48.0, 'left' => 60.4, 'x' => 60.4, 'y' => 48.0],
|
||||||
'xishui_4' => ['top' => 54.8, 'left' => 40.0, 'x' => 40.0, 'y' => 54.8],
|
104 => ['top' => 47.5, 'left' => 73.7, 'x' => 73.7, 'y' => 47.5],
|
||||||
'xishui_5' => ['top' => 43.5, 'left' => 47.8, 'x' => 47.8, 'y' => 43.5],
|
105 => ['top' => 33.5, 'left' => 27.0, 'x' => 27.0, 'y' => 33.5],
|
||||||
'xishui_6' => ['top' => 46.5, 'left' => 54.5, 'x' => 54.5, 'y' => 46.5],
|
106 => ['top' => 34.0, 'left' => 39.0, 'x' => 39.0, 'y' => 34.0],
|
||||||
'xishui_7' => ['top' => 49.5, 'left' => 61.2, 'x' => 61.2, 'y' => 49.5],
|
107 => ['top' => 34.0, 'left' => 60.2, 'x' => 60.2, 'y' => 34.0],
|
||||||
'xishui_8' => ['top' => 52.8, 'left' => 68.0, 'x' => 68.0, 'y' => 52.8],
|
108 => ['top' => 33.5, 'left' => 73.2, 'x' => 73.2, 'y' => 33.5],
|
||||||
'xishui_9' => ['top' => 34.0, 'left' => 36.5, 'x' => 36.5, 'y' => 34.0],
|
109 => ['top' => 22.5, 'left' => 55.0, 'x' => 55.0, 'y' => 22.5],
|
||||||
'xishui_10' => ['top' => 33.0, 'left' => 50.0, 'x' => 50.0, 'y' => 33.0],
|
110 => ['top' => 29.0, 'left' => 84.5, 'x' => 84.5, 'y' => 29.0],
|
||||||
'xishui_11' => ['top' => 32.0, 'left' => 63.5, 'x' => 63.5, 'y' => 32.0],
|
111 => ['top' => 47.0, 'left' => 85.5, 'x' => 85.5, 'y' => 47.0],
|
||||||
|
'xishui_1' => ['top' => 47.5, 'left' => 26.4, 'x' => 26.4, 'y' => 47.5],
|
||||||
|
'xishui_2' => ['top' => 48.0, 'left' => 39.6, 'x' => 39.6, 'y' => 48.0],
|
||||||
|
'xishui_3' => ['top' => 48.0, 'left' => 60.4, 'x' => 60.4, 'y' => 48.0],
|
||||||
|
'xishui_4' => ['top' => 47.5, 'left' => 73.7, 'x' => 73.7, 'y' => 47.5],
|
||||||
|
'xishui_5' => ['top' => 33.5, 'left' => 27.0, 'x' => 27.0, 'y' => 33.5],
|
||||||
|
'xishui_6' => ['top' => 34.0, 'left' => 39.0, 'x' => 39.0, 'y' => 34.0],
|
||||||
|
'xishui_7' => ['top' => 34.0, 'left' => 60.2, 'x' => 60.2, 'y' => 34.0],
|
||||||
|
'xishui_8' => ['top' => 33.5, 'left' => 73.2, 'x' => 73.2, 'y' => 33.5],
|
||||||
|
'xishui_9' => ['top' => 22.5, 'left' => 55.0, 'x' => 55.0, 'y' => 22.5],
|
||||||
|
'xishui_10' => ['top' => 29.0, 'left' => 84.5, 'x' => 84.5, 'y' => 29.0],
|
||||||
|
'xishui_11' => ['top' => 47.0, 'left' => 85.5, 'x' => 85.5, 'y' => 47.0],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
$rawCenter = [
|
$rawCenter = [
|
||||||
30 => ['top' => 60.5, 'left' => 12.5],
|
// 7 座立式储油罐 (含高位激光引线 stemY 错层防遮挡)
|
||||||
31 => ['top' => 58.2, 'left' => 18.0],
|
14 => ['top' => 12.8, 'left' => 4.8, 'stemX' => 2.8, 'stemY' => 20.3],
|
||||||
32 => ['top' => 56.0, 'left' => 23.5],
|
18 => ['top' => 18.5, 'left' => 6.5, 'stemY' => 21.0],
|
||||||
33 => ['top' => 53.8, 'left' => 29.0],
|
17 => ['top' => 9.2, 'left' => 9.6, 'stemY' => 18.4],
|
||||||
35 => ['top' => 51.5, 'left' => 34.5],
|
12 => ['top' => 15.8, 'left' => 10.5, 'stemY' => 22.0],
|
||||||
36 => ['top' => 49.2, 'left' => 40.0],
|
16 => ['top' => 12.2, 'left' => 13.7, 'stemY' => 22.4],
|
||||||
37 => ['top' => 47.0, 'left' => 45.5],
|
10 => ['top' => 16.0, 'left' => 16.9, 'stemY' => 23.1],
|
||||||
38 => ['top' => 44.8, 'left' => 51.0],
|
15 => ['top' => 13.0, 'left' => 19.8, 'stemY' => 19.8],
|
||||||
39 => ['top' => 42.5, 'left' => 56.5],
|
// 14 栋粮食平房仓
|
||||||
40 => ['top' => 40.2, 'left' => 62.0],
|
44 => ['top' => 18.7, 'left' => 45.1],
|
||||||
41 => ['top' => 38.0, 'left' => 67.5],
|
43 => ['top' => 33.5, 'left' => 44.0],
|
||||||
42 => ['top' => 35.8, 'left' => 73.0],
|
35 => ['top' => 23.8, 'left' => 38.5],
|
||||||
43 => ['top' => 33.5, 'left' => 78.5],
|
42 => ['top' => 29.9, 'left' => 52.1],
|
||||||
44 => ['top' => 31.2, 'left' => 84.0],
|
36 => ['top' => 28.0, 'left' => 33.8],
|
||||||
10 => ['top' => 75.0, 'left' => 28.0],
|
41 => ['top' => 35.0, 'left' => 65.9],
|
||||||
12 => ['top' => 73.0, 'left' => 35.0],
|
33 => ['top' => 34.5, 'left' => 29.7],
|
||||||
14 => ['top' => 71.0, 'left' => 42.0],
|
37 => ['top' => 41.0, 'left' => 40.0],
|
||||||
15 => ['top' => 69.0, 'left' => 49.0],
|
38 => ['top' => 42.0, 'left' => 59.0],
|
||||||
16 => ['top' => 67.0, 'left' => 56.0],
|
40 => ['top' => 41.0, 'left' => 80.6],
|
||||||
17 => ['top' => 65.0, 'left' => 63.0],
|
39 => ['top' => 49.5, 'left' => 75.8],
|
||||||
18 => ['top' => 63.0, 'left' => 70.0],
|
32 => ['top' => 51.3, 'left' => 56.3],
|
||||||
|
31 => ['top' => 60.2, 'left' => 73.2],
|
||||||
|
30 => ['top' => 61.8, 'left' => 50.5],
|
||||||
];
|
];
|
||||||
$result = [];
|
$result = [];
|
||||||
foreach ($rawCenter as $k => $c) {
|
foreach ($rawCenter as $k => $c) {
|
||||||
$result[$k] = [
|
$row = [
|
||||||
'top' => $c['top'],
|
'top' => $c['top'],
|
||||||
'left' => $c['left'],
|
'left' => $c['left'],
|
||||||
'x' => $c['left'],
|
'x' => $c['left'],
|
||||||
'y' => $c['top']
|
'y' => $c['top']
|
||||||
];
|
];
|
||||||
|
if (isset($c['stemX'])) $row['stemX'] = $c['stemX'];
|
||||||
|
if (isset($c['stemY'])) $row['stemY'] = $c['stemY'];
|
||||||
|
$result[$k] = $row;
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -263,6 +263,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||||||
this.loadData(this.search.keyword, this.currentPage, this.pageSize, this.search.sort);
|
this.loadData(this.search.keyword, this.currentPage, this.pageSize, this.search.sort);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 直达中心库大屏
|
||||||
|
openCenterScreen() {
|
||||||
|
window.open('/screen/index.html', '_blank');
|
||||||
|
},
|
||||||
|
// 直达习水库大屏
|
||||||
|
openXishuiScreen() {
|
||||||
|
window.open('/screen/xishui.html', '_blank');
|
||||||
|
},
|
||||||
// 刷新页面
|
// 刷新页面
|
||||||
refreshPage() {
|
refreshPage() {
|
||||||
this.search = {
|
this.search = {
|
||||||
|
|||||||
@@ -216,8 +216,15 @@ function renderHotspots() {
|
|||||||
container.innerHTML = '';
|
container.innerHTML = '';
|
||||||
|
|
||||||
STATE.list.forEach(item => {
|
STATE.list.forEach(item => {
|
||||||
const coord = hotspotCoords[item.id];
|
const rawCoord = hotspotCoords[item.id] || hotspotCoords[item.num] || hotspotCoords[item.name];
|
||||||
if (!coord) return;
|
if (!rawCoord) return;
|
||||||
|
|
||||||
|
const coord = {
|
||||||
|
x: rawCoord.x !== undefined ? rawCoord.x : (rawCoord.left !== undefined ? rawCoord.left : 50),
|
||||||
|
y: rawCoord.y !== undefined ? rawCoord.y : (rawCoord.top !== undefined ? rawCoord.top : 50),
|
||||||
|
stemX: rawCoord.stemX,
|
||||||
|
stemY: rawCoord.stemY
|
||||||
|
};
|
||||||
|
|
||||||
const isOil = item.isOilTank;
|
const isOil = item.isOilTank;
|
||||||
const isVisible = STATE.filterType === 'all' ||
|
const isVisible = STATE.filterType === 'all' ||
|
||||||
|
|||||||
@@ -34,6 +34,12 @@ export const DESIGN_THEME = {
|
|||||||
if (str.includes('稻') || str.includes('paddy') || str.includes('rice')) {
|
if (str.includes('稻') || str.includes('paddy') || str.includes('rice')) {
|
||||||
return { color: '#10b981', label: '稻谷', type: 'paddy' };
|
return { color: '#10b981', label: '稻谷', type: 'paddy' };
|
||||||
}
|
}
|
||||||
|
if (str.includes('玉米') || str.includes('corn')) {
|
||||||
|
return { color: '#eab308', label: '玉米', type: 'corn' };
|
||||||
|
}
|
||||||
|
if (str.includes('大豆') || str.includes('soybean') || str.includes('bean')) {
|
||||||
|
return { color: '#ca8a04', label: '大豆', type: 'soybean' };
|
||||||
|
}
|
||||||
return { color: '#38bdf8', label: '小麦', type: 'wheat' };
|
return { color: '#38bdf8', label: '小麦', type: 'wheat' };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -948,7 +954,7 @@ export function mapVarietyToForecastType(varietyName) {
|
|||||||
if (!varietyName) return null;
|
if (!varietyName) return null;
|
||||||
const str = String(varietyName).toLowerCase();
|
const str = String(varietyName).toLowerCase();
|
||||||
if (str.includes('油') || str.includes('oil') || str.includes('rapeseed')) return null;
|
if (str.includes('油') || str.includes('oil') || str.includes('rapeseed')) return null;
|
||||||
if (str.includes('麦') || str.includes('wheat')) return 'wheat';
|
if (str.includes('麦') || str.includes('wheat') || str.includes('玉米') || str.includes('corn') || str.includes('高粱')) return 'wheat';
|
||||||
if (str.includes('稻') || str.includes('rice') || str.includes('paddy')) return 'rice';
|
if (str.includes('稻') || str.includes('rice') || str.includes('paddy')) return 'rice';
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -204,8 +204,13 @@ function renderHotspots() {
|
|||||||
container.innerHTML = '';
|
container.innerHTML = '';
|
||||||
|
|
||||||
STATE.list.forEach(item => {
|
STATE.list.forEach(item => {
|
||||||
const coord = hotspotCoords[item.id];
|
const rawCoord = hotspotCoords[item.id] || hotspotCoords[item.num] || hotspotCoords[item.name];
|
||||||
if (!coord) return;
|
if (!rawCoord) return;
|
||||||
|
|
||||||
|
const coord = {
|
||||||
|
x: rawCoord.x !== undefined ? rawCoord.x : (rawCoord.left !== undefined ? rawCoord.left : 50),
|
||||||
|
y: rawCoord.y !== undefined ? rawCoord.y : (rawCoord.top !== undefined ? rawCoord.top : 50)
|
||||||
|
};
|
||||||
|
|
||||||
const isSilo = item.grainTypeCategory === 'silo';
|
const isSilo = item.grainTypeCategory === 'silo';
|
||||||
const isVisible = STATE.filterType === 'all' ||
|
const isVisible = STATE.filterType === 'all' ||
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户