|
@@ -11,7 +11,6 @@
|
|
|
<i class="icon icon-table2"></i> 编辑
|
|
<i class="icon icon-table2"></i> 编辑
|
|
|
</span>
|
|
</span>
|
|
|
<span style="float: right;">
|
|
<span style="float: right;">
|
|
|
- <el-button type="primary" size="mini" @click="saveEntity">保存</el-button>
|
|
|
|
|
<router-link :to="'/lims/dataentry'">
|
|
<router-link :to="'/lims/dataentry'">
|
|
|
<el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
|
|
<el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
|
|
|
</router-link>
|
|
</router-link>
|
|
@@ -32,11 +31,13 @@
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="环境温度:">
|
|
<el-form-item label="环境温度:">
|
|
|
<el-input v-model="formData.Temperature" placeholder="请输入" style="width: 100%"></el-input>
|
|
<el-input v-model="formData.Temperature" placeholder="请输入" style="width: 100%"></el-input>
|
|
|
|
|
+ <template slot="append">℃</template>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="相对湿度:">
|
|
<el-form-item label="相对湿度:">
|
|
|
<el-input v-model="formData.RelativeHumanity" placeholder="请输入" style="width: 100%"></el-input>
|
|
<el-input v-model="formData.RelativeHumanity" placeholder="请输入" style="width: 100%"></el-input>
|
|
|
|
|
+ <template slot="append">%</template>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
@@ -81,7 +82,7 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="标准器名称:">
|
|
<el-form-item label="标准器名称:">
|
|
|
- <el-input v-model="formData.ElectrifyCheck" placeholder="请输入" style="width: 100%"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="formData.StanDevice" placeholder="请输入" style="width: 100%"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
@@ -182,33 +183,37 @@
|
|
|
<el-table :data="alerValData" border style="width: 100%" :header-cell-style="discountHeaderStyle1">
|
|
<el-table :data="alerValData" border style="width: 100%" :header-cell-style="discountHeaderStyle1">
|
|
|
<el-table-column align="center" prop="AlertFunction" label="报警功能">
|
|
<el-table-column align="center" prop="AlertFunction" label="报警功能">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-select v-model="scope.row.AlertFunction" placeholder="" size="mini">
|
|
|
|
|
|
|
+ <!-- <el-select v-model="scope.row.AlertFunction" placeholder="" size="mini">
|
|
|
<el-option v-for="item in AlertFunctionOptions" :key="item.value" :label="item.label" :value="item.value">
|
|
<el-option v-for="item in AlertFunctionOptions" :key="item.value" :label="item.label" :value="item.value">
|
|
|
</el-option>
|
|
</el-option>
|
|
|
- </el-select>
|
|
|
|
|
|
|
+ </el-select> -->
|
|
|
|
|
+ <el-checkbox-group v-model="scope.row.AlertFunc" :max="1">
|
|
|
|
|
+ <el-checkbox label="1">正常</el-checkbox>
|
|
|
|
|
+ <el-checkbox label="2">不正常</el-checkbox>
|
|
|
|
|
+ </el-checkbox-group>
|
|
|
<!-- <el-input v-model.trim="scope.row.AlertFunction" style="width: 60%" size="mini"></el-input> -->
|
|
<!-- <el-input v-model.trim="scope.row.AlertFunction" style="width: 60%" size="mini"></el-input> -->
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="实测报警值(%LEL)">
|
|
<el-table-column align="center" label="实测报警值(%LEL)">
|
|
|
<el-table-column align="center" label="" prop="Value1">
|
|
<el-table-column align="center" label="" prop="Value1">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Value1" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.Value1" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="" prop="Value2">
|
|
<el-table-column align="center" label="" prop="Value2">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Value2" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.Value2" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="" prop="Value3">
|
|
<el-table-column align="center" label="" prop="Value3">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Value3" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.Value3" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="ActionValue" align="center" label="报警动作值(%LEL)" min-width="90">
|
|
<el-table-column prop="ActionValue" align="center" label="报警动作值(%LEL)" min-width="90">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.ActionValue" style="width: 160px" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.ActionValue" style="width: 160px" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -221,34 +226,37 @@
|
|
|
<el-table :data="deviationData" border style="width: 100%">
|
|
<el-table :data="deviationData" border style="width: 100%">
|
|
|
<el-table-column align="center" prop="GasValue" label="标准气体浓度值(%LEL)" width="180">
|
|
<el-table-column align="center" prop="GasValue" label="标准气体浓度值(%LEL)" width="180">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.GasValue" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.GasValue" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="仪器示值(%LEL)" min-width="180">
|
|
<el-table-column align="center" label="仪器示值(%LEL)" min-width="180">
|
|
|
<el-table-column align="center" prop="Value1" label="1">
|
|
<el-table-column align="center" prop="Value1" label="1">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Value1" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input @blur="getDeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value1"
|
|
|
|
|
+ style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value2" label="2">
|
|
<el-table-column align="center" prop="Value2" label="2">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Value2" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input @blur="getDeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value2"
|
|
|
|
|
+ style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value3" label="3">
|
|
<el-table-column align="center" prop="Value3" label="3">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Value3" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input @blur="getDeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value3"
|
|
|
|
|
+ style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="AvgValue" label="平均值">
|
|
<el-table-column align="center" prop="AvgValue" label="平均值">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.AvgValue" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.AvgValue" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Deviation" label="示值误差(%FS)" min-width="180">
|
|
<el-table-column align="center" prop="Deviation" label="示值误差(%FS)" min-width="180">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Deviation" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.Deviation" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -261,28 +269,28 @@
|
|
|
<el-table :data="responseTimeData" border style="width: 100%">
|
|
<el-table :data="responseTimeData" border style="width: 100%">
|
|
|
<el-table-column align="center" prop="GasValue" label="标准气体浓度值(×10-6 mol/mol)" width="180">
|
|
<el-table-column align="center" prop="GasValue" label="标准气体浓度值(×10-6 mol/mol)" width="180">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.GasValue" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.GasValue" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" label="时间" min-width="180">
|
|
<el-table-column align="center" label="时间" min-width="180">
|
|
|
<el-table-column align="center" prop="Value1" label="1">
|
|
<el-table-column align="center" prop="Value1" label="1">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Value1" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.Value1" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value2" label="2">
|
|
<el-table-column align="center" prop="Value2" label="2">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Value2" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.Value2" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value3" label="3">
|
|
<el-table-column align="center" prop="Value3" label="3">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Value3" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.Value3" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Deviation" label="响应时间">
|
|
<el-table-column align="center" prop="Deviation" label="响应时间">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Deviation" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.Deviation" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -294,51 +302,57 @@
|
|
|
<!-- <el-button style="float: right;" size="mini" type="primary">添加</el-button> -->
|
|
<!-- <el-button style="float: right;" size="mini" type="primary">添加</el-button> -->
|
|
|
</div>
|
|
</div>
|
|
|
<el-table :data="RepeatData" border style="width: 100%">
|
|
<el-table :data="RepeatData" border style="width: 100%">
|
|
|
- <el-table-column align="center" prop="GasValue" label="标准气体浓度值(%LEL)" width="180">
|
|
|
|
|
|
|
+ <el-table-column align="center" prop="GasValue" label="标准气体浓度值(%LEL)" width="150">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.GasValue" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.GasValue" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="name" label="仪器示值(%LEL)" min-width="180">
|
|
<el-table-column align="center" prop="name" label="仪器示值(%LEL)" min-width="180">
|
|
|
<el-table-column align="center" prop="Value1" label="1">
|
|
<el-table-column align="center" prop="Value1" label="1">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Value1" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value1"
|
|
|
|
|
+ style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value2" label="2">
|
|
<el-table-column align="center" prop="Value2" label="2">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Value2" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value2"
|
|
|
|
|
+ style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value3" label="3">
|
|
<el-table-column align="center" prop="Value3" label="3">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Value3" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value3"
|
|
|
|
|
+ style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value4" label="4">
|
|
<el-table-column align="center" prop="Value4" label="4">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Value4" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value4"
|
|
|
|
|
+ style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value5" label="5">
|
|
<el-table-column align="center" prop="Value5" label="5">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Value5" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value5"
|
|
|
|
|
+ style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="Value6" label="6">
|
|
<el-table-column align="center" prop="Value6" label="6">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Value6" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input @blur="getRepeValueAvg(scope.row)" type="number" step="0.01" v-model.number="scope.row.Value6"
|
|
|
|
|
+ style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="center" prop="AvgValue" label="平均值">
|
|
<el-table-column align="center" prop="AvgValue" label="平均值">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.AvgValue" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.AvgValue" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" prop="RepeatValue" label="重复性(%)" min-width="180">
|
|
|
|
|
|
|
+ <el-table-column align="center" prop="RepeatValue" label="重复性(%)" width="150">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.RepeatValue" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.RepeatValue" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -353,50 +367,57 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="value0" align="center" label="0">
|
|
<el-table-column prop="value0" align="center" label="0">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.value0" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.Value0" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="value1" align="center" label="1h (10min)" min-width="80">
|
|
<el-table-column prop="value1" align="center" label="1h (10min)" min-width="80">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.Value1" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.Value1" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="value2" align="center" label="2h (20min)" min-width="80">
|
|
<el-table-column prop="value2" align="center" label="2h (20min)" min-width="80">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.value2" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.Value2" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="value3" align="center" label="3h (30min)" min-width="80">
|
|
<el-table-column prop="value3" align="center" label="3h (30min)" min-width="80">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.value3" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.Value3" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="value4" align="center" label="4h (40min)" min-width="80">
|
|
<el-table-column prop="value4" align="center" label="4h (40min)" min-width="80">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.value4" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.Value4" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="value5" align="center" label="5h (50min)" min-width="80">
|
|
<el-table-column prop="value5" align="center" label="5h (50min)" min-width="80">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.value5" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.Value5" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column prop="value6" align="center" label="6h (60min)" min-width="80">
|
|
<el-table-column prop="value6" align="center" label="6h (60min)" min-width="80">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.value6" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.Value6" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" prop="ZeroValue" label="零点漂移(%FS)" min-width="150">
|
|
|
|
|
|
|
+ <el-table-column align="center" prop="ZeroValue" label="零点漂移(%FS)" width="135">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.ZeroValue" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.ZeroValue" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" prop="ShowValue" label="量程漂移(%FS)" min-width="150">
|
|
|
|
|
|
|
+ <el-table-column align="center" prop="ShowValue" label="量程漂移(%FS)" width="135">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model.trim="scope.row.ShowValue" style="width: 100%" size="mini"></el-input>
|
|
|
|
|
|
|
+ <el-input type="number" step="0.01" v-model.number="scope.row.ShowValue" style="width: 100%" size="mini"></el-input>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
+ <template>
|
|
|
|
|
+ <div style="text-align: center; margin-top: 15px;">
|
|
|
|
|
+ <el-button type="primary" size="small" @click="saveEntity"><i class="el-icon-circle-check"></i>
|
|
|
|
|
+ 保存
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -418,11 +439,12 @@
|
|
|
return {
|
|
return {
|
|
|
serviceId: '',
|
|
serviceId: '',
|
|
|
formData: {
|
|
formData: {
|
|
|
- Id: '',
|
|
|
|
|
- EId: '',
|
|
|
|
|
- TaskBalanceId: '',
|
|
|
|
|
- DataEntryId: '',
|
|
|
|
|
|
|
+ Id: 0,
|
|
|
|
|
+ EId: 0,
|
|
|
|
|
+ TaskBalanceId: 0,
|
|
|
|
|
+ DataEntryId: 0,
|
|
|
MeterRange: '',
|
|
MeterRange: '',
|
|
|
|
|
+ DataEntryCode: '',
|
|
|
MeasurementRange: '',
|
|
MeasurementRange: '',
|
|
|
DetectBasis: '',
|
|
DetectBasis: '',
|
|
|
FaceCheck: '',
|
|
FaceCheck: '',
|
|
@@ -432,16 +454,23 @@
|
|
|
CustomerName: '',
|
|
CustomerName: '',
|
|
|
TestDepart: '',
|
|
TestDepart: '',
|
|
|
PositionCheck: '',
|
|
PositionCheck: '',
|
|
|
|
|
+ CustomerId: 0,
|
|
|
|
|
+ PositionCheckId: 0,
|
|
|
|
|
+ TestDepartId: 0,
|
|
|
Instrument1: '',
|
|
Instrument1: '',
|
|
|
Temperature: '',
|
|
Temperature: '',
|
|
|
StandardDesc: '',
|
|
StandardDesc: '',
|
|
|
|
|
+ StanDevice: '',
|
|
|
|
|
+ RelativeHumanity: '',
|
|
|
|
|
+ ManuCompany: '',
|
|
|
|
|
+ Spec: '',
|
|
|
|
|
+ FactoryNum: '',
|
|
|
|
|
+ CheckDate: new Date(),
|
|
|
Remark: '',
|
|
Remark: '',
|
|
|
- CreateUserId: '',
|
|
|
|
|
- CreateOn: '',
|
|
|
|
|
- CreateBy: '',
|
|
|
|
|
- ModifiedOn: '',
|
|
|
|
|
- ModifiedUserId: '',
|
|
|
|
|
- ModifiedBy: '',
|
|
|
|
|
|
|
+ AudibleAlarm: '',
|
|
|
|
|
+ AlarmConcentration: '',
|
|
|
|
|
+ InstrumentLevel: '',
|
|
|
|
|
+ DielecStrength: ''
|
|
|
},
|
|
},
|
|
|
//证书编号
|
|
//证书编号
|
|
|
formCertificateData: {
|
|
formCertificateData: {
|
|
@@ -450,50 +479,59 @@
|
|
|
StandardUnit: '',
|
|
StandardUnit: '',
|
|
|
StandVal: '',
|
|
StandVal: '',
|
|
|
Uncertainty: '',
|
|
Uncertainty: '',
|
|
|
- EffectDate: '',
|
|
|
|
|
|
|
+ EffectDate: new Date(),
|
|
|
|
|
+ InstrumentNo: ''
|
|
|
},
|
|
},
|
|
|
|
|
+ //certificateDataAll: [],
|
|
|
certificateData: [{
|
|
certificateData: [{
|
|
|
value: 1,
|
|
value: 1,
|
|
|
CerNum: '',
|
|
CerNum: '',
|
|
|
StandardUnit: '',
|
|
StandardUnit: '',
|
|
|
StandVal: '',
|
|
StandVal: '',
|
|
|
Uncertainty: '',
|
|
Uncertainty: '',
|
|
|
- EffectDate: '',
|
|
|
|
|
|
|
+ EffectDate: new Date(),
|
|
|
|
|
+ StanDevice: '',
|
|
|
|
|
+ InstrumentNo: ''
|
|
|
}, {
|
|
}, {
|
|
|
value: 2,
|
|
value: 2,
|
|
|
CerNum: '',
|
|
CerNum: '',
|
|
|
StandardUnit: '',
|
|
StandardUnit: '',
|
|
|
StandVal: '',
|
|
StandVal: '',
|
|
|
Uncertainty: '',
|
|
Uncertainty: '',
|
|
|
- EffectDate: '',
|
|
|
|
|
|
|
+ EffectDate: new Date(),
|
|
|
|
|
+ StanDevice: '',
|
|
|
|
|
+ InstrumentNo: ''
|
|
|
}, {
|
|
}, {
|
|
|
value: 3,
|
|
value: 3,
|
|
|
CerNum: '',
|
|
CerNum: '',
|
|
|
StandardUnit: '',
|
|
StandardUnit: '',
|
|
|
StandVal: '',
|
|
StandVal: '',
|
|
|
Uncertainty: '',
|
|
Uncertainty: '',
|
|
|
- EffectDate: '',
|
|
|
|
|
|
|
+ EffectDate: new Date(),
|
|
|
|
|
+ StanDevice: '',
|
|
|
|
|
+ InstrumentNo: ''
|
|
|
}],
|
|
}],
|
|
|
//报警误差
|
|
//报警误差
|
|
|
- alerValForm: {
|
|
|
|
|
- AlertFunction: '',
|
|
|
|
|
- Value1: '',
|
|
|
|
|
- Value2: '',
|
|
|
|
|
- Value3: '',
|
|
|
|
|
- ActionValue: ''
|
|
|
|
|
- },
|
|
|
|
|
alerValData: [{
|
|
alerValData: [{
|
|
|
- AlertFunction: '',
|
|
|
|
|
|
|
+ AlertFunc: [],
|
|
|
|
|
+ AlertFunction: [],
|
|
|
Value1: '',
|
|
Value1: '',
|
|
|
Value2: '',
|
|
Value2: '',
|
|
|
Value3: '',
|
|
Value3: '',
|
|
|
- ActionValue: ''
|
|
|
|
|
|
|
+ ActionValue: '',
|
|
|
|
|
+ SureValue: '0',
|
|
|
|
|
+ MaxValue: '0',
|
|
|
|
|
+ AllowValue: '0'
|
|
|
}, {
|
|
}, {
|
|
|
- AlertFunction: '',
|
|
|
|
|
|
|
+ AlertFunc: [],
|
|
|
|
|
+ AlertFunction: [],
|
|
|
Value1: '',
|
|
Value1: '',
|
|
|
Value2: '',
|
|
Value2: '',
|
|
|
Value: '',
|
|
Value: '',
|
|
|
- ActionValue: ''
|
|
|
|
|
|
|
+ ActionValue: '',
|
|
|
|
|
+ SureValue: '0',
|
|
|
|
|
+ MaxValue: '0',
|
|
|
|
|
+ AllowValue: '0'
|
|
|
}],
|
|
}],
|
|
|
AlertFunctionSlect: '',
|
|
AlertFunctionSlect: '',
|
|
|
AlertFunctionOptions: [{
|
|
AlertFunctionOptions: [{
|
|
@@ -504,20 +542,14 @@
|
|
|
label: '不正常'
|
|
label: '不正常'
|
|
|
}],
|
|
}],
|
|
|
//示值误差及响应时间
|
|
//示值误差及响应时间
|
|
|
- deviationForm: {
|
|
|
|
|
- GasValue: '',
|
|
|
|
|
- Value1: '',
|
|
|
|
|
- Value2: '',
|
|
|
|
|
- Value3: '',
|
|
|
|
|
- AvgValue: '',
|
|
|
|
|
- Deviation: ''
|
|
|
|
|
- },
|
|
|
|
|
deviationData: [{
|
|
deviationData: [{
|
|
|
GasValue: '',
|
|
GasValue: '',
|
|
|
Value1: '',
|
|
Value1: '',
|
|
|
Value2: '',
|
|
Value2: '',
|
|
|
Value3: '',
|
|
Value3: '',
|
|
|
AvgValue: '',
|
|
AvgValue: '',
|
|
|
|
|
+ DeviationAbs: '0',
|
|
|
|
|
+ DeviationRelative: '0',
|
|
|
Deviation: ''
|
|
Deviation: ''
|
|
|
}, {
|
|
}, {
|
|
|
GasValue: '',
|
|
GasValue: '',
|
|
@@ -525,6 +557,8 @@
|
|
|
Value2: '',
|
|
Value2: '',
|
|
|
Value3: '',
|
|
Value3: '',
|
|
|
AvgValue: '',
|
|
AvgValue: '',
|
|
|
|
|
+ DeviationAbs: '0',
|
|
|
|
|
+ DeviationRelative: '0',
|
|
|
Deviation: ''
|
|
Deviation: ''
|
|
|
}, {
|
|
}, {
|
|
|
GasValue: '',
|
|
GasValue: '',
|
|
@@ -532,6 +566,8 @@
|
|
|
Value2: '',
|
|
Value2: '',
|
|
|
Value3: '',
|
|
Value3: '',
|
|
|
AvgValue: '',
|
|
AvgValue: '',
|
|
|
|
|
+ DeviationAbs: '0',
|
|
|
|
|
+ DeviationRelative: '0',
|
|
|
Deviation: ''
|
|
Deviation: ''
|
|
|
}],
|
|
}],
|
|
|
//响应时间
|
|
//响应时间
|
|
@@ -573,18 +609,6 @@
|
|
|
RepeatValue: ''
|
|
RepeatValue: ''
|
|
|
}],
|
|
}],
|
|
|
//漂移
|
|
//漂移
|
|
|
- ShiftData: {
|
|
|
|
|
- ValueType: '',
|
|
|
|
|
- value0: '',
|
|
|
|
|
- Value1: '',
|
|
|
|
|
- Value2: '',
|
|
|
|
|
- Value3: '',
|
|
|
|
|
- Value4: '',
|
|
|
|
|
- Value5: '',
|
|
|
|
|
- Value6: '',
|
|
|
|
|
- ZeroValue: '',
|
|
|
|
|
- ShowValue: ''
|
|
|
|
|
- },
|
|
|
|
|
ShiftData: [{
|
|
ShiftData: [{
|
|
|
ValueType: '零点',
|
|
ValueType: '零点',
|
|
|
value0: '',
|
|
value0: '',
|
|
@@ -616,7 +640,7 @@
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
this.serviceId = this.$route.params.opera;
|
|
this.serviceId = this.$route.params.opera;
|
|
|
- this.getDictOptions();
|
|
|
|
|
|
|
+ //this.getDictOptions();
|
|
|
console.log(this.serviceId);
|
|
console.log(this.serviceId);
|
|
|
if (this.serviceId != 'add' && this.serviceId > 0) {
|
|
if (this.serviceId != 'add' && this.serviceId > 0) {
|
|
|
this.formData.Id = this.serviceId;
|
|
this.formData.Id = this.serviceId;
|
|
@@ -629,7 +653,24 @@
|
|
|
initDatas() {
|
|
initDatas() {
|
|
|
if (this.formData.Id) {
|
|
if (this.formData.Id) {
|
|
|
api.getEntity(this.formData.Id, this.$axios).then(res => {
|
|
api.getEntity(this.formData.Id, this.$axios).then(res => {
|
|
|
- this.formData = res.data;
|
|
|
|
|
|
|
+ console.log("------res------", res.data)
|
|
|
|
|
+ this.formData = res.data.mainitem;
|
|
|
|
|
+ this.alerValData = res.data.alvalitem;
|
|
|
|
|
+ for (var i = 0; i < this.alerValData.length; i++) {
|
|
|
|
|
+ if (this.alerValData[i].AlertFunction != "") {
|
|
|
|
|
+ this.alerValData[i].AlertFunc = this.alerValData[i].AlertFunction
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log("---------this.alerValData-----",this.alerValData)
|
|
|
|
|
+ this.certificateData = res.data.ceritem;
|
|
|
|
|
+ this.certificateDataAll = res.data.ceritem;
|
|
|
|
|
+ this.formData.StanDevice = this.certificateDataAll[0].StanDevice
|
|
|
|
|
+ this.formCertificateData = this.certificateDataAll[3]
|
|
|
|
|
+ this.deviationData = res.data.deviitem;
|
|
|
|
|
+ this.responseTimeData = res.data.responitem;
|
|
|
|
|
+ this.RepeatData = res.data.repeatitem;
|
|
|
|
|
+ this.ShiftData = res.data.shiftitem;
|
|
|
|
|
+ console.log("----------shiftdata---",this.ShiftData)
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
});
|
|
});
|
|
@@ -656,8 +697,64 @@
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ getDeValueAvg(row) {
|
|
|
|
|
+ var divisor = 0
|
|
|
|
|
+ var sum = 0
|
|
|
|
|
+ if (row.Value1 !== '' && parseInt(row.Value1) !== 0) {
|
|
|
|
|
+ divisor++
|
|
|
|
|
+ sum = sum + parseInt(row.Value1)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (row.Value2 !== '' && parseInt(row.Value2) !== 0) {
|
|
|
|
|
+ divisor++
|
|
|
|
|
+ sum = sum + parseInt(row.Value2)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (row.Value3 !== '' && parseInt(row.Value3) !== 0) {
|
|
|
|
|
+ divisor++
|
|
|
|
|
+ sum = sum + parseInt(row.Value3)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (divisor !== 0) {
|
|
|
|
|
+ row.AvgValue = (sum / divisor).toFixed(2)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ row.AvgValue = '0'
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ getRepeValueAvg(row) {
|
|
|
|
|
+ var divisor = 0
|
|
|
|
|
+ var sum = 0
|
|
|
|
|
+ if (row.Value1 !== '' && parseInt(row.Value1) !== 0) {
|
|
|
|
|
+ divisor++
|
|
|
|
|
+ sum = sum + parseInt(row.Value1)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (row.Value2 !== '' && parseInt(row.Value2) !== 0) {
|
|
|
|
|
+ divisor++
|
|
|
|
|
+ sum = sum + parseInt(row.Value2)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (row.Value3 !== '' && parseInt(row.Value3) !== 0) {
|
|
|
|
|
+ divisor++
|
|
|
|
|
+ sum = sum + parseInt(row.Value3)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (row.Value4 !== '' && parseInt(row.Value4) !== 0) {
|
|
|
|
|
+ divisor++
|
|
|
|
|
+ sum = sum + parseInt(row.Value4)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (row.Value5 !== '' && parseInt(row.Value5) !== 0) {
|
|
|
|
|
+ divisor++
|
|
|
|
|
+ sum = sum + parseInt(row.Value5)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (row.Value6 !== '' && parseInt(row.Value6) !== 0) {
|
|
|
|
|
+ divisor++
|
|
|
|
|
+ sum = sum + parseInt(row.Value6)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (divisor !== 0) {
|
|
|
|
|
+ row.AvgValue = (sum / divisor).toFixed(2)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ row.AvgValue = '0'
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
//保存信息
|
|
//保存信息
|
|
|
saveEntity() {
|
|
saveEntity() {
|
|
|
|
|
+ console.log("------this.formData.Id----", this.formData.Id)
|
|
|
this.$refs['EntityForm'].validate((valid) => {
|
|
this.$refs['EntityForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
if (!this.formData.Id) {
|
|
if (!this.formData.Id) {
|
|
@@ -671,120 +768,58 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- //添加主数据
|
|
|
|
|
|
|
+ //添加数据
|
|
|
addEntityMain() {
|
|
addEntityMain() {
|
|
|
console.log("-------this.formdata---", this.formData)
|
|
console.log("-------this.formdata---", this.formData)
|
|
|
- this.addEntityCertificate();
|
|
|
|
|
- // api.addEntity(this.formData, this.$axios).then(res => {
|
|
|
|
|
- // if (res.data.code === 0) {
|
|
|
|
|
- // //保存成功后,初始化数据,变成修改
|
|
|
|
|
- // this.formData.Id = res.data.item;
|
|
|
|
|
- // this.initDatas();
|
|
|
|
|
- // this.addEntityCertificate();
|
|
|
|
|
- // } else {
|
|
|
|
|
- // this.$message({
|
|
|
|
|
- // type: 'warning',
|
|
|
|
|
- // message: res.data.message
|
|
|
|
|
- // });
|
|
|
|
|
- // }
|
|
|
|
|
- // }).catch(err => {
|
|
|
|
|
- // console.error(err)
|
|
|
|
|
- // });
|
|
|
|
|
- },
|
|
|
|
|
- //添加证书数据
|
|
|
|
|
- addEntityCertificate() {
|
|
|
|
|
- this.formCertificateData = Object.assign(this.formCertificateData, this.certificateData)
|
|
|
|
|
- console.log("--------cer=-----",this.formCertificateData)
|
|
|
|
|
- api.addEntity(this.certificateData, this.$axios, 1).then(res => {
|
|
|
|
|
- if (res.data.code === 0) {
|
|
|
|
|
- //保存成功后,初始化数据,变成修改
|
|
|
|
|
- //this.initDatas();
|
|
|
|
|
- //this.addEntityAlertVal();
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message({
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- message: res.data.message
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }).catch(err => {
|
|
|
|
|
- console.error(err)
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- //添加报警数据
|
|
|
|
|
- addEntityAlertVal() {
|
|
|
|
|
- api.addEntity(this.alerValData, this.$axios).then(res => {
|
|
|
|
|
- if (res.data.code === 0) {
|
|
|
|
|
- //保存成功后,初始化数据,变成修改
|
|
|
|
|
- this.initDatas();
|
|
|
|
|
- this.addEntityDeviation();
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message({
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- message: res.data.message
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }).catch(err => {
|
|
|
|
|
- console.error(err)
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- //添加示值误差数据
|
|
|
|
|
- addEntityDeviation() {
|
|
|
|
|
- api.addEntity(this.deviationData, this.$axios).then(res => {
|
|
|
|
|
- if (res.data.code === 0) {
|
|
|
|
|
- //保存成功后,初始化数据,变成修改
|
|
|
|
|
- this.initDatas();
|
|
|
|
|
- this.addEntityResponseTime();
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message({
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- message: res.data.message
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- }).catch(err => {
|
|
|
|
|
- console.error(err)
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- //添加响应时间数据
|
|
|
|
|
- addEntityResponseTime() {
|
|
|
|
|
- api.addEntity(this.responseTimeData, this.$axios).then(res => {
|
|
|
|
|
- if (res.data.code === 0) {
|
|
|
|
|
- //保存成功后,初始化数据,变成修改
|
|
|
|
|
- this.initDatas();
|
|
|
|
|
- this.addEntityRepeat();
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$message({
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- message: res.data.message
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ for (var i = 0; i < this.certificateData.length; i++) {
|
|
|
|
|
+ this.certificateData[i].StanDevice = this.formData.StanDevice
|
|
|
|
|
+ }
|
|
|
|
|
+ for (var i = 0; i < this.alerValData.length; i++) {
|
|
|
|
|
+ if (this.alerValData[i].AlertFunc.length != 0) {
|
|
|
|
|
+ this.alerValData[i].AlertFunction = this.alerValData[i].AlertFunc[0]
|
|
|
}
|
|
}
|
|
|
- }).catch(err => {
|
|
|
|
|
- console.error(err)
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- //添加重复性数据
|
|
|
|
|
- addEntityRepeat() {
|
|
|
|
|
- api.addEntity(this.RepeatData, this.$axios).then(res => {
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ this.alerValData.ActionValue = parseInt(this.alerValData.ActionValue)
|
|
|
|
|
+ this.alerValData.Value1 = parseInt(this.alerValData.Value1)
|
|
|
|
|
+ this.alerValData.Value2 = parseInt(this.alerValData.Value2)
|
|
|
|
|
+ this.alerValData.Value3 = parseInt(this.alerValData.Value3)
|
|
|
|
|
+ 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, //添加证书数据
|
|
|
|
|
+ AlertValArrayList: this.alerValData, //添加报警数据
|
|
|
|
|
+ DeviationArrayList: this.deviationData, //添加示值误差数据
|
|
|
|
|
+ ResponTimeArrayList: this.responseTimeData, //添加响应时间数据
|
|
|
|
|
+ RepeatArrayList: this.RepeatData, //添加重复性数据
|
|
|
|
|
+ ShiftArrayList: this.ShiftData, //添加漂移数据
|
|
|
|
|
+ }
|
|
|
|
|
+ allform = Object.assign(allform, this.formCertificateData)
|
|
|
|
|
+ console.log("---------allform", allform)
|
|
|
|
|
+ api.addEntity(allform, this.$axios).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
|
//保存成功后,初始化数据,变成修改
|
|
//保存成功后,初始化数据,变成修改
|
|
|
|
|
+ this.formData.Id = res.data.item;
|
|
|
this.initDatas();
|
|
this.initDatas();
|
|
|
- this.addEntityShift();
|
|
|
|
|
- } else {
|
|
|
|
|
this.$message({
|
|
this.$message({
|
|
|
- type: 'warning',
|
|
|
|
|
|
|
+ type: 'success',
|
|
|
message: res.data.message
|
|
message: res.data.message
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
- }).catch(err => {
|
|
|
|
|
- console.error(err)
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- //添加漂移数据
|
|
|
|
|
- addEntityShift() {
|
|
|
|
|
- api.addEntity(this.ShiftData, this.$axios).then(res => {
|
|
|
|
|
- if (res.data.code === 0) {
|
|
|
|
|
- //保存成功后,初始化数据,变成修改
|
|
|
|
|
- this.initDatas();
|
|
|
|
|
- this.addEntityAlertVal()
|
|
|
|
|
} else {
|
|
} else {
|
|
|
this.$message({
|
|
this.$message({
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
@@ -796,8 +831,49 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+
|
|
|
updateEntity() {
|
|
updateEntity() {
|
|
|
- api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
|
|
|
|
|
|
|
+ console.log("------updatethis.formData.Id----", this.formData.Id)
|
|
|
|
|
+ for (var i = 0; i < this.certificateData.length; i++) {
|
|
|
|
|
+ this.certificateData[i].StanDevice = this.formData.StanDevice
|
|
|
|
|
+ }
|
|
|
|
|
+ for (var i = 0; i < this.alerValData.length; i++) {
|
|
|
|
|
+ if (this.alerValData[i].AlertFunc.length != 0) {
|
|
|
|
|
+ this.alerValData[i].AlertFunction = this.alerValData[i].AlertFunc[0]
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ this.alerValData.ActionValue = parseInt(this.alerValData.ActionValue)
|
|
|
|
|
+ this.alerValData.Value1 = parseInt(this.alerValData.Value1)
|
|
|
|
|
+ this.alerValData.Value2 = parseInt(this.alerValData.Value2)
|
|
|
|
|
+ this.alerValData.Value3 = parseInt(this.alerValData.Value3)
|
|
|
|
|
+ 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, //添加证书数据
|
|
|
|
|
+ AlertValArrayList: this.alerValData, //添加报警数据
|
|
|
|
|
+ DeviationArrayList: this.deviationData, //添加示值误差数据
|
|
|
|
|
+ ResponTimeArrayList: this.responseTimeData, //添加响应时间数据
|
|
|
|
|
+ RepeatArrayList: this.RepeatData, //添加重复性数据
|
|
|
|
|
+ ShiftArrayList: this.ShiftData, //添加漂移数据
|
|
|
|
|
+ }
|
|
|
|
|
+ allform = Object.assign(allform, this.formCertificateData)
|
|
|
|
|
+ api.updateEntity(this.formData.Id, allform, this.$axios).then(res => {
|
|
|
if (res.data.code === 0) {
|
|
if (res.data.code === 0) {
|
|
|
//保存成功后,初始化数据,变成修改
|
|
//保存成功后,初始化数据,变成修改
|
|
|
this.initDatas();
|
|
this.initDatas();
|