江河水数据采集代码优化
This commit is contained in:
@@ -27,8 +27,8 @@
|
||||
<DownOutlined />
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<a-button @click="showModalWater" >水站导入</a-button>
|
||||
<a-modal v-model:visible="visibleWater" title="水站导入" :footer="null">
|
||||
|
||||
<!-- <a-modal v-model:visible="visibleWater" title="水站导入" :footer="null">
|
||||
<a-select allowClear placeholder="请选择站名" @change="currentSel" style="width:150px">
|
||||
<a-select-option
|
||||
v-for="item in form"
|
||||
@@ -43,7 +43,20 @@
|
||||
accept=".xls,.xlsx,.csv">
|
||||
<a-button key="submit" type="primary" :loading="loading">导入</a-button>
|
||||
</a-upload>
|
||||
</a-modal>
|
||||
</a-modal> -->
|
||||
<a-dropdown>
|
||||
<template #overlay>
|
||||
<a-menu @click="handleMenuClick">
|
||||
<a-menu-item v-for="item in form" :key="item.waterStationPointId">
|
||||
{{ item.stationName }}
|
||||
<a-upload :before-upload="importFileStation" @change="currentSel(item)" :showUploadList="false" accept=".xls,.xlsx,.csv">
|
||||
水站数据导入
|
||||
</a-upload>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button >水站导入 <DownOutlined /></a-button>
|
||||
</a-dropdown>
|
||||
<a-dropdown>
|
||||
<template #overlay>
|
||||
<a-menu style="word-spacing:10px;">
|
||||
@@ -128,6 +141,31 @@
|
||||
param: {}
|
||||
};
|
||||
},
|
||||
created(){
|
||||
this.form=[];
|
||||
listInfo().then((res) => {
|
||||
if (res.data.code == 0) {
|
||||
console.log(res.data.data)
|
||||
this.visibleWater = true;
|
||||
// this.form = res.data.data.map(item => {
|
||||
// return {
|
||||
// riverName: item.riverName,
|
||||
// stationName: item.stationName,
|
||||
// system:item.system,
|
||||
// waterStationPointId:item.waterStationPointId,
|
||||
// waterTarget:item.waterTarget
|
||||
// }
|
||||
// })
|
||||
res.data.data.forEach(e => {
|
||||
this.form.push(e);
|
||||
});
|
||||
console.log("this.form"+this.form[0].stationName)
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
showModalWater(){
|
||||
@@ -136,6 +174,7 @@
|
||||
console.log(res.data.data)
|
||||
this.visibleWater = true;
|
||||
this.form = res.data.data
|
||||
console.log("this.form"+this.form.stationName)
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
@@ -301,6 +340,7 @@
|
||||
const tasks = [];
|
||||
if (billData.length > 0) {
|
||||
if (this.exportType == "1") {
|
||||
console.log(billName);
|
||||
tasks.push(
|
||||
saveWaterFunctionAreaBill({
|
||||
billName: billName,
|
||||
@@ -309,6 +349,7 @@
|
||||
})
|
||||
);
|
||||
} else {
|
||||
console.log(billName);
|
||||
tasks.push(
|
||||
saveRiverStationBill({
|
||||
billName: billName,
|
||||
|
||||
Reference in New Issue
Block a user