@@ -483,6 +486,49 @@ export default {
}
this.default_cd = data.strongList
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.is_set_cddev) return
this.is_set_cddev = true
@@ -849,11 +895,60 @@ export default {
that.changeCD.req_info.strong_list[type - 1].strong_type = parseInt(e)
},
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
.dispatch('chat/websocketsend', that.changeCD)
.then(() => {
clearTimeout(outTimer)
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(() => {
clearTimeout(outTimer)
@@ -1102,6 +1197,10 @@ $red: #ff0000;
}
}
}
+ .top_tip {
+ font-size: 14px;
+ color: #ff0000;
+ }
}
.content_body {
background-color: #f8f8f8;
diff --git a/src/renderer/views/manage/index.vue b/src/renderer/views/manage/index.vue
index 9354705..40f8986 100644
--- a/src/renderer/views/manage/index.vue
+++ b/src/renderer/views/manage/index.vue
@@ -136,6 +136,7 @@ export default {
components: { TabBar },
data() {
return {
+ printer_info: {},
moveList: [
{
id: 1,
@@ -151,11 +152,11 @@ export default {
},
{
id: 4,
- name: '校准盘仓'
+ name: '校准光盘桶'
},
{
id: 5,
- name: '刷新CD数量'
+ name: '刷新光盘'
}
],
actionList: [
@@ -231,6 +232,10 @@ export default {
},
'$store.state.chat.cdList': {
handler(val) {
+ if (!val || val.length === 0) {
+ this.cdList = []
+ return
+ }
this.cdList = val.map((item) => {
item.cdType = 1
return item
@@ -238,7 +243,54 @@ export default {
},
deep: 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: {
// 校准设备
@@ -321,9 +373,9 @@ export default {
})
break
case 4:
- // 校准盘仓
+ // 校准光盘桶
that
- .$confirm('请在左右进盘仓各放入一张光盘,点击确定后将自动校准盘仓', '温馨提示', {
+ .$confirm('请在所有光盘桶放置一张光盘,点击确定后将校准每一个光盘桶的数量为 1', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -344,9 +396,9 @@ export default {
})
break
case 5:
- // 刷新CD数量
+ // 刷新光盘
that
- .$confirm('请在左右进盘仓各放入一张光盘,点击确定后将刷新CD数量', '温馨提示', {
+ .$confirm('点击确定后将刷新所有光盘桶的光盘数量。', '温馨提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -533,7 +585,7 @@ export default {
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 bottom = this.cdList.filter((item) => item.cdType === 3)
if (!top || top.length === 0) {