任务类型添加

This commit is contained in:
24kycj
2025-02-11 00:21:40 +08:00
parent 8299d2bc54
commit 3d4c6c6a69
7 changed files with 93 additions and 35 deletions
+4
View File
@@ -70,6 +70,10 @@ export default {
.el-notification__group { .el-notification__group {
width: 100%; width: 100%;
} }
.el-notification__content {
margin: 0;
line-height: 24PX;
}
.notify_btns{ .notify_btns{
display: flex; display: flex;
align-items: center; align-items: center;
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

+72 -17
View File
@@ -23,7 +23,7 @@
</div> </div>
</div> </div>
<div class="flex_box work_top_item"> <div class="flex_box work_top_item">
<div class="work_top_label">刻录类型</div> <div class="work_top_label">任务类型</div>
<div class="work_top_val"> <div class="work_top_val">
<el-select v-model="form.copy_type" placeholder="请选择"> <el-select v-model="form.copy_type" placeholder="请选择">
<el-option v-for="item in copyList" :key="item.value" :label="item.label" :value="item.value"> </el-option> <el-option v-for="item in copyList" :key="item.value" :label="item.label" :value="item.value"> </el-option>
@@ -113,6 +113,9 @@
</div> </div>
<div class="flex_box flex_col_top work_main"> <div class="flex_box flex_col_top work_main">
<div class="work_left"> <div class="work_left">
<div v-if="form.copy_type == 3 || form.copy_type == 4" class="flex_box flex_row_center work_left_no">
<img src="@/assets/images/ElBanCircle.png" />
</div>
<div class="flex_box flex_row_between work_left_top"> <div class="flex_box flex_row_between work_left_top">
<div class="flex_box"> <div class="flex_box">
<div class="work_left_top_label">内容</div> <div class="work_left_top_label">内容</div>
@@ -181,11 +184,16 @@
</div> </div>
<div slot="footer" class="flex_box flex_row_between footer_box"> <div slot="footer" class="flex_box flex_row_between footer_box">
<div class="flex_box footer_main"> <div class="flex_box footer_main">
<div class="footer_input"> <div v-if="form.copy_type !== 4" class="footer_input">
<el-input placeholder="请输入数量" v-model.number="form.task_freq"> <el-input placeholder="请输入数量" v-model.number="form.task_freq">
<template slot="prepend">数量</template> <template slot="prepend">数量</template>
</el-input> </el-input>
</div> </div>
<div v-if="form.copy_type == 4" class="footer_input footer_input1">
<el-input placeholder="请输入光盘数据恢复路径" v-model="form.archive_path">
<template slot="prepend">路径</template>
</el-input>
</div>
</div> </div>
<div class="flex_box footer_btns"> <div class="flex_box footer_btns">
<el-button type="primary" class="footer_save" @click="workSave" :loading="saveFlag">保存</el-button> <el-button type="primary" class="footer_save" @click="workSave" :loading="saveFlag">保存</el-button>
@@ -255,7 +263,9 @@ export default {
has_copy_task: false, has_copy_task: false,
has_print_task: false, has_print_task: false,
ass_task: [], ass_task: [],
task_freq: 1 task_freq: 1,
archive_path: '',
finished_check: false
}, },
testForm: { testForm: {
req_name: 'submit_task', req_name: 'submit_task',
@@ -295,14 +305,14 @@ export default {
value: 2, value: 2,
label: 'ISO文件刻录' label: 'ISO文件刻录'
}, },
// { {
// value: 3, value: 3,
// label: '复制光盘' label: '复制光盘'
// }, },
// { {
// value: 4, value: 4,
// label: '自动批量读取光盘' label: '自动批量读取光盘'
// }, },
// { // {
// value: 5, // value: 5,
// label: '自动归档任务' // label: '自动归档任务'
@@ -512,7 +522,7 @@ export default {
workSave() { workSave() {
let that = this let that = this
if (that.form.json_file === '' && that.$refs.files.filesList.length === 0) { if (that.form.json_file === '' && that.$refs.files.filesList.length === 0) {
that.$message({ that.$notify({
message: '请上传作业文件', message: '请上传作业文件',
type: 'warning' type: 'warning'
}) })
@@ -552,7 +562,7 @@ export default {
result.filePath += '.dwk'; result.filePath += '.dwk';
} }
fs.writeFileSync(result.filePath, v) fs.writeFileSync(result.filePath, v)
that.$message({ that.$notify({
message: '保存成功至'+result.filePath, message: '保存成功至'+result.filePath,
type: 'success' type: 'success'
}) })
@@ -561,8 +571,7 @@ export default {
console.log(err) console.log(err)
}) })
} else { } else {
that.$message({ that.$notify({
offset: 100,
message: '请等待计算', message: '请等待计算',
type: 'warning' type: 'warning'
}) })
@@ -590,7 +599,7 @@ export default {
} }
} }
if (that.form.json_file === '' && fileList.length === 0) { if (that.form.json_file === '' && fileList.length === 0) {
this.$message({ this.$notify({
message: '请上传作业文件', message: '请上传作业文件',
type: 'warning' type: 'warning'
}) })
@@ -674,6 +683,13 @@ export default {
} }
that.form.ass_task.push(task) that.form.ass_task.push(task)
} }
if (that.form.copy_type == 4 && !that.form.archive_path) {
this.$notify({
message: `请输入光盘数据恢复路径!`,
type: 'warning'
})
return
}
that.form.burn_speed = that.setForm.speed that.form.burn_speed = that.setForm.speed
that.form.is_finished_check = that.setForm.isCheck that.form.is_finished_check = that.setForm.isCheck
that.form.is_finished_close = that.setForm.isClose that.form.is_finished_close = that.setForm.isClose
@@ -711,12 +727,28 @@ export default {
})) }))
that.$store.dispatch('chat/websocketsend', that.testForm).then(() => { that.$store.dispatch('chat/websocketsend', that.testForm).then(() => {
setTimeout(() => { setTimeout(() => {
that.$message({ that.$notify({
message: '新建作业成功', message: '新建作业成功',
type: 'success' type: 'success'
}) })
that.submitLoading = false that.submitLoading = false
that.close() that.close()
if (that.form.copy_type == 3) {
that.$alert('请将光盘装入打开的驱动器,然后手动关闭托盘后点击确定', '温馨提示', {
confirmButtonText: '确定',
callback: () => {
}
});
}
if (that.form.copy_type == 4) {
that.$alert('请将需要读取的光盘放入右盘仓,然后点击确定', '温馨提示', {
confirmButtonText: '确定',
callback: () => {
}
});
}
}, 1500) }, 1500)
}).catch(() => { }).catch(() => {
that.submitLoading = false that.submitLoading = false
@@ -991,6 +1023,21 @@ export default {
width: 50%; width: 50%;
border-right: 1px solid #aaaaaa; border-right: 1px solid #aaaaaa;
padding: 0 16px 16px; padding: 0 16px 16px;
position: relative;
.work_left_no {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 99;
background-color: rgba(0, 0, 0, 0.4);
font-size: 50px;
cursor: pointer;
img {
width: 50px;
}
}
.work_left_top { .work_left_top {
height: 72px; height: 72px;
.work_left_top_label { .work_left_top_label {
@@ -1228,6 +1275,7 @@ export default {
height: 90px; height: 90px;
padding: 0 28px; padding: 0 28px;
.footer_main { .footer_main {
gap: 20px;
.footer_input { .footer_input {
::v-deep { ::v-deep {
.el-input-group__prepend { .el-input-group__prepend {
@@ -1252,6 +1300,13 @@ export default {
} }
} }
} }
.footer_input1 {
::v-deep {
.el-input__inner {
width: 300px;
}
}
}
} }
.footer_btns { .footer_btns {
.footer_save { .footer_save {
+1 -1
View File
@@ -355,7 +355,7 @@ const actions = {
strong_list[info.strong_list[i].strong_pos] = info.strong_list[i] strong_list[info.strong_list[i].strong_pos] = info.strong_list[i]
} }
info.strongList = strong_list info.strongList = strong_list
if (info.cover_flag) { if (info.cover_flag && info.printer_name !== 'SE3') {
commit('setData', { name: 'printer_error', data: { type: 'error', notify: '设备门盖被打开,请关闭门盖。' } }) commit('setData', { name: 'printer_error', data: { type: 'error', notify: '设备门盖被打开,请关闭门盖。' } })
} }
if (info.calibration_flag) { if (info.calibration_flag) {
+2 -2
View File
@@ -3,8 +3,8 @@ import { getToken, setToken, removeToken } from '../../utils/auth'
const setFormDefault = { const setFormDefault = {
priority: 2, priority: 2,
stage: 0, stage: 0,
speed: 0, speed: 1,
isCheck: true, isCheck: false,
isDel: true, isDel: true,
isClose: true, isClose: true,
isArrow: true, isArrow: true,
-1
View File
@@ -156,7 +156,6 @@
</div> </div>
</div> </div>
</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 <div
class="flex_box device_status" class="flex_box device_status"
:class="{ :class="{