优化bug
This commit is contained in:
@@ -164,7 +164,7 @@
|
||||
<div class="wook_soon_label">{{ item.name }}</div>
|
||||
<div class="wook_soon_input">
|
||||
<div v-if="item.type == 1">
|
||||
<input type="file" accept="image/*" :ref="item.name" :data-name="item.name" />
|
||||
<input type="file" accept="image/*" :ref="item.origin_name" :data-name="item.origin_name" />
|
||||
</div>
|
||||
<div v-if="item.type == 3 || item.type == 4 || item.type == 5">
|
||||
<el-input clearable :disabled="csvIsExist" v-model="item.val" placeholder="请输入"></el-input>
|
||||
@@ -416,13 +416,16 @@ export default {
|
||||
...mapGetters(['name', 'roles']),
|
||||
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
|
||||
return t > 100 ? 100.1 : t
|
||||
let t = diskSize ? parseFloat(this.$accDiv(this.totalSize, diskSize)) * 100 : 0
|
||||
return t > 100 ? 100 : t
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
let workForm = localStorage.getItem('workForm')
|
||||
if (workForm) {
|
||||
this.form.cd_type = workForm.cd_type
|
||||
this.form.copy_type = workForm.copy_type
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 进度条处理
|
||||
@@ -547,10 +550,15 @@ export default {
|
||||
task.path_file.push(fileList[i].path)
|
||||
task.task_size += fileList[i].size
|
||||
}
|
||||
this.form.ass_task.push(task)
|
||||
that.form.ass_task.push(task)
|
||||
}
|
||||
// csv文件处理
|
||||
if (!that.form.udf_file && that.soonList.length > 0) {
|
||||
that.soonList.forEach((item) => {
|
||||
if (item.type == 1&&that.$refs[item.origin_name][0].files[0]) {
|
||||
item.val = that.$refs[item.origin_name][0].files[0].path
|
||||
}
|
||||
})
|
||||
const isEmpty = that.soonList.some((item) => item.val === '')
|
||||
if (isEmpty) {
|
||||
that.$message({
|
||||
@@ -574,6 +582,11 @@ export default {
|
||||
let theForm = { ...that.form }
|
||||
if (!theForm.udf_file) delete theForm.udf_file
|
||||
that.testForm.req_info = theForm
|
||||
// 保存默认设置
|
||||
localStorage.setItem('workForm', {
|
||||
cd_type: that.form.cd_type,
|
||||
copy_type: that.form.copy_type
|
||||
})
|
||||
that.$store.dispatch('chat/websocketsend', that.testForm).then(() => {
|
||||
setTimeout(() => {
|
||||
that.$message({
|
||||
|
||||
Reference in New Issue
Block a user