emap组件使用

本文深入探讨了jQuery插件的开发方法,包括$.fn方法的使用,插件的实例化和缓存,以及如何通过$.fn.extend扩展多个方法。特别介绍了emapdatatable插件的具体实现,展示了如何利用jQuery插件增强网页功能。

定义一个插件 plugin

$.fn.emapdatatable = function(options, params, callback, flag) { };

jquery中的$.fn的用法

一、$.fn.method()=function(){}和$.fn.extend({})的比较

jQuery.fn ===$.fn=== jQuery.prototype

  1. $.fn.method()=function(){}的调用,把方法扩展到了对象的prototype上,所以实例化一个jQuery对象的时候,它就具有了这些方法。由于有return this,所以支持链式,在调用的时候可以这样写:$('.blue').blueBorder().blueText();
  2. $.fn.extend({}) 是对$.fn.method()=function(){}的扩展,它可以定义多个方法:
  3. $.fn.extend({
        a: function() { },
        b: function() { }
    });

    等效于: 

    $.fn.a = function() { };
    $.fn.b = function() { };

     

  4.  $.extend({})  ,为jQuery类添加方法,可以理解为扩展静态方法

    $.extend({
        abc: function(){
            alert('abc');
        }
    });

     

 emapdatatable插件的具体实现

$.fn.emapdatatable = function(options, params, callback, flag) {
    var instance, initParams;
    instance = this.data('emapdatatable');
    initParams = this.data('initParams');
    if (options === true) return instance;
    /**
     * 判断插件是否已经实例化过,如果已经实例化了则直接返回该实例化对象
     */
    if (!instance) {
      //params为表格渲染的初始化参数,后续表格的reload始终会携带该参数
      $(this).data('initParams', options.params);
      return this.each(function() {
        //将实例化后的插件缓存在dom结构里(内存里)
        return $(this).data('emapdatatable', new Plugin(this, options));
      });
    }
    /**
     * 优雅处: 如果插件的参数是一个字符串,则 调用 插件的 字符串方法。
     * 如 $('#id').plugin('doSomething') 则实际调用的是 $('#id).plugin.doSomething();
     * doSomething是刚才定义的接口。
     * 这种方法 在 juqery ui 的插件里 很常见。
     */
    if ($.type(options) === 'string') {
      var paramsObj = $.extend({}, initParams, params);
      var querySetting = [];
      //默认如果请求参数中有高级搜索的参数 会把其他参数合并进高级搜索参数querySetting
      //如果flag为false则不合并。
      if (typeof paramsObj.querySetting != 'undefined' && flag !== false) {
        // add by liujun 2016-12-8 originQuerySettingType  queryStting处理前后保持相同的类型,如果之前的字符串则处理完后也序列号成字符串
        var originQuerySettingType = ''
        if (typeof paramsObj.querySetting === 'string') {
          querySetting = JSON.parse(paramsObj.querySetting);
          originQuerySettingType = 'string'
        } else {
          querySetting = paramsObj.querySetting
          originQuerySettingType = 'object'
        }
        $.each(paramsObj, function(k, v) {
          if (k != 'querySetting' && ($.type(v) == 'number' || $.type(v) == 'string' || $.type(v) == 'boolean')) {
            if ($.type(v) == 'string' && v.indexOf(',') > -1) {
              // var valueArr = v.split(',');
              // valueArr.forEach(function(item) {
              //     querySetting.push({
              //         name: k,
              //         value: item,
              //         linkOpt: 'or',
              //         builder: 'm_value_equal'
              //     });
              // });
              // add form OA焦祖春 把OR变成AND 因为是emapdatatable的初始条件,跟其他条件应该是AND关系 by jbxu 2019-05-06
              querySetting.push({
                name: k,
                value: v,
                linkOpt: 'AND',
                builder: 'm_value_equal'
              });
            } else {
              querySetting.push({
                name: k,
                value: v,
                linkOpt: 'AND',
                builder: 'equal'
              });
            }
          }
        });

        if (originQuerySettingType === 'string') {
          paramsObj.querySetting = JSON.stringify(querySetting);
        }
        return instance[options](paramsObj, callback);
      }
      //存在初始化参数,携带初始化参数调用方法
      if (initParams) {
        return instance[options](paramsObj, callback);
      }
      //直接使用传参
      return instance[options](params, callback);
    }
    return this;
};

 调用

  1. 根据id或class获取jquery对象:var $obj = $("#contanier");
  2. 由于事先通过$.fn.method()=function(){},把方法扩展到了对象的prototype上,所以实例化一个jQuery对象的时候,它就具有了这些方法;即$obj对象内部已经附带了这些方法了;在这里是$.fn.emapdatatable= function(options, params, callback, flag)。
  3. 调用jquery对象$obj中的emapdatatable方法,并且传入参数,进行表格的初始化
    //$.fn.emapdatatable= function(options, params, callback, flag)
    $obj.emapdatatable({"这里是参数集对象"});
    //参数集:初始化时参数及对应着options
    var options = {
    	pagePath: ROOT_PATH + pageUrl + ".do",
    	height: null,
    	minLineNum: (lineNum == undefined) ? 10 : lineNum,
    	params: (params == undefined) ? {} : params,
    	action: actionName,
    	pageable: (pageable == false) ? false : true,
    	sortable: (sortable == true) ? true : false,
    	customColumns: (customColumns == undefined) ? [] : customColumns,
    	selectionMode: selectionMode ? selectionMode : 'custom',
    	onceParams: (onceParams == undefined) ? {} : onceParams,
    	enableBrowserSelection: true,
    	fastRender: true,
    	rendered: renderedFunction,
    	pageSizeOptions: (pageSizeOptions == undefined) ? [10, 20, 50, 100] : pageSizeOptions,
    	pageSize: (pageSize == undefined) ? 10 : pageSize
    };
    
    //默认参数集
    $.fn.emapdatatable.defaults = {
        width: '100%',
        height: height,
        pageable: true,
        pagerMode: 'advanced',
        serverProcessing: true,
        pageSizeOptions: ['10', '20', '50', '100'],
        localization: localization,
        sortable: false,
        columnsReorder: false,
        selectionMode: "custom",
        enableBrowserSelection: true,
        incrementalSearch: false,
        columnsResize: true,
        defaultParams: false,
        onceParams: false,
        colHasMinWidth: true, // 列宽是否有默认最小值100px
        beforeSend: null,
        contextPath: '', //
        schema: true, // 启用schema,必须定义 contextPath   &&  未定义contextPath时   schema 不生效
        minLineNum: null,
        alwaysHide: ['WID', 'TBRQ', 'TBLX', 'CZRQ', 'CZZ', 'CZZXM'], // 自定义显示列的隐藏字段
        fastRender: false,
        canEdit: true,
        isCellEditable: null,
        isEditMode: false,
        editPageable: false,
        isOnceEmpty: false,
        mustSelect: true,
        defaultCellsRenderer: undefined,
        customOptions: null,
        saveSchemaCallback: null
    };

     

