apps/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/main/js/chunk-1fd5b92a.07c16352.js

1 line
6.3 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1fd5b92a"],{3463:function(t,e,a){"use strict";a("b44e")},b44e:function(t,e,a){},b98e:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t._self._c;return e("el-container",[e("el-main",{attrs:{id:"theme"}},[e("div",{staticClass:"text-general-color category-title"},[e("p",{staticStyle:{"padding-left":"5px"}},[t._v(" logo "),e("el-tooltip",{staticClass:"item",attrs:{content:"仅支持png、jpg、jpeg、gif格式的图片文件文件大小5M内建议宽高180*30左右",placement:"bottom-start"}},[e("i",{staticClass:"awsui-iconfont",staticStyle:{"font-size":"13px"}},[t._v("")])])],1)]),e("div",{staticStyle:{margin:"20px 0 20px 20px"}},[void 0!=t.logoData.src?e("div",{staticClass:"logo",staticStyle:{width:"180px",height:"30px",position:"relative"}},[e("el-card",{staticStyle:{height:"100%",width:"100%"},attrs:{shadow:"never","body-style":{padding:"0px",height:"100%",width:"100%"}}},[e("img",{staticClass:"image",attrs:{src:t.logoData.src}})]),e("div",{staticClass:"logo-mask"}),e("i",{staticClass:"awsui-iconfont text-general-color logo-del-icon",on:{click:function(e){return t.removeFile("logo")}}},[t._v("")])],1):e("div",{staticStyle:{width:"180px",height:"30px"},on:{click:function(e){return t.openFileSelect("logo")}}},[e("el-card",{staticStyle:{height:"100%",width:"100%",border:"1px dashed #ebeef5",cursor:"pointer"},attrs:{shadow:"never","body-style":{padding:"0px",height:"100%",width:"100%","text-align":"center","vertical-align":"middle","line-height":"30px"}}},[e("i",{staticClass:"awsui-iconfont text-linker-color",staticStyle:{"font-size":"15px",position:"relative",top:"1px"}},[t._v("")]),e("span",{staticStyle:{"font-size":"12px"}},[t._v("  添加logo")])])],1)]),e("div",{staticClass:"text-general-color category-title"},[e("p",{staticStyle:{"padding-left":"5px"}},[t._v(" 轮播图 "),e("el-tooltip",{staticClass:"item",attrs:{placement:"bottom-start"}},[e("span",{attrs:{slot:"content"},slot:"content"},[t._v("默认按照图片名称进行排序,不支持自定义排序"),e("br"),t._v("仅支持png、jpg、jpeg、gif格式的图片文件文件大小5M内建议宽高1920*440")]),e("i",{staticClass:"awsui-iconfont",staticStyle:{"font-size":"13px"}},[t._v("")])])],1)]),e("div",{staticStyle:{margin:"20px 0 20px 20px"}},[t._l(t.bannerData,(function(a){return[e("div",{staticClass:"banner",staticStyle:{width:"280px",height:"60px","margin-right":"20px",display:"inline-block",position:"relative","margin-bottom":"15px"}},[e("el-card",{staticStyle:{height:"100%",width:"100%"},attrs:{shadow:"never","body-style":{padding:"0px",height:"100%",width:"100%"}}},[e("img",{staticClass:"image",attrs:{src:a.src}})]),e("div",{staticClass:"banner-mask"}),e("i",{staticClass:"awsui-iconfont text-general-color banner-del-icon",staticStyle:{cursor:"pointer",float:"right",position:"relative",top:"-38px",left:"-5px"},on:{click:function(e){return t.removeFile("banner",a.name)}}},[t._v("")])],1)]})),e("div",{staticStyle:{width:"280px",height:"60px",display:"inline-block"},on:{click:function(e){return t.openFileSelect("banner")}}},[e("el-card",{staticStyle:{height:"100%",width:"100%",border:"1px dashed #ebeef5",cursor:"pointer"},attrs:{shadow:"never","body-style":{padding:"0px",height:"100%",width:"100%","text-align":"center","vertical-align":"middle","line-height":"60px"}}},[e("i",{staticClass:"awsui-iconfont text-linker-color",staticStyle:{"font-size":"20px",position:"relative",top:"2px"}},[t._v("")]),e("span",{staticStyle:{"font-size":"12px"}},[t._v("  添加轮播图")])])],1)],2),e("PALUpload",{ref:"logoUpload",attrs:{appId:t.appId,repositoryName:t.repositoryName,groupValue:t.groupValue,fileValue:"logo","show-file-list":!1,"on-success":t.uploadSuccess,"before-upload":t.beforeUpload,accept:".jpg,.jpeg,.gif,.png","file-list":t.fileList}},[e("div",{staticStyle:{display:"none"}},[e("awsui-button",{staticClass:"button-general-color",staticStyle:{width:"130px"},attrs:{id:"selectLogoButton",type:"primary"}},[t._v("文件上传")])],1)]),e("PALUpload",{ref:"bannerUpload",attrs:{appId:t.appId,repositoryName:t.repositoryName,groupValue:t.groupValue,fileValue:"banner",multiple:"","show-file-list":!1,"on-success":t.uploadSuccess,"before-upload":t.beforeUpload,accept:".jpg,.jpeg,.gif,.png","file-list":t.fileList}},[e("div",{staticStyle:{display:"none"}},[e("awsui-button",{staticClass:"button-general-color",staticStyle:{width:"130px"},attrs:{id:"selectBannerButton",type:"primary"}},[t._v("文件上传")])],1)])],1)],1)},o=[],s=a("0f08"),l=a("6c2f"),n={name:"ThemeStyle",components:{PALUpload:l["a"]},data(){return{appId:"com.actionsoft.apps.coe.pal",repositoryName:"tmp",groupValue:"portal",fileValue:"logo",uploadKey:Math.random()+"",multiple:!1,fileList:[],logoData:{},bannerData:[]}},mounted(){this.initData()},methods:{initData(){const t=this,e={url:"jd",data:{cmd:"com.actionsoft.apps.coe.pal_publish_publishgroup_theme_data_query"}};s["a"].post(e).then((function(e){"ok"==e.result?(t.logoData=e.data.logoData,t.bannerData=e.data.bannerData):t.$message(e.msg)})).catch(t=>{console.log(t)})},openFileSelect(t){"logo"==t?(this.fileValue="logo",document.getElementById("selectLogoButton").click()):(this.fileValue="banner",document.getElementById("selectBannerButton").click())},removeFile(t,e){this.$confirm("确定要删除吗?","提示",{confirmButtonText:"确定",confirmButtonClass:"button-general-color",cancelButtonText:"取消",type:"warning"}).then(()=>{const a=this,i={url:"jd",data:{cmd:"com.actionsoft.apps.coe.pal_publish_publishgroup_theme_data_remove",type:t,fileName:e}};s["a"].post(i).then((function(t){"ok"==t.result?(a.$message({message:"删除成功",type:"success"}),a.initData()):a.$message.error("删除失败")})).catch(t=>{console.log(t)})}).catch(()=>{})},uploadSuccess(t,e,a){const i=this,o={url:"jd",data:{cmd:"com.actionsoft.apps.coe.pal_publish_publishgroup_theme_data_save",type:i.fileValue,fileName:e.name}};s["a"].post(o).then((function(t){"ok"==t.result?(i.$message({message:"["+e.name+"]上传成功",type:"success"}),i.initData()):i.$message.error("["+e.name+"]上传失败")})).catch(t=>{console.log(t)})},beforeUpload(t){const e=this;if(t.size>5242880)return e.$message("图片["+t.name+"]不能大于5M上传失败!"),!1}}},c=n,r=(a("3463"),a("0b56")),p=Object(r["a"])(c,i,o,!1,null,"0a5ea2f0",null);e["default"]=p.exports}}]);