1/6 灯组显示优化

20240912_adapter
wangwei 3 months ago
parent ca182b7b20
commit 8a16cf90be

@ -63,26 +63,26 @@
<el-table-column label="led灯编号" prop="ledNum" ></el-table-column> <el-table-column label="led灯编号" prop="ledNum" ></el-table-column>
<el-table-column label="红灯状态" prop="red"> <el-table-column label="红灯状态" prop="red">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.red === 0"></span> <span v-if="scope.row.red === 0"><el-tag type="info"></el-tag></span>
<span v-else></span> <span v-else><el-tag type="success">开启</el-tag></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="黄灯状态" prop="orange" > <el-table-column label="黄灯状态" prop="orange" >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.red === 0"></span> <span v-if="scope.row.orange === 0"><el-tag type="info"></el-tag></span>
<span v-else></span> <span v-else><el-tag type="success">开启</el-tag></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="蓝灯状态" prop="blue" > <el-table-column label="蓝灯状态" prop="blue" >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.red === 0"></span> <span v-if="scope.row.blue === 0"><el-tag type="info"></el-tag></span>
<span v-else></span> <span v-else><el-tag type="success">开启</el-tag></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="绿灯状态" prop="green" > <el-table-column label="绿灯状态" prop="green" >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.red === 0"></span> <span v-if="scope.row.green === 0"><el-tag type="info"></el-tag></span>
<span v-else></span> <span v-else><el-tag type="success">开启</el-tag></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column> <el-table-column label="备注" prop="remark"></el-table-column>

@ -66,26 +66,26 @@
<el-table-column label="led灯编号" prop="ledNum" ></el-table-column> <el-table-column label="led灯编号" prop="ledNum" ></el-table-column>
<el-table-column label="红灯状态" prop="red"> <el-table-column label="红灯状态" prop="red">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.red === 0"></span> <span v-if="scope.row.red === 0"><el-tag type="info"></el-tag></span>
<span v-else></span> <span v-else><el-tag type="success">开启</el-tag></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="黄灯状态" prop="orange" > <el-table-column label="黄灯状态" prop="orange" >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.red === 0"></span> <span v-if="scope.row.orange === 0"><el-tag type="info"></el-tag></span>
<span v-else></span> <span v-else><el-tag type="success">开启</el-tag></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="蓝灯状态" prop="blue" > <el-table-column label="蓝灯状态" prop="blue" >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.red === 0"></span> <span v-if="scope.row.blue === 0"><el-tag type="info"></el-tag></span>
<span v-else></span> <span v-else><el-tag type="success">开启</el-tag></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="绿灯状态" prop="green" > <el-table-column label="绿灯状态" prop="green" >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.red === 0"></span> <span v-if="scope.row.green === 0"><el-tag type="info"></el-tag></span>
<span v-else></span> <span v-else><el-tag type="success">开启</el-tag></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" prop="remark"></el-table-column> <el-table-column label="备注" prop="remark"></el-table-column>

@ -246,16 +246,17 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item prop="udiCode" label="" class="query-form-item"> <el-form-item prop="udiCode" label="" class="query-form-item">
<el-descriptions class="margin-top" title="" :column="2" border style="width: 80%"> <el-descriptions class="margin-top" title="" :column="2" border style="width: 80%">
<el-descriptions-item label="灯组标签">{{ ledData.mac }}</el-descriptions-item> <el-descriptions-item label="灯组标签">{{ ledData.mac }}</el-descriptions-item>
<!--<el-descriptions-item label="货架名称">{{ sysWorkplaceQueue.name }}</el-descriptions-item>--> <!--<el-descriptions-item label="货架名称">{{ sysWorkplaceQueue.name }}</el-descriptions-item>-->
<el-descriptions-item label="备注">{{ ledData.remark }}</el-descriptions-item> <el-descriptions-item label="备注">{{ ledData.remark }}</el-descriptions-item>
<el-descriptions-item label="红灯">{{ lesStatusMap[ledData.red] }}</el-descriptions-item> <el-descriptions-item label="红灯"><el-tag v-if="ledData.red !=null" :type="ledData.red == 0 ? 'info' : 'success'">{{ ledData.red == 0 ? "" : "" }}</el-tag></el-descriptions-item>
<el-descriptions-item label="黄灯">{{ lesStatusMap[ledData.orange] }}</el-descriptions-item> <el-descriptions-item label="黄灯"><el-tag v-if="ledData.red !=null" :type="ledData.orange == 0 ? 'info' : 'success'">{{ ledData.orange == 0 ? "" : "" }}</el-tag></el-descriptions-item>
<el-descriptions-item label="蓝灯">{{ lesStatusMap[ledData.blue] }}</el-descriptions-item> <el-descriptions-item label="蓝灯"><el-tag v-if="ledData.red !=null" :type="ledData.blue == 0 ? 'info' : 'success'">{{ ledData.blue == 0 ? "" : "" }}</el-tag></el-descriptions-item>
<el-descriptions-item label="绿灯">{{ lesStatusMap[ledData.green] }}</el-descriptions-item> <el-descriptions-item label="绿灯"><el-tag v-if="ledData.red !=null" :type="ledData.green == 0 ? 'info' : 'success'">{{ ledData.green == 0 ? "" : "" }}</el-tag></el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -502,7 +503,7 @@ export default {
lesStatusMap: { lesStatusMap: {
true : "开启", true : "开启",
false: "关闭" false: "关闭"
} },
} }
}, },
methods: { methods: {
@ -869,7 +870,12 @@ export default {
} }
this.sysWorkplaceQueue = {} this.sysWorkplaceQueue = {}
this.product = {} this.product = {}
this.ledData = {} this.ledData = {
red : null,
orange: null,
blue: null,
green: null
}
this.addBindVisible = true this.addBindVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.inputRef1.focus() // this.$refs.inputRef1.focus() //

Loading…
Cancel
Save