|
@@ -1,16 +1,34 @@
|
|
|
<template>
|
|
|
- <el-dialog :class="'fileImportDialog'" :visible.sync="isShow" width="800px" top="7%" :close-on-click-modal="false"
|
|
|
- :before-close="dialogBeforeClose">
|
|
|
- <el-form :model="fromDataRender" class="singledata" ref="single_form" label-width="80px" :rules="rules">
|
|
|
+ <el-dialog
|
|
|
+ :class="'fileImportDialog'"
|
|
|
+ :visible.sync="isShow"
|
|
|
+ width="800px"
|
|
|
+ top="7%"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :before-close="dialogBeforeClose"
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ :model="fromDataRender"
|
|
|
+ class="singledata"
|
|
|
+ ref="single_form"
|
|
|
+ label-width="80px"
|
|
|
+ :rules="rules"
|
|
|
+ >
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="名称字段" prop="titlePara">
|
|
|
- <el-input v-model="fromDataRender.titlePara" show-word-limit></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="fromDataRender.titlePara"
|
|
|
+ show-word-limit
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="行政区划编码字段" prop="areaCodePara">
|
|
|
- <el-input v-model="fromDataRender.areaCodePara" show-word-limit></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="fromDataRender.areaCodePara"
|
|
|
+ show-word-limit
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<!-- <el-col :span="11">
|
|
@@ -34,12 +52,18 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="第三方ID字段" prop="threeIdPara">
|
|
|
- <el-input v-model="fromDataRender.threeIdPara" show-word-limit></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="fromDataRender.threeIdPara"
|
|
|
+ show-word-limit
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="第三方表名" prop="tableName">
|
|
|
- <el-input v-model="fromDataRender.tableName" show-word-limit></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="fromDataRender.tableName"
|
|
|
+ show-word-limit
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -65,22 +89,39 @@
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="描述字段" prop="contentPara">
|
|
|
- <el-input v-model="fromDataRender.contentPara" show-word-limit></el-input>
|
|
|
+ <el-input
|
|
|
+ v-model="fromDataRender.contentPara"
|
|
|
+ show-word-limit
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-button type="text" style="float: right" @click="changeAdvancedOptionsStatue()">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ style="float: right"
|
|
|
+ @click="changeAdvancedOptionsStatue()"
|
|
|
+ >
|
|
|
高级选项
|
|
|
- <i v-show="!advancedOptionsShow" class="el-icon-caret-bottom el-icon--right"></i>
|
|
|
- <i v-show="advancedOptionsShow" class="el-icon-caret-top el-icon--right"></i>
|
|
|
+ <i
|
|
|
+ v-show="!advancedOptionsShow"
|
|
|
+ class="el-icon-caret-bottom el-icon--right"
|
|
|
+ ></i>
|
|
|
+ <i
|
|
|
+ v-show="advancedOptionsShow"
|
|
|
+ class="el-icon-caret-top el-icon--right"
|
|
|
+ ></i>
|
|
|
</el-button>
|
|
|
<!-- el-icon-caret-bottom -->
|
|
|
<!-- el-icon-caret-top -->
|
|
|
</el-row>
|
|
|
<!-- 高级选项 table -->
|
|
|
<div class="tableDiv" v-if="advancedOptionsShow">
|
|
|
- <el-table :data="listData" :class="['advanceOptionsTable']" max-height="250">
|
|
|
+ <el-table
|
|
|
+ :data="listData"
|
|
|
+ :class="['advanceOptionsTable']"
|
|
|
+ max-height="250"
|
|
|
+ >
|
|
|
<el-table-column label="名称">
|
|
|
<template slot-scope="scope">
|
|
|
<el-input v-model="scope.row.name"></el-input>
|
|
@@ -104,7 +145,10 @@
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button size="mini" @click="deleteAdvancedOptionsRow(scope.$index, scope)">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ @click="deleteAdvancedOptionsRow(scope.$index, scope)"
|
|
|
+ >
|
|
|
<i class="el-icon-minus"></i>
|
|
|
</el-button>
|
|
|
</template>
|
|
@@ -114,13 +158,13 @@
|
|
|
<!-- 高级选项 table end -->
|
|
|
</el-form>
|
|
|
|
|
|
- <CenterLocation
|
|
|
- v-bind="{
|
|
|
- isShow: isShowUpdateCenterDialog,
|
|
|
- center: centerPoint,
|
|
|
- beforeClose: beforeCloseUpdateCenterDialog,
|
|
|
- updateData: updateDataCenterLocation,
|
|
|
- }"
|
|
|
+ <CenterLocation
|
|
|
+ v-bind="{
|
|
|
+ isShow: isShowUpdateCenterDialog,
|
|
|
+ center: centerPoint,
|
|
|
+ beforeClose: beforeCloseUpdateCenterDialog,
|
|
|
+ updateData: updateDataCenterLocation,
|
|
|
+ }"
|
|
|
></CenterLocation>
|
|
|
|
|
|
<span slot="title" class="dialog-title">
|
|
@@ -232,7 +276,7 @@ export default {
|
|
|
let that = this;
|
|
|
if (this.listData.length > 0) {
|
|
|
let judge = this.listData.every(function (item) {
|
|
|
- return item.name != "" && item.paraName // != "" && item.unit;
|
|
|
+ return item.name != "" && item.paraName; // != "" && item.unit;
|
|
|
});
|
|
|
if (!judge) {
|
|
|
this.$message({
|
|
@@ -266,7 +310,7 @@ export default {
|
|
|
uploadData(file) {
|
|
|
let that = this;
|
|
|
// 上传loading
|
|
|
- const loading = this.$createLoading("数据新增中,请勿刷新!")
|
|
|
+ const loading = this.$createLoading("数据新增中,请勿刷新!");
|
|
|
switch (this.fileType) {
|
|
|
case "GeoJSON":
|
|
|
this.uploadGeoJSONFile(this.file, loading);
|
|
@@ -293,7 +337,11 @@ export default {
|
|
|
message: "文件上传成功!",
|
|
|
});
|
|
|
} else {
|
|
|
- that.$checkRequestCode(result);
|
|
|
+ // that.$checkRequestCode(result);
|
|
|
+ that.$message({
|
|
|
+ type: "error",
|
|
|
+ message: result.message,
|
|
|
+ });
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -318,7 +366,11 @@ export default {
|
|
|
message: "文件上传成功!",
|
|
|
});
|
|
|
} else {
|
|
|
- that.$checkRequestCode(result);
|
|
|
+ // that.$checkRequestCode(result);
|
|
|
+ that.$message({
|
|
|
+ type: "error",
|
|
|
+ message: result.message,
|
|
|
+ });
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -343,7 +395,11 @@ export default {
|
|
|
message: "文件上传成功!",
|
|
|
});
|
|
|
} else {
|
|
|
- that.$checkRequestCode(result);
|
|
|
+ // that.$checkRequestCode(result);
|
|
|
+ that.$message({
|
|
|
+ type: "error",
|
|
|
+ message: result.message,
|
|
|
+ });
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
@@ -484,7 +540,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /deep/ .el-form-item.is-required:not(.is-no-asterisk)>.el-form-item__label:before {
|
|
|
+ /deep/
|
|
|
+ .el-form-item.is-required:not(.is-no-asterisk)
|
|
|
+ > .el-form-item__label:before {
|
|
|
content: " ";
|
|
|
width: 0px;
|
|
|
margin-right: 0px;
|