优化弹窗提示
This commit is contained in:
@@ -162,7 +162,7 @@ export default {
|
||||
{
|
||||
id: 2,
|
||||
name: '自动设置光驱'
|
||||
},
|
||||
}
|
||||
],
|
||||
serviceList: [
|
||||
{
|
||||
@@ -176,7 +176,7 @@ export default {
|
||||
{
|
||||
id: 3,
|
||||
name: '进入运输模式'
|
||||
},
|
||||
}
|
||||
],
|
||||
refreshTime: 10,
|
||||
sleepTime: 300000,
|
||||
@@ -239,150 +239,221 @@ export default {
|
||||
methods: {
|
||||
// 校准设备
|
||||
handleMove(e) {
|
||||
let that = this
|
||||
switch (e.id) {
|
||||
case 1:
|
||||
// 校准设备
|
||||
this.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'CaliPrinter',
|
||||
req_type: 2,
|
||||
req_info: {
|
||||
cali_num: 2
|
||||
}
|
||||
that
|
||||
.$confirm('确定执行校准设备操作吗?', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
this.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'CaliPrinter',
|
||||
req_type: 2,
|
||||
req_info: {
|
||||
cali_num: 2
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
that.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
})
|
||||
break
|
||||
case 2:
|
||||
// 校准上光驱
|
||||
this.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'CaliPrinter',
|
||||
req_type: 2,
|
||||
req_info: {
|
||||
cali_num: 0
|
||||
}
|
||||
that
|
||||
.$confirm('确定执行校准上光驱操作吗?', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
this.$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:
|
||||
// 校准下光驱
|
||||
this.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'CaliPrinter',
|
||||
req_type: 2,
|
||||
req_info: {
|
||||
cali_num: 1
|
||||
}
|
||||
that
|
||||
.$confirm('确定执行校准下光驱操作吗?', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
this.$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
|
||||
case 4:
|
||||
// 校准盘仓
|
||||
this.$store.dispatch('chat/websocketsend', {
|
||||
req_name: 'CaliCDStone',
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
}).then(() => {
|
||||
this.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
that
|
||||
.$confirm('确定执行校准盘仓操作吗?', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'CaliCDStone',
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
})
|
||||
.then(() => {
|
||||
that.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
break
|
||||
}
|
||||
},
|
||||
// 设置设备
|
||||
handleAction(e) {
|
||||
let that = this
|
||||
switch (e.id) {
|
||||
case 1:
|
||||
// 手动设置光驱
|
||||
this.$store
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'get_all_cd',
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
})
|
||||
.then(() => {
|
||||
this.cdShow = true
|
||||
that.cdShow = true
|
||||
})
|
||||
break
|
||||
case 2:
|
||||
// 自动设置光驱
|
||||
this.$store.dispatch('chat/websocketsend', {
|
||||
req_name: 'autoSetCDDev',
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
}).then(() => {
|
||||
this.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
that
|
||||
.$confirm('确定执行自动设置光驱操作吗?', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'autoSetCDDev',
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
})
|
||||
.then(() => {
|
||||
that.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
break
|
||||
}
|
||||
},
|
||||
// 维护设备
|
||||
handleService(e) {
|
||||
let that = this
|
||||
switch (e.id) {
|
||||
case 1:
|
||||
// 重启设备
|
||||
this.$store.dispatch('chat/websocketsend', {
|
||||
req_name: 'resetPrinter',
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
}).then(() => {
|
||||
this.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
that
|
||||
.$confirm('确定执行重启设备操作吗?', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'resetPrinter',
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
})
|
||||
.then(() => {
|
||||
that.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
break
|
||||
case 2:
|
||||
// 清除错误
|
||||
this.$store.dispatch('chat/websocketsend', {
|
||||
req_name: 'cleanError',
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
}).then(() => {
|
||||
this.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
that
|
||||
.$confirm('确定执行清除错误操作吗?', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'cleanError',
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
})
|
||||
.then(() => {
|
||||
that.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
break
|
||||
case 3:
|
||||
// 进入运输模式
|
||||
this.$confirm('请确保已经取掉左右光盘仓托架,再点击确定', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$store.dispatch('chat/websocketsend', {
|
||||
req_name: 'TransportMode',
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
}).then(() => {
|
||||
this.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
that
|
||||
.$confirm('请确保已经取掉左右光盘仓托架,再点击确定', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'TransportMode',
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
})
|
||||
.then(() => {
|
||||
that.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
break
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user