示例

/**
* @memberof module:emapdatatable
* @description 其他参数参考jqxDatatable{@link http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxdatatable/jquery-datatable-api.htm?search=}
* @prop {String} [pk=WID] - 数据主键字段
* @prop {String} [url] - 请求表格数据的后台接口, url和pagePath二选一必填
* @prop {String} [pagePath] - 请求表格数据页面地址, url和pagePath二选一必填
* @prop {Object} params - 请求参数
* @prop {Array} datamodel - 一般为emap返回的数据模型
* @prop {String} action - emap动作名
* @prop {Array} customColumns - 自定义表格列,colIndex:该自定义位于表格第几列,从0开始,最后一列可以设置‘last’; colField: 自定义列作用的列模型字段; type: 自定义列类型,支持checkbox,link,tpl。chekcbox不可定义colField参数,如果定义了colIndex,则customColumns数组必须按照colIndex值由小到大排序
* @prop {Object} replaceColumns - 现有列属性替换,该对象中的key对应模型的name属性,值对应jqwidget datatable column属性,如:{"XH":{sortable:true}},下面有示例代码
* @prop {Int|Stirng} [height] - 高度
* @prop {Boolean} [pageable=true] - 是否分页
* @prop {String} [pagerMode=advanced] - 分页形式 'advanced' 'simple'
* @prop {Boolean} [serverProcessing=true] - 是否开启服务端分页 
* @prop {Array} [pageSizeOptions=['10', '20', '50', '100']] - 分页条数选项
* @prop {String} [localization='zh-CN'] - 语言选择
* @prop {Boolean} [sortable=false] - 排序
* @prop {String} [selectionMode='custom'] - Sets or gets the selection mode. Possible values: "multipleRows", "singleRow" and "custom". In the "custom" mode, rows could be selected/unselected only through the API.
* @prop {Boolean} [enableBrowserSelection=true] - Enables or disables the default text selection of the web browser.
* @prop {Boolean} [columnsResize=true] - Sets or gets the jqxDataTable's columnsResize.
* @prop {Boolean} [colHasMinWidth=true] - 列宽是否有默认最小值100px
* @prop {Boolean} [schema=true] - 启用schema,必须定义 contextPath   &&  未定义contextPath时   schema 不生效
* @prop {String} [contextPath] - 根路径
* @prop {Int} [minLineNum] - 最小高度行数 
* @prop {Boolean} [fastRender=false] - 快速渲染, 用于提高表格渲染速度 
* @prop {Function} [beforeSend] - 请求发送前的回调函数
* @prop {Function} [downloadComplete] - 表格数据请求完成的回调 
* @prop {Boolean} [isOnceEmpty=false] - 表格默认是否为空,不加载数据
* @prop {Boolean} [mustSelect=true] - 自定义显示列弹窗是否开启必须勾选字段校验 
* @prop {Boolean} [columnsReorder=false] - 是否开启列拖拽排序 
* @prop {Function} [customOptions] - 初始化表格的options,允许干预
* @prop {Boolean} [fxss] - 是否开启开启防跨站脚本攻击,默认与WIS_EMAP_CONFIG['emapdatatable.fxss']相同
* @prop {Function} [defaultCellsRenderer] - 这是一个同步函数,设置该函数将会忽略默认渲染,必须返回一个字符串。函数的入参:row, column, value, rowData, colModel, settings
* @example
*/
$el.emapdatatable({
      pagePath: bs.api.pageModel,
      action: 'T_PXXX_XSJBXX_QUERY',
      customColumns: [{
          colIndex: '0',
          type: 'checkbox'
      }],
      sortable:true,
      replaceColumns:{
          "XH":{
              sortable:true,
              cellsRenderer: function(row, column, value, rowData){
                  console.log(111)
                  return value;
              }
          }
      },
      customOptions: function(jqxOptions) {
          return jqxOptions;
      }
  });

