调整bug
This commit is contained in:
+15
-6
@@ -16,13 +16,10 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
let that = this
|
||||
if (that.$store.getters.token) {
|
||||
// if (that.$store.getters.token) {
|
||||
|
||||
// }
|
||||
that.$store.dispatch('chat/initWebSocket') // 初始化websocket
|
||||
}
|
||||
this.showNotify()
|
||||
this.showNotify()
|
||||
this.showNotify()
|
||||
this.showNotify()
|
||||
},
|
||||
watch: {
|
||||
'$store.state.chat.printer_error': {
|
||||
@@ -50,6 +47,18 @@ export default {
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
},
|
||||
'$store.state.chat.isConnect': {
|
||||
handler(val) {
|
||||
let that = this
|
||||
if (val) {
|
||||
that.errors = []
|
||||
} else {
|
||||
that.$notify.closeAll()
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -1060,13 +1060,17 @@ export default {
|
||||
cursor: pointer;
|
||||
height: 40px;
|
||||
padding: 0 22px;
|
||||
background: rgba(0, 195, 37, 0.12);
|
||||
background: transparent;
|
||||
border-radius: 4px;
|
||||
border: 1px solid rgba(0, 195, 37, 0.32);
|
||||
border: 1px solid #999;
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
color: #333;
|
||||
&:hover {
|
||||
background: rgba(0, 195, 37, 0.32);
|
||||
border: 1px solid rgba(0, 195, 37, 0.32);
|
||||
color: #00c325;
|
||||
|
||||
}
|
||||
img {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
@@ -1116,13 +1120,18 @@ export default {
|
||||
cursor: pointer;
|
||||
height: 40px;
|
||||
padding: 0 22px;
|
||||
background: rgba(0, 195, 37, 0.12);
|
||||
background: transparent;
|
||||
border-radius: 4px;
|
||||
border: 1px solid rgba(0, 195, 37, 0.32);
|
||||
border: 1px solid #999;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #00c325;
|
||||
color: #333;
|
||||
margin-right: 22px;
|
||||
&:hover {
|
||||
background: rgba(0, 195, 37, 0.32);
|
||||
border: 1px solid rgba(0, 195, 37, 0.32);
|
||||
color: #00c325;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 20px;
|
||||
@@ -1419,13 +1428,18 @@ export default {
|
||||
.footer_save {
|
||||
width: 166px;
|
||||
height: 45px;
|
||||
background: #00bcc3;
|
||||
background: transparent;
|
||||
border-radius: 4px;
|
||||
font-weight: 500;
|
||||
font-size: 19px;
|
||||
color: #ffffff;
|
||||
color: #333;
|
||||
border: 1px solid #999;
|
||||
padding: 0;
|
||||
margin-right: 22px;
|
||||
&:hover {
|
||||
background: #00bcc3;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.footer_submit {
|
||||
|
||||
@@ -535,7 +535,8 @@ const actions = {
|
||||
// 心跳检测重连
|
||||
pingCheck({ state, commit, dispatch, rootState }) {
|
||||
if (state.pingNum < 4) {
|
||||
state.pingNum++
|
||||
let num = state.pingNum + 1
|
||||
commit('setData', { name: 'pingNum', data: num })
|
||||
timeouter = setTimeout(() => {
|
||||
dispatch('pingCheck')
|
||||
}, 10000)
|
||||
@@ -590,7 +591,8 @@ const actions = {
|
||||
commit('setData', { name: 'connecting', data: false })
|
||||
commit('setData', { name: 'isConnect', data: false })
|
||||
commit('setData', { name: 'serviceStatus', data: false })
|
||||
state.reconnections += 1
|
||||
let num = state.reconnections + 1
|
||||
commit('setData', { name: 'reconnections', data: num })
|
||||
const refreshTime = parseInt(state.refreshTime) * 1000
|
||||
setTimeout(() => {
|
||||
dispatch('initWebSocket')
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</el-tooltip>
|
||||
<div class="flex_box top_left_option">
|
||||
<div class="top_left_text">完成刻录数:</div>
|
||||
<div class="top_left_num">{{ taskNum[0] }}</div>
|
||||
<div class="top_left_num top_left_num1">{{ taskNum[0] }}</div>
|
||||
</div>
|
||||
<div class="flex_box top_left_option">
|
||||
<div class="top_left_text">废弃刻录数:</div>
|
||||
@@ -31,7 +31,7 @@
|
||||
</div>
|
||||
<div class="flex_box top_left_option">
|
||||
<div class="top_left_text">错误:</div>
|
||||
<div class="top_left_num">{{ taskNum[2] }}</div>
|
||||
<div class="top_left_num top_left_num1">{{ taskNum[2] }}</div>
|
||||
</div>
|
||||
<div class="top_left_line"></div>
|
||||
</div>
|
||||
@@ -287,7 +287,7 @@
|
||||
<el-table-column prop="task_status" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.task_status == 5 && scope.row.task_uuid">
|
||||
<el-dropdown trigger="click" @command="(e) => workCommand(scope.$index, e)">
|
||||
<el-dropdown trigger="click" @command="(e) => workCommand(scope.row, e)">
|
||||
<div class="el-dropdown-link flex_box work_status_box">
|
||||
<div>{{ statusList[scope.row.task_status] }}</div>
|
||||
<i class="el-icon-caret-bottom"></i>
|
||||
@@ -929,25 +929,25 @@ export default {
|
||||
},
|
||||
// 新建作业
|
||||
showWork() {
|
||||
if (!that.workStatus) {
|
||||
that.$message({
|
||||
message: '请先连接服务',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (that.printer_info.is_set_cddev == 1) {
|
||||
that.$confirm('上下光驱未设置,请前往设置', '温馨提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
that.goSet('/manage?type=cddev')
|
||||
}).catch(() => {
|
||||
// if (!that.workStatus) {
|
||||
// that.$message({
|
||||
// message: '请先连接服务',
|
||||
// type: 'warning'
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
// if (that.printer_info.is_set_cddev == 1) {
|
||||
// that.$confirm('上下光驱未设置,请前往设置', '温馨提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'warning'
|
||||
// }).then(() => {
|
||||
// that.goSet('/manage?type=cddev')
|
||||
// }).catch(() => {
|
||||
|
||||
});
|
||||
return
|
||||
}
|
||||
// });
|
||||
// return
|
||||
// }
|
||||
that.isNew = true
|
||||
that.workShow = true
|
||||
that.$nextTick(() => {
|
||||
@@ -1006,22 +1006,22 @@ export default {
|
||||
that.showAll = !that.showAll
|
||||
},
|
||||
// 下拉操作
|
||||
workCommand(index, e) {
|
||||
workCommand(row, e) {
|
||||
if (e === 'retry') {
|
||||
that.workRetry(index)
|
||||
that.workRetry(row)
|
||||
}
|
||||
if (e === 'cancel') {
|
||||
that.workCancel(index)
|
||||
that.workCancel(row)
|
||||
}
|
||||
},
|
||||
// 作业重试
|
||||
workRetry(e) {
|
||||
workRetry(row) {
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'retry_task',
|
||||
req_type: 1,
|
||||
req_info: {
|
||||
task_uuid: that.task_list[e].task_uuid
|
||||
task_uuid: row.task_uuid
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
@@ -1029,9 +1029,9 @@ export default {
|
||||
message: '重试成功',
|
||||
type: 'success'
|
||||
})
|
||||
that.task_list[e].task_status = 1
|
||||
if (that.task_list[e].ass_task && that.task_list[e].ass_task.length > 0) {
|
||||
that.task_list[e].ass_task.forEach((item) => {
|
||||
row.task_status = 1
|
||||
if (row.ass_task && row.ass_task.length > 0) {
|
||||
row.ass_task.forEach((item) => {
|
||||
item.task_status = 1
|
||||
})
|
||||
}
|
||||
@@ -1113,13 +1113,17 @@ $red: #ff0000;
|
||||
cursor: pointer;
|
||||
padding: 0 16px;
|
||||
height: 40px;
|
||||
background: rgba(0, 195, 37, 0.12);
|
||||
border: 2px solid rgba(0, 195, 37, 0.32);
|
||||
border: 2px solid #999;
|
||||
color: #333;
|
||||
border-radius: 6px;
|
||||
margin-right: 16px;
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
&:hover {
|
||||
background: rgba(0, 195, 37, 0.12);
|
||||
border: 2px solid rgba(0, 195, 37, 0.32);
|
||||
color: #00c325;
|
||||
}
|
||||
img {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
@@ -1412,9 +1416,11 @@ $red: #ff0000;
|
||||
.device_run_input {
|
||||
width: calc(100% - 140px);
|
||||
height: 44px;
|
||||
border: 2px solid #00bcc3;
|
||||
overflow: hidden;
|
||||
border-radius: 6px 0 0 6px;
|
||||
border-style: solid;
|
||||
border-width: 1px 0 1px 1px;
|
||||
border-color: #999;
|
||||
.el-select {
|
||||
width: 100%;
|
||||
padding-left: 10px;
|
||||
@@ -1441,12 +1447,20 @@ $red: #ff0000;
|
||||
.device_run_btn {
|
||||
width: 140px;
|
||||
height: 44px;
|
||||
background: #00bcc3;
|
||||
background: transparent;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: #999;
|
||||
border-radius: 0px 6px 6px 0px;
|
||||
font-weight: 500;
|
||||
font-size: 19px;
|
||||
margin: 0;
|
||||
color: #ffffff;
|
||||
color: #333;
|
||||
&:hover {
|
||||
background: rgba(0, 195, 37, 0.12);
|
||||
border: 2px solid rgba(0, 195, 37, 0.32);
|
||||
color: #00c325;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1544,7 +1558,7 @@ $red: #ff0000;
|
||||
.notice_all {
|
||||
font-weight: 500;
|
||||
font-size: 19px;
|
||||
color: #00c325;
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
img {
|
||||
width: 28px;
|
||||
|
||||
@@ -742,15 +742,19 @@ export default {
|
||||
width: 250px;
|
||||
height: 42px;
|
||||
cursor: pointer;
|
||||
background: rgba(0, 195, 37, 0.12);
|
||||
color: #333;
|
||||
border: 1px solid #999;
|
||||
border-radius: 4px;
|
||||
border: 1px solid rgba(0, 195, 37, 0.32);
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
font-size: 19px;
|
||||
color: #00c325;
|
||||
margin: 6px;
|
||||
&:hover {
|
||||
background: rgba(0, 195, 37, 0.12);
|
||||
border: 1px solid rgba(0, 195, 37, 0.32);
|
||||
color: #00c325;
|
||||
}
|
||||
}
|
||||
}
|
||||
.form_input {
|
||||
@@ -758,13 +762,14 @@ export default {
|
||||
height: 42px;
|
||||
background: #ffffff;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #98e8a6;
|
||||
border: 1px solid #999;
|
||||
overflow: hidden;
|
||||
::v-deep {
|
||||
.el-input-group__append {
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
border-radius: 0;
|
||||
}
|
||||
.el-input__inner {
|
||||
width: 360px;
|
||||
@@ -787,8 +792,16 @@ export default {
|
||||
height: 40px;
|
||||
border: none;
|
||||
padding: 0;
|
||||
background: #00c325;
|
||||
background: transparent;
|
||||
border-radius: 0px 4px 4px 0px;
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
&:hover {
|
||||
background: #00c325;
|
||||
color: #fff;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -816,7 +829,7 @@ export default {
|
||||
line-height: 24px;
|
||||
}
|
||||
.el-checkbox__input.is-checked + .el-checkbox__label {
|
||||
color: #00c325;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
.form_select {
|
||||
|
||||
@@ -333,12 +333,17 @@ export default {
|
||||
.footer_submit {
|
||||
width: 166px;
|
||||
height: 45px;
|
||||
background: #00C325;
|
||||
background: transparent;
|
||||
border: 1px solid #999;
|
||||
border-radius: 4px;
|
||||
font-weight: 500;
|
||||
font-size: 19px;
|
||||
color: #FFFFFF;
|
||||
color: #333;
|
||||
padding: 0;
|
||||
&:hover {
|
||||
background: #00C325;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user