Merge remote-tracking branch 'origin/dev' into dev

pull/3/head
chenxinying 2024-02-29 08:47:15 +08:00
commit 3915c76463
42 changed files with 2014 additions and 1586 deletions

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> <link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<title>危化安全生产管理平台</title> <title>安全生产信息化平台</title>
</head> </head>
<body> <body>

View File

@ -1,31 +1,142 @@
var CustomCesium; var CustomCesium;
(() => { (() => {
"use strict"; "use strict";
var e = { var __webpack_modules__ = {
d: (t, i) => { 117: (__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
for (var r in i) e.o(i, r) && !e.o(t, r) && Object.defineProperty(t, r, {enumerable: !0, get: i[r]}) __webpack_require__.d(__webpack_exports__, {Z: () => Radar});
}, o: (e, t) => Object.prototype.hasOwnProperty.call(e, t), r: e => {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0}) class Radar {
constructor(e) {
this.viewer = e.viewer, this.icy = e, this.entity = null, this.entity1 = null, this.timer = null
} }
}, t = {};
e.r(t), e.d(t, { add(positions, color, coneData, canvas, coneId, billboardId) {
this.entity = this.viewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(positions[0], positions[1], positions[2]),
name: "圆锥",
id: coneId,
cylinder: {
length: coneData.height,
topRadius: 0,
bottomRadius: coneData.width,
disableDepthTestDistance: 5e5,
material: new CircleRippleMaterialProperty({
color: new Cesium.Color.fromCssColorString(color),
speed: 10,
count: 3,
gradient: .5
})
}
});
let imgUrl = new Image;
imgUrl.src = canvas.toDataURL("image/jpg"), imgUrl.style.borderRadius = "20px", this.entity1 = this.viewer.entities.add({
name: "聚集铭牌",
id: billboardId,
position: Cesium.Cartesian3.fromDegrees(positions[0], positions[1], eval(positions[2] + coneData.height / 2)),
billboard: {
image: imgUrl,
show: !0,
sizeInMeters: !1,
scaleByDistance: new Cesium.NearFarScalar(0, .5, 1e7, .5),
// disableDepthTestDistance: Number.POSITIVE_INFINITY,
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
disableDepthTestDistance: 5e5,
scale: 1
}
}), this.animate()
}
animate() {
let e = 0;
this.timer = setInterval((() => {
this.entity1.billboard.scale >= 1.5 ? e = 1 : this.entity1.billboard.scale <= 1 && (e = 0), 0 == e ? this.entity1.billboard.scale += .05 : this.entity1.billboard.scale -= .05
}), 50)
}
show(e) {
this.entity.show = e, this.entity1.show = e, e ? this.animate() : clearInterval(this.timer)
}
destroy() {
clearInterval(this.timer), this.icy.viewer.entities.remove(this.entity), this.entity = void 0, this.icy.viewer.entities.remove(this.entity1), this.entity1 = void 0
}
}
function CircleRippleMaterialProperty(e) {
this._definitionChanged = new Cesium.Event, this._color = void 0, this._speed = void 0, this.color = e.color, this.speed = e.speed, this.count = e.count, this.gradient = e.gradient
}
CircleRippleMaterialProperty.prototype = {
get isConstant() {
return !1
}, get definitionChanged() {
return this._definitionChanged
}, getType: function (e) {
return Cesium.Material.CircleRippleMaterialType
}, getValue: function (e, t) {
return Cesium.defined(t) || (t = {}), t.color = Cesium.Property.getValueOrDefault(this._color, e, Cesium.Color.RED, t.color), t.speed = Cesium.Property.getValueOrDefault(this._speed, e, 10, t.speed), t.count = this.count, t.gradient = this.gradient, t
}, equals: function (e) {
return this === e || e instanceof CircleRippleMaterialProperty && Cesium.Property.equals(this._color, e._color) && Cesium.Property.equals(this._speed, e._speed) && Cesium.Property.equals(this.count, e.count) && Cesium.Property.equals(this.gradient, e.gradient)
}
}, Object.defineProperties(CircleRippleMaterialProperty.prototype, {
color: Cesium.createPropertyDescriptor("color"),
speed: Cesium.createPropertyDescriptor("speed"),
count: Cesium.createPropertyDescriptor("count"),
gradient: Cesium.createPropertyDescriptor("gradient")
}), Cesium.CircleRippleMaterialProperty = CircleRippleMaterialProperty, Cesium.Material.CircleRippleMaterialProperty = "CircleRippleMaterialProperty", Cesium.Material.CircleRippleMaterialType = "CircleRippleMaterialType", Cesium.Material.CircleRippleMaterialSource = "\nuniform vec4 color;\nuniform float speed;\nuniform float count;\nuniform float gradient;\n\nczm_material czm_getMaterial(czm_materialInput materialInput) {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = 1.2 * color.rgb;\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5, 0.5));\n float per = fract(czm_frameNumber * speed / 1000.0);\n if(count == 1.0){\n if(dis > per * 0.5){\n discard;\n }else {\n material.alpha = color.a * dis / per / 2.0;\n }\n } else {\n vec3 str = materialInput.str;\n if(abs(str.z) > 0.001){\n discard;\n }\n if(dis > 0.5){\n discard;\n } else {\n float perDis = 0.5 / count;\n float disNum;\n float bl = 0.0;\n for(int i = 0; i <= 999; i++){\n if(float(i) <= count){\n disNum = perDis * float(i) - dis + per / count;\n if(disNum > 0.0){\n if(disNum < perDis){\n bl = 1.0 - disNum / perDis;\n } else if(disNum - perDis < perDis){\n bl = 1.0 - abs(1.0 - disNum / perDis);\n }\n material.alpha = pow(bl,(1.0 + 10.0 * (1.0 - gradient)));\n }\n }\n }\n }\n }\n return material;\n}\n", Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleRippleMaterialType, {
fabric: {
type: Cesium.Material.CircleRippleMaterialType,
uniforms: {
color: new Cesium.Color.fromCssColorString("#ffffff00"),
speed: 3,
count: 4,
gradient: .2
},
source: Cesium.Material.CircleRippleMaterialSource
}, translucent: function (e) {
return !0
}
})
}
}, __webpack_module_cache__ = {};
function __webpack_require__(e) {
var t = __webpack_module_cache__[e];
if (void 0 !== t) return t.exports;
var i = __webpack_module_cache__[e] = {exports: {}};
return __webpack_modules__[e](i, i.exports, __webpack_require__), i.exports
}
__webpack_require__.d = (e, t) => {
for (var i in t) __webpack_require__.o(t, i) && !__webpack_require__.o(e, i) && Object.defineProperty(e, i, {
enumerable: !0,
get: t[i]
})
}, __webpack_require__.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), __webpack_require__.r = e => {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(e, "__esModule", {value: !0})
};
var __webpack_exports__ = {};
(() => {
__webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
BulletinBoard: () => k, BulletinBoard: () => k,
Carmer: () => s, Carmer: () => r,
EarlyWarning: () => z, Cone: () => z.Z,
EditGltf: () => A, EarlyWarning: () => A,
Enclosure: () => O, EditGltf: () => I,
GroupModel: () => T, Enclosure: () => D,
HumanModel: () => P, GroupModel: () => S,
Line: () => F, HumanModel: () => E,
Model: () => E, Line: () => O,
ModelDrag: () => x, Model: () => M,
Mouse: () => o, ModelDrag: () => b,
Radar: () => L, Mouse: () => s,
Scene: () => n, Radar: () => F,
Tiles3D: () => a Scene: () => i,
Tiles3D: () => n
}); });
class i { class e {
constructor(e) { constructor(e) {
this._definitionChanged = new Cesium.Event, this._color = void 0, this.color = e.color this._definitionChanged = new Cesium.Event, this._color = void 0, this.color = e.color
} }
@ -46,12 +157,12 @@ var CustomCesium;
return Cesium.defined(t) || (t = {}), t.color = Cesium.Property.getValueOrDefault(this._color, e, Cesium.Color.RED, t.color), t return Cesium.defined(t) || (t = {}), t.color = Cesium.Property.getValueOrDefault(this._color, e, Cesium.Color.RED, t.color), t
} }
equals(e) { equals(t) {
return this === e || e instanceof i && Cesium.Property.equals(this._color, e._color) return this === t || t instanceof e && Cesium.Property.equals(this._color, t._color)
} }
} }
class r { class t {
constructor() { constructor() {
} }
@ -73,7 +184,7 @@ var CustomCesium;
Cesium.WebMercatorTilingScheme; Cesium.WebMercatorTilingScheme;
class n { class i {
static google_mapResources = new Cesium.UrlTemplateImageryProvider({ static google_mapResources = new Cesium.UrlTemplateImageryProvider({
url: "https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}", url: "https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
credit: "谷歌影像服务" credit: "谷歌影像服务"
@ -83,8 +194,8 @@ var CustomCesium;
subdomains: ["0", "1", "2", "3"], subdomains: ["0", "1", "2", "3"],
tilingScheme: new Cesium.WebMercatorTilingScheme, tilingScheme: new Cesium.WebMercatorTilingScheme,
customTags: { customTags: {
q: function (e, t, i, n) { q: function (e, i, r, n) {
return r.tileXYToQuadKey(t, i, n) return t.tileXYToQuadKey(i, r, n)
} }
}, },
minimumLevel: 3, minimumLevel: 3,
@ -96,10 +207,10 @@ var CustomCesium;
maximumLevel: 18 maximumLevel: 18
}); });
constructor(e, t, i, r) { constructor(e, t, r, n) {
if (this.icy = {viewer: void 0, name: t}, 1 == i) { if (this.icy = {viewer: void 0, name: t}, 1 == r) {
let t = new Cesium.UrlTemplateImageryProvider({ let t = new Cesium.UrlTemplateImageryProvider({
url: r, url: n,
fileExtension: "png", fileExtension: "png",
minimumLevel: 0, minimumLevel: 0,
maximumLevel: 19, maximumLevel: 19,
@ -107,7 +218,7 @@ var CustomCesium;
}); });
this.init(e, t, 50) this.init(e, t, 50)
} }
2 == i && this.init(e, n.google_mapResources, 50), 3 == i && this.init(e, n.tiandi_mapResources, 50), 4 == i && this.init(e, n.gaode_mapResources, 50), 5 == i && this.init(e, void 0, 50) 2 == r && this.init(e, i.google_mapResources, 50), 3 == r && this.init(e, i.tiandi_mapResources, 50), 4 == r && this.init(e, i.gaode_mapResources, 50), 5 == r && this.init(e, void 0, 50)
} }
getIcy() { getIcy() {
@ -138,7 +249,7 @@ var CustomCesium;
} }
initMaterial() { initMaterial() {
Cesium.WallDiffuseMaterialProperty || (Object.defineProperties(i.prototype, {color: Cesium.createPropertyDescriptor("color")}), Cesium.WallDiffuseMaterialProperty = i, Cesium.Material.WallDiffuseMaterialProperty = "WallDiffuseMaterialProperty", Cesium.Material.WallDiffuseMaterialType = "WallDiffuseMaterialType", Cesium.Material.WallDiffuseMaterialSource = "\n uniform vec4 color;\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n material.diffuse = color.rgb * 2.0;\n material.alpha = color.a * (1.0 - fract(st.t)) * 0.8;\n return material;\n } \n ", Cesium.Material._materialCache.addMaterial(Cesium.Material.WallDiffuseMaterialType, { Cesium.WallDiffuseMaterialProperty || (Object.defineProperties(e.prototype, {color: Cesium.createPropertyDescriptor("color")}), Cesium.WallDiffuseMaterialProperty = e, Cesium.Material.WallDiffuseMaterialProperty = "WallDiffuseMaterialProperty", Cesium.Material.WallDiffuseMaterialType = "WallDiffuseMaterialType", Cesium.Material.WallDiffuseMaterialSource = "\n uniform vec4 color;\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n material.diffuse = color.rgb * 2.0;\n material.alpha = color.a * (1.0 - fract(st.t)) * 0.8;\n return material;\n } \n ", Cesium.Material._materialCache.addMaterial(Cesium.Material.WallDiffuseMaterialType, {
fabric: { fabric: {
type: Cesium.Material.WallDiffuseMaterialType, type: Cesium.Material.WallDiffuseMaterialType,
uniforms: {color: new Cesium.Color(1, 0, 0, 1)}, uniforms: {color: new Cesium.Color(1, 0, 0, 1)},
@ -150,7 +261,7 @@ var CustomCesium;
} }
} }
class s { class r {
constructor(e) { constructor(e) {
this.icy = e this.icy = e
} }
@ -197,8 +308,8 @@ var CustomCesium;
getgGsture() { getgGsture() {
console.log("当前相机姿态输出"); console.log("当前相机姿态输出");
let e = this.icy.viewer.camera.heading, t = this.icy.viewer.camera.pitch, i = this.icy.viewer.camera.roll, let e = this.icy.viewer.camera.heading, t = this.icy.viewer.camera.pitch,
r = this.icy.viewer.camera.positionWC; i = this.icy.viewer.camera.roll, r = this.icy.viewer.camera.positionWC;
console.log(`destination:{x:${r.x},y:${r.y},z:${r.z}},orientation:{heading:${e},pitch:${t},roll:${i}}`) console.log(`destination:{x:${r.x},y:${r.y},z:${r.z}},orientation:{heading:${e},pitch:${t},roll:${i}}`)
} }
@ -244,7 +355,7 @@ var CustomCesium;
} }
} }
class a { class n {
constructor(e, t, i = 0) { constructor(e, t, i = 0) {
this.icy = e, this.tileset = e.viewer.scene.primitives.add(new Cesium.Cesium3DTileset({ this.icy = e, this.tileset = e.viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: t, url: t,
@ -275,7 +386,7 @@ var CustomCesium;
} }
} }
class o { class s {
constructor(e) { constructor(e) {
this.icy = e, this.billboard = void 0 this.icy = e, this.billboard = void 0
} }
@ -297,9 +408,9 @@ var CustomCesium;
altitude: Number(o.toFixed(5)) altitude: Number(o.toFixed(5))
}; };
console.log("鼠标获取经纬高", s, a, o, l); console.log("鼠标获取经纬高", s, a, o, l);
let h = this.icy.viewer.scene.pick(t.position); let u = this.icy.viewer.scene.pick(t.position);
if (console.log(h), !h) return console.log("pick为空"), this.icy.viewer.scene.globe.translucency.enabled = !0, void (this.icy.viewer.scene.globe.translucency.frontFaceAlpha = 1); if (console.log(u), !u) return console.log("pick为空"), this.icy.viewer.scene.globe.translucency.enabled = !0, void (this.icy.viewer.scene.globe.translucency.frontFaceAlpha = 1);
e(h.id) e(u.id)
}), Cesium.ScreenSpaceEventType.LEFT_CLICK) }), Cesium.ScreenSpaceEventType.LEFT_CLICK)
} }
@ -327,7 +438,7 @@ var CustomCesium;
} }
} }
var l, h = Object.freeze({ var a, o = Object.freeze({
Linear: Object.freeze({ Linear: Object.freeze({
None: function (e) { None: function (e) {
return e return e
@ -415,11 +526,11 @@ var CustomCesium;
} }
}), Bounce: Object.freeze({ }), Bounce: Object.freeze({
In: function (e) { In: function (e) {
return 1 - h.Bounce.Out(1 - e) return 1 - o.Bounce.Out(1 - e)
}, Out: function (e) { }, Out: function (e) {
return e < 1 / 2.75 ? 7.5625 * e * e : e < 2 / 2.75 ? 7.5625 * (e -= 1.5 / 2.75) * e + .75 : e < 2.5 / 2.75 ? 7.5625 * (e -= 2.25 / 2.75) * e + .9375 : 7.5625 * (e -= 2.625 / 2.75) * e + .984375 return e < 1 / 2.75 ? 7.5625 * e * e : e < 2 / 2.75 ? 7.5625 * (e -= 1.5 / 2.75) * e + .75 : e < 2.5 / 2.75 ? 7.5625 * (e -= 2.25 / 2.75) * e + .9375 : 7.5625 * (e -= 2.625 / 2.75) * e + .984375
}, InOut: function (e) { }, InOut: function (e) {
return e < .5 ? .5 * h.Bounce.In(2 * e) : .5 * h.Bounce.Out(2 * e - 1) + .5 return e < .5 ? .5 * o.Bounce.In(2 * e) : .5 * o.Bounce.Out(2 * e - 1) + .5
} }
}), generatePow: function (e) { }), generatePow: function (e) {
return void 0 === e && (e = 4), e = (e = e < Number.EPSILON ? Number.EPSILON : e) > 1e4 ? 1e4 : e, { return void 0 === e && (e = 4), e = (e = e < Number.EPSILON ? Number.EPSILON : e) > 1e4 ? 1e4 : e, {
@ -432,12 +543,12 @@ var CustomCesium;
} }
} }
} }
}), u = "undefined" == typeof self && "undefined" != typeof process && process.hrtime ? function () { }), l = "undefined" == typeof self && "undefined" != typeof process && process.hrtime ? function () {
var e = process.hrtime(); var e = process.hrtime();
return 1e3 * e[0] + e[1] / 1e6 return 1e3 * e[0] + e[1] / 1e6
} : "undefined" != typeof self && void 0 !== self.performance && void 0 !== self.performance.now ? self.performance.now.bind(self.performance) : void 0 !== Date.now ? Date.now : function () { } : "undefined" != typeof self && void 0 !== self.performance && void 0 !== self.performance.now ? self.performance.now.bind(self.performance) : void 0 !== Date.now ? Date.now : function () {
return (new Date).getTime() return (new Date).getTime()
}, c = function () { }, u = function () {
function e() { function e() {
this._tweens = {}, this._tweensAddedDuringUpdate = {} this._tweens = {}, this._tweensAddedDuringUpdate = {}
} }
@ -454,7 +565,7 @@ var CustomCesium;
}, e.prototype.remove = function (e) { }, e.prototype.remove = function (e) {
delete this._tweens[e.getId()], delete this._tweensAddedDuringUpdate[e.getId()] delete this._tweens[e.getId()], delete this._tweensAddedDuringUpdate[e.getId()]
}, e.prototype.update = function (e, t) { }, e.prototype.update = function (e, t) {
void 0 === e && (e = u()), void 0 === t && (t = !1); void 0 === e && (e = l()), void 0 === t && (t = !1);
var i = Object.keys(this._tweens); var i = Object.keys(this._tweens);
if (0 === i.length) return !1; if (0 === i.length) return !1;
for (; i.length > 0;) { for (; i.length > 0;) {
@ -467,42 +578,42 @@ var CustomCesium;
} }
return !0 return !0
}, e }, e
}(), m = { }(), c = {
Linear: function (e, t) { Linear: function (e, t) {
var i = e.length - 1, r = i * t, n = Math.floor(r), s = m.Utils.Linear; var i = e.length - 1, r = i * t, n = Math.floor(r), s = c.Utils.Linear;
return t < 0 ? s(e[0], e[1], r) : t > 1 ? s(e[i], e[i - 1], i - r) : s(e[n], e[n + 1 > i ? i : n + 1], r - n) return t < 0 ? s(e[0], e[1], r) : t > 1 ? s(e[i], e[i - 1], i - r) : s(e[n], e[n + 1 > i ? i : n + 1], r - n)
}, Bezier: function (e, t) { }, Bezier: function (e, t) {
for (var i = 0, r = e.length - 1, n = Math.pow, s = m.Utils.Bernstein, a = 0; a <= r; a++) i += n(1 - t, r - a) * n(t, a) * e[a] * s(r, a); for (var i = 0, r = e.length - 1, n = Math.pow, s = c.Utils.Bernstein, a = 0; a <= r; a++) i += n(1 - t, r - a) * n(t, a) * e[a] * s(r, a);
return i return i
}, CatmullRom: function (e, t) { }, CatmullRom: function (e, t) {
var i = e.length - 1, r = i * t, n = Math.floor(r), s = m.Utils.CatmullRom; var i = e.length - 1, r = i * t, n = Math.floor(r), s = c.Utils.CatmullRom;
return e[0] === e[i] ? (t < 0 && (n = Math.floor(r = i * (1 + t))), s(e[(n - 1 + i) % i], e[n], e[(n + 1) % i], e[(n + 2) % i], r - n)) : t < 0 ? e[0] - (s(e[0], e[0], e[1], e[1], -r) - e[0]) : t > 1 ? e[i] - (s(e[i], e[i], e[i - 1], e[i - 1], r - i) - e[i]) : s(e[n ? n - 1 : 0], e[n], e[i < n + 1 ? i : n + 1], e[i < n + 2 ? i : n + 2], r - n) return e[0] === e[i] ? (t < 0 && (n = Math.floor(r = i * (1 + t))), s(e[(n - 1 + i) % i], e[n], e[(n + 1) % i], e[(n + 2) % i], r - n)) : t < 0 ? e[0] - (s(e[0], e[0], e[1], e[1], -r) - e[0]) : t > 1 ? e[i] - (s(e[i], e[i], e[i - 1], e[i - 1], r - i) - e[i]) : s(e[n ? n - 1 : 0], e[n], e[i < n + 1 ? i : n + 1], e[i < n + 2 ? i : n + 2], r - n)
}, Utils: { }, Utils: {
Linear: function (e, t, i) { Linear: function (e, t, i) {
return (t - e) * i + e return (t - e) * i + e
}, Bernstein: function (e, t) { }, Bernstein: function (e, t) {
var i = m.Utils.Factorial; var i = c.Utils.Factorial;
return i(e) / i(t) / i(e - t) return i(e) / i(t) / i(e - t)
}, Factorial: (l = [1], function (e) { }, Factorial: (a = [1], function (e) {
var t = 1; var t = 1;
if (l[e]) return l[e]; if (a[e]) return a[e];
for (var i = e; i > 1; i--) t *= i; for (var i = e; i > 1; i--) t *= i;
return l[e] = t, t return a[e] = t, t
}), CatmullRom: function (e, t, i, r, n) { }), CatmullRom: function (e, t, i, r, n) {
var s = .5 * (i - e), a = .5 * (r - t), o = n * n; var s = .5 * (i - e), a = .5 * (r - t), o = n * n;
return (2 * t - 2 * i + s + a) * (n * o) + (-3 * t + 3 * i - 2 * s - a) * o + s * n + t return (2 * t - 2 * i + s + a) * (n * o) + (-3 * t + 3 * i - 2 * s - a) * o + s * n + t
} }
} }
}, d = function () { }, h = function () {
function e() { function e() {
} }
return e.nextId = function () { return e.nextId = function () {
return e._nextId++ return e._nextId++
}, e._nextId = 0, e }, e._nextId = 0, e
}(), p = new c, C = function () { }(), m = new u, d = function () {
function e(e, t) { function e(e, t) {
void 0 === t && (t = p), this._object = e, this._group = t, this._isPaused = !1, this._pauseStart = 0, this._valuesStart = {}, this._valuesEnd = {}, this._valuesStartRepeat = {}, this._duration = 1e3, this._initialRepeat = 0, this._repeat = 0, this._yoyo = !1, this._isPlaying = !1, this._reversed = !1, this._delayTime = 0, this._startTime = 0, this._easingFunction = h.Linear.None, this._interpolationFunction = m.Linear, this._chainedTweens = [], this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._id = d.nextId(), this._isChainStopped = !1, this._goToEnd = !1 void 0 === t && (t = m), this._object = e, this._group = t, this._isPaused = !1, this._pauseStart = 0, this._valuesStart = {}, this._valuesEnd = {}, this._valuesStartRepeat = {}, this._duration = 1e3, this._initialRepeat = 0, this._repeat = 0, this._yoyo = !1, this._isPlaying = !1, this._reversed = !1, this._delayTime = 0, this._startTime = 0, this._easingFunction = o.Linear.None, this._interpolationFunction = c.Linear, this._chainedTweens = [], this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._id = h.nextId(), this._isChainStopped = !1, this._goToEnd = !1
} }
return e.prototype.getId = function () { return e.prototype.getId = function () {
@ -516,22 +627,22 @@ var CustomCesium;
}, e.prototype.duration = function (e) { }, e.prototype.duration = function (e) {
return void 0 === e && (e = 1e3), this._duration = e, this return void 0 === e && (e = 1e3), this._duration = e, this
}, e.prototype.start = function (e, t) { }, e.prototype.start = function (e, t) {
if (void 0 === e && (e = u()), void 0 === t && (t = !1), this._isPlaying) return this; if (void 0 === e && (e = l()), void 0 === t && (t = !1), this._isPlaying) return this;
if (this._group && this._group.add(this), this._repeat = this._initialRepeat, this._reversed) for (var i in this._reversed = !1, this._valuesStartRepeat) this._swapEndStartRepeatValues(i), this._valuesStart[i] = this._valuesStartRepeat[i]; if (this._group && this._group.add(this), this._repeat = this._initialRepeat, this._reversed) for (var i in this._reversed = !1, this._valuesStartRepeat) this._swapEndStartRepeatValues(i), this._valuesStart[i] = this._valuesStartRepeat[i];
return this._isPlaying = !0, this._isPaused = !1, this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._isChainStopped = !1, this._startTime = e, this._startTime += this._delayTime, this._setupProperties(this._object, this._valuesStart, this._valuesEnd, this._valuesStartRepeat, t), this return this._isPlaying = !0, this._isPaused = !1, this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._isChainStopped = !1, this._startTime = e, this._startTime += this._delayTime, this._setupProperties(this._object, this._valuesStart, this._valuesEnd, this._valuesStartRepeat, t), this
}, e.prototype.startFromCurrentValues = function (e) { }, e.prototype.startFromCurrentValues = function (e) {
return this.start(e, !0) return this.start(e, !0)
}, e.prototype._setupProperties = function (e, t, i, r, n) { }, e.prototype._setupProperties = function (e, t, i, r, n) {
for (var s in i) { for (var s in i) {
var a = e[s], o = Array.isArray(a), l = o ? "array" : typeof a, h = !o && Array.isArray(i[s]); var a = e[s], o = Array.isArray(a), l = o ? "array" : typeof a, u = !o && Array.isArray(i[s]);
if ("undefined" !== l && "function" !== l) { if ("undefined" !== l && "function" !== l) {
if (h) { if (u) {
var u = i[s]; var c = i[s];
if (0 === u.length) continue; if (0 === c.length) continue;
u = u.map(this._handleRelativeValue.bind(this, a)), void 0 === t[s] && (i[s] = [a].concat(u)) c = c.map(this._handleRelativeValue.bind(this, a)), void 0 === t[s] && (i[s] = [a].concat(c))
} }
if ("object" !== l && !o || !a || h) (void 0 === t[s] || n) && (t[s] = a), o || (t[s] *= 1), r[s] = h ? i[s].slice().reverse() : t[s] || 0; else { if ("object" !== l && !o || !a || u) (void 0 === t[s] || n) && (t[s] = a), o || (t[s] *= 1), r[s] = u ? i[s].slice().reverse() : t[s] || 0; else {
for (var c in t[s] = o ? [] : {}, a) t[s][c] = a[c]; for (var h in t[s] = o ? [] : {}, a) t[s][h] = a[h];
r[s] = o ? [] : {}, this._setupProperties(a, t[s], i[s], r[s], n) r[s] = o ? [] : {}, this._setupProperties(a, t[s], i[s], r[s], n)
} }
} }
@ -541,14 +652,14 @@ var CustomCesium;
}, e.prototype.end = function () { }, e.prototype.end = function () {
return this._goToEnd = !0, this.update(1 / 0), this return this._goToEnd = !0, this.update(1 / 0), this
}, e.prototype.pause = function (e) { }, e.prototype.pause = function (e) {
return void 0 === e && (e = u()), this._isPaused || !this._isPlaying || (this._isPaused = !0, this._pauseStart = e, this._group && this._group.remove(this)), this return void 0 === e && (e = l()), this._isPaused || !this._isPlaying || (this._isPaused = !0, this._pauseStart = e, this._group && this._group.remove(this)), this
}, e.prototype.resume = function (e) { }, e.prototype.resume = function (e) {
return void 0 === e && (e = u()), this._isPaused && this._isPlaying ? (this._isPaused = !1, this._startTime += e - this._pauseStart, this._pauseStart = 0, this._group && this._group.add(this), this) : this return void 0 === e && (e = l()), this._isPaused && this._isPlaying ? (this._isPaused = !1, this._startTime += e - this._pauseStart, this._pauseStart = 0, this._group && this._group.add(this), this) : this
}, e.prototype.stopChainedTweens = function () { }, e.prototype.stopChainedTweens = function () {
for (var e = 0, t = this._chainedTweens.length; e < t; e++) this._chainedTweens[e].stop(); for (var e = 0, t = this._chainedTweens.length; e < t; e++) this._chainedTweens[e].stop();
return this return this
}, e.prototype.group = function (e) { }, e.prototype.group = function (e) {
return void 0 === e && (e = p), this._group = e, this return void 0 === e && (e = m), this._group = e, this
}, e.prototype.delay = function (e) { }, e.prototype.delay = function (e) {
return void 0 === e && (e = 0), this._delayTime = e, this return void 0 === e && (e = 0), this._delayTime = e, this
}, e.prototype.repeat = function (e) { }, e.prototype.repeat = function (e) {
@ -558,9 +669,9 @@ var CustomCesium;
}, e.prototype.yoyo = function (e) { }, e.prototype.yoyo = function (e) {
return void 0 === e && (e = !1), this._yoyo = e, this return void 0 === e && (e = !1), this._yoyo = e, this
}, e.prototype.easing = function (e) { }, e.prototype.easing = function (e) {
return void 0 === e && (e = h.Linear.None), this._easingFunction = e, this return void 0 === e && (e = o.Linear.None), this._easingFunction = e, this
}, e.prototype.interpolation = function (e) { }, e.prototype.interpolation = function (e) {
return void 0 === e && (e = m.Linear), this._interpolationFunction = e, this return void 0 === e && (e = c.Linear), this._interpolationFunction = e, this
}, e.prototype.chain = function () { }, e.prototype.chain = function () {
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t]; for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
return this._chainedTweens = e, this return this._chainedTweens = e, this
@ -577,7 +688,7 @@ var CustomCesium;
}, e.prototype.onStop = function (e) { }, e.prototype.onStop = function (e) {
return this._onStopCallback = e, this return this._onStopCallback = e, this
}, e.prototype.update = function (e, t) { }, e.prototype.update = function (e, t) {
if (void 0 === e && (e = u()), void 0 === t && (t = !0), this._isPaused) return !0; if (void 0 === e && (e = l()), void 0 === t && (t = !0), this._isPaused) return !0;
var i, r, n = this._startTime + this._duration; var i, r, n = this._startTime + this._duration;
if (!this._goToEnd && !this._isPlaying) { if (!this._goToEnd && !this._isPlaying) {
if (e > n) return !1; if (e > n) return !1;
@ -607,25 +718,25 @@ var CustomCesium;
var t = this._valuesStartRepeat[e], i = this._valuesEnd[e]; var t = this._valuesStartRepeat[e], i = this._valuesEnd[e];
this._valuesStartRepeat[e] = "string" == typeof i ? this._valuesStartRepeat[e] + parseFloat(i) : this._valuesEnd[e], this._valuesEnd[e] = t this._valuesStartRepeat[e] = "string" == typeof i ? this._valuesStartRepeat[e] + parseFloat(i) : this._valuesEnd[e], this._valuesEnd[e] = t
}, e }, e
}(), g = d.nextId, f = p, y = f.getAll.bind(f), _ = f.removeAll.bind(f), v = f.add.bind(f), w = f.remove.bind(f), }(), p = h.nextId, C = m, _ = C.getAll.bind(C), g = C.removeAll.bind(C), f = C.add.bind(C),
M = f.update.bind(f); y = C.remove.bind(C), v = C.update.bind(C);
const S = { const w = {
Easing: h, Easing: o,
Group: c, Group: u,
Interpolation: m, Interpolation: c,
now: u, now: l,
Sequence: d, Sequence: h,
nextId: g, nextId: p,
Tween: C, Tween: d,
VERSION: "19.0.0", VERSION: "19.0.0",
getAll: y, getAll: _,
removeAll: _, removeAll: g,
add: v, add: f,
remove: w, remove: y,
update: M update: v
}; };
class E { class M {
static FileUrl = "../public/models/huaxing/glb/"; static FileUrl = "../public/models/huaxing/glb/";
static nameShow(e, t) { static nameShow(e, t) {
@ -636,22 +747,22 @@ var CustomCesium;
static { static {
function e() { function e() {
S.update(), requestAnimationFrame(e) w.update(), requestAnimationFrame(e)
} }
e() e()
} }
constructor(e, {url: t, height: i, lon: r, lat: n, id: s, name: a, scale: o, angle: l}, h) { constructor(e, {url: t, height: i, lon: r, lat: n, id: s, name: a, scale: o, angle: l}, u) {
if (this.icy = e, !t && !h) return console.error("传参有问题"); if (this.icy = e, !t && !u) return console.error("传参有问题");
o = o || 1, i = i || 0, r = r || 116.28678152222574, n = n || 40.05185885026265; o = o || 1, i = i || 0, r = r || 116.28678152222574, n = n || 40.05185885026265;
let u = Cesium.Cartesian3.fromDegrees(r, n, i), c = Cesium.Math.toRadians(l[0]), let c = Cesium.Cartesian3.fromDegrees(r, n, i), h = Cesium.Math.toRadians(l[0]),
m = Cesium.Math.toRadians(l[1]), d = Cesium.Math.toRadians(l[2]), m = Cesium.Math.toRadians(l[1]), d = Cesium.Math.toRadians(l[2]),
p = new Cesium.HeadingPitchRoll(c, m, d), C = Cesium.Transforms.headingPitchRollQuaternion(u, p); p = new Cesium.HeadingPitchRoll(h, m, d), C = Cesium.Transforms.headingPitchRollQuaternion(c, p);
this.entity = t ? e.viewer.entities.add({ this.entity = t ? e.viewer.entities.add({
id: s, id: s,
name: a, name: a,
position: u, position: c,
orientation: C, orientation: C,
model: {uri: t, scale: o, color: new Cesium.Color(1, 1, 1, 1)}, model: {uri: t, scale: o, color: new Cesium.Color(1, 1, 1, 1)},
runAnimations: !1, runAnimations: !1,
@ -662,9 +773,9 @@ var CustomCesium;
}) : e.viewer.entities.add({ }) : e.viewer.entities.add({
id: s, id: s,
name: a, name: a,
position: u, position: c,
orientation: C, orientation: C,
model: h, model: u,
runAnimations: !1, runAnimations: !1,
incrementallyLoadTextures: !1, incrementallyLoadTextures: !1,
colorBlendMode: Cesium.ColorBlendMode.MIX, colorBlendMode: Cesium.ColorBlendMode.MIX,
@ -680,8 +791,8 @@ var CustomCesium;
move({lon: e, lat: t, height: i, angle: r}) { move({lon: e, lat: t, height: i, angle: r}) {
let n = Cesium.Cartesian3.fromDegrees(e, t, i), s = Cesium.Math.toRadians(r[0]), let n = Cesium.Cartesian3.fromDegrees(e, t, i), s = Cesium.Math.toRadians(r[0]),
a = Cesium.Math.toRadians(r[1]), o = Cesium.Math.toRadians(r[2]), a = Cesium.Math.toRadians(r[1]), o = Cesium.Math.toRadians(r[2]),
l = new Cesium.HeadingPitchRoll(s, a, o), h = Cesium.Transforms.headingPitchRollQuaternion(n, l); l = new Cesium.HeadingPitchRoll(s, a, o), u = Cesium.Transforms.headingPitchRollQuaternion(n, l);
this.entity.position = n, this.entity.orientation = h this.entity.position = n, this.entity.orientation = u
} }
updateAngle(e) { updateAngle(e) {
@ -691,14 +802,16 @@ var CustomCesium;
this.entity.orientation = a this.entity.orientation = a
} }
animationMove(e, t, i, n, s) { animationMove(e, i, r, n, s) {
if (!this.entity) throw"还没有对象呢!!"; if (!this.entity) throw"还没有对象呢!!";
let a = this.entity.position, o = Cesium.Cartesian3.fromDegrees(e, t, i), let a = this.entity.position, o = Cesium.Cartesian3.fromDegrees(e, i, r),
l = new S.Tween({x: a._value.x, y: a._value.y, z: a._value.z}); l = new w.Tween({x: a._value.x, y: a._value.y, z: a._value.z});
l.to({x: o.x, y: o.y, z: o.z}, n), l.onUpdate((({x: e, y: t, z: i}) => { l.to({x: o.x, y: o.y, z: o.z}, n), l.onUpdate((({x: e, y: i, z: r}) => {
let n = new Cesium.Cartesian3(e, t, i); let n = new Cesium.Cartesian3(e, i, r);
if(this.entity){
this.entity.position = n; this.entity.position = n;
let a = r.Cartesian3ToWGS84(this.icy.viewer, n); }
let a = t.Cartesian3ToWGS84(this.icy.viewer, n);
s(a) s(a)
})), l.start() })), l.start()
} }
@ -724,16 +837,16 @@ var CustomCesium;
} }
} }
class x { class b {
static FileUrl = "../public/models/huaxing/glb/"; static FileUrl = "../public/models/huaxing/glb/";
constructor(e, {url: t, height: i, lon: r, lat: n, id: s, name: a, scale: o, angle: l}, h) { constructor(e, {url: t, height: i, lon: r, lat: n, id: s, name: a, scale: o, angle: l}, u) {
if (this.icy = e, !t && !h) return console.error("传参有问题"); if (this.icy = e, !t && !u) return console.error("传参有问题");
o = o || 1, i = i || 0, r = r || 116.28678152222574, n = n || 40.05185885026265; o = o || 1, i = i || 0, r = r || 116.28678152222574, n = n || 40.05185885026265;
let u = Cesium.Cartesian3.fromDegrees(r, n, i); let c = Cesium.Cartesian3.fromDegrees(r, n, i);
var c = Cesium.Math.toRadians(l[0]), m = Cesium.Math.toRadians(l[1]), d = Cesium.Math.toRadians(l[2]), var h = Cesium.Math.toRadians(l[0]), m = Cesium.Math.toRadians(l[1]), d = Cesium.Math.toRadians(l[2]),
p = new Cesium.HeadingPitchRoll(c, m, d); p = new Cesium.HeadingPitchRoll(h, m, d);
let C = Cesium.Transforms.headingPitchRollToFixedFrame(u, p, Cesium.Ellipsoid.WGS84, Cesium.Transforms.eastNorthUpToFixedFrame, new Cesium.Matrix4); let C = Cesium.Transforms.headingPitchRollToFixedFrame(c, p, Cesium.Ellipsoid.WGS84, Cesium.Transforms.eastNorthUpToFixedFrame, new Cesium.Matrix4);
this.entity = e.viewer.scene.primitives.add(Cesium.Model.fromGltf({ this.entity = e.viewer.scene.primitives.add(Cesium.Model.fromGltf({
url: t, url: t,
color: Cesium.Color.WHITE, color: Cesium.Color.WHITE,
@ -758,13 +871,13 @@ var CustomCesium;
let a = e; let a = e;
var o = Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Matrix4.getTranslation(a, new Cesium.Cartesian3), Cesium.Ellipsoid.WGS84, new Cesium.Matrix4), var o = Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Matrix4.getTranslation(a, new Cesium.Cartesian3), Cesium.Ellipsoid.WGS84, new Cesium.Matrix4),
l = Cesium.Matrix4.multiply(Cesium.Matrix4.inverse(o, new Cesium.Matrix4), a, new Cesium.Matrix4), l = Cesium.Matrix4.multiply(Cesium.Matrix4.inverse(o, new Cesium.Matrix4), a, new Cesium.Matrix4),
h = Cesium.Matrix4.getMatrix3(l, new Cesium.Matrix3), u = Cesium.Quaternion.fromRotationMatrix(h), u = Cesium.Matrix4.getMatrix3(l, new Cesium.Matrix3), c = Cesium.Quaternion.fromRotationMatrix(u),
c = Cesium.HeadingPitchRoll.fromQuaternion(u); h = Cesium.HeadingPitchRoll.fromQuaternion(c);
return { return {
lng: n, lng: n,
lat: r, lat: r,
alt: s, alt: s,
angle: [Cesium.Math.toDegrees(c.heading), Cesium.Math.toDegrees(c.pitch), Cesium.Math.toDegrees(c.roll)] angle: [Cesium.Math.toDegrees(h.heading), Cesium.Math.toDegrees(h.pitch), Cesium.Math.toDegrees(h.roll)]
} }
} }
@ -777,7 +890,7 @@ var CustomCesium;
} }
} }
class T { class S {
constructor(e) { constructor(e) {
this.name = e, this.children = [] this.name = e, this.children = []
} }
@ -806,17 +919,17 @@ var CustomCesium;
} }
} }
class P extends E { class E extends M {
static PERSON_BLUE = {url: E.FileUrl + "person_000002_blue.gltf"}; static PERSON_BLUE = {url: M.FileUrl + "person_000002_blue.gltf"};
static PERSON_BLUE_FAT = {url: E.FileUrl + "person_000002_blue_fat.gltf"}; static PERSON_BLUE_FAT = {url: M.FileUrl + "person_000002_blue_fat.gltf"};
static PERSON_GREEN = {url: E.FileUrl + "person_000002_green.gltf"}; static PERSON_GREEN = {url: M.FileUrl + "person_000002_green.gltf"};
static PERSON_GREEN_FAT = {url: E.FileUrl + "person_000002_green_fat.gltf"}; static PERSON_GREEN_FAT = {url: M.FileUrl + "person_000002_green_fat.gltf"};
static PERSON_RED = {url: E.FileUrl + "person_000002_red.gltf"}; static PERSON_RED = {url: M.FileUrl + "person_000002_red.gltf"};
static PERSON_RED_FAT = {url: E.FileUrl + "person_000002_red_fat.gltf"}; static PERSON_RED_FAT = {url: M.FileUrl + "person_000002_red_fat.gltf"};
static PERSON_WHITE = {url: E.FileUrl + "person_000002_white.gltf"}; static PERSON_WHITE = {url: M.FileUrl + "person_000002_white.gltf"};
static PERSON_WHITE_FAT = {url: E.FileUrl + "person_000002_white_fat.gltf"}; static PERSON_WHITE_FAT = {url: M.FileUrl + "person_000002_white_fat.gltf"};
static PERSON_YELLOW = {url: E.FileUrl + "person_000002_yellow.gltf"}; static PERSON_YELLOW = {url: M.FileUrl + "person_000002_yellow.gltf"};
static PERSON_YELLOW_FAT = {url: E.FileUrl + "person_000002_yellow_fat.gltf"}; static PERSON_YELLOW_FAT = {url: M.FileUrl + "person_000002_yellow_fat.gltf"};
constructor(e, t, {lon: i, lat: r, id: n, name: s, scale: a, angle: o, height: l}) { constructor(e, t, {lon: i, lat: r, id: n, name: s, scale: a, angle: o, height: l}) {
super(e, {url: t.url, height: l, lon: i, lat: r, id: n, name: s, scale: a, angle: o}) super(e, {url: t.url, height: l, lon: i, lat: r, id: n, name: s, scale: a, angle: o})
@ -826,16 +939,17 @@ var CustomCesium;
} }
} }
const b = window.Cesium, I = 52.35987755982988, R = 3.141592653589793, D = class { const T = window.Cesium, P = 52.35987755982988, x = 3.141592653589793, R = class {
static BD09ToGCJ02(e, t) { static BD09ToGCJ02(e, t) {
let i = +e - .0065, r = +t - .006, n = Math.sqrt(i * i + r * r) - 2e-5 * Math.sin(r * I), let i = +e - .0065, r = +t - .006, n = Math.sqrt(i * i + r * r) - 2e-5 * Math.sin(r * P),
s = Math.atan2(r, i) - 3e-6 * Math.cos(i * I); s = Math.atan2(r, i) - 3e-6 * Math.cos(i * P);
return [n * Math.cos(s), n * Math.sin(s)] return [n * Math.cos(s), n * Math.sin(s)]
} }
static GCJ02ToBD09(e, t) { static GCJ02ToBD09(e, t) {
t = +t, e = +e; t = +t, e = +e;
let i = Math.sqrt(e * e + t * t) + 2e-5 * Math.sin(t * I), r = Math.atan2(t, e) + 3e-6 * Math.cos(e * I); let i = Math.sqrt(e * e + t * t) + 2e-5 * Math.sin(t * P),
r = Math.atan2(t, e) + 3e-6 * Math.cos(e * P);
return [i * Math.cos(r) + .0065, i * Math.sin(r) + .006] return [i * Math.cos(r) + .0065, i * Math.sin(r) + .006]
} }
@ -857,21 +971,21 @@ var CustomCesium;
static delta(e, t) { static delta(e, t) {
let i = this.transformLng(e - 105, t - 35), r = this.transformLat(e - 105, t - 35); let i = this.transformLng(e - 105, t - 35), r = this.transformLat(e - 105, t - 35);
const n = t / 180 * R; const n = t / 180 * x;
let s = Math.sin(n); let s = Math.sin(n);
s = 1 - .006693421622965943 * s * s; s = 1 - .006693421622965943 * s * s;
const a = Math.sqrt(s); const a = Math.sqrt(s);
return i = 180 * i / (6378245 / a * Math.cos(n) * R), r = 180 * r / (6335552.717000426 / (s * a) * R), [i, r] return i = 180 * i / (6378245 / a * Math.cos(n) * x), r = 180 * r / (6335552.717000426 / (s * a) * x), [i, r]
} }
static transformLng(e, t) { static transformLng(e, t) {
let i = 300 + (e = +e) + 2 * (t = +t) + .1 * e * e + .1 * e * t + .1 * Math.sqrt(Math.abs(e)); let i = 300 + (e = +e) + 2 * (t = +t) + .1 * e * e + .1 * e * t + .1 * Math.sqrt(Math.abs(e));
return i += 2 * (20 * Math.sin(6 * e * R) + 20 * Math.sin(2 * e * R)) / 3, i += 2 * (20 * Math.sin(e * R) + 40 * Math.sin(e / 3 * R)) / 3, i += 2 * (150 * Math.sin(e / 12 * R) + 300 * Math.sin(e / 30 * R)) / 3, i return i += 2 * (20 * Math.sin(6 * e * x) + 20 * Math.sin(2 * e * x)) / 3, i += 2 * (20 * Math.sin(e * x) + 40 * Math.sin(e / 3 * x)) / 3, i += 2 * (150 * Math.sin(e / 12 * x) + 300 * Math.sin(e / 30 * x)) / 3, i
} }
static transformLat(e, t) { static transformLat(e, t) {
let i = 2 * (e = +e) - 100 + 3 * (t = +t) + .2 * t * t + .1 * e * t + .2 * Math.sqrt(Math.abs(e)); let i = 2 * (e = +e) - 100 + 3 * (t = +t) + .2 * t * t + .1 * e * t + .2 * Math.sqrt(Math.abs(e));
return i += 2 * (20 * Math.sin(6 * e * R) + 20 * Math.sin(2 * e * R)) / 3, i += 2 * (20 * Math.sin(t * R) + 40 * Math.sin(t / 3 * R)) / 3, i += 2 * (160 * Math.sin(t / 12 * R) + 320 * Math.sin(t * R / 30)) / 3, i return i += 2 * (20 * Math.sin(6 * e * x) + 20 * Math.sin(2 * e * x)) / 3, i += 2 * (20 * Math.sin(t * x) + 40 * Math.sin(t / 3 * x)) / 3, i += 2 * (160 * Math.sin(t / 12 * x) + 320 * Math.sin(t * x / 30)) / 3, i
} }
static out_of_china(e, t) { static out_of_china(e, t) {
@ -879,14 +993,14 @@ var CustomCesium;
} }
static transformWGS84ToCartesian(e, t, i) { static transformWGS84ToCartesian(e, t, i) {
return t ? b.Cartesian3.fromDegrees(t.lng || t.lon, t.lat, t.alt = i || t.alt, b.Ellipsoid.WGS84) : b.Cartesian3.ZERO return t ? T.Cartesian3.fromDegrees(t.lng || t.lon, t.lat, t.alt = i || t.alt, T.Ellipsoid.WGS84) : T.Cartesian3.ZERO
} }
static transformCartesianToWGS84(e, t) { static transformCartesianToWGS84(e, t) {
let i = b.Ellipsoid.WGS84.cartesianToCartographic(t); let i = T.Ellipsoid.WGS84.cartesianToCartographic(t);
return {lng: b.Math.toDegrees(i.longitude), lat: b.Math.toDegrees(i.latitude), alt: i.height} return {lng: T.Math.toDegrees(i.longitude), lat: T.Math.toDegrees(i.latitude), alt: i.height}
} }
}, A = class { }, I = class {
constructor(e, t, i, r) { constructor(e, t, i, r) {
if (!e) throw new Error("viewer is required!"); if (!e) throw new Error("viewer is required!");
this._viewer = e, this._gltf = t, this._handler = void 0, this._defaultWidth = 15, this._currentPick = void 0, this._dStep = i, this._rStep = r, this._params = { this._viewer = e, this._gltf = t, this._handler = void 0, this._defaultWidth = 15, this._currentPick = void 0, this._dStep = i, this._rStep = r, this._params = {
@ -930,7 +1044,7 @@ var CustomCesium;
returnGltfCentorDegree(e) { returnGltfCentorDegree(e) {
let t = this.returnGltfCentor(e); let t = this.returnGltfCentor(e);
return D.transformCartesianToWGS84(this._viewer, t) return R.transformCartesianToWGS84(this._viewer, t)
} }
editRtation() { editRtation() {
@ -950,13 +1064,13 @@ var CustomCesium;
const o = this.createAxisSphere("model_edit_yCircle", n, s, Cesium.Color.BLUE); const o = this.createAxisSphere("model_edit_yCircle", n, s, Cesium.Color.BLUE);
this._viewer.scene.primitives.add(o); this._viewer.scene.primitives.add(o);
let l = Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(90)), let l = Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(90)),
h = Cesium.Matrix4.fromRotationTranslation(l); u = Cesium.Matrix4.fromRotationTranslation(l);
Cesium.Matrix4.multiply(o.geometryInstances.modelMatrix, h, o.geometryInstances.modelMatrix); Cesium.Matrix4.multiply(o.geometryInstances.modelMatrix, u, o.geometryInstances.modelMatrix);
const u = this.createAxisSphere("model_edit_xCircle", n, s, Cesium.Color.GREEN); const c = this.createAxisSphere("model_edit_xCircle", n, s, Cesium.Color.GREEN);
this._viewer.scene.primitives.add(u); this._viewer.scene.primitives.add(c);
let c = Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(90)), let h = Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(90)),
m = Cesium.Matrix4.fromRotationTranslation(c); m = Cesium.Matrix4.fromRotationTranslation(h);
Cesium.Matrix4.multiply(u.geometryInstances.modelMatrix, m, u.geometryInstances.modelMatrix) Cesium.Matrix4.multiply(c.geometryInstances.modelMatrix, m, c.geometryInstances.modelMatrix)
} }
createAxisSphere(e, t, i, r) { createAxisSphere(e, t, i, r) {
@ -1001,13 +1115,14 @@ var CustomCesium;
if (r && r.primitive && r.primitive._name && -1 != r.primitive._name.indexOf("model_edit")) { if (r && r.primitive && r.primitive._name && -1 != r.primitive._name.indexOf("model_edit")) {
t.scene.screenSpaceCameraController.enableRotate = !1, e._currentPick = r.primitive, e._currentPick.width = 25; t.scene.screenSpaceCameraController.enableRotate = !1, e._currentPick = r.primitive, e._currentPick.width = 25;
let n = t.scene.camera.pickEllipsoid(i.position, t.scene.globe.ellipsoid), let n = t.scene.camera.pickEllipsoid(i.position, t.scene.globe.ellipsoid),
s = JSON.parse(JSON.stringify(e._gltf.modelMatrix)), a = 0, o = 0, l = 0, h = 0, u = 0, c = 0; s = JSON.parse(JSON.stringify(e._gltf.modelMatrix)), a = 0, o = 0, l = 0, u = 0, c = 0,
h = 0;
if (n && Cesium.defined(n)) { if (n && Cesium.defined(n)) {
a = 0, o = 0, l = 0, h = 0, u = 0, c = 0; a = 0, o = 0, l = 0, u = 0, c = 0, h = 0;
const r = D.transformCartesianToWGS84(t, n); const r = R.transformCartesianToWGS84(t, n);
e._handler.setInputAction((function (n) { e._handler.setInputAction((function (n) {
let m = t.scene.camera.pickEllipsoid(n.endPosition, t.scene.globe.ellipsoid); let m = t.scene.camera.pickEllipsoid(n.endPosition, t.scene.globe.ellipsoid);
const d = D.transformCartesianToWGS84(t, m), p = n.endPosition.y - i.position.y, const d = R.transformCartesianToWGS84(t, m), p = n.endPosition.y - i.position.y,
C = n.endPosition.x - i.position.x; C = n.endPosition.x - i.position.x;
switch (e._currentPick._name) { switch (e._currentPick._name) {
case"model_edit_xArrow": case"model_edit_xArrow":
@ -1020,15 +1135,15 @@ var CustomCesium;
l = -e._dStep * p; l = -e._dStep * p;
break; break;
case"model_edit_xCircle": case"model_edit_xCircle":
h = e._rStep * p; u = e._rStep * p;
break; break;
case"model_edit_yCircle": case"model_edit_yCircle":
u = e._rStep * C; c = e._rStep * C;
break; break;
case"model_edit_zCircle": case"model_edit_zCircle":
c = e._rStep * C h = e._rStep * C
} }
e.updateModel(e._params, a, o, l, h, u, c, s) e.updateModel(e._params, a, o, l, u, c, h, s)
}), Cesium.ScreenSpaceEventType.MOUSE_MOVE) }), Cesium.ScreenSpaceEventType.MOUSE_MOVE)
} }
e._handler.setInputAction((function (i) { e._handler.setInputAction((function (i) {
@ -1076,7 +1191,7 @@ var CustomCesium;
let i = Cesium.Transforms.eastNorthUpToFixedFrame(e), r = new Cesium.Matrix4; let i = Cesium.Transforms.eastNorthUpToFixedFrame(e), r = new Cesium.Matrix4;
Cesium.Matrix4.setTranslation(Cesium.Matrix4.IDENTITY, t, r); Cesium.Matrix4.setTranslation(Cesium.Matrix4.IDENTITY, t, r);
let n = Cesium.Matrix4.multiply(i, r, i); let n = Cesium.Matrix4.multiply(i, r, i);
return Cesium.Matrix4.getTranslation(n, e), D.transformCartesianToWGS84(this._viewer, e) return Cesium.Matrix4.getTranslation(n, e), R.transformCartesianToWGS84(this._viewer, e)
} }
removeCoordArrows() { removeCoordArrows() {
@ -1098,7 +1213,7 @@ var CustomCesium;
} }
}; };
class O { class D {
constructor(e) { constructor(e) {
this.icy = e, this.fenceList = [], this.currentFence = [], this.currentEntity = [], this.currentState = !1, this.currentPolyline, this.currentPolygon this.icy = e, this.fenceList = [], this.currentFence = [], this.currentEntity = [], this.currentState = !1, this.currentPolyline, this.currentPolygon
} }
@ -1151,25 +1266,18 @@ var CustomCesium;
} }
finish() { finish() {
this.currentEntity.forEach((e => this.icy.viewer.entities.remove(e))), this.currentEntity = [], this.icy.viewer.entities.remove(this.currentPolygon), this.currentPolygon = void 0, this.icy.viewer.entities.remove(this.currentPolyline), this.currentPolyline = void 0; this.currentEntity.forEach((e => this.icy.viewer.entities.remove(e))), this.currentEntity = [], this.icy.viewer.entities.remove(this.currentPolygon), this.currentPolygon = void 0, this.icy.viewer.entities.remove(this.currentPolyline), this.currentPolyline = void 0, this.currentFence.flat().push(...this.currentFence[0]), this.currentFence.length = 0
let e = this.currentFence.flat();
e.push(...this.currentFence[0]);
// let t = this.icy.viewer.entities.add({
// wall: {
// positions: Cesium.Cartesian3.fromDegreesArrayHeights(e),
// maximumHeights: new Array(e.length).fill(60),
// minimunHeights: new Array(e.length).fill(10),
// material: new Cesium.WallDiffuseMaterialProperty({color: new Cesium.Color(1, 1, 0, 1)})
// }
// });
this.currentFence.length = 0, this.fenceList.push(t)
} }
addPoint(e, t, i) { addPoint(e, t, i) {
let r; let r;
return r = this.icy.viewer.entities.add({ return r = this.icy.viewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(e, t, i), position: Cesium.Cartesian3.fromDegrees(e, t, i),
point: {pixelSize: 10, color: Cesium.Color.YELLOW, disableDepthTestDistance: Number.POSITIVE_INFINITY} point: {
pixelSize: 10,
color: Cesium.Color.YELLOW,
disableDepthTestDistance: Number.POSITIVE_INFINITY
}
}), r }), r
} }
@ -1190,7 +1298,7 @@ var CustomCesium;
} catch (e) { } catch (e) {
} }
this.fenceList.map((e => { this.fenceList.map((e => {
this.icy.viewer.entities.remove(e) console.log(e), this.icy.viewer.entities.remove(e)
})), this.fenceList = [] })), this.fenceList = []
} }
@ -1219,7 +1327,7 @@ var CustomCesium;
} }
} }
class F { class O {
constructor(e, {name: t = null, width: i = 1, positions: r, color: n}) { constructor(e, {name: t = null, width: i = 1, positions: r, color: n}) {
this.icy = e, this.positions = r, this.entity = e.viewer.entities.add({ this.icy = e, this.positions = r, this.entity = e.viewer.entities.add({
name: t, name: t,
@ -1247,7 +1355,7 @@ var CustomCesium;
} }
} }
class z { class A {
constructor(e, {id: t, positions: i, color: r = "red", height: n = 30, name: s = "四色图"}, a) { constructor(e, {id: t, positions: i, color: r = "red", height: n = 30, name: s = "四色图"}, a) {
this.icy = e, this.entity = e.viewer.entities.add({ this.icy = e, this.entity = e.viewer.entities.add({
name: s, name: s,
@ -1262,16 +1370,16 @@ var CustomCesium;
}); });
var o = this.entity.polygon.hierarchy.getValue(Cesium.JulianDate.now()).positions, var o = this.entity.polygon.hierarchy.getValue(Cesium.JulianDate.now()).positions,
l = Cesium.BoundingSphere.fromPoints(o).center; l = Cesium.BoundingSphere.fromPoints(o).center;
let h = (u = l, c = new Cesium.Cartesian3(u.x, u.y, u.z), m = Cesium.Cartographic.fromCartesian(c), d = Cesium.Math.toDegrees(m.latitude), { let u = (c = l, h = new Cesium.Cartesian3(c.x, c.y, c.z), m = Cesium.Cartographic.fromCartesian(h), d = Cesium.Math.toDegrees(m.latitude), {
lng: Cesium.Math.toDegrees(m.longitude), lng: Cesium.Math.toDegrees(m.longitude),
lat: d, lat: d,
alt: m.height alt: m.height
}); });
var u, c, m, d; var c, h, m, d;
if (h.alt = n, l = function (e) { if (u.alt = n, l = function (e) {
var t = Cesium.Cartesian3.fromDegrees(e.lng, e.lat, e.alt); var t = Cesium.Cartesian3.fromDegrees(e.lng, e.lat, e.alt);
return {x: t.x, y: t.y, z: t.z} return {x: t.x, y: t.y, z: t.z}
}(h), this.entity.position = l, a) { }(u), this.entity.position = l, a) {
let e = new Image; let e = new Image;
e.src = a.toDataURL("image/jpg"), this.entity.billboard = { e.src = a.toDataURL("image/jpg"), this.entity.billboard = {
image: e, image: e,
@ -1292,7 +1400,7 @@ var CustomCesium;
} }
} }
class L { class F {
constructor(e) { constructor(e) {
this.viewer = e.viewer, this.lastStageList = [] this.viewer = e.viewer, this.lastStageList = []
} }
@ -1316,18 +1424,18 @@ var CustomCesium;
const n = Cesium.Cartographic.toCartesian(e), s = new Cesium.Cartesian4(n.x, n.y, n.z, 1), const n = Cesium.Cartographic.toCartesian(e), s = new Cesium.Cartesian4(n.x, n.y, n.z, 1),
a = new Cesium.Cartographic(e.longitude, e.latitude, e.height + 500), a = new Cesium.Cartographic(e.longitude, e.latitude, e.height + 500),
o = Cesium.Cartographic.toCartesian(a), l = new Cesium.Cartesian4(o.x, o.y, o.z, 1), o = Cesium.Cartographic.toCartesian(a), l = new Cesium.Cartesian4(o.x, o.y, o.z, 1),
h = (new Date).getTime(), u = new Cesium.Cartesian4, c = new Cesium.Cartesian4, u = (new Date).getTime(), c = new Cesium.Cartesian4, h = new Cesium.Cartesian4,
m = new Cesium.Cartesian3, d = this, p = new Cesium.PostProcessStage({ m = new Cesium.Cartesian3, d = this, p = new Cesium.PostProcessStage({
fragmentShader: d._getScanSegmentShader(), fragmentShader: d._getScanSegmentShader(),
uniforms: { uniforms: {
u_scanCenterEC: function () { u_scanCenterEC: function () {
return Cesium.Matrix4.multiplyByVector(d.viewer.camera._viewMatrix, s, u) return Cesium.Matrix4.multiplyByVector(d.viewer.camera._viewMatrix, s, c)
}, u_scanPlaneNormalEC: function () { }, u_scanPlaneNormalEC: function () {
const e = Cesium.Matrix4.multiplyByVector(d.viewer.camera._viewMatrix, s, u), const e = Cesium.Matrix4.multiplyByVector(d.viewer.camera._viewMatrix, s, c),
t = Cesium.Matrix4.multiplyByVector(d.viewer.camera._viewMatrix, l, c); t = Cesium.Matrix4.multiplyByVector(d.viewer.camera._viewMatrix, l, h);
return m.x = t.x - e.x, m.y = t.y - e.y, m.z = t.z - e.z, Cesium.Cartesian3.normalize(m, m), m return m.x = t.x - e.x, m.y = t.y - e.y, m.z = t.z - e.z, Cesium.Cartesian3.normalize(m, m), m
}, u_radius: function () { }, u_radius: function () {
return t * (((new Date).getTime() - h) % r) / r return t * (((new Date).getTime() - u) % r) / r
}, u_scanColor: i }, u_scanColor: i
} }
}); });
@ -1343,10 +1451,12 @@ var CustomCesium;
} }
} }
var z = __webpack_require__(117);
class k { class k {
static { static {
function e() { function e() {
S.update(), requestAnimationFrame(e) w.update(), requestAnimationFrame(e)
} }
e() e()
@ -1384,10 +1494,12 @@ var CustomCesium;
animationMove(e, t, i, r) { animationMove(e, t, i, r) {
if (!this.entity) throw"还没有对象呢!!"; if (!this.entity) throw"还没有对象呢!!";
let n = this.entity.position, s = Cesium.Cartesian3.fromDegrees(e, t, i), let n = this.entity.position, s = Cesium.Cartesian3.fromDegrees(e, t, i),
a = new S.Tween({x: n._value.x, y: n._value.y, z: n._value.z}); a = new w.Tween({x: n._value.x, y: n._value.y, z: n._value.z});
a.to({x: s.x, y: s.y, z: s.z}, r), a.onUpdate((({x: e, y: t, z: i}) => { a.to({x: s.x, y: s.y, z: s.z}, r), a.onUpdate((({x: e, y: t, z: i}) => {
let r = new Cesium.Cartesian3(e, t, i); let r = new Cesium.Cartesian3(e, t, i);
this.entity.position = r if(this.entity){
this.entity.position = r;
}
})), a.start() })), a.start()
} }
@ -1404,5 +1516,6 @@ var CustomCesium;
} }
} }
Cesium.Ion.defaultAccessToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzNzFlNTg1MC0wOTA0LTQzYzYtOTBjZi05MjIzZjU2NTkzZGQiLCJpZCI6MTE4ODE3LCJpYXQiOjE2NzE1MDY2NjF9.yGR3CbS6VQp2s6Y9NHWOIKq8qKL0sWLZZBZ9eP02Ags", CustomCesium = t Cesium.Ion.defaultAccessToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIzNzFlNTg1MC0wOTA0LTQzYzYtOTBjZi05MjIzZjU2NTkzZGQiLCJpZCI6MTE4ODE3LCJpYXQiOjE2NzE1MDY2NjF9.yGR3CbS6VQp2s6Y9NHWOIKq8qKL0sWLZZBZ9eP02Ags"
})(), CustomCesium = __webpack_exports__
})(); })();

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -13,10 +13,10 @@ export const MODEL = {
export const MENU = [ export const MENU = [
{ title: "双重预防", model: MODEL["1"] }, { title: "双重预防", model: MODEL["1"] },
{ title: "教育培训", model: MODEL["2"] }, { title: "教育培训", model: MODEL["2"] },
{ title: "高危作业管理", model: MODEL["3"] }, { title: "特殊作业", model: MODEL["3"] },
{ title: "监测预警", model: MODEL["4"] }, { title: "监测预警", model: MODEL["4"] },
{ title: "综合管理", model: MODEL["5"] }, { title: "综合管理", model: MODEL["5"] },
{ title: "定位管理", model: MODEL["6"] }, { title: "人员定位", model: MODEL["6"] },
]; ];
export const PRINT_STYLE = export const PRINT_STYLE =
'<style type="text/css" media="print">\n' + '<style type="text/css" media="print">\n' +

View File

@ -4,10 +4,10 @@
<el-descriptions :column="1" border> <el-descriptions :column="1" border>
<el-descriptions-item label="隐患来源"> <el-descriptions-item label="隐患来源">
<span v-if="data.info.SOURCE === '1'"> </span> <span v-if="data.info.SOURCE === '1'"> </span>
<span v-else-if="data.info.SOURCE === '2'"> 隐患排</span> <span v-if="data.info.SOURCE === '2'"> </span>
<span v-else-if="data.info.SOURCE === '3'"> 隐患排</span> <span v-if="data.info.SOURCE === '3'"> </span>
<span v-else-if="data.info.SOURCE === '4'"> 安全环保检</span> <span v-if="data.info.SOURCE === '4'"> </span>
<span v-else-if="data.info.SOURCE === '5'"> 安全环保检</span> <span v-if="data.info.SOURCE === '5'"> </span>
</el-descriptions-item> </el-descriptions-item>
<template v-if="data.info.SOURCE === '2' && listType === '1'"> <template v-if="data.info.SOURCE === '2' && listType === '1'">
<el-descriptions-item label="风险点(单元)"> <el-descriptions-item label="风险点(单元)">
@ -252,7 +252,12 @@
</el-descriptions> </el-descriptions>
</template> </template>
</template> </template>
<template v-if="(data.info.SOURCE === '4' || data.info.SOURCE === '5') && data.info.FINAL_CHECK"> <template
v-if="
(data.info.SOURCE === '4' || data.info.SOURCE === '5') &&
data.info.FINAL_CHECK
"
>
<el-divider content-position="left">安全环保验收信息</el-divider> <el-divider content-position="left">安全环保验收信息</el-divider>
<el-descriptions :column="1" border class="mt-10"> <el-descriptions :column="1" border class="mt-10">
<el-descriptions-item label="验收描述"> <el-descriptions-item label="验收描述">
@ -260,7 +265,7 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="是否合格"> <el-descriptions-item label="是否合格">
<span v-if="data.info.FINAL_CHECK === '1'"> </span> <span v-if="data.info.FINAL_CHECK === '1'"> </span>
<span v-else-if="data.info.FINAL_CHECK === '0'"> </span> <span v-else-if="data.info.FINAL_CHECK === '2'"> </span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="验收部门"> <el-descriptions-item label="验收部门">
{{ data.info.FINAL_CHECKOR_NDEPTNAME }} {{ data.info.FINAL_CHECKOR_NDEPTNAME }}

View File

@ -0,0 +1,84 @@
<template>
<div id="bi_container">
<div id="map" class="map_bg"></div>
</div>
</template>
<script setup>
import { onBeforeUnmount, onMounted } from "vue";
import { initMap, handleViewAlarm, handleMouseClick } from "./map";
import { useUserStore } from "@/pinia/user.js";
import { getEnterpriseInfo } from "@/request/enterprise_management.js";
const props = defineProps({
alarm: {
type: Object,
required: true,
default: null,
},
userList: {
type: Array,
required: true,
default: () => [],
},
});
const userStore = useUserStore();
const CORPINFO_ID = userStore.getUserInfo.CORPINFO_ID;
onMounted(async () => {
const corp = await getEnterpriseInfo({ CORPINFO_ID });
initMap(corp.pd);
handleMouseClick();
handleViewAlarm(props.alarm, props.userList);
});
onBeforeUnmount(() => {
window.$scene = null;
window.$icy = null;
window.$carmer = null;
});
</script>
<style scoped lang="scss">
#bi_container {
width: 100%;
height: 600px;
color: #ffffff;
position: relative;
font-size: 14px;
.map_bg {
width: 100%;
height: 540px;
}
.options {
margin-top: 10px;
display: flex;
align-items: center;
padding: 10px;
.option {
margin-right: 20px;
cursor: pointer;
text-align: center;
img {
width: 46px;
height: 46px;
}
.label {
margin-top: 10px;
font-size: 12px;
}
}
.id {
background-color: #1b284a;
padding: 10px;
border-radius: 4px;
height: 37px;
}
}
}
</style>

View File

@ -138,7 +138,7 @@ export const handleMouseClick = (model_id) => {
// 隐藏逻辑 // 隐藏逻辑
$mouse.mouseLeft((model) => { $mouse.mouseLeft((model) => {
if (model._name === "建筑") { if (model._name === "建筑") {
model_id.value = model._id; if (model_id) model_id.value = model._id;
clickBuilding(model); clickBuilding(model);
} }
}); });
@ -333,3 +333,72 @@ const addEntity = (id, name, lon, lat, height) => {
}; };
entities.add(obj); entities.add(obj);
}; };
export const handleViewAlarm = (alarm, userList) => {
const canvas = document.createElement("canvas");
const width = 100;
const height = 30;
canvas.width = width;
canvas.height = height;
const ctx = canvas.getContext("2d");
ctx.fillStyle = "#000000";
ctx.fillRect(0, 0, 100, 50);
ctx.fillStyle = "#ff0000";
ctx.font = "normal bold 20px Arial";
ctx.textAlign = "center";
ctx.textBaseline = "middle";
ctx.fillText("聚集告警", width / 2, height / 2);
// 聚集圆锥特效
const Cone = new window.CustomCesium.Cone(window.$icy);
Cone.add(
[alarm.lon, alarm.lat, alarm.alt], // 坐标
alarm.color, // 圆锥颜色
{ width: 20, height: 40 }, // 圆锥的宽高
canvas, // 圆锥铭牌
"100201", // 圆锥实体id
"10020101" // 铭牌实体id
);
const labelPixelOffset = new window.Cesium.Cartesian2(0, -55);
userList.forEach((user) => {
const obj = {};
obj.entity = window.$icy.viewer.entities.add(
new window.Cesium.Entity({
id: "user_" + user.card,
name: user.psnName,
position: window.Cesium.Cartesian3.fromDegrees(
user.lon,
user.lat,
user.alt
),
billboard: {
image: "src/assets/images/map/peoIcon_blueImg.png",
height: 36,
width: 30,
verticalOrigin: window.Cesium.VerticalOrigin.BOTTOM,
horizontalOrigin: window.Cesium.HorizontalOrigin.CENTER,
disableDepthTestDistance: Number.POSITIVE_INFINITY,
},
label: {
text: user.psnName,
font: "13px sans-serif",
pixelOffset: labelPixelOffset,
showBackground: true,
// 地图上扎点的名字背景色
// eslint-disable-next-line new-cap
backgroundColor: new window.Cesium.Color.fromCssColorString(
"rgba(20, 58, 142, 1)"
),
backgroundPadding: new window.Cesium.Cartesian2(7, 5),
disableDepthTestDistance: Number.POSITIVE_INFINITY,
},
})
);
obj.show = (e) => {
obj.entity.show = e;
};
obj.destroy = () => {
window.$icy.viewer.entities.remove(obj.entity);
};
});
};

View File

@ -4,7 +4,7 @@
<div class="logo" /> <div class="logo" />
<div class="menu"> <div class="menu">
<ul> <ul>
<li @click="router.push({ path: '/large_screen_data_display' })"> <li @click="fnNavigationBI">
<div class="title">BI</div> <div class="title">BI</div>
</li> </li>
<template v-for="(item, index) in MENU" :key="index"> <template v-for="(item, index) in MENU" :key="index">
@ -79,6 +79,7 @@ defineOptions({
name: "LayoutHeader", name: "LayoutHeader",
}); });
const FILE_URL = import.meta.env.VITE_FILE_URL; const FILE_URL = import.meta.env.VITE_FILE_URL;
let notify;
const router = useRouter(); const router = useRouter();
const menuStore = useMenuStore(); const menuStore = useMenuStore();
const userStore = useUserStore(); const userStore = useUserStore();
@ -156,7 +157,7 @@ const fnSignOut = async () => {
const fnSpecialOperationsWarnAmount = async () => { const fnSpecialOperationsWarnAmount = async () => {
const resData = await getSpecialOperationsWarnAmount(); const resData = await getSpecialOperationsWarnAmount();
if (resData.message) { if (resData.message) {
ElNotification({ notify = ElNotification({
title: "温馨提示", title: "温馨提示",
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
message: resData.message, message: resData.message,
@ -166,6 +167,10 @@ const fnSpecialOperationsWarnAmount = async () => {
} }
}; };
fnSpecialOperationsWarnAmount(); fnSpecialOperationsWarnAmount();
const fnNavigationBI = () => {
notify && notify.close();
router.push({ path: "/large_screen_data_display" });
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -2,9 +2,13 @@ import { post } from "@/request/axios.js";
export const getGatheringAlarmRecordsList = (params) => export const getGatheringAlarmRecordsList = (params) =>
post("/positAlarm/getAlarmRecordList", params); // 聚集告警记录列表 post("/positAlarm/getAlarmRecordList", params); // 聚集告警记录列表
export const getGatheringAlarmRecordViewList = (params) =>
post("/positAlarm/alarmRecordgoEdit", params); // 聚集告警记录详情
export const getAggregationAlarmTrend = (params) => export const getAggregationAlarmTrend = (params) =>
post("/positAlarm/aggregateAlarmTrends", params); // 聚集报警趋势 post("/positAlarm/aggregateAlarmTrends", params); // 聚集报警趋势
export const getAggregatedDataStatistics = (params) => export const getAggregatedDataStatistics = (params) =>
post("/positAlarm/aggregateDataStatistics", params); // 聚集区域统计 post("/positAlarm/aggregateDataStatistics", params); // 聚集区域统计
export const getAggregationAreaStatistics = (params) => export const getAggregationAreaStatistics = (params) =>
post("/positAlarm/aggregateDataStatisticsByGroup", params); // 聚集数据统计 post("/positAlarm/aggregateDataStatisticsByGroup", params); // 聚集数据统计
export const getAlarmGatherPsnInfo = (params) =>
post("/positAlarm/getAlarmGatherPsnInfo", params); // 聚集告警内人员列表

View File

@ -20,7 +20,7 @@ export const getEnterpriseReport2 = (params) =>
export const getEnterpriseReport3 = (params) => export const getEnterpriseReport3 = (params) =>
post("/studytask/list?showCount=100&currentPage=1", params); post("/studytask/list?showCount=100&currentPage=1", params);
export const getEnterpriseReport4 = (params) => export const getEnterpriseReport4 = (params) =>
post("/confinedspace/getDiagnosis", params); post("/eightWork/getDiagnosis", params);
export const getEnterpriseReport5 = (params) => export const getEnterpriseReport5 = (params) =>
post("/performanceexamine_dept/listAll", params); post("/performanceexamine_dept/listAll", params);
export const getEnterpriseReport6 = (params) => export const getEnterpriseReport6 = (params) =>

View File

@ -154,7 +154,7 @@ const bottomOptionsList = [
img: new URL("/src/assets/images/map/bico2.png", import.meta.url).href, img: new URL("/src/assets/images/map/bico2.png", import.meta.url).href,
imgSelect: new URL("/src/assets/images/map/bico2_on.png", import.meta.url) imgSelect: new URL("/src/assets/images/map/bico2_on.png", import.meta.url)
.href, .href,
title: "安全作业", title: "特殊作业",
type: "workSafely", type: "workSafely",
check: false, check: false,
components: [markRaw(WorkSafely)], components: [markRaw(WorkSafely)],

View File

@ -129,7 +129,8 @@ const {
currentData[0], currentData[0],
currentData[1] currentData[1]
) )
: undefined : undefined,
1000 / data.speed
); );
}, },
}); });
@ -156,10 +157,10 @@ const fnGetData = async () => {
ElMessage.warning("请选择时间"); ElMessage.warning("请选择时间");
return; return;
} }
hadleDestroy();
data.positions = []; data.positions = [];
pause(); pause();
reset(); reset();
hadleDestroy();
await getTrajectoriesData( await getTrajectoriesData(
data.searchForm.personnel, data.searchForm.personnel,
data.searchForm.dates[0], data.searchForm.dates[0],
@ -209,7 +210,7 @@ const fnPause = () => {
}; };
onBeforeUnmount(() => { onBeforeUnmount(() => {
console.log("onBeforeUnmount"); pause();
hadleDestroy(); hadleDestroy();
}); });
</script> </script>

View File

@ -76,44 +76,7 @@ const data = reactive({
}, },
], ],
eleType: 0, eleType: 0,
block2OptionsList: [ block2OptionsList: [],
{
label: "滞留报警",
count: 0,
},
{
label: "越界报警",
count: 235,
},
{
label: "超员报警",
count: 569,
},
{
label: "缺员报警",
count: 569,
},
{
label: "静止报警",
count: 423,
},
{
label: "串岗报警",
count: 789,
},
{
label: "一键告警",
count: 236,
},
{
label: "聚集告警",
count: 214,
},
{
label: "作业告警",
count: 852,
},
],
block3List: [ block3List: [
{ {
name: "赵一诺", name: "赵一诺",

View File

@ -16,7 +16,7 @@
</template> </template>
<script setup> <script setup>
import { reactive } from "vue"; import { reactive } from "vue";
import { reduction } from "../js/map"; import { flyTo, reduction } from "../js/map";
import { useFullscreen, useVModel } from "@vueuse/core"; import { useFullscreen, useVModel } from "@vueuse/core";
const props = defineProps({ const props = defineProps({
@ -53,6 +53,7 @@ const data = reactive({
.href, .href,
check: false, check: false,
label: "返回中心点", label: "返回中心点",
action: flyTo,
}, },
{ {
img: new URL("/src/assets/images/map/rico4.png", import.meta.url).href, img: new URL("/src/assets/images/map/rico4.png", import.meta.url).href,

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="container"> <div class="container">
<div class="block1"> <div class="block1">
<layout-title title="安全作业状态统计" /> <layout-title title="特殊作业状态统计" />
<div class="option"> <div class="option">
<div <div
v-for="(item, index) in data.block1OptionsList" v-for="(item, index) in data.block1OptionsList"
@ -18,11 +18,11 @@
</div> </div>
<div class="block2"> <div class="block2">
<layout-title title="安全作业情况统计" /> <layout-title title="特殊作业情况统计" />
<div id="main1" class="option"></div> <div id="main1" class="option"></div>
</div> </div>
<div class="block3"> <div class="block3">
<layout-title title="安全作业记录" /> <layout-title title="特殊作业记录" />
<div class="option"> <div class="option">
<div class="table"> <div class="table">
<div class="tr"> <div class="tr">

View File

@ -57,10 +57,8 @@ function echarts1(id, legend, echartCount) {
type: "shadow", type: "shadow",
}, },
axisLabel: { axisLabel: {
textStyle: {
color: "#B3CFFF", // x轴文本颜色 color: "#B3CFFF", // x轴文本颜色
fontSize: 10, fontSize: 10,
},
formatter(params) { formatter(params) {
// const res = xWrapText(params, 6); // const res = xWrapText(params, 6);
xWrapText(params, 6); xWrapText(params, 6);
@ -84,11 +82,9 @@ function echarts1(id, legend, echartCount) {
}, },
axisLabel: { axisLabel: {
formatter: "{value}%", formatter: "{value}%",
textStyle: {
color: "#B3CFFF", // x轴文本颜色 color: "#B3CFFF", // x轴文本颜色
fontSize: 12, fontSize: 12,
}, },
},
name: "", name: "",
nameTextStyle: { nameTextStyle: {
color: "#B3CFFF", color: "#B3CFFF",
@ -119,7 +115,7 @@ function echarts1(id, legend, echartCount) {
opacity: 1, opacity: 1,
}, },
]), ]),
barBorderRadius: [0, 0, 0, 0], borderRadius: [0, 0, 0, 0],
}, },
data: echartCount, data: echartCount,
}, },
@ -148,7 +144,7 @@ function echarts1(id, legend, echartCount) {
opacity: 1, opacity: 1,
}, },
]), ]),
barBorderRadius: [0, 0, 0, 0], borderRadius: [0, 0, 0, 0],
}, },
data: echartCount, data: echartCount,
barGap: 0, barGap: 0,

