|
|
@ -25,7 +25,8 @@
|
|
|
|
<el-tag v-if="scope.row.status==='ONLINE'" type="success" effect="plain">在线</el-tag>
|
|
|
|
<el-tag v-if="scope.row.status==='ONLINE'" type="success" effect="plain">在线</el-tag>
|
|
|
|
<el-tag v-else-if="scope.row.status==='MAINTAIN'" type="warning" effect="plain">维护</el-tag>
|
|
|
|
<el-tag v-else-if="scope.row.status==='MAINTAIN'" type="warning" effect="plain">维护</el-tag>
|
|
|
|
<el-tag v-else-if="scope.row.status==='FAULT'" type="danger" effect="plain">故障</el-tag>
|
|
|
|
<el-tag v-else-if="scope.row.status==='FAULT'" type="danger" effect="plain">故障</el-tag>
|
|
|
|
<el-tag v-else type="info" effect="plain">离线</el-tag>
|
|
|
|
<el-tag v-else-if="scope.row.status==='OFFLINE'" type="danger" effect="plain">离线</el-tag>
|
|
|
|
|
|
|
|
<el-tag v-else type="info" effect="plain">未知</el-tag>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</avue-crud>
|
|
|
|
</avue-crud>
|
|
|
|
</base-card>
|
|
|
|
</base-card>
|
|
|
@ -242,6 +243,11 @@
|
|
|
|
d.status = statuses.data[d.id] || "OFFLINE";
|
|
|
|
d.status = statuses.data[d.id] || "OFFLINE";
|
|
|
|
return d;
|
|
|
|
return d;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
this.listData = data.records.map(d => {
|
|
|
|
|
|
|
|
d.status = "UNKNOW";
|
|
|
|
|
|
|
|
return d;
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}).catch(() => {
|
|
|
|
}).catch(() => {
|
|
|
|
}).finally(() => {
|
|
|
|
}).finally(() => {
|
|
|
|