Former-commit-id: f79e83e6eec8dc4d7ebe9f408581c1bf27d27660
TangShanKaiPing
wanggang 6 years ago
parent 6cd75eb04b
commit 77f4d007a7

@ -16,9 +16,9 @@ namespace FBeeService.Controllers
this._deviceService = deviceService;
}
[HttpGet, Route("[action]"), SwaggerOperation("")]
[HttpGet, Route("/[controller]/[action]"), SwaggerOperation("")]
public ApiResponse PressKey([SwaggerParameter("网关编号")]string gateway, [SwaggerParameter("设备编号")]string number, [SwaggerParameter("按键类型")]byte type, [SwaggerParameter("键值")]ushort code)
public ApiResponse Send([SwaggerParameter("网关编号")]string gateway, [SwaggerParameter("设备编号")]string number, [SwaggerParameter("按键类型")]byte type, [SwaggerParameter("键值")]ushort code)
{
return this.AsyncAction(() =>
{

@ -1231,6 +1231,7 @@ namespace FBeeService
}
}
deviceRepo.SaveChanges();
this.SendDevice(device);
}
}
}

@ -569,19 +569,64 @@
<div class="row">
<a class="button button-large button-raised button-fill" href="javascript: ;" v-on:click="call(device.GatewayNumber,device.Number,'/Ir/KeyCodeType1On')" v-if="getData(device,'空调')==='关'">启用空调</a>
<a class="button button-large button-raised button-fill" href="javascript: ;" v-on:click="call(device.GatewayNumber,device.Number,'/Ir/KeyCodeType1Off')" v-else>禁用空调</a>
<a class="button button-large button-raised button-fill" href="javascript: ;" v-on:click="call(device.GatewayNumber,device.Number,'/Ir/KeyCodeType2On')" v-if="getData(device,'电视')==='关'">启用电视</a>
<a class="button button-large button-raised button-fill" href="javascript: ;" v-on:click="call(device.GatewayNumber,device.Number,'/Ir/KeyCodeType2Off')" v-else>禁用电视</a>
<a class="button button-large button-raised button-fill" href="javascript: ;" v-on:click="call(device.GatewayNumber,device.Number,'/Ir/KeyCodeType5On')" v-if="getData(device,'电视')==='关'">启用自定义</a>
<a class="button button-large button-raised button-fill" href="javascript: ;" v-on:click="call(device.GatewayNumber,device.Number,'/Ir/KeyCodeType5Off')" v-else>禁用自定义</a>
</div>
<div class="row" v-if="getData(device,'空调')==='开'">
<form class="ajax" method="get" :action="vm.IoTServer+'/App/Exec'">
<form class="KeyCodeType1" method="get" :action="vm.IoTServer+'/App/Exec'">
<input type="hidden" name="ConnectionId" :value="vm.ConnectionId" />
<input type="hidden" name="Gateway" :value="device.GatewayNumber" />
<input type="hidden" name="Number" :value="device.Number" />
<input type="hidden" name="Method" value="/Ir/Send" />
<input type="hidden" name="Type" value="1" />
<input type="hidden" name="Code" :value="getValue(device,'按键')" />
<div class="row">
<div class="col-20">
<label>电源:</label>
</div>
<div class="col-80">
<label><input class="ajax" name="power" type="radio" value="2" v-model="getCode1(getValue(device,'按键')).power" /></label>
<label><input class="ajax" name="power" type="radio" value="1" v-model="getCode1(getValue(device,'按键')).power" /></label>
</div>
</div>
<div class="row">
<input name="power" type="button" value="2" class="ajax" />
<div class="col-20">
<label>模式:</label>
</div>
<div class="col-80">
<label><input class="ajax" name="pattern" type="radio" v-model="getCode1(getValue(device,'按键')).pattern" value="0" />制冷</label>
<label><input class="ajax" name="pattern" type="radio" v-model="getCode1(getValue(device,'按键')).pattern" value="120" />自动</label>
<label><input class="ajax" name="pattern" type="radio" v-model="getCode1(getValue(device,'按键')).pattern" value="240" />制热</label>
<label><input class="ajax" name="pattern" type="radio" v-model="getCode1(getValue(device,'按键')).pattern" value="360" />抽湿</label>
<label><input class="ajax" name="pattern" type="radio" v-model="getCode1(getValue(device,'按键')).pattern" value="480" />送风</label>
</div>
</div>
<div class="row">
<div class="col-20">
<label>温度:</label>
</div>
<div class="col-80">
<input class="ajax" name="temperature" type="range" step="1" min="1" max="15" :value="getCode1(getValue(device,'按键')).temperature" />
</div>
</div>
<div class="row">
<div class="col-20">
<label>风向:</label>
</div>
<div class="col-80">
<label><input name="direction" type="radio" v-model="getCode1(getValue(device,'按键')).direction" value="0" class="ajax" />任意</label>
<label><input name="direction" type="radio" v-model="getCode1(getValue(device,'按键')).direction" value="60" class="ajax" />手动</label>
<label><input name="direction" type="radio" v-model="getCode1(getValue(device,'按键')).direction" value="75" class="ajax" />自动</label>
</div>
</div>
<div class="row">
<div class="col-20">
<label>风量:</label>
</div>
<div class="col-80">
<label><input class="ajax" name="wind" type="radio" v-model="getCode1(getValue(device,'按键')).wind" value="0" />自动</label>
<label><input class="ajax" name="wind" type="radio" v-model="getCode1(getValue(device,'按键')).wind" value="15" /></label>
<label><input class="ajax" name="wind" type="radio" v-model="getCode1(getValue(device,'按键')).wind" value="30" /></label>
<label><input class="ajax" name="wind" type="radio" v-model="getCode1(getValue(device,'按键')).wind" value="45" /></label>
</div>
</div>
</form>
</div>

Loading…
Cancel
Save