View File

@ -34,10 +34,8 @@ function echarts2(id, month, accumulated, currentMonth) {
}, },
axisLabel: { axisLabel: {
// 坐标轴刻度标签的相关设置 // 坐标轴刻度标签的相关设置
textStyle: {
color: "#d1e6eb", color: "#d1e6eb",
margin: 15, margin: 15,
},
interval: 0, interval: 0,
rotate: 30, rotate: 30,
}, },
@ -60,14 +58,12 @@ function echarts2(id, month, accumulated, currentMonth) {
}, },
}, },
axisLine: { axisLine: {
show: false, show: true,
}, },
axisLabel: { axisLabel: {
margin: 20, margin: 20,
textStyle: {
color: "#d1e6eb", color: "#d1e6eb",
}, },
},
axisTick: { axisTick: {
show: false, show: false,
}, },
@ -120,7 +116,7 @@ function echarts2(id, month, accumulated, currentMonth) {
type: "bar", type: "bar",
barWidth: 20, barWidth: 20,
tooltip: { tooltip: {
show: false, show: true,
}, },
itemStyle: { itemStyle: {
color: "#1492FF", color: "#1492FF",

View File

@ -52,13 +52,9 @@ function echarts4(id) {
axisLabel: { axisLabel: {
show: true, show: true,
// rotate: -1, // rotate: -1,
textStyle: {
fontSize: 14, fontSize: 14,
// fontFamily: PangMenZhengDao,
color: "#fff", color: "#fff",
}, },
},
axisTick: { axisTick: {
show: false, show: false,
}, },
@ -93,12 +89,9 @@ function echarts4(id) {
}, },
axisLabel: { axisLabel: {
show: true, show: true,
textStyle: {
fontSize: 12, fontSize: 12,
// fontFamily: PangMenZhengDao,
color: "#ffffff", color: "#ffffff",
}, },
},
splitArea: { splitArea: {
areaStyle: { areaStyle: {
color: "rgba(255,255,255,.5)", color: "rgba(255,255,255,.5)",
@ -187,8 +180,9 @@ function echarts4(id) {
return colorList[params.dataIndex]; return colorList[params.dataIndex];
}, },
opacity: 0.7, opacity: 0.7,
// 鼠标移入柱子上 透明度变为 1 },
emphasis: { emphasis: {
itemStyle: {
opacity: 1, opacity: 1,
}, },
}, },

View File

@ -41,11 +41,9 @@ function echarts2(id, data) {
}, },
axisLabel: { axisLabel: {
// 坐标轴刻度标签的相关设置 // 坐标轴刻度标签的相关设置
textStyle: {
color: "#d1e6eb", color: "#d1e6eb",
margin: 15, margin: 15,
}, },
},
axisTick: { axisTick: {
show: false, show: false,
}, },
@ -69,10 +67,8 @@ function echarts2(id, data) {
}, },
axisLabel: { axisLabel: {
margin: 20, margin: 20,
textStyle: {
color: "#d1e6eb", color: "#d1e6eb",
}, },
},
axisTick: { axisTick: {
show: false, show: false,
}, },

View File

@ -30,11 +30,11 @@ const showHotworkList = async () => {
hotworkList, hotworkList,
HOTWORK_ID, HOTWORK_ID,
"动火作业", "动火作业",
CHECK_NO, '动火作业:'+CHECK_NO,
WORK_POSITION.split(",")[0], WORK_POSITION.split(",")[0],
WORK_POSITION.split(",")[1], WORK_POSITION.split(",")[1],
WORK_POSITION.split(",")[2], WORK_POSITION.split(",")[2],
"/src/assets/images/map/bottom/ico4_on.png" "/src/assets/images/map/bottom/ico1_select.png"
); );
}); });
hotworkList.show(true); hotworkList.show(true);
@ -61,11 +61,11 @@ const showConfinedspaceWorkList = async () => {
confinedspaceList, confinedspaceList,
CONFINEDSPACE_ID, CONFINEDSPACE_ID,
"受限空间作业", "受限空间作业",
CHECK_NO, '受限空间作业:'+CHECK_NO,
WORK_POSITION.split(",")[0], WORK_POSITION.split(",")[0],
WORK_POSITION.split(",")[1], WORK_POSITION.split(",")[1],
WORK_POSITION.split(",")[2], WORK_POSITION.split(",")[2],
"/src/assets/images/map/bottom/ico5_on.png" "/src/assets/images/map/bottom/ico2_select.png"
); );
}); });
confinedspaceList.show(true); confinedspaceList.show(true);
@ -92,11 +92,11 @@ const showHighWorkList = async () => {
highWorkList, highWorkList,
HIGHWORK_ID, HIGHWORK_ID,
"高处作业", "高处作业",
CHECK_NO, '高处作业:'+CHECK_NO,
WORK_POSITION.split(",")[0], WORK_POSITION.split(",")[0],
WORK_POSITION.split(",")[1], WORK_POSITION.split(",")[1],
WORK_POSITION.split(",")[2], WORK_POSITION.split(",")[2],
"/src/assets/images/map/bottom/ico7_on.png" "/src/assets/images/map/bottom/ico4_select.png"
); );
}); });
highWorkList.show(true); highWorkList.show(true);

