空气字典 统计

This commit is contained in:
weicw
2021-09-22 11:33:19 +08:00
parent f212f334ef
commit 3a1da0013e
18 changed files with 1829 additions and 111 deletions

View File

@@ -3,7 +3,7 @@
<a-card :bordered="false">
<a-modal
v-model:visible="showEdit"
:title="form.zoneNoisePlaceId !== undefined ? '修改' : '添加'"
:title="form.airBasicInfoDictId !== undefined ? '修改' : '添加'"
:confirm-loading="loading"
:width="800"
:body-style="{ paddingBottom: '8px' }"
@@ -16,56 +16,24 @@
:label-col="{ md: { span: 6 }, sm: { span: 24 } }"
:wrapper-col="{ md: { span: 18 }, sm: { span: 24 } }"
>
<a-form-item label="点名称" name="placeName">
<a-input v-model:value="form.placeName" placeholder="请输入点名称" allow-clear />
</a-form-item>
<a-form-item label="点位编码" name="placeCode">
<a-input v-model:value="form.placeCode" placeholder="请输入点位编码" allow-clear />
</a-form-item>
<a-form-item label="测点经度" name="placeLng">
<a-input v-model:value="form.placeLng" placeholder="请输入测点经度" allow-clear />
</a-form-item>
<a-form-item label="测点纬度" name="placeLat">
<a-input v-model:value="form.placeLat" placeholder="请输入测点纬度" allow-clear />
<a-form-item label="点名称" name="place">
<a-input v-model:value="form.place" placeholder="请输入点名称" allow-clear />
</a-form-item>
<a-form-item label="测点参照物" name="refObj">
<a-input v-model:value="form.refObj" placeholder="请输入测点参照物" allow-clear />
<a-form-item label="经度" name="longitude">
<a-input v-model:value="form.longitude" placeholder="请输入经度" allow-clear />
</a-form-item>
<!-- <a-form-item label="网格覆盖人口(万人)" name="people">-->
<!-- <a-input v-model:value="form.people" placeholder="请输入网格覆盖人口(万人)" allow-clear />-->
<!-- </a-form-item>-->
<a-form-item label="监测站名" name="station">
<a-input v-model:value="form.station" placeholder="请输入监测站名" allow-clear />
</a-form-item>
<a-form-item label="监测仪器型号" name="monitorInstrumentModel">
<a-input v-model:value="form.monitorInstrumentModel" placeholder="请输入测监测仪器型号" allow-clear />
</a-form-item>
<a-form-item label="监测仪器编号" name="monitorInstrumentCode">
<a-input v-model:value="form.monitorInstrumentCode" placeholder="请输入监测仪器编号" allow-clear />
</a-form-item>
<a-form-item label="监测前校准值" name="beforeMonitorValue">
<a-input v-model:value="form.beforeMonitorValue" placeholder="请输入监测前校准值" allow-clear />
</a-form-item>
<a-form-item label="监测后校准值" name="afterMonitorValue">
<a-input v-model:value="form.afterMonitorValue" placeholder="请输入监测后校准值" allow-clear />
</a-form-item>
<a-form-item label="声校准器测量声压值" name="soundPressureValue">
<a-input v-model:value="form.soundPressureValue" placeholder="请输入声校准器测量声压值" allow-clear />
</a-form-item>
<a-form-item label="声校准仪器型号" name="soundInstrumentModel">
<a-input v-model:value="form.soundInstrumentModel" placeholder="请输入声校准仪器型号" allow-clear />
</a-form-item>
<a-form-item label="声校准仪器编号" name="soundInstrumentCode">
<a-input v-model:value="form.soundInstrumentCode" placeholder="请输入声校准仪器编号" allow-clear />
<a-form-item label="纬度" name="latitude">
<a-input v-model:value="form.latitude" placeholder="请输入纬度" allow-clear />
</a-form-item>
</a-form>
</a-modal>
<!-- 表格 -->
<ele-pro-table
v-model:selection="selectionList"
ref="table"
row-key="zoneNoisePlaceId"
row-key="airBasicInfoDictId"
:datasource="url"
:columns="columns"
:where="where"
@@ -140,63 +108,18 @@ export default {
// 表格列配置
columns: [
{
title: "点名称",
dataIndex: "placeName",
sorter: true,
}, {
title: "点位编码",
dataIndex: "placeCode",
title: "点名称",
dataIndex: "place",
sorter: true,
},
{
title: "测点经度",
dataIndex: "placeLng",
title: "经度",
dataIndex: "longitude",
sorter: true,
},
{
title: "测点纬度",
dataIndex: "placeLat",
sorter: true,
},
{
title: "测点参照物",
dataIndex: "refObj",
sorter: true,
},
{
title: "监测站名",
dataIndex: "station",
sorter: true,
},
{
title: "监测仪器型号",
dataIndex: "monitorInstrumentModel",
sorter: true,
},
{
title: "监测仪器编号",
dataIndex: "monitorInstrumentCode",
sorter: true,
},
{
title: "监测前校准值",
dataIndex: "beforeMonitorValue",
sorter: true,
},
{
title: "声校准器测量声压值",
dataIndex: "soundPressureValue",
sorter: true,
},
{
title: "声校准仪器型号",
dataIndex: "soundInstrumentModel",
sorter: true,
},
{
title: "声校准仪器编号",
dataIndex: "soundInstrumentCode",
title: "纬度",
dataIndex: "latitude",
sorter: true,
},
{
@@ -221,7 +144,7 @@ export default {
form: {},
loading: false,
rules: {
placeName:[{required: true,message: '请输入点名称'}],
place:[{required: true,message: '请输入点名称'}],
placeCode:[{required: true,message: '请输入点位编码'}],
placeLng: [{required: true,message: '请输入测点经度',},],
placeLat: [{required: true,message: '请输入测点纬度',},],
@@ -256,7 +179,7 @@ export default {
await this.$refs.form.validate();
const hide = this.$message.loading('请求中..', 0);
const form = this.form;
if (form.zoneNoisePlaceId) {
if (form.airBasicInfoDictId) {
updatePlace(form)
.then((res) => {
if (res.data.code == 0) {
@@ -295,7 +218,7 @@ export default {
/* 删除单个 */
remove(row) {
const hide = this.$message.loading('请求中..', 0);
removePlace(row.zoneNoisePlaceId).then((res) => {
removePlace(row.airBasicInfoDictId).then((res) => {
hide();
if (res.data.code === 0) {
this.$message.success(res.data.msg);
@@ -311,7 +234,7 @@ export default {
/* 批量删除 */
removeBatch() {
const hide = this.$message.loading('请求中..', 0);
const ids = this.selectionList.map((item) => item.zoneNoisePlaceId);
const ids = this.selectionList.map((item) => item.airBasicInfoDictId);
removeBatchPlace(ids).then((res) => {
if (res.data.code === 0) {
this.$message.success(res.data.msg);