diff --git a/src/api/ecology/zone-sound.js b/src/api/ecology/zone-sound.js index e2a954d..6f83ebc 100644 --- a/src/api/ecology/zone-sound.js +++ b/src/api/ecology/zone-sound.js @@ -52,6 +52,9 @@ const pageZoneNoiseStatisticUrl = '/sound/zone/noise/statistic'; const getHistoryyears = function () { return axios.get("/sound/zone/noise/history-year") } +const getColumnOptions = function(column){ + return axios.get("/sound/zone/noise/options",{params:{column}}) +} export { pageBillUrl, saveZoneNoiseBill, @@ -66,6 +69,7 @@ export { updateZoneNoise, removeBatchZoneNoise, pageZoneNoiseStatisticUrl, - getHistoryyears + getHistoryyears, + getColumnOptions } diff --git a/src/views/sound/function/collect/noise.vue b/src/views/sound/function/collect/noise.vue index 29c12d8..7266e8e 100644 --- a/src/views/sound/function/collect/noise.vue +++ b/src/views/sound/function/collect/noise.vue @@ -47,7 +47,7 @@ - + @@ -93,7 +93,7 @@ import XLSX from "xlsx"; import { pageFunctionNoiseUrl, getColumnOptions } from "@/api/ecology/function-sound"; import locale from "ant-design-vue/es/date-picker/locale/zh_CN"; -// import moment from "moment"; +import moment from "moment"; // import utils from "./utils"; export default { name: "StatisticSoundFunctionBase", @@ -111,6 +111,9 @@ export default { { title: "监测时间", dataIndex: "monitorTime", + customRender:({text})=>{ + return moment(text,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD HH:mm") + }, sorter: true, }, { diff --git a/src/views/sound/function/statistic/leq-compare.vue b/src/views/sound/function/statistic/leq-compare.vue new file mode 100644 index 0000000..6d04e76 --- /dev/null +++ b/src/views/sound/function/statistic/leq-compare.vue @@ -0,0 +1,102 @@ + + + + + \ No newline at end of file diff --git a/src/views/sound/road/collect/noise.vue b/src/views/sound/road/collect/noise.vue index e7c879b..fa8847d 100644 --- a/src/views/sound/road/collect/noise.vue +++ b/src/views/sound/road/collect/noise.vue @@ -53,7 +53,7 @@ { - const val = text ? Number(text).toFixed(2) : ""; + const val = text ? Number(text).toFixed(1) : ""; return val; }, }); @@ -427,7 +427,7 @@ export default { title: item + "年SD", dataIndex: item + "Sd", customRender: ({ text }) => { - const val = text ? Number(text).toFixed(2) : ""; + const val = text ? Number(text).toFixed(1) : ""; return val; }, }); @@ -437,7 +437,7 @@ export default { title: item + "年L10", dataIndex: item + "L10", customRender: ({ text }) => { - const val = text ? Number(text).toFixed(2) : ""; + const val = text ? Number(text).toFixed(1) : ""; return val; }, }); @@ -448,7 +448,7 @@ export default { title: item + "年L50", dataIndex: item + "L50", customRender: ({ text }) => { - const val = text ? Number(text).toFixed(2) : ""; + const val = text ? Number(text).toFixed(1) : ""; return val; }, }); @@ -458,7 +458,7 @@ export default { title: item + "年L90", dataIndex: item + "L90", customRender: ({ text }) => { - const val = text ? Number(text).toFixed(2) : ""; + const val = text ? Number(text).toFixed(1) : ""; return val; }, }); @@ -468,7 +468,7 @@ export default { title: item + "年Lmin", dataIndex: item + "Lmin", customRender: ({ text }) => { - const val = text ? Number(text).toFixed(2) : ""; + const val = text ? Number(text).toFixed(1) : ""; return val; }, }); @@ -478,7 +478,7 @@ export default { title: item + "年Lmax", dataIndex: item + "Lmax", customRender: ({ text }) => { - const val = text ? Number(text).toFixed(2) : ""; + const val = text ? Number(text).toFixed(1) : ""; return val; }, }); diff --git a/src/views/sound/zone/collect/index.vue b/src/views/sound/zone/collect/index.vue index 6743ff7..6899a0b 100644 --- a/src/views/sound/zone/collect/index.vue +++ b/src/views/sound/zone/collect/index.vue @@ -3,121 +3,242 @@ - \ No newline at end of file diff --git a/src/views/sound/zone/collect/noise-bill.vue b/src/views/sound/zone/collect/noise-bill.vue index d7f2889..fe2c34e 100644 --- a/src/views/sound/zone/collect/noise-bill.vue +++ b/src/views/sound/zone/collect/noise-bill.vue @@ -7,6 +7,12 @@ + + + 市级 + 县级 + + 已审核 @@ -97,6 +103,7 @@ CheckOutlined, EditOutlined } from '@ant-design/icons-vue'; + import { Modal } from 'ant-design-vue'; import { pageBillUrl, // saveZoneNoiseBill, @@ -137,6 +144,11 @@ }, }, + { + title: '区域等级', + dataIndex: 'regionLevel', + sorter: true, + }, { title: '条目', dataIndex: 'recordSize', @@ -166,11 +178,6 @@ customRender: ({ text }) => this.$util.toDateString(text) - }, - { - title: '创建人', - dataIndex: 'username', - sorter: true }, { title: '审核状态', @@ -180,6 +187,12 @@ customRender: 'checked', }, + }, + { + title: '创建人', + dataIndex: 'username', + sorter: true, + }, // { // title: '更新时间', @@ -248,9 +261,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/zone/collect/noise.vue b/src/views/sound/zone/collect/noise.vue index d61bea2..d04785a 100644 --- a/src/views/sound/zone/collect/noise.vue +++ b/src/views/sound/zone/collect/noise.vue @@ -2,26 +2,36 @@
- + - - - - - - + + {{ item.label }} + - + + {{ item.label }} + - + 查询 重置 @@ -30,147 +40,287 @@ - - + + - + - + - - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + - + - + - + - + - + - + - + + + + + + - - + - + - + - + - + - + - + + + + + + - - - - \ No newline at end of file diff --git a/src/views/sound/zone/collect/place-bill.vue b/src/views/sound/zone/collect/place-bill.vue deleted file mode 100644 index eeea398..0000000 --- a/src/views/sound/zone/collect/place-bill.vue +++ /dev/null @@ -1,366 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/sound/zone/collect/place.vue b/src/views/sound/zone/collect/place.vue deleted file mode 100644 index 4eabb9d..0000000 --- a/src/views/sound/zone/collect/place.vue +++ /dev/null @@ -1,390 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/sound/zone/collect/utils.js b/src/views/sound/zone/collect/utils.js index 8804311..5759bab 100644 --- a/src/views/sound/zone/collect/utils.js +++ b/src/views/sound/zone/collect/utils.js @@ -3,25 +3,34 @@ export default { return excelData.map(item => { const monitorTime = new Date(); monitorTime.setFullYear(item[0]); - monitorTime.setMonth(item[10]-1); - monitorTime.setDate(item[11]); - monitorTime.setHours(item[12]); - monitorTime.setMinutes(item[13]); - return { + monitorTime.setMonth(item[7] - 1); + monitorTime.setDate(item[8]); + monitorTime.setHours(item[9]); + monitorTime.setMinutes(item[10]); + let quarter = 1; + const month = item[7] + if (month < 4) { + quarter = 1 + } else if (month < 7) { + quarter = 2 + } else if (month < 10) { + quarter = 3 + } else { + quarter = 4 + } + const row = { + regionCode: "450100", monitorYear: item[0], gridLength: item[1], gridWidth: item[2], place: item[3], gridNo: item[4], - city: '南宁', area: item[5], source: item[6], monitorMonth: item[7], monitorDay: item[8], monitorHour: item[9], monitorMinute: item[10], - - monitorTime: monitorTime.getTime(), indexLeq: item[11], indexSd: item[12], indexL10: item[13], @@ -37,9 +46,22 @@ export default { soundPressureValue: item[23], soundInstrumentModel: item[24], soundInstrumentCode: item[25], - - } - }) + city: '南宁', + regionLevel: "市级", + monitorTime: monitorTime.getTime(), + 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) { @@ -61,9 +83,83 @@ export default { soundPressureValue: item[13], soundInstrumentModel: item[14], soundInstrumentCode: item[15], - - } - }) + } + }) + + }, + // 解析县级数据 + toAreaObjData(excelData) { + return excelData.map(item => { + const monitorTime = new Date(); + monitorTime.setFullYear(item[1]); + monitorTime.setMonth(item[14] - 1); + monitorTime.setDate(item[15]); + monitorTime.setHours(item[16]); + monitorTime.setMinutes(item[17]); + let quarter = 1; + const month = item[14] + if (month < 4) { + quarter = 1 + } else if (month < 7) { + quarter = 2 + } else if (month < 10) { + quarter = 3 + } else { + quarter = 4 + } + let timeSlot = "夜"; + if (item[16] >= 6 && item[16] <= 22) { + timeSlot = "昼" + } + const row = { + regionCode: item[0], + regionLevel: "县级", + monitorYear: item[1], + placeCode: item[2], + place: item[3], + placeLng: item[4], + placeLat: item[5], + road: item[6], + roadLength: item[7], + roadWidth: item[8], + motorway: item[9], + motorwayType: item[10], + motorwayLevel: item[11], + refObj: item[12], + people: item[13], + monitorMonth: item[14], + monitorDay: item[15], + monitorHour: item[16], + monitorMinute: item[17], + smallTrafficFlow: item[18], + largeTrafficFlow: item[19], + indexLeq: item[20], + indexL10: item[21], + indexL50: item[22], + indexL90: item[23], + indexLmax: item[24], + indexLmin: item[25], + indexSd: item[26], + station: item[27], + monitorInstrumentModel: item[28], + monitorInstrumentCode: item[29], + beforeMonitorValue: item[30], + afterMonitorValue: item[31], + soundPressureValue: item[32], + soundInstrumentModel: item[33], + soundInstrumentCode: item[34], + remark: item[35], + city: '南宁', + timeSlot, + monitorTime: monitorTime.getTime(), + quarter + + } + if(row.indexL10 < row.indexL50 || row.indexL50 < row.indexL90){ + throw new Error(row.place + "数值有误") + } + return row; + }) } } \ No newline at end of file diff --git a/src/views/sound/zone/statistic/average.vue b/src/views/sound/zone/statistic/average.vue index eea7775..8a56a81 100644 --- a/src/views/sound/zone/statistic/average.vue +++ b/src/views/sound/zone/statistic/average.vue @@ -1,412 +1,258 @@ \ No newline at end of file diff --git a/src/views/sound/zone/statistic/base.vue b/src/views/sound/zone/statistic/base.vue index d4911d1..a97c692 100644 --- a/src/views/sound/zone/statistic/base.vue +++ b/src/views/sound/zone/statistic/base.vue @@ -2,145 +2,76 @@
- + - - + + + {{ item.label }} + - - + + + {{ item.label }} + + - + + {{ item.label }} + - + 查询 重置 + 导出Excel - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
@@ -148,275 +79,399 @@ \ No newline at end of file diff --git a/src/views/sound/zone/statistic/compare.vue b/src/views/sound/zone/statistic/compare.vue index eb715b4..e4c574e 100644 --- a/src/views/sound/zone/statistic/compare.vue +++ b/src/views/sound/zone/statistic/compare.vue @@ -2,7 +2,7 @@
- + { 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")) { @@ -385,7 +417,7 @@ export default { title: item + "年Leq", dataIndex: item + "Leq", customRender: ({ text }) => { - const val = text ? Number(text).toFixed(2) : ""; + const val = text ? Number(text).toFixed(1) : ""; return val; }, }); @@ -395,7 +427,7 @@ export default { title: item + "年SD", dataIndex: item + "Sd", customRender: ({ text }) => { - const val = text ? Number(text).toFixed(2) : ""; + const val = text ? Number(text).toFixed(1) : ""; return val; }, }); @@ -405,7 +437,7 @@ export default { title: item + "年L10", dataIndex: item + "L10", customRender: ({ text }) => { - const val = text ? Number(text).toFixed(2) : ""; + const val = text ? Number(text).toFixed(1) : ""; return val; }, }); @@ -416,7 +448,7 @@ export default { title: item + "年L50", dataIndex: item + "L50", customRender: ({ text }) => { - const val = text ? Number(text).toFixed(2) : ""; + const val = text ? Number(text).toFixed(1) : ""; return val; }, }); @@ -426,7 +458,7 @@ export default { title: item + "年L90", dataIndex: item + "L90", customRender: ({ text }) => { - const val = text ? Number(text).toFixed(2) : ""; + const val = text ? Number(text).toFixed(1) : ""; return val; }, }); @@ -436,7 +468,7 @@ export default { title: item + "年Lmin", dataIndex: item + "Lmin", customRender: ({ text }) => { - const val = text ? Number(text).toFixed(2) : ""; + const val = text ? Number(text).toFixed(1) : ""; return val; }, }); @@ -446,7 +478,7 @@ export default { title: item + "年Lmax", dataIndex: item + "Lmax", customRender: ({ text }) => { - const val = text ? Number(text).toFixed(2) : ""; + const val = text ? Number(text).toFixed(1) : ""; return val; }, }); diff --git a/src/views/sound/zone/statistic/index.vue b/src/views/sound/zone/statistic/index.vue index 15d349f..3253b15 100644 --- a/src/views/sound/zone/statistic/index.vue +++ b/src/views/sound/zone/statistic/index.vue @@ -40,7 +40,7 @@ }, data() { return { - activeKey: 'year-compare' + activeKey: 'base' }; }, diff --git a/src/views/system/organization/org-user-edit.vue b/src/views/system/organization/org-user-edit.vue index 2424110..ce54b7a 100644 --- a/src/views/system/organization/org-user-edit.vue +++ b/src/views/system/organization/org-user-edit.vue @@ -4,7 +4,7 @@ :width="680" :visible="visible" :confirm-loading="loading" - :title="isUpdate?'修改用户':'新建用户'" + :title="isUpdate?'修改记录':'新建用户'" :body-style="{paddingBottom: '8px'}" @update:visible="updateVisible" @ok="save"> diff --git a/src/views/system/organization/org-user-list.vue b/src/views/system/organization/org-user-list.vue index 8366910..da46721 100644 --- a/src/views/system/organization/org-user-list.vue +++ b/src/views/system/organization/org-user-list.vue @@ -177,7 +177,7 @@ export default { this.$message.error(e.message); }); }, - /* 修改用户状态 */ + /* 修改记录状态 */ changeState(checked, row) { let params = new FormData(); params.append('state', checked ? 0 : 1); diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index b2ea277..7e2c340 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -298,7 +298,7 @@ export default { } }); }, - /* 修改用户状态 */ + /* 修改记录状态 */ editState(checked, row) { let params = new FormData(); params.append('state', checked ? 0 : 1); diff --git a/src/views/system/user/user-edit.vue b/src/views/system/user/user-edit.vue index da478ff..0a8032f 100644 --- a/src/views/system/user/user-edit.vue +++ b/src/views/system/user/user-edit.vue @@ -4,7 +4,7 @@ :width="680" :visible="visible" :confirm-loading="loading" - :title="isUpdate?'修改用户':'新建用户'" + :title="isUpdate?'修改记录':'新建用户'" :body-style="{paddingBottom: '8px'}" @update:visible="updateVisible" @ok="save">