1 line
14 KiB
JavaScript
1 line
14 KiB
JavaScript
(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.stop()}}),n)}))));else{if(!(this.selectRows.length>0))return this.$baseMessage("未选中任何行","error"),!1;var n=this.selectRows.map((function(t){return t.id}));this.$baseConfirm("你确定要删除选中项吗",null,Object(o["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["P"])({id:n,type:2,storeId:e.storeId});case 2:a=t.sent,r=a.msg,e.$baseMessage(r,"success"),e.fetchData();case 6:case"end":return t.stop()}}),t)}))))}},changeSwitch:function(t){var e=this;return 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,display:t.display,type:1,storeId:e.storeId});case 2:a=n.sent,r=a.msg,e.$baseMessage(r,"success"),e.fetchData();case 6:case"end":return n.stop()}}),n)})))()},handleCurrentChange:function(t){this.page.currentPage=t,this.fetchData()}}},d=l,f=n("2877"),h=Object(f["a"])(d,a,r,!1,null,null,null);e["default"]=h.exports},"5a4a":function(t,e,n){"use strict";n.d(e,"B",(function(){return r})),n.d(e,"d",(function(){return o})),n.d(e,"G",(function(){return c})),n.d(e,"z",(function(){return u})),n.d(e,"r",(function(){return i})),n.d(e,"y",(function(){return s})),n.d(e,"W",(function(){return l})),n.d(e,"A",(function(){return d})),n.d(e,"F",(function(){return f})),n.d(e,"D",(function(){return h})),n.d(e,"f",(function(){return m})),n.d(e,"e",(function(){return p})),n.d(e,"g",(function(){return b})),n.d(e,"i",(function(){return g})),n.d(e,"w",(function(){return v})),n.d(e,"ab",(function(){return j})),n.d(e,"o",(function(){return O})),n.d(e,"Z",(function(){return w})),n.d(e,"C",(function(){return y})),n.d(e,"H",(function(){return x})),n.d(e,"q",(function(){return k})),n.d(e,"c",(function(){return $})),n.d(e,"h",(function(){return _})),n.d(e,"b",(function(){return R})),n.d(e,"u",(function(){return C})),n.d(e,"N",(function(){return I})),n.d(e,"m",(function(){return D})),n.d(e,"L",(function(){return E})),n.d(e,"x",(function(){return P})),n.d(e,"db",(function(){return S})),n.d(e,"j",(function(){return z})),n.d(e,"cb",(function(){return N})),n.d(e,"t",(function(){return F})),n.d(e,"J",(function(){return L})),n.d(e,"l",(function(){return M})),n.d(e,"I",(function(){return V})),n.d(e,"v",(function(){return J})),n.d(e,"S",(function(){return T})),n.d(e,"n",(function(){return q})),n.d(e,"R",(function(){return K})),n.d(e,"bb",(function(){return U})),n.d(e,"E",(function(){return A})),n.d(e,"s",(function(){return B})),n.d(e,"X",(function(){return G})),n.d(e,"T",(function(){return H})),n.d(e,"Y",(function(){return Q})),n.d(e,"V",(function(){return W})),n.d(e,"Q",(function(){return X})),n.d(e,"k",(function(){return Y})),n.d(e,"M",(function(){return Z})),n.d(e,"a",(function(){return tt})),n.d(e,"K",(function(){return et})),n.d(e,"U",(function(){return nt})),n.d(e,"P",(function(){return at})),n.d(e,"p",(function(){return rt})),n.d(e,"O",(function(){return ot}));var a=n("b775");function r(t){return Object(a["a"])({url:"channel/good/good-render",method:"get",params:t})}function o(t){return Object(a["a"])({url:"channel/good/attr-show",method:"get",params:t})}function c(t){return Object(a["a"])({url:"channel/good/goods-save",method:"post",data:t})}function u(t){return Object(a["a"])({url:"channel/good/good-detail",method:"get",params:t})}function i(t){return Object(a["a"])({url:"channel/good/get-good-list",method:"get",params:t})}function s(t){return Object(a["a"])({url:"channel/good/good-del",method:"post",data:t})}function l(t){return Object(a["a"])({url:"channel/good/set-good-num",method:"post",data:t})}function d(t){return Object(a["a"])({url:"channel/good/good-down",method:"post",data:t})}function f(t){return Object(a["a"])({url:"channel/good/goods-recovery",method:"post",data:t})}function h(t){return Object(a["a"])({url:"channel/good/good-usave",method:"post",data:t})}function m(t){return Object(a["a"])({url:"channel/category/get-category-list",method:"get",params:t})}function p(t){return Object(a["a"])({url:"channel/category/category-del",method:"post",data:t})}function b(t){return Object(a["a"])({url:"channel/category/category-save",method:"post",data:t})}function g(t){return Object(a["a"])({url:"channel/category/change-switch",method:"post",data:t})}function v(t){return Object(a["a"])({url:"channel/specs/get-specs-list",method:"get",params:t})}function j(t){return Object(a["a"])({url:"channel/specs/specs-save",method:"post",data:t})}function O(t){return Object(a["a"])({url:"channel/specs/change-specs",method:"post",data:t})}function w(t){return Object(a["a"])({url:"channel/specs/specs-del",method:"post",data:t})}function y(t){return Object(a["a"])({url:"channel/good/specs-list",method:"post",data:t})}function x(t){return Object(a["a"])({url:"channel/good/specs-save",method:"post",data:t})}function k(t){return Object(a["a"])({url:"channel/attribute/get-attr-list",method:"get",params:t})}function $(t){return Object(a["a"])({url:"channel/attribute/attr-save",method:"post",data:t})}function _(t){return Object(a["a"])({url:"channel/attribute/change-attr",method:"post",data:t})}function R(t){return Object(a["a"])({url:"channel/attribute/attr-del",method:"post",data:t})}function C(t){return Object(a["a"])({url:"channel/material/get-materia-list",method:"get",params:t})}function I(t){return Object(a["a"])({url:"channel/material/meteria-save",method:"post",data:t})}function D(t){return Object(a["a"])({url:"channel/material/change-materia",method:"post",data:t})}function E(t){return Object(a["a"])({url:"channel/material/materia-del",method:"post",data:t})}function P(t){return Object(a["a"])({url:"channel/unit/get-unit-list",method:"get",params:t})}function S(t){return Object(a["a"])({url:"channel/unit/unit-save",method:"post",data:t})}function z(t){return Object(a["a"])({url:"channel/unit/change-display",method:"post",data:t})}function N(t){return Object(a["a"])({url:"channel/unit/unit-del",method:"post",data:t})}function F(t){return Object(a["a"])({url:"channel/good-label/get-label-list",method:"get",params:t})}function L(t){return Object(a["a"])({url:"channel/good-label/label-save",method:"post",data:t})}function M(t){return Object(a["a"])({url:"channel/good-label/change-label",method:"post",data:t})}function V(t){return Object(a["a"])({url:"channel/good-label/label-del",method:"post",data:t})}function J(t){return Object(a["a"])({url:"channel/print/get-print-list",method:"get",params:t})}function T(t){return Object(a["a"])({url:"channel/print/print-save",method:"post",data:t})}function q(t){return Object(a["a"])({url:"channel/print/change-print",method:"post",data:t})}function K(t){return Object(a["a"])({url:"channel/print/print-del",method:"post",data:t})}function U(t){return Object(a["a"])({url:"channel/good/synchro-goods",method:"post",data:t})}function A(t){return Object(a["a"])({url:"channel/activity/goods-activity-list",method:"get",params:t})}function B(t){return Object(a["a"])({url:"channel/activity/save-goods-activity",method:"get",params:t})}function G(t){return Object(a["a"])({url:"channel/activity/save-goods-activity",method:"post",data:t})}function H(t){return Object(a["a"])({url:"channel/activity/modify-goods-activity",method:"post",data:t})}function Q(t){return Object(a["a"])({url:"channel/category/special-category",method:"get",params:t})}function W(t){return Object(a["a"])({url:"channel/category/save-special",method:"post",data:t})}function X(t){return Object(a["a"])({url:"channel/category/modify-special",method:"post",data:t})}function Y(t){return Object(a["a"])({url:"channel/good/change-goods",method:"post",data:t})}function Z(t){return Object(a["a"])({url:"channel/good/merge-goods",method:"post",data:t})}function tt(t){return Object(a["a"])({url:"channel/good/all-down",method:"post",data:t})}function et(t){return Object(a["a"])({url:"channel/comment/label-list",method:"get",params:t})}function nt(t){return Object(a["a"])({url:"channel/comment/save-label",method:"post",data:t})}function at(t){return Object(a["a"])({url:"channel/comment/modify-label",method:"post",data:t})}function rt(t){return Object(a["a"])({url:"channel/comment/comment-list",method:"get",params:t})}function ot(t){return Object(a["a"])({url:"channel/comment/modify-comment",method:"post",data:t})}},e744:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{},[n("el-dialog",{attrs:{title:t.title,visible:t.dialogFormVisible,width:"600px","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogFormVisible=e},close:t.close}},[n("el-form",{ref:"form",attrs:{model:t.form,"label-width":"120px"}},[n("el-form-item",{attrs:{label:"排序",prop:"sort"}},[n("el-input",{attrs:{autocomplete:"off",placeholder:"请输入排序"},model:{value:t.form.sort,callback:function(e){t.$set(t.form,"sort","string"===typeof e?e.trim():e)},expression:"form.sort"}})],1),n("el-form-item",{attrs:{label:"标签名称",prop:"name",required:!0}},[n("el-input",{attrs:{autocomplete:"off",placeholder:"请输入标签名称"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name","string"===typeof e?e.trim():e)},expression:"form.name"}})],1)],1),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{size:"medium"},on:{click:t.close}},[t._v("取 消")]),n("el-button",{attrs:{size:"medium",type:"primary"},on:{click:t.save}},[t._v("确 定")])],1)],1)],1)},r=[],o=(n("96cf"),n("1da1")),c=n("5a4a"),u={name:"goodlistedit",created:function(){},data:function(){return{form:{id:"",sort:"1",name:"",storeId:""},title:"",dialogFormVisible:!1}},components:{},methods:{showEdit:function(t){t?(this.title="编辑",this.form=Object.assign({},t)):this.title="添加",this.dialogFormVisible=!0},close:function(){this.$refs["form"].resetFields(),this.form=this.$options.data().form,this.dialogFormVisible=!1},setStoreId:function(t){this.form.storeId=t},save:function(){var t=this;this.$refs["form"].validate(function(){var e=Object(o["a"])(regeneratorRuntime.mark((function e(n){var a,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!n){e.next=10;break}return e.next=3,Object(c["U"])(t.form);case 3:a=e.sent,r=a.msg,t.$baseMessage(r,"success"),t.$emit("fetchData"),t.close(),e.next=11;break;case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}}},i=u,s=n("2877"),l=Object(s["a"])(i,a,r,!1,null,null,null);e["a"]=l.exports}}]); |