From 17b2d46a754654d4476b1e8648ac1b19a9ccbac1 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Wed, 16 Jun 2021 16:42:16 +0800
Subject: [PATCH] 增加图例 图片可放大
---
widgets/searchL/Widget.js | 62 +++++++++++++++----------------
1 files changed, 30 insertions(+), 32 deletions(-)
diff --git a/widgets/searchL/Widget.js b/widgets/searchL/Widget.js
index 61febf1..ce4707f 100644
--- a/widgets/searchL/Widget.js
+++ b/widgets/searchL/Widget.js
@@ -316,27 +316,28 @@
},
//定位实体位置
shiti: function (data, i) {
+ console.log(data)
var imgs = i == 1 ? 'images/addL/全景.png' : i == 2 ? 'images/addL/监控.png' : i == 3 ? 'images/addL/监测.png' : '';
this.addOneEntitys.add({
id: data.id, // 实体ID
name: data.name, // 实体名称
position: Cesium.Cartesian3.fromDegrees(Number(data.lon), Number(data.lat)), // x,y 实体经纬度
- // label: {
- // show: true,
- // text: item.siteName, // text 与实体相关的文字
- // font: "700 14px '黑体'",
- // fillColor: Cesium.Color.DEEPSKYBLUE,
- // // backgroundColor: Cesium.Color.DEEPSKYBLUE,
- // style: Cesium.LabelStyle.FILL_AND_OUTLINE,
- // outlineWidth: 2,
- // outlineColor: Cesium.Color.fromBytes(255, 255, 255), // 文字轮廓的颜色
- // verticalOrigin: Cesium.VerticalOrigin.CENTER,//垂直位置
- // horizontalOrigin: Cesium.HorizontalOrigin.LEFT,//水平位置
- // pixelOffset: new Cesium.Cartesian2(10, -10), // 文字位置
- // heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
- // distanceDisplayCondition: new Cesium.DistanceDisplayCondition(1, entityConfig.showheight),
- // disableDepthTestDistance: Number.POSITIVE_INFINITY
- // },
+ label: {
+ show: true,
+ text: data.name, // text 与实体相关的文字
+ font: "700 17px '黑体'",
+ fillColor: Cesium.Color.RED,
+ // backgroundColor: Cesium.Color.DEEPSKYBLUE,
+ style: Cesium.LabelStyle.FILL_AND_OUTLINE,
+ outlineWidth: 2,
+ outlineColor: Cesium.Color.fromBytes(0, 0, 0), // 文字轮廓的颜色
+ verticalOrigin: Cesium.VerticalOrigin.CENTER,//垂直位置
+ horizontalOrigin: Cesium.HorizontalOrigin.LEFT,//水平位置
+ pixelOffset: new Cesium.Cartesian2(-10, -30), // 文字位置
+ heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
+ // distanceDisplayCondition: new Cesium.DistanceDisplayCondition(1, entityConfig.showheight),
+ disableDepthTestDistance: Number.POSITIVE_INFINITY
+ },
billboard: {
show: true,
// image: 'images/addL/监测.png',
@@ -483,22 +484,8 @@
});
table.on('row(test1)', function (obj) {
- console.log(obj)
that.goOnPosition([obj.data.lon, obj.data.lat], 2, obj.data);
});
- // $('.layui-table-col-special').click((e) => {
- // e.stopPropagation();
- // if(e.toElement.innerText == '视频'){
-
- // }else if(e.toElement.innerText == '定位'){
-
- // }
- // console.log(e.toElement.innerText);
- // })
- // $('#test').on('click', 'div[lay-id="test"] .layui-table-body tr', function () {
- // var obj = table.cache.conManager[parseInt($(this).attr('data-index'))];
- // console.log(obj)
- // })
}
if (data2 != 1) {
@@ -605,12 +592,23 @@
</tr>
<tr>
<th>图片:</th>
- <td class="left" colspan="3">
- <img src="${obj.data.attList[0].uaOriginPath}" alt="">
+ <td class="left" colspan="3" id="popupsimg">
+ <img layer-src="${obj.data.attList[0].uaOriginPath}" src="${obj.data.attList[0].uaOriginPath}" alt="">
</td>
</tr>`;
str += '</table>';
XQDom.append(str);
+ // 相册层
+ layui.use(['form', 'layer'], function () {
+
+ //----------模块----------
+ var form = layui.form;
+ var layer = layui.layer;
+ layer.photos({
+ photos: '#popupsimg'
+ , anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
+ });
+ });
},
getshuiwen: function (stcd) {
var that = this;
--
Gitblit v1.9.3