|
@@ -0,0 +1,185 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div class="heaerCon">
|
|
|
+ <div class="miniBtn">
|
|
|
+ <!-- <el-button plain size="mini">导入监测数据包</el-button> -->
|
|
|
+ <!-- <el-button plain size="mini">导入核查</el-button> -->
|
|
|
+ <el-upload
|
|
|
+ class="upload-demo"
|
|
|
+ :on-change="handleChange"
|
|
|
+ :auto-upload="false"
|
|
|
+ :show-file-list="false"
|
|
|
+ :file-list="fileList"
|
|
|
+ :limit="1"
|
|
|
+ accept=".zip"
|
|
|
+ >
|
|
|
+ <el-button plain size="mini">导入监测数据包</el-button>
|
|
|
+ </el-upload>
|
|
|
+ </div>
|
|
|
+ <div class="showBtn">
|
|
|
+ <span @click="showPlin(false)" v-show="showExp">数据说明</span>
|
|
|
+ <span @click="showPlin(true)" v-show="!showExp" showExp="false"
|
|
|
+ >退出说明</span
|
|
|
+ >
|
|
|
+ <!-- <span>删除记录</span> -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-show="showExp" class="bodyCon">
|
|
|
+ <el-table
|
|
|
+ ref="singleTable"
|
|
|
+ :data="tableData"
|
|
|
+ highlight-current-row
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-table-column type="index" label="序号" width="50">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ property="name"
|
|
|
+ label="导入数据包"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column property="uploadtime" label="导入时间">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column property="uploaduser" label="操作人" width="120">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="导入结果" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.readstatus == 0">导入成功</span>
|
|
|
+ <span v-else>导入失败</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="pageNum"
|
|
|
+ :page-size="pageSize"
|
|
|
+ layout="total, prev, pager, next, jumper"
|
|
|
+ :total="total"
|
|
|
+ class="pagination"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ <div v-show="!showExp" class="expCon bodyCon">
|
|
|
+ <span
|
|
|
+ > 监测批次数据包括监测图斑、前期影像、后期影像,其中:监测图斑命名规则为6位行政区代码+8位日期批次时间戳+“tb”;影像命名规则为图斑编号+“DDOM”或“QDOM”。
|
|
|
+ </span>
|
|
|
+ <br />
|
|
|
+ <span>
|
|
|
+ 对数据要求说明:
|
|
|
+ <br />(1)数据格式支持.zip格式压缩包 <br />
|
|
|
+ (2)数据压缩包应按系统要求进行组织。 <br />
|
|
|
+ (3)数据压缩包中的数据坐标系为CGCS2000 <br />
|
|
|
+ (4)监测图斑Shp属性必须包含XZC(行政区名称)、JCBH(监测图斑编号)、QLX(前类型)、HLX(后类型)、LZB(中心点经度)、BZB(中心点维度)、JCMJ(监测面积(亩))、QSX(前时相)、HSX(后时相)。
|
|
|
+ 选择数据后,对(1)(2)进行检查,通过(1)(2)检查,确定上传后,在界面实时显示上传进度
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { ShapeUploadV1, FileList } from "@/api/ghss/hgxfx.js";
|
|
|
+export default {
|
|
|
+ components: {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 2,
|
|
|
+ total: 0,
|
|
|
+ showExp: true,
|
|
|
+ fileList: [], //文件
|
|
|
+ fileDataID: "", //存储上传文件获取到的id
|
|
|
+ tableData: [],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {},
|
|
|
+ mounted() {
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ showPlin(val) {
|
|
|
+ this.showExp = val;
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.pageSize = val;
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.pageNum = val;
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
+ init() {
|
|
|
+ FileList({
|
|
|
+ pageNum: this.pageNum,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ }).then((res) => {
|
|
|
+ this.tableData = res.rows;
|
|
|
+ this.total = res.total;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //上传文件
|
|
|
+ handleChange(file, fileList) {
|
|
|
+ this.fileDataID = "";
|
|
|
+ this.fileList = [];
|
|
|
+ if (fileList.length > 0) {
|
|
|
+ this.fileList = [fileList[fileList.length - 1]]; //这一步,是展示最后一次选择文件
|
|
|
+ }
|
|
|
+ const formdata = new FormData();
|
|
|
+ formdata.append("file", file.raw);
|
|
|
+ formdata.append("fromType", 2);
|
|
|
+ formdata.append("fromRoute", this.$route.path);
|
|
|
+ formdata.append("storeStats", "");
|
|
|
+ formdata.append("followup", 1);
|
|
|
+ ShapeUploadV1(formdata).then((res) => {
|
|
|
+ if (res.success) {
|
|
|
+ this.$message({
|
|
|
+ message: "导入文件成功!",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.fileDataID = res.data.id;
|
|
|
+ this.init();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+ watch: {},
|
|
|
+ watch: {},
|
|
|
+ beforeDestroy() {},
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.heaerCon {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin: 5px 0;
|
|
|
+ .miniBtn {
|
|
|
+ /deep/ .el-button--mini {
|
|
|
+ background: #0f7ac8;
|
|
|
+ border: none;
|
|
|
+ border-radius: 0;
|
|
|
+ color: #fff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .showBtn {
|
|
|
+ color: #169bd5;
|
|
|
+ }
|
|
|
+}
|
|
|
+/deep/.dialog-footer .el-button {
|
|
|
+ background-color: #3f94f53f;
|
|
|
+ border: 1px solid #3f93f5;
|
|
|
+}
|
|
|
+.expCon {
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+.bodyCon {
|
|
|
+ height: 36vh;
|
|
|
+ /deep/ .el-pagination button:disabled {
|
|
|
+ color: #fff;
|
|
|
+ background-color: rgba(75, 185, 250, 0.2) !important;
|
|
|
+ cursor: not-allowed;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|