import{U as e,_ as o}from"./upload-gray.de03a559.js";import{n as i,j as n,o as l,a as d,_ as m}from"./index.13f93d3a.js";const u={name:"upload-information",components:{Upload:e},data(){return{data:{tag:"files"},form:{data:{image:"",url:"",name:"",content:""},rules:{}}}},methods:{onupload(s){this.form.data.image=s},toCategory(){const{category:s}=this.$route.query;if(sessionStorage.setItem("conf_upload",JSON.stringify(this.form.data)),this.userInfo.member_type===n.enterprise&&l.includes(this.id)){this.$router.push({path:"/upload/card",query:{id:this.id,category:s}});return}this.$router.push({path:`/upload/${s}`,query:{id:this.id}})}},computed:{id(){return parseInt(this.$route.query.id)},userInfo(){return this.$store.state.userInfo},disabled(){const{url:s,image:t}=this.form.data;return!(s||t)}}};var c=function(){var t=this,a=t._self._c;return a("div",{staticClass:"upload-information"},[a("div",{staticClass:"left"},[a("Upload",{attrs:{data:t.data},on:{onupload:t.onupload}},[a("div",{staticClass:"upload-region"},[t.form.data&&t.form.data.image?a("img",{staticClass:"avatar",attrs:{src:t.form.data.image}}):t._e(),a("img",{staticClass:"icon",attrs:{src:o,alt:"upload icon"}}),a("br"),t._v(" "+t._s(t.$t("upload.information.drag"))+" ")])]),t._v(" "+t._s(t.$t("upload.information.uploadTip"))+" ")],1),a("div",{staticClass:"right"},[a("div",{staticClass:"right-top"},[a("div",{staticClass:"right-top-left"},[t.userInfo.avatar?a("img",{attrs:{src:t.userInfo.avatar,alt:"thumb"}}):a("img",{attrs:{src:d,alt:"thumb"}}),a("b",[t._v(t._s(t.userInfo.name))])]),a("div",{staticClass:"right-top-right"},[a("router-link",{attrs:{to:"/upload"}},[a("img",{attrs:{src:m,alt:"back"}})])],1)]),a("div",{staticClass:"right-form"},[a("el-form",{ref:"form",attrs:{model:t.form.data,rules:t.form.rules}},[a("el-form-item",{staticClass:"path",attrs:{prop:"url",label:t.$t("upload.information.person.path")}},[a("el-input",{staticClass:"path",model:{value:t.form.data.url,callback:function(r){t.$set(t.form.data,"url",r)},expression:"form.data.url"}})],1),a("el-form-item",{staticClass:"name",attrs:{prop:"name",label:t.$t("upload.information.person.name")}},[a("el-input",{staticClass:"name",attrs:{clearable:""},model:{value:t.form.data.name,callback:function(r){t.$set(t.form.data,"name",r)},expression:"form.data.name"}})],1),a("el-form-item",{staticClass:"desc",attrs:{prop:"content",label:t.$t("upload.information.person.desc")}},[a("el-input",{staticClass:"desc",attrs:{clearable:""},model:{value:t.form.data.content,callback:function(r){t.$set(t.form.data,"content",r)},expression:"form.data.content"}})],1)],1)],1),a("div",{staticClass:"right-button"},[a("el-button",{attrs:{type:"primary",disabled:t.disabled,round:""},on:{click:t.toCategory}},[t._v(t._s(t.$t("common.save")))])],1)])])},_=[],f=i(u,c,_,!1,null,"f825f29c",null,null);const v=f.exports;export{v as default};
