(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-40e6388d"],{"5bfe":function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));i("2ca2");var n=i("8ce4"),o=i("7b67");async function l(e,t){return Object(n["a"])(o["a"]+"v1/config/config","get",{key:e,field:t})}class a{static async getConfig(e,t){let[i]=await l(e,t);return i.data}}},"5d33":function(e,t,i){"use strict";i("f8de")},"80db":function(e,t,i){},9204:function(e,t,i){"use strict";i.d(t,"a",(function(){return o})),i.d(t,"b",(function(){return l})),i.d(t,"d",(function(){return a})),i.d(t,"c",(function(){return r}));var n=i("cf45");const o=(e,t)=>{if(e){let i="yyyy/MM/dd HH:mm";return t&&(i=t),Object(n["f"])(e,i)}return""},l=(e,t)=>{if(e){let i="yyyy-MM-dd HH:mm:ss";return t&&(i=t),Object(n["f"])(e,i)}return""},a=(e,t)=>{if(e||0===e){let i=0;return t&&(i=t),e.toFixed(i)}return""};function s(e){return e<10&&(e="0"+e),e}const r=function(e){e=Math.round(e/1e3);let t=0,i=0;return e<60?t=Number(e).toFixed(0):(i=Math.floor(e/60),t=Math.floor(e-60*i)),`${s(i)}分${s(t)}秒`}},"940e":function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e._self._c;return t("div",{staticClass:"page-container webSetting-page"},[t("el-tabs",{model:{value:e.tabShow,callback:function(t){e.tabShow=t},expression:"tabShow"}},[t("el-tab-pane",{staticClass:"base-pane pane-container",attrs:{label:"基础设置",name:"base"}},[t("el-form",[t("el-form-item",{attrs:{label:"网站标题"}},[t("el-input",{model:{value:e.webConfig.base.title,callback:function(t){e.$set(e.webConfig.base,"title",t)},expression:"webConfig.base.title"}})],1),t("el-form-item",{attrs:{label:"主办单位"}},[t("el-input",{model:{value:e.webConfig.base.organ,callback:function(t){e.$set(e.webConfig.base,"organ",t)},expression:"webConfig.base.organ"}})],1),"49538854775951360"===e.userInfo.schoolId?t("el-form-item",{attrs:{label:"视频地址"}},[t("el-input",{model:{value:e.webConfig.base.videoSrc,callback:function(t){e.$set(e.webConfig.base,"videoSrc",t)},expression:"webConfig.base.videoSrc"}})],1):e._e()],1)],1),t("el-tab-pane",{staticClass:"focus-pane pane-container",attrs:{label:"轮播-PC端",name:"focus"}},[t("div",{staticClass:"tools-box clearFix"},[t("div",{staticClass:"fr"},[t("el-button",{attrs:{type:"primary",plain:"",size:"small"},on:{click:function(t){e.FocusMethods().clickAddOneBtn()}}},[e._v("新增轮播图")])],1)]),t("el-table",{attrs:{data:e.webConfig.focus.list,border:"",fit:""}},[t("el-table-column",{attrs:{label:"序号",align:"center",width:"100"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("span",[e._v(e._s(i.$index+1))])]}}])}),t("el-table-column",{attrs:{label:"序号",align:"center",width:"400"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("erp-uploader-one-pic",{staticStyle:{"margin-right":"30px"},attrs:{"img-in":i.row.image,"uploader-id":"image","uploader-title":"图片","uploader-size":[200,200],"pixel-limit":[1920,520],"size-limit":5e3},on:{uploadSuccess:t=>e.fileUpload(t,e.webConfig.focus.list[i.$index],"focus"),afterDelete:t=>e.fileDelete(t,e.webConfig.focus.list[i.$index],"focus")}})]}}])}),t("el-table-column",{attrs:{label:"是否显示",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("el-select",{model:{value:i.row.show,callback:function(t){e.$set(i.row,"show",t)},expression:"scope.row.show"}},[t("el-option",{attrs:{label:"显示",value:!0}}),t("el-option",{attrs:{label:"隐藏",value:!1}})],1)]}}])}),t("el-table-column",{attrs:{label:"操作",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("el-button",{attrs:{size:"mini",type:"danger",plain:""},on:{click:function(t){e.FocusMethods().clickDeleteBtn(i.$index)}}},[e._v("删除")])]}}])})],1)],1),t("el-tab-pane",{staticClass:"focus-pane pane-container",attrs:{label:"轮播-H5端",name:"focus-h5"}},[t("div",{staticClass:"tools-box clearFix"},[t("div",{staticClass:"fr"},[t("el-button",{attrs:{type:"primary",plain:"",size:"small"},on:{click:function(t){e.FocusH5Methods().clickAddOneBtn()}}},[e._v("新增轮播图")])],1)]),t("el-table",{attrs:{data:e.webConfig.focus.h5,border:"",fit:""}},[t("el-table-column",{attrs:{label:"序号",align:"center",width:"100"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("span",[e._v(e._s(i.$index+1))])]}}])}),t("el-table-column",{attrs:{label:"序号",align:"center",width:"400"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("erp-uploader-one-pic",{staticStyle:{"margin-right":"30px"},attrs:{"img-in":i.row.image,"uploader-id":"image","uploader-title":"图片","uploader-size":[200,200],"pixel-limit":[750,500],"size-limit":5e3},on:{uploadSuccess:t=>e.fileUpload(t,e.webConfig.focus.h5[i.$index],"focus"),afterDelete:t=>e.fileDelete(t,e.webConfig.focus.h5[i.$index],"focus")}})]}}])}),t("el-table-column",{attrs:{label:"是否显示",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("el-select",{model:{value:i.row.show,callback:function(t){e.$set(i.row,"show",t)},expression:"scope.row.show"}},[t("el-option",{attrs:{label:"显示",value:!0}}),t("el-option",{attrs:{label:"隐藏",value:!1}})],1)]}}])}),t("el-table-column",{attrs:{label:"操作",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("el-button",{attrs:{size:"mini",type:"danger",plain:""},on:{click:function(t){e.FocusH5Methods().clickDeleteBtn(i.$index)}}},[e._v("删除")])]}}])})],1)],1),t("el-tab-pane",{staticClass:"center-pane pane-container",attrs:{label:"中心简介",name:"center"}},[t("el-form",[t("el-form-item",{attrs:{label:"标题"}},[t("el-input",{model:{value:e.webConfig.center.title,callback:function(t){e.$set(e.webConfig.center,"title",t)},expression:"webConfig.center.title"}})],1),t("el-form-item",{attrs:{label:"内容"}},[t("el-input",{attrs:{type:"textarea",rows:20},model:{value:e.webConfig.center.content,callback:function(t){e.$set(e.webConfig.center,"content",t)},expression:"webConfig.center.content"}})],1)],1)],1),t("el-tab-pane",{staticClass:"experiment-pane pane-container",attrs:{label:"项目列表",name:"experiment"}},[t("el-transfer",{attrs:{titles:["可选项目列表","展示项目列表"],"target-order":"push",props:{key:"id",label:"name"},data:e.webConfig.experiment.canList},model:{value:e.webConfig.experiment.showList,callback:function(t){e.$set(e.webConfig.experiment,"showList",t)},expression:"webConfig.experiment.showList"}})],1),t("el-tab-pane",{staticClass:"friend-pane pane-container",attrs:{label:"友情链接",name:"friend"}},[t("div",{staticClass:"tools-box clearFix"},[t("div",{staticClass:"fr"},[t("el-button",{attrs:{type:"primary",plain:"",size:"small"},on:{click:function(t){e.FriendMethods().clickAddOneBtn()}}},[e._v("新增友情链接")])],1)]),t("el-table",{attrs:{data:e.webConfig.friend.list,border:"",fit:""}},[t("el-table-column",{attrs:{label:"序号",align:"center",width:"100"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("span",[e._v(e._s(i.$index+1))])]}}])}),t("el-table-column",{attrs:{label:"序号",align:"center",width:"400"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("erp-uploader-one-pic",{staticStyle:{"margin-right":"30px"},attrs:{"img-in":i.row.image,"uploader-id":"image","uploader-title":"图片","uploader-size":[200,200],"pixel-limit":[280,140],"size-limit":2e3},on:{uploadSuccess:t=>e.fileUpload(t,e.webConfig.friend.list[i.$index],"focus"),afterDelete:t=>e.fileDelete(t,e.webConfig.friend.list[i.$index],"focus")}})]}}])}),t("el-table-column",{attrs:{label:"名称",align:"center"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("el-input",{model:{value:i.row.name,callback:function(t){e.$set(i.row,"name",t)},expression:"scope.row.name"}})]}}])}),t("el-table-column",{attrs:{label:"跳转链接",align:"center"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("el-input",{model:{value:i.row.url,callback:function(t){e.$set(i.row,"url",t)},expression:"scope.row.url"}})]}}])}),t("el-table-column",{attrs:{label:"是否显示",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("el-select",{model:{value:i.row.show,callback:function(t){e.$set(i.row,"show",t)},expression:"scope.row.show"}},[t("el-option",{attrs:{label:"显示",value:!0}}),t("el-option",{attrs:{label:"隐藏",value:!1}})],1)]}}])}),t("el-table-column",{attrs:{label:"操作",align:"center",width:"150"},scopedSlots:e._u([{key:"default",fn:function(i){return[t("el-button",{attrs:{size:"mini",type:"danger",plain:""},on:{click:function(t){e.FriendMethods().clickDeleteBtn(i.$index)}}},[e._v("删除")])]}}])})],1)],1)],1),t("div",{staticClass:"bottom-button-container flex flex-center"},[t("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.clickSaveBtn()}}},[e._v("保存官网配置")])],1)],1)},o=[],l=(i("14d9"),i("2f62")),a=i("9204"),s=i("a888"),r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"erp-uploader-one erp-uploader-one-pic",attrs:{id:"erp-uploader-one-pic-"+e.uploaderId}},[t("el-upload",{attrs:{action:"dev","show-file-list":!1,"on-success":e.uploadSuccess,"http-request":t=>e.uploadRequest(t,e.uploadTarget),"before-upload":e.beforeUpload}},[t("img",{directives:[{name:"show",rawName:"v-show",value:e.img&&!e.uploading,expression:"img&&!uploading"}],staticClass:"img-show",attrs:{src:e.img,alt:""},on:{click:function(e){}}}),e.img||e.uploading?e._e():t("i",{staticClass:"el-icon-plus uploader-icon"}),!e.img&&e.uploading?t("i",{staticClass:"el-icon-loading uploader-icon"}):e._e()]),t("div",{directives:[{name:"show",rawName:"v-show",value:e.img,expression:"img"}],staticClass:"buttons flex flex-center"},[t("el-button",{attrs:{type:"text"},on:{click:function(t){e.img&&(e.uploadPreviewShow=!0)}}},[e._v("预览 ")]),t("el-button",{attrs:{type:"text"},on:{click:e.clickDeleteImg}},[e._v("删除")])],1),e.showDes?t("div",{staticClass:"des flex flex-dr flex-center"},[t("div",{staticClass:"title"},[e._v(e._s(e.uploaderTitle))]),t("div",[e._v("图片比例："+e._s(e.pixelLimit[0])+"px X "+e._s(e.pixelLimit[1])+"px")]),t("div",[e._v("图片大小："+e._s(e._f("sizeLimitFilter")(e.sizeLimit))+"以内")])]):e._e(),t("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{center:"",visible:e.uploadPreviewShow,width:"600px","append-to-body":""},on:{"update:visible":function(t){e.uploadPreviewShow=t}}},[t("el-image",{staticStyle:{cursor:"pointer"},attrs:{width:"100%",src:e.img,alt:"",lazy:""},on:{click:function(t){return e.window.open(e.img)}}})],1)],1)},c=[],u=i("e698"),d=i("5c8a"),p={name:"erpUploaderOnePic",directives:{elDragDialog:s["a"]},filters:{sizeLimitFilter(e){return e>=1024?(e=(e/1024).toFixed(1),e=e.replace(/.0$/,""),e+"MB"):e+"KB"}},props:{showDes:{type:Boolean,default:!0},uploaderId:{type:String,default:""},uploaderSize:{type:Array,default:()=>[100,100]},uploaderTitle:{type:String,default:""},sizeLimit:{type:Number,default:1024},pixelLimit:{type:Array,default:()=>[200,200]},imgIn:{type:String,default:""},uploadTarget:{type:String,default:"qiniu"}},computed:{img:{get:function(){return this.imgIn},set:function(e){return e}}},data(){return{window:window,uploadRequest:u["a"].uploadRequest,uploading:!1,uploadPreviewShow:!1}},mounted(){document.querySelector("#erp-uploader-one-pic-"+this.uploaderId+" .el-upload").style.width=this.uploaderSize[0]+"px",document.querySelector("#erp-uploader-one-pic-"+this.uploaderId+" .el-upload").style.height=this.uploaderSize[1]+"px",this.img||(document.querySelector("#erp-uploader-one-pic-"+this.uploaderId+" .uploader-icon").style.width=this.uploaderSize[0]+"px",document.querySelector("#erp-uploader-one-pic-"+this.uploaderId+" .uploader-icon").style.height=this.uploaderSize[1]+"px",document.querySelector("#erp-uploader-one-pic-"+this.uploaderId+" .uploader-icon").style.lineHeight=this.uploaderSize[1]+"px"),document.querySelector("#erp-uploader-one-pic-"+this.uploaderId+" .img-show").style.width=this.uploaderSize[0]+"px",document.querySelector("#erp-uploader-one-pic-"+this.uploaderId+" .img-show").style.height=this.uploaderSize[1]+"px"},updated(){},methods:{beforeUpload(e){if(!u["a"].fileTypeLimit(e,"image"))return Object(d["d"])("只能上传图片文件!"),!1;const t=e.size/1024<=this.sizeLimit;if(!t){let e=this.sizeLimit,t="";return e>=1024?(e=Math.ceil(e/1024),t=e+"MB"):t=e+"KB",Object(d["d"])("图片超过最大限制，最大"+t+"!"),!1}return this.uploading=!0,!0},uploadSuccess(e){return this.$set(this,"img",e.data),this.uploading=!1,this.$emit("uploadSuccess",[this.uploaderId,e.data]),!0},clickDeleteImg(){this.img="",this.$listeners["afterDelete"]&&this.$emit("afterDelete",[this.uploaderId]),setTimeout(()=>{document.querySelector("#erp-uploader-one-pic-"+this.uploaderId+" .uploader-icon").style.width=this.uploaderSize[0]+"px",document.querySelector("#erp-uploader-one-pic-"+this.uploaderId+" .uploader-icon").style.height=this.uploaderSize[1]+"px",document.querySelector("#erp-uploader-one-pic-"+this.uploaderId+" .uploader-icon").style.lineHeight=this.uploaderSize[1]+"px"},100)}}},f=p,m=(i("b17f"),i("2877")),b=Object(m["a"])(f,r,c,!1,null,"df85bf42",null),g=b.exports;class h{static bottomButtonContainerWidthChange(){let e=window.$,t=e(".app-main").width();e(".bottom-button-container").css("width",t),e(window).resize((function(){let t=e(".app-main").width();e(".bottom-button-container").css("width",t)}))}}var w=i("8ce4"),y=i("7b67");async function v(e){return Object(w["a"])(y["c"]+"/consumer/config/officialWeb","post_body",e)}class x{static async editOfficialWebConfig(e){let[t]=await v(e);return 2e4===t.code}}var _=i("5bfe"),C={name:"webSetting",filters:{dateFormat:a["a"]},directives:{elDragDialog:s["a"]},components:{erpUploaderOnePic:g},computed:{...Object(l["b"])({userInfo:e=>e.user})},data(){return{tabShow:"base",webConfig:{base:{},focus:{list:[],h5:[]},center:{},friend:{list:[]},experiment:{showList:[],canList:[]}}}},async mounted(){this.webConfig=JSON.parse(await _["a"].getConfig("config_exp_officialWeb",this.userInfo.schoolId)),h.bottomButtonContainerWidthChange()},methods:{fileUpload(e,t,i){let n=e[1],o=e[0];this.$set(t,o,n),i&&this.$refs[i].validate()},fileDelete(e,t,i){let n=e[0];this.$set(t,n,""),i&&this.$refs[i].validate()},async clickSaveBtn(){await Object(d["a"])("确认要保存官网配置吗？","保存官网配置")&&await x.editOfficialWebConfig(this.webConfig)&&Object(d["e"])("保存官网配置成功！")},FocusMethods(){let e=this;return{clickAddOneBtn(){e.webConfig.focus.list.push({show:!0})},async clickDeleteBtn(t){await Object(d["a"])("确认要删除此轮播图吗？","删除轮播图")&&e.webConfig.focus.list.splice(t,1)}}},FocusH5Methods(){let e=this;return{clickAddOneBtn(){e.webConfig.focus.h5.push({show:!0})},async clickDeleteBtn(t){await Object(d["a"])("确认要删除此轮播图吗？","删除轮播图")&&e.webConfig.focus.h5.splice(t,1)}}},FriendMethods(){let e=this;return{clickAddOneBtn(){e.webConfig.friend.list.push({show:!0})},async clickDeleteBtn(t){await Object(d["a"])("确认要删除此友情链接吗？","删除友情链接")&&e.webConfig.friend.list.splice(t,1)}}}}},S=C,k=(i("5d33"),Object(m["a"])(S,n,o,!1,null,"7895a394",null));t["default"]=k.exports},a888:function(e,t,i){"use strict";const n=20;function o(e,t,i){return Math.min(Math.max(e,t),i)}function l(e){return{dialogHeaderEl:e.querySelector(".el-dialog__header"),dragDom:e.querySelector(".el-dialog")}}function a(e){return e.componentInstance||e.child}function s(e){return Boolean(a(e)&&a(e).visible)}function r(e){return e&&"object"===typeof e.value&&null!==e.value?e.value:{center:Boolean(e&&e.value)}}function c(e,t){const i=document.documentElement.clientWidth,o=document.documentElement.clientHeight,l=n,a=Math.max(i-e.offsetWidth-n,l),s=n,r=Math.max(o-t.offsetHeight-n,s);return{screenWidth:i,screenHeight:o,minLeft:l,maxLeft:a,minTop:s,maxTop:r}}function u(e){const{dialogHeaderEl:t,dragDom:i}=l(e);if(!t||!i||!i.offsetWidth)return;const n=e.__dragDialogOptions||{},a=c(i,t),s=window.getComputedStyle(i),r=parseFloat(s.marginTop)||a.minTop,u=(a.screenWidth-i.offsetWidth)/2,d=(a.screenHeight-i.offsetHeight)/2,p=n.center?d:r;i.style.position="fixed",i.style.margin="0",i.style.left=o(u,a.minLeft,a.maxLeft)+"px",i.style.top=o(p,a.minTop,a.maxTop)+"px",i.style.right="auto",i.style.bottom="auto"}function d(e,t,i){e.__dragDialogOptions=r(t),e.__dragDialogVm=a(i);const n=s(i),o=e.__dragDialogVisible;e.__dragDialogVisible=n,n&&!o&&requestAnimationFrame(()=>{u(e)})}var p={inserted(e,t,i){const{dialogHeaderEl:n,dragDom:a}=l(e);n&&a&&(n.style.cursor="move",n.onmousedown=t=>{const i=c(a,n),l=parseFloat(a.style.left)||a.getBoundingClientRect().left,s=parseFloat(a.style.top)||a.getBoundingClientRect().top,r=t.clientX,u=t.clientY,d=t=>{const n=o(l+t.clientX-r,i.minLeft,i.maxLeft),c=o(s+t.clientY-u,i.minTop,i.maxTop);a.style.left=n+"px",a.style.top=c+"px",e.__dragDialogVm&&e.__dragDialogVm.$emit&&e.__dragDialogVm.$emit("dragDialog")},p=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",p)};document.addEventListener("mousemove",d),document.addEventListener("mouseup",p),t.preventDefault()},d(e,t,i))},componentUpdated(e,t,i){d(e,t,i)},unbind(e){const{dialogHeaderEl:t}=l(e);t&&(t.onmousedown=null),delete e.__dragDialogOptions,delete e.__dragDialogVisible,delete e.__dragDialogVm}};const f=function(e){e.directive("el-drag-dialog",p)};window.Vue&&(window["el-drag-dialog"]=p,Vue.use(f)),p.install=f;t["a"]=p},b17f:function(e,t,i){"use strict";i("80db")},f8de:function(e,t,i){}}]);