|
@@ -115,8 +115,8 @@ class MissionSchedule extends BaseWidget {
|
|
|
this.ajaxSend = new AjaxSend();
|
|
|
this.loadWait = this.AppX.runtimeConfig.loadWait;
|
|
|
if (this.AppX.appConfig.gisResource.filterMapRQ.config.length > 0) {
|
|
|
- this.analyzeUrl = this.AppX.appConfig.gisResource.filterMapRQ.config[2].url;
|
|
|
- this.mapServerUrl = this.AppX.appConfig.gisResource.filterMapRQ.config[3].url;
|
|
|
+ this.analyzeUrl = this.AppX.appConfig.gisResource.filterMapRQ.config['filterMapRQ3'].url;
|
|
|
+ this.mapServerUrl = this.AppX.appConfig.gisResource.filterMapRQ.config['filterMapRQ4'].url;
|
|
|
} else {
|
|
|
this.toast.show("图层过滤服务未配置");
|
|
|
}
|
|
@@ -158,11 +158,11 @@ class MissionSchedule extends BaseWidget {
|
|
|
this.setHtml(html);
|
|
|
this.ready();
|
|
|
//单选下拉框
|
|
|
- $('.planlinetype').multiselect({
|
|
|
- nonSelectedText: '请选择',
|
|
|
- enableFiltering: true,
|
|
|
- buttonWidth: '350px'
|
|
|
- });
|
|
|
+ $('.planlinetype').multiselect({
|
|
|
+ nonSelectedText: '请选择',
|
|
|
+ enableFiltering: true,
|
|
|
+ buttonWidth: '350px'
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -724,6 +724,282 @@ class MissionSchedule extends BaseWidget {
|
|
|
this.initEventVal();
|
|
|
}.bind(this));
|
|
|
}
|
|
|
+ queryPipes(geometry: any) {
|
|
|
+ var url = this.AppX.appConfig.gisResource.pipe.config[this.config.mapindex].url;//pipe
|
|
|
+ if (this.addData.deviceTypeIds.split(",").length > 1) {
|
|
|
+ var device_Type_Ids = this.addData.deviceTypeIds.split(",");
|
|
|
+ var forCounter = 0;//for循环计数
|
|
|
+ var forGpCounter = 0;
|
|
|
+ var layernameStr = [];
|
|
|
+ //var objectIdsStr = {};
|
|
|
+ var outfields = null;
|
|
|
+ this.objectIdsStr = {};
|
|
|
+ this.loadWait.show("正在查询选择" + this.current_device_type_name + "信息,请等待...", this.domObj);
|
|
|
+ for (let i = 0; i < device_Type_Ids.length; i++) {
|
|
|
+ var obj = this.getDeviceType(device_Type_Ids[i]);
|
|
|
+ var fields = this.getLayerShowFieldNames(obj.cnContactLayerName);
|
|
|
+
|
|
|
+ var where = obj.sqlfilter;
|
|
|
+ var param = { "where": where, "spatialRel": "esriSpatialRelIntersects", "returnGeometry": false, "geometryType": "esriGeometryPolygon", "geometry": JSON.stringify(geometry), "returnIdsOnly": true, "f": "json" };
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: url + "/" + obj.contactLayerId + "/query",
|
|
|
+ cache: false,
|
|
|
+ async: false,//用同步请求来解决返回数据顺序问题
|
|
|
+ data: param,
|
|
|
+ dataType: "json",
|
|
|
+ success: function (response) {
|
|
|
+ forCounter++;
|
|
|
+ if (response.error !== undefined) {
|
|
|
+ this.AppX.runtimeConfig.toast.Show("查询失败,请联系管理员");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ outfields = fields.map(e => { return e.name });
|
|
|
+
|
|
|
+ if (!response.objectIds) {
|
|
|
+ //this.loadWait.hide();
|
|
|
+ //objectIdsStr[forCounter-1] = "无objectid"
|
|
|
+ //return;
|
|
|
+ } else {
|
|
|
+ var objid = this.getDeviceType(device_Type_Ids[forCounter - 1]);
|
|
|
+ layernameStr.push(objid.cnContactLayerName);
|
|
|
+ //let data = _.union(response.objectIds, this.objectids);
|
|
|
+ this.objectIdsStr[objid.cnContactLayerName] = response.objectIds.join();
|
|
|
+ }
|
|
|
+ //let layerName = "";
|
|
|
+
|
|
|
+ if (forCounter == device_Type_Ids.length) {
|
|
|
+ this.gp = new Geoprocessor(this.analyzeUrl);
|
|
|
+ var objStr = "";
|
|
|
+ for (var i in this.objectIdsStr) {
|
|
|
+ objStr += this.objectIdsStr[i] + ";"
|
|
|
+ }
|
|
|
+ //this.objectids = data;
|
|
|
+ this.addData.objectIds = objStr;
|
|
|
+ //此次gp服务,管线图层查询是传入图层名称必须是管线
|
|
|
+
|
|
|
+ // if (obj.cnContactLayerName.indexOf('管线') == -1) {
|
|
|
+ //
|
|
|
+ // } else {
|
|
|
+ // layerName = '管线';
|
|
|
+ // }
|
|
|
+ var options = {
|
|
|
+ "layername": layernameStr.join(","),
|
|
|
+ "objectids": objStr,
|
|
|
+ "outfields": outfields.join(","),
|
|
|
+ usertoken: this.AppX.appConfig.gisToken
|
|
|
+ };
|
|
|
+ var delayResult = this.gp.submitJob(
|
|
|
+ options,
|
|
|
+ function (jobinfo) {
|
|
|
+ //forGpCounter++;
|
|
|
+ if (this.dynamicMapServer) {
|
|
|
+ this.map.removeLayer(this.dynamicMapServer);
|
|
|
+ this.dynamicMapServer = null;
|
|
|
+ }
|
|
|
+ let mapServerUrl = this.mapServerUrl + "/jobs/" + jobinfo.jobId;
|
|
|
+ for (let k = 0; k < device_Type_Ids.length; k++) {
|
|
|
+ var gpCounterId = this.getDeviceType(device_Type_Ids[k]);
|
|
|
+ this.gisUrlList[gpCounterId.cnContactLayerName] = url + "/" + gpCounterId.contactLayerId + "/query";
|
|
|
+ }
|
|
|
+
|
|
|
+ //this.addData.gisUrl = url + "/" + obj.contactLayerId + "/query";
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ type: "get",
|
|
|
+ dataType: "json",
|
|
|
+ url: this.analyzeUrl + "/jobs/" + jobinfo.jobId + "/" + jobinfo.results.summary.paramUrl + "?f=pjson",
|
|
|
+ success: function (result) {
|
|
|
+ var pipeTypeLength = "";
|
|
|
+ if (result.value.result) {
|
|
|
+ for (let j = 0; j < result.value.result.summary.layersummary.length; j++) {
|
|
|
+ pipeTypeLength += result.value.result.summary.layersummary[j].layername + ":" + result.value.result.summary.layersummary[j].length + "米;"
|
|
|
+ }
|
|
|
+ this.domObj.find(".pipeTypeLength").text(pipeTypeLength);
|
|
|
+ } else {
|
|
|
+ this.domObj.find(".pipeTypeLength").text(result.value.message);
|
|
|
+ }
|
|
|
+
|
|
|
+ }.bind(this)
|
|
|
+ })
|
|
|
+ this.dynamicMapServer = new ArcGISDynamicMapServiceLayer(mapServerUrl);
|
|
|
+ this.dynamicMapServer.id = this.preLayerId + "dynamicMapServer";
|
|
|
+ this.map.addLayer(this.dynamicMapServer);
|
|
|
+ this.addSelectItems_more(this);
|
|
|
+ this.loadWait.hide();
|
|
|
+ }.bind(this),
|
|
|
+ function (jobinfo) {
|
|
|
+ this.jobid = jobinfo.jobId;
|
|
|
+ }.bind(this),
|
|
|
+ function (jobinfo) {
|
|
|
+ this.AppX.runtimeConfig.toast.show("分析失败,请联系管理员");
|
|
|
+ this.loadWait.hide();
|
|
|
+ console.error(jobinfo);
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ }.bind(this),
|
|
|
+ error: function (results) {
|
|
|
+ forCounter++;
|
|
|
+ this.loadWait.hide();
|
|
|
+ this.toast.Show("查询片区巡检信息出错!");
|
|
|
+ return;
|
|
|
+ // forCounter++;
|
|
|
+ // //this.loadWait.hide();
|
|
|
+ // this.toast.Show("查询片区巡检信息出错!");
|
|
|
+ // var objid = this.getDeviceType(device_Type_Ids[forCounter-1]);
|
|
|
+
|
|
|
+
|
|
|
+ // if(forCounter == device_Type_Ids.length){
|
|
|
+ // this.gp = new Geoprocessor(this.analyzeUrl);
|
|
|
+ // for(var i in this.objectIdsStr){
|
|
|
+ // this.objectids += this.objectIdsStr[i]+";"
|
|
|
+ // }
|
|
|
+ // //this.objectids = data;
|
|
|
+ // this.addData.objectIds = this.objectids;
|
|
|
+ // //此次gp服务,管线图层查询是传入图层名称必须是管线
|
|
|
+
|
|
|
+ // // if (obj.cnContactLayerName.indexOf('管线') == -1) {
|
|
|
+ // //
|
|
|
+ // // } else {
|
|
|
+ // // layerName = '管线';
|
|
|
+ // // }
|
|
|
+ // var options = {
|
|
|
+ // "layername": layernameStr.join(","),
|
|
|
+ // "objectids": this.objectids,
|
|
|
+ // "outfields": outfields.join(","),
|
|
|
+ // usertoken: this.AppX.appConfig.gisToken
|
|
|
+ // };
|
|
|
+ // var delayResult = this.gp.submitJob(
|
|
|
+ // options,
|
|
|
+ // function (jobinfo) {
|
|
|
+ // if (this.dynamicMapServer) {
|
|
|
+ // this.map.removeLayer(this.dynamicMapServer);
|
|
|
+ // this.dynamicMapServer = null;
|
|
|
+ // }
|
|
|
+ // let mapServerUrl = this.mapServerUrl + "/jobs/" + jobinfo.jobId;
|
|
|
+ // //this.addData.gisUrl = url + "/" + obj.contactLayerId + "/query";
|
|
|
+ // for(let k =0;k<device_Type_Ids.length;k++){
|
|
|
+ // var gpCounterId = this.getDeviceType(device_Type_Ids[k]);
|
|
|
+ // this.gisUrlList[gpCounterId.cnContactLayerName] = url + "/" + gpCounterId.contactLayerId + "/query";
|
|
|
+ // }
|
|
|
+ // //this.gisUrlList[objid.cnContactLayerName] = url + "/" + objid.contactLayerId + "/query";
|
|
|
+ // $.ajax({
|
|
|
+ // type: "get",
|
|
|
+ // dataType: "json",
|
|
|
+ // url: this.analyzeUrl + "/jobs/" + jobinfo.jobId + "/" + jobinfo.results.summary.paramUrl + "?f=pjson",
|
|
|
+ // success: function (result) {
|
|
|
+ // this.domObj.find(".pipeTypeLength").text(result.value.result.summary.layersummary[0].length);
|
|
|
+ // }.bind(this)
|
|
|
+ // })
|
|
|
+ // this.dynamicMapServer = new ArcGISDynamicMapServiceLayer(mapServerUrl);
|
|
|
+ // this.dynamicMapServer.id = this.preLayerId + "dynamicMapServer";
|
|
|
+ // this.map.addLayer(this.dynamicMapServer);
|
|
|
+ // this.addSelectItems_more(this);
|
|
|
+ // this.loadWait.hide();
|
|
|
+ // }.bind(this),
|
|
|
+ // function (jobinfo) {
|
|
|
+ // this.jobid = jobinfo.jobId;
|
|
|
+ // }.bind(this),
|
|
|
+ // function (jobinfo) {
|
|
|
+ // this.AppX.runtimeConfig.toast.show("分析失败,请联系管理员");
|
|
|
+ // this.loadWait.hide();
|
|
|
+ // console.error(jobinfo);
|
|
|
+ // }.bind(this)
|
|
|
+ // );
|
|
|
+ // }
|
|
|
+ }.bind(this)
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ var Material = this.domObj.find(".MATERIAL option:selected").val()
|
|
|
+ var obj = this.getDeviceType(this.addData.deviceTypeIds);
|
|
|
+ var fields = this.getLayerShowFieldNames(obj.cnContactLayerName);
|
|
|
+ this.loadWait.show("正在查询选择" + this.current_device_type_name + "信息,请等待...", this.domObj);
|
|
|
+ var where;
|
|
|
+ if (obj.sqlfilter) {
|
|
|
+ where = '(' + obj.sqlfilter + ')';
|
|
|
+ if (Material != '') where += ` and MATERIAL='${Material}'`
|
|
|
+ } else {
|
|
|
+ if (Material) where = `MATERIAL='${Material}'`
|
|
|
+ }
|
|
|
+
|
|
|
+ var param = { "where": where, "spatialRel": "esriSpatialRelIntersects", "returnGeometry": false, "geometryType": "esriGeometryPolygon", "geometry": JSON.stringify(geometry), "returnIdsOnly": true, "f": "json" };
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: url + "/" + obj.contactLayerId + "/query",
|
|
|
+ cache: false,
|
|
|
+ data: param,
|
|
|
+ dataType: "json",
|
|
|
+ success: function (response) {
|
|
|
+ if (response.error !== undefined) {
|
|
|
+ this.AppX.runtimeConfig.toast.Show("查询失败,请联系管理员");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let outfields = fields.map(e => { return e.name })
|
|
|
+ if (!response.objectIds) {
|
|
|
+ this.loadWait.hide();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.gp = new Geoprocessor(this.analyzeUrl);
|
|
|
+ let data = _.union(response.objectIds, this.objectids);
|
|
|
+ this.objectids = data;
|
|
|
+ this.addData.objectIds = _.join(this.objectids, ",");
|
|
|
+ //此次gp服务,管线图层查询是传入图层名称必须是管线
|
|
|
+ let layerName = "";
|
|
|
+ layerName = obj.cnContactLayerName;
|
|
|
+ // if (obj.cnContactLayerName.indexOf('管线') == -1) {
|
|
|
+ //
|
|
|
+ // } else {
|
|
|
+ // layerName = '管线';
|
|
|
+ // }
|
|
|
+ var options = {
|
|
|
+ "layername": layerName,
|
|
|
+ "objectids": this.objectids.join(","),
|
|
|
+ "outfields": outfields.join(","),
|
|
|
+ usertoken: this.AppX.appConfig.gisToken
|
|
|
+ };
|
|
|
+ var delayResult = this.gp.submitJob(
|
|
|
+ options,
|
|
|
+ function (jobinfo) {
|
|
|
+ if (this.dynamicMapServer) {
|
|
|
+ this.map.removeLayer(this.dynamicMapServer);
|
|
|
+ this.dynamicMapServer = null;
|
|
|
+ }
|
|
|
+ let mapServerUrl = this.mapServerUrl + "/jobs/" + jobinfo.jobId;
|
|
|
+ this.addData.gisUrl = url + "/" + obj.contactLayerId + "/query";
|
|
|
+ $.ajax({
|
|
|
+ type: "get",
|
|
|
+ dataType: "json",
|
|
|
+ url: this.analyzeUrl + "/jobs/" + jobinfo.jobId + "/" + jobinfo.results.summary.paramUrl + "?f=pjson",
|
|
|
+ success: function (result) {
|
|
|
+ this.domObj.find(".pipeTypeLength").text(result.value.result.summary.layersummary[0].length);
|
|
|
+ }.bind(this)
|
|
|
+ })
|
|
|
+ this.dynamicMapServer = new ArcGISDynamicMapServiceLayer(mapServerUrl);
|
|
|
+ this.dynamicMapServer.id = this.preLayerId + "dynamicMapServer";
|
|
|
+ this.map.addLayer(this.dynamicMapServer);
|
|
|
+ this.addSelectItems(this);
|
|
|
+ this.loadWait.hide();
|
|
|
+ }.bind(this),
|
|
|
+ function (jobinfo) {
|
|
|
+ this.jobid = jobinfo.jobId;
|
|
|
+ }.bind(this),
|
|
|
+ function (jobinfo) {
|
|
|
+ this.AppX.runtimeConfig.toast.show("分析失败,请联系管理员");
|
|
|
+ this.loadWait.hide();
|
|
|
+ console.error(jobinfo);
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ }.bind(this),
|
|
|
+ error: function (results) {
|
|
|
+ this.loadWait.hide();
|
|
|
+ this.toast.Show("查询片区巡检信息出错!");
|
|
|
+ }.bind(this)
|
|
|
+ });
|
|
|
+ }
|
|
|
+ };
|
|
|
//设备选择 完成新增计划
|
|
|
initEvent4() {
|
|
|
if (this.addData.geoType == 1) {
|
|
@@ -967,280 +1243,282 @@ class MissionSchedule extends BaseWidget {
|
|
|
}
|
|
|
geometry = geometryEngine.intersect(this.currentRegionPolygon, evt.geometry);
|
|
|
this.drawToolbar.deactivate();
|
|
|
- var url = this.AppX.appConfig.gisResource.pipe.config[this.config.mapindex].url;//pipe
|
|
|
- if (this.addData.deviceTypeIds.split(",").length > 1) {
|
|
|
- var device_Type_Ids = this.addData.deviceTypeIds.split(",");
|
|
|
- var forCounter = 0;//for循环计数
|
|
|
- var forGpCounter = 0;
|
|
|
- var layernameStr = [];
|
|
|
- //var objectIdsStr = {};
|
|
|
- var outfields = null;
|
|
|
- this.objectIdsStr = {};
|
|
|
- this.loadWait.show("正在查询选择" + this.current_device_type_name + "信息,请等待...", this.domObj);
|
|
|
- for (let i = 0; i < device_Type_Ids.length; i++) {
|
|
|
- var obj = this.getDeviceType(device_Type_Ids[i]);
|
|
|
- var fields = this.getLayerShowFieldNames(obj.cnContactLayerName);
|
|
|
-
|
|
|
- var where = obj.sqlfilter;
|
|
|
- var param = { "where": where, "spatialRel": "esriSpatialRelIntersects", "returnGeometry": false, "geometryType": "esriGeometryPolygon", "geometry": JSON.stringify(geometry), "returnIdsOnly": true, "f": "json" };
|
|
|
- $.ajax({
|
|
|
- type: "POST",
|
|
|
- url: url + "/" + obj.contactLayerId + "/query",
|
|
|
- cache: false,
|
|
|
- async: false,//用同步请求来解决返回数据顺序问题
|
|
|
- data: param,
|
|
|
- dataType: "json",
|
|
|
- success: function (response) {
|
|
|
- forCounter++;
|
|
|
- if (response.error !== undefined) {
|
|
|
- this.AppX.runtimeConfig.toast.Show("查询失败,请联系管理员");
|
|
|
- return;
|
|
|
- }
|
|
|
- outfields = fields.map(e => { return e.name });
|
|
|
-
|
|
|
- if (!response.objectIds) {
|
|
|
- //this.loadWait.hide();
|
|
|
- //objectIdsStr[forCounter-1] = "无objectid"
|
|
|
- //return;
|
|
|
- } else {
|
|
|
- var objid = this.getDeviceType(device_Type_Ids[forCounter - 1]);
|
|
|
- layernameStr.push(objid.cnContactLayerName);
|
|
|
- //let data = _.union(response.objectIds, this.objectids);
|
|
|
- this.objectIdsStr[objid.cnContactLayerName] = response.objectIds.join();
|
|
|
- }
|
|
|
- //let layerName = "";
|
|
|
-
|
|
|
- if (forCounter == device_Type_Ids.length) {
|
|
|
- this.gp = new Geoprocessor(this.analyzeUrl);
|
|
|
- var objStr = "";
|
|
|
- for (var i in this.objectIdsStr) {
|
|
|
- objStr += this.objectIdsStr[i] + ";"
|
|
|
- }
|
|
|
- //this.objectids = data;
|
|
|
- this.addData.objectIds = objStr;
|
|
|
- //此次gp服务,管线图层查询是传入图层名称必须是管线
|
|
|
-
|
|
|
- // if (obj.cnContactLayerName.indexOf('管线') == -1) {
|
|
|
- //
|
|
|
- // } else {
|
|
|
- // layerName = '管线';
|
|
|
- // }
|
|
|
- var options = {
|
|
|
- "layername": layernameStr.join(","),
|
|
|
- "objectids": objStr,
|
|
|
- "outfields": outfields.join(","),
|
|
|
- usertoken: this.AppX.appConfig.gisToken
|
|
|
- };
|
|
|
- var delayResult = this.gp.submitJob(
|
|
|
- options,
|
|
|
- function (jobinfo) {
|
|
|
- //forGpCounter++;
|
|
|
- if (this.dynamicMapServer) {
|
|
|
- this.map.removeLayer(this.dynamicMapServer);
|
|
|
- this.dynamicMapServer = null;
|
|
|
- }
|
|
|
- let mapServerUrl = this.mapServerUrl + "/jobs/" + jobinfo.jobId;
|
|
|
- for (let k = 0; k < device_Type_Ids.length; k++) {
|
|
|
- var gpCounterId = this.getDeviceType(device_Type_Ids[k]);
|
|
|
- this.gisUrlList[gpCounterId.cnContactLayerName] = url + "/" + gpCounterId.contactLayerId + "/query";
|
|
|
- }
|
|
|
-
|
|
|
- //this.addData.gisUrl = url + "/" + obj.contactLayerId + "/query";
|
|
|
-
|
|
|
- $.ajax({
|
|
|
- type: "get",
|
|
|
- dataType: "json",
|
|
|
- url: this.analyzeUrl + "/jobs/" + jobinfo.jobId + "/" + jobinfo.results.summary.paramUrl + "?f=pjson",
|
|
|
- success: function (result) {
|
|
|
- var pipeTypeLength = "";
|
|
|
- if (result.value.result) {
|
|
|
- for (let j = 0; j < result.value.result.summary.layersummary.length; j++) {
|
|
|
- pipeTypeLength += result.value.result.summary.layersummary[j].layername + ":" + result.value.result.summary.layersummary[j].length + "米;"
|
|
|
- }
|
|
|
- this.domObj.find(".pipeTypeLength").text(pipeTypeLength);
|
|
|
- } else {
|
|
|
- this.domObj.find(".pipeTypeLength").text(result.value.message);
|
|
|
- }
|
|
|
-
|
|
|
- }.bind(this)
|
|
|
- })
|
|
|
- this.dynamicMapServer = new ArcGISDynamicMapServiceLayer(mapServerUrl);
|
|
|
- this.dynamicMapServer.id = this.preLayerId + "dynamicMapServer";
|
|
|
- this.map.addLayer(this.dynamicMapServer);
|
|
|
- this.addSelectItems_more(this);
|
|
|
- this.loadWait.hide();
|
|
|
- }.bind(this),
|
|
|
- function (jobinfo) {
|
|
|
- this.jobid = jobinfo.jobId;
|
|
|
- }.bind(this),
|
|
|
- function (jobinfo) {
|
|
|
- this.AppX.runtimeConfig.toast.show("分析失败,请联系管理员");
|
|
|
- this.loadWait.hide();
|
|
|
- console.error(jobinfo);
|
|
|
- }.bind(this)
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- }.bind(this),
|
|
|
- error: function (results) {
|
|
|
- forCounter++;
|
|
|
- this.loadWait.hide();
|
|
|
- this.toast.Show("查询片区巡检信息出错!");
|
|
|
- return;
|
|
|
- // forCounter++;
|
|
|
- // //this.loadWait.hide();
|
|
|
- // this.toast.Show("查询片区巡检信息出错!");
|
|
|
- // var objid = this.getDeviceType(device_Type_Ids[forCounter-1]);
|
|
|
-
|
|
|
-
|
|
|
- // if(forCounter == device_Type_Ids.length){
|
|
|
- // this.gp = new Geoprocessor(this.analyzeUrl);
|
|
|
- // for(var i in this.objectIdsStr){
|
|
|
- // this.objectids += this.objectIdsStr[i]+";"
|
|
|
- // }
|
|
|
- // //this.objectids = data;
|
|
|
- // this.addData.objectIds = this.objectids;
|
|
|
- // //此次gp服务,管线图层查询是传入图层名称必须是管线
|
|
|
-
|
|
|
- // // if (obj.cnContactLayerName.indexOf('管线') == -1) {
|
|
|
- // //
|
|
|
- // // } else {
|
|
|
- // // layerName = '管线';
|
|
|
- // // }
|
|
|
- // var options = {
|
|
|
- // "layername": layernameStr.join(","),
|
|
|
- // "objectids": this.objectids,
|
|
|
- // "outfields": outfields.join(","),
|
|
|
- // usertoken: this.AppX.appConfig.gisToken
|
|
|
- // };
|
|
|
- // var delayResult = this.gp.submitJob(
|
|
|
- // options,
|
|
|
- // function (jobinfo) {
|
|
|
- // if (this.dynamicMapServer) {
|
|
|
- // this.map.removeLayer(this.dynamicMapServer);
|
|
|
- // this.dynamicMapServer = null;
|
|
|
- // }
|
|
|
- // let mapServerUrl = this.mapServerUrl + "/jobs/" + jobinfo.jobId;
|
|
|
- // //this.addData.gisUrl = url + "/" + obj.contactLayerId + "/query";
|
|
|
- // for(let k =0;k<device_Type_Ids.length;k++){
|
|
|
- // var gpCounterId = this.getDeviceType(device_Type_Ids[k]);
|
|
|
- // this.gisUrlList[gpCounterId.cnContactLayerName] = url + "/" + gpCounterId.contactLayerId + "/query";
|
|
|
- // }
|
|
|
- // //this.gisUrlList[objid.cnContactLayerName] = url + "/" + objid.contactLayerId + "/query";
|
|
|
- // $.ajax({
|
|
|
- // type: "get",
|
|
|
- // dataType: "json",
|
|
|
- // url: this.analyzeUrl + "/jobs/" + jobinfo.jobId + "/" + jobinfo.results.summary.paramUrl + "?f=pjson",
|
|
|
- // success: function (result) {
|
|
|
- // this.domObj.find(".pipeTypeLength").text(result.value.result.summary.layersummary[0].length);
|
|
|
- // }.bind(this)
|
|
|
- // })
|
|
|
- // this.dynamicMapServer = new ArcGISDynamicMapServiceLayer(mapServerUrl);
|
|
|
- // this.dynamicMapServer.id = this.preLayerId + "dynamicMapServer";
|
|
|
- // this.map.addLayer(this.dynamicMapServer);
|
|
|
- // this.addSelectItems_more(this);
|
|
|
- // this.loadWait.hide();
|
|
|
- // }.bind(this),
|
|
|
- // function (jobinfo) {
|
|
|
- // this.jobid = jobinfo.jobId;
|
|
|
- // }.bind(this),
|
|
|
- // function (jobinfo) {
|
|
|
- // this.AppX.runtimeConfig.toast.show("分析失败,请联系管理员");
|
|
|
- // this.loadWait.hide();
|
|
|
- // console.error(jobinfo);
|
|
|
- // }.bind(this)
|
|
|
- // );
|
|
|
- // }
|
|
|
- }.bind(this)
|
|
|
- });
|
|
|
- }
|
|
|
- } else {
|
|
|
- var Material = this.domObj.find(".MATERIAL option:selected").val()
|
|
|
- var obj = this.getDeviceType(this.addData.deviceTypeIds);
|
|
|
- var fields = this.getLayerShowFieldNames(obj.cnContactLayerName);
|
|
|
- this.loadWait.show("正在查询选择" + this.current_device_type_name + "信息,请等待...", this.domObj);
|
|
|
- var where;
|
|
|
- if (obj.sqlfilter) {
|
|
|
- where = '(' + obj.sqlfilter + ')';
|
|
|
- if (Material != '') where += ` and MATERIAL='${Material}'`
|
|
|
- } else {
|
|
|
- if (Material != '') where = `MATERIAL='${Material}'`
|
|
|
- }
|
|
|
-
|
|
|
- var param = { "where": where, "spatialRel": "esriSpatialRelIntersects", "returnGeometry": false, "geometryType": "esriGeometryPolygon", "geometry": JSON.stringify(geometry), "returnIdsOnly": true, "f": "json" };
|
|
|
- $.ajax({
|
|
|
- type: "POST",
|
|
|
- url: url + "/" + obj.contactLayerId + "/query",
|
|
|
- cache: false,
|
|
|
- data: param,
|
|
|
- dataType: "json",
|
|
|
- success: function (response) {
|
|
|
- if (response.error !== undefined) {
|
|
|
- this.AppX.runtimeConfig.toast.Show("查询失败,请联系管理员");
|
|
|
- return;
|
|
|
- }
|
|
|
- let outfields = fields.map(e => { return e.name })
|
|
|
- if (!response.objectIds) {
|
|
|
- this.loadWait.hide();
|
|
|
- return;
|
|
|
- }
|
|
|
- this.gp = new Geoprocessor(this.analyzeUrl);
|
|
|
- let data = _.union(response.objectIds, this.objectids);
|
|
|
- this.objectids = data;
|
|
|
- this.addData.objectIds = _.join(this.objectids, ",");
|
|
|
- //此次gp服务,管线图层查询是传入图层名称必须是管线
|
|
|
- let layerName = "";
|
|
|
- layerName = obj.cnContactLayerName;
|
|
|
- // if (obj.cnContactLayerName.indexOf('管线') == -1) {
|
|
|
- //
|
|
|
- // } else {
|
|
|
- // layerName = '管线';
|
|
|
- // }
|
|
|
- var options = {
|
|
|
- "layername": layerName,
|
|
|
- "objectids": this.objectids.join(","),
|
|
|
- "outfields": outfields.join(","),
|
|
|
- usertoken: this.AppX.appConfig.gisToken
|
|
|
- };
|
|
|
- var delayResult = this.gp.submitJob(
|
|
|
- options,
|
|
|
- function (jobinfo) {
|
|
|
- if (this.dynamicMapServer) {
|
|
|
- this.map.removeLayer(this.dynamicMapServer);
|
|
|
- this.dynamicMapServer = null;
|
|
|
- }
|
|
|
- let mapServerUrl = this.mapServerUrl + "/jobs/" + jobinfo.jobId;
|
|
|
- this.addData.gisUrl = url + "/" + obj.contactLayerId + "/query";
|
|
|
- $.ajax({
|
|
|
- type: "get",
|
|
|
- dataType: "json",
|
|
|
- url: this.analyzeUrl + "/jobs/" + jobinfo.jobId + "/" + jobinfo.results.summary.paramUrl + "?f=pjson",
|
|
|
- success: function (result) {
|
|
|
- this.domObj.find(".pipeTypeLength").text(result.value.result.summary.layersummary[0].length);
|
|
|
- }.bind(this)
|
|
|
- })
|
|
|
- this.dynamicMapServer = new ArcGISDynamicMapServiceLayer(mapServerUrl);
|
|
|
- this.dynamicMapServer.id = this.preLayerId + "dynamicMapServer";
|
|
|
- this.map.addLayer(this.dynamicMapServer);
|
|
|
- this.addSelectItems(this);
|
|
|
- this.loadWait.hide();
|
|
|
- }.bind(this),
|
|
|
- function (jobinfo) {
|
|
|
- this.jobid = jobinfo.jobId;
|
|
|
- }.bind(this),
|
|
|
- function (jobinfo) {
|
|
|
- this.AppX.runtimeConfig.toast.show("分析失败,请联系管理员");
|
|
|
- this.loadWait.hide();
|
|
|
- console.error(jobinfo);
|
|
|
- }.bind(this)
|
|
|
- );
|
|
|
- }.bind(this),
|
|
|
- error: function (results) {
|
|
|
- this.loadWait.hide();
|
|
|
- this.toast.Show("查询片区巡检信息出错!");
|
|
|
- }.bind(this)
|
|
|
- });
|
|
|
- }
|
|
|
+ this.queryPipes(geometry)
|
|
|
+ // return
|
|
|
+ // var url = this.AppX.appConfig.gisResource.pipe.config[this.config.mapindex].url;//pipe
|
|
|
+ // if (this.addData.deviceTypeIds.split(",").length > 1) {
|
|
|
+ // var device_Type_Ids = this.addData.deviceTypeIds.split(",");
|
|
|
+ // var forCounter = 0;//for循环计数
|
|
|
+ // var forGpCounter = 0;
|
|
|
+ // var layernameStr = [];
|
|
|
+ // //var objectIdsStr = {};
|
|
|
+ // var outfields = null;
|
|
|
+ // this.objectIdsStr = {};
|
|
|
+ // this.loadWait.show("正在查询选择" + this.current_device_type_name + "信息,请等待...", this.domObj);
|
|
|
+ // for (let i = 0; i < device_Type_Ids.length; i++) {
|
|
|
+ // var obj = this.getDeviceType(device_Type_Ids[i]);
|
|
|
+ // var fields = this.getLayerShowFieldNames(obj.cnContactLayerName);
|
|
|
+
|
|
|
+ // var where = obj.sqlfilter;
|
|
|
+ // var param = { "where": where, "spatialRel": "esriSpatialRelIntersects", "returnGeometry": false, "geometryType": "esriGeometryPolygon", "geometry": JSON.stringify(geometry), "returnIdsOnly": true, "f": "json" };
|
|
|
+ // $.ajax({
|
|
|
+ // type: "POST",
|
|
|
+ // url: url + "/" + obj.contactLayerId + "/query",
|
|
|
+ // cache: false,
|
|
|
+ // async: false,//用同步请求来解决返回数据顺序问题
|
|
|
+ // data: param,
|
|
|
+ // dataType: "json",
|
|
|
+ // success: function (response) {
|
|
|
+ // forCounter++;
|
|
|
+ // if (response.error !== undefined) {
|
|
|
+ // this.AppX.runtimeConfig.toast.Show("查询失败,请联系管理员");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // outfields = fields.map(e => { return e.name });
|
|
|
+
|
|
|
+ // if (!response.objectIds) {
|
|
|
+ // //this.loadWait.hide();
|
|
|
+ // //objectIdsStr[forCounter-1] = "无objectid"
|
|
|
+ // //return;
|
|
|
+ // } else {
|
|
|
+ // var objid = this.getDeviceType(device_Type_Ids[forCounter - 1]);
|
|
|
+ // layernameStr.push(objid.cnContactLayerName);
|
|
|
+ // //let data = _.union(response.objectIds, this.objectids);
|
|
|
+ // this.objectIdsStr[objid.cnContactLayerName] = response.objectIds.join();
|
|
|
+ // }
|
|
|
+ // //let layerName = "";
|
|
|
+
|
|
|
+ // if (forCounter == device_Type_Ids.length) {
|
|
|
+ // this.gp = new Geoprocessor(this.analyzeUrl);
|
|
|
+ // var objStr = "";
|
|
|
+ // for (var i in this.objectIdsStr) {
|
|
|
+ // objStr += this.objectIdsStr[i] + ";"
|
|
|
+ // }
|
|
|
+ // //this.objectids = data;
|
|
|
+ // this.addData.objectIds = objStr;
|
|
|
+ // //此次gp服务,管线图层查询是传入图层名称必须是管线
|
|
|
+
|
|
|
+ // // if (obj.cnContactLayerName.indexOf('管线') == -1) {
|
|
|
+ // //
|
|
|
+ // // } else {
|
|
|
+ // // layerName = '管线';
|
|
|
+ // // }
|
|
|
+ // var options = {
|
|
|
+ // "layername": layernameStr.join(","),
|
|
|
+ // "objectids": objStr,
|
|
|
+ // "outfields": outfields.join(","),
|
|
|
+ // usertoken: this.AppX.appConfig.gisToken
|
|
|
+ // };
|
|
|
+ // var delayResult = this.gp.submitJob(
|
|
|
+ // options,
|
|
|
+ // function (jobinfo) {
|
|
|
+ // //forGpCounter++;
|
|
|
+ // if (this.dynamicMapServer) {
|
|
|
+ // this.map.removeLayer(this.dynamicMapServer);
|
|
|
+ // this.dynamicMapServer = null;
|
|
|
+ // }
|
|
|
+ // let mapServerUrl = this.mapServerUrl + "/jobs/" + jobinfo.jobId;
|
|
|
+ // for (let k = 0; k < device_Type_Ids.length; k++) {
|
|
|
+ // var gpCounterId = this.getDeviceType(device_Type_Ids[k]);
|
|
|
+ // this.gisUrlList[gpCounterId.cnContactLayerName] = url + "/" + gpCounterId.contactLayerId + "/query";
|
|
|
+ // }
|
|
|
+
|
|
|
+ // //this.addData.gisUrl = url + "/" + obj.contactLayerId + "/query";
|
|
|
+
|
|
|
+ // $.ajax({
|
|
|
+ // type: "get",
|
|
|
+ // dataType: "json",
|
|
|
+ // url: this.analyzeUrl + "/jobs/" + jobinfo.jobId + "/" + jobinfo.results.summary.paramUrl + "?f=pjson",
|
|
|
+ // success: function (result) {
|
|
|
+ // var pipeTypeLength = "";
|
|
|
+ // if (result.value.result) {
|
|
|
+ // for (let j = 0; j < result.value.result.summary.layersummary.length; j++) {
|
|
|
+ // pipeTypeLength += result.value.result.summary.layersummary[j].layername + ":" + result.value.result.summary.layersummary[j].length + "米;"
|
|
|
+ // }
|
|
|
+ // this.domObj.find(".pipeTypeLength").text(pipeTypeLength);
|
|
|
+ // } else {
|
|
|
+ // this.domObj.find(".pipeTypeLength").text(result.value.message);
|
|
|
+ // }
|
|
|
+
|
|
|
+ // }.bind(this)
|
|
|
+ // })
|
|
|
+ // this.dynamicMapServer = new ArcGISDynamicMapServiceLayer(mapServerUrl);
|
|
|
+ // this.dynamicMapServer.id = this.preLayerId + "dynamicMapServer";
|
|
|
+ // this.map.addLayer(this.dynamicMapServer);
|
|
|
+ // this.addSelectItems_more(this);
|
|
|
+ // this.loadWait.hide();
|
|
|
+ // }.bind(this),
|
|
|
+ // function (jobinfo) {
|
|
|
+ // this.jobid = jobinfo.jobId;
|
|
|
+ // }.bind(this),
|
|
|
+ // function (jobinfo) {
|
|
|
+ // this.AppX.runtimeConfig.toast.show("分析失败,请联系管理员");
|
|
|
+ // this.loadWait.hide();
|
|
|
+ // console.error(jobinfo);
|
|
|
+ // }.bind(this)
|
|
|
+ // );
|
|
|
+ // }
|
|
|
+
|
|
|
+ // }.bind(this),
|
|
|
+ // error: function (results) {
|
|
|
+ // forCounter++;
|
|
|
+ // this.loadWait.hide();
|
|
|
+ // this.toast.Show("查询片区巡检信息出错!");
|
|
|
+ // return;
|
|
|
+ // // forCounter++;
|
|
|
+ // // //this.loadWait.hide();
|
|
|
+ // // this.toast.Show("查询片区巡检信息出错!");
|
|
|
+ // // var objid = this.getDeviceType(device_Type_Ids[forCounter-1]);
|
|
|
+
|
|
|
+
|
|
|
+ // // if(forCounter == device_Type_Ids.length){
|
|
|
+ // // this.gp = new Geoprocessor(this.analyzeUrl);
|
|
|
+ // // for(var i in this.objectIdsStr){
|
|
|
+ // // this.objectids += this.objectIdsStr[i]+";"
|
|
|
+ // // }
|
|
|
+ // // //this.objectids = data;
|
|
|
+ // // this.addData.objectIds = this.objectids;
|
|
|
+ // // //此次gp服务,管线图层查询是传入图层名称必须是管线
|
|
|
+
|
|
|
+ // // // if (obj.cnContactLayerName.indexOf('管线') == -1) {
|
|
|
+ // // //
|
|
|
+ // // // } else {
|
|
|
+ // // // layerName = '管线';
|
|
|
+ // // // }
|
|
|
+ // // var options = {
|
|
|
+ // // "layername": layernameStr.join(","),
|
|
|
+ // // "objectids": this.objectids,
|
|
|
+ // // "outfields": outfields.join(","),
|
|
|
+ // // usertoken: this.AppX.appConfig.gisToken
|
|
|
+ // // };
|
|
|
+ // // var delayResult = this.gp.submitJob(
|
|
|
+ // // options,
|
|
|
+ // // function (jobinfo) {
|
|
|
+ // // if (this.dynamicMapServer) {
|
|
|
+ // // this.map.removeLayer(this.dynamicMapServer);
|
|
|
+ // // this.dynamicMapServer = null;
|
|
|
+ // // }
|
|
|
+ // // let mapServerUrl = this.mapServerUrl + "/jobs/" + jobinfo.jobId;
|
|
|
+ // // //this.addData.gisUrl = url + "/" + obj.contactLayerId + "/query";
|
|
|
+ // // for(let k =0;k<device_Type_Ids.length;k++){
|
|
|
+ // // var gpCounterId = this.getDeviceType(device_Type_Ids[k]);
|
|
|
+ // // this.gisUrlList[gpCounterId.cnContactLayerName] = url + "/" + gpCounterId.contactLayerId + "/query";
|
|
|
+ // // }
|
|
|
+ // // //this.gisUrlList[objid.cnContactLayerName] = url + "/" + objid.contactLayerId + "/query";
|
|
|
+ // // $.ajax({
|
|
|
+ // // type: "get",
|
|
|
+ // // dataType: "json",
|
|
|
+ // // url: this.analyzeUrl + "/jobs/" + jobinfo.jobId + "/" + jobinfo.results.summary.paramUrl + "?f=pjson",
|
|
|
+ // // success: function (result) {
|
|
|
+ // // this.domObj.find(".pipeTypeLength").text(result.value.result.summary.layersummary[0].length);
|
|
|
+ // // }.bind(this)
|
|
|
+ // // })
|
|
|
+ // // this.dynamicMapServer = new ArcGISDynamicMapServiceLayer(mapServerUrl);
|
|
|
+ // // this.dynamicMapServer.id = this.preLayerId + "dynamicMapServer";
|
|
|
+ // // this.map.addLayer(this.dynamicMapServer);
|
|
|
+ // // this.addSelectItems_more(this);
|
|
|
+ // // this.loadWait.hide();
|
|
|
+ // // }.bind(this),
|
|
|
+ // // function (jobinfo) {
|
|
|
+ // // this.jobid = jobinfo.jobId;
|
|
|
+ // // }.bind(this),
|
|
|
+ // // function (jobinfo) {
|
|
|
+ // // this.AppX.runtimeConfig.toast.show("分析失败,请联系管理员");
|
|
|
+ // // this.loadWait.hide();
|
|
|
+ // // console.error(jobinfo);
|
|
|
+ // // }.bind(this)
|
|
|
+ // // );
|
|
|
+ // // }
|
|
|
+ // }.bind(this)
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // var Material = this.domObj.find(".MATERIAL option:selected").val()
|
|
|
+ // var obj = this.getDeviceType(this.addData.deviceTypeIds);
|
|
|
+ // var fields = this.getLayerShowFieldNames(obj.cnContactLayerName);
|
|
|
+ // this.loadWait.show("正在查询选择" + this.current_device_type_name + "信息,请等待...", this.domObj);
|
|
|
+ // var where;
|
|
|
+ // if (obj.sqlfilter) {
|
|
|
+ // where = '(' + obj.sqlfilter + ')';
|
|
|
+ // if (Material != '') where += ` and MATERIAL='${Material}'`
|
|
|
+ // } else {
|
|
|
+ // if (Material) where = `MATERIAL='${Material}'`
|
|
|
+ // }
|
|
|
+
|
|
|
+ // var param = { "where": where, "spatialRel": "esriSpatialRelIntersects", "returnGeometry": false, "geometryType": "esriGeometryPolygon", "geometry": JSON.stringify(geometry), "returnIdsOnly": true, "f": "json" };
|
|
|
+ // $.ajax({
|
|
|
+ // type: "POST",
|
|
|
+ // url: url + "/" + obj.contactLayerId + "/query",
|
|
|
+ // cache: false,
|
|
|
+ // data: param,
|
|
|
+ // dataType: "json",
|
|
|
+ // success: function (response) {
|
|
|
+ // if (response.error !== undefined) {
|
|
|
+ // this.AppX.runtimeConfig.toast.Show("查询失败,请联系管理员");
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // let outfields = fields.map(e => { return e.name })
|
|
|
+ // if (!response.objectIds) {
|
|
|
+ // this.loadWait.hide();
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // this.gp = new Geoprocessor(this.analyzeUrl);
|
|
|
+ // let data = _.union(response.objectIds, this.objectids);
|
|
|
+ // this.objectids = data;
|
|
|
+ // this.addData.objectIds = _.join(this.objectids, ",");
|
|
|
+ // //此次gp服务,管线图层查询是传入图层名称必须是管线
|
|
|
+ // let layerName = "";
|
|
|
+ // layerName = obj.cnContactLayerName;
|
|
|
+ // // if (obj.cnContactLayerName.indexOf('管线') == -1) {
|
|
|
+ // //
|
|
|
+ // // } else {
|
|
|
+ // // layerName = '管线';
|
|
|
+ // // }
|
|
|
+ // var options = {
|
|
|
+ // "layername": layerName,
|
|
|
+ // "objectids": this.objectids.join(","),
|
|
|
+ // "outfields": outfields.join(","),
|
|
|
+ // usertoken: this.AppX.appConfig.gisToken
|
|
|
+ // };
|
|
|
+ // var delayResult = this.gp.submitJob(
|
|
|
+ // options,
|
|
|
+ // function (jobinfo) {
|
|
|
+ // if (this.dynamicMapServer) {
|
|
|
+ // this.map.removeLayer(this.dynamicMapServer);
|
|
|
+ // this.dynamicMapServer = null;
|
|
|
+ // }
|
|
|
+ // let mapServerUrl = this.mapServerUrl + "/jobs/" + jobinfo.jobId;
|
|
|
+ // this.addData.gisUrl = url + "/" + obj.contactLayerId + "/query";
|
|
|
+ // $.ajax({
|
|
|
+ // type: "get",
|
|
|
+ // dataType: "json",
|
|
|
+ // url: this.analyzeUrl + "/jobs/" + jobinfo.jobId + "/" + jobinfo.results.summary.paramUrl + "?f=pjson",
|
|
|
+ // success: function (result) {
|
|
|
+ // this.domObj.find(".pipeTypeLength").text(result.value.result.summary.layersummary[0].length);
|
|
|
+ // }.bind(this)
|
|
|
+ // })
|
|
|
+ // this.dynamicMapServer = new ArcGISDynamicMapServiceLayer(mapServerUrl);
|
|
|
+ // this.dynamicMapServer.id = this.preLayerId + "dynamicMapServer";
|
|
|
+ // this.map.addLayer(this.dynamicMapServer);
|
|
|
+ // this.addSelectItems(this);
|
|
|
+ // this.loadWait.hide();
|
|
|
+ // }.bind(this),
|
|
|
+ // function (jobinfo) {
|
|
|
+ // this.jobid = jobinfo.jobId;
|
|
|
+ // }.bind(this),
|
|
|
+ // function (jobinfo) {
|
|
|
+ // this.AppX.runtimeConfig.toast.show("分析失败,请联系管理员");
|
|
|
+ // this.loadWait.hide();
|
|
|
+ // console.error(jobinfo);
|
|
|
+ // }.bind(this)
|
|
|
+ // );
|
|
|
+ // }.bind(this),
|
|
|
+ // error: function (results) {
|
|
|
+ // this.loadWait.hide();
|
|
|
+ // this.toast.Show("查询片区巡检信息出错!");
|
|
|
+ // }.bind(this)
|
|
|
+ // });
|
|
|
+ // }
|
|
|
|
|
|
}.bind(this));
|
|
|
}.bind(this));
|
|
@@ -1589,8 +1867,8 @@ class MissionSchedule extends BaseWidget {
|
|
|
searchInfo: that.dataTable_all_searchInfo,//条件在不断变化,故需要有全局的条件监听
|
|
|
// displayTitle: ["部门", "姓名", "巡检名称", "巡检周期", "巡检类型", "所属片区", "计划开始时间", "计划结束时间", "创建人", "创建时间", "状态"],
|
|
|
// displayField: ["deptName", "userIdName", "description", "preiodName", "deviceTypeName", "regionName", "childBeginDate", "childEndDate", "createUserName", "createTime", "chilePlanStateName"],
|
|
|
- displayTitle: ["部门", "姓名", "巡检名称", "巡检周期", "巡检类型", "计划开始时间", "计划结束时间", "计划完成率(%)", "巡检模式", "创建人", "创建时间", "状态"],
|
|
|
- displayField: ["deptName", "userIdName", "description", "preiodName", "deviceTypeName", "childBeginDate", "childEndDate", "planRate", "modeName", "createUserName", "createTime", "chilePlanStateName"],
|
|
|
+ displayTitle: ["部门", "姓名", "巡检名称", "巡检周期", "巡检类型", "计划开始时间", "计划结束时间", "工作量", "计划完成率(%)", "巡检模式", "创建人", "创建时间", "状态"],
|
|
|
+ displayField: ["deptName", "userIdName", "description", "preiodName", "deviceTypeName", "childBeginDate", "childEndDate", "total", "planRate", "modeName", "createUserName", "createTime", "chilePlanStateName"],
|
|
|
extentDisplayTitle: ['定位查看'],
|
|
|
extentDisplayContent: [{
|
|
|
field: "planInfoLook",
|
|
@@ -1601,7 +1879,9 @@ class MissionSchedule extends BaseWidget {
|
|
|
},
|
|
|
drawEvent: function () {
|
|
|
$.each(that.domObj.find("#planslist_table tr[class]"), function (index, item) {
|
|
|
- $($(item).find('td')[8]).text(that.dataTable_all.aExtentData.currentAllData[index].planRate + "%");
|
|
|
+ $($(item).find('td')[9]).text(that.dataTable_all.aExtentData.currentAllData[index].planRate + "%");
|
|
|
+ const row = that.dataTable_all.aExtentData.currentAllData[index];
|
|
|
+ $($(item).find('td')[8]).text(row.type == '1' ? row.total : row.pointNum);
|
|
|
})
|
|
|
that.domObj.off('click', '.planInfoLook').on('click', ".planInfoLook", e => {
|
|
|
if (that.dynamicMapServer) {
|
|
@@ -2345,7 +2625,7 @@ class MissionSchedule extends BaseWidget {
|
|
|
var where = "1=1";
|
|
|
if (devicetype.sqlfilter != null && devicetype.sqlfilter.length > 0)
|
|
|
where += " and " + devicetype.sqlfilter;
|
|
|
- var param = { "where": where, "spatialRel": "esriSpatialRelContains", "returnGeometry": true, "geometryType": "esriGeometryPolygon", "geometry": JSON.stringify(polygon), "returnCountOnly": true, "returnIdsOnly": false, "f": "json" };
|
|
|
+ var param = { "where": where, "spatialRel": "esriSpatialRelContains", "returnGeometry": true, "geometryType": "esriGeometryPolygon", "geometry": JSON.stringify(polygon), "returnCountOnly": true, "returnIdsOnly": true, "f": "json" };
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
url: url + "/" + devicetype.contactLayerId + "/query",
|
|
@@ -2618,6 +2898,7 @@ class MissionSchedule extends BaseWidget {
|
|
|
// } else {
|
|
|
|
|
|
// }
|
|
|
+ that.queryPipes(mapPolygon) // 查询所有
|
|
|
if (that.addData.deviceTypeIds.split(",").length > 1) {
|
|
|
that.checkExistPlanDeviceByLayer_more(dom.data("geometry"), that.addData.deviceTypeIds + "", that.current_device_type_name);
|
|
|
} else {
|