|
@@ -63,10 +63,10 @@ export default {
|
|
|
else
|
|
|
this.vectorLayer.setVisible(false)
|
|
|
},
|
|
|
- layerType(next, prv) {
|
|
|
- this.layerType = next;
|
|
|
- this.getLayerInfo();
|
|
|
- },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
* 监听导入要素Id的变化
|
|
@@ -282,10 +282,10 @@ export default {
|
|
|
uploadForm.append('', this.uploadFile);
|
|
|
this.uploading = true;
|
|
|
addGisData(uploadForm).then(res => {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ if (res.code != 1) {
|
|
|
+ this.$message.error(`上传数据失败!`);
|
|
|
+ this.uploading = false;
|
|
|
+ }
|
|
|
this.loadingtext = "上传成功,正在获取数据……"
|
|
|
|
|
|
|
|
@@ -490,15 +490,26 @@ export default {
|
|
|
uploadId: this.impFeaturesId,
|
|
|
comfirmType: 'N'
|
|
|
}
|
|
|
- this.confirmImport(data);
|
|
|
+ this.$confirm(`即将取消数据导入, 是否继续?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.confirmImport(data);
|
|
|
+ }).catch(() => {});
|
|
|
+
|
|
|
},
|
|
|
confirmImport(data) {
|
|
|
+ this.loadingtext = data.uploadId == 'Y' ? '正在导入……' : '正在取消……'
|
|
|
this.uploading = true;
|
|
|
confirmDatasetImport(data).then(res => {
|
|
|
if (res.code == 1) {
|
|
|
this.$message.success('操作成功');
|
|
|
|
|
|
- this.clearSource();
|
|
|
+
|
|
|
+ this.vectorLayer.getSource().clear()
|
|
|
+ Object.assign(this.$data, this.$options.data())
|
|
|
+ this.getSouceList()
|
|
|
} else {
|
|
|
this.$message.error('操作失败,失败原因' + res.message);
|
|
|
}
|