@@ -134,20 +134,7 @@ export default {
{title:"类型",dataIndex:"waterSourceProperty",},
{title:"监测时间",dataIndex:"reportTime"},
// {title:"监测时间",dataIndex:"reportTime",customRender: ({text}) => moment(text, "YYYY/MM/DD HH:mm:ss").format("YYYY/MM/DD")},
- {title:"应当监测项目个数",dataIndex:'index1',filters:[
- {
- text: '61',
- value: '61',
- },
- {
- text: '63',
- value: '63',
- },
- {
- text: '64',
- value: '64',
- },
- ]},
+ {title:"应当监测项目个数",dataIndex:'index1'},
{title:"未测个数",dataIndex:"index2",},
{title:"独立分析项目个数",dataIndex:"index3",
slots: {
@@ -228,6 +215,39 @@ export default {
/* 刷新表格 */
reload() {
this.getPageData()
+
+ this.columns[6].filters = []
+ if(this.where.drinkingWaterAnalyse.waterSourceType ==1 ){
+ // 地表水
+ this.columns[6].filters = [
+ {
+ text: '61',
+ value: '61',
+ },
+ {
+ text: '63',
+ value: '63',
+ },
+ {
+ text: '64',
+ value: '64',
+ },
+ ]
+ }
+ if(this.where.drinkingWaterAnalyse.waterSourceType ==2 ){
+ // 地下水
+ this.columns[6].filters = [
+ {
+ text: '39',
+ value: '39',
+ },
+ {
+ text: '94',
+ value: '94',
+ }
+ ]
+ }
+
// this.$refs.table.reload({
// where: this.where,
// });
@@ -249,7 +269,7 @@ export default {
const arr = [];
const th = columns.map((item) => item.title);
arr.push(th);
- this.data.forEach((d) => {
+ this.datasource.forEach((d) => {
const td = columns.map((item) => d[item.dataIndex]);
arr.push(td);
});
@@ -261,4 +281,18 @@ export default {
diff --git a/src/views/water/drinking-water/statistic/city/waterNutritional.vue b/src/views/water/drinking-water/statistic/city/waterNutritional.vue
new file mode 100644
index 0000000..00a5a03
--- /dev/null
+++ b/src/views/water/drinking-water/statistic/city/waterNutritional.vue
@@ -0,0 +1,160 @@
+
+
+
+
+
+
+ (data = d.data)"
+ >
+
+
+
+
+
+
+
+
+
diff --git a/src/views/water/drinking-water/statistic/city/waterQuality.vue b/src/views/water/drinking-water/statistic/city/waterQuality.vue
new file mode 100644
index 0000000..7e5d8fb
--- /dev/null
+++ b/src/views/water/drinking-water/statistic/city/waterQuality.vue
@@ -0,0 +1,165 @@
+
+
+
+
+
+
+ (data = d.data)"
+ >
+
+
+
+
+
+
+
+
+
diff --git a/src/views/water/drinking-water/statistic/city/waterQualityCount.vue b/src/views/water/drinking-water/statistic/city/waterQualityCount.vue
new file mode 100644
index 0000000..804f5e4
--- /dev/null
+++ b/src/views/water/drinking-water/statistic/city/waterQualityCount.vue
@@ -0,0 +1,160 @@
+
+
+
+
+
+
+
+ (data = d.data)"
+ >
+
+
+
+
+
+
+
+
+
diff --git a/src/views/water/drinking-water/statistic/city/waterQualityUp.vue b/src/views/water/drinking-water/statistic/city/waterQualityUp.vue
new file mode 100644
index 0000000..6c40826
--- /dev/null
+++ b/src/views/water/drinking-water/statistic/city/waterQualityUp.vue
@@ -0,0 +1,166 @@
+
+
+
+
+
+
+ (data = d.data)"
+ >
+
+
+
+
+
+
+
+
+
diff --git a/src/views/water/drinking-water/statistic/components/search.vue b/src/views/water/drinking-water/statistic/components/search.vue
index a0e882b..7d3e65b 100644
--- a/src/views/water/drinking-water/statistic/components/search.vue
+++ b/src/views/water/drinking-water/statistic/components/search.vue
@@ -192,11 +192,14 @@ export default {
this.where = this.searchForm;
this.filter = filterColumns.map((item) => item.dataIndex);
this.columnsKey = [...this.filter]
+ // 生成复选框
this.newCloumns = [...filterColumns];
+ // 缓存复选框
this.oldCloumns = [...filterColumns];
// this.$emit("buildColumns", filterColumns);
+ // 根据父级传回来需要去掉勾的值映射到复选框
this.initFilter(this.filterKeys);
-
+ // 将父级回传的搜索条件上传父级进行页面搜索
this.emitData(true)
},
@@ -205,7 +208,7 @@ export default {
emitData(val){
// if(val && this.where.startTime && this.where.endTime){
if(val){
- this.$emit("search", this.where);
+ this.searchData();
}
},
@@ -234,10 +237,18 @@ export default {
this.newCloumns = newCloumns;
},
reset() {
- this.where = {};
+ this.where = {
+ checked: 1,
+ limit: 10,
+ page: 1,
+ drinkingWaterAnalyse:{
+ regionLevel: this.where.drinkingWaterAnalyse.regionLevel
+ }
+ }
this.searchData();
},
searchData() {
+ this.where.filter = [...this.filter]
this.$emit("search", this.where);
},
exportFile() {
@@ -254,9 +265,11 @@ export default {
handleOk() {
this.visible = false;
this.oldCloumns = [...this.newCloumns];
+ // 选中的所有项
+ // console.log(this.columnsKey)
+ // 得到没有选中的项,然后在表头将没选中项去除
let filterKey = []
-
this.columnsKey.forEach(key=>{
if(this.filter.indexOf(key) == -1){
filterKey.push(key)
@@ -264,6 +277,8 @@ export default {
})
this.$emit("filterColumns", filterKey);
+
+ // this.$emit("selectKeys", this.columnsKey);
},
},
};