Commit 82d255b4 authored by 纪泽龙's avatar 纪泽龙

地图模式图片上传bug

parent 5ed83297
...@@ -151,6 +151,7 @@ export default { ...@@ -151,6 +151,7 @@ export default {
return { return {
form: { form: {
deviceType: "3", deviceType: "3",
iconUrl:"",
}, },
type: DEVICE_TYPE.FLOWMETER, type: DEVICE_TYPE.FLOWMETER,
dialogVisible: false, dialogVisible: false,
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
:title="myTitle" :title="myTitle"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
:before-close="handleClose" :before-close="handleClose"
ref="dialog"
> >
<el-row> <el-row>
<el-form <el-form
...@@ -146,7 +147,7 @@ ...@@ -146,7 +147,7 @@
<el-button :loading="okLoading" type="primary" @click="ok" <el-button :loading="okLoading" type="primary" @click="ok"
> </el-button > </el-button
> >
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="handleCloseBtn"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
...@@ -271,14 +272,19 @@ export default { ...@@ -271,14 +272,19 @@ export default {
if (res.code == 200) { if (res.code == 200) {
this.dialogVisible = false; this.dialogVisible = false;
data.pipeId = data.pipeId ? data.pipeId : res.data; data.pipeId = data.pipeId ? data.pipeId : res.data;
this.lineOkCallBack.call(this.gaodeMap, this.target, data,()=>{ this.lineOkCallBack.call(
const arr= this.gaodeMap.polyLines.map(item=>{ this.gaodeMap,
return item.getExtData().lineData this.target,
}) data,
console.log("arr===================",arr) () => {
this.gaodeMap.view.pipeClassify(arr) const arr = this.gaodeMap.polyLines.map((item) => {
this.gaodeMap.view.pipeList(); return item.getExtData().lineData;
}); });
console.log("arr===================", arr);
this.gaodeMap.view.pipeClassify(arr);
this.gaodeMap.view.pipeList();
}
);
if (!this.editForm.pipeId) { if (!this.editForm.pipeId) {
this.gaodeMap.newLineObj = null; this.gaodeMap.newLineObj = null;
this.gaodeMap.createNewLine(); this.gaodeMap.createNewLine();
...@@ -321,7 +327,9 @@ export default { ...@@ -321,7 +327,9 @@ export default {
options.lineData = { ...this.editForm }; options.lineData = { ...this.editForm };
this.target.setExtData(options); this.target.setExtData(options);
// 把值带出去 // 把值带出去
if (done) {
done(); done();
}
// this.$confirm("确认关闭?") // this.$confirm("确认关闭?")
// .then((_) => { // .then((_) => {
...@@ -329,6 +337,10 @@ export default { ...@@ -329,6 +337,10 @@ export default {
// }) // })
// .catch((_) => {}); // .catch((_) => {});
}, },
handleCloseBtn() {
this.handleClose();
this.dialogVisible = false;
},
// 图片上传成功 // 图片上传成功
fileFinshed(e) { fileFinshed(e) {
this.editForm.iconUrl = e.url; this.editForm.iconUrl = e.url;
......
...@@ -151,6 +151,8 @@ export default { ...@@ -151,6 +151,8 @@ export default {
return { return {
form: { form: {
deviceType: "4", deviceType: "4",
iconUrl:"",
}, },
type: DEVICE_TYPE.PRESSUREGAGE, type: DEVICE_TYPE.PRESSUREGAGE,
dialogVisible: false, dialogVisible: false,
......
...@@ -151,6 +151,8 @@ export default { ...@@ -151,6 +151,8 @@ export default {
return { return {
form: { form: {
deviceType: "1", deviceType: "1",
iconUrl:"",
}, },
type: DEVICE_TYPE.REGEULATORBOX, type: DEVICE_TYPE.REGEULATORBOX,
dialogVisible: false, dialogVisible: false,
......
...@@ -150,6 +150,7 @@ export default { ...@@ -150,6 +150,7 @@ export default {
return { return {
form: { form: {
deviceType: "2", deviceType: "2",
iconUrl:"",
}, },
type: DEVICE_TYPE.VALUEWELL, type: DEVICE_TYPE.VALUEWELL,
dialogVisible: false, dialogVisible: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment