Skip to content

Commit

Permalink
Modified the control mothod of Nodes according to Hardware Interface.
Browse files Browse the repository at this point in the history
Signed-off-by: yeguangsuixing <[email protected]>
  • Loading branch information
yeguangsuixing committed Aug 11, 2014
1 parent 6f0baf3 commit 966149f
Show file tree
Hide file tree
Showing 21 changed files with 25,061 additions and 93 deletions.
21 changes: 19 additions & 2 deletions Application/Home/Controller/InnerfController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public function node_table(){
$this->display();
}
public function node_info_single($baidu_id){
$this->show("{id:'GTFRTYFD',name:'节点名称node_info_single',location:'120.456,43.56',position:'江苏省南京市白下区',mode:0,scale:45.345,level:20,freq:3601}");
$this->show("{id:'GTFRTYFD',name:'节点名称node_info_single',location:'120.456,43.56',position:'江苏省南京市白下区',mode:0,scale:45.345,level:20,freq:3601,nh3:45,h2s:57}");
}

public function my_info(){
Expand All @@ -24,13 +24,30 @@ public function password_modify_validate(){
}

public function node_edit($nid){
$this->show("修改".I("nid")."成功!");
$data = '';//$this->conn_application_server($nid);
$this->show("修改".I("nid")."成功!".$data);
}

public function test(){
$this->show('test!');
}

public function conn_application_server($nid){
$errno = '';
$errstr = '';
$data = '';
$header = "GET /?type=node&id=$nid&mode=1 HTTP/1.1\r\n";
$header .= "Host:127.0.0.1:8316\r\n";
$header .= "Connection:Close\r\n\r\n";
$fp = fsockopen("127.0.0.1", 8316, $errno, $errstr, 100) or exit($errno."--->".$errstr);
fwrite($fp, $header);
fflush($fp);
while (!feof($fp)) {
$data .= fgets($fp,1024);
}
fclose($fp);
return $data;
}
}


Expand Down
5 changes: 2 additions & 3 deletions Application/Home/View/Index/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
id:'menu-panel',
title:'菜单',
split:true,
width: 100,
minSize: 100,
width: 120,
minSize: 120,
maxSize: 400,
collapsible: true,
margins:'0 0 0 5',
Expand Down Expand Up @@ -113,7 +113,6 @@
</div>
<div id="tcs_menu_mine">
<div class="tcs_menu_item" id="tcs_menu_item_my_info" onclick="addTcsTab(this, 'test')">我的资料</div>
<div class="tcs_menu_item" id="tcs_menu_item_info_modify" onclick="addTcsTab(this, 'test')">资料修改</div>
<div class="tcs_menu_item" id="tcs_menu_item_password_modify" onclick="addTcsTab(this, '__ROOT__/Home/Inner/password_modify')">密码修改</div>
</div>

Expand Down
7 changes: 4 additions & 3 deletions Application/Home/View/Indexf/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
right:0px;
top:33px;
width:140px;
background:rgba(255,255,255,0.8);
background-color: white;
height:30px;
line-height:30px;
padding:5px;
Expand Down Expand Up @@ -104,8 +104,8 @@
id:'menu-panel',
title:'菜单',
split:true,
width: 100,
minSize: 100,
width: 120,
minSize: 120,
maxSize: 400,
collapsible: true,
margins:'0 0 0 5',
Expand Down Expand Up @@ -182,6 +182,7 @@
<option value="0">自动</option>
<option value="1">手动</option>
</select>
<!--<input id="node_edit_nmode_input" type="text" size="20" />-->

<script language="javascript">

Expand Down
24 changes: 22 additions & 2 deletions Application/Home/View/Inner/acc_add.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,31 @@
Ext.form.Field.prototype.msgTarget = 'side';//'qtip';//'under';

