(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1f11ec07"],{"391e":function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},s=[],o=n("9ee1"),i=o["a"],r=n("9ca4"),c=Object(r["a"])(i,a,s,!1,null,null,null);t["a"]=c.exports},"9ee1":function(e,t,n){"use strict";(function(e){n("163d");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var n=e("#framediv"),a=n.get()[0]||0,s=window.innerHeight-a.offsetTop-t.advalue;t.frameHeight=s,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,n("a336"))},b0d7:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var a=t.adjustHeight;return[n("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,tblheight:a-120,metaName:"template_info",packageName:"template",modelName:"templateinfo",isMulti:"",savebefore:e.savebefore,editbefore:e.beforedit,addbefore:e.beforeadd},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}})]}}])})},s=[],o=n("06d3"),i=n("391e"),r=n("7e1e"),c={name:"templateinfo_page",data:function(){return{row:{}}},components:{BizTable:o["a"],PageSpace:i["a"]},methods:{savebefore:function(e,t,n){return n(t)},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t){return t({value:!0,message:null})},beforesave:function(e,t,n){return n(t)},articleShow:function(e){this.isshowlist=!1,this.currow=e},oninitbtn:function(e,t){switch(t.is_enabled){case 0:"unenable"===e.key?e.ishide=!0:e.ishide=!1;break;case 1:"enable"===e.key?e.ishide=!0:e.ishide=!1;break}},gotoPreview:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.$router.resolve({path:e,query:t});window.open(n.href,"_blank")},onexec:function(e,t){var n=this;console.log(this.currentRow),"toHome"==e&&this.$router.push({name:"home",query:{template_code:t.code}}),"link"==e&&this.$router.push({name:"templatelink",query:{template_id:t.id}}),"show"==e&&this.gotoPreview("/previewpage",{template_code:t.code}),"enable"==e&&Object(r["o"])({code:t.code,is_enabled:1}).then((function(e){0==e.status?(n.$Message.success("启用成功"),n.$refs.bt.fetchData()):n.$Message.success("操作失败")})),"unenable"==e&&Object(r["o"])({code:t.code,is_enabled:0}).then((function(e){0==e.status?(n.$Message.success("禁用成功"),n.$refs.bt.fetchData()):n.$Message.success("操作失败")})),"createTemp"==e&&Object(r["b"])().then((function(e){0==e.status?(n.$Message.success("新增成功"),n.$refs.bt.fetchData()):n.$Message.success("新增失败")}))},formatCol:function(e,t,n){return"is_enabled"==t?e["is_enabled"]?'<span style="color:green">是</span>':'<span style="color:orange">否</span>':"created_at"==t?"<span>".concat(new Date(e[t]).toLocaleString(),"</span>"):e[t]}}},u=c,l=n("9ca4"),f=Object(l["a"])(u,a,s,!1,null,null,null);t["default"]=f.exports}}]);