From 648d11b8ea7df744c189dfc9f19202ff62a26345 Mon Sep 17 00:00:00 2001
From: guoshipeng <3194674006@qq.com>
Date: Thu, 03 Aug 2023 11:38:35 +0800
Subject: [PATCH] 修改批量补偿
---
src/components/device/calibration.vue | 414 ++++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 297 insertions(+), 117 deletions(-)
diff --git a/src/components/device/calibration.vue b/src/components/device/calibration.vue
index bdd1f77..ab2ddbe 100644
--- a/src/components/device/calibration.vue
+++ b/src/components/device/calibration.vue
@@ -1,242 +1,422 @@
<template>
<div>
- <a-modal width="60%" title="���������������" destroyOnClose :visible="wFlag" @cancel="handleCancel" @ok="handleOk">
+ <a-modal
+ width="60%"
+ title="���������������"
+ destroyOnClose
+ :visible="wFlag"
+ @cancel="handleCancel"
+ @ok="handleOk"
+ >
<!---->
- <a-form style="margin-top: 8px;">
+ <a-form style="margin-top: 8px">
<a-form-item>
<a-collapse accordion @change="turnState($event)">
- <a-collapse-panel v-for="(item, key) in dataSensors" :key="item.id" :header="'���������'+item.name">
- <span v slot="extra"
- style="position: absolute;left: 26%; width:10%; text-align: center;">������������{{ item.lower }}</span>
- <span v slot="extra"
- style="position: absolute;left: 50%; width:10%; text-align: center;">������������{{ item.upper }}</span>
- <span v slot="extra" style="position: absolute;left: 75%; width:10%; text-align: center;">���������{{
- item.unit
- }}</span>
- <a-button icon="plus" type="primary" style="margin-left: 25px;" @click="addCalib">
+ <a-collapse-panel
+ v-for="(item, key) in dataSensors"
+ :key="item.id"
+ :header="'���������' + item.name"
+ >
+ <span
+ v
+ slot="extra"
+ style="
+ position: absolute;
+ left: 26%;
+ width: 10%;
+ text-align: center;
+ "
+ >������������{{ item.lower }}</span
+ >
+ <span
+ v
+ slot="extra"
+ style="
+ position: absolute;
+ left: 50%;
+ width: 10%;
+ text-align: center;
+ "
+ >������������{{ item.upper }}</span
+ >
+ <span
+ v
+ slot="extra"
+ style="
+ position: absolute;
+ left: 75%;
+ width: 10%;
+ text-align: center;
+ "
+ >���������{{ item.unit }}</span
+ >
+ <a-button
+ icon="plus"
+ type="primary"
+ style="margin-left: 25px"
+ @click="addCalib"
+ >
���������������
</a-button>
<a-table
- :columns="columns"
- :dataSource="dataSource"
- @change="handleTableChange"
- :pagination="pagination"
+ :columns="columns"
+ :dataSource="dataSource"
+ @change="handleTableChange"
+ :pagination="pagination"
/>
</a-collapse-panel>
</a-collapse>
</a-form-item>
<a-form-item style="">
- <a-pagination style="margin-right: 0" :default-current="1" :pageSize='size' :total="total"
- @change="turnPage"/>
+ <a-pagination
+ style="margin-right: 0"
+ :default-current="1"
+ :pageSize="size"
+ :total="total"
+ @change="turnPage"
+ />
</a-form-item>
</a-form>
</a-modal>
- <a-modal title="������-���������" destroyOnClose :visible="addFlag" @ok="handleAddlOk" @cancel="handleAddCancel">
+ <a-modal
+ title="������-���������"
+ destroyOnClose
+ :visible="addFlag"
+ @ok="handleAddlOk"
+ @cancel="handleAddCancel"
+ >
<!---->
- <a-form-model style="margin-top: 8px"
- :rules="caliRules"
- :model="addData"
- ref="addCaliForm">
- <a-form-model-item :labelCol="{ span: 5 }" :wrapperCol="{ span: 15 }" label="������������" prop="startTime">
- <a-time-picker :allow-clear="false" format="HH:mm" v-model="addData.startTime" @change="turnStartTime"
+ <a-form-model
+ style="margin-top: 8px"
+ :rules="caliRules"
+ :model="addData"
+ ref="addCaliForm"
+ >
+ <a-form-model-item
+ :labelCol="{ span: 5 }"
+ :wrapperCol="{ span: 15 }"
+ label="������������"
+ prop="startTime"
+ >
+ <a-time-picker
+ :allow-clear="false"
+ format="HH:mm"
+ v-model="addData.startTime"
+ @change="turnStartTime"
/>
</a-form-model-item>
- <a-form-model-item :labelCol="{ span: 5 }" :wrapperCol="{ span: 15 }" label="������������" prop="endTime">
- <a-time-picker :allow-clear="false" format="HH:mm" v-model="addData.endTime" @change="turnEndTime"/>
+ <a-form-model-item
+ :labelCol="{ span: 5 }"
+ :wrapperCol="{ span: 15 }"
+ label="������������"
+ prop="endTime"
+ >
+ <a-time-picker
+ :allow-clear="false"
+ format="HH:mm"
+ v-model="addData.endTime"
+ @change="turnEndTime"
+ />
</a-form-model-item>
- <a-form-model-item v-if="this.sensorCode === 'a40001'" :labelCol="{ span: 5 }" :wrapperCol="{ span: 15 }" label="������������">
+ <a-form-model-item
+ v-if="this.sensorCode === 'a40001'"
+ :labelCol="{ span: 5 }"
+ :wrapperCol="{ span: 15 }"
+ label="������������"
+ >
<a-input-group compact>
- <a-input style="width: 30%" read-only value="������������"/>
+ <a-input style="width: 30%" read-only value="������������" />
<a-select
- v-model="addData.formula1"
- style="width: 30%;"
- placeholder="���������"
+ v-model="addData.formula1"
+ style="width: 30%"
+ placeholder="���������"
>
- <a-select-option :value="item.key" v-for="(item, key) in selectSymbol">
+ <a-select-option
+ :value="item.key"
+ v-for="(item, key) in selectSymbol"
+ >
{{ item.value }}
</a-select-option>
</a-select>
<a-input
- style="width: 40%;margin-top: 1px"
- placeholder=""
- v-model="addData.val1"
+ style="width: 40%; margin-top: 1px"
+ placeholder=""
+ v-model="addData.val1"
>
- <a-icon slot="addonAfter" type="arrow-right" @click="gFormula"/>
+ <a-icon slot="addonAfter" type="arrow-right" @click="gFormula" />
</a-input>
</a-input-group>
</a-form-model-item>
- <a-form-model-item v-else-if="this.sensorCode === 'a01011'" :labelCol="{ span: 5 }" :wrapperCol="{ span: 15 }" label="������������">
+ <a-form-model-item
+ v-else-if="this.sensorCode === 'a01011'"
+ :labelCol="{ span: 5 }"
+ :wrapperCol="{ span: 15 }"
+ label="������������"
+ >
<a-input-group compact>
- <a-input style="width: 30%" read-only value="������������"/>
- <a-select style="width: 30%" placeholder="���������" v-model="addData.formula2">
- <a-select-option :value="item.key" v-for="(item, key) in selectSymbol">
+ <a-input style="width: 30%" read-only value="������������" />
+ <a-select
+ style="width: 30%"
+ placeholder="���������"
+ v-model="addData.formula2"
+ >
+ <a-select-option
+ :value="item.key"
+ v-for="(item, key) in selectSymbol"
+ >
{{ item.value }}
</a-select-option>
</a-select>
- <a-input
- style="width: 40%;margin-top: 1px"
- v-model="addData.val2"
- >
- <a-icon slot="addonAfter" type="arrow-right" @click="gFormula"/>
+ <a-input style="width: 40%; margin-top: 1px" v-model="addData.val2">
+ <a-icon slot="addonAfter" type="arrow-right" @click="gFormula" />
</a-input>
</a-input-group>
</a-form-model-item>
- <a-form-model-item v-else :labelCol="{ span: 5 }" :wrapperCol="{ span: 15 }" label="������������">
+ <a-form-model-item
+ v-else
+ :labelCol="{ span: 5 }"
+ :wrapperCol="{ span: 15 }"
+ label="������������"
+ >
<a-input-group compact>
<a-select
- style="width: 30%"
- defaultValue='AQI���'
- v-model="addData.type1"
+ style="width: 30%"
+ defaultValue="AQI���"
+ v-model="addData.type1"
>
- <a-select-option :value="item.key" :key="key" v-for="(item, key) in selectType">
+ <a-select-option
+ :value="item.key"
+ :key="key"
+ v-for="(item, key) in selectType"
+ >
{{ item.value }}
</a-select-option>
</a-select>
<a-select
- v-model="addData.formula1"
- style="width: 30%;"
- placeholder="���������"
+ v-model="addData.formula1"
+ style="width: 30%"
+ placeholder="���������"
>
- <a-select-option :value="item.key" v-for="(item, key) in selectSymbol">
+ <a-select-option
+ :value="item.key"
+ v-for="(item, key) in selectSymbol"
+ >
{{ item.value }}
</a-select-option>
</a-select>
<a-input
- style="width: 40%;margin-top: 1px"
- placeholder=""
- v-model="addData.val1"
+ style="width: 40%; margin-top: 1px"
+ placeholder=""
+ v-model="addData.val1"
>
- <a-icon slot="addonAfter" type="plus"/>
+ <a-icon slot="addonAfter" type="plus" />
</a-input>
</a-input-group>
<a-input-group compact>
- <a-input style="width: 30%" read-only value="���������"/>
- <a-select style="width: 30%" placeholder="���������" v-model="addData.formula2">
- <a-select-option :value="item.key" v-for="(item, key) in selectSymbol">
+ <a-input style="width: 30%" read-only value="���������" />
+ <a-select
+ style="width: 30%"
+ placeholder="���������"
+ v-model="addData.formula2"
+ >
+ <a-select-option
+ :value="item.key"
+ v-for="(item, key) in selectSymbol"
+ >
{{ item.value }}
</a-select-option>
</a-select>
- <a-input
- style="width: 40%;margin-top: 1px"
- v-model="addData.val2"
- >
- <a-icon slot="addonAfter" type="arrow-right" @click="gFormula"/>
+ <a-input style="width: 40%; margin-top: 1px" v-model="addData.val2">
+ <a-icon slot="addonAfter" type="arrow-right" @click="gFormula" />
</a-input>
</a-input-group>
</a-form-model-item>
- <a-form-model-item :labelCol="{ span: 5 }" :wrapperCol="{ span: 15 }" label="������" prop="cel">
+ <a-form-model-item
+ :labelCol="{ span: 5 }"
+ :wrapperCol="{ span: 15 }"
+ label="������"
+ prop="cel"
+ >
<a-input type="string" read-only v-model="addData.cel">
- <a-icon slot="addonAfter" type="close" @click="clearCel"/>
+ <a-icon slot="addonAfter" type="close" @click="clearCel" />
</a-input>
</a-form-model-item>
</a-form-model>
</a-modal>
- <a-modal title="������-���������" destroyOnClose :visible="editFlag" @ok="handleEditlOk" @cancel="handleEditCancel">
+ <a-modal
+ title="������-���������"
+ destroyOnClose
+ :visible="editFlag"
+ @ok="handleEditlOk"
+ @cancel="handleEditCancel"
+ >
<!---->
- <a-form-model style="margin-top: 8px"
- :rules="caliRules"
- :model="editData"
- ref="editCaliForm">
- <a-form-model-item :labelCol="{ span: 5 }" :wrapperCol="{ span: 15 }" label="������������" prop="startTime">
- <a-time-picker format="HH:mm" v-model="editData.startTime" @change="turnStartTime"
+ <a-form-model
+ style="margin-top: 8px"
+ :rules="caliRules"
+ :model="editData"
+ ref="editCaliForm"
+ >
+ <a-form-model-item
+ :labelCol="{ span: 5 }"
+ :wrapperCol="{ span: 15 }"
+ label="������������"
+ prop="startTime"
+ >
+ <a-time-picker
+ format="HH:mm"
+ v-model="editData.startTime"
+ @change="turnStartTime"
/>
</a-form-model-item>
- <a-form-model-item :labelCol="{ span: 5 }" :wrapperCol="{ span: 15 }" label="������������" prop="endTime">
- <a-time-picker format="HH:mm" v-model="editData.endTime" @change="turnEndTime"/>
+ <a-form-model-item
+ :labelCol="{ span: 5 }"
+ :wrapperCol="{ span: 15 }"
+ label="������������"
+ prop="endTime"
+ >
+ <a-time-picker
+ format="HH:mm"
+ v-model="editData.endTime"
+ @change="turnEndTime"
+ />
</a-form-model-item>
- <a-form-model-item v-if="this.sensorCode === 'a40001'" :labelCol="{ span: 5 }" :wrapperCol="{ span: 15 }" label="������������">
+ <a-form-model-item
+ v-if="this.sensorCode === 'a40001'"
+ :labelCol="{ span: 5 }"
+ :wrapperCol="{ span: 15 }"
+ label="������������"
+ >
<a-input-group compact>
- <a-input style="width: 30%" read-only value="������������"/>
+ <a-input style="width: 30%" read-only value="������������" />
<a-select
- v-model="editData.formula1"
- style="width: 30%;"
- placeholder="���������"
+ v-model="editData.formula1"
+ style="width: 30%"
+ placeholder="���������"
>
- <a-select-option :value="item.key" v-for="(item, key) in selectSymbol">
+ <a-select-option
+ :value="item.key"
+ v-for="(item, key) in selectSymbol"
+ >
{{ item.value }}
</a-select-option>
</a-select>
<a-input
- style="width: 40%;margin-top: 1px"
- placeholder=""
- v-model="editData.val1"
+ style="width: 40%; margin-top: 1px"
+ placeholder=""
+ v-model="editData.val1"
>
- <a-icon slot="addonAfter" type="arrow-right" @click="gFormula"/>
+ <a-icon slot="addonAfter" type="arrow-right" @click="gFormula" />
</a-input>
</a-input-group>
</a-form-model-item>
- <a-form-model-item v-else-if="this.sensorCode === 'a01011'" :labelCol="{ span: 5 }" :wrapperCol="{ span: 15 }" label="������������">
+ <a-form-model-item
+ v-else-if="this.sensorCode === 'a01011'"
+ :labelCol="{ span: 5 }"
+ :wrapperCol="{ span: 15 }"
+ label="������������"
+ >
<a-input-group compact>
- <a-input style="width: 30%" read-only value="������������"/>
- <a-select style="width: 30%" placeholder="���������" v-model="editData.formula1">
- <a-select-option :value="item.key" v-for="(item, key) in selectSymbol">
+ <a-input style="width: 30%" read-only value="������������" />
+ <a-select
+ style="width: 30%"
+ placeholder="���������"
+ v-model="editData.formula1"
+ >
+ <a-select-option
+ :value="item.key"
+ v-for="(item, key) in selectSymbol"
+ >
{{ item.value }}
</a-select-option>
</a-select>
<a-input
- style="width: 40%;margin-top: 1px"
- v-model="editData.val1"
+ style="width: 40%; margin-top: 1px"
+ v-model="editData.val1"
>
- <a-icon slot="addonAfter" type="arrow-right" @click="gFormula"/>
+ <a-icon slot="addonAfter" type="arrow-right" @click="gFormula" />
</a-input>
</a-input-group>
</a-form-model-item>
- <a-form-model-item v-else :labelCol="{ span: 5 }" :wrapperCol="{ span: 15 }" label="������������">
+ <a-form-model-item
+ v-else
+ :labelCol="{ span: 5 }"
+ :wrapperCol="{ span: 15 }"
+ label="������������"
+ >
<a-input-group compact>
<a-select
- style="width: 30%"
- defaultValue='AQI���'
- v-model="editData.type1"
+ style="width: 30%"
+ defaultValue="AQI���"
+ v-model="editData.type1"
>
- <a-select-option :value="item.key" :key="key" v-for="(item, key) in selectType">
+ <a-select-option
+ :value="item.key"
+ :key="key"
+ v-for="(item, key) in selectType"
+ >
{{ item.value }}
</a-select-option>
</a-select>
<a-select
- v-model="editData.formula1"
- style="width: 30%;"
- placeholder="���������"
+ v-model="editData.formula1"
+ style="width: 30%"
+ placeholder="���������"
>
- <a-select-option :value="item.key" v-for="(item, key) in selectSymbol">
+ <a-select-option
+ :value="item.key"
+ v-for="(item, key) in selectSymbol"
+ >
{{ item.value }}
</a-select-option>
</a-select>
<a-input
- style="width: 40%;margin-top: 1px"
- placeholder=""
- v-model="editData.val1"
+ style="width: 40%; margin-top: 1px"
+ placeholder=""
+ v-model="editData.val1"
>
- <a-icon slot="addonAfter" type="plus"/>
+ <a-icon slot="addonAfter" type="plus" />
</a-input>
</a-input-group>
<a-input-group compact>
- <a-input style="width: 30%" read-only value="���������"/>
- <a-select style="width: 30%" placeholder="���������" v-model="editData.formula2">
- <a-select-option :value="item.key" v-for="(item, key) in selectSymbol">
+ <a-input style="width: 30%" read-only value="���������" />
+ <a-select
+ style="width: 30%"
+ placeholder="���������"
+ v-model="editData.formula2"
+ >
+ <a-select-option
+ :value="item.key"
+ v-for="(item, key) in selectSymbol"
+ >
{{ item.value }}
</a-select-option>
</a-select>
<a-input
- style="width: 40%;margin-top: 1px"
- v-model="editData.val2"
+ style="width: 40%; margin-top: 1px"
+ v-model="editData.val2"
>
- <a-icon slot="addonAfter" type="arrow-right" @click="gFormula"/>
+ <a-icon slot="addonAfter" type="arrow-right" @click="gFormula" />
</a-input>
</a-input-group>
</a-form-model-item>
- <a-form-model-item :labelCol="{ span: 5 }" :wrapperCol="{ span: 15 }" label="������" prop="cel">
+ <a-form-model-item
+ :labelCol="{ span: 5 }"
+ :wrapperCol="{ span: 15 }"
+ label="������"
+ prop="cel"
+ >
<a-input type="string" read-only v-model="editData.cel">
- <a-icon slot="addonAfter" type="close" @click="clearCel"/>
+ <a-icon slot="addonAfter" type="close" @click="clearCel" />
</a-input>
</a-form-model-item>
</a-form-model>
</a-modal>
-
</div>
</template>
@@ -398,6 +578,7 @@
}).then((res: any) => {
this.pagination.total = res.data.data.totalNumber
this.dataSource = res.data.data.deviceAdjustValues
+ console.log(parseInt(res.data.data.deviceAdjustValues[0].value));
})
}
@@ -748,7 +929,6 @@
</script>
<style lang="less">
-
.modalStyle {
.ant-modal {
margin-left: 25%;
--
Gitblit v1.8.0