var simple = new Ext.FormPanel({
labelWidth: 75, // label settings here cascade unless overridden
labelWidth: 135, // label settings here cascade unless overridden
//url:'login_validate.php',
id:'acc_add_formpanel',
renderTo:"acc_add_div",
frame:true,
title: '{$acc_add_title}',
style:'margin:5px',
width: 550,
defaults: {width: 230},
defaults: {width: 230, height:30},
defaultType:'textfield',
layout:"form",
items: [{
fieldLabel: '账号',
id:'acc_add_uid',
name: 'acc_add_uid',
style:'font-size:18px;',
itemCls:'tcs_select_item',
allowBlank:false,
blankText:'请输入账号!'
},{
fieldLabel: '密码',
id:'acc_add_password',
name: 'acc_add_password',
style:'font-size:18px;',
itemCls:'tcs_select_item',
allowBlank:false,
inputType:'password',
blankText:'请输入密码!'
Expand All @@ -52,18 +56,24 @@
allowBlank:false,
inputType:'password',
blankText:'请再次输入密码!',
style:'font-size:18px;',
itemCls:'tcs_select_item',
vtype:'passwordConfirm',
vtypeText:'两次密码不一致!',
confirmTo:'acc_add_password'
},{
fieldLabel: '账户昵称',
style:'font-size:18px;',
itemCls:'tcs_select_item',
id:'acc_add_uname',
name: 'acc_add_uname',
allowBlank:true
},{
fieldLabel: '邮箱',
id:'acc_add_email',
name: 'acc_add_email',
style:'font-size:18px;',
itemCls:'tcs_select_item',
vtype:'email',
allowBlank:true,
//blankText:'请输入邮箱!',
Expand All @@ -72,6 +82,8 @@
fieldLabel: '手机号',
id:'acc_add_mobilephone',
name: 'acc_add_mobilephone',
style:'font-size:18px;',
itemCls:'tcs_select_item',
allowBlank:false,
blankText:'请输入手机号!',
invalidText:'手机号格式不正确!',
Expand All @@ -85,12 +97,15 @@
xtype:'combo',
//store:['普管', '巡检'],
transform:'acc_add_utypeList',
cls:'tcs_select',
itemCls:'tcs_select_item',
triggerAction: 'all',
lazyRender:true,
fieldLabel:'角色',
mode:'local',
editable:false,
//emptyText:'请选择角色……',
tpl:'<tpl for="."><div class="x-combo-list-item tcs_select_item" >{text}</div></tpl>',
listeners:{
"select":function(t){
//alert(t.getValue());
Expand All @@ -100,17 +115,22 @@
fieldLabel:'权限',
xtype:'panel',
layout:'column',
style:'font-size:18px;',
itemCls:'tcs_select_item',
isFormField:true,
items:[{
xtype:'checkbox',
columnWidth:.5,
boxLabel:'可查看',
autoHeight:true,
style:'margin-top:8px',
id:'acc_add_pcheck',
name:'acc_add_pcheck'
},{
xtype:'checkbox',
columnWidth:.5,
boxLabel:'可控制',
style:'margin-top:8px',
id:'acc_add_pcontrol',
name:'acc_add_pcontrol'
}]
Expand Down
6 changes: 3 additions & 3 deletions Application/Home/View/Inner/acc_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
title:"账户信息",//height:150, width:500,
columns:[
{header:"ID",dataIndex:"uid", width:100, sortable:true},
{header:"昵称",dataIndex:"uname", sortable:true,
{header:"昵称",dataIndex:"uname", width:150, sortable:true,
editor: new Ext.form.TextField({
allowBlank: false
})
},
{header:"创建时间",dataIndex:"create_time", width:180, sortable:true},
{header:"上次登录时间",dataIndex:"last_login", width:180, sortable:true},
{header:"创建时间",dataIndex:"create_time", width:220, sortable:true},
{header:"上次登录时间",dataIndex:"last_login", width:220, sortable:true},
{header:"邮箱",dataIndex:"email", width:180, sortable:true,
editor: new Ext.form.TextField({
allowBlank: false,
Expand Down
10 changes: 5 additions & 5 deletions Application/Home/View/Inner/msg_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
//viewConfig: { forceFit:true },
columns:[
//new Ext.grid.RowNumberer(),//增加自动编号,不需要可不必定义
{header:"用户ID",dataIndex:"uid", width:50, sortable:true },
{header:"用户昵称",dataIndex:"uname", width:100, sortable:true},
{header:"发送时间",dataIndex:"mtime", width:200,sortable:true},
{header:"用户ID",dataIndex:"uid", width:100, sortable:true },
{header:"用户昵称",dataIndex:"uname", width:150, sortable:true},
{header:"发送时间",dataIndex:"mtime", width:220,sortable:true},
{header:"内容",dataIndex:"mcontent", sortable:true}
],
bbar: new Ext.PagingToolbar({
pageSize: 10,
store: msg_store,
displayInfo: true,
displayMsg: 'Display {0} - {1} of {2}',
emptyMsg: 'Nothing to Display'
displayMsg: '当前显示{0}-{1}条,共{2}',
emptyMsg: '没有短信'
}),
store:msg_store,
autoExpandColumn:3
Expand Down
20 changes: 10 additions & 10 deletions Application/Home/View/Inner/node_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"district", "city", "province"],
url:'__ROOT__/Home/Inner/node_info_list'
});
node_store.load({ params:{ start:0,limit:6 } });
node_store.load({ params:{ start:0,limit:15 } });
var node_grid = new Ext.grid.GridPanel({
renderTo:"node_info",
title:"节点信息",
Expand All @@ -22,12 +22,12 @@
//viewConfig: { forceFit:true },
columns:[
//new Ext.grid.RowNumberer(),//增加自动编号,不需要可不必定义
{header:"ID",dataIndex:"id", width:150, sortable:true, renderer:function(val){return val;} },
{header:"名称",dataIndex:"name", sortable:true},
{header:"ID",dataIndex:"id", width:210, sortable:true, renderer:function(val){return val;} },
{header:"名称",dataIndex:"name", width:120, sortable:true},
{header:"经度",dataIndex:"lng", width:100,sortable:true},
{header:"纬度",dataIndex:"lat", width:100,sortable:true},
{header:"创建时间",dataIndex:"first_access", width:150, sortable:true},
{header:"停止时间",dataIndex:"last_access", width:150, sortable:true},
{header:"创建时间",dataIndex:"first_access", width:220, sortable:true, hidden:true},
{header:"停止时间",dataIndex:"last_access", width:220, sortable:true},
{header:"模式",dataIndex:"nmode", width:50, sortable:true,
renderer:function(val){
val = "" + val;
Expand All @@ -41,16 +41,16 @@
{header:"混合比例",dataIndex:"auto_mix_scale", sortable:true},
{header:"混合量",dataIndex:"auto_mix_level", sortable:true},
{header:"喷洒频率",dataIndex:"auto_mix_freq", sortable:true},
{header:"所属区县",dataIndex:"district", sortable:true},
{header:"所属省份",dataIndex:"province", sortable:true},
{header:"所属城市",dataIndex:"city", sortable:true},
{header:"所属省份",dataIndex:"province", sortable:true}
{header:"所属区县",dataIndex:"district", sortable:true}
],
bbar: new Ext.PagingToolbar({
pageSize: 6,
pageSize: 15,
store: node_store,
displayInfo: true,
displayMsg: 'Display topics {0} - {1} of {2}',
emptyMsg: 'No topics to Display'
displayMsg: '当前显示{0}-{1}条,共{2}',
emptyMsg: '没有节点'
}),
store:node_store//, autoExpandColumn:2
});
Expand Down
24 changes: 12 additions & 12 deletions Application/Home/View/Inner/node_info_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,29 @@
'lat':'24.5454',
'first_access':'2014年8月3日10:14:25',
'last_access':'2014年8月3日10:14:30',
'nmode':'0',
'nmode':'1',
'auto_mix_scale':'0.345',
'auto_mix_level':'2.3',
'auto_mix_freq':'3600',
'district':'鼓楼区',
'city':'南京市',
'province':'江苏省'
},{
'id':'DRFGTHYUJIKNTDE',
'id':'DRFGTHYUJIKNTD1',
'name':'二条巷旁',
'lng':'34.556',
'lat':'24.5454',
'first_access':'2014年8月3日10:14:25',
'last_access':'2014年8月3日10:14:30',
'nmode':'0',
'nmode':'1',
'auto_mix_scale':'0.345',
'auto_mix_level':'2.3',
'auto_mix_freq':'3600',
'district':'鼓楼区',
'city':'南京市',
'province':'江苏省'
},{
'id':'DRFGTHYUJIKNTDE',
'id':'DRFGTHYUJIKNTD2',
'name':'二条巷旁',
'lng':'34.556',
'lat':'24.5454',
Expand All @@ -41,7 +41,7 @@
'city':'南京市',
'province':'江苏省'
},{
'id':'DRFGTHYUJIKNTDE',
'id':'DRFGTHYUJIKNTD3',
'name':'二条巷旁',
'lng':'34.556',
'lat':'24.5454',
Expand All @@ -55,7 +55,7 @@
'city':'南京市',
'province':'江苏省'
},{
'id':'DRFGTHYUJIKNTDE',
'id':'DRFGTHYUJIKNTD4',
'name':'二条巷旁',
'lng':'34.556',
'lat':'24.5454',
Expand All @@ -69,7 +69,7 @@
'city':'南京市',
'province':'江苏省'
},{
'id':'DRFGTHYUJIKNTDE',
'id':'DRFGTHYUJIKNTD5',
'name':'二条巷旁',
'lng':'34.556',
'lat':'24.5454',
Expand All @@ -83,7 +83,7 @@
'city':'南京市',
'province':'江苏省'
},{
'id':'DRFGTHYUJIKNTDE',
'id':'DRFGTHYUJIKNTD6',
'name':'二条巷旁',
'lng':'34.556',
'lat':'24.5454',
Expand All @@ -97,7 +97,7 @@
'city':'南京市',
'province':'江苏省'
},{
'id':'DRFGTHYUJIKNTDE',
'id':'DRFGTHYUJIKNTD7',
'name':'二条巷旁',
'lng':'34.556',
'lat':'24.5454',
Expand All @@ -111,21 +111,21 @@
'city':'南京市',
'province':'江苏省'
},{
'id':'DRFGTHYUJIKNTDE',
'id':'DRFGTHYUJIKNTD8',
'name':'二条巷旁',
'lng':'34.556',
'lat':'24.5454',
'first_access':'2014年8月3日10:14:25',
'last_access':'2014年8月3日10:14:30',
'nmode':'0',
'nmode':'1',
'auto_mix_scale':'0.345',
'auto_mix_level':'2.3',
'auto_mix_freq':'3600',
'district':'鼓楼区',
'city':'南京市',
'province':'江苏省'
},{
'id':'DRFGTHYUJIKNTDE',
'id':'DRFGTHYUJIKNTD9',
'name':'二条巷旁',
'lng':'34.556',
'lat':'24.5454',
Expand Down
Loading

0 comments on commit 966149f

Please sign in to comment.