优化bug
This commit is contained in:
@@ -198,7 +198,7 @@ const defaultData = {
|
|||||||
calibration_flag: 0, // 是否校验设备
|
calibration_flag: 0, // 是否校验设备
|
||||||
lack_ink: 0, // 缺墨警告
|
lack_ink: 0, // 缺墨警告
|
||||||
cover_flag: false, //是否盖盖
|
cover_flag: false, //是否盖盖
|
||||||
printer_name: '4200', //设备名称
|
printer_name: '', //设备名称
|
||||||
printer_status: 'I', //设备状态 数字转成字符为I
|
printer_status: 'I', //设备状态 数字转成字符为I
|
||||||
printer_tray: 'I', //设备托盘状态 数字转成字符为I
|
printer_tray: 'I', //设备托盘状态 数字转成字符为I
|
||||||
red_last: 0, //红色墨盒遗留
|
red_last: 0, //红色墨盒遗留
|
||||||
@@ -394,7 +394,7 @@ const actions = {
|
|||||||
commit('setData', { name: 'cd_list', data: cds })
|
commit('setData', { name: 'cd_list', data: cds })
|
||||||
// 手动设置驱动
|
// 手动设置驱动
|
||||||
} else if (data.resp_name === 'get_all_cdlist') {
|
} else if (data.resp_name === 'get_all_cdlist') {
|
||||||
commit('setData', { name: 'cdList', data: data.resp_info.cd_list })
|
commit('setData', { name: 'cdList', data: data.resp_info.cd_list || [] })
|
||||||
// 系统配置
|
// 系统配置
|
||||||
} else if (data.resp_name === 'get_system_config') {
|
} else if (data.resp_name === 'get_system_config') {
|
||||||
commit('setData', { name: 'settings', data: data.resp_info })
|
commit('setData', { name: 'settings', data: data.resp_info })
|
||||||
|
|||||||
@@ -35,16 +35,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="top_left_line"></div>
|
<div class="top_left_line"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex_box">
|
||||||
|
<div v-if="printer_info.test_use" class="top_tip">您的试用期还剩{{printer_info.test_use}}天,请及时续费!</div>
|
||||||
<user-info></user-info>
|
<user-info></user-info>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="content_body">
|
<div class="content_body">
|
||||||
<!-- 设备 -->
|
<!-- 设备 -->
|
||||||
<div class="flex_box device_box">
|
<div class="flex_box device_box">
|
||||||
<!-- 左侧 -->
|
<!-- 左侧 -->
|
||||||
<div class="device_left">
|
<div class="device_left">
|
||||||
<div class="flex_box device_left_top">
|
<div class="flex_box device_left_top">
|
||||||
<img v-if="!printer_info.cover_flag" class="flex_shrink device_img" :src="deviceImg[printer_info.printer_name].img1" />
|
<img v-if="!printer_info.cover_flag" class="flex_shrink device_img" :src="printer_info.printer_name?deviceImg[printer_info.printer_name].img1:deviceImg['4200'].img1" />
|
||||||
<img v-else class="flex_shrink device_img" :src="deviceImg[printer_info.printer_name].img2" />
|
<img v-else class="flex_shrink device_img" :src="printer_info.printer_name?deviceImg[printer_info.printer_name].img2:deviceImg['4200'].img2" />
|
||||||
<div class="flex_box flex_row_between device_info">
|
<div class="flex_box flex_row_between device_info">
|
||||||
<div class="device_info_box">
|
<div class="device_info_box">
|
||||||
<div class="device_info_main" :class="{ device_info_main1: infoStatus === 1 }">
|
<div class="device_info_main" :class="{ device_info_main1: infoStatus === 1 }">
|
||||||
@@ -483,6 +486,49 @@ export default {
|
|||||||
}
|
}
|
||||||
this.default_cd = data.strongList
|
this.default_cd = data.strongList
|
||||||
this.printer_info = { ...data }
|
this.printer_info = { ...data }
|
||||||
|
if (val.printer_name && val.printer_name === 'SE3') {
|
||||||
|
this.runList = [
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '重启设备'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: '清除错误'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 5,
|
||||||
|
label: '自动匹配光驱'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 7,
|
||||||
|
label: '进入运输模式'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
this.runList = [
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '重启设备'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: '清除错误'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 5,
|
||||||
|
label: '自动匹配光驱'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 6,
|
||||||
|
label: '设置盘仓'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 7,
|
||||||
|
label: '进入运输模式'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
if (this.printer_info.is_set_cddev == 1) {
|
if (this.printer_info.is_set_cddev == 1) {
|
||||||
if (this.is_set_cddev) return
|
if (this.is_set_cddev) return
|
||||||
this.is_set_cddev = true
|
this.is_set_cddev = true
|
||||||
@@ -849,11 +895,60 @@ export default {
|
|||||||
that.changeCD.req_info.strong_list[type - 1].strong_type = parseInt(e)
|
that.changeCD.req_info.strong_list[type - 1].strong_type = parseInt(e)
|
||||||
},
|
},
|
||||||
sureCD() {
|
sureCD() {
|
||||||
|
if (that.changeCD.req_info.strong_list[0]&&that.changeCD.req_info.strong_list[1]&&that.changeCD.req_info.strong_list[0].strong_type == that.changeCD.req_info.strong_list[1].strong_type) {
|
||||||
|
that.$message({
|
||||||
|
message: '盘仓类型不能相同',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
that.$store
|
that.$store
|
||||||
.dispatch('chat/websocketsend', that.changeCD)
|
.dispatch('chat/websocketsend', that.changeCD)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
clearTimeout(outTimer)
|
clearTimeout(outTimer)
|
||||||
that.currentRunVal = 0
|
that.currentRunVal = 0
|
||||||
|
let typeLists = [
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: 'CD 700MB',
|
||||||
|
size: 700 * 1024 * 1024
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 2,
|
||||||
|
label: 'DVD 4.7GB',
|
||||||
|
size: 4.7 * 1024 * 1024 * 1024
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 3,
|
||||||
|
label: 'DVD_DL 8.5GB',
|
||||||
|
size: 8.5 * 1024 * 1024 * 1024
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 4,
|
||||||
|
label: 'BD 25GB',
|
||||||
|
size: 25 * 1024 * 1024 * 1024
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 5,
|
||||||
|
label: 'BD_DL 50GB',
|
||||||
|
size: 50 * 1024 * 1024 * 1024
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 6,
|
||||||
|
label: 'BD_TL 100GB',
|
||||||
|
size: 100 * 1024 * 1024 * 1024
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 7,
|
||||||
|
label: 'BD_QL 128GB',
|
||||||
|
size: 128 * 1024 * 1024 * 1024
|
||||||
|
}
|
||||||
|
]
|
||||||
|
let isBD = that.changeCD.req_info.strong_list.findIndex(item => parseInt(item.strong_type) > 3)
|
||||||
|
if (isBD === -1) {
|
||||||
|
typeLists = typeLists.slice(0, 3)
|
||||||
|
}
|
||||||
|
that.$store.dispatch('chat/setDatas', { name: 'cd_types', data: typeLists })
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
clearTimeout(outTimer)
|
clearTimeout(outTimer)
|
||||||
@@ -1102,6 +1197,10 @@ $red: #ff0000;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.top_tip {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #ff0000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.content_body {
|
.content_body {
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ export default {
|
|||||||
components: { TabBar },
|
components: { TabBar },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
printer_info: {},
|
||||||
moveList: [
|
moveList: [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
@@ -151,11 +152,11 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
name: '校准盘仓'
|
name: '校准光盘桶'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
name: '刷新CD数量'
|
name: '刷新光盘'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
actionList: [
|
actionList: [
|
||||||
@@ -231,6 +232,10 @@ export default {
|
|||||||
},
|
},
|
||||||
'$store.state.chat.cdList': {
|
'$store.state.chat.cdList': {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
|
if (!val || val.length === 0) {
|
||||||
|
this.cdList = []
|
||||||
|
return
|
||||||
|
}
|
||||||
this.cdList = val.map((item) => {
|
this.cdList = val.map((item) => {
|
||||||
item.cdType = 1
|
item.cdType = 1
|
||||||
return item
|
return item
|
||||||
@@ -238,7 +243,54 @@ export default {
|
|||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true
|
immediate: true
|
||||||
|
},
|
||||||
|
'$store.state.chat.printer_info': {
|
||||||
|
handler(val) {
|
||||||
|
let data = { ...val }
|
||||||
|
this.printer_info = { ...data }
|
||||||
|
if (val.printer_name && val.printer_name === 'SE3') {
|
||||||
|
this.moveList = [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: '校准打印机'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
name: '校准光盘桶'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
name: '刷新光盘'
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
this.moveList = [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: '校准打印机'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: '校准上光驱'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
name: '校准下光驱'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 4,
|
||||||
|
name: '校准光盘桶'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 5,
|
||||||
|
name: '刷新光盘'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 校准设备
|
// 校准设备
|
||||||
@@ -321,9 +373,9 @@ export default {
|
|||||||
})
|
})
|
||||||
break
|
break
|
||||||
case 4:
|
case 4:
|
||||||
// 校准盘仓
|
// 校准光盘桶
|
||||||
that
|
that
|
||||||
.$confirm('请在左右进盘仓各放入一张光盘,点击确定后将自动校准盘仓', '温馨提示', {
|
.$confirm('请在所有光盘桶放置一张光盘,点击确定后将校准每一个光盘桶的数量为 1', '温馨提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
@@ -344,9 +396,9 @@ export default {
|
|||||||
})
|
})
|
||||||
break
|
break
|
||||||
case 5:
|
case 5:
|
||||||
// 刷新CD数量
|
// 刷新光盘
|
||||||
that
|
that
|
||||||
.$confirm('请在左右进盘仓各放入一张光盘,点击确定后将刷新CD数量', '温馨提示', {
|
.$confirm('点击确定后将刷新所有光盘桶的光盘数量。', '温馨提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
@@ -533,7 +585,7 @@ export default {
|
|||||||
device_pos: 2
|
device_pos: 2
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
if (this.$store.state.chat.printer_info.printer_name !== 'SE3') {
|
if (this.printer_info.printer_name !== 'SE3') {
|
||||||
let top = this.cdList.filter((item) => item.cdType === 2)
|
let top = this.cdList.filter((item) => item.cdType === 2)
|
||||||
let bottom = this.cdList.filter((item) => item.cdType === 3)
|
let bottom = this.cdList.filter((item) => item.cdType === 3)
|
||||||
if (!top || top.length === 0) {
|
if (!top || top.length === 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user