|
|
@@ -21,12 +21,14 @@
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="编码:">
|
|
|
- <el-input v-model="formData.DataEntryCode" placeholder="请输入" style="width: 100%" :disabled="true"></el-input>
|
|
|
+ <el-input v-model="formData.DataEntryCode" placeholder="请输入" style="width: 100%" :disabled="true">
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="检定地点:">
|
|
|
- <el-input v-model="formData.PositionCheck" placeholder="请输入" style="width: 100%" :disabled="true"></el-input>
|
|
|
+ <el-input v-model="formData.PositionCheck" placeholder="请输入" style="width: 100%" :disabled="true">
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
@@ -53,7 +55,8 @@
|
|
|
</el-col>
|
|
|
<el-col :span="16">
|
|
|
<el-form-item label="送检单位:">
|
|
|
- <el-input v-model="formData.CustomerName" placeholder="请输入" style="width: 100%" :disabled="true"></el-input>
|
|
|
+ <el-input v-model="formData.CustomerName" placeholder="请输入" style="width: 100%" :disabled="true">
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
@@ -88,7 +91,12 @@
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="标准器名称:">
|
|
|
- <el-input v-model="formData.StanDevice" placeholder="请输入" style="width: 100%"></el-input>
|
|
|
+ <el-select ref="refDevice" v-model="formData.InstrumentNo" clearable placeholder="请选择"
|
|
|
+ @change="chooseCertify" style="width: 100%">
|
|
|
+ <el-option v-for="item in StanDeviceoptions" :key="item.id" :label="item.name" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <!-- <el-input v-model="formData.StanDevice" placeholder="请输入" style="width: 100%"></el-input> -->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
@@ -127,7 +135,12 @@
|
|
|
<el-form label-width="100px" ref="certificateForm" :model="formCertificateData">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="标准器名称:">
|
|
|
- <el-input v-model="formCertificateData.StanDevice" placeholder="请输入" style="width: 100%"></el-input>
|
|
|
+ <el-select ref="refDevice2" v-model="formCertificateData.InstrumentNo" clearable placeholder="请选择"
|
|
|
+ @change="chooseCertify2" style="width: 100%">
|
|
|
+ <el-option v-for="item in StanDeviceoptions2" :key="item.id" :label="item.name" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <!-- <el-input v-model="formCertificateData.StanDevice" placeholder="请输入" style="width: 100%"></el-input> -->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
@@ -147,8 +160,8 @@
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="有效期至:">
|
|
|
- <el-date-picker style="width: 100%" v-model="formCertificateData.EffectDate" type="date" format="yyyy 年 MM 月 dd 日"
|
|
|
- placeholder="请选择">
|
|
|
+ <el-date-picker style="width: 100%" v-model="formCertificateData.EffectDate" type="date"
|
|
|
+ format="yyyy 年 MM 月 dd 日" placeholder="请选择">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -194,42 +207,46 @@
|
|
|
<el-table :data="deviationData" border style="width: 100%">
|
|
|
<el-table-column align="center" prop="GasValue" label="标准气体浓度值(×10-6 mol/mol)" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.GasValue" style="width: 100%" size="mini" :disabled="true"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.GasValue" style="width: 100%" size="mini"
|
|
|
+ :disabled="true"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="仪器示值(×10-6 mol/mol)" min-width="180">
|
|
|
<el-table-column align="center" prop="Value1" label="1">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input @blur="getDeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value1"
|
|
|
+ <el-input @blur="getDeValueAvg(scope.row)" type="number" step="0.1" v-model.number="scope.row.Value1"
|
|
|
style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value2" label="2">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input @blur="getDeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value2"
|
|
|
+ <el-input @blur="getDeValueAvg(scope.row)" type="number" step="0.1" v-model.number="scope.row.Value2"
|
|
|
style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value3" label="3">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input @blur="getDeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value3"
|
|
|
+ <el-input @blur="getDeValueAvg(scope.row)" type="number" step="0.1" v-model.number="scope.row.Value3"
|
|
|
style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="AvgValue" label="平均值">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.AvgValue" style="width: 100%" size="mini" :disabled="true"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.AvgValue" style="width: 100%" size="mini"
|
|
|
+ :disabled="true"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="DeviationRelative" label="绝对误差(×10-6 mol/mol)" min-width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.DeviationRelative" style="width: 100%" size="mini"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.DeviationRelative" style="width: 100%"
|
|
|
+ size="mini" :disabled="true"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="DeviationAbs" label="相对误差 (%)" min-width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.DeviationAbs" style="width: 100%" size="mini"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.DeviationAbs" style="width: 100%" size="mini" :disabled="true">
|
|
|
+ </el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -244,28 +261,33 @@
|
|
|
<el-table :data="responseTimeData" border style="width: 100%">
|
|
|
<el-table-column align="center" prop="GasValue" label="标准气体浓度值(×10-6 mol/mol)" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.GasValue" style="width: 100%" size="mini"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.GasValue" style="width: 100%" size="mini">
|
|
|
+ </el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="时间" min-width="180">
|
|
|
<el-table-column align="center" prop="Value1" label="1">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.Value1" style="width: 100%" size="mini"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.Value1" style="width: 100%" size="mini">
|
|
|
+ </el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value2" label="2">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.Value2" style="width: 100%" size="mini"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.Value2" style="width: 100%" size="mini">
|
|
|
+ </el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value3" label="3">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.Value3" style="width: 100%" size="mini"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.Value3" style="width: 100%" size="mini">
|
|
|
+ </el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Deviation" label="响应时间">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.Deviation" style="width: 100%" size="mini"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.Deviation" style="width: 100%" size="mini">
|
|
|
+ </el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
@@ -281,55 +303,58 @@
|
|
|
<el-table :data="RepeatData" border style="width: 100%">
|
|
|
<el-table-column align="center" prop="GasValue" label="标准气体浓度值(%LEL)" width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.GasValue" style="width: 100%" size="mini"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.GasValue" style="width: 100%" size="mini" :disabled="true">
|
|
|
+ </el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="name" label="仪器示值(%LEL)" min-width="180">
|
|
|
<el-table-column align="center" prop="Value1" label="1">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value1"
|
|
|
+ <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.1" v-model.number="scope.row.Value1"
|
|
|
style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value2" label="2">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value2"
|
|
|
+ <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.1" v-model.number="scope.row.Value2"
|
|
|
style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value3" label="3">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value3"
|
|
|
+ <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.1" v-model.number="scope.row.Value3"
|
|
|
style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value4" label="4">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value4"
|
|
|
+ <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.1" v-model.number="scope.row.Value4"
|
|
|
style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value5" label="5">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value5"
|
|
|
+ <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.1" v-model.number="scope.row.Value5"
|
|
|
style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value6" label="6">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value6"
|
|
|
+ <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.1" v-model.number="scope.row.Value6"
|
|
|
style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="AvgValue" label="平均值">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.AvgValue" style="width: 100%" size="mini"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.AvgValue" style="width: 100%" size="mini" :disabled="true">
|
|
|
+ </el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="RepeatValue" label="重复性(%)" min-width="180">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.RepeatValue" style="width: 100%" size="mini"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.RepeatValue" style="width: 100%" size="mini" :disabled="true">
|
|
|
+ </el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -346,43 +371,51 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="value0" align="center" label="0">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.Value0" style="width: 100%" size="mini"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.Value0" style="width: 100%" size="mini">
|
|
|
+ </el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="value1" align="center" label="1h (15min)" min-width="90">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.Value1" style="width: 100%" size="mini"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.Value1" style="width: 100%" size="mini">
|
|
|
+ </el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="value2" align="center" label="2h (30min)" min-width="90">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.Value2" style="width: 100%" size="mini"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.Value2" style="width: 100%" size="mini">
|
|
|
+ </el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="value3" align="center" label="3h (45min)" min-width="90">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.Value3" style="width: 100%" size="mini"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.Value3" style="width: 100%" size="mini">
|
|
|
+ </el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="value4" align="center" label="4h (60min)" min-width="90">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.Value4" style="width: 100%" size="mini"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.Value4" style="width: 100%" size="mini">
|
|
|
+ </el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="ZeroValue" label="零点漂移(×10-6 mol/mol)" min-width="170">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.ZeroValue" style="width: 100%" size="mini"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.ZeroValue" style="width: 100%" size="mini">
|
|
|
+ </el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="ShowValue" label="量程漂移(%)" min-width="130">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input type="number" step="0.01" v-model.number="scope.row.ShowValue" style="width: 100%" size="mini"></el-input>
|
|
|
+ <el-input type="number" step="0.1" v-model.number="scope.row.ShowValue" style="width: 100%" size="mini">
|
|
|
+ </el-input>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<template>
|
|
|
<div style="text-align: center; margin-top: 15px;">
|
|
|
- <el-button type="primary" size="small" @click="saveEntity" :disabled="DataStatus != 0 && DataStatus != 5&& DataStatus!=3"><i class="el-icon-circle-check"></i>
|
|
|
+ <el-button type="primary" size="small" @click="saveEntity"
|
|
|
+ :disabled="DataStatus != 0 && DataStatus != 5&& DataStatus!=3"><i class="el-icon-circle-check"></i>
|
|
|
保存
|
|
|
</el-button>
|
|
|
</div>
|
|
|
@@ -418,6 +451,7 @@
|
|
|
mapGetters
|
|
|
} from 'vuex'
|
|
|
import api from '@/api/meter/reportalertorcarbon'
|
|
|
+ import instapi from '@/api/system/instrument'
|
|
|
export default {
|
|
|
computed: {
|
|
|
...mapGetters({
|
|
|
@@ -429,6 +463,9 @@
|
|
|
data() {
|
|
|
return {
|
|
|
ProoFreadShow: false,
|
|
|
+ DeviceList: [],
|
|
|
+ StanDeviceoptions: [],
|
|
|
+ StanDeviceoptions2: [],
|
|
|
acceptUsers: [],
|
|
|
serviceId: '',
|
|
|
DataStatus: '0',
|
|
|
@@ -453,7 +490,7 @@
|
|
|
MeterRange: '',
|
|
|
DataEntryCode: '',
|
|
|
MeasurementRange: '',
|
|
|
- DetectBasis: '',
|
|
|
+ DetectBasis: 'JJG 915-2008《一氧化碳检测报警器》检定规程',
|
|
|
FaceCheck: '',
|
|
|
FlagCheck: '',
|
|
|
ElectrifyCheck: '',
|
|
|
@@ -466,7 +503,7 @@
|
|
|
TestDepartId: 0,
|
|
|
Instrument1: '',
|
|
|
Temperature: '',
|
|
|
- StandardDesc: '',
|
|
|
+ StandardDesc: '一氧化碳检测报警器检定装置',
|
|
|
StanDevice: '',
|
|
|
RelativeHumanity: '',
|
|
|
ManuCompany: '',
|
|
|
@@ -557,7 +594,7 @@
|
|
|
//示值误差及响应时间
|
|
|
deviationData: [{
|
|
|
Id: 0,
|
|
|
- GasValue: '',
|
|
|
+ GasValue: 55,
|
|
|
Value1: '',
|
|
|
Value2: '',
|
|
|
Value3: '',
|
|
|
@@ -567,7 +604,7 @@
|
|
|
Deviation: '0'
|
|
|
}, {
|
|
|
Id: 0,
|
|
|
- GasValue: '',
|
|
|
+ GasValue: 302,
|
|
|
Value1: '',
|
|
|
Value2: '',
|
|
|
Value3: '',
|
|
|
@@ -577,7 +614,7 @@
|
|
|
Deviation: '0'
|
|
|
}, {
|
|
|
Id: 0,
|
|
|
- GasValue: '',
|
|
|
+ GasValue: 693,
|
|
|
Value1: '',
|
|
|
Value2: '',
|
|
|
Value3: '',
|
|
|
@@ -604,21 +641,9 @@
|
|
|
Deviation: ''
|
|
|
}],
|
|
|
//重复性
|
|
|
- RepeatForm: {
|
|
|
- Id: 0,
|
|
|
- GasValue: '',
|
|
|
- Value1: '',
|
|
|
- Value2: '',
|
|
|
- Value3: '',
|
|
|
- Value4: '',
|
|
|
- Value5: '',
|
|
|
- Value6: '',
|
|
|
- AvgValue: '',
|
|
|
- RepeatValue: ''
|
|
|
- },
|
|
|
RepeatData: [{
|
|
|
Id: 0,
|
|
|
- GasValue: '',
|
|
|
+ GasValue: 693,
|
|
|
Value1: '',
|
|
|
Value2: '',
|
|
|
Value3: '',
|
|
|
@@ -632,7 +657,7 @@
|
|
|
ShiftData: [{
|
|
|
Id: 0,
|
|
|
ValueType: '零点示值',
|
|
|
- value0: '',
|
|
|
+ Value0: '',
|
|
|
Value1: '',
|
|
|
Value2: '',
|
|
|
Value3: '',
|
|
|
@@ -670,8 +695,9 @@
|
|
|
this.formData.DataEntryId = this.queryParams.DataEntryId
|
|
|
this.formData.TaskBalanceId = this.queryParams.TaskBalanceId
|
|
|
this.formData.EId = this.queryParams.EId
|
|
|
- this.initDatas();
|
|
|
+ this.initDatas()
|
|
|
this.getUsersByRole()
|
|
|
+ this.getdevice()
|
|
|
//this.getDictOptions();
|
|
|
// if (this.serviceId != 'add' && this.serviceId > 0) {
|
|
|
// this.formData.Id = this.serviceId;
|
|
|
@@ -682,12 +708,14 @@
|
|
|
},
|
|
|
methods: {
|
|
|
initDatas() {
|
|
|
- console.log("------re3s------", this.formData)
|
|
|
+ console.log("------re3s------", this.formData)
|
|
|
if (this.formData.DataEntryId) {
|
|
|
api.getEntity(this.formData.DataEntryId, this.$axios).then(res => {
|
|
|
console.log("------res------", res.data)
|
|
|
this.formData = res.data.mainitem;
|
|
|
- if (this.formData.CheckDate == "0001-01-01T00:00:00Z"){
|
|
|
+ this.formData.DetectBasis = 'JJG 915-2008《一氧化碳检测报警器》检定规程'
|
|
|
+ this.formData.StandardDesc = '一氧化碳检测报警器检定装置'
|
|
|
+ if (this.formData.CheckDate == "0001-01-01T00:00:00Z") {
|
|
|
this.formData.CheckDate = new Date();
|
|
|
}
|
|
|
if (res.data.ceritem != null) {
|
|
|
@@ -717,8 +745,9 @@
|
|
|
this.deviationData[i].Value3 = res.data.deviitem[i].Value3;
|
|
|
this.deviationData[i].AvgValue = res.data.deviitem[i].AvgValue + "";
|
|
|
this.deviationData[i].DeviationAbs = res.data.deviitem[i].DeviationAbs;
|
|
|
- this.deviationData[i].DeviationRelative = res.data.deviitem[i].DeviationRelative;
|
|
|
- this.deviationData[i].Deviation = res.data.deviitem[i].Deviation;
|
|
|
+ this.formCertificateData.InstrumentNo = res.data.ceritem[3].StanDevice
|
|
|
+ this.formData.StanDevice = res.data.ceritem[0].StanDevice
|
|
|
+ this.formData.InstrumentNo = res.data.ceritem[0].StanDevice
|
|
|
}
|
|
|
}
|
|
|
if (res.data.responitem != null) {
|
|
|
@@ -735,16 +764,7 @@
|
|
|
}
|
|
|
if (res.data.shiftitem != null) {
|
|
|
for (var i = 0; i < res.data.shiftitem.length; i++) {
|
|
|
- this.ShiftData[i].ValueType = res.data.shiftitem[i].ValueType;
|
|
|
- this.ShiftData[i].value0 = res.data.shiftitem[i].value0;
|
|
|
- this.ShiftData[i].Value1 = res.data.shiftitem[i].Value1;
|
|
|
- this.ShiftData[i].Value2 = res.data.shiftitem[i].Value2;
|
|
|
- this.ShiftData[i].Value3 = res.data.shiftitem[i].Value3;
|
|
|
- this.ShiftData[i].Value4 = res.data.shiftitem[i].Value4;
|
|
|
- this.ShiftData[i].Value5 = res.data.shiftitem[i].Value5;
|
|
|
- this.ShiftData[i].Value6 = res.data.shiftitem[i].Value6;
|
|
|
- this.ShiftData[i].ZeroValue = res.data.shiftitem[i].ZeroValue;
|
|
|
- this.ShiftData[i].ShowValue = res.data.shiftitem[i].ShowValue;
|
|
|
+ this.ShiftData[i] = res.data.shiftitem[i]
|
|
|
}
|
|
|
}
|
|
|
}).catch(err => {
|
|
|
@@ -752,6 +772,83 @@
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ getdevice() {
|
|
|
+ let _this = this
|
|
|
+ _this.$axios.get('/instrument/initlistdata', {})
|
|
|
+ .then(function (response) {
|
|
|
+ console.log("jkkfddf", response.data.items)
|
|
|
+ _this.DeviceList = response.data.items
|
|
|
+ console.log("-_this._this.DeviceList------", _this.DeviceList)
|
|
|
+ if (!_this.DeviceList) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ for (var i = 0; i < _this.DeviceList.length; i++) {
|
|
|
+ let devicelist = _this.DeviceList[i]
|
|
|
+ instapi.getList(_this.DeviceList[i].Id, "", _this.$axios).then(res => {
|
|
|
+ if (res.data.currentItemCount === 1) {
|
|
|
+ _this.StanDeviceoptions2.push({
|
|
|
+ id: devicelist.Id,
|
|
|
+ name: devicelist.Name,
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ _this.StanDeviceoptions.push({
|
|
|
+ id: devicelist.Id,
|
|
|
+ name: devicelist.Name,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(function (error) {
|
|
|
+ console.log(error)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ chooseCertify2(value) {
|
|
|
+ let _this = this
|
|
|
+ let obj = {};
|
|
|
+ obj = this.StanDeviceoptions2.find((item) => {
|
|
|
+ return item.id === value;
|
|
|
+ });
|
|
|
+ this.formCertificateData.StanDevice = obj.name
|
|
|
+ this.formCertificateData.InstrumentNo = value
|
|
|
+ let instrumentno = value
|
|
|
+ //访问接口
|
|
|
+ instapi.getList(instrumentno, "", this.$axios).then(res => {
|
|
|
+ this.certificateDataform = res.data.items
|
|
|
+ this.formCertificateData.CerNum = this.certificateDataform[0].CerNum
|
|
|
+ this.formCertificateData.Uncertainty = this.certificateDataform[0].Uncertainty
|
|
|
+ this.formCertificateData.StandVal = this.certificateDataform[0].StandVal
|
|
|
+ this.formCertificateData.EffectDate = this.certificateDataform[0].EffectDate
|
|
|
+
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ chooseCertify(value) {
|
|
|
+ let obj = {};
|
|
|
+ obj = this.StanDeviceoptions.find((item) => {
|
|
|
+ return item.id === value;
|
|
|
+ });
|
|
|
+ this.formData.StanDevice = obj.name
|
|
|
+ this.formData.InstrumentNo = value
|
|
|
+ console.log(obj.name);
|
|
|
+ let _this = this
|
|
|
+ _this.InstrumentNo = value
|
|
|
+ //访问接口
|
|
|
+ instapi.getList(_this.InstrumentNo, "", this.$axios).then(res => {
|
|
|
+ this.certificateDataform = res.data.items
|
|
|
+ for (var i = 0; i < this.certificateDataform.length; i++) {
|
|
|
+ this.certificateData[i].CerNum = this.certificateDataform[i].CerNum
|
|
|
+ this.certificateData[i].Uncertainty = this.certificateDataform[i].Uncertainty
|
|
|
+ this.certificateData[i].StandVal = this.certificateDataform[i].StandVal
|
|
|
+ this.certificateData[i].EffectDate = this.certificateDataform[i].EffectDate
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
// 获取校核人列表
|
|
|
getUsersByRole() {
|
|
|
// request
|
|
|
@@ -803,10 +900,15 @@
|
|
|
sum = sum + parseInt(row.Value3)
|
|
|
}
|
|
|
if (divisor !== 0) {
|
|
|
- row.AvgValue = (sum / divisor).toFixed(2)
|
|
|
+ row.AvgValue = (sum / divisor).toFixed(1)
|
|
|
} else {
|
|
|
row.AvgValue = '0'
|
|
|
}
|
|
|
+ if (row.AvgValue !== '' && parseInt(row.AvgValue) !== 0) {
|
|
|
+ row.DeviationAbs = Number((row.AvgValue - row.GasValue).toFixed(1))
|
|
|
+ } else {
|
|
|
+ row.DeviationAbs = 0
|
|
|
+ }
|
|
|
},
|
|
|
getRepeValueAvg(row) {
|
|
|
var divisor = 0
|
|
|
@@ -836,13 +938,32 @@
|
|
|
sum = sum + parseInt(row.Value6)
|
|
|
}
|
|
|
if (divisor !== 0) {
|
|
|
- row.AvgValue = (sum / divisor).toFixed(2)
|
|
|
+ row.AvgValue = (sum / divisor).toFixed(1)
|
|
|
} else {
|
|
|
row.AvgValue = '0'
|
|
|
}
|
|
|
+ if (row.AvgValue !== '' && parseInt(row.AvgValue) !== 0 &&
|
|
|
+ row.Value1 !== '' && parseInt(row.Value1) !== 0 &&
|
|
|
+ row.Value2 !== '' && parseInt(row.Value2) !== 0 &&
|
|
|
+ row.Value3 !== '' && parseInt(row.Value3) !== 0 &&
|
|
|
+ row.Value4 !== '' && parseInt(row.Value4) !== 0 &&
|
|
|
+ row.Value5 !== '' && parseInt(row.Value5) !== 0 &&
|
|
|
+ row.Value6 !== '' && parseInt(row.Value6) !== 0) {
|
|
|
+ var v1 = (row.AvgValue - row.Value1).toFixed(1)
|
|
|
+ var v2 = (row.AvgValue - row.Value2).toFixed(1)
|
|
|
+ var v3 = (row.AvgValue - row.Value3).toFixed(1)
|
|
|
+ var v4 = (row.AvgValue - row.Value4).toFixed(1)
|
|
|
+ var v5 = (row.AvgValue - row.Value5).toFixed(1)
|
|
|
+ var v6 = (row.AvgValue - row.Value6).toFixed(1)
|
|
|
+ var sumsq = v1 * v1 + v2 * v2 + v3 * v3 + v4 * v4 + v5 * v5 + v6 * v6
|
|
|
+ var sqthen = Math.sqrt(sumsq / 5)
|
|
|
+ row.RepeatValue = Number((sqthen / row.AvgValue * 100).toFixed(1))
|
|
|
+ } else {
|
|
|
+ row.RepeatValue = 0
|
|
|
+ }
|
|
|
},
|
|
|
setProoFreadShow() {
|
|
|
- this.ProoFreadShow = true
|
|
|
+ this.ProoFreadShow = true
|
|
|
},
|
|
|
// 提交校核
|
|
|
makesure() {
|
|
|
@@ -860,7 +981,7 @@
|
|
|
},
|
|
|
// 添加运行记录
|
|
|
addRunRecord() {
|
|
|
- this.$axios.post('/limsZuhq/addRunRecord/' + this.formData.DataEntryId,).then(res => {
|
|
|
+ this.$axios.post('/limsZuhq/addRunRecord/' + this.formData.DataEntryId, ).then(res => {
|
|
|
|
|
|
}).catch(error => {
|
|
|
console.log(error)
|
|
|
@@ -913,28 +1034,9 @@
|
|
|
addEntityMain() {
|
|
|
console.log("-------this.formdata---", this.formData)
|
|
|
for (var i = 0; i < this.certificateData.length; i++) {
|
|
|
+ this.certificateData[i].InstrumentNo = this.formData.InstrumentNo
|
|
|
this.certificateData[i].StanDevice = this.formData.StanDevice
|
|
|
}
|
|
|
- this.deviationData.AvgValue = this.deviationData.AvgValue+""
|
|
|
- this.RepeatData.AvgValue = this.RepeatData.AvgValue + ""
|
|
|
- // this.deviationData.GasValue = parseInt(this.deviationData.GasValue)
|
|
|
- // this.deviationData.DeviationAbs = parseInt(this.deviationData.DeviationAbs)
|
|
|
- // this.deviationData.DeviationRelative = parseInt(this.deviationData.DeviationRelative)
|
|
|
- // this.responseTimeData.GasValue = parseInt(this.responseTimeData.GasValue)
|
|
|
- // this.responseTimeData.Value1 = parseInt(this.responseTimeData.Value1)
|
|
|
- // this.responseTimeData.Value2 = parseInt(this.responseTimeData.Value2)
|
|
|
- // this.responseTimeData.Value3 = parseInt(this.responseTimeData.Value3)
|
|
|
- // this.responseTimeData.Deviation = parseInt(this.responseTimeData.Deviation)
|
|
|
- // this.RepeatData.GasValue = parseInt(this.RepeatData.GasValue)
|
|
|
- // this.RepeatData.RepeatValue = parseInt(this.RepeatData.RepeatValue)
|
|
|
- // this.ShiftData.Value1 = parseInt(this.ShiftData.Value1)
|
|
|
- // this.ShiftData.Value2 = parseInt(this.ShiftData.Value2)
|
|
|
- // this.ShiftData.Value3 = parseInt(this.ShiftData.Value3)
|
|
|
- // this.ShiftData.Value4 = parseInt(this.ShiftData.Value4)
|
|
|
- // this.ShiftData.Value5 = parseInt(this.ShiftData.Value5)
|
|
|
- // this.ShiftData.Value6 = parseInt(this.ShiftData.Value6)
|
|
|
- // this.ShiftData.ZeroValue = parseInt(this.ShiftData.ZeroValue)
|
|
|
- // this.ShiftData.ShowValue = parseInt(this.ShiftData.ShowValue)
|
|
|
let allform = {
|
|
|
BenMainform: this.formData,
|
|
|
CertiArrayList: this.certificateData, //添加证书数据
|
|
|
@@ -969,25 +1071,9 @@
|
|
|
updateEntity() {
|
|
|
console.log("------updatethis.formData.Id----", this.formData.Id)
|
|
|
for (var i = 0; i < this.certificateData.length; i++) {
|
|
|
+ this.certificateData[i].InstrumentNo = this.formData.InstrumentNo
|
|
|
this.certificateData[i].StanDevice = this.formData.StanDevice
|
|
|
}
|
|
|
- // this.deviationData.GasValue = parseInt(this.deviationData.GasValue)
|
|
|
- // this.deviationData.Deviation = parseInt(this.deviationData.Deviation)
|
|
|
- // this.responseTimeData.GasValue = parseInt(this.responseTimeData.GasValue)
|
|
|
- // this.responseTimeData.Value1 = parseInt(this.responseTimeData.Value1)
|
|
|
- // this.responseTimeData.Value2 = parseInt(this.responseTimeData.Value2)
|
|
|
- // this.responseTimeData.Value3 = parseInt(this.responseTimeData.Value3)
|
|
|
- // this.responseTimeData.Deviation = parseInt(this.responseTimeData.Deviation)
|
|
|
- // this.RepeatData.GasValue = parseInt(this.RepeatData.GasValue)
|
|
|
- // this.RepeatData.RepeatValue = parseInt(this.RepeatData.RepeatValue)
|
|
|
- // this.ShiftData.Value1 = parseInt(this.ShiftData.Value1)
|
|
|
- // this.ShiftData.Value2 = parseInt(this.ShiftData.Value2)
|
|
|
- // this.ShiftData.Value3 = parseInt(this.ShiftData.Value3)
|
|
|
- // this.ShiftData.Value4 = parseInt(this.ShiftData.Value4)
|
|
|
- // this.ShiftData.Value5 = parseInt(this.ShiftData.Value5)
|
|
|
- // this.ShiftData.Value6 = parseInt(this.ShiftData.Value6)
|
|
|
- // this.ShiftData.ZeroValue = parseInt(this.ShiftData.ZeroValue)
|
|
|
- // this.ShiftData.ShowValue = parseInt(this.ShiftData.ShowValue)
|
|
|
let allform = {
|
|
|
BenMainform: this.formData,
|
|
|
CertiArrayList: this.certificateData, //添加证书数据
|
|
|
@@ -997,6 +1083,7 @@
|
|
|
ShiftArrayList: this.ShiftData, //添加漂移数据
|
|
|
}
|
|
|
allform = Object.assign(allform, this.formCertificateData)
|
|
|
+ console.log("-----allform-----",allform)
|
|
|
api.updateEntity(this.formData.DataEntryId, allform, this.$axios).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
|
//保存成功后,初始化数据,变成修改
|