new Plugin实例化插件,并缓存在dom结构里(内存里)
       

① return $(this).data('emapdatatable', new Plugin(this, options));

② new Plugin(this, options);

//this指代当前dom对象
//options代表当前传入的setting参数集
//由new操作符,构造函数,得到新的实例,
var _dataTable_Instance = new Plugin(this, options);

 

new Plugin

(function() {
      var Plugin;
	  var editedBg = 'cell-edited';
	  var toDeleteKey = 'isToDelete';
	  var toDeleteLine = 'to-delete-line';
	  var showToDeleteLine = 'show-to-delete';

	  /**
	   * @module emapdatatable
	   * @alias 表格
	   * @description 数据表格 
	   */
	  Plugin = (function() {

        function Plugin(element, options) ==>调用_create()生成表格

		//供调用的方法
		Plugin.prototype.reload
		Plugin.prototype.reloadFirstPage
		Plugin.prototype.checkedRecords
		Plugin.prototype.checkedRowsIndex 
		Plugin.prototype.getTotalRecords
		Plugin.prototype.getResult
		Plugin.prototype.getRowsData
		Plugin.prototype.getSort
		Plugin.prototype.getModel
                //插件的私有方法
		function _create(instance) 
		function bindingComplete(instance, event)
		function _resetPageFooter(instance)
		function _handleHorizontalScrollBar(instance)
		function _handleVerticalScrollBar(instance) 
		function _handleMinHeight(instance)
		function _initSchema(instance, modelName, contextPath) 
		function _handleSortStyle(instance)
		function _convertEditModeCols(columns, newmodel)
		function _genColums(instance, jqxOptions, custom_ready, custom_rendered)
		function hideLoading(instance)
		function _scenesTableContentCheckboxClick($input, instance)

                //默认setting参数集
                $.fn.emapdatatable.defaults
)}.call(this);

 

<template> <div class="map-content"> <mapConfigs></mapConfigs> <myModal :modalVisible.sync="showModal" :isWarning="isWarning" :isArea="isArea" :resouceInfo="resouceInfo" @cancel="cancel" :hostDetailList="hostDetailList" :systemDetailList="systemDetailList"></myModal> <realPlayer :isShow="showVideoModal" :resouceInfo="resouceInfo" @cancel="cancel" :hostDetailList="hostDetailList"></realPlayer> <btnComponent :curBitmapMakerList="curBitmapMakerList" :map="map" :markerResourceFlooterIcon="markerResourceFlooterIcon" :fireControlLayerArr="fireControlLayerArr" :selectNode="selectNode" :mapState="mapStatePreparation"></btnComponent> </div> </template> <script> import mapConfigs from "@/components/scfComponents/emapComponentsV1_4_0/mapConfigBase"; // import factory from "./factory"; import layers from './layers'; import {mapApi} from "EvoEmap" import {nofifyClient} from '@/common/js/client' // 点位悬浮点击 import popup from "./mixin/popup"; // 添加点位到地图 import indexAddMakeToMap from "./mixin/indexAddMakeToMap"; // 报警点位循环变换 类 import keyMakerLoopClass from "./classFunction/keyMakerLoopClass"; // 创建报警队列中心 类 import evenQueueFunctionClass from "./classFunction/evenQueueFunctionClass"; // 热区 设备点位 数据组装 类 import waitAllMakeInfoDoneHandleClass from "./classFunction/waitAllMakeInfoDoneHandleClass"; // 添加 图层方法 import addNewLayerFunction from "./classFunction/addNewLayerFunction"; // 清除feature 方法 import clearAllLayersFunction from "./classFunction/clearAllLayersFunction"; // diff 对比点位信息 import diffMakerInfo from "./classFunction/diffMakerInfo"; import btnComponent from "./components/buttonComponent"; import myModal from "./components/myModal"; import realPlayer from "@/components/scfComponents/videoPlayers/realPlayer"; export default { mixins: [popup, indexAddMakeToMap], props: { curWarningMarker: { type: Object, default: () => ({}) }, isWarningDialog: { type: Boolean, default: false }, showTree: { type: Boolean, default: true }, selectNode: { type: Object, default: () => { return {}; } }, pollingMarker: { type: String, default: () => '', }, }, components: { mapConfigs, myModal, realPlayer, btnComponent }, data() { return { map: null, curBitmap: null, refsEmap: null, resouceInfo: {}, allLayers: layers, markerResourceList:[], //所有的点位资源 allLayersArr: [],//集成测试的所有图层 markerResourceFlooterIcon: [], //底部展示的点位资源 // 其它消防设备 fireControlLayerArr:[{ layerCode: 'fireControlLayer' }], // 和消防相关的点位资源 // 记录所有的 点位 allMarkerLayers:[ {layerCode: 'hotareaLayer'}, {layerCode: 'videoLayer'}, {layerCode: 'fireControlLayer'}, ], curBitmapMakerList: {}, statusObj:{ 1: 'alarm', 2: 'offline', 3: 'shield', 4: 'fault', 5: 'nomal', }, mapStatePreparation:{}, // 监控地图状态 keyMakerLoop:{}, waitAllMakeInfoDone:{}, addNewLayer: addNewLayerFunction, clearAllLayers: clearAllLayersFunction, evenQueueClass: {},// ------------ 90175 ----报警逻辑 --- diffMakerInfo: new diffMakerInfo(), // 对比点位信息 propMark: 'dataWall' } }, watch: { dataWallMap(newVal, old) { console.log("dataWallMap change ", newVal) this.map = newVal // 监控地图状态 this.setMapStatePreparation(0) // 开始挂载点位的 事件 this.getMarkerLayers() // 开始挂载点位的 事件 this.customizeMapFunction() }, curBitmapObj(newVal, old) { this.curBitmap = newVal }, refsEmapObj(newVal, old) { this.refsEmap = newVal }, // 组织切换 selectNode: { deep: true, immediate: false, handler(val, oldVal) { let data = {id: null} if(oldVal){ data = oldVal } if(val.id && val.id !== data.id) { this.$store.commit("setOrgTreeNode", val); // 监控地图状态 this.setMapStatePreparation(6) } }, }, pollingMarker: { deep: true, immediate: true, handler(newVal) { // 90175 每一分钟 刷新一次当前图标的 状态信息 用于 更新坐标的报警状态 // console.log("pollingMarker ==newVal==",newVal); if(newVal && Object.keys(this.curBitmapMakerList).length){ // 监控地图状态 this.setMapStatePreparation(5) } }, }, // 地图点击事件回调 mapEventCallbackData: { deep: false, immediate: false, handler(newVal, oldVal) { console.log("mapEventCallbackData val ==", newVal); var {type, event, features} = newVal this.resouceInfo.clickType = '' if(type == 'dblclick' && features) { // 获取点位对象 let feature = features[0] // 如果是聚合点位 if(feature.isClusterFeature && feature.size === 1) { feature = feature.getProperties().features[0] } // 获取点位对象信息 let markerInfo = feature.getMarkerInfo() console.log("markerInfo ==", markerInfo); if(( ["fireControlLayer", "fireControlLayerAlarm", "fireControlLayerFault"].includes(markerInfo.layerCode)) && !markerInfo.channelType) { console.log('打开设备详情'); this.isArea = false; this.showModal = true; this.resouceInfo = markerInfo.info; this.resouceInfo.clickType = type } // 热区下钻 if (markerInfo.layerCode === "hotareaLayerAlarm") { console.log('热区下钻 hotareaLayerAlarm', markerInfo); if (markerInfo.id) { mapApi.BitmapApi.getBitmapInfo(markerInfo.id).then(data => { if (!data.isMain && !data.picId) { this.$message.warning(this.$t('emap.tips.no-picture-info')) return false } this.map.vuexCommit('EMAP_SET_CENTERMAP_ID', {id: markerInfo.id}) }) } } } }, }, // ---------------- 90175 ------------ 未来需要 在报警处理后 或者设备状态改变后 设备的报警及时的消失 ----------- mapConfigWarningInfo(val) { // console.log('mapConfigWarningInfo == ', val); // if (!this.showTree) { // return; // } // 报警逻辑 // this.evenQueueFunction(val) this.evenQueueClass.evenQueueFunction(val) }, // 获取推送的故障 pushFaultData: { deep: true, immediate: false, handler(newVal) { // console.log("pushFaultData ==", newVal); // this.evenQueueFunction(newVal.data) // 接收故障 this.evenQueueClass.evenQueueFunction(newVal.data) }, }, }, computed: { ...Vuex.mapState({ // 90175 --- dataWallMap: store => store.dataWallMap, pushFaultData: store => store.alarm.pushFaultData, mapConfigWarningInfo: store => store.mapConfigWarningInfo, curBitmapObj: store => store.curBitmapObj, refsEmapObj: store => store.refsEmapObj, mapEventCallbackData: store => store.mapEventCallbackData, // --- end--- }), }, methods: { /** * 关闭弹窗的函数 * @param {*} */ cancel() { this.showModal = false; this.showVideoModal = false; }, /** * 监听到地图的信息的变化 开始执行点位的 操作 ---- */ customizeMapFunction(){ var emap = this.map // 混入 的 popup 的 方法 用于悬浮 this.setMapEvent(emap.map, emap); }, // ---------------- 90175 第一步清楚地图 添加图层 ---------------- /** * * 1、 获取地图的图层 * */ // 获取地图的图层 getMarkerLayers() { mapApi.ConfigApi.getMarkerLayers().then(res => { if (typeof res !== 'undefined' && res.length > 0) { // 该图层分类要在哪种地图类型下展示 mapType : -1 都不显示(GPS类设备), 0-GIS地图下,1-光栅图下,2-都显示 let curMapMode = this.map.mapConfig.gisMode // "1": 光栅地图, "0": gis地图, "3":三维地图 // console.log(`当前的地图类型: ${curMapMode}`) let list = null var fireControlLayerArr = this.fireControlLayerArr.map(item => { return item.layerCode }) if(!this.markerResourceFlooterIcon.length){ let markerResourceFlooterIcon = [] // console.log('fireControlLayerArr', ['hotareaLayer', 'videoLayer', ...fireControlLayerArr]); if(curMapMode == "1" || curMapMode == "0" ) { list = res.filter((item) => { item.active = true return item.mapType < 3 && item.mapType !== -1 && ['hotareaLayer', 'videoLayer', ...fireControlLayerArr].indexOf(item.layerCode)> -1 }) this.allLayersArr = res.filter((item) => { item.active = true return ['hotareaLayer', 'videoLayer', ...fireControlLayerArr].indexOf(item.layerCode) == -1 }) markerResourceFlooterIcon = res.filter((item) => { item.active = true return item.mapType < 3 && item.mapType !== -1 && ['hotareaLayer', 'videoLayer', 'fireControlLayer'].indexOf(item.layerCode)> -1 }) } this.markerResourceFlooterIcon = [] let layerCode2index = { 'fireControlLayer': 0, 'videoLayer': 1, 'hotareaLayer': 2 } markerResourceFlooterIcon.forEach(element => { this.markerResourceFlooterIcon[layerCode2index[element.layerCode]] = element }); this.markerResourceList = list } this.waitAllMakeInfoDoneHandle() } }) }, /** * 整理数据并将marke 放置到地图上 */ waitAllMakeInfoDoneHandle(){ this.curBitmapMakerList = {} this.waitAllMakeInfoDone.waitAllMakeInfoDoneHandle(this.markerResourceList, this.map, this.selectNode, (res) => { if(localStorage.getItem("showConsole")){ console.log('this.waitAllMakeInfoDone waitAllMakeInfoDoneHandle'); } this.curBitmapMakerList = res this.setMapStatePreparation(3) }) }, // ----------------- end -------------- /** * 记录 地图 状态 * @param {*} state 状态值 * * 0 dataWallMap 地图创建完成 * 1 addMarkeToMap 已将点位放在地图上 * 2 addNewLayer 已将图层放在地图上 * 3 waitAllMakeInfoDoneHandle 数据处理完成 放置图标之前 * 4 changeLayerOfFeature 完成图层切换后 * 5 pollingMarker 接受到 一分钟的轮询 * 6 selectNode 组织树切换 * 7 收到推送后处理信息 将 curBitmapMakerList 内部的点位的info 改变 */ setMapStatePreparation(state){ this.mapStatePreparation = { time: new Date().getTime(), state: state } this.setInfomation(state) }, setInfomation(state){ if(localStorage.getItem("showConsole")){ console.log('setMapStatePreparation==', state); } if(state === 0) { // 添加新的图层 // this.addNewLayer() this.addNewLayer(this.allLayers, this.map, (res) => { this.allMarkerLayers = res // 监控地图状态 this.setMapStatePreparation(2) }) this.keyMakerLoop.setMap(this.map) // 给报警循环传值地图 this.evenQueueClass.setMap(this.map) // 给报警推送处理传值地图 this.diffMakerInfo.setMap(this.map) // 给报对比点位信息传值地图 // mixin this.setShunt(false) // 切换地图重新判定 this.diffMakerInfo.initBitmapMakerList() //初始化数据 } if(state === 1){ } if(state === 2){ // 给报警队列中心传值 this.evenQueueClass.setAllMarkerLayers(this.allMarkerLayers) } if(state === 3){ // mixin 中的方法 添加点位到地图上 this.shuntInfo() } if(state == 4){ // 完成图层切换后 setMapStatePreparation 设置 1 用去去掉 点位的 名称 this.setMapStatePreparation(1) } if(state === 5){ // 第一版本逻辑是清除所有的 图层上的点位 但是 性能测试不通过,所以进行了 精准更新 diff 方法 // this.clearAllLayers(this.allMarkerLayers, this.map, () => { // this.waitAllMakeInfoDoneHandle() // }) this.waitAllMakeInfoDoneHandle() // if(this.pollingMarker.flag){ // this.waitAllMakeInfoDoneHandle() // } } if(state === 7){ // 这时点位信息发生了改变 这时就要即使赋值给 diff // 将最新的点位信息 传给 diff 类 setOldBitmapMakerList this.diffMakerInfo.setOldBitmapMakerList(this.curBitmapMakerList) this.setMapStatePreparation(1) } } // ------end -- }, created() { // 开始循环 this.keyMakerLoop = new keyMakerLoopClass() // console.log("this.keyMakerLoop ==", this.keyMakerLoop); this.keyMakerLoop.setAlarmMakerLoop() // 创建报警队列中心 this.evenQueueClass = new evenQueueFunctionClass() this.evenQueueClass.setMapStatePreparationFun(this.setMapStatePreparation) // console.log("this.evenQueueClass =", this.evenQueueClass); // 获取图层 上的所有点位 this.waitAllMakeInfoDone = new waitAllMakeInfoDoneHandleClass() // console.log("this.waitAllMakeInfoDone ==", this.waitAllMakeInfoDone); // 对比点位信息 // console.log('this.diffMakerInfo ==', this.diffMakerInfo); this.diffMakerInfo.setMapStatePreparationFun(this.setMapStatePreparation) } } </script> <style lang="less"> @import './mapControl.less'; @import "./emap.less"; .map-content{ .page{ display: none; } } </style> 详细介绍一下代码 以及代码逻辑
最新发布
07-19
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值