|
@@ -70,7 +70,9 @@
|
|
|
<el-table-column :label="$t('basic.equipmentState')" align="center" width="120" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="scope.row.isUse == 0">{{$t('basic.state0')}}</span>
|
|
|
- <span v-else>{{$t('basic.state1')}}</span>
|
|
|
+ <span v-else-if="scope.row.isUse == 1">{{$t('basic.state1')}}</span>
|
|
|
+ <span v-else-if="scope.row.isUse == 2">{{$t('basic.state2')}}</span>
|
|
|
+ <span v-else-if="scope.row.isUse == 3">{{$t('basic.state3')}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column :label="$t('base.operate')" align="center" width="160">
|
|
@@ -78,7 +80,7 @@
|
|
|
<el-button size="small" v-if="scope.row.modelNo != null && scope.row.isUse == 0" type="primary" @click="openEnable(scope.$index)">{{$t('basic.use')}}</el-button>
|
|
|
<el-button size="small" v-if="scope.row.modelNo != null && scope.row.isUse == 1" type="danger" @click="disableEquipment(scope.$index)">{{$t('basic.disuse')}}</el-button>
|
|
|
<!-- :disabled="scope.row.isUse == 1" -->
|
|
|
- <el-button size="small" :style="scope.row.modelNo!=null?'':'float:right;margin-right:6px'" @click="showEdit(scope.$index, scope.row, scope.row.isUse == 1)">{{$t('base.edit')}}</el-button>
|
|
|
+ <el-button size="small" :style="scope.row.modelNo!=null?(parseInt(scope.row.isUse)>=2?'float:right;margin-right:6px':''):'float:right;margin-right:6px'" @click="showEdit(scope.$index, scope.row, scope.row.isUse == 1)">{{$t('base.edit')}}</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -483,7 +485,7 @@
|
|
|
|
|
|
//启用设备
|
|
|
enable() {
|
|
|
- this.allocations[this.activeIndex].isUse = 1;
|
|
|
+ // this.allocations[this.activeIndex].isUse = 1;
|
|
|
this.operateDialogVisible = false;
|
|
|
var str = this.allocations[this.activeIndex].equipmentNo;
|
|
|
this.http.post( this.port.base.setPacket, {
|
|
@@ -516,7 +518,7 @@
|
|
|
|
|
|
//停用云模盒
|
|
|
disableEquipment(index) {
|
|
|
- this.allocations[index].isUse = 1;
|
|
|
+ // this.allocations[index].isUse = 1;
|
|
|
var str = this.allocations[index].equipmentNo;
|
|
|
this.http.post( this.port.base.setPacket, {
|
|
|
lowPowerLimit: this.allocations[index].alarmBattery,//.toString(16),
|