glj-代码提交
This commit is contained in:
parent
39c3fb6446
commit
e7fc73ff1f
|
@ -36,4 +36,13 @@ export const approval = (data) => {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export const importTemplate = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/' + moduleName + '/ui/remoteSensing/importTemplate',
|
||||||
|
headers:{'Content-Type': 'multipart/form-data'},
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
};
|
};
|
|
@ -33,7 +33,7 @@
|
||||||
<el-select class="form-select" size="default" clearable placeholder="Select status"
|
<el-select class="form-select" size="default" clearable placeholder="Select status"
|
||||||
v-model="state.status">
|
v-model="state.status">
|
||||||
<el-option v-for="(item, index) in state.options_status" :value="item.value" :key="index"
|
<el-option v-for="(item, index) in state.options_status" :value="item.value" :key="index"
|
||||||
:label="item.label" />
|
:label="item.label" style="height: 45px;" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
|
@ -44,6 +44,14 @@
|
||||||
Search
|
Search
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<el-upload ref="upFileRef" class="upload-demo" :accept="'.xls,.xlsx'" :auto-upload="false"
|
||||||
|
:on-change="addRemoteSensingData" :show-file-list="false" style="margin-top:15px">
|
||||||
|
<template #trigger>
|
||||||
|
<el-button type="success">Upload</el-button>
|
||||||
|
</template>
|
||||||
|
</el-upload>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -66,8 +74,10 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="Operate" label="Operate" align="center" width="200" show-overflow-tooltip>
|
<el-table-column prop="Operate" label="Operate" align="center" width="200" show-overflow-tooltip>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button v-if="scope.row.status === 1" size="small" text type="primary" @click="approvalDataOpen(scope.row)">start</el-button>
|
<el-button v-if="scope.row.status === 1" size="small" text type="primary"
|
||||||
<el-button v-if="scope.row.status === 2 || scope.row.status === 3" size="small" text type="primary" @click="addAddressOpen(scope.row)">add_address</el-button>
|
@click="approvalDataOpen(scope.row)">start</el-button>
|
||||||
|
<el-button v-if="scope.row.status === 2 || scope.row.status === 3" size="small" text type="primary"
|
||||||
|
@click="addAddressOpen(scope.row)">add_address</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -86,15 +96,18 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, onMounted } from 'vue';
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
import { getRemoteSensingSourceDataByCondition, getPagesRemoteSensingSourceData } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
|
import { getRemoteSensingSourceDataByCondition, getPagesRemoteSensingSourceData, importTemplate } from "/@/api/remoteSensingSourceData/remoteSensingSourceData.js";
|
||||||
import { getDisasterPage } from '/@/api/data/otherData.js'
|
import { getDisasterPage } from '/@/api/data/otherData.js'
|
||||||
import disasterTable from "/@/components/table/DisasterTable.vue";
|
import disasterTable from "/@/components/table/DisasterTable.vue";
|
||||||
import approvalData from "./approvalData.vue";
|
import approvalData from "./approvalData.vue";
|
||||||
import addAddress from "./addAddress.vue";
|
import addAddress from "./addAddress.vue";
|
||||||
|
import { ElMessageBox, ElMessage } from 'element-plus';
|
||||||
|
|
||||||
|
|
||||||
// import { getList as getDisasterPage } from '/@/api/disasterInfo/index';
|
// import { getList as getDisasterPage } from '/@/api/disasterInfo/index';
|
||||||
const approvalDataRef = ref();
|
const approvalDataRef = ref();
|
||||||
const addAddressRef = ref();
|
const addAddressRef = ref();
|
||||||
|
const upFileRef = ref();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
disasterData: {
|
disasterData: {
|
||||||
data: [],
|
data: [],
|
||||||
|
@ -228,6 +241,24 @@ const getData = () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const addRemoteSensingData = (data, fileList) => {
|
||||||
|
console.log(data, "data");
|
||||||
|
console.log(fileList, "fileListfileList");
|
||||||
|
if (state.disasterId == null) {
|
||||||
|
ElMessage.warning('Please select the disaster first');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const form = new FormData();
|
||||||
|
form.append("file", data.raw);
|
||||||
|
form.append("disasterId", state.disasterId);
|
||||||
|
importTemplate(form).then(da => {
|
||||||
|
ElMessage.success("success");
|
||||||
|
emit('callback');
|
||||||
|
searchRemoteSensingSourceData();
|
||||||
|
upFileRef.value.clearFiles();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询遥感元数据
|
// 查询遥感元数据
|
||||||
const searchRemoteSensingSourceData = () => {
|
const searchRemoteSensingSourceData = () => {
|
||||||
// 获取选择的卫星类型
|
// 获取选择的卫星类型
|
||||||
|
@ -311,7 +342,6 @@ const searchRemoteSensingSourceData = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const reviseDownload = (row) => {
|
const reviseDownload = (row) => {
|
||||||
|
|
||||||
console.log(row, "rowrowrow");
|
console.log(row, "rowrowrow");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -566,4 +596,8 @@ const searchDisasterDate = () => {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::v-deep .el-input__wrapper {
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
12
yarn.lock
12
yarn.lock
|
@ -2610,6 +2610,13 @@ jsonfile@^6.0.1:
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
graceful-fs "^4.1.6"
|
graceful-fs "^4.1.6"
|
||||||
|
|
||||||
|
leaflet-control-geocoder@^2.4.0:
|
||||||
|
version "2.4.0"
|
||||||
|
resolved "https://registry.npmmirror.com/leaflet-control-geocoder/-/leaflet-control-geocoder-2.4.0.tgz#f6c00ae00b53d2ac5908e874a9aefd414f615f22"
|
||||||
|
integrity sha512-b2QlxuFd40uIDbnoUI3U9fzfnB4yKUYlmsXjquJ2d2YjoJqnyVYcIJeErAVv3kPvX3nI0gzvBq1XHMgSVFrGkQ==
|
||||||
|
optionalDependencies:
|
||||||
|
open-location-code "^1.0.0"
|
||||||
|
|
||||||
leaflet-draw@^1.0.4:
|
leaflet-draw@^1.0.4:
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
resolved "https://registry.npmjs.org/leaflet-draw/-/leaflet-draw-1.0.4.tgz"
|
resolved "https://registry.npmjs.org/leaflet-draw/-/leaflet-draw-1.0.4.tgz"
|
||||||
|
@ -2812,6 +2819,11 @@ once@^1.3.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
wrappy "1"
|
wrappy "1"
|
||||||
|
|
||||||
|
open-location-code@^1.0.0:
|
||||||
|
version "1.0.3"
|
||||||
|
resolved "https://registry.npmmirror.com/open-location-code/-/open-location-code-1.0.3.tgz#5ea1a34ee5221c6cafa04392e1bd906fd7488f7e"
|
||||||
|
integrity sha512-DBm14BSn40Ee241n80zIFXIT6+y8Tb0I+jTdosLJ8Sidvr2qONvymwqymVbHV2nS+1gkDZ5eTNpnOIVV0Kn2fw==
|
||||||
|
|
||||||
optimist@0.3:
|
optimist@0.3:
|
||||||
version "0.3.7"
|
version "0.3.7"
|
||||||
resolved "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz"
|
resolved "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz"
|
||||||
|
|
Loading…
Reference in New Issue