|
@@ -14,6 +14,7 @@
|
|
|
:show-file-list="false"
|
|
|
:file-list="fileList"
|
|
|
:limit="1"
|
|
|
+ accept=".zip"
|
|
|
>
|
|
|
<el-tooltip
|
|
|
v-if="fileList.length > 0"
|
|
@@ -92,20 +93,14 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.model.fwlx = this.fwlist[this.$props.keys[0]].id;
|
|
|
+ // this.model.fwlx = this.fwlist[this.$props.keys[0]].id;
|
|
|
},
|
|
|
methods: {
|
|
|
- //切换
|
|
|
- onChangeRange(fwlx) {
|
|
|
- this.clearAll();
|
|
|
- this.model.fwlx = fwlx;
|
|
|
- },
|
|
|
-
|
|
|
//上传文件
|
|
|
handleChange(file, fileList) {
|
|
|
if (fileList.length > 0) {
|
|
|
this.fileList = [fileList[fileList.length - 1]]; //这一步,是展示最后一次选择文件
|
|
|
- this.clearAll();
|
|
|
+ this.clearAll(false);
|
|
|
}
|
|
|
const formdata = new FormData();
|
|
|
formdata.append("file", file.raw);
|
|
@@ -146,7 +141,7 @@ export default {
|
|
|
clampToGround: true,
|
|
|
outline: true,
|
|
|
outlineWidth: 5,
|
|
|
- outlineColor: Cesium.Color.BLUE,
|
|
|
+ outlineColor: Cesium.Color.RED,
|
|
|
},
|
|
|
});
|
|
|
}
|
|
@@ -159,7 +154,7 @@ export default {
|
|
|
handleChange1(file, fileList) {
|
|
|
if (fileList.length > 0) {
|
|
|
this.fileList = [fileList[fileList.length - 1]]; //这一步,是展示最后一次选择文件
|
|
|
- this.clearAll();
|
|
|
+ this.clearAll(false);
|
|
|
}
|
|
|
const formdata = new FormData();
|
|
|
|
|
@@ -299,21 +294,25 @@ export default {
|
|
|
},
|
|
|
|
|
|
//清除
|
|
|
- clearAll() {
|
|
|
+ clearAll(clearfile = true) {
|
|
|
//销毁上传创建的面
|
|
|
viewer.entities.removeAll();
|
|
|
this.model.xzfw = "";
|
|
|
this.model.xzmj = 0;
|
|
|
+ if (clearfile) {
|
|
|
+ this.fileDataID = "";
|
|
|
+ this.fileList = [];
|
|
|
+ }
|
|
|
common.clearHandlerDrawing("Polygon");
|
|
|
},
|
|
|
//输出:重置
|
|
|
reset() {
|
|
|
- this.model = {
|
|
|
- fwlx: this.fwlist[this.$props.keys[0]].id,
|
|
|
- xzfw: "",
|
|
|
- xzmj: 0,
|
|
|
- };
|
|
|
- this.fileList = []; //文件
|
|
|
+ // this.model = {
|
|
|
+ // fwlx: this.fwlist[this.$props.keys[0]].id,
|
|
|
+ // xzfw: "",
|
|
|
+ // xzmj: 0,
|
|
|
+ // };
|
|
|
+ // this.fileList = []; //文件
|
|
|
this.clearAll();
|
|
|
},
|
|
|
//输出:获取范围
|