chunk-452f0b9e.4fb90e79.js 18 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-452f0b9e"],{"1fbd":function(t,e,a){},"2e2a":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAS5SURBVHgB1ZpNTBtHFMffzK7tePlQEkKTgClESVw1KZIlKrVGTUpLVDUtqFIPXMu511zba2+9tteeKpWeKiBppRAREmo1gRREiApFDU2guAGjBOM1tndmss/RErDX9qyNP/KTvOvdebOa/8zbmTczS8ABv9xeb/BwrZ4lWQOUAcWtRPUkS35+qTEim4cUMhidjLcDJ52CiyYQ3AOVgNAEB7KmUFj+9MKhxbymuRJ+nYidZJz0CBBlqW1ZCJAoKHQ6lxBbAdcm9SBLiU6oIRQgc5d7tFDm/SwBVyfi73PO34AahFK68MlF78199/ZejNyIddVq4REs27VxPbj33q6A639sNZlXXVDjMBCd+H5a17sCEnH1I3hFYORlRacFoKJq9zZOEAxarFZIC0ix2vX7XKQ46cCzigdKFGwBcML838y/8Yz4UimhuVxEP9tOZluaifQIWipmzXeYpxAZui/c2oY+KJsxvC6abt9jg7E4+DPTjh6GUNd5ZbhSQvQn2g+0cVNvks2Ahb9xh12xKzyy+RSC42b61rbQoAKoR6MN1EmGqXnel0pBXsGYfmeOfwgVwONtqKcsqUj1Plj7kaeiW8Z2bV30QiWIJzzSLbC6ztpkbTkHbekRl7YvBWkBySTxggMSKWf2xSItoPkYWQEHtB0HR/bFIi3gjI8+phR0Gds6jSw01hMp21Jx1AudeV0ZkrELnCM/Q4VwJCAYIKHWE8pwPpt2Hx3C1oIKoTq0h0vvkpGlFTo79xfv29bBjz0OutbhRpg9d1a9frq1Mr5v4VgAgjVs/r6HGsCRC9UiNSNg6ZHRhhEuOKQoFzpI9ke3AmYXjcipVjIcDCghmfxVbQG76BaDwcVlMfjbhDEg84yqCsgX3YY3ofenq6mvC4XmVRMQmmHBQtHtTpL4Rm6yr/4zWyqXTVUEYK0+XBX9MrbYQrfuGl/mSq+KgNA9VnBitBdsCWwxu7SieyHs8v5ZFd1ucxTufFMZk50HT9w1etG/wSH/b4iAecrqmYoSMDxuDOL817oOT7Je32sw0tut5o2TQn8a3Q9XQap3yURPgO0EybELYfe2t/AWK0+g78dR4xu7wQh9HvMt/gtfQJGoxD6UV8HrSUBKLnQf+93oz9f86NdT8+IKDkaaBx573RCJxqEtngAfBn1QAlTNnl8obhZVE/HotltVCj5g+oERwFoGCVDIM/zBwXHsiJi1u0+NEw3RAnnTI+aDpeKb/yDwdygzmfe2wlqEDrxFkultnBxYw32pLlAKuOKX2cthmQcGSDL9EpuH5VyZZRazyonLBRFcrsy8zwVbw3NaAKFiOdcDtmKiaivXONN7J6B+ZzfGuBS6kLbBw8cX69YEe6Eok5bjdAyqwCG3WOnuUr+1m6Ki+2CZ8f/uQOZyKVMGh6z4pOdtOhZuJzPoSjFdtO0koWwrbljj9Ros+k8pY+dPk5z7wwoV49b/fbuUuIGGe1BQgHzRYbHUeyEutZakwHTfhbpp6/KV32a13+iWbIlKIsyN7n6ZjW6L0Vs7fmC8qxY+NUCft17a7PQCoBDCoYODOFnJjz0IJxEK8fuXPziynNcUHICb4UbCDKHK+LlNgurbn73XXDC8sXgOkdYWBuX7PgUAAAAASUVORK5CYII="},"2fef":function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"mainBox"},[this.$store.state.template.stepStatus?r("div",{staticClass:"layerBox"},[r("tableTitle",{attrs:{name:t.templateStepTitle}}),r("step",{attrs:{activeNumber:1}})],1):t._e(),r("el-form",{ref:"form",staticClass:"login-form",attrs:{model:t.form,rules:t.loginRules,autocomplete:"on","label-position":"left","label-width":"120px"}},[r("div",{staticClass:"layerBox"},[r("tableTitle",{attrs:{name:t.templateBaseTitle}}),r("div",{staticClass:"formDiv"},[r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"常规模板类型:","label-width":t.formLabelWidth,prop:"role_id"}},[r("div",{staticClass:"formLabelFloatBox"},[r("el-checkbox-group",{model:{value:t.form.page_type,callback:function(e){t.$set(t.form,"page_type",e)},expression:"form.page_type"}},[r("el-checkbox",{attrs:{label:"1",disabled:""}},[t._v("首页")]),r("el-checkbox",{attrs:{label:"2"}},[t._v("分类页")]),r("el-checkbox",{attrs:{label:"3"}},[t._v("列表页")]),r("el-checkbox",{attrs:{label:"4"}},[t._v("详情页")]),r("el-checkbox",{attrs:{label:"5"}},[t._v("搜索页")])],1)],1)]),r("el-form-item",{staticClass:"custom-align-right",attrs:{label:null,"label-width":t.formLabelWidth}},[r("div",{staticClass:"formLabelFloatBox"},[r("div",{staticClass:"labelTitleStyle"},[t._v(" 单页模板类型: "),r("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"该类型仅供底部导航栏使用",placement:"top"}},[r("i",{staticClass:"el-icon-question"})])],1),r("el-checkbox-group",{model:{value:t.form.page_type,callback:function(e){t.$set(t.form,"page_type",e)},expression:"form.page_type"}},[r("el-checkbox",{attrs:{label:"6"}},[t._v("自定义列表页")]),r("el-checkbox",{attrs:{label:"7",disabled:""}},[t._v("自定义详情页")])],1)],1)])],1)],1),r("div",{staticClass:"layerBox"},[r("tableTitle",{attrs:{name:t.templateInfoTitle}}),r("div",{staticClass:"formDiv"},[r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"网站声明:","label-width":t.formLabelWidth,prop:"statement"}},[r("div",{staticClass:"formLabelFloatBox"},[r("el-input",{attrs:{type:"text",placeholder:"请输入.."},model:{value:t.form.statement,callback:function(e){t.$set(t.form,"statement",e)},expression:"form.statement"}})],1)]),r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"主办单位:","label-width":t.formLabelWidth,prop:"organizer"}},[r("div",{staticClass:"formLabelFloatBox"},[r("el-input",{attrs:{type:"text",placeholder:"请输入.."},model:{value:t.form.organizer,callback:function(e){t.$set(t.form,"organizer",e)},expression:"form.organizer"}})],1)]),r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"版权信息:","label-width":t.formLabelWidth,prop:"copyright_information"}},[r("div",{staticClass:"formLabelFloatBox"},[r("el-input",{attrs:{type:"text",placeholder:"请输入.."},model:{value:t.form.copyright_information,callback:function(e){t.$set(t.form,"copyright_information",e)},expression:"form.copyright_information"}})],1)]),r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"联系电话:","label-width":t.formLabelWidth,prop:"contact_number"}},[r("div",{staticClass:"formLabelFloatBox"},[r("el-input",{attrs:{type:"text",placeholder:"请输入.."},model:{value:t.form.contact_number,callback:function(e){t.$set(t.form,"contact_number",e)},expression:"form.contact_number"}})],1)]),r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"公司地址:","label-width":t.formLabelWidth,prop:"company_address"}},[r("div",{staticClass:"formLabelFloatBox"},[r("el-input",{attrs:{type:"text",placeholder:"请输入.."},model:{value:t.form.company_address,callback:function(e){t.$set(t.form,"company_address",e)},expression:"form.company_address"}})],1)]),r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"项目LOGO:",prop:"project_logo"}},[r("div",{staticClass:"uploaderBox"},[r("el-upload",{staticClass:"avatar-uploader",attrs:{action:"#","show-file-list":!1,"before-upload":t.projectLogoUpload}},[t.project_logo_src?r("img",{staticClass:"avatar",attrs:{src:t.project_logo_src}}):r("div",{staticClass:"chooseImgDiv"},[r("div",[r("img",{attrs:{src:a("2e2a")}}),r("div",[t._v("选择图片")])])])]),r("input",{directives:[{name:"model",rawName:"v-model",value:t.form.project_logo,expression:"form.project_logo"}],attrs:{type:"hidden"},domProps:{value:t.form.project_logo},on:{input:function(e){e.target.composing||t.$set(t.form,"project_logo",e.target.value)}}})],1)]),r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"项目名称:","label-width":t.formLabelWidth,prop:"project_name"}},[r("div",{staticClass:"formLabelFloatBox"},[r("el-input",{attrs:{type:"text",placeholder:"请输入.."},model:{value:t.form.project_name,callback:function(e){t.$set(t.form,"project_name",e)},expression:"form.project_name"}})],1)]),r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"项目网址:","label-width":t.formLabelWidth,prop:"project_url"}},[r("div",{staticClass:"formLabelFloatBox"},[r("el-input",{attrs:{type:"text",placeholder:"请输入.."},model:{value:t.form.project_url,callback:function(e){t.$set(t.form,"project_url",e)},expression:"form.project_url"}})],1)]),r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"公司LOGO:",prop:"company_logo"}},[r("div",{staticClass:"uploaderBox"},[r("el-upload",{staticClass:"avatar-uploader",attrs:{action:"#","show-file-list":!1,"before-upload":t.companyLogoUpload}},[t.company_logo_src?r("img",{staticClass:"avatar",attrs:{src:t.company_logo_src}}):r("div",{staticClass:"chooseImgDiv"},[r("div",[r("img",{attrs:{src:a("2e2a")}}),r("div",[t._v("选择图片")])])])]),r("input",{directives:[{name:"model",rawName:"v-model",value:t.form.company_logo,expression:"form.company_logo"}],attrs:{type:"hidden"},domProps:{value:t.form.company_logo},on:{input:function(e){e.target.composing||t.$set(t.form,"company_logo",e.target.value)}}})],1)]),r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"公司名称:","label-width":t.formLabelWidth,prop:"company_name"}},[r("div",{staticClass:"formLabelFloatBox"},[r("el-input",{attrs:{type:"text",placeholder:"请输入.."},model:{value:t.form.company_name,callback:function(e){t.$set(t.form,"company_name",e)},expression:"form.company_name"}})],1)]),r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"公司网址:","label-width":t.formLabelWidth,prop:"company_url"}},[r("div",{staticClass:"formLabelFloatBox"},[r("el-input",{attrs:{type:"text",placeholder:"请输入.."},model:{value:t.form.company_url,callback:function(e){t.$set(t.form,"company_url",e)},expression:"form.company_url"}})],1)]),r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"网站备案号:","label-width":t.formLabelWidth,prop:"icp_number"}},[r("div",{staticClass:"formLabelFloatBox"},[r("el-input",{attrs:{type:"text",placeholder:"请输入.."},model:{value:t.form.icp_number,callback:function(e){t.$set(t.form,"icp_number",e)},expression:"form.icp_number"}})],1)]),r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"网站备链接:","label-width":t.formLabelWidth,prop:"icp_number_url"}},[r("div",{staticClass:"formLabelFloatBox"},[r("el-input",{attrs:{type:"text",placeholder:"请输入.."},model:{value:t.form.icp_number_url,callback:function(e){t.$set(t.form,"icp_number_url",e)},expression:"form.icp_number_url"}})],1)]),r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"网安备案号:","label-width":t.formLabelWidth,prop:"record_number"}},[r("div",{staticClass:"formLabelFloatBox"},[r("el-input",{attrs:{type:"text",placeholder:"请输入.."},model:{value:t.form.record_number,callback:function(e){t.$set(t.form,"record_number",e)},expression:"form.record_number"}})],1)]),r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"网安备案号链接","label-width":t.formLabelWidth,prop:"record_number_url"}},[r("div",{staticClass:"formLabelFloatBox"},[r("el-input",{attrs:{type:"text",placeholder:"请输入.."},model:{value:t.form.record_number_url,callback:function(e){t.$set(t.form,"record_number_url",e)},expression:"form.record_number_url"}})],1)]),r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"客服QQ号:","label-width":t.formLabelWidth,prop:"customer_service_qq"}},[r("div",{staticClass:"formLabelFloatBox"},[r("el-input",{attrs:{type:"text",placeholder:"请输入.."},model:{value:t.form.customer_service_qq,callback:function(e){t.$set(t.form,"customer_service_qq",e)},expression:"form.customer_service_qq"}})],1)]),r("el-form-item",{staticClass:"custom-align-right",attrs:{label:"通联QQ号:","label-width":t.formLabelWidth,prop:"communications"}},[r("div",{staticClass:"formLabelFloatBox"},[r("el-input",{attrs:{type:"text",placeholder:"请输入.."},model:{value:t.form.communications,callback:function(e){t.$set(t.form,"communications",e)},expression:"form.communications"}})],1)])],1)],1)]),r("div",{staticClass:"bottomBtnBox"},[r("el-button",{attrs:{type:"info"},on:{click:t.goToWebsite}},[t._v("返回")]),void 0!=this.$route.query.step?r("el-button",{attrs:{type:"primary"},on:{click:t.editData}},[t._v("编辑并进入下一步")]):r("el-button",{attrs:{type:"primary"},on:{click:t.addData}},[t._v("保存并进入下一步")])],1)],1)},o=[],l=(a("4b51"),a("bf09")),i=a("f2c7"),s={components:{tableTitle:l["default"],step:i["default"]},data:function(){var t=function(t,e,a){0==e.length?a(new Error("该项不能为空!")):a()};return{templateStepTitle:"仅需四步,即可完成模板创建",templateBaseTitle:"模板类型设置",templateInfoTitle:"模板信息设置",formLabelWidth:"120px",editId:"",form:{website_id:"",page_type:["1","7"],statement:"",organizer:"",copyright_information:"",contact_number:"",company_address:"",project_logo:"",project_name:"",project_url:"",company_logo:"",company_name:"",company_url:"",icp_number:"",icp_number_url:"",record_number:"",record_number_url:"",customer_service_qq:"",communications:""},project_logo_src:"",company_logo_src:"",loginRules:{statement:[{required:!0,trigger:"blur",validator:t}],organizer:[{required:!0,trigger:"blur",validator:t}],copyright_information:[{required:!0,trigger:"blur",validator:t}],contact_number:[{required:!0,trigger:"blur",validator:t}],company_address:[{required:!0,trigger:"blur",validator:t}],project_name:[{required:!0,trigger:"blur",validator:t}],project_url:[{required:!0,trigger:"blur",validator:t}],company_name:[{required:!0,trigger:"blur",validator:t}],company_url:[{required:!0,trigger:"blur",validator:t}],icp_number:[{required:!0,trigger:"blur",validator:t}],record_number:[{required:!0,trigger:"blur",validator:t}],icp_number_url:[{required:!0,trigger:"blur",validator:t}],record_number_url:[{required:!0,trigger:"blur",validator:t}],company_logo:[{required:!0,trigger:"blur",validator:t}],project_logo:[{required:!0,trigger:"blur",validator:t}],customer_service_qq:[{required:!0,trigger:"blur",validator:t}],communications:[{required:!0,trigger:"blur",validator:t}]}}},methods:{goToWebsite:function(){this.$router.push({path:"/templateList"})},goToStyle:function(){this.$refs.form.validate((function(t){})),this.$router.push({path:"/templateStyle",query:{id:this.editId}})},addData:function(){var t=this;this.form.website_id=this.$route.query.website_id,this.$refs.form.validate((function(e){e&&t.$store.dispatch("template/addWebsiteTemplateintel",t.form).then((function(e){200==e.code?(t.$message.success("网站基本信息保存成功!"),t.$router.push({path:"/templateStyle",query:{website_id:t.$route.query.website_id,step:1}})):t.$message.error(e.message)}))}))},projectLogoUpload:function(t){var e=this,a="image/jpeg"===t.type,r="image/png"===t.type,o=t.size/1024/1024<2;if(!a&&!r)return this.$message.error("上传图片只能是 JPG 或 PNG 格式!"),!1;if(!o)return this.$message.error("上传图片大小不能超过 2MB!"),!1;var l=new FormData;return l.append("file",t),this.$store.dispatch("pool/uploadFile",l).then((function(t){e.project_logo_src=t.data.imgUrl,e.form.project_logo=t.data.imgUrl,console.log(t.data.imgUrl)})).catch((function(){e.$message({type:"warning",message:"网络错误,请重试!"})})),!1},companyLogoUpload:function(t){var e=this,a="image/jpeg"===t.type,r="image/png"===t.type,o=t.size/1024/1024<2;if(!a&&!r)return this.$message.error("上传图片只能是 JPG 或 PNG 格式!"),!1;if(!o)return this.$message.error("上传图片大小不能超过 2MB!"),!1;var l=new FormData;return l.append("file",t),this.$store.dispatch("pool/uploadFile",l).then((function(t){e.company_logo_src=t.data.imgUrl,e.form.company_logo=t.data.imgUrl,console.log(t.data.imgUrl)})).catch((function(){e.$message({type:"warning",message:"网络错误,请重试!"})})),!1},getWebsiteBase:function(t){var e=this;this.$store.dispatch("template/getWebsiteTemplateintel",{website_id:t}).then((function(t){200==t.code?(e.form.website_id=t.data.website_id,e.form.page_type=t.data.page_type,e.form.statement=t.data.statement,e.form.organizer=t.data.organizer,e.form.copyright_information=t.data.copyright_information,e.form.contact_number=t.data.contact_number,e.form.company_address=t.data.company_address,e.form.project_logo=t.data.project_logo,e.project_logo_src=t.data.project_logo,e.form.project_name=t.data.project_name,e.form.project_url=t.data.project_url,e.form.company_logo=t.data.company_logo,e.company_logo_src=t.data.company_logo,e.form.company_name=t.data.company_name,e.form.company_url=t.data.company_url,e.form.icp_number=t.data.icp_number,e.form.icp_number_url=t.data.icp_number_url,e.form.record_number=t.data.record_number,e.form.record_number_url=t.data.record_number_url,e.form.customer_service_qq=t.data.customer_service_qq,e.form.communications=t.data.communications):e.$message.error(t.message)}))},editData:function(){var t=this;this.$refs.form.validate((function(e){e&&t.$store.dispatch("template/upWebsiteTemplateintel",t.form).then((function(e){200==e.code?(t.$message.success("网站基本信息编辑成功!"),t.$router.push({path:"/templateStyle",query:{website_id:t.$route.query.website_id,step:t.$route.query.step}})):t.$message.error(e.message)}))}))}},mounted:function(){this.$store.commit("template/showStepStatus"),void 0!=this.$route.query.step?(console.log("编辑模板!"),this.$route.query.website_id?this.getWebsiteBase(this.$route.query.website_id):this.$message.error("无法编辑,缺少关键参数!")):console.log("添加模板基本信息!")}},c=s,m=(a("7b45"),a("2877")),n=Object(m["a"])(c,r,o,!1,null,"13ac3f90",null);e["default"]=n.exports},"4b51":function(t,e,a){},"7b45":function(t,e,a){"use strict";a("1fbd")},"8f10":function(t,e,a){"use strict";a("d825")},bf09:function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"tableTitle"},[a("span",{staticClass:"tableFloatLine"}),t._v(" "+t._s(t.name)+" ")])},o=[],l={props:{name:{type:String,required:!0}},data:function(){return{someData:""}}},i=l,s=(a("8f10"),a("2877")),c=Object(s["a"])(i,r,o,!1,null,"4f7f779e",null);e["default"]=c.exports},d170:function(t,e,a){"use strict";a("f3d1")},d825:function(t,e,a){},f2c7:function(t,e,a){"use strict";a.r(e);var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"stepBox"},[a("div",{staticClass:"stepBoxText",on:{click:t.hiddenStepStatus}},[a("i",{staticClass:"el-icon-close"})]),a("el-steps",{attrs:{active:t.activeNumber,"align-center":""}},[a("el-step",{attrs:{title:"填写模板基本信息",description:"类型和网站底部信息"}}),a("el-step",{attrs:{title:"选择模板风格",description:"网站整体风格和样式"}}),a("el-step",{attrs:{title:"构建模板模块",description:"展示哪些模块到模板上"}}),a("el-step",{attrs:{title:"应用网站模板",description:"应用该模板到您的站点"}})],1)],1)},o=[],l=(a("a9e3"),{props:{activeNumber:{type:Number,required:!0}},data:function(){return{someData:""}},methods:{hiddenStepStatus:function(){console.log(123),console.log(this.$store.state.template.stepStatus),this.$store.commit("template/hiddenStepStatus")}}}),i=l,s=(a("d170"),a("2877")),c=Object(s["a"])(i,r,o,!1,null,"4efdf9a8",null);e["default"]=c.exports},f3d1:function(t,e,a){}}]);