(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-26aa"],{"Cu/N":function(e,t,i){"use strict";i.d(t,"c",function(){return r}),i.d(t,"a",function(){return l}),i.d(t,"d",function(){return o}),i.d(t,"b",function(){return s}),i.d(t,"e",function(){return u});var a=i("X4fA"),n=i("t3Un");function r(e){return Object(n.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.21:8006/zhongtai/emergencyPlan/page",method:"post",data:e})}function l(e){return Object(n.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.21:8006/zhongtai/emergencyPlan/add",method:"post",data:e})}function o(e){return Object(n.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.21:8006/zhongtai/emergencyPlan/mod",method:"post",data:e})}function s(e){return Object(n.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.21:8006/zhongtai/emergencyPlan/del",method:"post",data:e})}function u(e){return Object(n.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.21:8006/zhongtai/emergencyPlan/upload",method:"post",data:e})}},PmDq:function(e,t,i){"use strict";i.r(t);var a=i("Cu/N"),n={props:{disabled:{type:Boolean,default:!1},imgList:{type:Array,default:[]}},data:function(){return{dialogImageUrl:"",dialogVisible:!1,fileList:[],fileUrl:"",fileName:""}},watch:{},created:function(){},mounted:function(){if(null!=this.imgList)for(var e=0;e<this.imgList.length;e++)this.imgList[e].url="http://222.92.213.21:8006/zhongtai/upload/emergencyPlan/"+this.imgList[e].fileName,this.fileList.push(this.imgList[e])},methods:{handleRemove:function(e,t){for(var i=this,a=0;a<this.fileList.length;a++)e.uid==this.fileList[a].uid&&this.fileList.splice(a,1);this.$nextTick(function(){i.$emit("removeImgSuccess",{fileList:i.fileList})})},handlePreview:function(e){this.dialogImageUrl=e.url,this.dialogVisible=!0},beforeUploadImg:function(e){var t="image/jpeg"===e.type,i="image/png"===e.type;return t||i||this.$message.error("上传图片只能是 JPG 或者 PNG 格式!"),t||i},handleError:function(e,t,i){this.$message.error("上传失败,系统未知错误!错误码为【500】")},handleUpload:function(e){var t=this,i=new FormData;i.append("file",e.file),Object(a.e)(i).then(function(e){200==e.data.code?(t.fileUrl=e.data.result.fileUrl,t.fileName=e.data.result.fileName,t.$nextTick(function(){t.$emit("uploadImgSuccess",{fileName:t.fileName,fileUrl:t.fileUrl,url:"http://222.92.213.21:8006/zhongtai/upload/emergencyPlan/"+e.data.result.fileName})}),t.$message({type:"success",message:"上传成功",duration:2e3})):t.$message.error("上传失败,系统未知错误!")})},handleSuccess:function(e,t,i){}}},r=i("ZrdR"),l=Object(r.a)(n,function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-upload",{attrs:{action:"",disabled:e.disabled,"list-type":"picture-card","file-list":e.fileList,"http-request":e.handleUpload,beforeUpload:e.beforeUploadImg,"on-success":e.handleSuccess,"on-error":e.handleError,"on-preview":e.handlePreview,"on-remove":e.handleRemove}},[i("i",{staticClass:"el-icon-plus"})]),e._v(" "),i("el-dialog",{attrs:{visible:e.dialogVisible,modal:!1},on:{"update:visible":function(t){e.dialogVisible=t}}},[i("img",{attrs:{width:"100%",src:e.dialogImageUrl,alt:""}})])],1)},[],!1,null,null,null);l.options.__file="uploadImg.vue";t.default=l.exports}}]);
|