日常工作技术点总结

news/2024/12/21 22:42:11/

1,在el-input中只能输入数值与小数点,且不会有其他的校验影响

//在模板中
<el-col :span="7"><el-form-item label="建设单位支付(元)" prop="unitAmount" label-width="120px">el-input v-model="look_detil.unitAmount" @input="handleInputunit"placeholder="请输入建设单位支付"></el-input></el-form-item></el-col>//在方法中使用handleInputunit(value) {this.look_detil.unitAmount = value.replace(/[^\d.]/g, '');},

2,在arcgis中给点位文字添加文字并且文字描边

javascript">return new esri.Graphic({geometry: {type: "point", // autocasts as new Point()longitude: w.proLong,latitude: w.proLat,spatialReference: {wkid: 4326,},},symbol: {type: "text", // autocasts as new PictureMarkerSymbol()text: w.proName,//显示文字文本// color: "#409EFF",xoffset: 0, //文字的x轴偏移量yoffset: -15,//文字的y轴偏移量color: "#FFF", //文字的颜色haloColor: [0, 0, 0], // 阴影颜色haloSize: "2px", //阴影部分加粗font: {size: 12, //文字字号weight:'bold'//文字加粗}},attributes: attributes,});

3,arcgis重新设定中心点(点击树形菜单时,动态切换点位置弹窗)

javascript">mapview.goTo({center: [item.lgtd, item.lttd] // 设置新的中心点坐标});

4,在arcgis中自定义设定弹窗,并且传赋值数据

javascript">//在模板中
<div ref="infoBox" class="popupinfo"><div class="content"><div class="left-content">站点编码 :</div><div class="right-content">{{attributes.stcd || '-'}} </div></div>
</div>//在任意位置需要赋值的情况下mapview.popup.open({content: this.$refs.infoBox,location: [item.lgtd, item.lttd],})

5,在设置点位,初始加载的时候,添加自定义点的位置信息及数据,设置标点

