feat: 实现供水运营专题大屏BI可视化
- 新增OperationDashboard.vue全屏大屏组件 - 添加6个核心KPI指标卡片: 进水总量/出水总量/产销差率/营收额/平均水质/报警次数 - 实现6个ECharts图表: 供水趋势/水质分布/报警统计/管网空间/设备状态/营收分析 - 创建静态HTML版本operation-dashboard.html,使用CDN加载Vue3/ECharts/Element Plus - 更新路由配置,添加/operation路径支持 - 修复nextTick导入问题,优化build脚本 🚧 开发者: bot_dev1 📝 任务: #38 [BI] 运营仪表盘 + 供水专题大屏
This commit is contained in:
+80
@@ -0,0 +1,80 @@
|
||||
import defined from "../Core/defined.js";
|
||||
import DoublyLinkedList from "../Core/DoublyLinkedList.js";
|
||||
|
||||
/**
|
||||
* Stores tiles with content loaded.
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
function Cesium3DTilesetCache() {
|
||||
// [head, sentinel) -> tiles that weren't selected this frame and may be removed from the cache
|
||||
// (sentinel, tail] -> tiles that were selected this frame
|
||||
this._list = new DoublyLinkedList();
|
||||
this._sentinel = this._list.add();
|
||||
this._trimTiles = false;
|
||||
}
|
||||
|
||||
Cesium3DTilesetCache.prototype.reset = function () {
|
||||
// Move sentinel node to the tail so, at the start of the frame, all tiles
|
||||
// may be potentially replaced. Tiles are moved to the right of the sentinel
|
||||
// when they are selected so they will not be replaced.
|
||||
this._list.splice(this._list.tail, this._sentinel);
|
||||
};
|
||||
|
||||
Cesium3DTilesetCache.prototype.touch = function (tile) {
|
||||
const node = tile.cacheNode;
|
||||
if (defined(node)) {
|
||||
this._list.splice(this._sentinel, node);
|
||||
}
|
||||
};
|
||||
|
||||
Cesium3DTilesetCache.prototype.add = function (tile) {
|
||||
if (!defined(tile.cacheNode)) {
|
||||
tile.cacheNode = this._list.add(tile);
|
||||
}
|
||||
};
|
||||
|
||||
Cesium3DTilesetCache.prototype.unloadTile = function (
|
||||
tileset,
|
||||
tile,
|
||||
unloadCallback,
|
||||
) {
|
||||
const node = tile.cacheNode;
|
||||
if (!defined(node)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._list.remove(node);
|
||||
tile.cacheNode = undefined;
|
||||
unloadCallback(tileset, tile);
|
||||
};
|
||||
|
||||
Cesium3DTilesetCache.prototype.unloadTiles = function (
|
||||
tileset,
|
||||
unloadCallback,
|
||||
) {
|
||||
const trimTiles = this._trimTiles;
|
||||
this._trimTiles = false;
|
||||
|
||||
const list = this._list;
|
||||
|
||||
// Traverse the list only to the sentinel since tiles/nodes to the
|
||||
// right of the sentinel were used this frame.
|
||||
//
|
||||
// The sub-list to the left of the sentinel is ordered from LRU to MRU.
|
||||
const sentinel = this._sentinel;
|
||||
let node = list.head;
|
||||
while (
|
||||
node !== sentinel &&
|
||||
(tileset.totalMemoryUsageInBytes > tileset.cacheBytes || trimTiles)
|
||||
) {
|
||||
const tile = node.item;
|
||||
node = node.next;
|
||||
this.unloadTile(tileset, tile, unloadCallback);
|
||||
}
|
||||
};
|
||||
|
||||
Cesium3DTilesetCache.prototype.trim = function () {
|
||||
this._trimTiles = true;
|
||||
};
|
||||
export default Cesium3DTilesetCache;
|
||||
Reference in New Issue
Block a user