View File

@ -100,16 +100,16 @@ export const showLine = (positions) => {
* entityArr 接收人物模型分组 * entityArr 接收人物模型分组
* billboardArr 接收人物铭牌分组 * billboardArr 接收人物铭牌分组
*/ */
export const peoMovement = (id, lon, lat, height, alt) => { export const peoMovement = (id, lon, lat, height, alt,speed) => {
entityArr.children.forEach((b, m) => { entityArr.children.forEach((b, m) => {
if (b.entity._id === id) { if (b.entity._id === id) {
b.updateAngle([alt, 0, 0]); // 改变人物朝向 b.updateAngle([alt, 0, 0]); // 改变人物朝向
b.animationMove(lon, lat, height, 1000, () => {}); // 人物平滑移动 b.animationMove(lon, lat, height, speed, () => {}); // 人物平滑移动
billboardArr.children[m].animationMove( billboardArr.children[m].animationMove(
lon, lon,
lat, lat,
Number(Number(height) + 2.05), Number(Number(height) + 2.05),
1000 speed
); // 人物铭牌平滑移动 ); // 人物铭牌平滑移动
} else { } else {
console.log(`人物移动数据错误`); console.log(`人物移动数据错误`);

View File

@ -18,6 +18,8 @@ import { getVideoManagerView } from "@/request/video_manager.js";
const loadMap = 3; const loadMap = 3;
let $entityTransparent = []; let $entityTransparent = [];
const clickModel = new Map(); const clickModel = new Map();
let centerLon = 0;
let centerLat = 0;
export const initMap = (corp) => { export const initMap = (corp) => {
window.$scene = new window.CustomCesium.Scene( window.$scene = new window.CustomCesium.Scene(
"map", "map",
@ -36,7 +38,9 @@ export const initMap = (corp) => {
), ),
}); });
const [wgsLat, wgsLon] = bd09ToWgs84(corp.LATITUDE, corp.LONGITUDE); const [wgsLat, wgsLon] = bd09ToWgs84(corp.LATITUDE, corp.LONGITUDE);
flyTo(wgsLon, wgsLat); centerLon = wgsLon;
centerLat = wgsLat;
flyTo();
// 亮度设置 // 亮度设置
const stages = window.$icy.viewer.scene.postProcessStages; const stages = window.$icy.viewer.scene.postProcessStages;
window.$icy.viewer.scene.brightness = window.$icy.viewer.scene.brightness =
@ -127,13 +131,12 @@ const transformlng = (lng, lat) => {
return ret; return ret;
}; };
// eslint-disable-next-line no-unused-vars export const flyTo = () => {
const flyTo = (lng, lat) => {
window.$carmer.flyTo({ window.$carmer.flyTo({
// 视角飞入 // 视角飞入
maxHeight: 1500, maxHeight: 1500,
time: 1, time: 1,
position: [lng, lat, 200], position: [centerLon, centerLat, 200],
angle: [0, -60, 0], angle: [0, -60, 0],
}); });
}; };

View File

@ -25,6 +25,11 @@ const { open, close } = useWebSocket(
const msg = unzip(event.data); const msg = unzip(event.data);
const decodedMsg = JSON.parse(decodeURIComponent(msg)); const decodedMsg = JSON.parse(decodeURIComponent(msg));
if (decodedMsg.msg === "000") { if (decodedMsg.msg === "000") {
console.log(decodedMsg.data);
// decodedMsg.data = [
// "8379,119.447708695738,39.918422294137,-232.39015608699566,0.12000000000000001,,1,0,大大",
// "9979,119.447611105937,39.918443403627,-343.76932562302534,0.12000000000000001,9979,1,0,测试一",
// ];
peoMovement(decodedMsg.data); peoMovement(decodedMsg.data);
} }
if (decodedMsg.msg === "006") { if (decodedMsg.msg === "006") {
@ -32,7 +37,7 @@ const { open, close } = useWebSocket(
} }
}, },
onDisconnected: () => { onDisconnected: () => {
if (entityArr) { if (entityArr && entityArr.children) {
entityArr.children.forEach((e) => { entityArr.children.forEach((e) => {
e.destroy(); e.destroy();
}); });
@ -159,25 +164,32 @@ const unzip = (b64Data) => {
function peoMovement(moveData) { function peoMovement(moveData) {
const map = new Map(); const map = new Map();
moveData.forEach((i, n) => { moveData.forEach((i, n) => {
let addFlag = false;
map.set(i.split(",")[0], n); map.set(i.split(",")[0], n);
if (!entityArr || !entityArr.children) { if (!entityArr || !entityArr.children) {
addFlag = true;
entityArr = new window.CustomCesium.GroupModel("人物模型"); entityArr = new window.CustomCesium.GroupModel("人物模型");
billboardArr = new window.CustomCesium.GroupModel("人物姓名"); billboardArr = new window.CustomCesium.GroupModel("人物姓名");
const entity = i.split(","); const entity = i.split(",");
console.log(entity[0], 111111);
addEntity(entity[0], entity[8], entity[1], entity[2], entity[4]); addEntity(entity[0], entity[8], entity[1], entity[2], entity[4]);
addBillboard(entity[0], entity[8], entity[1], entity[2], entity[4]); addBillboard(entity[0], entity[8], entity[1], entity[2], entity[4]);
} }
entityArr.children.forEach((b, m) => { entityArr.children.forEach((b, m) => {
if (!b.entity) { if (!b.entity) {
addFlag = true;
const entity = i.split(","); const entity = i.split(",");
console.log(entity[0], 2222222);
addEntity(entity[0], entity[8], entity[1], entity[2], entity[4]); addEntity(entity[0], entity[8], entity[1], entity[2], entity[4]);
addBillboard(entity[0], entity[8], entity[1], entity[2], entity[4]); addBillboard(entity[0], entity[8], entity[1], entity[2], entity[4]);
return; return;
} }
const index = map.get(b.entity._id); const index = map.get(b.entity._id);
const item = moveData[index]; const item = moveData[index];
if (index !== undefined) { const entity = i.split(",");
if (index !== undefined && entity[0] === b.entity._id) {
addFlag = true;
const itData = item.split(","); // itData下标0=【卡号】1,24=【lonlatalt】3=【人物朝向角度】5=【工号】6=【当前楼层】 const itData = item.split(","); // itData下标0=【卡号】1,24=【lonlatalt】3=【人物朝向角度】5=【工号】6=【当前楼层】
if (itData[4] != null && itData.length >= 6) { if (itData[4] != null && itData.length >= 6) {
b.updateAngle([itData[3], 0, 0]); // 改变人物朝向 b.updateAngle([itData[3], 0, 0]); // 改变人物朝向
@ -185,25 +197,28 @@ function peoMovement(moveData) {
itData[1], itData[1],
itData[2], itData[2],
Number(itData[4]), Number(itData[4]),
2000, 1000,
() => {} () => {}
); // 人物平滑移动 ); // 人物平滑移动
billboardArr.children[m].animationMove( billboardArr.children[m].animationMove(
itData[1], itData[1],
itData[2], itData[2],
Number(Number(itData[4]) + 2.05), Number(Number(itData[4]) + 2.05),
2000 1000
); // 人物铭牌平滑移动 ); // 人物铭牌平滑移动
} else { } else {
console.log(`人物移动数据错误,错误参数:'${item}'`); console.log(`人物移动数据错误,错误参数:'${item}'`);
} }
} else { }
});
if (!addFlag) {
const entity = i.split(","); const entity = i.split(",");
console.log(entity[0], 333333);
addEntity(entity[0], entity[8], entity[1], entity[2], entity[4]); addEntity(entity[0], entity[8], entity[1], entity[2], entity[4]);
addBillboard(entity[0], entity[8], entity[1], entity[2], entity[4]); addBillboard(entity[0], entity[8], entity[1], entity[2], entity[4]);
} }
}); });
});
} }
export const handleFence = async (b) => { export const handleFence = async (b) => {

View File

@ -0,0 +1,42 @@
<template>
<el-dialog v-model="visible" title="告警信息" :on-close="fnClose">
<alarmView
v-if="visible"
:alarm="props.alarm"
:user-list="props.userList"
/>
<template #footer>
<el-button @click="fnClose"></el-button>
</template>
</el-dialog>
</template>
<script setup>
import { useVModels } from "@vueuse/core";
import alarmView from "@/components/map_tools/alarm_view";
const props = defineProps({
visible: {
type: Boolean,
required: true,
default: false,
},
alarm: {
type: Object,
required: true,
default: null,
},
userList: {
type: Array,
required: true,
default: () => [],
},
});
const emits = defineEmits(["update:visible", "get-data"]);
const { visible } = useVModels(props, emits);
const fnClose = () => {
visible.value = false;
};
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,157 @@
<template>
<el-dialog v-model="visible" title="详情" :on-close="fnClose" width="80%">
<el-form
:model="searchForm"
label-width="80px"
@submit.prevent="fnResetPaginationTransfer"
>
<el-row>
<el-col :span="6">
<el-form-item label="检查周期" prop="dates">
<el-date-picker
v-model="searchForm.dates"
type="datetimerange"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD HH:mm:ss"
time-format="A hh:mm:ss"
range-separator="至"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="10px">
<el-button type="primary" native-type="submit">搜索</el-button>
<el-button native-type="reset" @click="fnResetPaginationTransfer">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<layout-card>
<layout-table
v-model:pagination="pagination"
:data="list"
@get-data="fnGetDataTransfer"
>
<el-table-column label="序号" width="70">
<template #default="{ $index }">
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column label="聚集等级" prop="level">
<template #default="{ row }">
<span v-if="row.level === '1'"></span>
</template>
</el-table-column>
<el-table-column label="聚集人员" prop="psnName" />
<el-table-column label="时间" prop="alarmTime" />
<el-table-column label="操作">
<template #default="{ row }">
<el-button type="primary" text link @click="fnViewLocation(row)"
>查看位置</el-button
>
</template>
</el-table-column>
</layout-table>
</layout-card>
<template #footer>
<el-button @click="fnClose"></el-button>
<el-button type="primary" @click="fnSubmit"></el-button>
</template>
</el-dialog>
<alarm_dialog
v-model:visible="data.alarmDialogDialog.visible"
:alarm="data.alarmDialogDialog.alarm"
:user-list="data.alarmDialogDialog.userList"
@get-data="fnResetPagination"
/>
</template>
<script setup>
import { useVModels } from "@vueuse/core";
import { debounce } from "throttle-debounce";
import { ElMessage } from "element-plus";
import { serialNumber } from "@/assets/js/utils.js";
import useListData from "@/assets/js/useListData.js";
import {
getAlarmGatherPsnInfo,
getGatheringAlarmRecordViewList,
} from "@/request/aggregation_management.js";
import alarm_dialog from "./alarmDialog.vue";
import { reactive } from "vue";
const props = defineProps({
visible: {
type: Boolean,
required: true,
default: false,
},
form: {
type: Object,
required: true,
default: () => ({}),
},
});
const data = reactive({
alarmDialogDialog: {
alarm: null,
userList: null,
visible: false,
},
});
const emits = defineEmits(["update:visible", "update:form", "get-data"]);
const { visible } = useVModels(props, emits);
const { list, searchForm, pagination, fnGetData, fnResetPagination } =
useListData(getGatheringAlarmRecordViewList, {
otherParams: {
gatherId: props.form.id,
STARTTIME: props.form.startTime,
ENDTIME: props.form.endTime,
},
key: "rows",
});
const fnClose = () => {
visible.value = false;
};
const fnGetDataTransfer = () => {
fnGetData({
STARTTIME: searchForm.value.dates[0]
? searchForm.value.dates[0]
: props.form.value.dates[0],
ENDTIME: searchForm.value.dates?.[1]
? searchForm.value.dates[1]
: props.form.value.dates[1],
gatherId: props.form.id,
});
};
const fnViewLocation = async (row) => {
const res = await getAlarmGatherPsnInfo({ id: row.id });
data.alarmDialogDialog.alarm = row;
data.alarmDialogDialog.userList = res.data;
data.alarmDialogDialog.visible = true;
};
const fnResetPaginationTransfer = () => {
fnResetPagination({
STARTTIME: searchForm.value.dates?.[0],
ENDTIME: searchForm.value.dates?.[1],
gatherId: props.form.id,
});
};
const fnSubmit = debounce(
1000,
async () => {
ElMessage.success("处理成功");
fnClose();
emits("get-data");
},
{ atBegin: true }
);
</script>
<style scoped lang="scss"></style>

View File

@ -34,30 +34,56 @@
{{ serialNumber(pagination, $index) }} {{ serialNumber(pagination, $index) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="聚集地点" prop="regName" /> <el-table-column label="状态" prop="status">
<el-table-column label="开始时间" prop="regName" /> <template #default="{ row }">
<el-table-column label="结束时间" prop="regName" /> {{ row.status === "1" ? "已处理" : "待处理" }}
<el-table-column label="状态" prop="regName" /> </template>
</el-table-column>
<el-table-column label="聚集地点" prop="layerGroup" />
<el-table-column label="开始时间" prop="startTime" />
<el-table-column label="结束时间" prop="endTime" />
<el-table-column label="操作" width="200"> <el-table-column label="操作" width="200">
<template #default="{ row }"> <template #default="{ row }">
{{ row }} <el-button type="primary" text link @click="fnShowInfo(row)"
>查看详情</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</layout-table> </layout-table>
</layout-card> </layout-card>
</div> </div>
<view-info
v-if="data.viewDialog.visible"
v-model:visible="data.viewDialog.visible"
v-model:form="data.viewDialog.form"
/>
</template> </template>
<script setup> <script setup>
import useListData from "@/assets/js/useListData.js"; import useListData from "@/assets/js/useListData.js";
import ViewInfo from "./components/viewInfo.vue";
import { serialNumber } from "@/assets/js/utils.js"; import { serialNumber } from "@/assets/js/utils.js";
import { getGatheringAlarmRecordsList } from "@/request/aggregation_management.js"; import { getGatheringAlarmRecordsList } from "@/request/aggregation_management.js";
import { reactive } from "vue";
const { list, searchForm, pagination, fnGetData, fnResetPagination } = const { list, searchForm, pagination, fnGetData, fnResetPagination } =
useListData(getGatheringAlarmRecordsList, { useListData(getGatheringAlarmRecordsList, {
otherParams: { status: "" }, otherParams: { status: "" },
key: "rows", key: "rows",
}); });
const data = reactive({
viewDialog: {
visible: false,
form: {
dates:[]
},
},
});
const fnShowInfo = (row) => {
data.viewDialog.visible = true;
data.viewDialog.form = row;
};
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss"></style>

View File

@ -234,13 +234,13 @@
<el-radio v-model="data.form.FOURTYPE" :label="1"> <el-radio v-model="data.form.FOURTYPE" :label="1">
平面四色图 平面四色图
</el-radio> </el-radio>
<el-radio <!-- <el-radio-->
v-model="data.form.FOURTYPE" <!-- v-model="data.form.FOURTYPE"-->
:label="2" <!-- :label="2"-->
@change="fnProhibitSelect" <!-- @change="fnProhibitSelect"-->
> <!-- >-->
3D图 <!-- 3D图-->
</el-radio> <!-- </el-radio>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="data.form.FOURTYPE === 1" :span="24"> <el-col v-if="data.form.FOURTYPE === 1" :span="24">

View File

@ -32,14 +32,6 @@ const fnInitEcharts = (data) => {
type: "shadow", type: "shadow",
}, },
}, },
legend: {
data: ["各培训类型学习人数"],
top: "15",
textStyle: {
color: "#2aaef2",
},
orient: "horizontal",
},
grid: { grid: {
top: "25%", top: "25%",
right: "3%", right: "3%",

View File

@ -65,9 +65,7 @@ const fnInitEcharts = (data) => {
}, },
axisLabel: { axisLabel: {
interval: 0, interval: 0,
textStyle: {
color: "#fff", color: "#fff",
},
fontSize: 12, fontSize: 12,
margin: 15, margin: 15,
}, },
@ -87,10 +85,8 @@ const fnInitEcharts = (data) => {
}, },
}, },
axisLabel: { axisLabel: {
textStyle: {
color: "#fff", color: "#fff",
}, },
},
splitLine: { splitLine: {
show: false, show: false,
}, },

View File

@ -29,17 +29,46 @@
<div> <div>
<div class="dunpai1" /> <div class="dunpai1" />
<div class="bottom_title">现场排查数</div> <div class="bottom_title">现场排查数</div>
<div id="main1" /> <el-progress
:percentage="
typeList.filter((item) => item.NAME === '现场清单')[0].percentage
"
color="#ec2c26"
text-inside
:stroke-width="20"
>
{{ typeList.filter((item) => item.NAME === "现场清单")[0].count }}
</el-progress>
</div> </div>
<div> <div>
<div class="dunpai2" /> <div class="dunpai2" />
<div class="bottom_title">基础排查数</div> <div class="bottom_title">基础排查数</div>
<div id="main2" /> <el-progress
:percentage="
typeList.filter((item) => item.NAME === '基础类清单')[0]
.percentage
"
color="#ea4e26"
text-inside
:stroke-width="20"
>
{{ typeList.filter((item) => item.NAME === "基础类清单")[0].count }}
</el-progress>
</div> </div>
<div> <div>
<div class="dunpai3" /> <div class="dunpai3" />
<div class="bottom_title">综合排查数</div> <div class="bottom_title">综合排查数</div>
<div id="main3" /> <el-progress
:percentage="
typeList.filter((item) => item.NAME === '综合类清单')[0]
.percentage
"
color="#ea6e27"
text-inside
:stroke-width="20"
>
{{ typeList.filter((item) => item.NAME === "综合类清单")[0].count }}
</el-progress>
</div> </div>
</div> </div>
</div> </div>
@ -47,18 +76,21 @@
</template> </template>
<script setup> <script setup>
import { onMounted, ref } from "vue"; import { ref } from "vue";
import { import {
getTroubleshootingTypeEcharts, getTroubleshootingTypeEcharts,
getTroubleshootingTypeNumber, getTroubleshootingTypeNumber,
} from "@/request/large_screen_data_display.js"; } from "@/request/large_screen_data_display.js";
import { sumBy } from "lodash-es"; import { sumBy } from "lodash-es";
import { arrayObjectDeduplication } from "@/assets/js/utils.js"; import { arrayObjectDeduplication } from "@/assets/js/utils.js";
import * as echarts from "echarts";
import CountTo from "vue-countup-v3"; import CountTo from "vue-countup-v3";
const info = ref({}); const info = ref({});
const typeList = ref([
{ count: 0, percentage: 0, NAME: "现场清单" },
{ count: 0, percentage: 0, NAME: "基础类清单" },
{ count: 0, percentage: 0, NAME: "综合类清单" },
]);
const fnGetData = async () => { const fnGetData = async () => {
const resDataNumber = await getTroubleshootingTypeNumber(); const resDataNumber = await getTroubleshootingTypeNumber();
resDataNumber.typeList.forEach((item) => { resDataNumber.typeList.forEach((item) => {
@ -66,73 +98,15 @@ const fnGetData = async () => {
}); });
const resDataEcharts = await getTroubleshootingTypeEcharts(); const resDataEcharts = await getTroubleshootingTypeEcharts();
const total = sumBy(resDataEcharts.typeList, (item) => item.count); const total = sumBy(resDataEcharts.typeList, (item) => item.count);
const key = { resDataEcharts.typeList.forEach((item) => {
现场清单: { color: "#ec2c26", el: "#main1" }, item.percentage = (item.count / total) * 100;
基础类清单: { color: "#ea4e26", el: "#main2" },
综合类清单: { color: "#ea6e27", el: "#main3" },
};
const typeList = [
...resDataEcharts.typeList,
{ count: 0, NAME: "现场清单" },
{ count: 0, NAME: "基础类清单" },
{ count: 0, NAME: "综合类清单" },
];
arrayObjectDeduplication(typeList, "NAME").forEach((item) => {
fnInitEcharts(item.count, total, key[item.NAME].color, key[item.NAME].el);
}); });
typeList.value = arrayObjectDeduplication(
[...resDataEcharts.typeList, ...typeList.value],
"NAME"
);
}; };
onMounted(() => {
fnGetData(); fnGetData();
});
const fnInitEcharts = (count, total, color, el) => {
const myChart = echarts.init(document.querySelector(el));
const option = {
grid: {
left: "10%",
right: "0%",
bottom: "0%",
top: "100%",
containLabel: true,
},
xAxis: {
show: false,
type: "value",
},
yAxis: {
type: "category",
show: false,
},
series: [
{
name: "次数",
type: "bar",
zlevel: 1,
itemStyle: {
barBorderRadius: 0,
color,
},
label: {
show: true,
position: "inside",
},
barWidth: 15,
data: [count],
},
{
name: "背景",
type: "bar",
barWidth: 15,
barGap: "-100%",
data: [total],
itemStyle: {
color: "#101f48",
barBorderRadius: 0,
},
},
],
};
myChart.setOption(option);
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -199,11 +173,9 @@ const fnInitEcharts = (count, total, color, el) => {
} }
} }
#main1, .el-progress {
#main2, margin-left: 10px;
#main3 {
flex: 1; flex: 1;
height: 20px;
} }
} }
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="login"> <div class="login">
<div class="main"> <div class="main">
<div class="title">危化安全生产管理平台</div> <div class="title">安全生产信息化平台</div>
<div class="form"> <div class="form">
<el-form <el-form
ref="formRef" ref="formRef"

View File

@ -148,11 +148,9 @@ import { ElMessage, ElMessageBox } from "element-plus";
import { nextTick, reactive } from "vue"; import { nextTick, reactive } from "vue";
import LayoutImportFile from "@/components/import_file/index.vue"; import LayoutImportFile from "@/components/import_file/index.vue";
import Add from "./components/add.vue"; import Add from "./components/add.vue";
// import { useRouter } from "vue-router";
import QrCode from "./components/qr_code.vue"; import QrCode from "./components/qr_code.vue";
import LayoutTooltipImg from "@/components/tooltip_img/index.vue"; import LayoutTooltipImg from "@/components/tooltip_img/index.vue";
import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js"; import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
// const router = useRouter();
const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } = const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } =
useListData(getIdentifyingPartsList); useListData(getIdentifyingPartsList);
const data = reactive({ const data = reactive({