diff --git a/src/api/ecology/noise/function-noise-function-type.js b/src/api/ecology/noise/function-noise-function-type.js
index 302b11b..0a0905e 100644
--- a/src/api/ecology/noise/function-noise-function-type.js
+++ b/src/api/ecology/noise/function-noise-function-type.js
@@ -23,13 +23,16 @@ const updateFunctionType = function (data) {
const getColumnOptions = function(column){
return axios.get("/sound/function/functionType/options",{params:{column}})
}
-
+const copyBatchFunctionType = function (data){
+ return axios.post("/sound/function/functionType/copyBatch",data)
+}
export {
listAllUrl,
saveFunctionType,
updateFunctionType,
removeBatchFunctionType,
removeFunctionType,
- getColumnOptions
+ getColumnOptions,
+ copyBatchFunctionType
}
diff --git a/src/api/ecology/noise/function-noise-place.js b/src/api/ecology/noise/function-noise-place.js
index c6c94c3..3bdc337 100644
--- a/src/api/ecology/noise/function-noise-place.js
+++ b/src/api/ecology/noise/function-noise-place.js
@@ -25,6 +25,9 @@ const getColumnOptions = function(column){
return axios.get("/sound/function/place/options",{params:{column}})
}
+const copyBatchPlace = function (data){
+ return axios.post("/sound/function/place/copyBatch",data)
+}
export {
listAllUrl,
@@ -32,6 +35,6 @@ export {
updatePlace,
removeBatchPlace,
removePlace,
- getColumnOptions
-
+ getColumnOptions,
+ copyBatchPlace
}
diff --git a/src/api/ecology/noise/road-noise-leq-level.js b/src/api/ecology/noise/road-noise-leq-level.js
index 86065d7..dfdbe27 100644
--- a/src/api/ecology/noise/road-noise-leq-level.js
+++ b/src/api/ecology/noise/road-noise-leq-level.js
@@ -24,6 +24,10 @@ const updateLeqLevel = function (data) {
const getColumnOptions = function(column){
return axios.get("/sound/road/noiseLeqLevel/options",{params:{column}})
}
+const copyBatchLeqLevel = function (data){
+ return axios.post("/sound/road/noiseLeqLevel/copyBatch",data)
+}
+
export {
@@ -32,6 +36,7 @@ export {
updateLeqLevel,
removeBatchLeqLevel,
removeLeqLevel,
- getColumnOptions
+ getColumnOptions,
+ copyBatchLeqLevel
}
diff --git a/src/api/ecology/noise/zone-noise-leq-level.js b/src/api/ecology/noise/zone-noise-leq-level.js
index 0c68060..d0e7284 100644
--- a/src/api/ecology/noise/zone-noise-leq-level.js
+++ b/src/api/ecology/noise/zone-noise-leq-level.js
@@ -24,6 +24,10 @@ const getColumnOptions = function(column){
return axios.get("/sound/zone/noiseLeqLevel/options",{params:{column}})
}
+const copyBatchLeqLevel = function (data){
+ return axios.post("/sound/zone/noiseLeqLevel/copyBatch",data)
+}
+
export {
listAllUrl,
@@ -31,6 +35,7 @@ export {
updateLeqLevel,
removeBatchLeqLevel,
removeLeqLevel,
- getColumnOptions
+ getColumnOptions,
+ copyBatchLeqLevel
}
diff --git a/src/api/ecology/noise/zone-noise-place.js b/src/api/ecology/noise/zone-noise-place.js
index 2b87162..ccfab35 100644
--- a/src/api/ecology/noise/zone-noise-place.js
+++ b/src/api/ecology/noise/zone-noise-place.js
@@ -25,7 +25,7 @@ const getColumnOptions = function(column){
return axios.get("/sound/zone/place/options",{params:{column}})
}
const copyBatchPlace = function (data){
- return axios.post("/sound/zone/copyBatch",data)
+ return axios.post("/sound/zone/place/copyBatch",data)
}
diff --git a/src/views/atmosphere/acid-rain/collect/index.vue b/src/views/atmosphere/acid-rain/collect/index.vue
index ad7cf45..05f330a 100644
--- a/src/views/atmosphere/acid-rain/collect/index.vue
+++ b/src/views/atmosphere/acid-rain/collect/index.vue
@@ -60,7 +60,7 @@ export default {
const reportDate = aoa[2][0].replace(/[^\d]+/g, "-");
const acidList = aoa.filter((item) => {
- return item.length >= 23 && item[0] && !item[0].includes("编号");
+ return item.length >= 16 && item[0] && !item[0].includes("编号");
});
// 解析成对象数组
const billName = aoa[0][0] + aoa[1][0];
diff --git a/src/views/atmosphere/air/statistic/base.vue b/src/views/atmosphere/air/statistic/base.vue
index d849746..0f25388 100644
--- a/src/views/atmosphere/air/statistic/base.vue
+++ b/src/views/atmosphere/air/statistic/base.vue
@@ -1,284 +1,309 @@
-
-
-
-
-
-
-
-
- {{ item.label }}
-
-
-
-
-
-
-
- 查询
- 重置
- 导出Excel
-
-
-
-
-
- (data = d.data)"
- >
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+ 导出Excel
+
+
+
+
+
+ (data = d.data)"
+ >
+
+
+
+
+
diff --git a/src/views/sound/function/dict/function-type.vue b/src/views/sound/function/dict/function-type.vue
index 3b30619..f92e2e5 100644
--- a/src/views/sound/function/dict/function-type.vue
+++ b/src/views/sound/function/dict/function-type.vue
@@ -1,6 +1,52 @@
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
新增
+
+
+
+
+ {{ item.label }}
+
+
+
+
+ 批量复制
+
+
+
删除
+ 导出
@@ -113,12 +176,16 @@ import {
saveFunctionType,
updateFunctionType,
removeFunctionType,
- removeBatchFunctionType
+ removeBatchFunctionType,
+ getColumnOptions,
+ copyBatchFunctionType
} from "@/api/ecology/noise/function-noise-function-type";
+import {DownOutlined} from '@ant-design/icons-vue';
+import XLSX from "xlsx";
// import moment from "moment";
export default {
name: "FunctionNoiseFunctionType",
- components: {},
+ components: {DownOutlined},
data() {
return {
data: [],
@@ -171,14 +238,19 @@ export default {
// 表格搜索条件
where: {},
+ yearOptions: [],
// 表格选中数据
selectionList: [],
// 是否显示编辑弹窗
showEdit: false,
+ showNYear:false,
+ cYear: undefined,
+ nYear:undefined,
// 表单数据
form: {},
loading: false,
rules: {
+ year:[{required: true,message: '请输入年份'}],
functionType:[{required: true,message: '请输入功能区类别'}],
functionCode:[{required: true,message: '请输入功能区代码'}],
maxLd: [{required: true,message: '请输入昼间限值',},],
@@ -189,6 +261,7 @@ export default {
};
},
mounted() {
+ this.getOptions();
},
methods: {
minLeqChange(e){
@@ -201,6 +274,19 @@ export default {
where: this.where,
});
},
+ getOptions(){
+ getColumnOptions("year").then(res => {
+ console.log(res)
+ if (res.data.code == 0) {
+ this.yearOptions = res.data.data.map(item => {
+ return {
+ label: item,
+ value: item
+ }
+ })
+ }
+ })
+ },
/* 重置搜索 */
reset() {
this.where = {};
@@ -226,6 +312,7 @@ export default {
this.showEdit = false;
this.$message.success(res.data.msg);
this.reload();
+ this.getOptions();
} else {
this.$message.error(res.data.msg);
}
@@ -243,6 +330,7 @@ export default {
this.showEdit = false;
this.$message.success(res.data.msg);
this.reload();
+ this.getOptions();
} else {
this.$message.error(res.data.msg);
}
@@ -287,6 +375,40 @@ export default {
}).finally(() => {
hide();
})
+ },
+ setCYear(e){
+ this.cYear = e.key;
+ this.showNYear = true;
+ },
+ copyBatch(){
+ const hide = this.$message.loading('请求中..', 0);
+ copyBatchFunctionType({cyear:Number(this.cYear),nyear:this.nYear}).then(res=>{
+ if (res.data.code === 0) {
+ this.$message.success(res.data.msg);
+ this.reload();
+ this.getOptions();
+ } else {
+ this.$message.error(res.data.msg);
+ }
+ this.showNYear = false;
+ }).catch(e => {
+ this.$message.error(e.message);
+ }).finally(() => {
+ hide();
+ })
+ },
+ exportData(){
+ const columns = this.columns.filter(item=>item.dataIndex);
+ const arr = [];
+ const th = columns.map((item) => item.title);
+ arr.push(th);
+ this.data.forEach((d) => {
+ const td = columns.map((item) => d[item.dataIndex]);
+ arr.push(td);
+ });
+
+ let sheet = XLSX.utils.aoa_to_sheet(arr);
+ this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
}
},
diff --git a/src/views/sound/function/dict/place.vue b/src/views/sound/function/dict/place.vue
index 990d8b0..636d997 100644
--- a/src/views/sound/function/dict/place.vue
+++ b/src/views/sound/function/dict/place.vue
@@ -1,6 +1,52 @@
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -79,6 +128,19 @@
新增
+
+
+
+
+ {{ item.label }}
+
+
+
+
+ 批量复制
+
+
+
删除
+ 导出
@@ -130,8 +193,11 @@ import {
savePlace,
updatePlace,
removePlace,
- removeBatchPlace
+ removeBatchPlace,
+ getColumnOptions,
+ copyBatchPlace
} from "@/api/ecology/noise/function-noise-place";
+import XLSX from "xlsx";
// import moment from "moment";
export default {
name: "FunctionNoisePlace",
@@ -144,6 +210,11 @@ export default {
selection: [],
// 表格列配置
columns: [
+ {
+ title: "年份",
+ dataIndex: "year",
+ sorter: true,
+ },
{
title: "测点名称",
dataIndex: "placeName",
@@ -233,17 +304,22 @@ export default {
selectionList: [],
// 是否显示编辑弹窗
showEdit: false,
+ showNYear:false,
+ cYear: undefined,
+ nYear:undefined,
+ yearOptions: [],
// 表单数据
form: {},
loading: false,
rules: {
- placeName:[{required: true,message: '请选择测点名称'}],
- placeLng: [{required: true,message: '请输入测点经度',},],
- placeLat: [{required: true,message: '请输入测点纬度',},],
+ // placeName:[{required: true,message: '请选择测点名称'}],
+ // placeLng: [{required: true,message: '请输入测点经度',},],
+ // placeLat: [{required: true,message: '请输入测点纬度',},],
},
};
},
mounted() {
+ this.getOptions();
},
methods: {
/* 刷新表格 */
@@ -278,6 +354,7 @@ export default {
this.showEdit = false;
this.$message.success(res.data.msg);
this.reload();
+ this.getOptions();
} else {
this.$message.error(res.data.msg);
}
@@ -295,6 +372,7 @@ export default {
this.showEdit = false;
this.$message.success(res.data.msg);
this.reload();
+ this.getOptions();
} else {
this.$message.error(res.data.msg);
}
@@ -339,7 +417,54 @@ export default {
}).finally(() => {
hide();
})
- }
+ },
+ getOptions(){
+ getColumnOptions("year").then(res => {
+ console.log(res)
+ if (res.data.code == 0) {
+ this.yearOptions = res.data.data.map(item => {
+ return {
+ label: item,
+ value: item
+ }
+ })
+ }
+ })
+ },
+ setCYear(e){
+ this.cYear = e.key;
+ this.showNYear = true;
+ },
+ exportData(){
+ const columns = this.columns.filter(item=>item.dataIndex);
+ const arr = [];
+ const th = columns.map((item) => item.title);
+ arr.push(th);
+ this.data.forEach((d) => {
+ const td = columns.map((item) => d[item.dataIndex]);
+ arr.push(td);
+ });
+
+ let sheet = XLSX.utils.aoa_to_sheet(arr);
+ this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
+ },
+ copyBatch(){
+ const hide = this.$message.loading('请求中..', 0);
+ copyBatchPlace({cyear:Number(this.cYear),nyear:this.nYear}).then(res=>{
+ if (res.data.code === 0) {
+ this.$message.success(res.data.msg);
+ this.reload();
+ this.getOptions();
+ } else {
+ this.$message.error(res.data.msg);
+ }
+ this.showNYear = false;
+ }).catch(e => {
+ this.$message.error(e.message);
+ }).finally(() => {
+ hide();
+ })
+ },
},
};
diff --git a/src/views/sound/road/dict/leq-level.vue b/src/views/sound/road/dict/leq-level.vue
index 740f614..0ae09b8 100644
--- a/src/views/sound/road/dict/leq-level.vue
+++ b/src/views/sound/road/dict/leq-level.vue
@@ -1,6 +1,52 @@
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -57,10 +106,25 @@
:columns="columns"
:where="where"
:scroll="{ x: 'max-content' }"
+ :need-page="false"
+ @done="(d) => (data = d.data)"
>
新增
+
+
+
+
+ {{ item.label }}
+
+
+
+
+ 批量复制
+
+
+
删除
+ 导出
@@ -112,13 +177,19 @@ import {
saveLeqLevel,
updateLeqLevel,
removeLeqLevel,
- removeBatchLeqLevel
+ removeBatchLeqLevel,
+ getColumnOptions,
+ copyBatchLeqLevel
} from "@/api/ecology/noise/road-noise-leq-level";
+import {DownOutlined} from '@ant-design/icons-vue';
+
import { message } from 'ant-design-vue';
+import XLSX from "xlsx";
// import moment from "moment";
+
export default {
name: "RoadNoiseLeqLevel",
- components: {},
+ components: {DownOutlined},
data() {
return {
data: [],
@@ -127,6 +198,11 @@ export default {
selection: [],
// 表格列配置
columns: [
+ {
+ title: "年份",
+ dataIndex: "year",
+ sorter: true,
+ },
{
title: "时段",
dataIndex: "timeSlot",
@@ -173,8 +249,13 @@ export default {
where: {},
// 表格选中数据
selectionList: [],
+
// 是否显示编辑弹窗
showEdit: false,
+ showNYear:false,
+ cYear: undefined,
+ nYear:undefined,
+ yearOptions:[],
// 表单数据
form: {},
loading: false,
@@ -189,6 +270,7 @@ export default {
};
},
mounted() {
+ this.getOptions()
},
methods: {
minLeqChange(e){
@@ -231,6 +313,7 @@ export default {
this.showEdit = false;
this.$message.success(res.data.msg);
this.reload();
+ this.getOptions()
} else {
this.$message.error(res.data.msg);
}
@@ -248,6 +331,7 @@ export default {
this.showEdit = false;
this.$message.success(res.data.msg);
this.reload();
+ this.getOptions()
} else {
this.$message.error(res.data.msg);
}
@@ -292,8 +376,56 @@ export default {
}).finally(() => {
hide();
})
+ },
+ getOptions(){
+ getColumnOptions("year").then(res => {
+ console.log(res)
+ if (res.data.code == 0) {
+ this.yearOptions = res.data.data.map(item => {
+ return {
+ label: item,
+ value: item
+ }
+ })
+ }
+ })
+ },
+ setCYear(e){
+ this.cYear = e.key;
+ this.showNYear = true;
+ },
+ copyBatch(){
+ const hide = this.$message.loading('请求中..', 0);
+ copyBatchLeqLevel({cyear:Number(this.cYear),nyear:this.nYear}).then(res=>{
+ if (res.data.code === 0) {
+ this.$message.success(res.data.msg);
+ this.reload();
+ this.getOptions();
+ } else {
+ this.$message.error(res.data.msg);
+ }
+ this.showNYear = false;
+ }).catch(e => {
+ this.$message.error(e.message);
+ }).finally(() => {
+ hide();
+ })
+ },
+ exportData(){
+ const columns = this.columns.filter(item=>item.dataIndex);
+ const arr = [];
+ const th = columns.map((item) => item.title);
+ arr.push(th);
+ this.data.forEach((d) => {
+ const td = columns.map((item) => d[item.dataIndex]);
+ arr.push(td);
+ });
+
+ let sheet = XLSX.utils.aoa_to_sheet(arr);
+ this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
}
+
},
};
diff --git a/src/views/sound/road/dict/place.vue b/src/views/sound/road/dict/place.vue
index 9ee67fc..a678a45 100644
--- a/src/views/sound/road/dict/place.vue
+++ b/src/views/sound/road/dict/place.vue
@@ -4,8 +4,6 @@
@@ -20,16 +18,16 @@
-
-
-
+
查询
-
重置
+
+
+
-
+
@@ -127,6 +125,8 @@
:columns="columns"
:where="where"
:scroll="{ x: 'max-content' }"
+ :need-page="false"
+ @done="(d) => (data = d.data)"
>
@@ -159,6 +159,7 @@
>删除
+ 导出
@@ -202,6 +203,7 @@ import {
getColumnOptions
} from "@/api/ecology/noise/road-noise-place";
import {DownOutlined} from '@ant-design/icons-vue';
+import XLSX from "xlsx";
// import moment from "moment";
export default {
name: "RoadNoisePlace",
@@ -319,6 +321,7 @@ export default {
form: {},
loading: false,
rules: {
+ year: [{required: true, message: '请输入年份'}],
placeName: [{required: true, message: '请选择测点名称'}],
placeLng: [{required: true, message: '请输入测点经度',},],
placeLat: [{required: true, message: '请输入测点纬度',},],
@@ -458,6 +461,19 @@ export default {
}).finally(() => {
hide();
})
+ },
+ exportData(){
+ const columns = this.columns.filter(item=>item.dataIndex);
+ const arr = [];
+ const th = columns.map((item) => item.title);
+ arr.push(th);
+ this.data.forEach((d) => {
+ const td = columns.map((item) => d[item.dataIndex]);
+ arr.push(td);
+ });
+
+ let sheet = XLSX.utils.aoa_to_sheet(arr);
+ this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
}
},
diff --git a/src/views/sound/zone/dict/leq-level.vue b/src/views/sound/zone/dict/leq-level.vue
index 0ea43ec..f6b2d3c 100644
--- a/src/views/sound/zone/dict/leq-level.vue
+++ b/src/views/sound/zone/dict/leq-level.vue
@@ -1,6 +1,52 @@
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -61,6 +110,19 @@
新增
+
+
+
+
+ {{ item.label }}
+
+
+
+
+ 批量复制
+
+
+
删除
+ 导出
@@ -112,13 +175,17 @@ import {
saveLeqLevel,
updateLeqLevel,
removeLeqLevel,
- removeBatchLeqLevel
+ removeBatchLeqLevel,
+ copyBatchLeqLevel,
+ getColumnOptions
} from "@/api/ecology/noise/zone-noise-leq-level";
import { message } from 'ant-design-vue';
+import {DownOutlined} from '@ant-design/icons-vue';
+import XLSX from "xlsx";
// import moment from "moment";
export default {
name: "ZoneNoiseLeqLevel",
- components: {},
+ components: {DownOutlined},
data() {
return {
data: [],
@@ -127,6 +194,11 @@ export default {
selection: [],
// 表格列配置
columns: [
+ {
+ title: "年份",
+ dataIndex: "year",
+ sorter: true,
+ },
{
title: "时段",
dataIndex: "timeSlot",
@@ -175,6 +247,10 @@ export default {
selectionList: [],
// 是否显示编辑弹窗
showEdit: false,
+ showNYear:false,
+ cYear: undefined,
+ nYear:undefined,
+ yearOptions:[],
// 表单数据
form: {},
loading: false,
@@ -189,6 +265,7 @@ export default {
};
},
mounted() {
+ this.getOptions()
},
methods: {
minLeqChange(e){
@@ -231,6 +308,7 @@ export default {
this.showEdit = false;
this.$message.success(res.data.msg);
this.reload();
+ this.getOptions()
} else {
this.$message.error(res.data.msg);
}
@@ -248,6 +326,7 @@ export default {
this.showEdit = false;
this.$message.success(res.data.msg);
this.reload();
+ this.getOptions()
} else {
this.$message.error(res.data.msg);
}
@@ -292,6 +371,53 @@ export default {
}).finally(() => {
hide();
})
+ },
+ getOptions(){
+ getColumnOptions("year").then(res => {
+ console.log(res)
+ if (res.data.code == 0) {
+ this.yearOptions = res.data.data.map(item => {
+ return {
+ label: item,
+ value: item
+ }
+ })
+ }
+ })
+ },
+ setCYear(e){
+ this.cYear = e.key;
+ this.showNYear = true;
+ },
+ copyBatch(){
+ const hide = this.$message.loading('请求中..', 0);
+ copyBatchLeqLevel({cyear:Number(this.cYear),nyear:this.nYear}).then(res=>{
+ if (res.data.code === 0) {
+ this.$message.success(res.data.msg);
+ this.reload();
+ this.getOptions();
+ } else {
+ this.$message.error(res.data.msg);
+ }
+ this.showNYear = false;
+ }).catch(e => {
+ this.$message.error(e.message);
+ }).finally(() => {
+ hide();
+ })
+ },
+ exportData(){
+ const columns = this.columns.filter(item=>item.dataIndex);
+ const arr = [];
+ const th = columns.map((item) => item.title);
+ arr.push(th);
+ this.data.forEach((d) => {
+ const td = columns.map((item) => d[item.dataIndex]);
+ arr.push(td);
+ });
+
+ let sheet = XLSX.utils.aoa_to_sheet(arr);
+ this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
}
},
diff --git a/src/views/sound/zone/dict/place.vue b/src/views/sound/zone/dict/place.vue
index 4e3c05b..6b80e15 100644
--- a/src/views/sound/zone/dict/place.vue
+++ b/src/views/sound/zone/dict/place.vue
@@ -1,6 +1,52 @@
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -74,6 +123,19 @@
新增
+
+
+
+
+ {{ item.label }}
+
+
+
+
+ 批量复制
+
+
+
删除
+ 导出
@@ -98,7 +161,8 @@
type="primary"
shape="round"
size="small"
- >修改修改
+
删除删除
+
@@ -125,12 +190,16 @@ import {
savePlace,
updatePlace,
removePlace,
- removeBatchPlace
+ removeBatchPlace,
+ copyBatchPlace,
+ getColumnOptions
} from "@/api/ecology/noise/zone-noise-place";
+import {DownOutlined} from '@ant-design/icons-vue';
+import XLSX from "xlsx";
// import moment from "moment";
export default {
name: "ZoneNoisePlace",
- components: {},
+ components: {DownOutlined},
data() {
return {
data: [],
@@ -139,6 +208,11 @@ export default {
selection: [],
// 表格列配置
columns: [
+ {
+ title: "年份",
+ dataIndex: "year",
+ sorter: true,
+ },
{
title: "测点名称",
dataIndex: "placeName",
@@ -213,22 +287,28 @@ export default {
// 表格搜索条件
where: {},
+ yearOptions: [],
// 表格选中数据
selectionList: [],
// 是否显示编辑弹窗
showEdit: false,
+ showNYear: false,
+ cYear: undefined,
+ nYear: undefined,
// 表单数据
form: {},
loading: false,
rules: {
- placeName:[{required: true,message: '请输入测点名称'}],
- placeCode:[{required: true,message: '请输入点位编码'}],
- placeLng: [{required: true,message: '请输入测点经度',},],
- placeLat: [{required: true,message: '请输入测点纬度',},],
+ year: [{required: true, message: '请输入年份'}],
+ placeName: [{required: true, message: '请输入测点名称'}],
+ placeCode: [{required: true, message: '请输入点位编码'}],
+ placeLng: [{required: true, message: '请输入测点经度',},],
+ placeLat: [{required: true, message: '请输入测点纬度',},],
},
};
},
mounted() {
+ this.getOptions();
},
methods: {
/* 刷新表格 */
@@ -238,6 +318,19 @@ export default {
where: this.where,
});
},
+ getOptions() {
+ getColumnOptions("year").then(res => {
+ console.log(res)
+ if (res.data.code == 0) {
+ this.yearOptions = res.data.data.map(item => {
+ return {
+ label: item,
+ value: item
+ }
+ })
+ }
+ })
+ },
/* 重置搜索 */
reset() {
this.where = {};
@@ -263,6 +356,8 @@ export default {
this.showEdit = false;
this.$message.success(res.data.msg);
this.reload();
+ this.getOptions();
+
} else {
this.$message.error(res.data.msg);
}
@@ -280,6 +375,8 @@ export default {
this.showEdit = false;
this.$message.success(res.data.msg);
this.reload();
+ this.getOptions();
+
} else {
this.$message.error(res.data.msg);
}
@@ -324,9 +421,44 @@ export default {
}).finally(() => {
hide();
})
+ },
+ setCYear(e) {
+ this.cYear = e.key;
+ this.showNYear = true;
+ },
+ copyBatch() {
+ const hide = this.$message.loading('请求中..', 0);
+ copyBatchPlace({cyear: Number(this.cYear), nyear: this.nYear}).then(res => {
+ if (res.data.code === 0) {
+ this.$message.success(res.data.msg);
+ this.reload();
+ this.getOptions();
+ } else {
+ this.$message.error(res.data.msg);
+ }
+ this.showNYear = false;
+ }).catch(e => {
+ this.$message.error(e.message);
+ }).finally(() => {
+ hide();
+ })
+ },
+ exportData() {
+ const columns = this.columns.filter(item => item.dataIndex);
+ const arr = [];
+ const th = columns.map((item) => item.title);
+ arr.push(th);
+ this.data.forEach((d) => {
+ const td = columns.map((item) => d[item.dataIndex]);
+ arr.push(td);
+ });
+
+ let sheet = XLSX.utils.aoa_to_sheet(arr);
+ this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
}
- },
+
+ }
};
diff --git a/src/views/sound/zone/statistic/source.vue b/src/views/sound/zone/statistic/source.vue
index 6a1ee38..8c8f912 100644
--- a/src/views/sound/zone/statistic/source.vue
+++ b/src/views/sound/zone/statistic/source.vue
@@ -1,193 +1,211 @@
-
-
-
-
-
-
-
-
- {{ item.label }}
-
-
-
-
-
-
- 查询
-
- 导出Excel
-
-
-
-
-
-
- (data = d.data)"
- >
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+ 查询
+
+ 导出Excel
+
+
+
+
+
+
+ (data = d.data)"
+ >
+
+
+
+