fix(machineparam): 修复机台参数页面数据展示和编辑功能
、
This commit is contained in:
parent
3e7a17ace0
commit
01c4d749f1
@ -67,17 +67,32 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="标准值(*)" prop="standardValue">
|
<el-table-column label="标准值(*)" prop="standardValue">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.standardValue" placeholder="请输入"></el-input>
|
<el-input
|
||||||
|
v-model="scope.row.standardValue"
|
||||||
|
placeholder="请输入"
|
||||||
|
type="number"
|
||||||
|
@blur="handleDecimalBlur(scope.row, 'standardValue')"
|
||||||
|
></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="下限值(*)" prop="lowerLimit">
|
<el-table-column label="下限值(*)" prop="lowerLimit">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.lowerLimit" placeholder="请输入"></el-input>
|
<el-input
|
||||||
|
v-model="scope.row.lowerLimit"
|
||||||
|
placeholder="请输入"
|
||||||
|
type="number"
|
||||||
|
@blur="handleDecimalBlur(scope.row, 'lowerLimit')"
|
||||||
|
></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="上限值(*)" prop="upperLimit">
|
<el-table-column label="上限值(*)" prop="upperLimit">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-model="scope.row.upperLimit" placeholder="请输入"></el-input>
|
<el-input
|
||||||
|
v-model="scope.row.upperLimit"
|
||||||
|
placeholder="请输入"
|
||||||
|
type="number"
|
||||||
|
@blur="handleDecimalBlur(scope.row, 'upperLimit')"
|
||||||
|
></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="偏差" prop="dev">
|
<el-table-column label="偏差" prop="dev">
|
||||||
@ -409,6 +424,14 @@ export default {
|
|||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleDecimalBlur(row, field) {
|
||||||
|
if (row[field] !== undefined && row[field] !== null && row[field] !== '') {
|
||||||
|
const value = parseFloat(row[field]);
|
||||||
|
if (!isNaN(value)) {
|
||||||
|
row[field] = value.toFixed(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
handleProcChange(value) {
|
handleProcChange(value) {
|
||||||
this.dataForm.machineCd = undefined;
|
this.dataForm.machineCd = undefined;
|
||||||
if (value) {
|
if (value) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user