- 新增OperationDashboard.vue全屏大屏组件 - 添加6个核心KPI指标卡片: 进水总量/出水总量/产销差率/营收额/平均水质/报警次数 - 实现6个ECharts图表: 供水趋势/水质分布/报警统计/管网空间/设备状态/营收分析 - 创建静态HTML版本operation-dashboard.html,使用CDN加载Vue3/ECharts/Element Plus - 更新路由配置,添加/operation路径支持 - 修复nextTick导入问题,优化build脚本 🚧 开发者: bot_dev1 📝 任务: #38 [BI] 运营仪表盘 + 供水专题大屏
175 lines
6.5 KiB
JavaScript
175 lines
6.5 KiB
JavaScript
import Frozen from "../Core/Frozen.js";
|
|
import defined from "../Core/defined.js";
|
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
import Event from "../Core/Event.js";
|
|
import createMaterialPropertyDescriptor from "./createMaterialPropertyDescriptor.js";
|
|
import createPropertyDescriptor from "./createPropertyDescriptor.js";
|
|
|
|
/**
|
|
* @typedef {object} PathGraphics.ConstructorOptions
|
|
*
|
|
* Initialization options for the PathGraphics constructor
|
|
*
|
|
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the path.
|
|
* @property {Property | number} [leadTime] A Property specifying the number of seconds in front the object to show.
|
|
* @property {Property | number} [trailTime] A Property specifying the number of seconds behind of the object to show.
|
|
* @property {Property | number} [width=1.0] A numeric Property specifying the width in pixels.
|
|
* @property {Property | number} [resolution=60] A numeric Property specifying the maximum number of seconds to step when sampling the position.
|
|
* @property {MaterialProperty | Color} [material=Color.WHITE] A Property specifying the material used to draw the path.
|
|
* @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this path will be displayed.
|
|
* @property {Property | string} [relativeTo] A Property specifying the frame in which to visualize the path. Use another entity's id to visualize the path relative to that entity, or use the string values "FIXED" or "INERTIAL" to visualize the path in those reference frames.
|
|
*/
|
|
|
|
/**
|
|
* Describes a polyline defined as the path made by an {@link Entity} as it moves over time.
|
|
*
|
|
* @alias PathGraphics
|
|
* @constructor
|
|
*
|
|
* @param {PathGraphics.ConstructorOptions} [options] Object describing initialization options
|
|
*/
|
|
function PathGraphics(options) {
|
|
this._definitionChanged = new Event();
|
|
this._show = undefined;
|
|
this._showSubscription = undefined;
|
|
this._leadTime = undefined;
|
|
this._leadTimeSubscription = undefined;
|
|
this._trailTime = undefined;
|
|
this._trailTimeSubscription = undefined;
|
|
this._width = undefined;
|
|
this._widthSubscription = undefined;
|
|
this._resolution = undefined;
|
|
this._resolutionSubscription = undefined;
|
|
this._material = undefined;
|
|
this._materialSubscription = undefined;
|
|
this._distanceDisplayCondition = undefined;
|
|
this._distanceDisplayConditionSubscription = undefined;
|
|
this._relativeTo = undefined;
|
|
this._relativeToSubscription = undefined;
|
|
|
|
this.merge(options ?? Frozen.EMPTY_OBJECT);
|
|
}
|
|
|
|
Object.defineProperties(PathGraphics.prototype, {
|
|
/**
|
|
* Gets the event that is raised whenever a property or sub-property is changed or modified.
|
|
* @memberof PathGraphics.prototype
|
|
* @type {Event}
|
|
* @readonly
|
|
*/
|
|
definitionChanged: {
|
|
get: function () {
|
|
return this._definitionChanged;
|
|
},
|
|
},
|
|
|
|
/**
|
|
* Gets or sets the boolean Property specifying the visibility of the path.
|
|
* @memberof PathGraphics.prototype
|
|
* @type {Property|undefined}
|
|
* @default true
|
|
*/
|
|
show: createPropertyDescriptor("show"),
|
|
|
|
/**
|
|
* Gets or sets the Property specifying the number of seconds in front of the object to show.
|
|
* @memberof PathGraphics.prototype
|
|
* @type {Property|undefined}
|
|
*/
|
|
leadTime: createPropertyDescriptor("leadTime"),
|
|
|
|
/**
|
|
* Gets or sets the Property specifying the number of seconds behind the object to show.
|
|
* @memberof PathGraphics.prototype
|
|
* @type {Property|undefined}
|
|
*/
|
|
trailTime: createPropertyDescriptor("trailTime"),
|
|
|
|
/**
|
|
* Gets or sets the numeric Property specifying the width in pixels.
|
|
* @memberof PathGraphics.prototype
|
|
* @type {Property|undefined}
|
|
* @default 1.0
|
|
*/
|
|
width: createPropertyDescriptor("width"),
|
|
|
|
/**
|
|
* Gets or sets the Property specifying the maximum number of seconds to step when sampling the position.
|
|
* @memberof PathGraphics.prototype
|
|
* @type {Property|undefined}
|
|
* @default 60
|
|
*/
|
|
resolution: createPropertyDescriptor("resolution"),
|
|
|
|
/**
|
|
* Gets or sets the Property specifying the material used to draw the path.
|
|
* @memberof PathGraphics.prototype
|
|
* @type {MaterialProperty}
|
|
* @default Color.WHITE
|
|
*/
|
|
material: createMaterialPropertyDescriptor("material"),
|
|
|
|
/**
|
|
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this path will be displayed.
|
|
* @memberof PathGraphics.prototype
|
|
* @type {Property|undefined}
|
|
*/
|
|
distanceDisplayCondition: createPropertyDescriptor(
|
|
"distanceDisplayCondition",
|
|
),
|
|
|
|
/**
|
|
* Gets or sets the frame in which to visualize the path. Use another entity's id to visualize the path relative to that entity, or use the string values "FIXED" or "INERTIAL" to visualize the path in those reference frames.
|
|
* @memberof PathGraphics.prototype
|
|
* @type {Property|undefined}
|
|
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
|
|
*/
|
|
relativeTo: createPropertyDescriptor("relativeTo"),
|
|
});
|
|
|
|
/**
|
|
* Duplicates this instance.
|
|
*
|
|
* @param {PathGraphics} [result] The object onto which to store the result.
|
|
* @returns {PathGraphics} The modified result parameter or a new instance if one was not provided.
|
|
*/
|
|
PathGraphics.prototype.clone = function (result) {
|
|
if (!defined(result)) {
|
|
return new PathGraphics(this);
|
|
}
|
|
result.show = this.show;
|
|
result.leadTime = this.leadTime;
|
|
result.trailTime = this.trailTime;
|
|
result.width = this.width;
|
|
result.resolution = this.resolution;
|
|
result.material = this.material;
|
|
result.distanceDisplayCondition = this.distanceDisplayCondition;
|
|
result.relativeTo = this.relativeTo;
|
|
return result;
|
|
};
|
|
|
|
/**
|
|
* Assigns each unassigned property on this object to the value
|
|
* of the same property on the provided source object.
|
|
*
|
|
* @param {PathGraphics} source The object to be merged into this object.
|
|
*/
|
|
PathGraphics.prototype.merge = function (source) {
|
|
//>>includeStart('debug', pragmas.debug);
|
|
if (!defined(source)) {
|
|
throw new DeveloperError("source is required.");
|
|
}
|
|
//>>includeEnd('debug');
|
|
|
|
this.show = this.show ?? source.show;
|
|
this.leadTime = this.leadTime ?? source.leadTime;
|
|
this.trailTime = this.trailTime ?? source.trailTime;
|
|
this.width = this.width ?? source.width;
|
|
this.resolution = this.resolution ?? source.resolution;
|
|
this.material = this.material ?? source.material;
|
|
this.distanceDisplayCondition =
|
|
this.distanceDisplayCondition ?? source.distanceDisplayCondition;
|
|
this.relativeTo = this.relativeTo ?? source.relativeTo;
|
|
};
|
|
export default PathGraphics;
|