javascript">      loadArcgisMap() {const ZHExtent = new esri.Extent({xmin: 117.5322298560147,ymin: 31.800784614565874,xmax: 117.88052778933827,ymax: 31.955502222842245,spatialReference: {wkid: 4326,},});GZJD_Layer = new esri.WebTileLayer({id: 'GZ-JD',urlTemplate: 'http://10.34.0.13:6080/arcgis/rest/services/BASEMAP/JCYJ_YZT/MapServer/WMTS?service=WMTS&version=1.0.0&request=GetTile&layer=BASEMAP&style=default&tileMatrixSet=default028mm&tileMatrix={level}&TileRow={row}&TileCol={col}&format=image/png',//urlTemplate: 'http://10.34.0.106:10009/hhglapi/arcgis12/rest/services/AHSLIMG_CHINA/MapServer/tile/{level}/{row}/{col}',//urlTemplate: 'https://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS?service=WMTS&version=1.0.0&request=GetTile&layer=WorldTimeZones&style=default&tileMatrixSet=default028mm&tileMatrix=1&TileRow=0&TileCol=0&format=image/png',//urlTemplate: 'http://112.124.21.72:7070/geoserver/gwc/service/wmts?layer=AH-JD2.13&style=&tilematrixset=EPSG:4326_AH-JD2.13&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&TileMatrix=EPSG:4326_AH-JD2.13:{level}&TileRow={row}&TileCol={col}',spatialReference: new esri.SpatialReference({wkid: 102100}),visible:false,tileInfo: {rows: 256,cols: 256,origin: {x: -2.0037508342787E7,y: 2.0037508342787E7},'spatialReference': {'wkid': 102100},'lods': [{'level': 0,'resolution': 156543.033928,'scale': 5.91657527591555E8}, {'level': 1,'resolution': 78271.5169639999,'scale': 2.95828763795777E8}, {'level': 2,'resolution': 39135.7584820001,'scale': 1.47914381897889E8}, {'level': 3,'resolution': 19567.8792409999,'scale': 7.3957190948944E7}, {'level': 4,'resolution': 9783.93962049996,'scale': 3.6978595474472E7}, {'level': 5,'resolution': 4891.96981024998,'scale': 1.8489297737236E7}, {'level': 6,'resolution': 2445.98490512499,'scale': 9244648.868618}, {'level': 7,'resolution': 1222.99245256249,'scale': 4622324.434309}, {'level': 8,'resolution': 611.49622628138,'scale': 2311162.217155}, {'level': 9,'resolution': 305.748113140558,'scale': 1155581.108577}, {'level': 10,'resolution': 152.874056570411,'scale': 577790.554289}, {'level': 11,'resolution': 76.4370282850732,'scale': 288895.277144}, {'level': 12,'resolution': 38.2185141425366,'scale': 144447.638572}, {'level': 13,'resolution': 19.1092570712683,'scale': 72223.819286}, {'level': 14,'resolution': 9.55462853563415,'scale': 36111.909643}, {'level': 15,'resolution': 4.77731426794937,'scale': 18055.954822}, {'level': 16,'resolution': 2.38865713397468,'scale': 9027.977411}, {'level': 17,'resolution': 1.19432856685505,'scale': 4513.988705}, {'level': 18,'resolution': 0.597164283559817,'scale': 2256.994353}, {'level': 19,'resolution': 0.298582141647617,'scale': 1128.497176}]}});GZYX_Layer0 = new esri.WebTileLayer({id: 'GZ-YX0',urlTemplate: 'http://10.34.0.106:10009/hhglapi/arcgis12/rest/services/AHSLIMG_CHINA/MapServer/tile/{level}/{row}/{col}',spatialReference: new esri.SpatialReference({wkid: 102100}),tileInfo: {rows: 256,cols: 256,origin: {x: -2.0037508342787E7,y: 2.0037508342787E7},'spatialReference': {'wkid': 102100},'lods': [{'level': 0,'resolution': 156543.03392800014,'scale': 5.91657527591555E8}, {'level': 1,'resolution': 78271.51696399994,'scale': 2.95828763795777E8}, {'level': 2,'resolution': 39135.75848200009,'scale': 1.47914381897889E8}, {'level': 3,'resolution': 19567.87924099992,'scale': 7.3957190948944E7}, {'level': 4,'resolution': 9783.93962049996,'scale': 3.6978595474472E7}, {'level': 5,'resolution': 4891.96981024998,'scale': 1.8489297737236E7}, {'level': 6,'resolution': 2445.98490512499,'scale': 9244648.868618}, {'level': 7,'resolution': 1222.992452562495,'scale': 4622324.434309}, {'level': 8,'resolution': 611.4962262813797,'scale': 2311162.217155}, {'level': 9,'resolution': 305.74811314055756,'scale': 1155581.108577}, {'level': 10,'resolution': 152.87405657041106,'scale': 577790.554289}, {'level': 11,'resolution': 76.43702828507324,'scale': 288895.277144}, {'level': 12,'resolution': 38.21851414253662,'scale': 144447.638572}, {'level': 13,'resolution': 19.10925707126831,'scale': 72223.819286}, {'level': 14,'resolution': 9.554628535634155,'scale': 36111.909643}, {'level': 15,'resolution': 4.77731426794937,'scale': 18055.954822}, {'level': 16,'resolution': 2.388657133974685,'scale': 9027.977411}, {'level': 17,'resolution': 1.1943285668550503,'scale': 4513.988705}, {'level': 18,'resolution': 0.5971642835598172,'scale': 2256.994353}, {'level': 19,'resolution': 0.29858214164761665,'scale': 1128.497176}]}});GZYX_Layer1 = new esri.WebTileLayer({id: 'GZ-YX1',urlTemplate: 'http://10.34.0.106:10009/hhglapi/arcgis12/rest/services/AHSLIMG/MapServer/tile/{level}/{row}/{col}',spatialReference: new esri.SpatialReference({wkid: 102100}),tileInfo: {rows: 256,cols: 256,origin: {x: -2.0037508342787E7,y: 2.0037508342787E7},'spatialReference': {'wkid': 102100},'lods': [{'level': 0,'resolution': 156543.03392800014,'scale': 5.91657527591555E8}, {'level': 1,'resolution': 78271.51696399994,'scale': 2.95828763795777E8}, {'level': 2,'resolution': 39135.75848200009,'scale': 1.47914381897889E8}, {'level': 3,'resolution': 19567.87924099992,'scale': 7.3957190948944E7}, {'level': 4,'resolution': 9783.93962049996,'scale': 3.6978595474472E7}, {'level': 5,'resolution': 4891.96981024998,'scale': 1.8489297737236E7}, {'level': 6,'resolution': 2445.98490512499,'scale': 9244648.868618}, {'level': 7,'resolution': 1222.992452562495,'scale': 4622324.434309}, {'level': 8,'resolution': 611.4962262813797,'scale': 2311162.217155}, {'level': 9,'resolution': 305.74811314055756,'scale': 1155581.108577}, {'level': 10,'resolution': 152.87405657041106,'scale': 577790.554289}, {'level': 11,'resolution': 76.43702828507324,'scale': 288895.277144}, {'level': 12,'resolution': 38.21851414253662,'scale': 144447.638572}, {'level': 13,'resolution': 19.10925707126831,'scale': 72223.819286}, {'level': 14,'resolution': 9.554628535634155,'scale': 36111.909643}, {'level': 15,'resolution': 4.77731426794937,'scale': 18055.954822}, {'level': 16,'resolution': 2.388657133974685,'scale': 9027.977411}, {'level': 17,'resolution': 1.1943285668550503,'scale': 4513.988705}, {'level': 18,'resolution': 0.5971642835598172,'scale': 2256.994353}, {'level': 19,'resolution': 0.29858214164761665,'scale': 1128.497176}]}});GZYX_Layer2 = new esri.WebTileLayer({id: 'GZ-YX1',urlTemplate: 'http://10.34.0.106:10009/hhglapi/arcgis12/rest/services/AHYX_ZH0717/MapServer/tile/{level}/{row}/{col}',spatialReference: new esri.SpatialReference({wkid: 102100}),tileInfo: {rows: 256,cols: 256,origin: {x: -2.0037508342787E7,y: 2.0037508342787E7},'spatialReference': {'wkid': 102100},'lods': [{'level': 0,'resolution': 156543.033928,'scale': 5.91657527591555E8}, {'level': 1,'resolution': 78271.5169639999,'scale': 2.95828763795777E8}, {'level': 2,'resolution': 39135.7584820001,'scale': 1.47914381897889E8}, {'level': 3,'resolution': 19567.8792409999,'scale': 7.3957190948944E7}, {'level': 4,'resolution': 9783.93962049996,'scale': 3.6978595474472E7}, {'level': 5,'resolution': 4891.96981024998,'scale': 1.8489297737236E7}, {'level': 6,'resolution': 2445.98490512499,'scale': 9244648.868618}, {'level': 7,'resolution': 1222.992452562495,'scale': 4622324.434309}, {'level': 8,'resolution': 611.49622628138,'scale': 2311162.217155}, {'level': 9,'resolution': 305.748113140558,'scale': 1155581.108577}, {'level': 10,'resolution': 152.874056570411,'scale': 577790.554289}, {'level': 11,'resolution': 76.4370282850732,'scale': 288895.277144}, {'level': 12,'resolution': 38.2185141425366,'scale': 144447.638572}, {'level': 13,'resolution': 19.1092570712683,'scale': 72223.819286}, {'level': 14,'resolution': 9.55462853563415,'scale': 36111.909643}, {'level': 15,'resolution': 4.77731426794937,'scale': 18055.954822}]}});// GZYX_Layer0,map = new esri.Map({layers: [GZYX_Layer0,GZYX_Layer1,GZYX_Layer2,GZJD_Layer],title: 'AH_YX'});pointLayer = new GraphicsLayer({id: 'pointLayer'})map.add(pointLayer) // 添加图层至地图中mapview = new esri.MapView({container: "mapViewId",map: map,center: [117.35931075867336, 33.340344937300394],zoom: 12,constraints: {minZoom: 9, //调整地图缩小的最大值maxZoom: 19, //调整地图放大的最大值,但是低于12就不生效了},popup: {collapseEnabled: false,dockEnabled: false,dockOptions: {position: 'top-right',breakpoint: false,buttonEnabled: true, //弹窗按钮右侧停靠关闭alignment: 'right'},actions: [],//隐藏actions// maxInlineActions: 0autoOpenEnabled: false // 鼠标左击是否禁止}});//YX_Layer.visible=false;mapview.ui.components = []; //清空所有ESRI自带的组件//放大镜mapview.magnifier.visible = false; //开启/关闭 放大镜mapview.magnifier.factor = 1.7; // magnification factormapview.magnifier.size = 150; // magnifier image sizemapview.popup.actions = []mapview.magnifier.offset = {x: 75,y: 75};if (this.type === 1) {mapview.on("click", (evt) => {mapview.hitTest(evt).then(res => {if (res.results.length > 0 && res.results != null && res.results != undefined) {this.list = res.results[0].graphic.attributesif (res.results[0].graphic.geometry.type == 'point') {this.times = ''mapview.popup.open({content: this.$refs.infoBoxnumber,location: res.results[0].mapPoint,})}}})});this.loadTDData();} else if (this.type === 2) {mapview.on("click", (evt) => { //添加自定义点的位置及数据弹窗console.log(evt, '1111')mapview.hitTest(evt).then(res => {if (res.results.length > 0 && res.results != null && res.results != undefined) {this.attributes = res.results[0].graphic.attributesif (res.results[0].graphic.geometry.type == 'point') {mapview.popup.open({content: this.$refs.infoBox,location: res.results[0].mapPoint,})}}})});this.loadploydata()this.getPoint()}//设置标点},


