Merge remote-tracking branch 'origin/yinyongshui'
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
@filterColumns="changeFilter"
|
||||
:visiable="visiable"
|
||||
:loading="loading"
|
||||
:loadSearch="true"
|
||||
/>
|
||||
<!-- 表格 -->
|
||||
<ele-pro-table
|
||||
|
||||
@@ -47,13 +47,13 @@
|
||||
|
||||
<template #desc="{ text, record ,index }">
|
||||
<div class="editable-cell">
|
||||
<div v-if="editableData[index] && editableData[index].edable=='index6'" class="editable-cell-input-wrapper">
|
||||
<a-input class="edit-input" v-model:value="editableData[index]['index6']" @pressEnter="save(index)" />
|
||||
<div v-if="editableData[index] && editableData[index].edable=='reason'" class="editable-cell-input-wrapper">
|
||||
<a-input class="edit-input" v-model:value="editableData[index]['reason']" @pressEnter="save(index)" />
|
||||
<check-outlined class="editable-cell-icon-check" @click="save(index)" />
|
||||
</div>
|
||||
<div v-else class="editable-cell-text-wrapper">
|
||||
{{ text || ' ' }}
|
||||
<edit-outlined class="editable-cell-icon" @click="edit(record,index,'index6')" />
|
||||
<edit-outlined class="editable-cell-icon" @click="edit(record,index,'reason')" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -131,10 +131,10 @@ export default {
|
||||
{title:"县城",dataIndex:"county",slots:{customRender:'county'}},
|
||||
{title:"水源地名称",dataIndex:"sourceWaterName",},
|
||||
{title:"类型",dataIndex:"waterSourceProperty",},
|
||||
{title:"监测时间",dataIndex:"reportTime"},
|
||||
{title:"监测时间",dataIndex:"monitorTime"},
|
||||
// {title:"监测时间",dataIndex:"reportTime",customRender: ({text}) => moment(text, "YYYY/MM/DD HH:mm:ss").format("YYYY/MM/DD")},
|
||||
{title:"应当监测项目个数",dataIndex:'index1'},
|
||||
{title:"未测个数",dataIndex:"index2",},
|
||||
{title:"应当监测项目个数",dataIndex:'index1', },
|
||||
{title:"未测个数",dataIndex:"noCheckNum",},
|
||||
{title:"独立分析项目个数",dataIndex:"index3",
|
||||
slots: {
|
||||
customRender: 'enumber',
|
||||
@@ -143,8 +143,8 @@ export default {
|
||||
{title:"外送分析项目个数",dataIndex:"index4", slots: {
|
||||
customRender: 'wnumber',
|
||||
},},
|
||||
{title:"超标项目",dataIndex:"index5",},
|
||||
{title:"情况说明或原因",dataIndex:"index6", slots: {
|
||||
{title:"超标项目",dataIndex:"exceedingStandard",},
|
||||
{title:"情况说明或原因",dataIndex:"reason", slots: {
|
||||
customRender: 'desc',
|
||||
}},
|
||||
{title:"备注",dataIndex:"remark",slots: {
|
||||
|
||||
@@ -130,6 +130,9 @@ export default {
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
},
|
||||
loadSearch:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -199,7 +202,8 @@ export default {
|
||||
// 根据父级传回来需要去掉勾的值映射到复选框
|
||||
this.initFilter(this.filterKeys);
|
||||
// 将父级回传的搜索条件上传父级进行页面搜索
|
||||
this.emitData(true)
|
||||
let isSearch = (this.where.monitorStartTime && this.where.monitorEndTime) || this.loadSearch;
|
||||
this.emitData(isSearch)
|
||||
|
||||
},
|
||||
methods: {
|
||||
@@ -246,7 +250,9 @@ export default {
|
||||
},
|
||||
searchData() {
|
||||
if(Array.isArray(this.filter) && this.filter.length){
|
||||
this.where.filter = [...this.filter]
|
||||
this.where.filter = this.changeKeyToName([...this.filter])
|
||||
}else{
|
||||
delete this.where.filter;
|
||||
}
|
||||
const sectionNames = this.where.sectionNames
|
||||
if(sectionNames && Array.isArray(sectionNames) && !sectionNames.length){
|
||||
@@ -254,6 +260,17 @@ export default {
|
||||
}
|
||||
this.$emit("search", this.where);
|
||||
},
|
||||
|
||||
// 将key转文字
|
||||
changeKeyToName(keys){
|
||||
const targetNames = filterColumns.map(item=>{
|
||||
if(keys.indexOf(item.dataIndex)>-1){
|
||||
return item.title
|
||||
}
|
||||
})
|
||||
return targetNames;
|
||||
},
|
||||
|
||||
exportFile() {
|
||||
this.$emit("exportFile");
|
||||
},
|
||||
|
||||
@@ -130,6 +130,9 @@ export default {
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
},
|
||||
loadSearch:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -199,7 +202,8 @@ export default {
|
||||
// 根据父级传回来需要去掉勾的值映射到复选框
|
||||
this.initFilter(this.filterKeys);
|
||||
// 将父级回传的搜索条件上传父级进行页面搜索
|
||||
this.emitData(true)
|
||||
let isSearch = (this.where.monitorStartTime && this.where.monitorEndTime) || this.loadSearch;
|
||||
this.emitData(isSearch)
|
||||
|
||||
},
|
||||
methods: {
|
||||
@@ -246,10 +250,22 @@ export default {
|
||||
},
|
||||
searchData() {
|
||||
if(Array.isArray(this.filter) && this.filter.length){
|
||||
this.where.filter = [...this.filter]
|
||||
this.where.filter = this.changeKeyToName([...this.filter])
|
||||
}else{
|
||||
delete this.where.filter;
|
||||
}
|
||||
this.$emit("search", this.where);
|
||||
},
|
||||
// 将key转文字
|
||||
changeKeyToName(keys){
|
||||
const targetNames = filterColumns.map(item=>{
|
||||
if(keys.indexOf(item.dataIndex)>-1){
|
||||
return item.title
|
||||
}
|
||||
})
|
||||
return targetNames;
|
||||
},
|
||||
|
||||
exportFile() {
|
||||
this.$emit("exportFile");
|
||||
},
|
||||
|
||||
@@ -130,6 +130,9 @@ export default {
|
||||
},
|
||||
visiable:{
|
||||
typeof:Boolean
|
||||
},
|
||||
loadSearch:{
|
||||
typeof:Boolean
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -199,7 +202,8 @@ export default {
|
||||
// 根据父级传回来需要去掉勾的值映射到复选框
|
||||
this.initFilter(this.filterKeys);
|
||||
// 将父级回传的搜索条件上传父级进行页面搜索
|
||||
this.emitData(true)
|
||||
let isSearch = (this.where.monitorStartTime && this.where.monitorEndTime) || this.loadSearch;
|
||||
this.emitData(isSearch)
|
||||
|
||||
},
|
||||
methods: {
|
||||
@@ -246,9 +250,20 @@ export default {
|
||||
},
|
||||
searchData() {
|
||||
if(Array.isArray(this.filter) && this.filter.length){
|
||||
this.where.filter = [...this.filter]
|
||||
this.where.filter = this.changeKeyToName([...this.filter])
|
||||
}else{
|
||||
delete this.where.filter;
|
||||
}
|
||||
this.$emit("search", this.where);
|
||||
},
|
||||
// 将key转文字
|
||||
changeKeyToName(keys){
|
||||
const targetNames = filterColumns.map(item=>{
|
||||
if(keys.indexOf(item.dataIndex)>-1){
|
||||
return item.title
|
||||
}
|
||||
})
|
||||
return targetNames;
|
||||
},
|
||||
exportFile() {
|
||||
this.$emit("exportFile");
|
||||
|
||||
@@ -132,10 +132,10 @@ export default {
|
||||
{title:"县城",dataIndex:"county",slots:{customRender:'county'}},
|
||||
{title:"水源地名称",dataIndex:"sourceWaterName",},
|
||||
{title:"类型",dataIndex:"waterSourceProperty",},
|
||||
{title:"监测时间",dataIndex:"reportTime"},
|
||||
{title:"监测时间",dataIndex:"monitorTime"},
|
||||
// {title:"监测时间",dataIndex:"reportTime",customRender: ({text}) => moment(text, "YYYY/MM/DD HH:mm:ss").format("YYYY/MM/DD")},
|
||||
{title:"应当监测项目个数",dataIndex:'index1'},
|
||||
{title:"未测个数",dataIndex:"index2",},
|
||||
{title:"应当监测项目个数",dataIndex:'index1', },
|
||||
{title:"未测个数",dataIndex:"noCheckNum",},
|
||||
{title:"独立分析项目个数",dataIndex:"index3",
|
||||
slots: {
|
||||
customRender: 'enumber',
|
||||
@@ -144,8 +144,8 @@ export default {
|
||||
{title:"外送分析项目个数",dataIndex:"index4", slots: {
|
||||
customRender: 'wnumber',
|
||||
},},
|
||||
{title:"超标项目",dataIndex:"index5",},
|
||||
{title:"情况说明或原因",dataIndex:"index6", slots: {
|
||||
{title:"超标项目",dataIndex:"exceedingStandard",},
|
||||
{title:"情况说明或原因",dataIndex:"reason", slots: {
|
||||
customRender: 'desc',
|
||||
}},
|
||||
{title:"备注",dataIndex:"remark",slots: {
|
||||
|
||||
Reference in New Issue
Block a user