|
@@ -106,7 +106,7 @@ class PersonWorkbench extends BaseWidget {
|
|
|
|
|
|
var pnDom=$("#header .projSel #projSelect option:selected");
|
|
|
this.pnName=pnDom.text();
|
|
|
- this.domObj.find('.projectInfo').html(this.pnName+'施工情况综合信息展示')
|
|
|
+ this.showBoardInfo()
|
|
|
this.domObj.find(".projectScheduleInfo").val(this.pnName)
|
|
|
|
|
|
this.prjSelectValue = "projectName";
|
|
@@ -152,13 +152,12 @@ class PersonWorkbench extends BaseWidget {
|
|
|
|
|
|
this.domObj.find('#' + this.clearDateBtnID).off('click').on('click', function () {
|
|
|
this.domObj.find('#' + this.pipespeed_dateID + ' span').html('<span>选择日期范围 <i class="fa fa-calendar"></i></span>')
|
|
|
- let projectName=this.projectSelect?this.projectSelect:this.pnName;
|
|
|
- this.domObj.find('.projectInfo').html(projectName+'施工情况综合信息展示')
|
|
|
this.dateShow.startDate="";
|
|
|
this.dateShow.endDate="";
|
|
|
this.dateRange.startDate="";
|
|
|
this.dateRange.endDate="";
|
|
|
this.domObj.find('.unitNameInfo').val(null).trigger('change');
|
|
|
+ this.showBoardInfo()
|
|
|
this.getStatistic();
|
|
|
this.getBuildingProject();
|
|
|
this.initDateRangePicker();
|
|
@@ -183,7 +182,17 @@ class PersonWorkbench extends BaseWidget {
|
|
|
$(window).trigger('resize');
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ showBoardInfo(){
|
|
|
+ let projectName=this.projectSelect?this.projectSelect:this.pnName;
|
|
|
+ let stime= this.dateShow.startDate;
|
|
|
+ let etime=this.dateShow.endDate;
|
|
|
+ if(!stime&&!etime){
|
|
|
+ this.domObj.find('.projectInfo').html(projectName+'施工情况综合信息展示')
|
|
|
+ }else{
|
|
|
+ this.domObj.find('.projectInfo').html(projectName+'施工情况综合信息展示:'+stime+'-'+etime)
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
* 初始化日期控件
|
|
|
*/
|
|
@@ -195,10 +204,10 @@ class PersonWorkbench extends BaseWidget {
|
|
|
'本月': [moment().startOf('month'), moment().endOf('month')],
|
|
|
'今年': [moment().startOf('year'), moment().endOf('year')]
|
|
|
},
|
|
|
- defaultDate: moment().subtract(6, 'days').format('YYYY/MM/DD') + " - " + moment().format('YYYY/MM/DD'),
|
|
|
+
|
|
|
opens: "left",
|
|
|
- startDate: moment().subtract(6, 'days').format('YYYY/MM/DD'),
|
|
|
- endDate: moment().format('YYYY/MM/DD'),
|
|
|
+ startDate: moment().hours(0).minutes(0).seconds(0),
|
|
|
+ endDate: moment(new Date()),
|
|
|
maxDate: moment(new Date()),
|
|
|
showWeekNumbers: true,
|
|
|
autoUpdateInput: false,
|
|
@@ -214,23 +223,19 @@ class PersonWorkbench extends BaseWidget {
|
|
|
firstDay: 1
|
|
|
}
|
|
|
},(start, end) => {
|
|
|
- this.domObj.find('#' + this.pipespeed_dateID + ' span').html(start.format('YYYY/MM/DD') + ' - ' + end.format('YYYY/MM/DD'));
|
|
|
- this.dateRange.startDate = start.format('YYYYMMDD');
|
|
|
- this.dateRange.endDate = end.format('YYYYMMDD');
|
|
|
- this.getStatistic();
|
|
|
- this.getBuildingProject();
|
|
|
-
|
|
|
- let projectName=this.projectSelect?this.projectSelect:this.pnName;
|
|
|
- this.domObj.find('.projectInfo').html(projectName+'施工情况综合信息展示:'+start.format('YYYY年MM月D日') + ' - ' + end.format('YYYY年MM月D日'))
|
|
|
- this.dateShow.startDate=start.format('YYYY年MM月D日');
|
|
|
- this.dateShow.endDate=start.format('YYYY年MM月D日');
|
|
|
+
|
|
|
}
|
|
|
).on('apply.daterangepicker', function (ev, picker) {
|
|
|
- this.domObj.find('#' + this.pipespeed_dateID).val(picker.startDate.format('YYYY/MM/DD') + ' - ' + picker.endDate.format('YYYY/MM/DD'));
|
|
|
+ this.domObj.find('#' + this.pipespeed_dateID + ' span').html(picker.startDate.format('YYYY/MM/DD') + ' - ' + picker.endDate.format('YYYY/MM/DD'));
|
|
|
+
|
|
|
this.dateRange.startDate = picker.startDate.format('YYYYMMDD');
|
|
|
this.dateRange.endDate = picker.endDate.format('YYYYMMDD');
|
|
|
+ this.getStatistic();
|
|
|
+ this.getBuildingProject();
|
|
|
+
|
|
|
this.dateShow.startDate=picker.startDate.format('YYYY年MM月D日');
|
|
|
this.dateShow.endDate=picker.endDate.format('YYYY年MM月D日');
|
|
|
+ this.showBoardInfo()
|
|
|
}.bind(this));
|
|
|
}
|
|
|
|
|
@@ -348,14 +353,15 @@ class PersonWorkbench extends BaseWidget {
|
|
|
},
|
|
|
callback: {
|
|
|
onClick: function (event, treeId, treeNode) {
|
|
|
- var index = treeNode.name.indexOf("\_");
|
|
|
- treeNode.name = treeNode.name.substring(0, index);
|
|
|
- that.domObj.find(".projectScheduleInfo").val(treeNode.name)
|
|
|
- that.projectSelect=treeNode.name;
|
|
|
+ let index = treeNode.name.indexOf("\_");
|
|
|
+ let name = treeNode.name.substring(0, index);
|
|
|
+ that.domObj.find(".projectScheduleInfo").val(name)
|
|
|
+ that.projectSelect=name;
|
|
|
that.valuePid=treeNode.level;
|
|
|
- that.domObj.find('.projectInfo').html(that.projectSelect+'施工情况综合信息展示')
|
|
|
+ that.showBoardInfo()
|
|
|
that.getStatistic();
|
|
|
that.getBuildingProject();
|
|
|
+ that.resetTree()
|
|
|
},
|
|
|
onExpand: (event, treeId, treeNode) => {
|
|
|
}
|
|
@@ -367,10 +373,7 @@ class PersonWorkbench extends BaseWidget {
|
|
|
this.ztree = $.fn.zTree.init($("#pbsTreeId"), setting, zNodes);
|
|
|
}.bind(this));
|
|
|
this.domObj.find("#resetBtn").off("click").on("click", () => {
|
|
|
- this.domObj.find("#pbsSearchInput").val("");
|
|
|
- $.fn.zTree.init($("#pbsTreeId"), this.setting, this.treeNodes);
|
|
|
- $(".pbsProject").css("display", "none");
|
|
|
- this.dropInfo=0;
|
|
|
+ this.resetTree()
|
|
|
});
|
|
|
this.domObj.find("#" + this.pbsSearchInputID).keyup(function (e) {
|
|
|
if (e.keyCode === 13) {
|
|
@@ -378,6 +381,12 @@ class PersonWorkbench extends BaseWidget {
|
|
|
}
|
|
|
}.bind(this));
|
|
|
}
|
|
|
+ resetTree(){
|
|
|
+ this.domObj.find("#pbsSearchInput").val("");
|
|
|
+ $.fn.zTree.init($("#pbsTreeId"), this.setting, this.treeNodes);
|
|
|
+ $(".pbsProject").css("display", "none");
|
|
|
+ this.dropInfo=0;
|
|
|
+ }
|
|
|
|
|
|
*
|
|
|
* 查询条件操作
|