Commit 3ac2ee23 authored by 孙浩's avatar 孙浩

fix ESLint Problems

parent df50bfc7
......@@ -78,22 +78,22 @@
{{ scope.row.orderCode || '-' }}
</template>
</el-table-column>
<el-table-column label="lot" prop="lot" :show-overflow-tooltip="true">
<el-table-column label="lot" prop="lot" :show-overflow-tooltip="true" width="110">
<template slot-scope="scope">
{{ scope.row.lot || '-' }}
</template>
</el-table-column>
<el-table-column label="pn" prop="pn" :show-overflow-tooltip="true">
<el-table-column label="pn" prop="pn" :show-overflow-tooltip="true" width="110">
<template slot-scope="scope">
{{ scope.row.pn || '-' }}
</template>
</el-table-column>
<el-table-column label="rank" prop="rank" :show-overflow-tooltip="true">
<el-table-column label="rank" prop="rank" :show-overflow-tooltip="true" width="110">
<template slot-scope="scope">
{{ scope.row.rank || '-' }}
</template>
</el-table-column>
<el-table-column label="qty" prop="qty" :show-overflow-tooltip="true">
<el-table-column label="qty" prop="qty" :show-overflow-tooltip="true" width="110">
<template slot-scope="scope">
{{ scope.row.qty || '-' }}
</template>
......@@ -103,7 +103,7 @@
{{ scope.row.mac || '-' }}
</template>
</el-table-column>
<el-table-column label="创建人" prop="createBy" :show-overflow-tooltip="true">
<el-table-column label="创建人" prop="createBy" :show-overflow-tooltip="true" width="130">
<template slot-scope="scope">
{{ scope.row.createName || '-' }}
</template>
......
......@@ -169,8 +169,8 @@
</el-form-item>
</el-col>
<el-col :span="4" class="btn-container">
<i class="el-icon-plus" style="cursor: pointer;font-size: 16px;color: #25C7E3FF" @click="addFormItem(index)"></i>
<i v-if="index > 0" style="cursor: pointer;font-size: 16px;margin-left: 6px;color: red;" class="el-icon-minus" @click="removeFormItem(index)"></i>
<i class="el-icon-plus" style="cursor: pointer;font-size: 16px;color: #25C7E3FF" @click="addFormItem(index)" />
<i v-if="index > 0" style="cursor: pointer;font-size: 16px;margin-left: 6px;color: red;" class="el-icon-minus" @click="removeFormItem(index)" />
</el-col>
</el-row>
</el-form-item>
......@@ -191,8 +191,8 @@
:type="commonField.typeSuccess"
:icon="commonField.exportIcon"
:size="commonField.smallSize"
@click="test"
:loading="testLoading"
@click="test"
>测试</el-button>
<el-button class="cancelBtn" @click="cancel">取 消</el-button>
<el-button :loading="addLoading" class="submitBtn" type="primary" @click="submitForm">确 定</el-button>
......@@ -293,16 +293,16 @@ export default {
test(obj).then(res => {
if (res.data) {
this.testLoading = false
this.$message.success("成功")
this.$message.success('成功')
} else {
this.testLoading = false
this.$message.error("失败")
this.$message.error('失败')
}
}).catch(() => {
this.testLoading = false
})
} else {
this.$refs.form.validateField("mac")
this.$refs.form.validateField('mac')
}
},
/**
......@@ -316,14 +316,14 @@ export default {
* 1.将数组转换为map
* 2.将map转换为数组
* **/
// 校验并处理数组
let resultMap = new Map();
for (let obj of list) {
// 校验并处理数组
const resultMap = new Map()
for (const obj of list) {
if (obj.key !== '') {
resultMap.set(obj.key, obj);
resultMap.set(obj.key, obj)
}
}
let filteredArray = Array.from(resultMap.values());
const filteredArray = Array.from(resultMap.values())
return filteredArray
},
addFormItem(index) {
......@@ -450,7 +450,7 @@ export default {
this.form.params = null
} else {
// 4.校验paramsItems的值
let list = this.filterArray(this.paramsItems)
const list = this.filterArray(this.paramsItems)
this.form.params = JSON.stringify(list.reduce((obj, item) => {
obj[item.key] = item.value
return obj
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment