可编辑单元格
This commit is contained in:
@@ -10,16 +10,23 @@ export const analysePageData = function (data) {
|
|||||||
|
|
||||||
//市级—报送情况说明表
|
//市级—报送情况说明表
|
||||||
export const pageDescListUrl = '/drinkingWater/drinkingWater/getDescripForm';
|
export const pageDescListUrl = '/drinkingWater/drinkingWater/getDescripForm';
|
||||||
|
export const getDescripForm = function (data) {
|
||||||
|
return axios.post(pageDescListUrl,data)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//市级—取水量统计
|
//市级—取水量统计
|
||||||
export const pageanalyseListUrl = '/drinkingWater/drinkingWater/AnalysePage';
|
export const pageanalyseListUrl = '/drinkingWater/drinkingWater/AnalysePage';
|
||||||
|
export const getWaterCount = function (data) {
|
||||||
|
return axios.post(pageanalyseListUrl,data)
|
||||||
export const getPageDescList = function (data) {
|
|
||||||
return axios.get("/drinkingWater/drinkingWater/getDescripForm",{params:data})
|
|
||||||
// return axios.get("/drinkingWater/drinkingWater/AnalysePage",{params:data})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 县级
|
// 县级
|
||||||
//监测数据报送表
|
//监测数据报送表
|
||||||
export const countyPageBsaeListUrl = '/drinkingWater/drinkingWater/CountyAnalysePage';
|
export const countyPageBsaeListUrl = '/drinkingWater/drinkingWater/CountyAnalysePage';
|
||||||
|
export const countyPageBsaeData = function (data) {
|
||||||
|
return axios.post(countyPageBsaeListUrl,data)
|
||||||
|
}
|
||||||
@@ -50,10 +50,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #enumber="{ text, record ,index }">
|
<template #enumber="{ text, record ,index }">
|
||||||
|
|
||||||
<div class="editable-cell">
|
<div class="editable-cell">
|
||||||
<div v-if="editableData[record.key]" class="editable-cell-input-wrapper">
|
<div v-if="editableData.length && editableData[index].drinkingWaterId" class="editable-cell-input-wrapper">
|
||||||
<a-input v-model:value="editableData[record.key].name" @pressEnter="save(record.key)" />
|
<a-input v-model:value="editableData[index].place" @pressEnter="save(record)" />
|
||||||
<check-outlined class="editable-cell-icon-check" @click="save(record.key)" />
|
<check-outlined class="editable-cell-icon-check" @click="save(record)" />
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="editable-cell-text-wrapper">
|
<div v-else class="editable-cell-text-wrapper">
|
||||||
{{ text || ' ' }}
|
{{ text || ' ' }}
|
||||||
@@ -71,9 +72,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import XLSX from "xlsx";
|
import XLSX from "xlsx";
|
||||||
import {
|
import {
|
||||||
// pageDescListUrl,.0
|
getDescripForm
|
||||||
pageBsaeListUrl,
|
|
||||||
getPageDescList
|
|
||||||
} from "@/api/ecology/new-drinking-water";
|
} from "@/api/ecology/new-drinking-water";
|
||||||
|
|
||||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||||
@@ -115,7 +114,6 @@ export default {
|
|||||||
bill: {},
|
bill: {},
|
||||||
editableData:[],
|
editableData:[],
|
||||||
// 表格数据接口
|
// 表格数据接口
|
||||||
url: pageBsaeListUrl,
|
|
||||||
datasource:{},
|
datasource:{},
|
||||||
selection: [],
|
selection: [],
|
||||||
columns:[
|
columns:[
|
||||||
@@ -164,31 +162,32 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.loadOptionData();
|
|
||||||
this.reload()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
// // 获取列表数据
|
// 获取列表数据
|
||||||
// getPageData(){
|
getPageData(){
|
||||||
// this.loading = true;
|
this.loading = true;
|
||||||
// cityAverageNutrition(this.where).then(res=>{
|
getDescripForm(this.where).then(res=>{
|
||||||
// this.loading = false;
|
this.loading = false;
|
||||||
// if(res.data.code){
|
if(res.data.code){
|
||||||
// this.$message.error(res.data.msg);
|
this.$message.error(res.data.msg);
|
||||||
// this.datasource = []
|
this.datasource = []
|
||||||
// }else{
|
}else{
|
||||||
// this.datasource = res.data.data
|
this.datasource = res.data.data
|
||||||
// }
|
}
|
||||||
// }).catch(()=>{
|
}).catch(()=>{
|
||||||
// this.loading = false;
|
this.loading = false;
|
||||||
// })
|
})
|
||||||
// },
|
},
|
||||||
|
|
||||||
//编辑单元格
|
//编辑单元格
|
||||||
edit(item,index){
|
edit(item,index){
|
||||||
console.log('key',item.drinkingWaterId)
|
this.editableData[index] = item
|
||||||
console.log('index',index)
|
},
|
||||||
|
|
||||||
|
save(item){
|
||||||
|
console.log('item',item)
|
||||||
},
|
},
|
||||||
|
|
||||||
JumpFieldClick(record, column) {
|
JumpFieldClick(record, column) {
|
||||||
@@ -206,20 +205,10 @@ export default {
|
|||||||
},
|
},
|
||||||
/* 刷新表格 */
|
/* 刷新表格 */
|
||||||
reload() {
|
reload() {
|
||||||
|
this.getPageData()
|
||||||
// this.$refs.table.reload({
|
// this.$refs.table.reload({
|
||||||
// where: this.where,
|
// where: this.where,
|
||||||
// });
|
// });
|
||||||
|
|
||||||
getPageDescList(this.where).then((res) => {
|
|
||||||
console.log(res.data.data);
|
|
||||||
if (res.data.code == 0) {
|
|
||||||
// this.$message.success(res.data.msg);
|
|
||||||
this.datasource = res.data.data
|
|
||||||
} else {
|
|
||||||
this.$message.error(res.data.msg);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<a-row>
|
<a-row>
|
||||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
<a-form-item label="水源类型:">
|
<a-form-item label="水源类型:">
|
||||||
<a-select v-model:value="where.waterSourceType" allowClear showSearch>
|
<a-select v-model:value="where.drinkingWaterAnalyse.waterSourceType" allowClear showSearch>
|
||||||
<a-select-option :value="'1'">地表水</a-select-option>
|
<a-select-option :value="'1'">地表水</a-select-option>
|
||||||
<a-select-option :value="'2'">地下水</a-select-option>
|
<a-select-option :value="'2'">地下水</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
<a-form-item label="水源状态:">
|
<a-form-item label="水源状态:">
|
||||||
<a-select v-model:value="where.drinkingWaterType" allowClear showSearch>
|
<a-select v-model:value="where.drinkingWaterAnalyse.drinkingWaterType" allowClear showSearch>
|
||||||
<a-select-option :value="'1'">在用</a-select-option>
|
<a-select-option :value="'1'">在用</a-select-option>
|
||||||
<a-select-option :value="'2'">备用</a-select-option>
|
<a-select-option :value="'2'">备用</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<a-row>
|
<a-row>
|
||||||
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
<a-col :lg="6" :md="12" :sm="24" :xs="24">
|
||||||
<a-form-item label="断面名称:">
|
<a-form-item label="断面名称:">
|
||||||
<a-select v-model:value="where.sectionName" allowClear showSearch>
|
<a-select v-model:value="where.drinkingWaterAnalyse.sectionName" mode="multiple" allowClear showSearch>
|
||||||
<a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }}
|
<a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -136,7 +136,9 @@ export default {
|
|||||||
return {
|
return {
|
||||||
indeterminate:false,
|
indeterminate:false,
|
||||||
checkAll: true,
|
checkAll: true,
|
||||||
where: {},
|
where: {
|
||||||
|
drinkingWaterAnalyse:{}
|
||||||
|
},
|
||||||
filter:[],
|
filter:[],
|
||||||
columnsKey:[],
|
columnsKey:[],
|
||||||
locale,
|
locale,
|
||||||
|
|||||||
Reference in New Issue
Block a user