|
@@ -2178,3 +2178,188 @@ var show_alarm_pic = function(url) {
|
|
var pic = document.createElement('div');
|
|
var pic = document.createElement('div');
|
|
pic.style.width = '360px';
|
|
pic.style.width = '360px';
|
|
pic.style.height = '270px';
|
|
pic.style.height = '270px';
|
|
|
|
+ status_list_bar.appendChild(pic);
|
|
|
|
+ var img = document.createElement('img');
|
|
|
|
+ img.width = 360;
|
|
|
|
+ img.height = 270;
|
|
|
|
+ img.src = url;
|
|
|
|
+ pic.appendChild(img);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+var show_alarm_info = function(dwtype, status, id, name, device_code, company_code, company_name, fullname, time, data, data2, clzt, clwb, clr_name, clnr, clsj) {
|
|
|
|
+ vAlarmInfoWin.show();
|
|
|
|
+ if ((dwtype == 'YTVA') || (dwtype == '16')) {
|
|
|
|
+ vAlarmInfoWin.setWidth(780);
|
|
|
|
+ Ext.getCmp('picPanel').setWidth(360);
|
|
|
|
+ Ext.getCmp('picPanel').setHeight(270);
|
|
|
|
+ var img = document.createElement('img');
|
|
|
|
+ img.width = 360;
|
|
|
|
+ img.height = 270;
|
|
|
|
+ img.src = data2;
|
|
|
|
+ var alarm_pic = document.getElementById('alarm_pic');
|
|
|
|
+ alarm_pic.innerHTML = '';
|
|
|
|
+ alarm_pic.appendChild(img);
|
|
|
|
+ } else {
|
|
|
|
+ vAlarmInfoWin.setWidth(400);
|
|
|
|
+ Ext.getCmp('picPanel').setWidth(0);
|
|
|
|
+ Ext.getCmp('picPanel').setHeight(0);
|
|
|
|
+ }
|
|
|
|
+ $("#VInfoWin_Title").html(data);
|
|
|
|
+ Ext.getCmp('uf_company_name').setValue(company_name);
|
|
|
|
+ Ext.getCmp('uf_name').setValue(name);
|
|
|
|
+ Ext.getCmp('uf_device_code').setValue(device_code);
|
|
|
|
+ Ext.getCmp('uf_fullname').setValue(fullname);
|
|
|
|
+ Ext.getCmp('uf_clr').setValue(clr_name);
|
|
|
|
+ Ext.getCmp('uf_clsj').setValue(clsj);
|
|
|
|
+ Ext.getCmp('uf_clnr').setValue(clnr);
|
|
|
|
+ Ext.getCmp('uf_id').setValue(id);
|
|
|
|
+ Ext.getCmp('uf_clwb').setValue(clwb == '1' ? '误报' : '告警');
|
|
|
|
+ Ext.getCmp('uf_status').setValue(status);
|
|
|
|
+ Ext.getCmp('uf_dwtype').setValue(dwtype);
|
|
|
|
+ if (clzt == '已处理') {
|
|
|
|
+ vAlarmInfoWin.setHeight(460);
|
|
|
|
+ Ext.getCmp('uf_clwb').setVisible(true);
|
|
|
|
+ Ext.getCmp('uf_r_clwb').setVisible(false);
|
|
|
|
+ Ext.getCmp('uf_r_clfw').setVisible(false);
|
|
|
|
+ Ext.getCmp('confirmBtn').setVisible(false);
|
|
|
|
+ Ext.getCmp('uf_clr').setVisible(true);
|
|
|
|
+ Ext.getCmp('uf_clsj').setVisible(true);
|
|
|
|
+ if (dwtype == 'YTVA')
|
|
|
|
+ vAlarmInfoWin.setPosition(
|
|
|
|
+ ($(document).innerWidth() - 780) / 2,
|
|
|
|
+ ($(document).innerHeight() - 460) / 2);
|
|
|
|
+ else
|
|
|
|
+ vAlarmInfoWin.setPosition(
|
|
|
|
+ ($(document).innerWidth() - 400) / 2,
|
|
|
|
+ ($(document).innerHeight() - 460) / 2);
|
|
|
|
+ } else {
|
|
|
|
+ vAlarmInfoWin.setHeight(400);
|
|
|
|
+ Ext.getCmp('uf_clwb').setVisible(false);
|
|
|
|
+ Ext.getCmp('uf_r_clwb').setVisible(true);
|
|
|
|
+ Ext.getCmp('uf_r_clfw').setVisible(true);
|
|
|
|
+ Ext.getCmp('confirmBtn').setVisible(true);
|
|
|
|
+ Ext.getCmp('uf_clr').setVisible(false);
|
|
|
|
+ Ext.getCmp('uf_clsj').setVisible(false);
|
|
|
|
+ if ((dwtype == 'YTVA') || (dwtype == '16'))
|
|
|
|
+ vAlarmInfoWin.setPosition(
|
|
|
|
+ ($(document).innerWidth() - 780) / 2,
|
|
|
|
+ ($(document).innerHeight() - 400) / 2);
|
|
|
|
+ else
|
|
|
|
+ vAlarmInfoWin.setPosition(
|
|
|
|
+ ($(document).innerWidth() - 400) / 2,
|
|
|
|
+ ($(document).innerHeight() - 400) / 2);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+var getCompanyInfo = function() {
|
|
|
|
+ var query = new Object();
|
|
|
|
+ query.V_LOGINNAME = V_LOGINNAME;
|
|
|
|
+ query.V_PASSWORD = V_PASSWORD;
|
|
|
|
+ query.COMPANY_CODE = company_code;
|
|
|
|
+ query.COMMSTATUS = "NO";
|
|
|
|
+ var qdata = 'queryJson=' + Ext.JSON.encode(query);
|
|
|
|
+ myMask.show();
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: 'POST',
|
|
|
|
+ url: basePath + "iot/frontpage/getCurrentObjectListByCompanyId",
|
|
|
|
+ data: qdata,
|
|
|
|
+ success: function(result) {
|
|
|
|
+ var json = eval('(' + result + ')');
|
|
|
|
+ if (json.action == 'getCurrentObjectListByCompanyId') {
|
|
|
|
+ if (json.check == true) {
|
|
|
|
+ if (json.LIST != undefined) {
|
|
|
|
+ max_level = json.max_level;
|
|
|
|
+ min_level = json.min_level;
|
|
|
|
+ top_level = json.top_level;
|
|
|
|
+ building_name = json.buinding;
|
|
|
|
+ companyStore = json.COMPANY;
|
|
|
|
+ buildingStore = json.LIST;
|
|
|
|
+ }
|
|
|
|
+ draw_buinding();
|
|
|
|
+ } else {
|
|
|
|
+ Ext.Msg.alert('错误信息', '访问权限错误,请重新登录', function() {
|
|
|
|
+ window.parent.document.location = basePath;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ myMask.hide();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ // setTimeout(getCompanyInfo,storeTime);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+Ext.onReady(function() {
|
|
|
|
+ basePath = $("#basePath").val();
|
|
|
|
+ $("#V_LOGINNAME").val(sessionStorage.getItem('V_LOGINNAME'));
|
|
|
|
+ $("#V_PASSWORD").val(sessionStorage.getItem('V_PASSWORD'));
|
|
|
|
+ V_LOGINNAME = $("#V_LOGINNAME").val();
|
|
|
|
+ V_PASSWORD = $("#V_PASSWORD").val();
|
|
|
|
+ company_code = $("#company_code").val();
|
|
|
|
+ theme = $("#theme").val();
|
|
|
|
+ parent.window.keep_menu();
|
|
|
|
+ myMask = new Ext.LoadMask(Ext.getBody(), {
|
|
|
|
+ msg: '查询中,请稍后!',
|
|
|
|
+ cls: 'toplevel',
|
|
|
|
+ removeMask: true //完成后移除
|
|
|
|
+ });
|
|
|
|
+ Ext.define('CompanyComboStore1', {
|
|
|
|
+ extend: 'Ext.data.Model',
|
|
|
|
+ fields: [
|
|
|
|
+ { name: 'owner_name', type: 'string' },
|
|
|
|
+ { name: 'owner_id', type: 'string' }
|
|
|
|
+ ]
|
|
|
|
+ });
|
|
|
|
+ var qobj = new Object();
|
|
|
|
+ qobj.V_LOGINNAME = $("#V_LOGINNAME").val();
|
|
|
|
+ qobj.V_PASSWORD = $("#V_PASSWORD").val();
|
|
|
|
+
|
|
|
|
+ var CompanyStory = Ext.create('Ext.data.Store', {
|
|
|
|
+ model: 'CompanyComboStore1',
|
|
|
|
+ proxy: {
|
|
|
|
+ type: 'ajax',
|
|
|
|
+ actionMethods: {
|
|
|
|
+ create: 'POST',
|
|
|
|
+ read: 'POST', // by default GET
|
|
|
|
+ update: 'POST',
|
|
|
|
+ destroy: 'POST'
|
|
|
|
+ },
|
|
|
|
+ url: basePath + 'iot/company/view/getNameList',
|
|
|
|
+ reader: {
|
|
|
|
+ type: 'json',
|
|
|
|
+ root: 'RESULT',
|
|
|
|
+ totalProperty: 'totalCount'
|
|
|
|
+ },
|
|
|
|
+ extraParams: {
|
|
|
|
+ queryJson: Ext.JSON.encode(qobj)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ var ModifyForm = Ext.create('Ext.form.Panel', {
|
|
|
|
+ id: 'CompanyFactoryUpdateForm',
|
|
|
|
+ labelWidth: 55,
|
|
|
|
+ // url: basePath+'devicemodel/updateDeviceModel',
|
|
|
|
+ defaultType: 'textfield',
|
|
|
|
+ bodyPadding: 15,
|
|
|
|
+ items: [{
|
|
|
|
+ xtype: 'combo',
|
|
|
|
+ fieldLabel: '单位',
|
|
|
|
+ id: 'fa_company_code',
|
|
|
|
+ name: 'company_code',
|
|
|
|
+ displayField: 'owner_name',
|
|
|
|
+ valueField: 'owner_id',
|
|
|
|
+ editable: false,
|
|
|
|
+ anchor: '85%',
|
|
|
|
+ store: CompanyStory
|
|
|
|
+ }, {
|
|
|
|
+ xtype: 'textfield',
|
|
|
|
+ fieldLabel: '文件上传',
|
|
|
|
+ name: 'file',
|
|
|
|
+ id: 'fa_userfile',
|
|
|
|
+ inputType: 'file',
|
|
|
|
+ blankText: 'File can\'t not empty.',
|
|
|
|
+ anchor: '100%' // anchor width by percentage
|
|
|
|
+ }, {
|
|
|
|
+ xtype: 'textfield',
|
|
|
|
+ id: 'fa_factory_queryJson',
|