(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0ba4ad"],{"371d":function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"app-container"},[i("div",{staticClass:"filter-container"},[i("el-button",{staticClass:"filter-item",attrs:{type:"success",icon:"el-icon-refresh"},on:{click:t.refresh}},[t._v("刷新")]),i("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-circle-plus-outline"},on:{click:t.add}},[t._v("添加")])],1),i("div",{staticClass:"padding-lg margin-top back-white"},[i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:t.list,border:"",fit:"","highlight-current-row":""}},[i("el-table-column",{attrs:{type:"selection",width:"55"}}),i("el-table-column",{attrs:{label:"ID",sortable:"custom",align:"center",width:"80"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[i("span",[t._v(t._s(a.id))])]}}])}),i("el-table-column",{attrs:{label:"表单标题",property:"title",align:"left"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[i("span",{domProps:{innerHTML:t._s(a.title)}})]}}])}),i("el-table-column",{attrs:{label:"banner图",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[a.image?i("div",{staticClass:"flex align-center justify-center"},[i("img",{staticStyle:{width:"50px",height:"50px"},attrs:{src:a.image}})]):t._e()]}}])}),i("el-table-column",{attrs:{label:"状态",property:"status",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[i("span",[t._v(t._s(1==a.status?"开启":"关闭"))])]}}])}),i("el-table-column",{attrs:{label:"操作",align:"center",width:"300","class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row,n=e.$index;return[i("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"编辑",placement:"top"}},[i("el-button",{attrs:{type:"primary",size:"mini",icon:"el-icon-edit"},on:{click:function(e){return t.edit(a)}}})],1),i("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"删除",placement:"top"}},[i("el-button",{attrs:{type:"danger",size:"mini",icon:"el-icon-delete"},on:{click:function(e){return t.del(a.id,n)}}})],1)]}}])})],1),i("pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total > 0"}],attrs:{total:t.total,page:t.listQuery.page,limit:t.listQuery.limit},on:{"update:page":function(e){return t.$set(t.listQuery,"page",e)},"update:limit":function(e){return t.$set(t.listQuery,"limit",e)},pagination:t.getList}})],1),i("copyright")],1)},n=[],s=i("7f70"),l=(i("e8d6"),i("baf6"),i("8327")),r=i("333d"),o={name:"Form",components:{Pagination:r["a"]},data:function(){return{list:null,total:0,listLoading:!0,rows:{},listQuery:{page:1,limit:10}}},computed:Object(s["a"])({},Object(l["b"])(["config"])),created:function(){this.getList()},methods:{getTypeName:function(t){switch(t){case 1:return"商户轮播图";default:return""}},refresh:function(){this.getList()},add:function(){this.rows={},this.$router.push({path:"/form/post/0"})},edit:function(t){this.rows=t,this.$router.push({path:"/form/post/".concat(t.id)})},getList:function(){var t=this;this.listLoading=!0,this.api.get("form/form/getList",this.listQuery).then((function(e){t.listLoading=!1,1==e.code?(t.total=parseInt(e.data.total),t.list=e.data.list):t.$util.error(e.message||e.msg||"数据异常")}))},del:function(t,e){var i=this;if(!t)return!1;this.$util.confirm("此操作将永久删除该数据, 是否继续?",(function(a){a&&i.api.get("form/form/delete",{id:t}).then((function(t){1==t.code?(i.list.splice(e,1),i.$util.success(t.message)):i.$util.error(t.message)}))}))}}},c=o,u=i("3d7a"),d=Object(u["a"])(c,a,n,!1,null,null,null);e["default"]=d.exports}}]);