(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-3bc82d2c"],{"1bab":function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));n("d3b7"),n("8237");var a=n("2b0e"),i=n("4328"),o=n.n(i);n("3a34");function l(t,e,n){return new Promise((function(i,l){var s={data:JSON.stringify(e)},r="60000";null!=n&&(r=n+"");var c=parseInt(r);t=t+"?"+(new Date).getTime()+Math.random()+Math.ceil(-89999*Math.random()+99999),a.default.prototype.$http.post(t,o.a.stringify(s),{timeout:c}).then((function(t){i(t)})).catch((function(t){l(t)}))}))}},"4e0b":function(t,e,n){},"6d14":function(t,e,n){"use strict";n.r(e);var a=n("1bab"),i={name:"gallery",data:function(){return{loading:!0,pageNum:1,pageSize:10,total:0,GalleryList:[],albumkeyList:[],columns:[{type:"selection",width:55,align:"center"},{title:"画廊标题",minWidth:200,key:"albumtitle"},{title:"画廊地址",minWidth:300,render:function(t,e){return t("a",{attrs:{name:e.row.albumkey,target:"_blank",href:window.location.protocol+"//"+window.location.host+"/h/"+e.row.albumkey}},window.location.protocol+"//"+window.location.host+"/h/"+e.row.albumkey)}},{title:"创建日期",tooltip:!0,minWidth:130,align:"center",key:"createdate"},{title:"创建人",minWidth:130,align:"center",render:function(t,e){return 0==e.row.userid?t("span",{},"访客"):t("span",{},e.row.username)}},{title:"访问密码",align:"center",width:100,render:function(t,e){return e.row.password?t("span",{},e.row.password):t("span",{},"无")}},{title:"操作",width:120,key:"action",slot:"action"}],groupList:[]}},mounted:function(){this.$Spin.show(),this.getGalleryList(),this.$Spin.hide()},methods:{toPageIndex:function(t){this.pageNum=t,this.getUserList()},toPageSize:function(t){},getGalleryList:function(){var t=this,e={};e.pageNum=this.pageNum,e.pageSize=this.pageSize,Object(a.a)("/admin/getGalleryList",e).then((function(e){200==e.status&&(t.loading=!1,t.GalleryList=e.data.data)})).catch((function(e){console.log(e),t.$Message.error("服务器请求错误")}))},selectGallery:function(t){if(t.length>0)for(var e=0;e<t.length;e++)this.albumkeyList.push(t[e].albumkey);else this.albumkeyList=[]},deleSelectGallery:function(){var t=this;0!=this.albumkeyList.length?this.$Modal.confirm({title:"确认删除",content:"<p>您确认删除所选画廊吗</p>",onOk:function(){t.sendDeleGallery()},onCancel:function(){}}):this.$Message.warning("请先选择要操作的数据")},deleGallery:function(t){var e=this;this.$Modal.confirm({title:"确认删除",content:"<p>您确认删除所选画廊吗</p>",onOk:function(){e.sendDeleGallery(t)},onCancel:function(){}})},sendDeleGallery:function(t){var e=this;this.loading=!0;var n={};if(null!=t&&""!=t){var i=[];i.push(t),n.albumkeyList=i}else{if(0==this.albumkeyList.length)return this.loading=!1,this.$Message.warning("请先选择要操作的数据"),!1;n.albumkeyList=this.albumkeyList}Object(a.a)("/admin/deleGallery",n).then((function(t){console.log(t),200==t.status?("200"==t.data.code?e.$Message.success(t.data.info):e.$Message.warning(t.data.info),e.getGalleryList()):e.$Message.error("请求时出现错误"),e.loading=!1})).catch((function(t){e.loading=!1,console.log(t),e.$Message.error("服务器请求错误")}))}}},o=(n("fc7f"),n("2877")),l=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Layout",{staticStyle:{"margin-top":"50px"}},[n("Content",{style:{margin:"15px 20px 0"}},[n("p",{staticStyle:{position:"fixed",right:"58px","z-index":"1",bottom:"68px"}},[n("Button",{staticStyle:{"z-index":"1","margin-right":"8px","box-shadow":"rgba(0, 0, 0, 0.4) 0px 2px 6px 0px"},attrs:{type:"primary",shape:"circle",icon:"md-trash"},on:{click:t.deleSelectGallery}},[t._v("删除选中")])],1),n("Card",{staticClass:"cardShadow",staticStyle:{"margin-top":"10px","padding-left":"8px","padding-right":"8px"}},[n("Table",{ref:"selection",attrs:{loading:t.loading,columns:t.columns,data:t.GalleryList},on:{"on-selection-change":t.selectGallery},scopedSlots:t._u([{key:"action",fn:function(e){var a=e.row,i=e.index;return[n("Icon",{attrs:{type:"md-trash tablebut",value:i},on:{click:function(e){return t.deleGallery(a.albumkey)}}})]}}])},[n("Switch",{model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}})]),n("div",{staticStyle:{"margin-top":"20px"}},[n("Page",{attrs:{total:t.total,"page-size":t.pageSize},on:{"on-change":t.toPageIndex,"on-page-size-change":t.toPageSize}})],1)],1)],1),n("Footer",{staticClass:"layout-footer-center"},[t._v(t._s(this.$store.state.metaInfo.webname)+" © Control Panel")])],1)}),[],!1,null,null,null);e.default=l.exports},fc7f:function(t,e,n){"use strict";n("4e0b")}}]);