(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0a3aae"],{"02c9":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("刷新")]),1==t.config.is_admin_site?i("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-circle-plus-outline"},on:{click:t.create}},[t._v("生成当前模式数据")]):t._e()],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:"name",align:"left"}}),i("el-table-column",{attrs:{label:"描述",property:"sdesc",align:"left"}}),i("el-table-column",{attrs:{label:"排序",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[t._v(t._s(i.sort))]}}])}),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;e.$index;return[i("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"使用",placement:"top"}},[i("el-button",{attrs:{type:"success",size:"mini",icon:"el-icon-finished"},on:{click:function(e){return t.use(a.id)}}})],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("2510"),l=i("5a74"),o=i("7f70"),r=(i("e8d6"),i("baf6"),i("8327")),c=i("333d"),u={name:"Goods",components:{Pagination:c["a"]},data:function(){return{list:null,total:0,listLoading:!0,dialogFormVisible:!1,rows:{},listQuery:{page:1,limit:10},pdata:{}}},computed:Object(o["a"])({},Object(r["b"])(["config"])),created:function(){this.getList()},methods:{refresh:function(){this.getList()},add:function(){this.$router.push({path:"/preset/post/0"})},edit:function(t){this.$router.push({path:"/preset/post/"+t.id})},use:function(t){var e=this;this.$util.confirm("此操作将商城应用该模式, 是否继续?",(function(i){i&&e.api.get("mode/initMode",{id:t}).then((function(t){1==t.code?(e.$util.success(t.message),e.refresh()):e.$util.error(t.message)}))}))},getList:function(){var t=this;this.listLoading=!0,this.api.get("mode/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("mode/delete",{id:t,tab:"category"}).then((function(t){1==t.code?(i.list.splice(e,1),i.$util.success(t.message)):i.$util.error(t.message)}))}))},create:function(){var t=this;this.api.get("mode/addMode").then((function(e){1==e.code?t.copyData(e.data.content):t.$util.error(e.nessage)}))},copyData:function(t){var e=this;return Object(l["a"])(Object(s["a"])().m((function i(){return Object(s["a"])().w((function(i){while(1)switch(i.p=i.n){case 0:return i.p=0,i.n=1,navigator.clipboard.writeText(t);case 1:e.$util.success("复制成功"),i.n=3;break;case 2:i.p=2,i.v,e.$util.error("复制失败");case 3:return i.a(2)}}),i,null,[[0,2]])})))()}}},d=u,p=i("3d7a"),f=Object(p["a"])(d,a,n,!1,null,null,null);e["default"]=f.exports}}]);