http://www.ppmy.cn/news/1534487.html

相关文章

如何突破科技服务领域的客户管理困境?

在知识产权与科技服务领域&#xff0c;企业面临着独特的客户管理需求和挑战&#xff0c;这些挑战不仅要求高度的专业性和精细化操作&#xff0c;还涉及复杂的法律流程、数据保密性以及不断变化的客户需求。传统的客户管理方式&#xff0c;如纸质档案、简单的电子表格或人工处理…

初识Linux · 进程替换

目录 前言&#xff1a; 1 直接看代码和现象 2 解释原理 3 将代码改成多进程版本 4 认识所有函数并使用 前言&#xff1a; 由前面的章节学习&#xff0c;我们已经了解了进程状态&#xff0c;进程终止以及进程等待&#xff0c;今天&#xff0c;我们学习进程替换。进程替换我…

小程序电量

原生小程序&#xff1a; wx.getBatteryInfo({success: res > {console.log(res);}; }); success返回值&#xff1a; level设备电量&#xff0c;范围 1 - 100isCharging是否正在充电中 uniapp&#xff1a; uni.getBatteryInfo({success: res > {console.log(res);};…

论文笔记(四十七)Diffusion Policy: Visuomotor Policy

Diffusion Policy: Visuomotor Policy 文章概括摘要1. 介绍2. 扩散策略的公式化2.1 去噪扩散概率模型2.2 DDPM 训练2.3 用于视觉运动策略学习的扩散模型 3 关键设计决策3.1 网络架构选项3.2 视觉编码器3.3 噪声计划3.4 加速实时控制的推理 4. 扩散策略的四个引人入胜的特性4.1 …

