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

fix ESLint Problems

parent df50bfc7
...@@ -78,22 +78,22 @@ ...@@ -78,22 +78,22 @@
{{ scope.row.orderCode || '-' }} {{ scope.row.orderCode || '-' }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.lot || '-' }} {{ scope.row.lot || '-' }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.pn || '-' }} {{ scope.row.pn || '-' }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.rank || '-' }} {{ scope.row.rank || '-' }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.qty || '-' }} {{ scope.row.qty || '-' }}
</template> </template>
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
{{ scope.row.mac || '-' }} {{ scope.row.mac || '-' }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.createName || '-' }} {{ scope.row.createName || '-' }}
</template> </template>
......
...@@ -169,8 +169,8 @@ ...@@ -169,8 +169,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" class="btn-container"> <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 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)"></i> <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-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
...@@ -191,8 +191,8 @@ ...@@ -191,8 +191,8 @@
:type="commonField.typeSuccess" :type="commonField.typeSuccess"
:icon="commonField.exportIcon" :icon="commonField.exportIcon"
:size="commonField.smallSize" :size="commonField.smallSize"
@click="test"
:loading="testLoading" :loading="testLoading"
@click="test"
>测试</el-button> >测试</el-button>
<el-button class="cancelBtn" @click="cancel">取 消</el-button> <el-button class="cancelBtn" @click="cancel">取 消</el-button>
<el-button :loading="addLoading" class="submitBtn" type="primary" @click="submitForm">确 定</el-button> <el-button :loading="addLoading" class="submitBtn" type="primary" @click="submitForm">确 定</el-button>
...@@ -293,16 +293,16 @@ export default { ...@@ -293,16 +293,16 @@ export default {
test(obj).then(res => { test(obj).then(res => {
if (res.data) { if (res.data) {
this.testLoading = false this.testLoading = false
this.$message.success("成功") this.$message.success('成功')
} else { } else {
this.testLoading = false this.testLoading = false
this.$message.error("失败") this.$message.error('失败')
} }
}).catch(() => { }).catch(() => {
this.testLoading = false this.testLoading = false
}) })
} else { } else {
this.$refs.form.validateField("mac") this.$refs.form.validateField('mac')
} }
}, },
/** /**
...@@ -316,14 +316,14 @@ export default { ...@@ -316,14 +316,14 @@ export default {
* 1.将数组转换为map * 1.将数组转换为map
* 2.将map转换为数组 * 2.将map转换为数组
* **/ * **/
// 校验并处理数组 // 校验并处理数组
let resultMap = new Map(); const resultMap = new Map()
for (let obj of list) { for (const obj of list) {
if (obj.key !== '') { 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 return filteredArray
}, },
addFormItem(index) { addFormItem(index) {
...@@ -450,7 +450,7 @@ export default { ...@@ -450,7 +450,7 @@ export default {
this.form.params = null this.form.params = null
} else { } else {
// 4.校验paramsItems的值 // 4.校验paramsItems的值
let list = this.filterArray(this.paramsItems) const list = this.filterArray(this.paramsItems)
this.form.params = JSON.stringify(list.reduce((obj, item) => { this.form.params = JSON.stringify(list.reduce((obj, item) => {
obj[item.key] = item.value obj[item.key] = item.value
return obj 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