diff --git a/src/api/ecology/function-place.js b/src/api/ecology/function-place.js
deleted file mode 100644
index dbeb296..0000000
--- a/src/api/ecology/function-place.js
+++ /dev/null
@@ -1,71 +0,0 @@
-import axios from 'axios';
-// ----------------------列表-----------------------
-const pageBillUrl = '/sound/function/place/bill/page';
-// 添加
-const saveFunctionPlaceBill = function (data) {
- return axios.post("/sound/function/place/bill",data)
-}
-
-// 删除
-const removeFunctionPlaceBill = function (id) {
- return axios.delete(`/sound/function/place/bill/${id}`,)
-}
-// 批量删除
-const removeBatchFunctionPlaceBill = function (ids) {
- return axios.delete("/sound/function/place/bill/batch",{data:ids})
-}
-
-// 修改
-const updateFunctionPlaceBill = function (data) {
- return axios.put("/sound/function/place/bill",data)
-}
-// 审核
-const verifyFunctionPlaceBill = function (data) {
- return axios.put("/sound/function/place/bill/verify",data);
-}
-const getFunctionPlaceBill = function (id) {
- return axios.get(`/sound/function/place/bill/${id}`)
-}
-// -------------------------数据---------------------
-const pageFunctionPlaceUrl = '/sound/function/place/page';
-// 添加
-const saveFunctionPlace = function (data) {
- return axios.post("/sound/function/place",data)
-}
-
-// 删除
-const removeFunctionPlace = function (id) {
- return axios.delete(`/sound/function/place/${id}`,)
-}
-// 批量删除
-const removeBatchFunctionPlace = function (ids) {
- return axios.delete("/sound/function/place/batch",{data:ids})
-}
-
-// 修改
-const updateFunctionPlace = function (data) {
- return axios.put("/sound/function/place",data)
-}
-
-// -------------------------统计---------------------
-const pageFunctionPlaceStatisticUrl = '/sound/function/place/statistic';
-const getHistoryyears = function () {
- return axios.get("/sound/function/place/history-year")
-}
-export {
- pageBillUrl,
- saveFunctionPlaceBill,
- removeFunctionPlaceBill,
- updateFunctionPlaceBill,
- removeBatchFunctionPlaceBill,
- verifyFunctionPlaceBill,
- getFunctionPlaceBill,
- pageFunctionPlaceUrl,
- saveFunctionPlace,
- removeFunctionPlace,
- updateFunctionPlace,
- removeBatchFunctionPlace,
- pageFunctionPlaceStatisticUrl,
- getHistoryyears
-
-}
diff --git a/src/api/ecology/function-sound.js b/src/api/ecology/function-sound.js
index 9488196..1aebded 100644
--- a/src/api/ecology/function-sound.js
+++ b/src/api/ecology/function-sound.js
@@ -52,6 +52,9 @@ const pageFunctionNoiseStatisticUrl = '/sound/function/noise/statistic';
const getHistoryyears = function () {
return axios.get("/sound/function/noise/history-year")
}
+const getColumnOptions = function(column){
+ return axios.get("/sound/function/noise/options",{params:{column}})
+}
export {
pageBillUrl,
saveFunctionNoiseBill,
@@ -66,6 +69,7 @@ export {
updateFunctionNoise,
removeBatchFunctionNoise,
pageFunctionNoiseStatisticUrl,
- getHistoryyears
+ getHistoryyears,
+ getColumnOptions
}
diff --git a/src/views/sound/function/collect/index.vue b/src/views/sound/function/collect/index.vue
index 668a5bd..60ffdc6 100644
--- a/src/views/sound/function/collect/index.vue
+++ b/src/views/sound/function/collect/index.vue
@@ -3,8 +3,19 @@
-
- 导入excel
+
+ 市级导入
+
+
+ 县级导入
@@ -12,104 +23,206 @@
-
-
-
\ No newline at end of file
diff --git a/src/views/sound/function/collect/noise-bill.vue b/src/views/sound/function/collect/noise-bill.vue
index cfedbe0..f9f0fa9 100644
--- a/src/views/sound/function/collect/noise-bill.vue
+++ b/src/views/sound/function/collect/noise-bill.vue
@@ -97,6 +97,7 @@
CheckOutlined,
EditOutlined
} from '@ant-design/icons-vue';
+ import { Modal } from 'ant-design-vue';
import {
pageBillUrl,
// saveFunctionNoiseBill,
@@ -107,6 +108,7 @@
} from "@/api/ecology/function-sound";
import moment from "moment";
export default {
+ name: 'FunctionCollectNoiseBill',
components: {
CheckOutlined,
EditOutlined
@@ -136,6 +138,11 @@
},
},
+ {
+ title: '区域等级',
+ dataIndex: 'regionLevel',
+ sorter: true,
+ },
{
title: '条目',
dataIndex: 'recordSize',
@@ -174,6 +181,12 @@
customRender: 'checked',
},
+ },
+ {
+ title: '创建人',
+ dataIndex: 'username',
+ sorter: true,
+
},
// {
// title: '更新时间',
@@ -242,9 +255,15 @@
}).then(res => {
if (res.data.code == 0) {
record.checked = checked
- this.$message.success(res.data.msg);
+ Modal.success({
+ title: "提示",
+ content: checked?"审核成功":"撤回成功"
+ });
} else {
- this.$message.error(res.data.msg);
+ Modal.error({
+ title: "提示",
+ content: res.data.msg
+ });
}
}).catch((e) => {
this.$message.error(e.message);
diff --git a/src/views/sound/function/collect/noise.vue b/src/views/sound/function/collect/noise.vue
index 675eda0..3511079 100644
--- a/src/views/sound/function/collect/noise.vue
+++ b/src/views/sound/function/collect/noise.vue
@@ -2,26 +2,41 @@
-
+
-
-
+
+
+ {{ item.label }}
+
+
-
-
- 1
- 2
- 3
- 4
+
+
+ {{ item.label }}
-
+
查询
重置
@@ -30,97 +45,351 @@
-
-
+
+
-
+
-
+
+
+
+
+
+
+ 昼
+ 夜
+
-
-
+
+
-
+
-
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
新增
-
- 删除
+
+ 删除
-
+
+ {{ text }}
+ {{ text }}
+ {{ text }}
+ {{ text }}
+ {{ text }}
+ {{ text }}
+
+
- 修改
-
- 删除
+ 修改
+
+ 删除
@@ -131,173 +400,287 @@
\ No newline at end of file
diff --git a/src/views/sound/function/collect/place-bill.vue b/src/views/sound/function/collect/place-bill.vue
deleted file mode 100644
index 135e385..0000000
--- a/src/views/sound/function/collect/place-bill.vue
+++ /dev/null
@@ -1,365 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- 已审核
- 未审核
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查询
- 重置
-
-
-
-
-
-
- 批量删除
-
-
-
-
-
-
- {{ text || ' ' }}
-
-
-
-
-
-
-
-
- {{ $util.toDateString(text,'yyyy-MM-dd') || ' ' }}
-
-
-
-
-
-
- 已审核
- 未审核
-
-
-
-
-
- 查看
-
-
- 审核
-
-
- 撤回
-
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/views/sound/function/collect/place.vue b/src/views/sound/function/collect/place.vue
deleted file mode 100644
index d15c3a9..0000000
--- a/src/views/sound/function/collect/place.vue
+++ /dev/null
@@ -1,375 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查询
- 重置
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 新增
-
- 删除
-
-
-
-
-
- 修改
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/views/sound/function/collect/utils.js b/src/views/sound/function/collect/utils.js
index 6ed6c4d..c180469 100644
--- a/src/views/sound/function/collect/utils.js
+++ b/src/views/sound/function/collect/utils.js
@@ -3,11 +3,23 @@ export default {
return excelData.map(item => {
const monitorTime = new Date();
monitorTime.setFullYear(item[0]);
- monitorTime.setMonth(item[4]-1);
+ monitorTime.setMonth(item[4] - 1);
monitorTime.setDate(item[5]);
monitorTime.setHours(item[6]);
monitorTime.setMinutes(item[7]);
- return {
+ let quarter = 1;
+ const month = item[4]
+ if (month < 4) {
+ quarter = 1
+ } else if (month < 7) {
+ quarter = 2
+ } else if (month < 10) {
+ quarter = 3
+ } else {
+ quarter = 4
+ }
+
+ const row = {
monitorYear: item[0],
place: item[1],
placeCode: item[2],
@@ -24,9 +36,19 @@ export default {
indexL90: item[12],
indexLmax: item[13],
indexLmin: item[14],
+ quarter
- }
- })
+ }
+ if (row.monitorHour >= 6 && row.monitorHour < 22) {
+ row.timeSlot = "昼"
+ }else{
+ row.timeSlot = "夜"
+ }
+ if (row.indexL10 < row.indexL50 || row.indexL50 < row.indexL90) {
+ throw new Error(row.place + "数值有误")
+ }
+ return row;
+ })
},
toPlaceData(excelData) {
@@ -45,9 +67,9 @@ export default {
soundPressureValue: item[10],
soundInstrumentModel: item[11],
soundInstrumentCode: item[12],
-
- }
- })
+
+ }
+ })
}
}
\ No newline at end of file
diff --git a/src/views/sound/function/statistic/average.vue b/src/views/sound/function/statistic/average.vue
index 52031df..e9df00b 100644
--- a/src/views/sound/function/statistic/average.vue
+++ b/src/views/sound/function/statistic/average.vue
@@ -1,354 +1,258 @@
-
data = d.data" :scroll="{x: 'max-content'}">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ (data = d.data)"
+ :scroll="{ x: 'max-content' }"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- 查询
- 重置
- 导出excel
-
-
-
-
-
-
-
-
+
+
+ {{ text }}
+ {{ text }}
+ {{ text }}
+ {{ text }}
+ {{ text }}
+ {{ text }}
+
+
\ No newline at end of file
diff --git a/src/views/sound/function/statistic/base.vue b/src/views/sound/function/statistic/base.vue
index 367ba79..1d0bfac 100644
--- a/src/views/sound/function/statistic/base.vue
+++ b/src/views/sound/function/statistic/base.vue
@@ -2,145 +2,86 @@
-
+
+
+
+
+ {{ item.label }}
+
+
+
-
+
+ {{ item.label }}
+
-
-
+
+
+ {{ item.label }}
+
-
-
+
+
+ {{ item.label }}
+
+
+
+
+
查询
重置
+ 导出Excel
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 昼
- 夜
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ (data = d.data)"
+ >
+
+ {{text}}
+ {{text}}
+ {{text}}
+ {{text}}
+ {{text}}
+ {{text}}
+
@@ -148,229 +89,483 @@
\ No newline at end of file
diff --git a/src/views/sound/function/statistic/compare.vue b/src/views/sound/function/statistic/compare.vue
index d133f16..8ef5277 100644
--- a/src/views/sound/function/statistic/compare.vue
+++ b/src/views/sound/function/statistic/compare.vue
@@ -261,123 +261,149 @@ export default {
this.hisYears.forEach((item) => {
if (
- (!this.where.timeRange[0] ||
- this.where.timeRange[0] <= item) &&
- (!this.where.timeRange[1] ||
- this.where.timeRange[1] >= item)
+ (!this.where.timeRange[0] || this.where.timeRange[0] <= item) &&
+ (!this.where.timeRange[1] || this.where.timeRange[1] >= item)
) {
if (this.where.groupTimeLength == "quarter") {
columns.push({
title: item + "年第一季度Leq",
dataIndex: item + "1" + "Leq",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第二季度Leq",
dataIndex: item + "2" + "Leq",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第三季度Leq",
dataIndex: item + "3" + "Leq",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第四季度Leq",
dataIndex: item + "4" + "Leq",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第一季度SD",
dataIndex: item + "1" + "Sd",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第二季度SD",
dataIndex: item + "2" + "Sd",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第三季度SD",
dataIndex: item + "3" + "Sd",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第四季度SD",
dataIndex: item + "4" + "Sd",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第一季度L10",
dataIndex: item + "1" + "L10",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第二季度L10",
dataIndex: item + "2" + "L10",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第三季度L10",
dataIndex: item + "3" + "L10",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第四季度L10",
dataIndex: item + "4" + "L10",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第一季度L50",
dataIndex: item + "1" + "L50",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第二季度L50",
dataIndex: item + "2" + "L50",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第三季度L50",
dataIndex: item + "3" + "L50",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第四季度L50",
dataIndex: item + "4" + "L50",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第一季度L90",
dataIndex: item + "1" + "L90",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第二季度L90",
dataIndex: item + "2" + "L90",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第三季度L90",
dataIndex: item + "3" + "L90",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第四季度L90",
dataIndex: item + "4" + "L90",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第一季度Lmin",
dataIndex: item + "1" + "Lmin",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第二季度Lmin",
dataIndex: item + "2" + "Lmin",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第三季度Lmin",
dataIndex: item + "3" + "Lmin",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第四季度Lmin",
dataIndex: item + "4" + "Lmin",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第一季度Lmax",
dataIndex: item + "1" + "Lmax",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第二季度Lmax",
dataIndex: item + "2" + "Lmax",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第三季度Lmax",
dataIndex: item + "3" + "Lmax",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
columns.push({
title: item + "年第四季度Lmax",
dataIndex: item + "4" + "Lmax",
+ customRender: ({ text }) =>text? Number(text).toFixed(1):"",
});
} else {
if (this.where.valueType.includes("index_Leq")) {
diff --git a/src/views/sound/function/statistic/index.vue b/src/views/sound/function/statistic/index.vue
index f25fa43..774997f 100644
--- a/src/views/sound/function/statistic/index.vue
+++ b/src/views/sound/function/statistic/index.vue
@@ -11,9 +11,9 @@
-
+
@@ -27,7 +27,7 @@
*/
import BaseStatistic from "./base.vue";
// import QuarterStatistic from "./quarter.vue";
- // import Compare from "./compare.vue"
+ import Compare from "./compare.vue"
import AverageStatistic from "./average.vue"
export default {
@@ -35,12 +35,12 @@
components: {
BaseStatistic,
// QuarterStatistic,
- // Compare,
+ Compare,
AverageStatistic
},
data() {
return {
- activeKey: 'year-compare'
+ activeKey: 'base'
};
},
diff --git a/src/views/sound/road/collect/index.vue b/src/views/sound/road/collect/index.vue
index e9293ac..53d3bcc 100644
--- a/src/views/sound/road/collect/index.vue
+++ b/src/views/sound/road/collect/index.vue
@@ -72,13 +72,16 @@ export default {
const reportDate2 = aoa2[1][0].replace(/[^\d]+/g, "-");
const roadNoiseList = aoa.filter(
- (item) => item.length == 21 && typeof item[0] == "number"
+
+ (item) => {
+ console.log(item.length)
+ return item.length >= 21 && typeof item[0] == "number"}
);
const roadNoiseList2 = aoa2.filter(
- (item) => item.length == 21 && typeof item[0] == "number"
+ (item) => item.length >= 21 && typeof item[0] == "number"
);
const roadNoiseList3 = aoa3.filter(
- (item) => item.length == 16 && typeof item[1] == "number"
+ (item) => item.length >= 16 && typeof item[1] == "number"
);
// 解析成对象数组
@@ -159,7 +162,7 @@ export default {
hide();
Modal.error({
title: "导入失败",
- content: "表格格式有误,请检查后重新上传!",
+ content: error.message,
});
}
// console.log(billData);
diff --git a/src/views/sound/road/collect/utils.js b/src/views/sound/road/collect/utils.js
index cfd4aae..40202ac 100644
--- a/src/views/sound/road/collect/utils.js
+++ b/src/views/sound/road/collect/utils.js
@@ -46,11 +46,11 @@ export default {
quarter
}
- if (row.monitorHour >= 6 && row.monitorHour <= 22 && row.timeSlot != "昼") {
+ if (row.monitorHour >= 6 && row.monitorHour < 22 && row.timeSlot != "昼") {
throw new Error(row.place + "时段有误")
}
- if (row.monitorHour <= 6 && row.monitorHour > 22 && row.timeSlot != "夜") {
+ if (row.monitorHour <6 && row.monitorHour >= 22 && row.timeSlot != "夜") {
throw new Error(row.place + "时段有误")
}
if(row.indexL10 < row.indexL50 || row.indexL50 < row.indexL90){
diff --git a/src/views/sound/road/statistic/average.vue b/src/views/sound/road/statistic/average.vue
index 293c445..fb5825a 100644
--- a/src/views/sound/road/statistic/average.vue
+++ b/src/views/sound/road/statistic/average.vue
@@ -1,183 +1,258 @@
-
data = d.data" :scroll="{x: 'max-content'}">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ (data = d.data)"
+ :scroll="{ x: 'max-content' }"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- 查询
- 重置
- 导出excel
-
-
-
-
-
-
-
-
+
+
+ {{ text }}
+ {{ text }}
+ {{ text }}
+ {{ text }}
+ {{ text }}
+ {{ text }}
+
+
\ No newline at end of file