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
2.9 KiB
1 lines
2.9 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d229a36"],{ddff:function(e,t,s){"use strict";s.r(t);var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"ele-body"},[s("el-card",{attrs:{shadow:"never"}},[s("ele-pro-table",{ref:"table",attrs:{datasource:e.url,columns:e.columns,where:e.where,selection:e.selection},on:{"update:selection":function(t){e.selection=t}},scopedSlots:e._u([{key:"image",fn:function(e){var t=e.row;return[s("div",{staticClass:"ele-cell"},[s("a",{attrs:{href:t.thumb,target:"_blank"}},[s("el-avatar",{attrs:{shape:"square",size:100,src:t.url}})],1)])]}},{key:"title",fn:function(t){var a=t.row;return[s("div",{staticClass:"ele-cell"},[s("a",{attrs:{href:a.url,target:"_blank"}},[e._v("{row.name}")])])]}},{key:"status",fn:function(e){var t=e.row;return[s("ele-dot",{attrs:{type:["success","danger"][t.is_use],ripple:0===t.is_use,text:["否","是"][t.is_use]}})]}},{key:"action",fn:function(t){var a=t.row;return[0==a.is_use?s("el-popconfirm",{staticClass:"ele-action",attrs:{title:"确定要切换模板吗,网站将会被更改?"},on:{confirm:function(t){return e.remove(a)}}},[s("el-link",{attrs:{slot:"reference",icon:"el-icon-_fire",type:"delete",underline:!1},slot:"reference"},[e._v("切换模板 ")])],1):e._e()]}}])})],1)],1)},n=[],r={name:"SiteTemplate",components:{},data:function(){return{url:"/SiteTemplate/index",columns:[{columnKey:"index",type:"index",width:45,align:"center",fixed:"left",showOverflowTooltip:!0},{prop:"template.name",label:"网站名",sortable:!1,showOverflowTooltip:!0,minWidth:80},{prop:"template.url",label:"图片",sortable:!1,showOverflowTooltip:!0,minWidth:100,slot:"image"},{prop:"is_use",label:"使用状态",align:"center",sortable:!1,width:100,resizable:!1,slot:"status"},{columnKey:"action",label:"操作",width:220,align:"center",resizable:!1,slot:"action"}],where:{},selection:[],current:null,showEdit:!1,showImport:!1}},methods:{reload:function(){this.$refs.table.reload({page:1})},reset:function(){var e=this;this.where={},this.$nextTick((function(){e.reload()}))},openEdit:function(e){this.current=e,this.showEdit=!0},remove:function(e){var t=this,s=this.$loading({lock:!0}),a=new FormData;a.append("id",e.id),this.$http.post("/SiteTemplate/change/",a).then((function(e){s.close(),0===e.data.code?(t.$message({type:"success",message:e.data.msg}),t.reload()):t.$message.error(e.data.msg)})).catch((function(e){s.close(),t.$message.error(e.message)}))},editStatus:function(e){var t=this,s=this.$loading({lock:!0}),a=new FormData;a.append("status",e.status),a.append("username",e.username),a.append("id",e.id),this.$http.post("/manager/status",a).then((function(a){s.close(),0===a.data.code?t.$message({type:"success",message:a.data.msg}):(e.status=e.status?0:1,t.$message.error(a.data.msg))})).catch((function(e){s.close(),t.$message.error(e.message)}))}}},o=r,i=s("2877"),l=Object(i["a"])(o,a,n,!1,null,"ac04af76",null);t["default"]=l.exports}}]);
|