Springboot + netty + rabbitmq + myBatis

目录 0.为什么用消息队列1.代码文件创建结构2.pom.xml文件3.三个配置文件开发和生产环境4.Rabbitmq 基础配置类 TtlQueueConfig5.建立netty服务器 rabbitmq消息生产者6.建立常规队列的消费者 Consumer7.建立死信队列的消费者 DeadLetterConsumer8.建立mapper.xml文件9.建立map…

如何在Spring Boot中有条件地运行CommandLineRunner Bean

PS 使用 Spring Boot 3.1.2 进行测试 1.使用ConditionalOnProperty ConditionalOnProperty仅当特定属性存在或具有特定值时&#xff0c;注释才会创建 Bean 。 在此示例中&#xff0c;仅当或文件中的CommandLineRunner属性db.init.enabled设置为 true时&#xff0c;才会执行。…

【GEE学习第三期】GEE常用函数总结

【GEE学习第三期】GEE常用函数总结 数据统计类ee.List.sequence函数 图像处理类ee.Geometry类‌defaultVisualizationVis函数 数据输入输出数值与绘图导出影像 参考 数据统计类 ee.List.sequence函数 用法如下&#xff1a; ee.List.sequence &#xff08;开始&#xff0c;结…

【力扣 | SQL题 | 每日三题】力扣1264, 1113, 1098, 1082

1. 力扣1264&#xff1a;页面推荐 1.1 题目&#xff1a; 朋友关系列表&#xff1a; Friendship ------------------------ | Column Name | Type | ------------------------ | user1_id | int | | user2_id | int | ------------------------ (user…