|
@@ -16,7 +16,7 @@ class SiteSupervisionPageInfo extends BaseWidget {
|
|
|
useLayerModel = 0;
|
|
|
map = null;
|
|
|
mapSet = null;
|
|
|
- precessInfo="";
|
|
|
+ precessInfo = "";
|
|
|
|
|
|
state = {
|
|
|
|
|
@@ -99,14 +99,14 @@ class SiteSupervisionPageInfo extends BaseWidget {
|
|
|
for (var dataItem in data) {
|
|
|
if (dataItem == item.name) {
|
|
|
item.value = this.verificationHelper.setNullAndUndefinedEnpty(data[dataItem]);
|
|
|
- if((item.value+"").indexOf("00:00:00")!=-1){
|
|
|
- item.value=(item.value+"").replace("00:00:00","");
|
|
|
+ if ((item.value + "").indexOf("00:00:00") != -1) {
|
|
|
+ item.value = (item.value + "").replace("00:00:00", "");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (type == this.actionType.look) {
|
|
|
$(item).attr("readonly", "readonly");
|
|
|
- $(item).attr("title",item.value );
|
|
|
+ $(item).attr("title", item.value);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -258,7 +258,7 @@ class SiteSupervisionPageInfo extends BaseWidget {
|
|
|
for (var dataItem in data) {
|
|
|
if (dataItem == item.name) {
|
|
|
item.value = this.verificationHelper.setNullAndUndefinedEnpty(data[dataItem]);
|
|
|
- $(item).attr("title",item.value );
|
|
|
+ $(item).attr("title", item.value);
|
|
|
}
|
|
|
}
|
|
|
if (type == this.actionType.look) {
|
|
@@ -318,19 +318,19 @@ class SiteSupervisionPageInfo extends BaseWidget {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- for (var item of dom.find(".spanValue")) {
|
|
|
- if (this.initTag.indexOf(item) == -1) {
|
|
|
- if (this.initTag.indexOf(item) == -1) {
|
|
|
- this.initTag.push(item);
|
|
|
- for (var dataItem in data) {
|
|
|
- if (dataItem == item.attributes.name.value) {
|
|
|
- item.textContent=this.verificationHelper.setNullAndUndefinedEnpty(data[dataItem]).split(' ')[0] ;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+ for (var item of dom.find(".spanValue")) {
|
|
|
+ if (this.initTag.indexOf(item) == -1) {
|
|
|
+ if (this.initTag.indexOf(item) == -1) {
|
|
|
+ this.initTag.push(item);
|
|
|
+ for (var dataItem in data) {
|
|
|
+ if (dataItem == item.attributes.name.value) {
|
|
|
+ item.textContent = this.verificationHelper.setNullAndUndefinedEnpty(data[dataItem]).split(' ')[0];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
for (var item of dom.find(".actionInfo")) {
|
|
|
if (this.initTag.indexOf(item) == -1) {
|
|
@@ -422,12 +422,12 @@ class SiteSupervisionPageInfo extends BaseWidget {
|
|
|
* 根据id字段获取新型
|
|
|
* @param id 工地监护id
|
|
|
* @param call 获取信息后的回调
|
|
|
- */
|
|
|
- getInfoByid(id,call){
|
|
|
- this.ajaxSend.sendAjax(this, {id:id}, this.config.getInfoById+id, this.ajaxSend.type.get, function (results) {
|
|
|
- if (this.ajaxSend.checkResults(this, results)) {
|
|
|
- call(results.result)
|
|
|
- }
|
|
|
+ */
|
|
|
+ getInfoByid(id, call) {
|
|
|
+ this.ajaxSend.sendAjax(this, { id: id }, this.config.getInfoById + id, this.ajaxSend.type.get, function (results) {
|
|
|
+ if (this.ajaxSend.checkResults(this, results)) {
|
|
|
+ call(results.result)
|
|
|
+ }
|
|
|
}.bind(this));
|
|
|
}
|
|
|
|
|
@@ -553,24 +553,24 @@ class SiteSupervisionPageInfo extends BaseWidget {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- this.precessInfo="";
|
|
|
- let one="<span state>待派工</span>";
|
|
|
- let two="<span state>待处理</span>";
|
|
|
- let three="<span state>待审核</span>";
|
|
|
- let four="<span state>归档</span>";
|
|
|
- if(!data.constructionState){
|
|
|
- this.precessInfo=one;
|
|
|
+ this.precessInfo = "";
|
|
|
+ let one = "<span state>待派工</span>";
|
|
|
+ let two = "<span state>待处理</span>";
|
|
|
+ let three = "<span state>待审核</span>";
|
|
|
+ let four = "<span state>归档</span>";
|
|
|
+ if (!data.constructionState) {
|
|
|
+ this.precessInfo = one;
|
|
|
formDom.find(".precessInfo").hide();
|
|
|
- }else if(data.constructionState=="0"){
|
|
|
- this.precessInfo=one.replace('state',"class='complete'")+two+three+four;
|
|
|
- }else if(data.constructionState=="2"||data.constructionState=="4"){
|
|
|
- this.precessInfo=(one+two).replace(/state/g,"class='complete'")+three+four;
|
|
|
- }else if(data.constructionState=="3"){
|
|
|
- this.precessInfo=(one+two+three).replace(/state/g,"class='complete'")+four;
|
|
|
- }else if(data.constructionState=="5"){
|
|
|
- this.precessInfo=(one+two+three+four).replace(/state/g,"class='complete'")
|
|
|
+ } else if (data.constructionState == "0") {
|
|
|
+ this.precessInfo = one.replace('state', "class='complete'") + two + three + four;
|
|
|
+ } else if (data.constructionState == "2" || data.constructionState == "4") {
|
|
|
+ this.precessInfo = (one + two).replace(/state/g, "class='complete'") + three + four;
|
|
|
+ } else if (data.constructionState == "3") {
|
|
|
+ this.precessInfo = (one + two + three).replace(/state/g, "class='complete'") + four;
|
|
|
+ } else if (data.constructionState == "5") {
|
|
|
+ this.precessInfo = (one + two + three + four).replace(/state/g, "class='complete'")
|
|
|
}
|
|
|
- this.precessInfo= this.precessInfo.replace('state',"");
|
|
|
+ this.precessInfo = this.precessInfo.replace('state', "");
|
|
|
formDom.find(".precessInfo").empty().append(this.precessInfo);
|
|
|
formDom.find(".precessInfo span").append('<span class="glyphicon glyphicon-ok-circle" aria-hidden="true"></span>');
|
|
|
formDom.find(".precessInfo .complete .glyphicon").remove();
|
|
@@ -686,7 +686,7 @@ class SiteSupervisionPageInfo extends BaseWidget {
|
|
|
* @param state 不同模块状态
|
|
|
* @param title 不同模块展示名称
|
|
|
* */
|
|
|
- addClusters(seacherData, id, popClass,state,title) {
|
|
|
+ addClusters(seacherData, id, popClass, state, title) {
|
|
|
this.clearClusters(id);
|
|
|
if (!seacherData || seacherData.length == 0 || !seacherData[0]) {
|
|
|
return;
|
|
@@ -711,7 +711,7 @@ class SiteSupervisionPageInfo extends BaseWidget {
|
|
|
constructionAddress: item.constructionAddress,
|
|
|
className: popClass,
|
|
|
state: title,
|
|
|
- index: item.searchIndex?item.searchIndex:index
|
|
|
+ index: item.searchIndex ? item.searchIndex : index
|
|
|
}
|
|
|
};
|
|
|
})
|
|
@@ -730,19 +730,19 @@ class SiteSupervisionPageInfo extends BaseWidget {
|
|
|
"spatialReference": this.map.spatialReference,
|
|
|
"basemap": this.map
|
|
|
});
|
|
|
- let url="";
|
|
|
- if(state==this.state.siteSupervisionReport){
|
|
|
- url=this.config.siteSupervisionReport;
|
|
|
- }else if(state==this.state.siteSupervisionWorker){
|
|
|
- url=this.config.siteSupervisionWorker;
|
|
|
- }else if(state==this.state.siteSupervisionConduct){
|
|
|
- url=this.config.siteSupervisionConduct;
|
|
|
- }else if(state==this.state.siteSupervisionAudit){
|
|
|
- url=this.config.siteSupervisionAudit;
|
|
|
- }else{
|
|
|
- url=this.config.siteSupervisionEnd;
|
|
|
+ let url = "";
|
|
|
+ if (state == this.state.siteSupervisionReport) {
|
|
|
+ url = this.config.siteSupervisionReport;
|
|
|
+ } else if (state == this.state.siteSupervisionWorker) {
|
|
|
+ url = this.config.siteSupervisionWorker;
|
|
|
+ } else if (state == this.state.siteSupervisionConduct) {
|
|
|
+ url = this.config.siteSupervisionConduct;
|
|
|
+ } else if (state == this.state.siteSupervisionAudit) {
|
|
|
+ url = this.config.siteSupervisionAudit;
|
|
|
+ } else {
|
|
|
+ url = this.config.siteSupervisionEnd;
|
|
|
}
|
|
|
- let defaultSym = this.mapSet.setGraphSymbol('picture', this.AppX.root +url);
|
|
|
+ let defaultSym = this.mapSet.setGraphSymbol('picture', this.AppX.root + url);
|
|
|
let renderer = new SimpleRenderer(defaultSym);
|
|
|
clusterLayer.setRenderer(renderer);
|
|
|
this.map.addLayer(clusterLayer);
|
|
@@ -828,26 +828,45 @@ class SiteSupervisionPageInfo extends BaseWidget {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ * 获取所有的工地状态并渲染成下拉框
|
|
|
+ * @para dom 熏染的dom
|
|
|
+ * @para getAll 是否可以获取全部
|
|
|
+ */
|
|
|
+ getSiteState(dom, getAll) {
|
|
|
+ let domHtml = "";
|
|
|
+ if (getAll) {
|
|
|
+ domHtml = "<option seletect='seletect' value=''>全部</option>";
|
|
|
+ }
|
|
|
+ this.config.construction_states.forEach(item => {
|
|
|
+ if (domHtml == "") {
|
|
|
+ domHtml += "<option seletect='seletect' value='" + item.value + "'>" + item.name + "</option>";
|
|
|
+ } else {
|
|
|
+ domHtml += "<option value='" + item.value + "'>" + item.name + "</option>";
|
|
|
+ }
|
|
|
+ })
|
|
|
+ dom.empty().append(domHtml);
|
|
|
+ }
|
|
|
+
|
|
|
* 获取所有的工地类型并渲染成下拉框
|
|
|
* @para dom 熏染的dom
|
|
|
* @para getAll 是否可以获取全部
|
|
|
*/
|
|
|
- getSiteType(dom,getAll){
|
|
|
+ getSiteType(dom, getAll) {
|
|
|
let data = {
|
|
|
current: 1,
|
|
|
size: 10000,
|
|
|
}
|
|
|
this.ajaxSend.sendAjax(this, data, this.config.getSiteType, this.ajaxSend.type.get, function (results) {
|
|
|
- let domHtml="";
|
|
|
- if(getAll){
|
|
|
- domHtml="<option seletect='seletect' value=''>全部</option>";
|
|
|
+ let domHtml = "";
|
|
|
+ if (getAll) {
|
|
|
+ domHtml = "<option seletect='seletect' value=''>全部</option>";
|
|
|
}
|
|
|
if (this.ajaxSend.checkResults(this, results)) {
|
|
|
- results.result.records.forEach(item=>{
|
|
|
- if(domHtml==""){
|
|
|
- domHtml+="<option seletect='seletect' value='"+item.id+"'>"+item.name+"</option>";
|
|
|
- }else{
|
|
|
- domHtml+="<option value='"+item.id+"'>"+item.name+"</option>";
|
|
|
+ results.result.records.forEach(item => {
|
|
|
+ if (domHtml == "") {
|
|
|
+ domHtml += "<option seletect='seletect' value='" + item.id + "'>" + item.name + "</option>";
|
|
|
+ } else {
|
|
|
+ domHtml += "<option value='" + item.id + "'>" + item.name + "</option>";
|
|
|
}
|
|
|
})
|
|
|
}
|