|
|
|
@ -100,7 +100,7 @@
|
|
|
|
|
<label class="col-sm-2 col-form-label">{{param.description}}:</label>
|
|
|
|
|
<div class="col-sm-6 form-control" style="border-color:transparent;height:auto;min-height:calc(2.25rem + 2px);">
|
|
|
|
|
<select id="irType" class="form-control" v-model="param.value" @input="change2(index)">
|
|
|
|
|
<option value="null">请选择</option>
|
|
|
|
|
<option :value="null">请选择</option>
|
|
|
|
|
<option v-for="item in getIrTypeList()" :value="item.value">{{item.text}}</option>
|
|
|
|
|
</select>
|
|
|
|
|
<div style="height:1em;">
|
|
|
|
@ -109,7 +109,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group row" v-if="param.description==='键值'&&getIrType()!=='请选择'">
|
|
|
|
|
<div class="form-group row" v-if="param.description==='键值'&&getIrType()">
|
|
|
|
|
<label class="col-sm-2 col-form-label">{{param.description}}:</label>
|
|
|
|
|
<div class="col-sm-6 form-control" style="border-color:transparent;height:auto;min-height:calc(2.25rem + 2px);">
|
|
|
|
|
<iot-ir-command :type="getIrType()" :value.sync="param.value" :buttons="getIrButtons()" />
|
|
|
|
@ -126,7 +126,7 @@
|
|
|
|
|
<label class="col-sm-2 col-form-label">{{param.description}}:</label>
|
|
|
|
|
<div class="col-sm-6 form-control" style="border-color:transparent;height:auto;min-height:calc(2.25rem + 2px);">
|
|
|
|
|
<select class="form-control" v-model="param.value" @input="change2(index)">
|
|
|
|
|
<option value="'null'">请选择</option>
|
|
|
|
|
<option :value="null">请选择</option>
|
|
|
|
|
<option v-for="item in getSPCommands()" :value="item.name">{{item.name}}</option>
|
|
|
|
|
</select>
|
|
|
|
|
<div style="height:1em;">
|
|
|
|
@ -340,7 +340,7 @@
|
|
|
|
|
},
|
|
|
|
|
getIrType: function () {
|
|
|
|
|
var param = Enumerable.from(this.data.model.parameters).firstOrDefault(o => o.name === 'type');
|
|
|
|
|
if (param) {
|
|
|
|
|
if (param && param.value) {
|
|
|
|
|
return Enumerable.from(this.getIrTypeList()).firstOrDefault(o => o.value === param.value).text;
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
@ -402,7 +402,7 @@
|
|
|
|
|
watch: {
|
|
|
|
|
'data.model.apiId': function (val, oldVal) {
|
|
|
|
|
var vm = this;
|
|
|
|
|
if ((oldVal === null || oldVal === 'null') && val && val !== 'null' && this.data.model.nodeId && this.data.model.deviceId) {
|
|
|
|
|
if (oldVal === null && val && val !== 'null' && this.data.model.nodeId && this.data.model.deviceId) {
|
|
|
|
|
Vue.set(vm.data.data, vm.data.model.apiId, $('#apiId option:selected').text());
|
|
|
|
|
vm.errors = [];
|
|
|
|
|
var url = this.path + 'Api?apiId=' + val + '&deviceId=' + this.data.model.deviceId;
|
|
|
|
@ -413,7 +413,7 @@
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if (val === 'null') {
|
|
|
|
|
if (val === null) {
|
|
|
|
|
vm.data.model.parameters = [];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|