3.30需求修改
This commit is contained in:
@@ -101,7 +101,7 @@
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- 手动校准驱动 -->
|
||||
<el-dialog center title="手动校准驱动" :visible.sync="cdShow" width="1000px">
|
||||
<el-dialog center title="手动设置光驱" :visible.sync="cdShow" width="1000px">
|
||||
<div class="cd_box" v-loading="cdList.length === 0">
|
||||
<div class="cd_title">请通过点击按钮弹出光驱托盘判断并设置光驱。</div>
|
||||
<div class="cd_desc">需对光驱进行手动设置!</div>
|
||||
@@ -282,7 +282,7 @@ export default {
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
let type = this.$route.query.type
|
||||
@@ -322,51 +322,85 @@ export default {
|
||||
break
|
||||
case 2:
|
||||
// 校准上光驱
|
||||
that
|
||||
.$confirm('请在上光驱放入一张光盘,点击确定后将自动校准上光驱', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
if (that.printer_info.is_set_cddev == 1) {
|
||||
that.$message('请先设置上下光驱')
|
||||
setTimeout(() => {
|
||||
this.handleAction(this.actionList[0])
|
||||
}, 1000)
|
||||
return
|
||||
}
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'openCDDevByPath',
|
||||
req_type: 2,
|
||||
req_info: {
|
||||
dev_path: that.$store.state.chat.cd_list[0].dev_path
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'CaliPrinter',
|
||||
req_type: 2,
|
||||
req_info: {
|
||||
cali_num: 0
|
||||
}
|
||||
that
|
||||
.$confirm('请在上光驱放入一张光盘,点击确定后将自动校准上光驱', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
that.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'CaliPrinter',
|
||||
req_type: 2,
|
||||
req_info: {
|
||||
cali_num: 0
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
that.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
break
|
||||
case 3:
|
||||
// 校准下光驱
|
||||
that
|
||||
.$confirm('请在下光驱放入一张光盘,点击确定后将自动校准下光驱', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
if (that.printer_info.is_set_cddev == 1) {
|
||||
that.$message('请先设置上下光驱')
|
||||
setTimeout(() => {
|
||||
this.handleAction(this.actionList[0])
|
||||
}, 1000)
|
||||
return
|
||||
}
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'openCDDevByPath',
|
||||
req_type: 2,
|
||||
req_info: {
|
||||
dev_path: that.$store.state.chat.cd_list[1].dev_path
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'CaliPrinter',
|
||||
req_type: 2,
|
||||
req_info: {
|
||||
cali_num: 1
|
||||
}
|
||||
that
|
||||
.$confirm('请在下光驱放入一张光盘,点击确定后将自动校准下光驱', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
that.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'CaliPrinter',
|
||||
req_type: 2,
|
||||
req_info: {
|
||||
cali_num: 1
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
that.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
break
|
||||
@@ -541,8 +575,9 @@ export default {
|
||||
this.$set(this.cdList, index, { ...item })
|
||||
},
|
||||
cdOpen(e) {
|
||||
let item = this.cdList[e]
|
||||
this.$store
|
||||
let that = this
|
||||
let item = that.cdList[e]
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'openCDDevByPath',
|
||||
req_type: 2,
|
||||
@@ -551,7 +586,10 @@ export default {
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
this.$message({
|
||||
setTimeout(() => {
|
||||
that.cdClose(e)
|
||||
}, 5000)
|
||||
that.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
@@ -896,4 +934,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .el-dialog__title {
|
||||
font-size: 24px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user