You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
11 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ef186e24"],{"0adb":function(t,e,a){},"19a8":function(t,e,a){"use strict";a("3396")},3396:function(t,e,a){},"5b16":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"container",attrs:{id:"theme"}},[a("div",{staticClass:"content"},[a("el-tabs",{staticClass:"tab-card tabs-white",attrs:{type:"card"},on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:t.$t("已安装模板"),name:"first"}},["first"==t.activeName?a("Moulded"):t._e()],1),a("el-tab-pane",{attrs:{label:t.$t("系统模板"),name:"second"}},["second"==t.activeName?a("el-table",{attrs:{data:t.themeList}},[a("el-table-column",{attrs:{label:t.$t("模板"),prop:"theme"}}),a("el-table-column",{attrs:{label:t.$t("版本号"),prop:"version"}}),a("el-table-column",{attrs:{label:t.$t("语言"),prop:"lang"}}),a("el-table-column",{attrs:{label:t.$t("作者"),prop:"author"}}),a("el-table-column",{attrs:{label:t.$t("模板描述"),prop:"description"}}),a("el-table-column",{attrs:{label:t.$t("操作"),align:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("安装模板"),placement:"top"}},[a("el-button",{attrs:{type:"text",icon:"el-icon-set-up"},on:{click:function(a){return t.install(e.row)}}})],1),a("DelBtn",{on:{success:function(a){return t.goDele(e.row)}}})]}}],null,!1,3790530724)})],1):t._e()],1)],1),a("BaseDialog",{staticClass:"dialog",attrs:{title:t.$t("安装模板"),"dialog-show":t.dialogShow,width:"50%"},on:{"update:dialogShow":function(e){t.dialogShow=e},"update:dialog-show":function(e){t.dialogShow=e}}},[a("el-form",{ref:"themeForm",attrs:{model:t.themeForm,rules:t.themeRules,"label-position":"top"}},[a("el-form-item",{attrs:{label:t.$t("模板")+":",prop:"theme"}},[a("el-input",{attrs:{disabled:""},model:{value:t.themeForm.theme,callback:function(e){t.$set(t.themeForm,"theme",e)},expression:"themeForm.theme"}})],1),a("el-form-item",{attrs:{label:t.$t("站点")+":",prop:"website_id"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("请选择站点"),disabled:""},on:{change:t.handleChange},model:{value:t.themeForm.website_id,callback:function(e){t.$set(t.themeForm,"website_id",e)},expression:"themeForm.website_id"}},t._l(t.options,(function(t){return a("el-option",{key:t.id,attrs:{label:t.domain,value:t.id}})})),1)],1),a("el-form-item",{attrs:{label:t.$t("语言")+":",prop:"lang"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("请选择语言")},model:{value:t.themeForm.lang,callback:function(e){t.$set(t.themeForm,"lang",e)},expression:"themeForm.lang"}},t._l(t.themeLang,(function(t){return a("el-option",{key:t.id,attrs:{label:t.lang,value:t.lang}})})),1)],1),a("div",{staticClass:"btn"},[a("el-button",{on:{click:function(e){t.dialogShow=!1}}},[t._v(t._s(t.$t("取消")))]),a("el-button",{attrs:{type:"primary",loading:t.loading},on:{click:function(e){return t.submittheme()}}},[t._v(" "+t._s(t.$t("提交"))+" ")])],1)],1)],1)],1)])},n=[],s=a("5530"),o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"theme"}},[a("BaseDialog",{staticClass:"dialog",attrs:{title:t.$t("安装模板"),"dialog-show":t.dialogShow,width:"50%"},on:{"update:dialogShow":function(e){t.dialogShow=e},"update:dialog-show":function(e){t.dialogShow=e}}},[a("el-form",{ref:"themeForm",attrs:{model:t.themeForm,rules:t.themeRules,"label-position":"top"}},[a("el-form-item",{attrs:{label:t.$t("模板")+":",prop:"theme"}},[a("el-input",{attrs:{disabled:""},model:{value:t.themeForm.theme,callback:function(e){t.$set(t.themeForm,"theme",e)},expression:"themeForm.theme"}})],1),a("el-form-item",{attrs:{label:t.$t("站点")+":",prop:"website_id"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("请选择站点")},on:{change:t.handleChange},model:{value:t.themeForm.website_id,callback:function(e){t.$set(t.themeForm,"website_id",e)},expression:"themeForm.website_id"}},t._l(t.options,(function(t){return a("el-option",{key:t.id,attrs:{label:t.domain,value:t.id}})})),1)],1),a("div",{staticClass:"btn"},[a("el-button",{on:{click:function(e){t.dialogShow=!1}}},[t._v(t._s(t.$t("取消")))]),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submittheme()}}},[t._v(" "+t._s(t.$t("提交"))+" ")])],1)],1)],1),a("el-radio-group",{attrs:{size:"medium"},on:{change:t.changeLang},model:{value:t.params.lang,callback:function(e){t.$set(t.params,"lang",e)},expression:"params.lang"}},t._l(t.langList,(function(e){return a("el-radio-button",{key:e.id,attrs:{label:e.lang}},[t._v(" "+t._s(e.lang)+" ")])})),1),a("BaseTable",{ref:"baseTable",attrs:{request:t.request,params:t.params,"is-request":!1},on:{"update:params":function(e){t.params=e}}},[a("el-table-column",{attrs:{label:t.$t("模板"),prop:"theme"}}),a("el-table-column",{attrs:{label:t.$t("模板名称"),prop:"name"}}),a("el-table-column",{attrs:{label:t.$t("作者"),prop:"author"}}),a("el-table-column",{attrs:{label:t.$t("语言"),prop:"lang"}}),a("el-table-column",{attrs:{label:t.$t("模板描述"),prop:"description"}}),a("el-table-column",{attrs:{label:t.$t("操作"),width:"150px",fixed:"right",align:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("更新"),placement:"top"}},[a("el-button",{attrs:{type:"text",icon:"el-icon-refresh"},on:{click:function(a){return t.update(e.row)}}})],1),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:t.$t("卸载"),placement:"top"}},[a("el-button",{attrs:{type:"text",icon:"el-icon-delete"},on:{click:function(a){return t.uninstall(e.row)}}})],1),a("BaseDropdown",{on:{command:function(a){return t.handleCommand(a,e.row)}}},[[a("el-dropdown-item",{attrs:{command:"all-files"}},[t._v(" "+t._s(t.$t("所有文件"))+" ")]),a("el-dropdown-item",{attrs:{command:"theme"}},[t._v(" "+t._s(t.$t("模版文件"))+" ")]),a("el-dropdown-item",{attrs:{command:"enable",disabled:1==e.row.is_active&&"disabled"}},[t._v(" "+t._s(t.$t("启用"))+" ")]),a("el-dropdown-item",{attrs:{command:"design"}},[t._v(" "+t._s(t.$t("可视化设计"))+" ")])]],2)]}}])})],1)],1)},l=[],r=(a("14d9"),a("12de")),c=a("7f6c"),d={data:function(){return{request:r["a"].installList,params:{lang:"",website_id:""},themeList:[],dialogShow:!1,options:[],themeForm:{website_id:""},themeRules:{website_id:[{required:"true",message:this.$t("请选择站点"),trigger:"blur"}]},searchForm:{},siteId:"",langList:[],lang:""}},computed:{siteId1:function(){return this.$store.getters.siteId}},watch:{siteId1:{handler:function(t){t&&(this.siteId=t,this.params.website_id=t,this.getLang())},immediate:!0,deep:!0}},created:function(){this.siteId=this.$store.getters.siteId,this.params.website_id=this.$store.getters.siteId,this.siteId&&this.getLang()},methods:{handleCommand:function(t,e){switch(t){case"all-files":this.allFiles(e);break;case"theme":this.temFiles(e);break;case"enable":this.enable(e);break;case"design":this.viewDesign(e);break}},viewDesign:function(){var t="/design/index?website_id="+this.siteId+"&lang="+this.params.lang;window.open(t)},getLang:function(){var t=this;c["a"].langInfo({site_id:this.siteId}).then((function(e){t.langList=e.data,e.data.length>0&&(t.params.lang=e.data[0].lang),t.$refs.baseTable.getList("search")}))},changeLang:function(t){this.params.lang=t,this.$refs.baseTable.getList("search")},enable:function(t){var e=this;this.$confirm(this.$t("是否启用该模板"),this.$t("提示"),{confirmButtonText:this.$t("确定"),cancelButtonText:this.$t("取消"),type:"warning"}).then((function(){var a={theme_id:t.id,website_id:e.siteId,lang:t.lang};r["a"].themeActive(a).then((function(t){0==t.code&&(e.$message.success(t.msg),e.$refs.baseTable.getList())}))})).catch((function(){}))},update:function(t){var e=this;this.$confirm(this.$t("是否更新该模板"),this.$t("提示"),{confirmButtonText:this.$t("确定"),cancelButtonText:this.$t("取消"),type:"warning"}).then((function(){var a={theme_id:t.id,website_id:e.siteId,theme:t.theme};r["a"].themeUpdate(a).then((function(t){0==t.code&&(e.$message.success(t.msg),e.$refs.baseTable.getList())}))})).catch((function(){}))},uninstall:function(t){var e=this;this.$confirm(this.$t("是否卸载该模板"),this.$t("提示"),{confirmButtonText:this.$t("确定"),cancelButtonText:this.$t("取消"),type:"warning"}).then((function(){var a={theme_id:t.id,website_id:e.siteId};r["a"].themeUninstall(a).then((function(t){0==t.code&&(e.$message.success(t.msg),e.$refs.baseTable.getList())}))})).catch((function(){}))},allFiles:function(t){this.$router.push({name:"files",query:{id:t.website_id,lang:t.lang}})},temFiles:function(t){this.$router.push({name:"tempFiles",query:{id:t.website_id,tid:t.id,tname:t.theme,lang:t.lang}})},submittheme:function(){var t=this;r["a"].saveTheme(Object(s["a"])({},this.themeForm)).then((function(e){0==e.code&&(t.$message.success(e.msg),t.dialogShow=!1)}))},handleChange:function(t){this.themeForm.website_id=t}}},m=d,h=(a("19a8"),a("b2e2"),a("2877")),u=Object(h["a"])(m,o,l,!1,null,"65f04230",null),b=u.exports,g=a("37cb"),f={components:{Moulded:b},data:function(){return{activeName:"first",themeList:[],dialogShow:!1,options:[],themeForm:{website_id:""},themeRules:{website_id:[{required:"true",message:this.$t("请选择站点"),trigger:"blur"}]},themeLang:[],loading:!1}},computed:{siteId1:function(){return this.$store.getters.siteId}},watch:{siteId1:function(t,e){this.themeForm.website_id=t},activeName:{handler:function(t){"second"==t&&this.getList()}}},created:function(){this.themeForm.website_id=this.$store.getters.siteId,this.getList(),this.themeForm.website_id&&this.getLang()},methods:{getLang:function(){var t=this;c["a"].langInfo({site_id:this.themeForm.website_id}).then((function(e){t.themeLang=e.data}))},getList:function(){var t=this;r["a"].themeList().then((function(e){t.themeList=e.data}))},install:function(t){this.getWeblist(),this.getLang(),this.themeForm.theme=t.theme,this.dialogShow=!0},goDele:function(t){var e=this;r["a"].deleteTheme({theme:t.theme}).then((function(t){0==t.code&&e.$message.success(t.msg)}))},submittheme:function(){var t=this;this.loading=!0,r["a"].saveTheme(Object(s["a"])({},this.themeForm)).then((function(e){0==e.code&&(t.$message.success(e.msg),t.dialogShow=!1),t.loading=!1}))},getWeblist:function(){var t=this;g["a"].websiteList().then((function(e){t.options=e.data,t.themeForm.website_id=t.$store.getters.siteId}))},handleChange:function(t){},handleClick:function(t,e){}}},p=f,w=(a("7eb4"),a("eba5"),Object(h["a"])(p,i,n,!1,null,"25167716",null));e["default"]=w.exports},"77dd":function(t,e,a){},"7eb4":function(t,e,a){"use strict";a("0adb")},"7f6c":function(t,e,a){"use strict";var i=a("365c");function n(t){var e="/websiteSetting/read";return i["a"].get(e,t)}function s(t){var e="/websiteSetting/update";return i["a"].post(e,t)}function o(t){var e="/websiteLang/index";return i["a"].get(e,t)}function l(t){var e="/websiteLang/save";return i["a"].post(e,t)}function r(t){var e="/websiteLang/system";return i["a"].get(e,t)}function c(t){var e="/websiteServer/read";return i["a"].get(e,t)}function d(t){var e="/websiteServer/update";return i["a"].post(e,t)}e["a"]={basicInfo:n,basicUpdate:s,langInfo:o,langUpdate:l,systemLang:r,serverInfo:c,serverUpdate:d}},b2e2:function(t,e,a){"use strict";a("77dd")},be6e:function(t,e,a){},eba5:function(t,e,a){"use strict";a("be6e")}}]);