(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-bf671d0a"],{"063e":function(e,t,o){},dda7:function(e,t,o){"use strict";o.r(t);var i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"app-container"},[o("el-form",{ref:"form",attrs:{model:e.form,"label-width":"80px"}},[o("el-form-item",{attrs:{label:"标题logo",prop:"description"}},[o("div",{staticStyle:{width:"50%",margin:"0 auto"}},[o("img",{staticStyle:{width:"100px","object-fit":"fill"},attrs:{src:e.previewUrl+e.form.url}})])]),o("el-form-item",{attrs:{label:"logo",prop:"url"}},[o("el-upload",{ref:"upload",attrs:{action:e.uploadUrl,"on-success":function(t,o){e.handleUploadSuccess(t,o,"pic")},"on-error":e.handleUploadError,name:"file","show-file-list":!1,headers:e.headers,accept:".jpg, .jpeg, .png"}},[o("el-button",{attrs:{size:"small"}},[e._v(" 选择标题logo "),o("i",{staticClass:"el-icon-upload el-icon--right"})]),o("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v(" 只能上传jpg/png/jpeg文件 ")])],1)],1),o("el-form-item",{attrs:{label:"标题",prop:"title"}},[o("el-input",{attrs:{placeholder:"请输入标题"},model:{value:e.form.title,callback:function(t){e.$set(e.form,"title",t)},expression:"form.title"}})],1)],1),o("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")])],1)],1)},l=[],r=(o("a434"),o("d937")),a=o("5f87"),s={name:"Set",data:function(){return{previewUrl:"/prod-api",uploadUrl:"/prod-api/common/upload",headers:{Authorization:"Bearer "+Object(a["a"])()},loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,setList:[],title:"",open:!1,queryParams:{pageNum:1,pageSize:10,title:null,url:null},form:{id:null,url:null,title:null},rules:{},upload:{open:!1,title:"",isUploading:!1,updateSupport:0,headers:{Authorization:"Bearer "+Object(a["a"])()},url:"/prod-api/common/upload"}}},created:function(){this.getList()},methods:{getList:function(){var e=this;Object(r["b"])().then((function(t){200===t.code&&t&&t.rows&&t.rows[0]?e.form=t.rows[0]:e.form={id:null,url:null,title:null}}))},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){t&&(null!=e.form.id?Object(r["c"])(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.getList()})):Object(r["a"])(e.form).then((function(t){e.$modal.msgSuccess("新增成功"),e.getList()})))}))},preView:function(e){console.log(e);var t="/prod-api"+e;window.open(t)},handleBeforeUpload:function(e){if(this.fileSize){var t=e.size/1024/1024<this.fileSize;if(!t)return this.$message.error("上传文件大小不能超过 ".concat(this.fileSize," MB!")),!1}return!0},handleUploadSuccess:function(e,t,o){console.log(e,t,o,"response, file, type"),200==e.code?("pic"===o&&(this.form.url=e.fileName),"pdf"===o&&(this.form.file.push(e.fileName),this.form.fileName.push(e.originalFilename))):this.$message.error("上传失败")},delName:function(e){this.form.file.splice(e,1),this.form.fileName.splice(e,1)},handleUploadError:function(){this.$message.error("上传失败")}}},n=s,c=(o("fecb6"),o("2877")),u=Object(c["a"])(n,i,l,!1,null,"6283be18",null);t["default"]=u.exports},fecb6:function(e,t,o){"use strict";o("063e")}}]);