更新任务列表等
This commit is contained in:
@@ -164,7 +164,17 @@
|
||||
<div v-for="(item, index) in soonList" :key="index" class="flex_box wook_soon_item">
|
||||
<div class="wook_soon_label">{{ item.name }}</div>
|
||||
<div class="wook_soon_input">
|
||||
<el-input v-model="item.val" placeholder="请输入"></el-input>
|
||||
<div v-if="scope.row.type == 1">
|
||||
<input
|
||||
type="file"
|
||||
accept="image/*"
|
||||
:ref="item.name"
|
||||
:data-name="item.name" />
|
||||
</div>
|
||||
<div v-if="scope.row.type == 3 || scope.row.type == 4 || scope.row.type == 5">
|
||||
<el-input clearable :disabled="csvIsExist" v-model="item.val" placeholder="请输入"></el-input>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div @click="openFile2" v-if="item.type == 3 || item.type == 4 || item.type == 5" class="wook_soon_add">添加字段</div>
|
||||
</div>
|
||||
@@ -313,6 +323,8 @@ export default {
|
||||
upload_disk: '',
|
||||
soonImg: '',
|
||||
showList: true,
|
||||
csvIsExist: false,
|
||||
// 高级设置
|
||||
setShow: false,
|
||||
setForm: {
|
||||
priority: 2,
|
||||
@@ -682,26 +694,22 @@ export default {
|
||||
this.file_name3 = this.$refs.refFile3.files[0].name
|
||||
},
|
||||
csvLoad() {
|
||||
let that = this
|
||||
let selectedFile = this.$refs.refFile2.files[0]
|
||||
let reader = new FileReader()
|
||||
reader.readAsText(selectedFile)
|
||||
let _this = this
|
||||
reader.onload = function () {
|
||||
//let flag = true; //校验结果
|
||||
let first_line = this.result.split('\n')[0].replace('\r', '').split(',') //第一行
|
||||
let second_line = this.result.split('\n')[1].replace('\r', '').split(',') //第二行
|
||||
let i = 0
|
||||
for (let item of first_line) {
|
||||
_this.$set(_this.form, item, second_line[i])
|
||||
that.$set(that.soonform, item, second_line[i])
|
||||
i++
|
||||
}
|
||||
_this.csvIsExist = true
|
||||
that.csvIsExist = true
|
||||
}
|
||||
},
|
||||
format(percentage) {
|
||||
let mb = (this.size_form * 931.3).toFixed(0)
|
||||
return (this.size / (1024 * 1024)).toFixed(1) + 'MB / ' + mb + 'MB'
|
||||
},
|
||||
genTaskUUID() {
|
||||
var myDate = new Date()
|
||||
var dateStr =
|
||||
|
||||
Reference in New Issue
Block a user