市级饮用水页面框架
This commit is contained in:
@@ -22,12 +22,12 @@
|
||||
<template #enumber="{ text, record ,index }">
|
||||
<div class="editable-cell">
|
||||
<div v-if="editableData[index] && editableData[index].edable=='index3'" class="editable-cell-input-wrapper">
|
||||
<a-input v-model:value="editableData[index]['index3']" @pressEnter="save(index)" />
|
||||
<a-input class="edit-input" v-model:value="editableData[index]['index3']" @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,'index3')" />
|
||||
{{ text || ' ' }}
|
||||
<edit-outlined class="editable-cell-icon" @click="edit(record,index,'index3')" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -35,7 +35,7 @@
|
||||
<template #wnumber="{ text, record ,index }">
|
||||
<div class="editable-cell">
|
||||
<div v-if="editableData[index] && editableData[index].edable=='index4'" class="editable-cell-input-wrapper">
|
||||
<a-input v-model:value="editableData[index]['index4']" @pressEnter="save(index)" />
|
||||
<a-input class="edit-input" v-model:value="editableData[index]['index4']" @pressEnter="save(index)" />
|
||||
<check-outlined class="editable-cell-icon-check" @click="save(index)" />
|
||||
</div>
|
||||
<div v-else class="editable-cell-text-wrapper">
|
||||
@@ -48,7 +48,7 @@
|
||||
<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 v-model:value="editableData[index]['index6']" @pressEnter="save(index)" />
|
||||
<a-input class="edit-input" v-model:value="editableData[index]['index6']" @pressEnter="save(index)" />
|
||||
<check-outlined class="editable-cell-icon-check" @click="save(index)" />
|
||||
</div>
|
||||
<div v-else class="editable-cell-text-wrapper">
|
||||
@@ -61,7 +61,7 @@
|
||||
<template #remark="{ text, record ,index }">
|
||||
<div class="editable-cell">
|
||||
<div v-if="editableData[index] && editableData[index].edable=='remark'" class="editable-cell-input-wrapper">
|
||||
<a-input v-model:value="editableData[index]['remark']" @pressEnter="save(index)" />
|
||||
<a-textarea class="edit-input" v-model:value="editableData[index]['remark']" @pressEnter="save(index)" />
|
||||
<check-outlined class="editable-cell-icon-check" @click="save(index)" />
|
||||
</div>
|
||||
<div v-else class="editable-cell-text-wrapper">
|
||||
@@ -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 {
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.editable-cell-input-wrapper{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.edit-input{
|
||||
margin-right: 5px;
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
.editable-cell-text-wrapper{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user