/**
* checkrecord.js
* 巡检记录界面
* emial: yaoqiang@chinausky.com
* create: 2018-12-08
*/
Ext.Loader.setConfig({
enabled: true
});
Ext.Loader.setPath('Ext.ux', '../../res/extjs/examples/ux');
Ext.require([
'Ext.grid.*',
'Ext.data.*',
'Ext.ux.RowExpander',
'Ext.selection.CheckboxModel'
]);
var company_code;
var myStore = null;
var myStore1 = null;
var V_LOGINNAME = '', V_PASSWORD = '';
var menuidx = '';
var mouseon;
var changeon;
var mouseoff;
var menu_click;
var pieMask;
var sm = Ext.create('Ext.selection.CheckboxModel');
var sm1 = Ext.create('Ext.selection.CheckboxModel');
Ext.define('CheckRecord2', {
extend: 'Ext.data.Model',
fields: [
{ name: 'id', type: 'string' },
{ name: 'xh', type: 'int' },
{ name: 'plan_name', type: 'string' },
{ name: 'ywcsj', type: 'string' },
{ name: 'zt', type: 'string' },
{ name: 'data3', type: 'string' },
{ name: 'name', type: 'string' },
{ name: 'phone', type: 'string' },
{ name: 'completion', type: 'string' },
{ name: 'xjrysl', type: 'int' },
{ name: 'jrrw', type: 'int' },
{ name: 'csrw', type: 'int' },
{ name: 'jrwcrw', type: 'int' },
]
});
Ext.define('CheckRecord3', {
extend: 'Ext.data.Model',
fields: [
{ name: 'jlid', type: 'string' },
{ name: 'dwid', type: 'string' },
{ name: 'xh', type: 'int' },
{ name: 'spot_name', type: 'string' },
{ name: 'spot_address', type: 'string' },
{ name: 'wcqk', type: 'string' },
{ name: 'wc_time', type: 'string' },
{ name: 'wbr', type: 'string' },
// {name:'completion_status', type:'string'},
]
});
function exportbtn_click() {
baseUrl = document.getElementById('basePath').value;
V_LOGINNAME = $("#V_LOGINNAME").val();
V_PASSWORD = $("#V_PASSWORD").val();
plan_name = document.getElementById('plan_name').value;
person_liable_id = document.getElementById('person_liable_id').value;
zt = document.getElementById('zt').value;
data3a = document.getElementById('data3a').value;
data3b = document.getElementById('data3b').value;
// alert(plan_name);
var fields = '';
var array = ['xh', 'plan_name', 'ywcsj', 'zt', 'completion', 'data3', 'name', 'phone'];
var name = ['序号', '任务名称', '应完成时间', '当前状态', '完成情况(%)', '实际完成时间', '相关责任人', '联系电话'];
for (var i = 0; i < 7; i++) {
if (i > 0)
fields += ',';
fields += '{id:"' + array[i] + '",title:"' + name[i] + '",shown:"' + true + '"}';
}
var query = new Object();
// query.V_LOGINNAME = V_LOGINNAME;
// query.V_PASSWORD = V_PASSWORD;
query.plan_name = plan_name;
query.person_liable_id = person_liable_id;
query.data3a = data3a;
query.zt = zt;
query.data3b = data3b;
query.EXPORT_FILE = '巡检记录列表';
query.fields = '[' + fields + ']';
$.ajax({
type: 'POST',
url: baseUrl + "iot/excel/view/XjSpotOperationRecordExcel1",
data: {
queryJson: Ext.JSON.encode(query)
},
success: function (result) {
var json = eval('(' + result + ')');
if (json.action == 'dormExport') {
ConfirmStore = json.RESULT;
var elemIF = document.createElement("iframe");
elemIF.src = baseUrl + json.filename;
elemIF.style.display = "none";
document.body.appendChild(elemIF);
}
}
});
}
Ext.onReady(function () {
var baseUrl = document.getElementById('basePath').value;
var theme = document.getElementById('theme').value;
var chkIcon = '
'
var unchkIcon = '
'
// company_code = document.getElementById('company_code').value;
$("#V_LOGINNAME").val(sessionStorage.getItem('V_LOGINNAME'));
$("#V_PASSWORD").val(sessionStorage.getItem('V_PASSWORD'));
V_LOGINNAME = $("#V_LOGINNAME").val();
V_PASSWORD = $("#V_PASSWORD").val();
var countPerPage = 13;
var maxHeight = 10000;
var chkBoolean = function (flag) {
if (flag)
return chkIcon;
return unchkIcon;
}
var queryJson = new Object();
queryJson.V_LOGINNAME = V_LOGINNAME;
// queryJson.V_PASSWORD = V_PASSWORD;
// queryJson.COMMSTATUS = 'NO';
if ((company_code != null) && (company_code != 'null') && (company_code.length > 0))
queryJson.company_code = company_code;
var states1 = Ext.create('Ext.data.Store', {
fields: ['status', 'name'],
data: [
// {"status":-1, "name":"全选"},
{ "status": "待开通", "name": "待开通" },
{ "status": "已开通", "name": "已开通" },
{ "status": "已锁定", "name": "已锁定" },
{ "status": "注销", "name": "注销" },
]
});
myStore = Ext.create('Ext.data.Store', {
model: 'CheckRecord2',
pageSize: countPerPage,
proxy: {
type: 'ajax',
actionMethods: {
create: 'POST',
read: 'POST', // by default GET
update: 'POST',
destroy: 'POST'
},
url: baseUrl + 'iot/spotoperationrecord/getList1',
reader: {
type: 'json',
root: 'RESULT',
totalProperty: 'totalCount'
},
extraParams: {
queryJson: Ext.JSON.encode(queryJson)
}
},
// sorters:[{
// property:'data_time',
// direction:'DESC'
// }],
remoteSort: true
});
myStore1 = Ext.create('Ext.data.Store', {
model: 'CheckRecord3',
pageSize: 10,
proxy: {
type: 'ajax',
url: baseUrl + 'iot/spotoperationrecord/getJlPointsList1',
reader: {
type: 'json',
root: 'RESULT',
totalProperty: 'totalCount'
},
extraParams: {
queryJson: Ext.JSON.encode(queryJson)
}
},
remoteSort: true
});
var data = Ext.Date.format(new Date(), 'm/d/Y');
var show_page = function () {
var plan_name = document.getElementById('inspectorsCheck_title2_input').value;
var person_liable_id = document.getElementById('inspectorsCheck_title3_input1').value;
var data3b = document.getElementById('inspectorsCheck_title3_input2').value;
var data3a = document.getElementById('inspectorsCheck_title3_input3').value;
var zt = document.getElementById('inspectorsCheck_title3_input4').value;
var query = new Object();
if (plan_name.length > 0) {
query.plan_name = plan_name;
$("#plan_name").val(plan_name);
}
if (data3b.length > 0) {
query.data3b = data3b;
$("#data3b").val(data3b);
}
if (data3a.length > 0) {
query.data3a = data3a;
$("#data3a").val(data3a);
}
if (zt.length > 0) {
query.zt = zt;
$("#zt").val(zt);
}
if (person_liable_id.length > 0) {
query.person_liable_id = person_liable_id;
$("#person_liable_id").val(person_liable_id);
}
// query.V_LOGINNAME = V_LOGINNAME;
// query.V_PASSWORD = V_PASSWORD;
var jsonstr = Ext.JSON.encode(query);
myStore.getProxy().extraParams = {
queryJson: jsonstr
};
Ext.getCmp('InspectorsCheckListPageToolbar').moveFirst();
}
var reset1 = function () {
const time = new Date();
const Y = time.getFullYear(); //年
const M = time.getMonth(); //月
const D = time.getDate(); //日
document.getElementById('inspectorsCheck_title2_input').value = ''
document.getElementById('inspectorsCheck_title3_input1').value = 0;
document.getElementById('inspectorsCheck_title3_input2').value = '';
document.getElementById('inspectorsCheck_title3_input3').value = '';
document.getElementById('inspectorsCheck_title3_input4').value = 4;
$("#plan_name").val('');
$("#data3b").val('');
$("#data3a").val('');
$("#zt").val('');
$("#person_liable_id").val('');
show_page();
}
mouseon = function (obj) {
var id = obj.id;
$("#" + id).removeClass(id);
$("#" + id).addClass(id + '_on');
}
mouseoff = function (obj) {
var mid = "inspectorsCheck_";
for (var i = 1; i < 4; i++) {
var id = "inspectorsCheck_title" + i + "_div";
$("#" + id).removeClass(id + '_on');
$("#" + id).addClass(id);
}
if (menuidx == 'm1') {
mid += 'title1_div';
$("#" + mid).removeClass(mid);
$("#" + mid).addClass(mid + '_on');
}
else if (menuidx == 'm2') {
mid += 'title2_div';
$("#" + mid).removeClass(mid);
$("#" + mid).addClass(mid + '_on');
}
else if (menuidx == 'm3') {
mid += 'title3_div';
$("#" + mid).removeClass(mid);
$("#" + mid).addClass(mid + '_on');
}
}
menu_click = function (obj) {
var id = obj.id;
if (id == 'inspectorsCheck_title1_div') {
menuidx = 'm1';
show_page();
}
else if (id == 'inspectorsCheck_title2_div') {
menuidx = 'm2';
reset1();
}
else if (id == 'inspectorsCheck_title3_div') {
menuidx = 'm3';
exportbtn_click();
}
}
var maintenancedevice = function () {
var maintenance_look_device = document.getElementById('inspectorsCheck_look_device');
var img = document.createElement('img');
img.width = 400;
img.height = 400;
img.src = baseUrl + ConfirmStore[0].picture_route;
// img.src = ConfirmStore[0].picture_route;
img.setAttribute('class', 'maintenance_look_device_img');
maintenance_look_device.appendChild(img);
var div4 = document.createElement('div');
div4.style.textAlign = 'center';
div4.innerHTML = ConfirmStore[0].remarks;
maintenance_look_device.appendChild(div4);
}
var editMaintenance = function (spot_id) {
var spot_id = spot_id;
Ext.create('Ext.window.Window', {
id: 'inspectorsCheck_data_win1',
height: 500,
width: 400,
layout: 'fit',
modal: true,
buttons: [
{
text: '关闭',
handler: function () {
Ext.getCmp('inspectorsCheck_data_win1').destroy();
}
}
],
closeAction: 'destroy',
html: '
'
}).show();
var query = new Object();
query.V_LOGINNAME = $("#V_LOGINNAME").val();
// query.V_PASSWORD = $("#V_PASSWORD").val();
query.id = spot_id;
$.ajax({
type: 'POST',
url: baseUrl + "iot/inspectionpoints/getList1",
data: {
queryJson: Ext.JSON.encode(query)
},
success: function (result) {
var json = eval('(' + result + ')');
if (json.action == 'getInspectionPointsList') {
ConfirmStore = json.RESULT;
maintenancedevice(ConfirmStore);
}
}
});
}
var maintenancePresentation = function () {
var maintenanceCheck_look_Presentation = document.getElementById('inspectorsCheck_look_Presentation');
var img = document.createElement('img');
img.src = ConfirmStore[0].report_photos;
img.setAttribute('class', 'maintenance_look_device_img_baogao');
maintenanceCheck_look_Presentation.appendChild(img);
var div4 = document.createElement('div');
div4.style.textAlign = 'center';
div4.innerHTML = ConfirmStore[0].dwsb_remarks;
maintenanceCheck_look_Presentation.appendChild(div4);
}
var editMaintenancePresentation = function (spot_id) {
var spot_id = spot_id;
Ext.create('Ext.window.Window', {
id: 'inspectorsCheck_Presentation_win1',
height: 400,
width: 300,
layout: 'fit',
modal: true,
buttons: [
{
text: '关闭',
handler: function () {
Ext.getCmp('inspectorsCheck_Presentation_win1').destroy();
}
}
],
closeAction: 'destroy',
html: ''
}).show();
var query = new Object();
// query.V_LOGINNAME = $("#V_LOGINNAME").val();
// query.V_PASSWORD = $("#V_PASSWORD").val();
query.jlid = spot_id;
$.ajax({
type: 'POST',
url: baseUrl + "iot/spotoperationrecord/getJlPointsList1",
data: {
queryJson: Ext.JSON.encode(query)
},
success: function (result) {
var json = eval('(' + result + ')');
if (json.action == 'getjlPointsList') {
ConfirmStore = json.RESULT;
maintenancePresentation(ConfirmStore);
}
}
});
}
changeon = function (obj) {
var id = document.getElementById('checkRecord_id').value;
var value = obj.value;
var query = new Object();
if (value.length > 0) {
query.data3 = value;
}
query.id = id;
// query.V_LOGINNAME = V_LOGINNAME;
// query.V_PASSWORD = V_PASSWORD;
var jsonstr = Ext.JSON.encode(query);
myStore1.getProxy().extraParams = {
queryJson: jsonstr
};
Ext.getCmp('InspectorsCheckListPageToolbar1').moveFirst();
}
var MaintenanceCheckPanel1 = Ext.create('Ext.grid.Panel', {
header: {
height: 0,
border: '0px solid #000000'
},
id: 'InspectorsCheckListPanel1',
store: myStore1,
selModel: sm1,
columns: [
{ header: '点位记录ID', dataIndex: 'jlid', hidden: true, menuDisabled: true },
{ header: '点位ID', dataIndex: 'dwid', hidden: true, menuDisabled: true },
{ header: '序号', dataIndex: 'xh', hidden: true, menuDisabled: true },
{ header: '点位名称', dataIndex: 'spot_name', width: 150, align: 'center', menuDisabled: true },
{ header: '点位地址', dataIndex: 'spot_address', width: 150, align: 'center', menuDisabled: true },
{ header: '巡检状态', dataIndex: 'wcqk', width: 70, align: 'center', menuDisabled: true },
{ header: '巡检人', dataIndex: 'wbr', width: 70, align: 'center', menuDisabled: true },
{ header: '巡检时间', dataIndex: 'wc_time', width: 156, align: 'center', menuDisabled: true },
{
text: '点位详情',
xtype: 'actioncolumn',
width: 80,
sortable: false,
align: 'center',
menuDisabled: true,
items: [{
icon: '../../res/img/common/tupianbtn.png',
tooltip: '点位详情',
handler: function (grid, rowIndex, colIndex) {
var rec = grid.getStore().getAt(rowIndex);
// alert(rec.get("dwid"));
editMaintenance(rec.get("dwid"));
}
}]
},
{
text: '巡检报告',
xtype: 'actioncolumn',
width: 80,
sortable: false,
align: 'center',
menuDisabled: true,
items: [{
icon: '../../res/img/common/tupianbtn.png',
tooltip: '点位详情',
handler: function (grid, rowIndex, colIndex) {
var rec = grid.getStore().getAt(rowIndex);
editMaintenancePresentation(rec.get("jlid"));
}
}]
}
],
columnLines: true,
height: 380,
width: 780,
bbar: new Ext.PagingToolbar({
store: myStore1,
id: 'InspectorsCheckListPageToolbar1',
displayInfo: true,
pageSize: 10,
prependButtons: true,
displayMsg: '显示第 {0}条到 {1}条记录,总共 {2}条',
emptyMsg: "没有记录",
firstText: '第一页',
prevText: '前一页',
nextText: '后一页',
lastText: '最后一页',
refreshText: '刷新',
}),
// frame: true,
border: false,
iconCls: 'icon-grid'
// renderTo: Ext.getBody()
});
var childPanel3 = Ext.create('Ext.Panel', {
height: 50,
width: '100%',
html: '巡检状态:
'
});
var piebar2 = Ext.create('Ext.panel.Panel', {
id: 'inspectorsCheckHtml2',
width: '100%',
height: 50,
region: 'north',
layout: 'form',
defaults: {
border: false
},
items: [childPanel3]
});
var modifywin = function (id) {
Ext.create('Ext.window.Window', {
title: '巡检点位',
height: 500,
width: 800,
modal: true,
layout: 'border',
items: [piebar2, MaintenanceCheckPanel1],
buttons: [
{
text: '关闭',
handler: function () {
this.up('window').hide();
}
}
],
closeAction: 'hide'
}).show();
}
var piedarHtml2 = function () {
var date = new Date;
var dates = Ext.util.Format.date(date, 'Y-m-d');
var preDate = new Date(date.getTime() - 24 * 60 * 60 * 1000);
var dates2 = Ext.util.Format.date(preDate, 'Y-m-d');
var maintenanceCheckHtml = document.getElementById('inspectorsCheckHtml');
var divhiddle = document.createElement('div');
divhiddle.id = 'div26_id_checkrecordPanel3';
divhiddle.setAttribute('class', 'SpringHandleHtml3DivHiddle');
maintenanceCheckHtml.appendChild(divhiddle);
var title = document.createElement('div');
title.setAttribute('class', 'MaintenancePersonTitle');
title.innerHTML = '巡检记录';
maintenanceCheckHtml.appendChild(title);
var title2 = document.createElement('div');
title2.setAttribute('class', 'Check_title2_div');
title2.innerHTML = '任务名称';
maintenanceCheckHtml.appendChild(title2);
var input = document.createElement('input');
input.setAttribute('class', 'Check_input_class');
input.setAttribute('id', 'inspectorsCheck_title2_input');
input.setAttribute('type', 'text');
input.setAttribute('value', '');
maintenanceCheckHtml.appendChild(input);
var title3 = document.createElement('div');
title3.setAttribute('class', 'Check_title3_div');
title3.innerHTML = '责任人';
maintenanceCheckHtml.appendChild(title3);
var select = document.createElement('select');
select.setAttribute('class', 'Check_input1_class');
select.setAttribute('id', 'inspectorsCheck_title3_input1');
maintenanceCheckHtml.appendChild(select);
var option2 = document.createElement('option');
option2.innerHTML = '所有人';
option2.setAttribute('value', '0');
select.appendChild(option2);
for (var i = 0; i < ConfirmStore1.length; i++) {
var option3 = document.createElement('option');
option3.innerHTML = ConfirmStore1[i].name;
option3.setAttribute('value', ConfirmStore1[i].person_liable_id);
select.appendChild(option3);
}
var title4 = document.createElement('div');
title4.setAttribute('class', 'inspectorsCheck_title1_div');
title4.setAttribute('id', 'inspectorsCheck_title1_div');
title4.setAttribute('onmouseover', "mouseon(this)");
title4.setAttribute('onmouseout', "mouseoff(this)");
title4.setAttribute('onclick', "menu_click(this)");
maintenanceCheckHtml.appendChild(title4);
var title5 = document.createElement('div');
title5.setAttribute('class', 'inspectorsCheck_title2_div');
title5.setAttribute('id', 'inspectorsCheck_title2_div');
title5.setAttribute('onmouseover', "mouseon(this)");
title5.setAttribute('onmouseout', "mouseoff(this)");
title5.setAttribute('onclick', "menu_click(this)");
maintenanceCheckHtml.appendChild(title5);
var title6 = document.createElement('div');
title6.setAttribute('class', 'inspectorsCheck_title3_div');
title6.setAttribute('id', 'inspectorsCheck_title3_div');
title6.setAttribute('onmouseover', "mouseon(this)");
title6.setAttribute('onmouseout', "mouseoff(this)");
title6.setAttribute('onclick', "menu_click(this)");
maintenanceCheckHtml.appendChild(title6);
var input2 = document.createElement('input');
input2.setAttribute('class', 'Check_input2_class');
input2.setAttribute('id', 'inspectorsCheck_title3_input2');
input2.setAttribute('type', 'text');
input2.setAttribute('readonly', 'true');
input2.setAttribute('value', dates);
maintenanceCheckHtml.appendChild(input2);
var title8 = document.createElement('div');
title8.setAttribute('class', 'Check_title8_div');
title8.innerHTML = '~';
maintenanceCheckHtml.appendChild(title8);
var input3 = document.createElement('input');
input3.setAttribute('class', 'Check_input3_class');
input3.setAttribute('id', 'inspectorsCheck_title3_input3');
input3.setAttribute('type', 'text');
input3.setAttribute('readonly', 'true');
input3.setAttribute('value', dates2);
maintenanceCheckHtml.appendChild(input3);
//设置开始时间
var startDate = laydate.render({
elem: '#inspectorsCheck_title3_input3',
done: function (value, date) {
if (value !== '') {
endDate.config.min.year = date.year;
endDate.config.min.month = date.month - 1;
endDate.config.min.date = date.date;
} else {
endDate.config.min.year = '';
endDate.config.min.month = '';
endDate.config.min.date = '';
}
}
});
//设置结束时间
var endDate = laydate.render({
elem: '#inspectorsCheck_title3_input2',
done: function (value, date) {
if (value !== '') {
startDate.config.max.year = date.year;
startDate.config.max.month = date.month - 1;
startDate.config.max.date = date.date;
} else {
startDate.config.max.year = '';
startDate.config.max.month = '';
startDate.config.max.date = '';
}
}
});
var title7 = document.createElement('div');
title7.setAttribute('class', 'Check_title7_div');
title7.innerHTML = ' 实际完成';
maintenanceCheckHtml.appendChild(title7);
var select1 = document.createElement('select');
select1.setAttribute('class', 'Check_input4_class');
select1.setAttribute('id', 'inspectorsCheck_title3_input4');
maintenanceCheckHtml.appendChild(select1);
var option3 = document.createElement('option');
option3.innerHTML = '所有';
option3.setAttribute('value', '4');
select1.appendChild(option3);
var option1 = document.createElement('option');
option1.innerHTML = '未开始';
option1.setAttribute('value', '0');
select1.appendChild(option1);
var option2 = document.createElement('option');
option2.innerHTML = '进行中';
option2.setAttribute('value', '1');
select1.appendChild(option2);
var option3 = document.createElement('option');
option3.innerHTML = '完成';
option3.setAttribute('value', '3');
select1.appendChild(option3);
var option4 = document.createElement('option');
option4.innerHTML = '超时';
option4.setAttribute('value', '2');
select1.appendChild(option4);
var title9 = document.createElement('div');
title9.setAttribute('class', 'Check_title9_div');
title9.innerHTML = '任务状态';
maintenanceCheckHtml.appendChild(title9);
var title10 = document.createElement('div');
title10.setAttribute('class', 'maintenanceCheck_title20_div');
maintenanceCheckHtml.appendChild(title10);
var title11 = document.createElement('div');
title11.setAttribute('class', 'maintenanceCheck_title11_div');
maintenanceCheckHtml.appendChild(title11);
var title12 = document.createElement('div');
title12.setAttribute('class', 'maintenanceCheck_title12_div');
maintenanceCheckHtml.appendChild(title12);
var title13 = document.createElement('div');
title13.setAttribute('class', 'maintenanceCheck_title13_div');
maintenanceCheckHtml.appendChild(title13);
var title14 = document.createElement('div');
title14.setAttribute('class', 'Check_title14_div');
title14.innerHTML = jrwcrw;
maintenanceCheckHtml.appendChild(title14);
var title15 = document.createElement('div');
title15.setAttribute('class', 'Check_title15_div');
title15.innerHTML = csrw;
maintenanceCheckHtml.appendChild(title15);
var title16 = document.createElement('div');
title16.setAttribute('class', 'Check_title16_div');
title16.innerHTML = jrrw;
maintenanceCheckHtml.appendChild(title16);
var title17 = document.createElement('div');
title17.setAttribute('class', 'Check_title17_div');
title17.innerHTML = xjrysl;
maintenanceCheckHtml.appendChild(title17);
}
var piedarHtml = function () {
var query = new Object();
query.V_LOGINNAME = $("#V_LOGINNAME").val();
pieMask.show();
$.ajax({
type: 'POST',
url: baseUrl + "iot/spotoperationrecord/getList2",
data: {
queryJson: Ext.JSON.encode(query)
},
success: function (result) {
var json = eval('(' + result + ')');
if (json.action == 'getSpotOperationRecordList2') {
// ConfirmStore = json.RESULT;
ConfirmStore1 = json.RESULT1;
xjrysl = json.xjrysl;
jrwcrw = json.jrwcrw;
csrw = json.csrw;
jrrw = json.jrrw;
piedarHtml2();
}
pieMask.hide();
}
});
}
var InspectorsCheckListPanel = Ext.create('Ext.grid.Panel', {
header: {
height: 0,
border: '0px solid #000000'
},
id: 'InspectorsCheckListPanel',
store: myStore,
selModel: sm,
columns: [
{ header: 'ID', dataIndex: 'id', hidden: true, menuDisabled: true },
{ header: '序号', dataIndex: 'xh', width: 77, menuDisabled: true },
{ header: '任务名称', dataIndex: 'plan_name', width: 250, align: 'center', menuDisabled: true },
{
text: '巡检点位',
xtype: 'actioncolumn',
width: 140,
sortable: false,
align: 'center',
menuDisabled: true,
items: [{
icon: '../../res/img/common/chakanbtn.png',
tooltip: '巡检点位',
handler: function (grid, rowIndex, colIndex) {
var rec = grid.getStore().getAt(rowIndex);
$("#checkRecord_id").val(rec.get("id"));
modifywin(rec.get("id"));
var label = rec.get("id");
var query = new Object();
// alert(label);
if (label.length > 0) {
query.id = label;
}
// query.V_LOGINNAME = V_LOGINNAME;
// query.V_PASSWORD = V_PASSWORD;
var jsonstr = Ext.JSON.encode(query);
myStore1.getProxy().extraParams = {
queryJson: jsonstr
};
myStore1.reload();
}
}]
},
{ header: '应完成时间', dataIndex: 'ywcsj', width: 250, align: 'center', menuDisabled: true },
{ header: '当前状态', dataIndex: 'zt', width: 120, align: 'center', menuDisabled: true },
{ header: '完成情况(%)', dataIndex: 'completion', width: 120, align: 'center', menuDisabled: true },
{ header: '实际完成时间', dataIndex: 'data3', width: 240, align: 'center', menuDisabled: true },
{ header: '相关责任人', dataIndex: 'name', width: 100, align: 'center', menuDisabled: true },
{ header: '联系电话', dataIndex: 'phone', width: 140, align: 'center', menuDisabled: true },
],
columnLines: true,
height: maxHeight,
width: '100%',
bbar: new Ext.PagingToolbar({
store: myStore,
id: 'InspectorsCheckListPageToolbar',
displayInfo: true,
pageSize: countPerPage,
prependButtons: true,
displayMsg: '显示第 {0}条到 {1}条记录,总共 {2}条',
emptyMsg: "没有记录",
firstText: '第一页',
prevText: '前一页',
nextText: '后一页',
lastText: '最后一页',
refreshText: '刷新',
}),
border: false,
iconCls: 'icon-grid'
});
var piebar = Ext.create('Ext.panel.Panel', {
id: 'inspectorsCheckHtml',
width: '100%',
height: 250,
region: 'north',
layout: 'form',
defaults: {
border: false
}
});
pieMask = new Ext.LoadMask(piebar, { msg: "Loading..." });
new Ext.create('Ext.panel.Panel', {
width: '100%',
id: 'InspectorsCheckPiebar',
layout: 'border',
items: [
piebar, InspectorsCheckListPanel
],
renderTo: Ext.getBody()
});
myStore.reload();
myStore.addListener('load', function (store, record, opts) {
if (document.getElementById('div26_id_checkrecordPanel3') == undefined)
piedarHtml();
});
maxHeight = document.documentElement.clientHeight;
Ext.getCmp('InspectorsCheckPiebar').setHeight(maxHeight);
});