优化与对接接口
This commit is contained in:
@@ -22,16 +22,16 @@
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<div class="flex_box top_left_option">
|
||||
<div class="top_left_text">完成拷贝数:</div>
|
||||
<div class="top_left_num">{{ task_list.length }}</div>
|
||||
<div class="top_left_text">完成刻录数:</div>
|
||||
<div class="top_left_num">{{ taskNum[0] }}</div>
|
||||
</div>
|
||||
<div class="flex_box top_left_option">
|
||||
<div class="top_left_text">废弃拷贝数:</div>
|
||||
<div class="top_left_num top_left_num1">0</div>
|
||||
<div class="top_left_text">废弃刻录数:</div>
|
||||
<div class="top_left_num top_left_num1">{{taskNum[1]}}</div>
|
||||
</div>
|
||||
<div class="flex_box top_left_option">
|
||||
<div class="top_left_text">错误:</div>
|
||||
<div class="top_left_num">0</div>
|
||||
<div class="top_left_num">{{taskNum[2]}}</div>
|
||||
</div>
|
||||
<div class="top_left_line"></div>
|
||||
</div>
|
||||
@@ -49,7 +49,7 @@
|
||||
<div class="device_info_box">
|
||||
<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_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>
|
||||
@@ -145,7 +145,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="flex_box device_status" :class="`flex_box device_status device_status${printer_info.printer_status} device_status${printer_info.cover_flag}`"> -->
|
||||
<div class="flex_box device_status" :class="{ 'device_status1': printer_info.printer_status === 'I', 'device_status2': printer_info.printer_status === 'B' || printer_info.printer_status === 'P', 'device_status3': printer_info.cover_flag || printer_info.calibration_flag || !isConnect || !serviceStatus }">
|
||||
<div class="flex_box device_status" :class="{ 'device_status1': printer_info.printer_status === 'I', 'device_status2': printer_info.printer_status === 'B' || printer_info.printer_status === 'P', 'device_status3': printer_info.cover_flag || printer_info.calibration_flag || printer_info.lack_ink || !isConnect || !serviceStatus }">
|
||||
<div class="device_status_dot"></div>
|
||||
<div class="device_status_text">{{ runText }}</div>
|
||||
</div>
|
||||
@@ -261,10 +261,20 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="task_status" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<div class="flex_box work_status_box">
|
||||
<div v-if="scope.row.task_status == 5&&scope.row.task_uuid">
|
||||
<el-dropdown trigger="click" @command="(e) => workCommand(scope.$index, 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>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item icon="el-icon-refresh-right" command="retry">重试</el-dropdown-item>
|
||||
<el-dropdown-item icon="el-icon-circle-close" command="cancel">取消</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div v-else class="flex_box work_status_box">
|
||||
<div>{{ statusList[scope.row.task_status] }}</div>
|
||||
<el-button v-if="scope.row.task_status == 5&&scope.row.task_uuid" @click="workRetry(scope.$index)" size="mini" type="primary" class="work_status_retry">重试</el-button>
|
||||
<!-- <i class="el-icon-caret-bottom"></i> -->
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -312,7 +322,7 @@ export default {
|
||||
runList: [
|
||||
{
|
||||
value: 1,
|
||||
label: '重启打印机'
|
||||
label: '重启设备'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
@@ -322,10 +332,6 @@ export default {
|
||||
value: 3,
|
||||
label: '校准盘仓'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '校准打印机'
|
||||
},
|
||||
{
|
||||
value: 5,
|
||||
label: '自动匹配光驱'
|
||||
@@ -342,15 +348,17 @@ export default {
|
||||
// 剩余容量
|
||||
progressW: 75,
|
||||
// 作业列表
|
||||
taskNum: [0,0,0],
|
||||
task_list: [],
|
||||
statusList: {
|
||||
0: '新建中',
|
||||
1: '准备中',
|
||||
2: '等待中',
|
||||
3: '正在拷贝',
|
||||
3: '正在刻录',
|
||||
4: '正在打印',
|
||||
5: '已失败',
|
||||
6: '运行中',
|
||||
7: '已取消',
|
||||
100: '已完成'
|
||||
},
|
||||
// 设备信息
|
||||
@@ -393,7 +401,15 @@ export default {
|
||||
if (val && val.length) {
|
||||
let tasks = [...val]
|
||||
let list = []
|
||||
let nums = [0,0,0]
|
||||
tasks.forEach((item, index) => {
|
||||
if (item.task_status == 100) {
|
||||
nums[0]++
|
||||
} else if (item.task_status == 7) {
|
||||
nums[1]++
|
||||
} else if (item.task_status == 5) {
|
||||
nums[2]++
|
||||
}
|
||||
if (item.ass_task&&item.ass_task.length) {
|
||||
let task_size = 0
|
||||
item.cdType = this.$store.state.chat.CDTypes[item.ass_task[0].cd_type]
|
||||
@@ -407,6 +423,7 @@ export default {
|
||||
}
|
||||
list.push(item)
|
||||
})
|
||||
this.taskNum = nums
|
||||
this.task_list = list
|
||||
}
|
||||
},
|
||||
@@ -479,9 +496,12 @@ export default {
|
||||
text = '设备门盖被打开,请关闭门盖。'
|
||||
}
|
||||
if (this.printer_info.calibration_flag) {
|
||||
text = '请先校准打印机'
|
||||
text = '请先校准设备'
|
||||
this.runVal = 4
|
||||
}
|
||||
if (this.printer_info.lack_ink) {
|
||||
text = '缺墨警告'
|
||||
}
|
||||
if (!this.isConnect) {
|
||||
text = '服务已关闭'
|
||||
}
|
||||
@@ -538,93 +558,68 @@ export default {
|
||||
clearTimeout(outTimer)
|
||||
switch (that.runVal) {
|
||||
case 1:
|
||||
// 重启打印机
|
||||
// 重启设备
|
||||
that.$store.dispatch('chat/websocketsend', {
|
||||
req_name: 'resetPrinter',
|
||||
req_type: 1,
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
}).then(() => {
|
||||
that.$message({
|
||||
message: '重启设备执行成功',
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
}).catch(() => {
|
||||
that.$message({
|
||||
message: '重启设备执行失败,请重新尝试',
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
break;
|
||||
case 2:
|
||||
// 清除错误
|
||||
that.$store.dispatch('chat/websocketsend', {
|
||||
req_name: 'cleanError',
|
||||
req_type: 1,
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
}).then(() => {
|
||||
that.$message({
|
||||
message: '清除错误执行成功',
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
}).catch(() => {
|
||||
that.$message({
|
||||
message: '清除错误执行失败,请重新尝试',
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
break;
|
||||
case 3:
|
||||
// 校准盘仓
|
||||
that.$store.dispatch('chat/websocketsend', {
|
||||
req_name: 'CaliCDStone',
|
||||
req_type: 1,
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
}).then(() => {
|
||||
that.$message({
|
||||
message: '校准盘仓执行成功',
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
}).catch(() => {
|
||||
that.$message({
|
||||
message: '校准盘仓执行失败,请重新尝试',
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
break;
|
||||
case 4:
|
||||
// 校准打印机
|
||||
// 校准设备
|
||||
that.$store.dispatch('chat/websocketsend', {
|
||||
req_name: 'CaliPrinter',
|
||||
req_type: 1,
|
||||
req_info: {}
|
||||
}).then(() => {
|
||||
that.$message({
|
||||
message: '校准打印机执行成功',
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
}).catch(() => {
|
||||
that.$message({
|
||||
message: '校准打印机执行失败,请重新尝试',
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
break;
|
||||
case 5:
|
||||
// 自动匹配光驱
|
||||
that.$store.dispatch('chat/websocketsend', {
|
||||
req_name: 'autoSetCDDev',
|
||||
req_type: 1,
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
}).then(() => {
|
||||
that.$message({
|
||||
message: '自动匹配光驱执行成功',
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
}).catch(() => {
|
||||
that.$message({
|
||||
message: '自动匹配光驱执行失败,请重新尝试',
|
||||
type: 'error'
|
||||
})
|
||||
})
|
||||
break;
|
||||
case 6:
|
||||
@@ -633,6 +628,24 @@ export default {
|
||||
that.printer_info.strongList = that.default_cd
|
||||
}, 120000);
|
||||
break;
|
||||
case 7:
|
||||
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;
|
||||
}
|
||||
that.currentRunVal = that.runVal
|
||||
},
|
||||
@@ -704,10 +717,19 @@ export default {
|
||||
}
|
||||
that.showAll = !that.showAll
|
||||
},
|
||||
// 下拉操作
|
||||
workCommand(index, e) {
|
||||
if (e === 'retry') {
|
||||
that.workRetry(index)
|
||||
}
|
||||
if (e === 'cancel') {
|
||||
that.workCancel(index)
|
||||
}
|
||||
},
|
||||
// 作业重试
|
||||
workRetry(e) {
|
||||
that.$store.dispatch('chat/websocketsend', {
|
||||
req_name: 'retry task',
|
||||
req_name: 'retry_task',
|
||||
req_type: 1,
|
||||
req_info: {
|
||||
task_uuid: that.task_list[e].task_uuid
|
||||
@@ -725,6 +747,27 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 作业取消
|
||||
workCancel(e) {
|
||||
that.$store.dispatch('chat/websocketsend', {
|
||||
req_name: 'cancle_task',
|
||||
req_type: 1,
|
||||
req_info: {
|
||||
task_uuid: that.task_list[e].task_uuid
|
||||
}
|
||||
}).then(() => {
|
||||
that.$message({
|
||||
message: '取消成功',
|
||||
type: 'success'
|
||||
})
|
||||
that.task_list[e].task_status = 7
|
||||
if (that.task_list[e].ass_task&&that.task_list[e].ass_task.length > 0) {
|
||||
that.task_list[e].ass_task.forEach(item => {
|
||||
item.task_status = 7
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 跳转设置
|
||||
goSet(e) {
|
||||
that.$router.push({ path: e })
|
||||
@@ -1107,7 +1150,7 @@ $red: #ff0000;
|
||||
.device_right {
|
||||
width: 50%;
|
||||
.device_right_top {
|
||||
height: 200px;
|
||||
height: 190px;
|
||||
background: #ffffff;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 18px;
|
||||
@@ -1182,7 +1225,7 @@ $red: #ff0000;
|
||||
background: #ffffff;
|
||||
border-radius: 6px;
|
||||
.notice_top {
|
||||
height: 75px;
|
||||
height: 50px;
|
||||
padding: 0 30px;
|
||||
border-bottom: 2px solid #e1f5e5;
|
||||
.notice_title {
|
||||
@@ -1274,13 +1317,13 @@ $red: #ff0000;
|
||||
}
|
||||
}
|
||||
.work_box {
|
||||
height: calc(100vh - 640px);
|
||||
height: calc(100vh - 605px);
|
||||
::-webkit-scrollbar {
|
||||
width: 0; /* 设置滚动条的宽度 */
|
||||
height: 0;
|
||||
}
|
||||
.el-table.work_table {
|
||||
height: calc(100vh - 720px) !important;
|
||||
height: calc(100vh - 665px) !important;
|
||||
::v-deep .el-table__body-wrapper {
|
||||
height: calc(100% - 48px) !important;
|
||||
overflow: scroll!important;
|
||||
@@ -1288,15 +1331,15 @@ $red: #ff0000;
|
||||
}
|
||||
.work_top {
|
||||
background-color: #fff;
|
||||
height: 72px;
|
||||
height: 50px;
|
||||
.work_top_text {
|
||||
width: 132px;
|
||||
height: 72px;
|
||||
height: 50px;
|
||||
background: linear-gradient(180deg, #c1ffcd 0%, #ffffff 100%);
|
||||
font-weight: bold;
|
||||
font-size: 19px;
|
||||
color: #00c325;
|
||||
line-height: 72px;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
@@ -1344,6 +1387,7 @@ $red: #ff0000;
|
||||
font-size: 14px;
|
||||
color: #000000;
|
||||
height: 30px;
|
||||
cursor: pointer;
|
||||
.work_status_retry {
|
||||
width: 40px;
|
||||
height: 22px;
|
||||
|
||||
@@ -13,21 +13,21 @@
|
||||
</div>
|
||||
<div class="form_content">
|
||||
<div class="flex_box form_option">
|
||||
<div class="form_label">移动卡片到</div>
|
||||
<div class="form_label">校准设备</div>
|
||||
<div class="form_val">
|
||||
<div class="flex_box flex_wrap form_tabs">
|
||||
<div v-for="(item, index) in moveList" :key="index" class="form_tab">{{ item.name }}</div>
|
||||
<div @click="handleMove(item)" v-for="(item, index) in moveList" :key="index" class="form_tab">{{ item.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex_box form_option">
|
||||
<!-- <div class="flex_box form_option">
|
||||
<div class="form_label">维护工作站</div>
|
||||
<div class="form_val">
|
||||
<div class="flex_box flex_wrap form_tabs">
|
||||
<div v-for="(item, index) in actionList" :key="index" class="form_tab">{{ item.name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_item">
|
||||
@@ -66,7 +66,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_item">
|
||||
<!-- <div class="form_item">
|
||||
<div class="flex_box form_title">
|
||||
<div class="flex_box flex_col">
|
||||
<div class="form_title_text">语言</div>
|
||||
@@ -90,14 +90,38 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- 手动校准驱动 -->
|
||||
<el-dialog center title="手动校准驱动" :visible.sync="cdShow" width="1000px">
|
||||
<div class="cd_box" v-loading="cdList.length === 0">
|
||||
<div class="cd_title">请通过点击按钮弹出光驱托盘判断并设置光驱。</div>
|
||||
<div class="cd_desc">需对光驱进行手动设置!</div>
|
||||
<div class="cd_desc">使用下拉方框来指定设备中的哪个光驱是上光驱、哪个是下光驱。</div>
|
||||
<div class="cd_list">
|
||||
<div class="flex_box flex_row_between cd_item" v-for="(item, index) in cdList" :key="index">
|
||||
<div class="cd_name">{{ item.dev_name }}</div>
|
||||
<div class="flex_box cd_r">
|
||||
<el-select v-model="item.cdType" @change="cdChange(index, item.cdType)">
|
||||
<el-option v-for="type in cdOptions" :key="type.value" :label="type.label" :value="type.value"> </el-option>
|
||||
</el-select>
|
||||
<el-button @click="cdOpen(index)" type="success">打开</el-button>
|
||||
<el-button @click="cdClose(index)" type="danger">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex_box flex_row_center cd_footer">
|
||||
<el-button @click="cdCancel" class="cd_footer_btn1">取消</el-button>
|
||||
<el-button @click="cdSubmit" class="cd_footer_btn2" type="primary">确定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import TabBar from '@/components/tabBar/tabBar.vue';
|
||||
import TabBar from '@/components/tabBar/tabBar.vue'
|
||||
|
||||
export default {
|
||||
name: 'manage',
|
||||
@@ -107,27 +131,19 @@ export default {
|
||||
moveList: [
|
||||
{
|
||||
id: 1,
|
||||
name: '读卡器'
|
||||
name: '校准设备'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '废卡盒'
|
||||
name: '校准上光驱'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '出卡口'
|
||||
name: '校准下光驱'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '等待'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '待取口'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: '后出卡口'
|
||||
name: '手动校准驱动'
|
||||
}
|
||||
],
|
||||
actionList: [
|
||||
@@ -169,6 +185,22 @@ export default {
|
||||
label: '繁体中文',
|
||||
value: 'zhYW'
|
||||
}
|
||||
],
|
||||
cdList: [],
|
||||
cdShow: false,
|
||||
cdOptions: [
|
||||
{
|
||||
value: 1,
|
||||
label: '不在设备中'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '上光驱'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: '下光驱'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -177,14 +209,189 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.chat.refreshTime': {
|
||||
handler (val) {
|
||||
handler(val) {
|
||||
this.refreshTime = val
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
},
|
||||
'$store.state.chat.cdList': {
|
||||
handler(val) {
|
||||
this.cdList = val.map((item) => {
|
||||
item.cdType = 1
|
||||
return item
|
||||
})
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 校准设备
|
||||
handleMove(e) {
|
||||
switch (e.id) {
|
||||
case 1:
|
||||
// 校准设备
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'CaliPrinter',
|
||||
req_type: 2,
|
||||
req_info: {
|
||||
cali_num: '02'
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
that.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
break
|
||||
case 2:
|
||||
// 校准上光驱
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'CaliPrinter',
|
||||
req_type: 2,
|
||||
req_info: {
|
||||
cali_num: '00'
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
that.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
break
|
||||
case 3:
|
||||
// 校准下光驱
|
||||
that.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'CaliPrinter',
|
||||
req_type: 2,
|
||||
req_info: {
|
||||
cali_num: '01'
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
that.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
break
|
||||
case 4:
|
||||
this.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'get_all_cd',
|
||||
req_type: 2,
|
||||
req_info: {}
|
||||
})
|
||||
.then(() => {
|
||||
this.cdShow = true
|
||||
})
|
||||
break
|
||||
}
|
||||
},
|
||||
cdChange(index, e) {
|
||||
let item = this.cdList[index]
|
||||
item.cdType = e
|
||||
this.$set(this.cdList, index, { ...item })
|
||||
},
|
||||
cdOpen(e) {
|
||||
let item = this.cdList[e]
|
||||
this.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'openCDDevByPath',
|
||||
req_type: 2,
|
||||
req_info: {
|
||||
dev_path: item.dev_path
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
that.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
},
|
||||
cdClose(e) {
|
||||
let item = this.cdList[e]
|
||||
this.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'closeCDDevByPath',
|
||||
req_type: 2,
|
||||
req_info: {
|
||||
dev_path: item.dev_path
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
that.$message({
|
||||
message: '执行成功',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
},
|
||||
cdCancel() {
|
||||
this.cdShow = false
|
||||
},
|
||||
cdSubmit() {
|
||||
let top = this.cdList.filter((item) => item.cdType === 2)
|
||||
let bottom = this.cdList.filter((item) => item.cdType === 3)
|
||||
if (!top || top.length === 0) {
|
||||
this.$message({
|
||||
message: '请设置上光驱',
|
||||
type: 'error'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!bottom || bottom.length === 0) {
|
||||
this.$message({
|
||||
message: '请设置下光驱',
|
||||
type: 'error'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (top.length > 1) {
|
||||
this.$message({
|
||||
message: '上光驱只能设置一个',
|
||||
type: 'error'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (bottom.length > 1) {
|
||||
this.$message({
|
||||
message: '下光驱只能设置一个',
|
||||
type: 'error'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'setCDDevice',
|
||||
req_type: 2,
|
||||
req_info: {
|
||||
device_list: [
|
||||
{
|
||||
device_path: top[0].dev_path,
|
||||
device_pos: 2
|
||||
},
|
||||
{
|
||||
device_path: bottom[0].dev_path,
|
||||
device_pos: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
this.$message({
|
||||
message: '提交成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.cdShow = false
|
||||
})
|
||||
},
|
||||
// 刷新时间
|
||||
handleRefresh() {
|
||||
this.$store.commit('chat/setData', {
|
||||
@@ -207,7 +414,7 @@ export default {
|
||||
.form_item {
|
||||
padding: 10px 0;
|
||||
.form_title {
|
||||
border-bottom: 2px solid #E1F5E5;
|
||||
border-bottom: 2px solid #e1f5e5;
|
||||
.form_title_text {
|
||||
font-weight: 500;
|
||||
font-size: 25px;
|
||||
@@ -217,7 +424,7 @@ export default {
|
||||
.form_title_line {
|
||||
width: 100%;
|
||||
height: 6px;
|
||||
background: #98E8A6;
|
||||
background: #98e8a6;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
@@ -239,23 +446,23 @@ export default {
|
||||
width: 250px;
|
||||
height: 42px;
|
||||
cursor: pointer;
|
||||
background: rgba(0,195,37,0.12);
|
||||
background: rgba(0, 195, 37, 0.12);
|
||||
border-radius: 4px;
|
||||
border: 1px solid rgba(0,195,37,0.32);
|
||||
border: 1px solid rgba(0, 195, 37, 0.32);
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
font-size: 19px;
|
||||
color: #00C325;
|
||||
color: #00c325;
|
||||
margin: 6px;
|
||||
}
|
||||
}
|
||||
.form_input {
|
||||
width: 500px;
|
||||
height: 42px;
|
||||
background: #FFFFFF;
|
||||
background: #ffffff;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #98E8A6;
|
||||
border: 1px solid #98e8a6;
|
||||
overflow: hidden;
|
||||
::v-deep {
|
||||
.el-input-group__append {
|
||||
@@ -284,7 +491,7 @@ export default {
|
||||
height: 40px;
|
||||
border: none;
|
||||
padding: 0;
|
||||
background: #00C325;
|
||||
background: #00c325;
|
||||
border-radius: 0px 4px 4px 0px;
|
||||
}
|
||||
}
|
||||
@@ -300,8 +507,8 @@ export default {
|
||||
height: 24px;
|
||||
}
|
||||
.el-checkbox__input.is-checked .el-checkbox__inner {
|
||||
background-color: #00C325;
|
||||
border-color: #00C325;
|
||||
background-color: #00c325;
|
||||
border-color: #00c325;
|
||||
}
|
||||
.el-checkbox__inner::after {
|
||||
width: 6px;
|
||||
@@ -312,16 +519,16 @@ export default {
|
||||
font-size: 19px;
|
||||
line-height: 24px;
|
||||
}
|
||||
.el-checkbox__input.is-checked+.el-checkbox__label {
|
||||
color: #00C325;
|
||||
.el-checkbox__input.is-checked + .el-checkbox__label {
|
||||
color: #00c325;
|
||||
}
|
||||
}
|
||||
.form_select {
|
||||
width: 500px;
|
||||
height: 42px;
|
||||
background: #FFFFFF;
|
||||
background: #ffffff;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #98E8A6;
|
||||
border: 1px solid #98e8a6;
|
||||
.el-select {
|
||||
width: 100%;
|
||||
padding-left: 10px;
|
||||
@@ -350,4 +557,85 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.cd_box {
|
||||
.el-input {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
::v-deep {
|
||||
.el-input__inner {
|
||||
width: 240px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
.el-input__icon {
|
||||
font-size: 16px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
.cd_title {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #000;
|
||||
line-height: 28px;
|
||||
}
|
||||
.cd_desc {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
line-height: 24px;
|
||||
}
|
||||
.cd_list {
|
||||
padding: 32px 0;
|
||||
.cd_item {
|
||||
padding: 12px 0;
|
||||
}
|
||||
.el-button {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 80px;
|
||||
height: 40px;
|
||||
font-size: 15px;
|
||||
}
|
||||
.cd_name {
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
line-height: 24px;
|
||||
}
|
||||
.cd_r {
|
||||
gap: 24px;
|
||||
}
|
||||
}
|
||||
.cd_footer {
|
||||
gap: 24px;
|
||||
.cd_footer_btn1 {
|
||||
width: 120px;
|
||||
height: 40px;
|
||||
background: #ffffff;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #000000;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #000000;
|
||||
padding: 0;
|
||||
margin: 0 12px;
|
||||
}
|
||||
.cd_footer_btn2 {
|
||||
width: 120px;
|
||||
height: 40px;
|
||||
background: #00c325;
|
||||
border-radius: 4px;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
padding: 0;
|
||||
margin: 0 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="form_label">LogLevel</div>
|
||||
<div class="flex_box form_val">
|
||||
<div class="form_select">
|
||||
<el-select v-model="form.LogLevel" placeholder="请选择">
|
||||
<el-select v-model="form.log_level" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in levelList"
|
||||
:key="item.value"
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="form_label">AutoRetryTimes</div>
|
||||
<div class="flex_box form_val">
|
||||
<div class="form_select">
|
||||
<el-select v-model="form.AutoRetryTimes" placeholder="请选择">
|
||||
<el-select v-model="form.retry_freq" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in timesList"
|
||||
:key="item.value"
|
||||
@@ -44,7 +44,7 @@
|
||||
<div class="form_text">作业失败后重试次数,默认0为不重试</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex_box form_option">
|
||||
<!-- <div class="flex_box form_option">
|
||||
<div class="form_label">TaskDir</div>
|
||||
<div class="flex_box form_val">
|
||||
<div class="form_input">
|
||||
@@ -52,17 +52,17 @@
|
||||
</div>
|
||||
<div class="form_text">自动作业文件路径</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="flex_box form_option">
|
||||
<div class="form_label">SharedDir</div>
|
||||
<div class="form_label">CacheDir</div>
|
||||
<div class="flex_box form_val">
|
||||
<div class="form_input">
|
||||
<el-input border="none" v-model="form.SharedDir" placeholder="请输入"></el-input>
|
||||
<el-input border="none" v-model="form.cache_path" placeholder="请输入"></el-input>
|
||||
</div>
|
||||
<div class="form_text">作业缓存路径,存放作业中临时生成的内容文件、标签、合并图片、字段数据等</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex_box form_option">
|
||||
<!-- <div class="flex_box form_option">
|
||||
<div class="form_label">RejectConfig</div>
|
||||
<div class="flex_box form_val">
|
||||
<div class="form_switch">
|
||||
@@ -104,13 +104,13 @@
|
||||
<div class="form_switch">
|
||||
<el-switch active-color="#07C160" inactive-color="#aaa" v-model="form.UploadSharedDir"></el-switch>
|
||||
</div>
|
||||
<div class="form_text">启用作业缓存路径,勾选后作业内容会先拷贝到缓存路径后再拷贝到存储卡</div>
|
||||
<div class="form_text">启用作业缓存路径,勾选后作业内容会先刻录到缓存路径后再刻录到存储卡</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex_box flex_row_center footer_btns">
|
||||
<el-button type="primary" class="footer_submit" @click="workSubmit">提交</el-button>
|
||||
<el-button type="primary" class="footer_submit" @click="setSubmit">保存</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -126,63 +126,91 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
LogLevel: 'INFO',
|
||||
AutoRetryTimes: '2',
|
||||
TaskDir: 'D:\PrintTasks',
|
||||
SharedDir: 'D:\CardSoonRepo',
|
||||
RejectConfig: true,
|
||||
StopOnFailure: false,
|
||||
KeepCombinedImage: true,
|
||||
CleanTaskFile: false,
|
||||
UploadSharedDir: false,
|
||||
log_level: 1,
|
||||
retry_freq: 2,
|
||||
cache_path: '/home/test/CDFile',
|
||||
},
|
||||
levelList: [
|
||||
{
|
||||
label: 'TRACE',
|
||||
value: 'TRACE'
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: 'DEBUG',
|
||||
value: 'DEBUG'
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
label: 'INFO',
|
||||
value: 'INFO'
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
label: 'WARNING',
|
||||
value: 'WARNING'
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
label: 'ERROR',
|
||||
value: 'ERROR'
|
||||
value: 4
|
||||
},
|
||||
{
|
||||
label: 'FATAL',
|
||||
value: 'FATAL'
|
||||
value: 5
|
||||
},
|
||||
{
|
||||
label: 'OFF',
|
||||
value: 6
|
||||
}
|
||||
],
|
||||
timesList: [
|
||||
{
|
||||
label: '0',
|
||||
value: '0'
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
label: '1',
|
||||
value: '1'
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
label: '2',
|
||||
value: '2'
|
||||
value: 2
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.chat.settings': {
|
||||
handler(val) {
|
||||
this.form = {...val}
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['name', 'roles'])
|
||||
},
|
||||
methods: {
|
||||
|
||||
// 提交
|
||||
setSubmit() {
|
||||
if (this.form.cache_path === '') {
|
||||
this.$message({
|
||||
message: '请输入作业缓存路径',
|
||||
type: 'warning'
|
||||
})
|
||||
return
|
||||
}
|
||||
this.$store
|
||||
.dispatch('chat/websocketsend', {
|
||||
req_name: 'set_system_config',
|
||||
req_type: 5,
|
||||
req_info: this.form
|
||||
})
|
||||
.then(() => {
|
||||
this.$message({
|
||||
message: '保存成功',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
},
|
||||
{
|
||||
ID: '2',
|
||||
userName: '卡树测试',
|
||||
userName: '测试',
|
||||
role: 'test',
|
||||
logintime: '2024-10-05 19:06:45',
|
||||
status: 0
|
||||
|
||||
Reference in New Issue
Block a user