优化bug

This commit is contained in:
24kycj
2025-03-31 20:33:06 +08:00
parent 8d3fd6b4d2
commit 1589efc667
4 changed files with 150 additions and 142 deletions
+36 -37
View File
@@ -13,7 +13,7 @@
</div>
<div class="form_content">
<div class="flex_box form_option">
<div class="form_label">设置设备</div>
<div class="form_label">设置光驱</div>
<div class="form_val">
<div class="flex_box flex_wrap form_tabs">
<div @click="handleAction(item)" v-for="(item, index) in actionList" :key="index" class="form_tab">{{ item.name }}</div>
@@ -153,10 +153,6 @@ export default {
{
id: 4,
name: '校准光盘桶'
},
{
id: 5,
name: '刷新光盘'
}
],
actionList: [
@@ -170,6 +166,10 @@ export default {
}
],
serviceList: [
{
id: 4,
name: '刷新光盘桶'
},
{
id: 1,
name: '重启设备'
@@ -257,10 +257,6 @@ export default {
{
id: 4,
name: '校准光盘桶'
},
{
id: 5,
name: '刷新光盘'
}
]
} else {
@@ -280,10 +276,6 @@ export default {
{
id: 4,
name: '校准光盘桶'
},
{
id: 5,
name: '刷新光盘'
}
]
}
@@ -292,6 +284,12 @@ export default {
immediate: true
},
},
mounted() {
let type = this.$route.query.type
if (type && type === 'cddev') {
this.handleAction(this.actionList[0])
}
},
methods: {
// 校准设备
handleMove(e) {
@@ -395,29 +393,6 @@ export default {
})
})
break
case 5:
// 刷新光盘
that
.$confirm('点击确定后将刷新所有光盘桶的光盘数量。', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
that.$store
.dispatch('chat/websocketsend', {
req_name: 'RefreshCdNum',
req_type: 2,
req_info: {}
})
.then(() => {
that.$message({
message: '执行成功',
type: 'success'
})
})
})
break
}
},
// 设置设备
@@ -425,6 +400,7 @@ export default {
let that = this
switch (e.id) {
case 1:
console.log('手动设置光驱')
// 手动设置光驱
that.$store
.dispatch('chat/websocketsend', {
@@ -439,7 +415,7 @@ export default {
case 2:
// 自动设置光驱
that
.$confirm('请再左右盘仓至少放入一张光盘,点击确认后将自动设置上下光驱,如果自动设置失败请手动设置光驱', '温馨提示', {
.$confirm('请再左右光盘桶至少放入一张光盘,点击确认后将自动设置上下光驱,如果自动设置失败请手动设置光驱', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -534,6 +510,29 @@ export default {
})
})
break
case 4:
// 刷新光盘桶
that
.$confirm('点击确定后将刷新所有光盘桶的光盘数量。', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
that.$store
.dispatch('chat/websocketsend', {
req_name: 'RefreshCdNum',
req_type: 2,
req_info: {}
})
.then(() => {
that.$message({
message: '执行成功',
type: 'success'
})
})
})
break
}
},
cdChange(index, e) {