更新优化

This commit is contained in:
24kycj
2024-11-17 21:20:47 +08:00
parent 26e9c0a75b
commit 2ba2e70a2b
5 changed files with 237 additions and 152 deletions
@@ -33,13 +33,13 @@
.top_right { .top_right {
.top_right_name { .top_right_name {
font-weight: 500; font-weight: 500;
font-size: 15px; font-size: 18px;
color: #000000; color: #000000;
padding: 0 16px; padding: 0 16px;
} }
.top_right_btn { .top_right_btn {
font-weight: 500; font-weight: 500;
font-size: 15px; font-size: 18px;
color: #00C325; color: #00C325;
line-height: 50px; line-height: 50px;
padding-left: 16px; padding-left: 16px;
+73 -61
View File
@@ -180,13 +180,13 @@
<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 class="footer_input">
<el-input placeholder="请输入数量" v-model="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> </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> -->
<el-button type="primary" class="footer_submit" @click="workSubmit" :loading="submitFlag">提交</el-button> <el-button type="primary" class="footer_submit" @click="workSubmit" :loading="submitFlag">提交</el-button>
</div> </div>
</div> </div>
@@ -292,6 +292,15 @@ export default {
{ color: '#67C23A', percentage: 99 }, { color: '#67C23A', percentage: 99 },
{ color: '#F56C6C', percentage: 100 } { color: '#F56C6C', percentage: 100 }
], ],
csvForm: {
req_name: 'upload_file',
req_type: 1,
req_info: {
uuid: '',
file_name: 'templ.csv',
file_text: ''
}
},
// 高级设置 // 高级设置
setShow: false, setShow: false,
setForm: {}, setForm: {},
@@ -384,13 +393,14 @@ export default {
file_percent() { file_percent() {
const diskSize = this.cd_types.find((item) => item.value === this.form.cd_type).size const diskSize = this.cd_types.find((item) => item.value === this.form.cd_type).size
console.log(diskSize) console.log(diskSize)
let t = diskSize ? this.$accDiv(this.totalSize, diskSize)*100 : 0 let t = diskSize ? this.$accDiv(this.totalSize, diskSize) * 100 : 0
return t > 100 ? 100.1 : t return t > 100 ? 100.1 : t
}, }
}, },
mounted() { mounted() {
this.getTemplates() this.getTemplates()
this.form.task_uuid = this.genTaskUUID() this.form.task_uuid = this.genTaskUUID()
this.csvForm.req_info.uuid = this.genTaskUUID()
this.form.label = dayjs().format('YYYY-MM-DD') this.form.label = dayjs().format('YYYY-MM-DD')
}, },
methods: { methods: {
@@ -410,15 +420,13 @@ export default {
sizeChange(size) { sizeChange(size) {
this.totalSize = size this.totalSize = size
}, },
async upload_over() { async upload_over() {},
},
// 保存 // 保存
workSave() { workSave() {
that.saveFlag = true that.saveFlag = true
setTimeout(() => { setTimeout(() => {
that.saveFlag = false that.saveFlag = false
}, 1000); }, 1000)
}, },
// 提交 // 提交
workSubmit() { workSubmit() {
@@ -428,7 +436,7 @@ export default {
that.submitFlag = true that.submitFlag = true
setTimeout(() => { setTimeout(() => {
that.submitFlag = false that.submitFlag = false
}, 1000); }, 1000)
for (let key in files) { for (let key in files) {
let file = { ...files[key] } let file = { ...files[key] }
try { try {
@@ -518,10 +526,25 @@ export default {
} }
this.form.ass_task.push(task) this.form.ass_task.push(task)
} }
// csv文件处理
if (!that.form.udf_file && that.soonList.length > 0) {
const isEmpty = that.soonList.some((item) => item.val === '')
if (isEmpty) {
that.$message({
message: '可变字段不能为空',
type: 'warning'
})
return
}
let csv1 = that.soonList.map(item => item.origin_name).join(',')
let csv2 = that.soonList.map(item => item.val).join(',')
that.csvForm.req_info.file_text = csv1 + '\n' + csv2
that.$store.dispatch('chat/websocketsend', that.csvForm)
}
that.submitLoading = true that.submitLoading = true
if (that.form.json_file) that.form.has_print_task = true if (that.form.json_file) that.form.has_print_task = true
if (fileList.length) that.form.has_copy_task = true if (fileList.length) that.form.has_copy_task = true
let theForm = {...that.form} let theForm = { ...that.form }
if (!theForm.udf_file) delete theForm.udf_file if (!theForm.udf_file) delete theForm.udf_file
that.testForm.req_info = theForm that.testForm.req_info = theForm
that.$store.dispatch('chat/websocketsend', that.testForm) that.$store.dispatch('chat/websocketsend', that.testForm)
@@ -623,16 +646,6 @@ export default {
console.error(`stderr: ${stderr}`) console.error(`stderr: ${stderr}`)
}) })
}, },
getPrintName(id) {
return this.$t('index.wordSpace') + id.substr(-5)
},
getPrintName1(id) {
for (let i = 0; i < this.printerList.length; i++) {
if (this.printerList[i].PrinterID == id) {
return this.$t('index.wordSpace') + this.toChar(i)
}
}
},
// 文件上传处理 // 文件上传处理
openFile() { openFile() {
this.$refs.refFile.dispatchEvent(new MouseEvent('click')) this.$refs.refFile.dispatchEvent(new MouseEvent('click'))
@@ -763,22 +776,22 @@ export default {
} }
.work_top_val { .work_top_val {
.el-input { .el-input {
height: 32px; height: 40px;
line-height: 32px; line-height: 40px;
} }
::v-deep { ::v-deep {
.el-input__inner { .el-input__inner {
width: 180px; width: 180px;
height: 32px; height: 40px;
line-height: 32px; line-height: 40px;
font-size: 16px; font-size: 16px;
color: #000; color: #000;
font-weight: 500; font-weight: 500;
} }
.el-input__icon { .el-input__icon {
font-size: 16px; font-size: 16px;
height: 32px; height: 40px;
line-height: 32px; line-height: 40px;
font-weight: bold; font-weight: bold;
color: #000; color: #000;
} }
@@ -787,7 +800,7 @@ export default {
} }
.work_top_set { .work_top_set {
cursor: pointer; cursor: pointer;
height: 36px; height: 40px;
padding: 0 22px; padding: 0 22px;
background: rgba(0, 195, 37, 0.12); background: rgba(0, 195, 37, 0.12);
border-radius: 4px; border-radius: 4px;
@@ -819,7 +832,7 @@ export default {
} }
.work_left_top_btn { .work_left_top_btn {
cursor: pointer; cursor: pointer;
height: 32px; height: 40px;
padding: 0 22px; padding: 0 22px;
background: rgba(0, 195, 37, 0.12); background: rgba(0, 195, 37, 0.12);
border-radius: 4px; border-radius: 4px;
@@ -836,8 +849,8 @@ export default {
} }
.work_left_top_input { .work_left_top_input {
.el-input { .el-input {
height: 32px; height: 40px;
line-height: 32px; line-height: 40px;
} }
::v-deep { ::v-deep {
.el-input-group__prepend { .el-input-group__prepend {
@@ -847,16 +860,16 @@ export default {
} }
.el-input__inner { .el-input__inner {
width: 180px; width: 180px;
height: 32px; height: 40px;
line-height: 32px; line-height: 40px;
font-size: 16px; font-size: 16px;
color: #000; color: #000;
font-weight: 500; font-weight: 500;
} }
.el-input__icon { .el-input__icon {
font-size: 16px; font-size: 16px;
height: 32px; height: 40px;
line-height: 32px; line-height: 40px;
font-weight: bold; font-weight: bold;
color: #000; color: #000;
} }
@@ -873,12 +886,11 @@ export default {
.work_files_progress { .work_files_progress {
::v-deep { ::v-deep {
.el-progress-bar__outer { .el-progress-bar__outer {
height: 24px!important; height: 24px !important;
font-size: 12px; font-size: 12px;
color: #000; color: #000;
} }
} }
} }
} }
} }
@@ -896,23 +908,23 @@ export default {
::v-deep { ::v-deep {
.el-input__inner { .el-input__inner {
width: 300px; width: 300px;
height: 32px; height: 40px;
line-height: 32px; line-height: 40px;
font-size: 16px; font-size: 16px;
color: #000; color: #000;
font-weight: 500; font-weight: 500;
} }
.el-input__icon { .el-input__icon {
font-size: 16px; font-size: 16px;
height: 32px; height: 40px;
line-height: 32px; line-height: 40px;
font-weight: bold; font-weight: bold;
color: #000; color: #000;
} }
} }
.work_right_top_file { .work_right_top_file {
width: 63px; width: 63px;
height: 32px; height: 40px;
cursor: pointer; cursor: pointer;
background: rgba(195, 189, 0, 0.12); background: rgba(195, 189, 0, 0.12);
border-radius: 4px; border-radius: 4px;
@@ -920,13 +932,13 @@ export default {
font-weight: 500; font-weight: 500;
font-size: 16px; font-size: 16px;
color: #d9b028; color: #d9b028;
line-height: 32px; line-height: 40px;
text-align: center; text-align: center;
margin: 0 22px; margin: 0 22px;
} }
.work_right_top_add { .work_right_top_add {
width: 123px; width: 123px;
height: 32px; height: 40px;
cursor: pointer; cursor: pointer;
background: #d8f6ff; background: #d8f6ff;
border-radius: 4px; border-radius: 4px;
@@ -934,7 +946,7 @@ export default {
font-weight: 500; font-weight: 500;
font-size: 16px; font-size: 16px;
color: #25aed9; color: #25aed9;
line-height: 32px; line-height: 40px;
text-align: center; text-align: center;
} }
} }
@@ -993,21 +1005,21 @@ export default {
} }
.wook_soon_input { .wook_soon_input {
width: 300px; width: 300px;
height: 32px; height: 40px;
border-radius: 4px; border-radius: 4px;
::v-deep { ::v-deep {
.el-input__inner { .el-input__inner {
width: 300px; width: 300px;
height: 32px; height: 40px;
line-height: 32px; line-height: 40px;
font-size: 16px; font-size: 16px;
color: #000; color: #000;
font-weight: 500; font-weight: 500;
} }
.el-input__icon { .el-input__icon {
font-size: 16px; font-size: 16px;
height: 32px; height: 40px;
line-height: 32px; line-height: 40px;
font-weight: bold; font-weight: bold;
color: #000; color: #000;
} }
@@ -1015,7 +1027,7 @@ export default {
} }
.wook_soon_add { .wook_soon_add {
width: 110px; width: 110px;
height: 32px; height: 40px;
cursor: pointer; cursor: pointer;
background: #d8f6ff; background: #d8f6ff;
border-radius: 4px; border-radius: 4px;
@@ -1056,16 +1068,16 @@ export default {
} }
.el-input__inner { .el-input__inner {
width: 180px; width: 180px;
height: 32px; height: 40px;
line-height: 32px; line-height: 40px;
font-size: 16px; font-size: 16px;
color: #000; color: #000;
font-weight: 500; font-weight: 500;
} }
.el-input__icon { .el-input__icon {
font-size: 16px; font-size: 16px;
height: 32px; height: 40px;
line-height: 32px; line-height: 40px;
font-weight: bold; font-weight: bold;
color: #000; color: #000;
} }
@@ -1108,7 +1120,7 @@ export default {
font-weight: 500; font-weight: 500;
font-size: 16px; font-size: 16px;
color: #000000; color: #000000;
line-height: 32px; line-height: 40px;
text-align: right; text-align: right;
padding-right: 12px; padding-right: 12px;
} }
@@ -1116,16 +1128,16 @@ export default {
::v-deep { ::v-deep {
.el-input__inner { .el-input__inner {
width: 180px; width: 180px;
height: 32px; height: 40px;
line-height: 32px; line-height: 40px;
font-size: 16px; font-size: 16px;
color: #000; color: #000;
font-weight: 500; font-weight: 500;
} }
.el-input__icon { .el-input__icon {
font-size: 16px; font-size: 16px;
height: 32px; height: 40px;
line-height: 32px; line-height: 40px;
font-weight: bold; font-weight: bold;
color: #000; color: #000;
} }
@@ -1161,7 +1173,7 @@ export default {
height: 62px; height: 62px;
.set_btn1 { .set_btn1 {
width: 120px; width: 120px;
height: 32px; height: 40px;
background: #ffffff; background: #ffffff;
border-radius: 4px; border-radius: 4px;
border: 1px solid #000000; border: 1px solid #000000;
@@ -1173,7 +1185,7 @@ export default {
} }
.set_btn2 { .set_btn2 {
width: 120px; width: 120px;
height: 32px; height: 40px;
background: #00c325; background: #00c325;
border-radius: 4px; border-radius: 4px;
font-weight: 500; font-weight: 500;
+64 -27
View File
@@ -54,7 +54,7 @@ const CDStatus = {
const diskTypes = { const diskTypes = {
1: 'CD', 1: 'CD',
2: 'DVD', 2: 'DVD',
3: 'BD', 3: 'BD'
} }
const CDTypes = { const CDTypes = {
1: 'CD', 1: 'CD',
@@ -69,37 +69,37 @@ const cd_types = [
{ {
value: 1, value: 1,
label: 'CD 700MB', label: 'CD 700MB',
size: 700*1024*1024 size: 700 * 1024 * 1024
}, },
{ {
value: 2, value: 2,
label: 'DVD 4.7GB', label: 'DVD 4.7GB',
size: 4.7*1024*1024*1024 size: 4.7 * 1024 * 1024 * 1024
}, },
{ {
value: 3, value: 3,
label: 'DVD_DL 8.5GB', label: 'DVD_DL 8.5GB',
size: 8.5*1024*1024*1024 size: 8.5 * 1024 * 1024 * 1024
}, },
{ {
value: 4, value: 4,
label: 'BD 25GB', label: 'BD 25GB',
size: 25*1024*1024*1024 size: 25 * 1024 * 1024 * 1024
}, },
{ {
value: 5, value: 5,
label: 'BD_DL 50GB', label: 'BD_DL 50GB',
size: 50*1024*1024*1024 size: 50 * 1024 * 1024 * 1024
}, },
{ {
value: 6, value: 6,
label: 'BD_TL 100GB', label: 'BD_TL 100GB',
size: 100*1024*1024*1024 size: 100 * 1024 * 1024 * 1024
}, },
{ {
value: 7, value: 7,
label: 'BD_QL 128GB', label: 'BD_QL 128GB',
size: 128*1024*1024*1024 size: 128 * 1024 * 1024 * 1024
} }
] ]
@@ -116,7 +116,25 @@ const getDefaultState = () => {
CDTypes, CDTypes,
cd_types, cd_types,
// 任务列表 // 任务列表
task_list: [], task_list: [
// {
// task_uuid: '20204215',
// task_name: '复制任务',
// task_size: 100000,
// finish_freq: 2,
// total_freq: 10,
// task_status: 2,
// ass_task: [
// {
// task_size: 100000,
// cd_type: 2,
// start_time: '2024-04-01 12:00:00',
// finish_time: '2024-04-01 12:00:00',
// task_status: 2
// }
// ]
// }
],
// 打印机信息 // 打印机信息
printer_info: { printer_info: {
blue_last: 0, //蓝色墨盒遗留 blue_last: 0, //蓝色墨盒遗留
@@ -158,7 +176,7 @@ const getDefaultState = () => {
cd_list: [ cd_list: [
{ {
cd_pos: 1, // 设备位置 1:下光驱,2:上光驱 cd_pos: 1, // 设备位置 1:下光驱,2:上光驱
cd_status: 4, // 设备状态 0:无法确定光盘状态 ,1:没有光盘 , 2:光驱托盘打开, 3:光驱未准备好,4:光盘状态正常,光盘已插入 cd_status: 1, // 设备状态 0:无法确定光盘状态 ,1:没有光盘 , 2:光驱托盘打开, 3:光驱未准备好,4:光盘状态正常,光盘已插入
cd_taskid: '', // 当前任务id cd_taskid: '', // 当前任务id
dev_path: '', // 光驱路径 dev_path: '', // 光驱路径
dev_type: 2, // 光驱类型 dev_type: 2, // 光驱类型
@@ -182,7 +200,14 @@ const getDefaultState = () => {
error3: '' error3: ''
}, },
// 日志信息 // 日志信息
logList: [] logList: [
// {
// time: '2024-04-01 12:00:00',
// text: '任务开始',
// status: 'INFO'
// }
],
allLogList: []
} }
} }
@@ -244,7 +269,7 @@ const actions = {
let typeLists = cd_types let typeLists = cd_types
if (!isBD) { if (!isBD) {
types = {} types = {}
for(let key in CDTypes) { for (let key in CDTypes) {
if (parseInt(key) < 4) types[key] = CDTypes[key] if (parseInt(key) < 4) types[key] = CDTypes[key]
} }
typeLists = cd_types.slice(0, 3) typeLists = cd_types.slice(0, 3)
@@ -252,6 +277,33 @@ const actions = {
commit('setData', { name: 'CDTypes', data: types }) commit('setData', { name: 'CDTypes', data: types })
commit('setData', { name: 'cd_types', data: typeLists }) commit('setData', { name: 'cd_types', data: typeLists })
commit('setData', { name: 'cd_list', data: cds }) commit('setData', { name: 'cd_list', data: cds })
} else if (data.resp_name === 'add_log') {
let logs = data.resp_info.add_log
let loglist = []
let logLists = [...state.logList]
for (let i = 0; i < logs.length; i++) {
let texts = logs[i].split('|')
if (logLists.length > 20) logLists.splice(logLists.length - 1, 1)
loglist.unshift({
time: texts[0].replace(/\//g, "-").replace(/时/g, ':').replace(/分/g, ':').replace(/秒/g, ''),
text: texts[2],
status: texts[1]
})
}
let list = [...loglist, ...logLists]
commit('setData', { name: 'logList', data: list })
} else if (data.resp_name === 'all_log') {
let logs = data.resp_info.add_log
let loglist = []
for (let i = 0; i < logs.length; i++) {
let texts = logs[i].split('|')
loglist.unshift({
time: texts[0].replace(/\//g, "-").replace(/时/g, ':').replace(/分/g, ':').replace(/秒/g, ''),
text: texts[2],
status: texts[1]
})
}
commit('setData', { name: 'logList', data: loglist })
} else if (data.resp_name === 'printer_error') { } else if (data.resp_name === 'printer_error') {
let error = data.resp_info let error = data.resp_info
let info = { let info = {
@@ -281,21 +333,6 @@ const actions = {
setTimeout(() => { setTimeout(() => {
commit('setData', { name: 'printer_error', data: info }) commit('setData', { name: 'printer_error', data: info })
}, 100) }, 100)
} else if (data.resp_name === 'add_log') {
let logs = data.resp_info.add_log
let loglist = []
let logLists = [...state.logList]
for (let i = 0; i < logs.length; i++) {
let texts = logs[i].split('|')
if (logLists.length > 20) logLists.splice(logLists.length - 1, 1)
loglist.unshift({
time: texts[0],
text: texts[2],
status: texts[1]
})
}
let list = [...loglist, ...state.logList]
commit('setData', { name: 'logList', data: list })
} }
} else { } else {
// 未知消息 // 未知消息
+5
View File
@@ -137,4 +137,9 @@ a:hover {
/* 滚动条滑块hover状态样式 */ /* 滚动条滑块hover状态样式 */
::-webkit-scrollbar-thumb:hover { ::-webkit-scrollbar-thumb:hover {
background-color: #b5b5b5; /* 设置滑块hover状态时的背景颜色 */ background-color: #b5b5b5; /* 设置滑块hover状态时的背景颜色 */
}
.el-select-dropdown__item {
font-size: 16px;
height: 40px;
line-height: 40px;
} }
+93 -62
View File
@@ -19,11 +19,11 @@
<el-switch class="top_left_status" v-model="workStatus" active-color="#07C160" inactive-color="#aaa"> </el-switch> <el-switch class="top_left_status" v-model="workStatus" active-color="#07C160" inactive-color="#aaa"> </el-switch>
<div class="flex_box top_left_option"> <div class="flex_box top_left_option">
<div class="top_left_text">完成拷贝数:</div> <div class="top_left_text">完成拷贝数:</div>
<div class="top_left_num">9</div> <div class="top_left_num">{{ task_list.length }}</div>
</div> </div>
<div class="flex_box top_left_option"> <div class="flex_box top_left_option">
<div class="top_left_text">废弃拷贝数:</div> <div class="top_left_text">废弃拷贝数:</div>
<div class="top_left_num top_left_num1">2</div> <div class="top_left_num top_left_num1">0</div>
</div> </div>
<div class="flex_box top_left_option"> <div class="flex_box top_left_option">
<div class="top_left_text">错误:</div> <div class="top_left_text">错误:</div>
@@ -44,48 +44,56 @@
<div class="device_info_box"> <div class="device_info_box">
<div class="device_info_main" :class="{ device_info_main1: infoStatus === 1 }"> <div class="device_info_main" :class="{ device_info_main1: infoStatus === 1 }">
<div class="device_info_item"> <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="flex_box device_info_options"> <div class="flex_box device_info_options">
<div class="device_info_option"> <div class="device_info_option">
<div class="device_info_option_box"> <div class="device_info_option_box">
<img src="@/assets/images/device4.png" /> <img src="@/assets/images/device4.png" />
<div class="device_info_option_cap"> <div class="device_info_option_cap">
<div class="device_info_option_cap_box" :class="{'device_info_option_cap_box1': printer_info.strongList[1].cd_num < 30, 'device_info_option_cap_box2': printer_info.strongList[1].cd_num < 10}" :style="{height: $accDiv(printer_info.strongList[1].cd_num, 50) * 100 + '%'}"></div> <div
class="device_info_option_cap_box"
:class="{ 'device_info_option_cap_box1': printer_info.strongList[1].cd_num < 30, 'device_info_option_cap_box2': printer_info.strongList[1].cd_num < 10 }"
:style="{ height: $accDiv(printer_info.strongList[1].cd_num, 50) * 100 + '%' }"
></div>
</div> </div>
</div> </div>
<div class="flex_box flex_row_center device_info_option_b"> <div class="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> <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="runVal === 6" class="el-icon-caret-bottom"></i>
</div> </div>
</div> </div>
<div class="device_info_option"> <div class="device_info_option">
<div class="device_info_option_box"> <div class="device_info_option_box">
<img src="@/assets/images/device4.png" /> <img src="@/assets/images/device4.png" />
<div class="device_info_option_cap"> <div class="device_info_option_cap">
<div class="device_info_option_cap_box" :class="{'device_info_option_cap_box1': printer_info.strongList[2].cd_num < 30, 'device_info_option_cap_box2': printer_info.strongList[2].cd_num < 10}" :style="{height: $accDiv(printer_info.strongList[2].cd_num, 50) * 100 + '%'}"></div> <div
class="device_info_option_cap_box"
:class="{ 'device_info_option_cap_box1': printer_info.strongList[2].cd_num < 30, 'device_info_option_cap_box2': printer_info.strongList[2].cd_num < 10 }"
:style="{ height: $accDiv(printer_info.strongList[2].cd_num, 50) * 100 + '%' }"
></div>
</div> </div>
</div> </div>
<div class="flex_box flex_row_center device_info_option_b"> <div class="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> <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="runVal === 6" class="el-icon-caret-bottom"></i>
</div> </div>
</div> </div>
<div class="device_info_option"> <div class="device_info_option">
<div class="flex_box flex_row_between device_info_option_list"> <div class="flex_box flex_row_between device_info_option_list">
<div class="device_info_option_item device_info_option_blue"> <div class="device_info_option_item device_info_option_blue">
<div :style="{height: parseInt(printer_info.blue_last)+'%'}" class="device_info_option_content"></div> <div :style="{ height: parseInt(printer_info.blue_last) + '%' }" class="device_info_option_content"></div>
</div> </div>
<div class="device_info_option_item device_info_option_red"> <div class="device_info_option_item device_info_option_red">
<div :style="{height: parseInt(printer_info.red_last)+'%'}" class="device_info_option_content"></div> <div :style="{ height: parseInt(printer_info.red_last) + '%' }" class="device_info_option_content"></div>
</div> </div>
<div class="device_info_option_item device_info_option_yellow"> <div class="device_info_option_item device_info_option_yellow">
<div :style="{height: parseInt(printer_info.yellow_last)+'%'}" class="device_info_option_content"></div> <div :style="{ height: parseInt(printer_info.yellow_last) + '%' }" class="device_info_option_content"></div>
</div> </div>
</div> </div>
<div class="flex_box flex_row_between device_info_option_b"> <div class="flex_box flex_row_between device_info_option_b">
<div class="device_info_option_b_text device_info_option_b_text1">{{parseInt(printer_info.blue_last)}}%</div> <div class="device_info_option_b_text device_info_option_b_text1">{{ parseInt(printer_info.blue_last) }}%</div>
<div class="device_info_option_b_text device_info_option_b_text1">{{parseInt(printer_info.red_last)}}%</div> <div class="device_info_option_b_text device_info_option_b_text1">{{ parseInt(printer_info.red_last) }}%</div>
<div class="device_info_option_b_text device_info_option_b_text1">{{parseInt(printer_info.yellow_last)}}%</div> <div class="device_info_option_b_text device_info_option_b_text1">{{ parseInt(printer_info.yellow_last) }}%</div>
</div> </div>
</div> </div>
</div> </div>
@@ -128,13 +136,13 @@
<div class="device_right_top_img"> <div class="device_right_top_img">
<img v-if="cd_list[0].total_size" src="@/assets/images/device3.png" /> <img v-if="cd_list[0].total_size" src="@/assets/images/device3.png" />
<img v-if="!cd_list[0].total_size" src="@/assets/images/device2.png" /> <img v-if="!cd_list[0].total_size" src="@/assets/images/device2.png" />
<div class="device_right_top_img_text" :class="{'device_right_top_img_text1': cd_list[0].total_size}">{{ diskTypes[cd_list[0].dev_type] }}</div> <div class="device_right_top_img_text" :class="{ 'device_right_top_img_text1': cd_list[0].total_size }">{{ diskTypes[cd_list[0].dev_type] }}</div>
</div> </div>
<div class="device_right_top_content"> <div class="device_right_top_content">
<div class="device_right_top_title">{{ cd_list[0].dev_path || '' }}({{ $store.state.chat.CDName[cd_list[0].cd_pos] }})</div> <div class="device_right_top_title">{{ cd_list[0].dev_path || '' }}({{ $store.state.chat.CDName[cd_list[0].cd_pos] }})</div>
<template v-if="cd_list[0].total_size"> <template v-if="cd_list[0].total_size">
<div class="flex_box device_right_top_progress"> <div class="flex_box device_right_top_progress">
<div class="device_right_top_progress_box" :style="{ width: cd_list[0].cd_taskid.copy_scheduler + '%' }"></div> <div class="device_right_top_progress_box" :style="{ 'width': cd_list[0].cd_taskid.copy_scheduler + '%' }"></div>
</div> </div>
<div class="device_right_top_text">{{ $filterSize($accSub(cd_list[0].total_size, cd_list[0].use_size)) }}可用{{ $filterSize(cd_list[0].total_size) }}</div> <div class="device_right_top_text">{{ $filterSize($accSub(cd_list[0].total_size, cd_list[0].use_size)) }}可用{{ $filterSize(cd_list[0].total_size) }}</div>
</template> </template>
@@ -148,13 +156,13 @@
<div class="device_right_top_img"> <div class="device_right_top_img">
<img v-if="cd_list[1].total_size" src="@/assets/images/device3.png" /> <img v-if="cd_list[1].total_size" src="@/assets/images/device3.png" />
<img v-if="!cd_list[1].total_size" src="@/assets/images/device2.png" /> <img v-if="!cd_list[1].total_size" src="@/assets/images/device2.png" />
<div class="device_right_top_img_text" :class="{'device_right_top_img_text1': cd_list[1].total_size}">{{ diskTypes[cd_list[1].dev_type] }}</div> <div class="device_right_top_img_text" :class="{ 'device_right_top_img_text1': cd_list[1].total_size }">{{ diskTypes[cd_list[1].dev_type] }}</div>
</div> </div>
<div class="device_right_top_content"> <div class="device_right_top_content">
<div class="device_right_top_title">{{ cd_list[1].dev_path || '' }}({{ $store.state.chat.CDName[cd_list[1].cd_pos] }})</div> <div class="device_right_top_title">{{ cd_list[1].dev_path || '' }}({{ $store.state.chat.CDName[cd_list[1].cd_pos] }})</div>
<template v-if="cd_list[1].total_size"> <template v-if="cd_list[1].total_size">
<div class="flex_box device_right_top_progress"> <div class="flex_box device_right_top_progress">
<div class="device_right_top_progress_box" :style="{ width: cd_list[1].cd_taskid.copy_scheduler + '%' }"></div> <div class="device_right_top_progress_box" :style="{ 'width': cd_list[1].cd_taskid.copy_scheduler + '%' }"></div>
</div> </div>
<div class="device_right_top_text">{{ $filterSize($accSub(cd_list[1].total_size, cd_list[1].use_size)) }}可用{{ $filterSize(cd_list[1].total_size) }}</div> <div class="device_right_top_text">{{ $filterSize($accSub(cd_list[1].total_size, cd_list[1].use_size)) }}可用{{ $filterSize(cd_list[1].total_size) }}</div>
</template> </template>
@@ -172,7 +180,7 @@
</div> </div>
<div @click="showAll = !showAll" class="flex_box notice_all"> <div @click="showAll = !showAll" class="flex_box notice_all">
<img src="@/assets/images/Calendar_icon.png" /> <img src="@/assets/images/Calendar_icon.png" />
<div>{{ showAll?'最新日志':'全部日志' }}</div> <div>{{ showAll ? '最新日志' : '全部日志' }}</div>
</div> </div>
</div> </div>
<div class="notice_list"> <div class="notice_list">
@@ -186,7 +194,7 @@
</div> </div>
</template> </template>
<template v-if="showAll"> <template v-if="showAll">
<div v-for="(item, index) in logList" :key="index" :class="`flex_box flex_row_between notice_item notice_${item.status}`"> <div v-for="(item, index) in allLogList" :key="index" :class="`flex_box flex_row_between notice_item notice_${item.status}`">
<div class="notice_content"> <div class="notice_content">
<span>{{ index + 1 }}</span <span>{{ index + 1 }}</span
>[{{ item.status }}]{{ item.text }} >[{{ item.status }}]{{ item.text }}
@@ -206,11 +214,26 @@
<el-table max-height="250" class="work_table" :data="task_list" empty-text="暂无作业列表"> <el-table max-height="250" class="work_table" :data="task_list" empty-text="暂无作业列表">
<el-table-column type="expand"> <el-table-column type="expand">
<template slot-scope="scope"> <template slot-scope="scope">
<el-table max-height="250" :data="scope.row.ass_task"> <el-table :show-header="false" max-height="250" :data="scope.row.ass_task">
<el-table-column width="50" label=""></el-table-column> <el-table-column width="48" label=""></el-table-column>
<el-table-column type="index" width="80" label="序号"> <el-table-column type="index" width="80" label="序号">
<template slot-scope="child"> <template slot-scope="child">
<div>{{ scope.$index+1 }}_{{ child.$index+1 }}</div> <div>{{ scope.$index + 1 }}_{{ child.$index + 1 }}</div>
</template>
</el-table-column>
<el-table-column prop="task_uuid" label="作业ID">
<template slot-scope="child">
<div>{{ scope.row.task_uuid }}_{{ child.$index + 1 }}</div>
</template>
</el-table-column>
<el-table-column prop="task_name" label="子任务名称">
<template slot-scope="child">
<div>{{ scope.row.task_name }}_{{ child.$index + 1 }}</div>
</template>
</el-table-column>
<el-table-column label="类型">
<template slot-scope="child">
<div>{{ CDTypes[child.row.cd_type] }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="task_size" label="大小"> <el-table-column prop="task_size" label="大小">
@@ -220,6 +243,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="start_time" label="开始时间"></el-table-column> <el-table-column prop="start_time" label="开始时间"></el-table-column>
<el-table-column prop="finish_time" label="结束时间"></el-table-column> <el-table-column prop="finish_time" label="结束时间"></el-table-column>
<el-table-column label="完成"></el-table-column>
<el-table-column prop="task_status" label="状态"> <el-table-column prop="task_status" label="状态">
<template slot-scope="child"> <template slot-scope="child">
<div class="flex_box work_status_box"> <div class="flex_box work_status_box">
@@ -245,8 +269,8 @@
<div>{{ $filterSize(scope.row.task_size) }}</div> <div>{{ $filterSize(scope.row.task_size) }}</div>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="CreateTime" label="开始时间"></el-table-column> --> <el-table-column prop="start_time" label="开始时间"></el-table-column>
<!-- <el-table-column prop="FinishTime" label="结束时间"></el-table-column> --> <el-table-column prop="finish_time" label="结束时间"></el-table-column>
<el-table-column label="完成"> <el-table-column label="完成">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ scope.row.finish_freq }}/{{ scope.row.total_freq }}</div> <div>{{ scope.row.finish_freq }}/{{ scope.row.total_freq }}</div>
@@ -325,14 +349,14 @@ export default {
// 作业列表 // 作业列表
task_list: [], task_list: [],
statusList: { statusList: {
'0': '新建中', 0: '新建中',
'1': '准备中', 1: '准备中',
'2': '等待中', 2: '等待中',
'3': '正在拷贝', 3: '正在拷贝',
'4': '正在打印', 4: '正在打印',
'5': '已失败', 5: '已失败',
'6': '运行中', 6: '运行中',
'100': '已完成' 100: '已完成'
}, },
// 设备信息 // 设备信息
printer_info: {}, printer_info: {},
@@ -372,21 +396,21 @@ export default {
} else { } else {
this.runText = this.$store.state.chat.PrinterStatus[val.printer_status] this.runText = this.$store.state.chat.PrinterStatus[val.printer_status]
} }
this.printer_info = {...val} this.printer_info = { ...val }
}, },
deep: true, deep: true,
immediate: true immediate: true
}, },
'$store.state.chat.diskTypes': { '$store.state.chat.diskTypes': {
handler(val) { handler(val) {
this.diskTypes = {...val} this.diskTypes = { ...val }
}, },
deep: true, deep: true,
immediate: true immediate: true
}, },
'$store.state.chat.CDTypes': { '$store.state.chat.CDTypes': {
handler(val) { handler(val) {
this.CDTypes = {...val} this.CDTypes = { ...val }
}, },
deep: true, deep: true,
immediate: true immediate: true
@@ -404,6 +428,13 @@ export default {
}, },
deep: true, deep: true,
immediate: true immediate: true
},
'$store.state.chat.allLogList': {
handler(val) {
this.allLogList = [...val]
},
deep: true,
immediate: true
} }
}, },
computed: { computed: {
@@ -450,12 +481,12 @@ $red: #ff0000;
.top_btn1 { .top_btn1 {
cursor: pointer; cursor: pointer;
padding: 0 16px; padding: 0 16px;
height: 30px; height: 40px;
background: #00c325; background: #00c325;
border-radius: 6px; border-radius: 6px;
margin-right: 16px; margin-right: 16px;
font-weight: 500; font-weight: 500;
font-size: 15px; font-size: 18px;
color: #ffffff; color: #ffffff;
img { img {
width: 18px; width: 18px;
@@ -466,13 +497,13 @@ $red: #ff0000;
.top_btn2 { .top_btn2 {
cursor: pointer; cursor: pointer;
padding: 0 16px; padding: 0 16px;
height: 30px; height: 40px;
background: rgba(0, 195, 37, 0.12); background: rgba(0, 195, 37, 0.12);
border: 2px solid rgba(0, 195, 37, 0.32); border: 2px solid rgba(0, 195, 37, 0.32);
border-radius: 6px; border-radius: 6px;
margin-right: 16px; margin-right: 16px;
font-weight: 500; font-weight: 500;
font-size: 15px; font-size: 18px;
color: #00c325; color: #00c325;
img { img {
width: 18px; width: 18px;
@@ -482,7 +513,7 @@ $red: #ff0000;
} }
.top_left_line { .top_left_line {
width: 2px; width: 2px;
height: 30px; height: 40px;
background: #e0e0e0; background: #e0e0e0;
margin: 0 16px; margin: 0 16px;
} }
@@ -494,7 +525,7 @@ $red: #ff0000;
margin-left: 16px; margin-left: 16px;
.top_left_text { .top_left_text {
font-weight: 500; font-weight: 500;
font-size: 15px; font-size: 18px;
color: #000000; color: #000000;
text-decoration: underline; text-decoration: underline;
} }
@@ -504,7 +535,7 @@ $red: #ff0000;
background: #00c325; background: #00c325;
border-radius: 6px; border-radius: 6px;
font-weight: 500; font-weight: 500;
font-size: 15px; font-size: 18px;
color: #ffffff; color: #ffffff;
line-height: 28px; line-height: 28px;
margin-left: 12px; margin-left: 12px;
@@ -623,8 +654,8 @@ $red: #ff0000;
width: 36px; width: 36px;
height: 67px; height: 67px;
border-radius: 2px; border-radius: 2px;
background: linear-gradient( 270deg, #E1FBFE 0%, #FFFFFF 50%, #E5F9FF 100%); background: linear-gradient(270deg, #e1fbfe 0%, #ffffff 50%, #e5f9ff 100%);
border: 1px solid #B1CDD0; border: 1px solid #b1cdd0;
position: relative; position: relative;
.device_info_option_content { .device_info_option_content {
position: absolute; position: absolute;
@@ -635,24 +666,24 @@ $red: #ff0000;
} }
} }
.device_info_option_blue { .device_info_option_blue {
background: linear-gradient( 270deg, #E1FBFE 0%, #FFFFFF 50%, #E5F9FF 100%); background: linear-gradient(270deg, #e1fbfe 0%, #ffffff 50%, #e5f9ff 100%);
border: 1px solid #B1CDD0; border: 1px solid #b1cdd0;
.device_info_option_content { .device_info_option_content {
background: linear-gradient( 90deg, #279FD0 0%, #80E1F7 48%, #2FB0E0 100%); background: linear-gradient(90deg, #279fd0 0%, #80e1f7 48%, #2fb0e0 100%);
} }
} }
.device_info_option_red { .device_info_option_red {
background: linear-gradient( 270deg, #FBE5F7 0%, #FFFFFF 50%, #F6E1F1 100%); background: linear-gradient(270deg, #fbe5f7 0%, #ffffff 50%, #f6e1f1 100%);
border: 1px solid #E6BCD6; border: 1px solid #e6bcd6;
.device_info_option_content { .device_info_option_content {
background: linear-gradient( 90deg, #D02886 0%, #F56ABE 48%, #D02991 100%); background: linear-gradient(90deg, #d02886 0%, #f56abe 48%, #d02991 100%);
} }
} }
.device_info_option_yellow { .device_info_option_yellow {
background: linear-gradient( 270deg, #FEFDC5 0%, #FFFFFF 50%, #FEFDC5 100%); background: linear-gradient(270deg, #fefdc5 0%, #ffffff 50%, #fefdc5 100%);
border: 1px solid #EAECC6; border: 1px solid #eaecc6;
.device_info_option_content { .device_info_option_content {
background: linear-gradient( 90deg, #F7EA32 0%, #FEFAAA 48%, #F8E94B 100%); background: linear-gradient(90deg, #f7ea32 0%, #fefaaa 48%, #f8e94b 100%);
} }
} }
} }
@@ -793,7 +824,7 @@ $red: #ff0000;
background: #000; background: #000;
border-radius: 4px; border-radius: 4px;
padding: 4px 10px; padding: 4px 10px;
font-size: 15px; font-size: 18px;
font-weight: 500; font-weight: 500;
color: #fff; color: #fff;
text-align: center; text-align: center;
@@ -910,7 +941,7 @@ $red: #ff0000;
} }
} }
.notice_time { .notice_time {
width: 108px; width: 160px;
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
color: #000000; color: #000000;
@@ -973,7 +1004,7 @@ $red: #ff0000;
} }
.cell { .cell {
line-height: 28px; line-height: 28px;
font-size: 12px; font-size: 16px;
color: #000000; color: #000000;
} }
} }
@@ -981,11 +1012,11 @@ $red: #ff0000;
width: 80%; width: 80%;
::v-deep { ::v-deep {
.el-progress-bar__outer { .el-progress-bar__outer {
height: 16px!important; height: 16px !important;
line-height: 16px!important; line-height: 16px !important;
.el-progress-bar__innerText { .el-progress-bar__innerText {
font-size: 12px!important; font-size: 12px !important;
color: #fff!important; color: #fff !important;
} }
} }
} }