Ver código fonte

3dDisplayEngine company.js 唐峰 commit at 2021-01-06

唐峰 4 anos atrás
pai
commit
d91ae98c2a
1 arquivos alterados com 113 adições e 0 exclusões
  1. 113 0
      3dDisplayEngine/buildingJs/company.js

+ 113 - 0
3dDisplayEngine/buildingJs/company.js

@@ -1796,3 +1796,116 @@ var show_userinfo_detail = function(devId) {
                         title: '请验证身份',
                         width: 320,
                         height: 240,
+                        modal: true,
+                        closable: false,
+                        items: [{
+                            xtype: 'textfield',
+                            name: 'v_loginname',
+                            fieldLabel: '登录名',
+                            id: 'v_loginname',
+                            allowBlank: false
+                        }, {
+                            xtype: 'textfield',
+                            name: 'v_password',
+                            fieldLabel: '密  码',
+                            id: 'v_password',
+                            inputType: 'password',
+                            allowBlank: false
+                        }],
+                        bbar: ['->', {
+                            xtype: 'button',
+                            text: '提交',
+                            handler: function() {
+                                var query = new Object();
+                                query.V_LOGINNAME = V_LOGINNAME;
+                                query.V_PASSWORD = V_PASSWORD;
+                                query.DEVICE_ID = devId;
+                                query.CMD = 95;
+                                query.PARAM = pushtts ? 1 : 0;
+                                var qjson = Ext.JSON.encode(query);
+                                var url = ((company_code == "10012") ? "http://47.103.74.123:8080/YtIoT/cgi-bin/DPAction2.cgi?t=" : "http://47.103.74.123:8080/YtIoT/cgi-bin/DPAction.cgi?t=") + (new Date().getTime());
+                                $.ajax({
+                                    type: 'POST',
+                                    url: url,
+                                    data: qjson,
+                                    success: function(result) {
+                                        var json = eval('(' + result + ')');
+                                        if (json.RESULT == '1') {
+                                            Ext.Msg.alert('操作信息', '命令已下发');
+
+                                        }
+                                    }
+                                });
+                                this.up("window").close();
+                            }
+                        }, {
+                            xtype: 'button',
+                            text: '关闭',
+                            handler: function() {
+                                this.up("window").close();
+                            }
+                        }],
+                        closeAction: 'destroy',
+                        listeners: {
+                            close: function() {
+                                var query = new Object();
+                                query.V_LOGINNAME = V_LOGINNAME;
+                                query.V_PASSWORD = V_PASSWORD;
+                                query.DEVICE_ID = devId;
+                                query.CMD = 93;
+                                query.PARAM = 0;
+                                var qjson = Ext.JSON.encode(query);
+                                var url = ((company_code == "10012") ? "http://47.103.74.123:8080/YtIoT/cgi-bin/DPAction2.cgi?t=" : "http://47.103.74.123:8080/YtIoT/cgi-bin/DPAction.cgi?t=") + (new Date().getTime());
+                                $.ajax({
+                                    type: 'POST',
+                                    url: url,
+                                    data: qjson,
+                                    success: function(result) {
+                                        var json = eval('(' + result + ')');
+                                        if (json.RESULT == '1') {
+                                            fill_uiwin(json);
+                                        }
+                                    }
+                                });
+                            }
+                        }
+                    }).show();
+                }
+            }
+        }, '-', {
+            xtype: 'checkbox',
+            boxLabel: '微信推送',
+            id: 'userinfo_pushalarm',
+            checked: true,
+            handler: function() {
+                if (!fillvalue) {
+                    var pushalarm = Ext.getCmp('userinfo_pushalarm').getValue();
+                    Ext.create('Ext.window.Window', {
+                        id: 'detail_userinfo_pushset_win',
+                        title: '请验证身份',
+                        width: 320,
+                        height: 240,
+                        modal: true,
+                        closable: false,
+                        items: [{
+                            xtype: 'textfield',
+                            name: 'v_loginname',
+                            fieldLabel: '登录名',
+                            id: 'v_loginname',
+                            allowBlank: false
+                        }, {
+                            xtype: 'textfield',
+                            name: 'v_password',
+                            fieldLabel: '密  码',
+                            id: 'v_password',
+                            inputType: 'password',
+                            allowBlank: false
+                        }],
+                        bbar: ['->', {
+                            xtype: 'button',
+                            text: '提交',
+                            handler: function() {
+                                var query = new Object();
+                                query.V_LOGINNAME = V_LOGINNAME;
+                                query.V_PASSWORD = V_PASSWORD;
+                                query.DEVICE_ID = devId;