Commit 92e7e03b authored by 耿迪迪's avatar 耿迪迪

上传问题修改 gengdidi

parent 8fd1b106
......@@ -15,7 +15,7 @@
:show-file-list="true"
:headers="headers"
class="upload-file-uploader"
:class="{ hide: addShow }"
:class="{ hide: fileArr.length>0 ||addShow }"
ref="upload"
>
<!-- 上传按钮 -->
......@@ -233,6 +233,8 @@ export default {
// this.fileList = this.list;
this.addShow = this.fileArr.length > 0 ? true : false;
},
};
</script>
......
......@@ -139,7 +139,7 @@
/>
<!-- 添加或修改设备信息对话框 -->
<el-dialog :title="title" :visible.sync="open" append-to-body @close="cancel">
<el-dialog destroy-on-close :title="title" :visible.sync="open" append-to-body @close="cancel">
<el-form ref="form" :model="form" :rules="rules" label-width="135px">
<el-col :span="11">
<el-form-item label="所属管道" prop="pipeId">
......
......@@ -144,7 +144,7 @@
/>
<!-- 添加或修改管道信息对话框 -->
<el-dialog :title="title" :visible.sync="open" append-to-body @close="cancel">
<el-dialog destroy-on-close :title="title" :visible.sync="open" append-to-body @close="cancel">
<el-form ref="form" :model="form" :rules="rules" label-width="135px">
<el-col :span="23">
<el-form-item label="管道名称" prop="pipeName">
......
......@@ -148,7 +148,7 @@
/>
<!-- 添加或修改隐患信息对话框 -->
<el-dialog :title="title1" :visible.sync="open1" width="800px" append-to-body @close="cancel">
<el-dialog destroy-on-close :title="title1" :visible.sync="open1" width="800px" append-to-body @close="cancel">
<el-form ref="form1" :model="form1" :rules="rules" label-width="120px">
<el-col :span="23">
<el-form-item label="隐患名称" prop="troubleName">
......@@ -406,7 +406,7 @@ export default {
{ required: true, message: "请输入地址", trigger: "blur" }
],
pictureUrl: [
{ required: true, message: "请上传图片", trigger: "blur" }
{ required: true, message: "请上传图片", trigger: ['blur', 'change'] }
],
longitude: [
{ required: true, message: "请输入经纬度", trigger: "blur" }
......@@ -449,11 +449,14 @@ export default {
})
},
getFileInfo(res){
console.log ("res",res )
this.form1.pictureUrl = res.url;
},
listRemove(e) {
this.form1.pictureUrl = "";
this.fileList = [];
console.log("删除了")
},
confirmFun(res) {
//确认选择经纬度
......@@ -588,6 +591,7 @@ export default {
}
this.open1 = true;
this.title1 = "修改隐患信息";
console.log("this.form1.pictureUrl",this.form1.pictureUrl)
if (this.form1.pictureUrl) {
this.fileList.push({
url: this.form1.pictureUrl,
......
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