canyin-project/ybcy/views/channel/index/static/js/chunk-af920eb6.c7d1e7f3.js

1 line
14 KiB
JavaScript
Raw Normal View History

2024-11-01 16:07:54 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-af920eb6"],{"09d7":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"ba_f outmain"},[n("el-tabs",{on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[n("el-tab-pane",{attrs:{label:"评价管理",name:"evaluate"}}),n("el-tab-pane",{attrs:{label:"评价标签",name:"evaluatelabel"}})],1)],1),n("div",{staticClass:"outmain ba_f"},[t._m(0),n("div",[n("el-button",{attrs:{type:"primary",size:"medium"},on:{click:t.handleEdit}},[t._v("新增标签")]),n("el-button",{attrs:{size:"medium"},on:{click:t.handleDelete}},[t._v("批量删除")])],1),n("div",{staticClass:"tabledata mar_t20"},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.list,"element-loading-text":t.elementLoadingText,stripe:"","row-key":"id"},on:{"selection-change":t.setSelectRows}},[n("el-table-column",{attrs:{type:"selection",width:"55"}}),n("el-table-column",{attrs:{prop:"sort",label:"排序"}}),n("el-table-column",{attrs:{prop:"id",label:"ID"}}),n("el-table-column",{attrs:{prop:"name",label:"标签名称"}}),n("el-table-column",{attrs:{label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-switch",{attrs:{"active-value":"1","inactive-value":"2"},on:{change:function(n){return t.changeSwitch(e.row)}},model:{value:e.row.display,callback:function(n){t.$set(e.row,"display",n)},expression:"scope.row.display"}})]}}])}),n("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("div",{staticClass:"flex"},[n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.handleEdit(e.row)}}},[t._v("编辑")]),n("el-button",{attrs:{type:"text"},on:{click:function(n){return t.handleDelete(e.row)}}},[t._v("删除")])],1)]}}])})],1),n("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:t.page.total,"page-size":t.page.pagesize,"current-page":t.page.currentPage},on:{"update:currentPage":function(e){return t.$set(t.page,"currentPage",e)},"update:current-page":function(e){return t.$set(t.page,"currentPage",e)},"current-change":t.handleCurrentChange}}),n("edit",{ref:"edit",on:{fetchData:t.fetchData}})],1)])])},r=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"shuju_title mar_b20"},[n("div",{staticClass:"shuju_title_text"},[n("span",[t._v("评价标签")])])])}],o=(n("d81d"),n("96cf"),n("1da1")),c=n("5530"),u=n("e744"),i=n("5a4a"),s=n("2f62"),l={components:{Edit:u["a"]},created:function(){this.fetchData()},computed:Object(c["a"])({},Object(s["d"])(["storeId"])),data:function(){return{list:[],listLoading:!1,selectRows:"",elementLoadingText:"正在加载...",page:{total:0,size:10,currentPage:1},activeName:"evaluatelabel"}},methods:{handleClick:function(){"evaluate"==this.activeName?this.$router.push({path:"storeevaluate"}):"evaluatelabel"==this.activeName&&this.$router.push({path:"storeevaluatelabel"})},fetchData:function(){var t=this;return Object(o["a"])(regeneratorRuntime.mark((function e(){var n,a,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(i["K"])({page:t.page.currentPage,storeId:t.storeId});case 2:n=e.sent,a=n.data,r=n.count,t.list=a,t.page.total=r,t.listLoading=!1;case 8:case"end":return e.stop()}}),e)})))()},setSelectRows:function(t){this.selectRows=t},handleEdit:function(t){this.$refs["edit"].setStoreId(this.storeId),t.id?this.$refs["edit"].showEdit(t):this.$refs["edit"].showEdit()},handleDelete:function(t){var e=this;if(t.id)this.$baseConfirm("你确定要删除当前项吗",null,Object(o["a"])(regeneratorRuntime.mark((function n(){var a,r;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,Object(i["P"])({id:t.id,type:2,storeId:e.storeId});case 2:a=n.sent,r=a.msg,e.$baseMessage(r,"success"),e.fetchData();case 6:case"end":return n.