import _default, * as esriLoader from 'esri-loader';

const options = {
  url: '/arcgisApi/4.7/init.js',
};
function dxsSttpFormat(sttp) {
  //地下水监测站类型
  return sttp == 'NATIONAL'
    ? '国家级监测站'
    : sttp == 'PROVAUTO'
      ? '省级自动监测站'
      : sttp == 'PROVHAND'
        ? '省级手动监测站'
        : sttp == 'PRO'
          ? '省级监测站'
          : '';
}
function gateTypeFormat(sttp) {
  //水闸类型
  return sttp == '1'
    ? '分(泄)洪闸'
    : sttp == '2'
      ? '节制闸'
      : sttp == '3'
        ? '排(退)水闸'
        : sttp == '4'
          ? '引(进)水闸'
          : sttp == '5'
            ? '挡潮闸'
            : sttp == '6'
              ? '船闸'
              : sttp == '9'
                ? '其它'
                : '';
}
function typeFormat172(sttp) {
  //172类型
  return sttp == '0'
    ? '重大农业节水工程'
    : sttp == '1'
      ? '重大引调水工程'
      : sttp == '2'
        ? '重点水源工程'
        : sttp == '3'
          ? '江河湖泊治理骨干工程'
          : sttp == '4'
            ? '新建大型灌区工程'
            : sttp == '5'
              ? '非水利部下达投资计划'
              : sttp == '6'
                ? '全部由地方投资'
                : sttp == '7'
                  ? '其他项目15项'
                  : '';
}
function qsFormat(val) {
  return val == '1' ? '自流' : val == '2' ? '抽提' : '';
}
function dbssydFormat(val) {
  return val == '1'
    ? '水库'
    : val == '2'
      ? '湖泊'
      : val == '3'
        ? '河流'
        : val == '9'
          ? '其他'
          : '';
}
function swzFormat(sttp) {
  return sttp == 'MM'
    ? '气象站'
    : sttp == 'PP'
      ? '雨量站'
      : sttp == 'BB'
        ? '蒸发站'
        : sttp == 'ZQ'
          ? '河道水文站'
          : sttp == 'DD'
            ? '堰闸水文站'
            : sttp == 'ZZ'
              ? '河道水位站'
              : sttp == 'TT'
                ? '潮位站'
                : sttp == 'RR'
                  ? '水库水文站'
                  : sttp == 'DP'
                    ? '泵站'
                    : sttp == 'ZG'
                      ? '地下水站'
                      : sttp == 'SS'
                        ? '墒情站'
                        : sttp == 'ZB'
                          ? '分洪水位站'
                          : '';
}
var pt, pt1;
export function locationHandler(_self, item, type, layerId) {
  esriLoader
    .loadModules(
      [
        'esri/Graphic',
        'esri/layers/GraphicsLayer',
        'esri/geometry/Point',
        'esri/geometry/SpatialReference',
        'esri/geometry/Polygon',
        'esri/geometry/Polyline',
        'esri/symbols/SimpleLineSymbol',
      ],
      options,
    )
    .then(
      ([
        Graphic,
        GraphicsLayer,
        Point,
        SpatialReference,
        Polygon,
        Polyline,
        SimpleLineSymbol,
      ]) => {
        if (type == 'person') {
          //人员
          if (item.lgtd && item.lttd) {
            pt1 = new Point(
              item.lgtd - 0.08,
              item.lttd,
              new SpatialReference(4326),
            ); //用于定位偏移
            pt = new Point(item.lgtd, item.lttd, new SpatialReference(4326));
            _self.viewObject.popup.open({
              title: item.persName,
              content:
                '<div>' +
                '<table>' +
                '<tr>' +
                '<td>人员姓名</td>' +
                '<td>' +
                item.persName +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>手机号码</td>' +
                '<td>' +
                item.mobilenumb +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>最近上线时间</td>' +
                '<td>' +
                item.operateTime +
                '</td>' +
                '</tr>' +
                '</table>' +
                '</div>' +
                "<div style='margin-top:10px;'>" +
                "<p style='margin:0px;color: #1311129c;'>提示：点击图标查看详细信息</p>" +
                '</div>',
              location: pt,
            });
          } else {
            _self.showMessage('无法获取空间信息！');
          }
        } else if (layerId == 'shgcGraphicLayer') {
          //水毁工程
          if (item.lgtd && item.lttd) {
            pt1 = new Point(
              item.lgtd - 0.08,
              item.lttd,
              new SpatialReference(4326),
            ); //用于定位偏移
            pt = new Point(item.lgtd, item.lttd, new SpatialReference(4326));
            _self.viewObject.popup.open({
              title: item.nm,
              content:
                '<div>' +
                '<table>' +
                '<tr>' +
                '<td>工程类别</td>' +
                '<td>' +
                item.wtdstType +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>所在位置</td>' +
                '<td>' +
                item.locNm +
                '</td>' +
                '</tr>' +
                '</table>' +
                '</div>' +
                "<div style='margin-top:10px;'>" +
                "<p style='margin:0px;color: #1311129c;'>提示：点击图标查看详细信息</p>" +
                '</div>',
              location: pt,
            });
          } else {
            _self.showMessage('无法获取空间信息！');
          }
        } else if (layerId == 'xzcGraphicLayer') {
          //人饮行政村
          if (item.lgtdPc && item.lttdPc) {
            pt1 = new Point(
              item.lgtdPc - 0.08,
              item.lttdPc,
              new SpatialReference(4326),
            ); //用于定位偏移
            pt = new Point(
              item.lgtdPc,
              item.lttdPc,
              new SpatialReference(4326),
            );
            _self.viewObject.popup.open({
              title: item.adNm,
              content:
                '<div>' +
                "<table style='width:100%;'>" +
                '<tr>' +
                '<td>督查时间</td>' +
                '<td>' +
                item.visitDate.substring(0, 10) +
                '</td>' +
                '</tr>' +
                '</table>' +
                '</div>' +
                "<div style='margin-top:10px;'>" +
                "<p style='margin:0px;color: #1311129c;'>提示：点击图标查看详细信息</p>" +
                '</div>',
              location: pt,
            });
          } else {
            _self.showMessage('无法获取空间信息！');
          }
        } else if (layerId == 'ncysgcGraphicLayer') {
          //农村饮水工程
          if (item.cwsLong && item.cwsLat) {
            pt1 = new Point(
              item.cwsLong - 0.08,
              item.cwsLat,
              new SpatialReference(4326),
            ); //用于定位偏移
            pt = new Point(
              item.cwsLong,
              item.cwsLat,
              new SpatialReference(4326),
            );
            _self.viewObject.popup.open({
              title: item.cwsName,
              content:
                '<div>' +
                "<table style='width:100%;'>" +
                '<tr>' +
                '<td>所在地</td>' +
                '<td>' +
                item.cwsLoc +
                '</td>' +
                '</tr>' +
                '</table>' +
                '</div>' +
                "<div style='margin-top:10px;'>" +
                "<p style='margin:0px;color: #1311129c;'>提示：点击图标查看详细信息</p>" +
                '</div>',
              location: pt,
            });
          } else {
            _self.showMessage('无法获取空间信息！');
          }
        } else if (layerId == 'country150Layer') {
          //150县
          if (item.lgtd && item.lttd) {
            pt1 = new Point(
              item.lgtd - 0.08,
              item.lttd,
              new SpatialReference(4326),
            ); //用于定位偏移
            pt = new Point(item.lgtd, item.lttd, new SpatialReference(4326));
            _self.viewObject.popup.open({
              title: item.adName,
              content:
                '<div>' +
                "<table style='width:100%;'>" +
                '<tr>' +
                '<td>所在地</td>' +
                '<td>' +
                item.adFullName +
                '</td>' +
                '</tr>' +
                '</table>' +
                '</div>' +
                "<div style='margin-top:10px;'>" +
                "<p style='margin:0px;color: #1311129c;'>提示：点击图标查看详细信息</p>" +
                '</div>',
              location: pt,
            });
          } else {
            _self.showMessage('无法获取空间信息！');
          }
        } else if (layerId == 'graphicLayer172') {
          //172
          if (item.lgtdPc && item.lttdPc) {
            pt1 = new Point(
              item.lgtdPc - 0.08,
              item.lttdPc,
              new SpatialReference(4326),
            ); //用于定位偏移
            pt = new Point(
              item.lgtdPc,
              item.lttdPc,
              new SpatialReference(4326),
            );
            _self.viewObject.popup.open({
              title: item.nm,
              content:
                '<div>' +
                "<table style='width:100%;'>" +
                '<tr>' +
                '<td>项目类型</td>' +
                '<td>' +
                typeFormat172(item.ptype) +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>管理单位</td>' +
                '<td>' +
                item.unitNm +
                '</td>' +
                '</tr>' +
                '</table>' +
                '</div>' +
                "<div style='margin-top:10px;'>" +
                // "<p style='margin:0px;color: #1311129c;'>提示：点击图标查看详细信息</p>"+
                '</div>',
              location: pt,
            });
          } else {
            _self.showMessage('无法获取空间信息！');
          }
        } else if (layerId == 'szGraphicLayer') {
          //水闸
          if (item.lgtd && item.lttd && item.lgtd > 0 && item.lttd > 0) {
            pt1 = new Point(
              item.lgtd - 0.08,
              item.lttd,
              new SpatialReference(4326),
            ); //用于定位偏移
            pt = new Point(item.lgtd, item.lttd, new SpatialReference(4326));
            _self.viewObject.popup.open({
              title: item.gateName,
              content:
                '<div>' +
                "<table style='width:100%;'>" +
                '<tr>' +
                '<td>水闸类型</td>' +
                '<td>' +
                gateTypeFormat(item.gateType) +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>所属河流</td>' +
                '<td>' +
                item.riverName +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>归口管理部门</td>' +
                '<td>' +
                item.gateAdmName +
                '</td>' +
                '</tr>' +
                '</table>' +
                '</div>' +
                "<div style='margin-top:10px;'>" +
                "<p style='margin:0px;color: #1311129c;'>提示：点击图标查看详细信息</p>" +
                '</div>',
              location: pt,
            });
          } else {
            _self.showMessage('无法获取空间信息！');
          }
        } else if (layerId == 'szGraphicLayerAll') {
          //全部水闸
          if (
            item.centerX &&
            item.centerY &&
            item.centerX > 0 &&
            item.centerY > 0
          ) {
            pt1 = new Point(
              item.centerX - 0.08,
              item.centerY,
              new SpatialReference(4326),
            ); //用于定位偏移
            pt = new Point(
              item.centerX,
              item.centerY,
              new SpatialReference(4326),
            );
            _self.viewObject.popup.open({
              title: item.gateName,
              content:
                '<div>' +
                "<table style='width:100%;'>" +
                '<tr>' +
                '<td>水闸类型</td>' +
                '<td>' +
                gateTypeFormat(item.gateType) +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>所属河流</td>' +
                '<td>' +
                item.locRvName +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>归口管理部门</td>' +
                '<td>' +
                item.gateAdmName +
                '</td>' +
                '</tr>' +
                '</table>' +
                '</div>' +
                "<div style='margin-top:10px;'>" +
                // "<p style='margin:0px;color: #1311129c;'>提示：点击图标查看详细信息</p>"+
                '</div>',
              location: pt,
            });
          } else {
            _self.showMessage('无法获取空间信息！');
          }
        } else if (layerId == 'dxsGraphicLayer') {
          //地下水
          if (
            item.lgtdPc &&
            item.lttdPc &&
            item.lgtdPc > 0 &&
            item.lttdPc > 0
          ) {
            pt1 = new Point(
              item.lgtdPc - 0.08,
              item.lttdPc,
              new SpatialReference(4326),
            ); //用于定位偏移
            pt = new Point(
              item.lgtdPc,
              item.lttdPc,
              new SpatialReference(4326),
            );
            _self.viewObject.popup.open({
              title: item.stnm,
              content:
                '<div>' +
                "<table style='width:100%;'>" +
                '<tr>' +
                '<td>测站类型</td>' +
                '<td>' +
                dxsSttpFormat(item.sttp) +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>测站位置</td>' +
                '<td>' +
                item.stlc +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>管理单位</td>' +
                '<td>' +
                item.mnun +
                '</td>' +
                '</tr>' +
                '</table>' +
                '</div>' +
                "<div style='margin-top:10px;'>" +
                // "<p style='margin:0px;color: #1311129c;'>提示：点击图标查看详细信息</p>"+
                '</div>',
              location: pt,
            });
          } else {
            _self.showMessage('无法获取空间信息！');
          }
        } else if (layerId == 'graphicLayerQsk') {
          //取水口
          if (
            item.centerX &&
            item.centerY &&
            item.centerX > 0 &&
            item.centerY > 0
          ) {
            pt1 = new Point(
              item.centerX - 0.08,
              item.centerY,
              new SpatialReference(4326),
            ); //用于定位偏移
            pt = new Point(
              item.centerX,
              item.centerY,
              new SpatialReference(4326),
            );
            _self.viewObject.popup.open({
              title: item.stnm,
              content:
                '<div>' +
                "<table style='width:100%;'>" +
                '<tr>' +
                '<td>取水方式</td>' +
                '<td>' +
                qsFormat(item.wintType) +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>取水口位置</td>' +
                '<td>' +
                item.wintPos +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>管理单位</td>' +
                '<td>' +
                item.admName +
                '</td>' +
                '</tr>' +
                '</table>' +
                '</div>' +
                "<div style='margin-top:10px;'>" +
                // "<p style='margin:0px;color: #1311129c;'>提示：点击图标查看详细信息</p>"+
                '</div>',
              location: pt,
            });
          } else {
            _self.showMessage('无法获取空间信息！');
          }
        } else if (layerId == 'graphicLayerDbssyd') {
          //地表水水源地
          if (
            item.swhsLong &&
            item.swhsLat &&
            item.swhsLong > 0 &&
            item.swhsLat > 0
          ) {
            pt1 = new Point(
              item.swhsLong - 0.08,
              item.swhsLat,
              new SpatialReference(4326),
            ); //用于定位偏移
            pt = new Point(
              item.swhsLong,
              item.swhsLat,
              new SpatialReference(4326),
            );
            _self.viewObject.popup.open({
              title: item.swhsName,
              content:
                '<div>' +
                "<table style='width:100%;'>" +
                '<tr>' +
                '<td>测站类型</td>' +
                '<td>' +
                dbssydFormat(item.wainWasoType) +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>测站位置</td>' +
                '<td>' +
                item.swhsLoc +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>管理单位</td>' +
                '<td>' +
                item.insName +
                '</td>' +
                '</tr>' +
                '</table>' +
                '</div>' +
                "<div style='margin-top:10px;'>" +
                // "<p style='margin:0px;color: #1311129c;'>提示：点击图标查看详细信息</p>"+
                '</div>',
              location: pt,
            });
          } else {
            _self.showMessage('无法获取空间信息！');
          }
        } else if (layerId == 'graphicLayerSwz') {
          //水文站
          if (item.lgtd && item.lttd && item.lgtd > 0 && item.lttd > 0) {
            pt1 = new Point(
              item.lgtd - 0.08,
              item.lttd,
              new SpatialReference(4326),
            ); //用于定位偏移
            pt = new Point(item.lgtd, item.lttd, new SpatialReference(4326));
            _self.viewObject.popup.open({
              title: item.stnm,
              content:
                '<div>' +
                "<table style='width:100%;'>" +
                '<tr>' +
                '<td>测站类型</td>' +
                '<td>' +
                swzFormat(item.sttp) +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>测站位置</td>' +
                '<td>' +
                item.stlc +
                '</td>' +
                '</tr>' +
                '<tr>' +
                '<td>隶属单位</td>' +
                '<td>' +
                item.atcunit +
                '</td>' +
                '</tr>' +
                '</table>' +
                '</div>' +
                "<div style='margin-top:10px;'>" +
                // "<p style='margin:0px;color: #1311129c;'>提示：点击图标查看详细信息</p>"+
                '</div>',
              location: pt,
            });
          } else {
            _self.showMessage('无法获取空间信息！');
          }
        } else if (layerId == 'allSkGraphicLayer') {
          //所有水库
          var feature = item;
          pt1 = new Point(
            item.longitude - 0.08,
            item.latitude,
            new SpatialReference(4326),
          ); //用于定位偏移
          pt = new Point(
            item.longitude,
            item.latitude,
            new SpatialReference(4326),
          );
          var str =
            '<div id="edituser">水库编码:&nbsp;&nbsp;' +
            feature.rsCode +
            '<br>' +
            '督查状态:&nbsp;&nbsp;' +
            feature.status +
            '<br>' +
            '所在位置:&nbsp;&nbsp;' +
            item.location +
            '<div style="display: flex;flex-direction: row;">' +
            '<div style="width:70px;cursor:pointer;color: #001fff;padding-right: 10px;"><span @click="showSkBaseInfo(' +
            "'" +
            feature.rsCode +
            "'" +
            ')" style="border-bottom: 1px solid blue;">' +
            '基础信息' +
            '</span></div><br>' +
            '</div></div>';
          _self.viewObject.popup.open({
            title: item.rsName,
            content: _self.initHtml(str),
            location: pt,
          });
        } else if (layerId == 'skGraphicLayer2018') {
          //2018水库
          var feature = item;
          pt1 = new Point(
            item.longitude - 0.08,
            item.latitude,
            new SpatialReference(4326),
          ); //用于定位偏移
          pt = new Point(
            item.longitude,
            item.latitude,
            new SpatialReference(4326),
          );
          var str =
            '<div id="edituser">水库编码:&nbsp;&nbsp;' +
            feature.rsCode +
            '<br>' +
            '督查状态:&nbsp;&nbsp;' +
            feature.status +
            '<br>' +
            '所在位置:&nbsp;&nbsp;' +
            item.location +
            '<div style="display: flex;flex-direction: row;">' +
            '<div style="width:70px;cursor:pointer;color: #001fff;padding-right: 10px;"><span @click="showSkBaseInfo(' +
            "'" +
            feature.rsCode +
            "'" +
            ')" style="border-bottom: 1px solid blue;">' +
            '基础信息' +
            '</span></div><br>' +
            '<div style="width:85px;cursor:pointer;color: #001fff;"><span @click="addSkToPlan(' +
            "'" +
            feature.rsCode +
            "'," +
            "'" +
            feature.rsName +
            "'," +
            "'" +
            feature.longitude +
            "'," +
            "'" +
            feature.latitude +
            "'" +
            ')" style="border-bottom: 1px solid blue;">' +
            '加入督查计划' +
            '</span></div>' +
            '</div></div>';
          _self.viewObject.popup.open({
            title: item.rsName,
            content: _self.initHtml(str),
            location: pt,
          });
        } else if (layerId == 'skGraphicLayer2019') {
          //2019水库
          var feature = item;
          pt1 = new Point(
            item.longitude - 0.08,
            item.latitude,
            new SpatialReference(4326),
          ); //用于定位偏移
          pt = new Point(
            item.longitude,
            item.latitude,
            new SpatialReference(4326),
          );
          var str =
            '<div id="edituser">水库编码:&nbsp;&nbsp;' +
            feature.rsCode +
            '<br>' +
            '督查状态:&nbsp;&nbsp;' +
            feature.status +
            '<br>' +
            '所在位置:&nbsp;&nbsp;' +
            item.location +
            '<div style="display: flex;flex-direction: row;">' +
            '<div style="width:70px;cursor:pointer;color: #001fff;padding-right: 10px;"><span @click="showSkBaseInfo(' +
            "'" +
            feature.rsCode +
            "'" +
            ')" style="border-bottom: 1px solid blue;">' +
            '基础信息' +
            '</span></div><br>' +
            '<div style="width:70px;cursor:pointer;color: #001fff;padding-right: 10px;"><span @click="showSkDcInfo(' +
            "'" +
            feature.rsCode +
            "'," +
            "'" +
            feature.rsName +
            "'," +
            "'" +
            feature.rgstrId +
            "'," +
            "'" +
            feature.objId +
            "'" +
            ')" style="border-bottom: 1px solid blue;">' +
            '督查信息' +
            '</span></div><br>' +
            '</div></div>';
          _self.viewObject.popup.open({
            title: item.rsName,
            content: _self.initHtml(str),
            location: pt,
          });
        } else if (layerId == 'fcskGraphicLayer') {
          //复查水库
          var feature = item;
          pt1 = new Point(
            item.longitude - 0.08,
            item.latitude,
            new SpatialReference(4326),
          ); //用于定位偏移
          pt = new Point(
            item.longitude,
            item.latitude,
            new SpatialReference(4326),
          );
          var str =
            '<div id="edituser">水库编码:&nbsp;&nbsp;' +
            feature.rsCode +
            '<br>' +
            '督查状态:&nbsp;&nbsp;' +
            feature.status +
            '<br>' +
            '所在位置:&nbsp;&nbsp;' +
            item.location +
            '<div style="display: flex;flex-direction: row;">' +
            '<div style="width:70px;cursor:pointer;color: #001fff;padding-right: 10px;"><span @click="showSkBaseInfo(' +
            "'" +
            feature.rsCode +
            "'" +
            ')" style="border-bottom: 1px solid blue;">' +
            '基础信息' +
            '</span></div><br>' +
            '<div style="width:70px;cursor:pointer;color: #001fff;padding-right: 10px;"><span @click="showSkDcInfo(' +
            "'" +
            feature.rsCode +
            "'," +
            "'" +
            feature.rsName +
            "'," +
            "'" +
            feature.longitude +
            "'," +
            "'" +
            feature.latitude +
            "'" +
            ')" style="border-bottom: 1px solid blue;">' +
            '督查信息' +
            '</span></div><br>' +
            '</div></div>';
          _self.viewObject.popup.open({
            title: item.rsName,
            content: _self.initHtml(str),
            location: pt,
          });
        } else if (layerId == 'jhwskGraphicLayer') {
          //计划外水库
          var feature = item;
          pt1 = new Point(
            item.longitude - 0.08,
            item.latitude,
            new SpatialReference(4326),
          ); //用于定位偏移
          pt = new Point(
            item.longitude,
            item.latitude,
            new SpatialReference(4326),
          );
          var str =
            '<div id="edituser">水库编码:&nbsp;&nbsp;' +
            feature.rsCode +
            '<br>' +
            '督查状态:&nbsp;&nbsp;' +
            feature.status +
            '<br>' +
            '所在位置:&nbsp;&nbsp;' +
            item.location +
            '<div style="display: flex;flex-direction: row;">' +
            '<div style="width:70px;cursor:pointer;color: #001fff;padding-right: 10px;"><span @click="showSkBaseInfo(' +
            "'" +
            feature.rsCode +
            "'" +
            ')" style="border-bottom: 1px solid blue;">' +
            '基础信息' +
            '</span></div><br>' +
            '<div style="width:85px;cursor:pointer;color: #001fff;"><span @click="addSkToPlan(' +
            "'" +
            feature.rsCode +
            "'," +
            "'" +
            feature.rsName +
            "'," +
            "'" +
            feature.longitude +
            "'," +
            "'" +
            feature.latitude +
            "'" +
            ')" style="border-bottom: 1px solid blue;">' +
            '加入督查计划' +
            '</span></div>' +
            '</div></div>';
          _self.viewObject.popup.open({
            title: item.rsName,
            content: _self.initHtml(str),
            location: pt,
          });
        } else if (layerId == 'bjGraphicLayer') {
          //标记
          var feature = item;
          pt1 = new Point(
            item.lgtd - 0.14,
            item.lttd,
            new SpatialReference(4326),
          ); //用于定位偏移
          pt = new Point(item.lgtd, item.lttd, new SpatialReference(4326));
          var str =
            '<div>' +
            '<div>' +
            "<div style='display: flex;padding: 5px;'>" +
            "<p style='font-size: 14px;padding: 5px;'>名称:</p>" +
            "<input type='text' id='nameId' style='height: 33px;width: 216px;' value=" +
            feature.inteName +
            '>' +
            '</div>' +
            "<div style='display: flex;padding: 5px;'>" +
            "<p style='font-size: 14px;padding: 5px;'>备注:</p>" +
            "<textarea id='noteId' rows='6' cols='28' style='width: 216px;'value=" +
            feature.des +
            '>' +
            feature.des +
            '</textarea>' +
            '</div>' +
            '</div>' +
            "<div style='margin-top:10px;float: right;'>" +
            "<button type='button' style='margin-right: 20px;width: 50px;' @click='cancelHandler()'>取消</button>" +
            '<button type="button" style="width: 50px;" @click="editHandler(' +
            "'" +
            feature.id +
            "'," +
            "'" +
            feature.inteName +
            "'," +
            "'" +
            feature.des +
            "'" +
            ')">保存</button>' +
            '</div>' +
            '</div>';
          _self.viewObject.popup.open({
            title: '',
            content: _self.initHtml(str),
            location: pt,
          });
        }
        if (pt) {
          if (layerId == 'country150Layer') {
            _self.viewObject
              .goTo({
                target: pt1,
                zoom: 8,
              })
              .then((info) => {
                _self.afterLocation();
              });
          } else {
            _self.viewObject
              .goTo({
                target: pt1,
                zoom: 12,
              })
              .then((info) => {
                _self.afterLocation();
              });
          }
        }
      },
    );
}
