更新
This commit is contained in:
@@ -45,6 +45,12 @@
|
||||
<div class="device_info_main" :class="{ device_info_main1: infoStatus === 1 }">
|
||||
<div class="device_info_item">
|
||||
<div class="device_info_title">{{ printer_info.printer_name || '打印机名称' }}</div>
|
||||
<div class="device_info_sure">
|
||||
<div v-if="currentRunVal === 6" class="flex_box flex_row_between device_info_sure_box">
|
||||
<div class="device_info_sure_text">{{ sureText }}</div>
|
||||
<el-button @click="sureCD" class="device_info_sure_btn" type="primary">确定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex_box device_info_options">
|
||||
<div class="device_info_option">
|
||||
<div class="device_info_option_box">
|
||||
@@ -57,9 +63,16 @@
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex_box flex_row_center device_info_option_b">
|
||||
<div class="flex_box flex_row_center">
|
||||
<el-dropdown trigger="click" :disabled="currentRunVal !== 6" @command="(e) => handleCommandCD(e, 0)">
|
||||
<div class="el-dropdown-link flex_box flex_row_center device_info_option_b">
|
||||
<div class="device_info_option_b_text">{{ CDTypes[printer_info.strongList[1].cd_type] }} {{ printer_info.strongList[1].cd_num }}张</div>
|
||||
<i v-if="runVal === 6" class="el-icon-caret-bottom"></i>
|
||||
<i v-if="currentRunVal === 6" class="el-icon-caret-bottom"></i>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-for="(item, index) in CDTypes" :key="index" :command="index"><span :style="{'color': index === printer_info.strongList[1].cd_type ? '#409EFF' : '#000', 'font-weight': index === printer_info.strongList[1].cd_type ? '600' : '400' }">{{ item }}</span></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device_info_option">
|
||||
@@ -73,9 +86,16 @@
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex_box flex_row_center device_info_option_b">
|
||||
<div class="flex_box flex_row_center">
|
||||
<el-dropdown trigger="click" :disabled="currentRunVal !== 6" @command="(e) => handleCommandCD(e, 1)">
|
||||
<div class="el-dropdown-link flex_box flex_row_center device_info_option_b">
|
||||
<div class="device_info_option_b_text">{{ CDTypes[printer_info.strongList[2].cd_type] }} {{ printer_info.strongList[2].cd_num }}张</div>
|
||||
<i v-if="runVal === 6" class="el-icon-caret-bottom"></i>
|
||||
<i v-if="currentRunVal === 6" class="el-icon-caret-bottom"></i>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-for="(item, index) in CDTypes" :key="index" :command="index"><span :style="{'color': index === printer_info.strongList[2].cd_type ? '#409EFF' : '#000', 'font-weight': index === printer_info.strongList[2].cd_type ? '600' : '400' }">{{ item }}</span></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
<div class="device_info_option">
|
||||
@@ -302,6 +322,7 @@
|
||||
|
||||
<script>
|
||||
let that
|
||||
let outTimer
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
import UserInfo from '@/components/userInfo/userInfo.vue'
|
||||
@@ -317,7 +338,11 @@ export default {
|
||||
// 工作状态
|
||||
infoStatus: 0,
|
||||
runText: '',
|
||||
// 运行选项
|
||||
runVal: 1,
|
||||
currentRunVal: 0,
|
||||
sureText: '请设置左右盘仓类型并按确定键',
|
||||
sureTime: 0,
|
||||
runList: [
|
||||
{
|
||||
value: 1,
|
||||
@@ -361,9 +386,27 @@ export default {
|
||||
// 设备信息
|
||||
printer_info: {},
|
||||
// 光盘信息
|
||||
default_cd: {},
|
||||
diskTypes: {},
|
||||
CDTypes: {},
|
||||
cd_list: [],
|
||||
// 光盘更换命令
|
||||
changeCD: {
|
||||
req_name: 'setCDStrong',
|
||||
req_type: 2,
|
||||
req_info: {
|
||||
strong_list: [
|
||||
{
|
||||
strong_pos: 1,
|
||||
strong_type: 1
|
||||
},
|
||||
{
|
||||
strong_pos: 2,
|
||||
strong_type: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
// 日志信息
|
||||
logList: [],
|
||||
allLogList: [],
|
||||
@@ -396,6 +439,7 @@ export default {
|
||||
} else {
|
||||
this.runText = this.$store.state.chat.PrinterStatus[val.printer_status]
|
||||
}
|
||||
this.default_cd = val.strongList
|
||||
this.printer_info = { ...val }
|
||||
},
|
||||
deep: true,
|
||||
@@ -447,10 +491,28 @@ export default {
|
||||
// 执行
|
||||
handleRun() {
|
||||
const index = that.runList.findIndex((item) => item.value == that.runVal)
|
||||
that.$message({
|
||||
message: that.runList[index].label,
|
||||
type: 'success'
|
||||
})
|
||||
// that.$message({
|
||||
// message: that.runList[index].label,
|
||||
// type: 'success'
|
||||
// })
|
||||
clearTimeout(outTimer)
|
||||
if (this.runVal === 6) {
|
||||
outTimer = setTimeout(() => {
|
||||
this.currentRunVal = 0
|
||||
this.printer_info.strongList = this.default_cd
|
||||
}, 120000);
|
||||
}
|
||||
that.currentRunVal = that.runVal
|
||||
},
|
||||
// 更换左右磁盘类型
|
||||
handleCommandCD(e, type) {
|
||||
this.printer_info.strongList[type].cd_type = e
|
||||
this.changeCD.req_info.strong_list[type].strong_type = e
|
||||
},
|
||||
sureCD() {
|
||||
that.$store.dispatch('chat/websocketsend', this.changeCD)
|
||||
clearTimeout(outTimer)
|
||||
this.currentRunVal = 0
|
||||
},
|
||||
// 新建作业
|
||||
showWork() {
|
||||
@@ -562,7 +624,7 @@ $red: #ff0000;
|
||||
.device_info {
|
||||
width: calc(100% - 290px);
|
||||
.device_info_box {
|
||||
width: calc(100% - 50px);
|
||||
width: calc(100% - 40px);
|
||||
overflow: hidden;
|
||||
.device_info_main {
|
||||
white-space: nowrap;
|
||||
@@ -581,7 +643,29 @@ $red: #ff0000;
|
||||
font-size: 25px;
|
||||
color: #000000;
|
||||
line-height: 38px;
|
||||
margin-bottom: 42px;
|
||||
}
|
||||
.device_info_sure {
|
||||
height: 42px;
|
||||
.device_info_sure_box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.device_info_sure_text {
|
||||
font-size: 15px;
|
||||
color: $green;
|
||||
}
|
||||
.device_info_sure_btn {
|
||||
width: 80px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding: 0;
|
||||
background: #00bcc3;
|
||||
border-radius: 6px;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
margin: 0;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
.device_info_options {
|
||||
.device_info_option {
|
||||
@@ -592,6 +676,7 @@ $red: #ff0000;
|
||||
.device_info_option_box {
|
||||
width: 84px;
|
||||
height: 67px;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
img {
|
||||
width: 100%;
|
||||
@@ -629,6 +714,7 @@ $red: #ff0000;
|
||||
height: 30px;
|
||||
padding-top: 10px;
|
||||
font-size: 24px;
|
||||
cursor: pointer;
|
||||
.device_info_option_b_text {
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
|
||||
Reference in New Issue
Block a user