更新优化
This commit is contained in:
@@ -180,13 +180,13 @@
|
||||
<div slot="footer" class="flex_box flex_row_between footer_box">
|
||||
<div class="flex_box footer_main">
|
||||
<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>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -292,6 +292,15 @@ export default {
|
||||
{ color: '#67C23A', percentage: 99 },
|
||||
{ color: '#F56C6C', percentage: 100 }
|
||||
],
|
||||
csvForm: {
|
||||
req_name: 'upload_file',
|
||||
req_type: 1,
|
||||
req_info: {
|
||||
uuid: '',
|
||||
file_name: 'templ.csv',
|
||||
file_text: ''
|
||||
}
|
||||
},
|
||||
// 高级设置
|
||||
setShow: false,
|
||||
setForm: {},
|
||||
@@ -384,13 +393,14 @@ export default {
|
||||
file_percent() {
|
||||
const diskSize = this.cd_types.find((item) => item.value === this.form.cd_type).size
|
||||
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
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getTemplates()
|
||||
this.form.task_uuid = this.genTaskUUID()
|
||||
this.csvForm.req_info.uuid = this.genTaskUUID()
|
||||
this.form.label = dayjs().format('YYYY-MM-DD')
|
||||
},
|
||||
methods: {
|
||||
@@ -410,15 +420,13 @@ export default {
|
||||
sizeChange(size) {
|
||||
this.totalSize = size
|
||||
},
|
||||
async upload_over() {
|
||||
|
||||
},
|
||||
async upload_over() {},
|
||||
// 保存
|
||||
workSave() {
|
||||
that.saveFlag = true
|
||||
setTimeout(() => {
|
||||
that.saveFlag = false
|
||||
}, 1000);
|
||||
}, 1000)
|
||||
},
|
||||
// 提交
|
||||
workSubmit() {
|
||||
@@ -428,7 +436,7 @@ export default {
|
||||
that.submitFlag = true
|
||||
setTimeout(() => {
|
||||
that.submitFlag = false
|
||||
}, 1000);
|
||||
}, 1000)
|
||||
for (let key in files) {
|
||||
let file = { ...files[key] }
|
||||
try {
|
||||
@@ -518,10 +526,25 @@ export default {
|
||||
}
|
||||
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
|
||||
if (that.form.json_file) that.form.has_print_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
|
||||
that.testForm.req_info = theForm
|
||||
that.$store.dispatch('chat/websocketsend', that.testForm)
|
||||
@@ -623,16 +646,6 @@ export default {
|
||||
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() {
|
||||
this.$refs.refFile.dispatchEvent(new MouseEvent('click'))
|
||||
@@ -763,22 +776,22 @@ export default {
|
||||
}
|
||||
.work_top_val {
|
||||
.el-input {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
::v-deep {
|
||||
.el-input__inner {
|
||||
width: 180px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
.el-input__icon {
|
||||
font-size: 16px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
@@ -787,7 +800,7 @@ export default {
|
||||
}
|
||||
.work_top_set {
|
||||
cursor: pointer;
|
||||
height: 36px;
|
||||
height: 40px;
|
||||
padding: 0 22px;
|
||||
background: rgba(0, 195, 37, 0.12);
|
||||
border-radius: 4px;
|
||||
@@ -819,7 +832,7 @@ export default {
|
||||
}
|
||||
.work_left_top_btn {
|
||||
cursor: pointer;
|
||||
height: 32px;
|
||||
height: 40px;
|
||||
padding: 0 22px;
|
||||
background: rgba(0, 195, 37, 0.12);
|
||||
border-radius: 4px;
|
||||
@@ -836,8 +849,8 @@ export default {
|
||||
}
|
||||
.work_left_top_input {
|
||||
.el-input {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
::v-deep {
|
||||
.el-input-group__prepend {
|
||||
@@ -847,16 +860,16 @@ export default {
|
||||
}
|
||||
.el-input__inner {
|
||||
width: 180px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
.el-input__icon {
|
||||
font-size: 16px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
@@ -873,12 +886,11 @@ export default {
|
||||
.work_files_progress {
|
||||
::v-deep {
|
||||
.el-progress-bar__outer {
|
||||
height: 24px!important;
|
||||
height: 24px !important;
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -896,23 +908,23 @@ export default {
|
||||
::v-deep {
|
||||
.el-input__inner {
|
||||
width: 300px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
.el-input__icon {
|
||||
font-size: 16px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
.work_right_top_file {
|
||||
width: 63px;
|
||||
height: 32px;
|
||||
height: 40px;
|
||||
cursor: pointer;
|
||||
background: rgba(195, 189, 0, 0.12);
|
||||
border-radius: 4px;
|
||||
@@ -920,13 +932,13 @@ export default {
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #d9b028;
|
||||
line-height: 32px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
margin: 0 22px;
|
||||
}
|
||||
.work_right_top_add {
|
||||
width: 123px;
|
||||
height: 32px;
|
||||
height: 40px;
|
||||
cursor: pointer;
|
||||
background: #d8f6ff;
|
||||
border-radius: 4px;
|
||||
@@ -934,7 +946,7 @@ export default {
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #25aed9;
|
||||
line-height: 32px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
@@ -993,21 +1005,21 @@ export default {
|
||||
}
|
||||
.wook_soon_input {
|
||||
width: 300px;
|
||||
height: 32px;
|
||||
height: 40px;
|
||||
border-radius: 4px;
|
||||
::v-deep {
|
||||
.el-input__inner {
|
||||
width: 300px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
.el-input__icon {
|
||||
font-size: 16px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
@@ -1015,7 +1027,7 @@ export default {
|
||||
}
|
||||
.wook_soon_add {
|
||||
width: 110px;
|
||||
height: 32px;
|
||||
height: 40px;
|
||||
cursor: pointer;
|
||||
background: #d8f6ff;
|
||||
border-radius: 4px;
|
||||
@@ -1056,16 +1068,16 @@ export default {
|
||||
}
|
||||
.el-input__inner {
|
||||
width: 180px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
.el-input__icon {
|
||||
font-size: 16px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
@@ -1108,7 +1120,7 @@ export default {
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #000000;
|
||||
line-height: 32px;
|
||||
line-height: 40px;
|
||||
text-align: right;
|
||||
padding-right: 12px;
|
||||
}
|
||||
@@ -1116,16 +1128,16 @@ export default {
|
||||
::v-deep {
|
||||
.el-input__inner {
|
||||
width: 180px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-size: 16px;
|
||||
color: #000;
|
||||
font-weight: 500;
|
||||
}
|
||||
.el-input__icon {
|
||||
font-size: 16px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
@@ -1161,7 +1173,7 @@ export default {
|
||||
height: 62px;
|
||||
.set_btn1 {
|
||||
width: 120px;
|
||||
height: 32px;
|
||||
height: 40px;
|
||||
background: #ffffff;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #000000;
|
||||
@@ -1173,7 +1185,7 @@ export default {
|
||||
}
|
||||
.set_btn2 {
|
||||
width: 120px;
|
||||
height: 32px;
|
||||
height: 40px;
|
||||
background: #00c325;
|
||||
border-radius: 4px;
|
||||
font-weight: 500;
|
||||
|
||||
Reference in New Issue
Block a user