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

上传问题修改 gengdidi

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