(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-325d545b"],{"68a5":function(e,t,l){"use strict";l.d(t,"d",(function(){return r})),l.d(t,"c",(function(){return i})),l.d(t,"a",(function(){return a})),l.d(t,"e",(function(){return o})),l.d(t,"b",(function(){return s}));var n=l("b775");function r(e){return Object(n["a"])({url:"/system/WorkerLevel/list",method:"get",params:e})}function i(e){return Object(n["a"])({url:"/system/WorkerLevel/"+e,method:"get"})}function a(e){return Object(n["a"])({url:"/system/WorkerLevel",method:"post",data:e})}function o(e){return Object(n["a"])({url:"/system/WorkerLevel",method:"put",data:e})}function s(e){return Object(n["a"])({url:"/system/WorkerLevel/"+e,method:"delete"})}},df02:function(e,t,l){"use strict";l.r(t);var n=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("el-dialog",{attrs:{title:"选择等级（"+e.userName+"）",visible:e.visible,width:"600px"},on:{"update:visible":function(t){e.visible=t},close:function(t){return e.$emit("update:visible",!1)}}},[l("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.levelList,"highlight-current-row":""},on:{"row-click":e.handleRowClick}},[l("el-table-column",{attrs:{prop:"id",label:"ID",width:"60"}}),l("el-table-column",{attrs:{label:"等级1111",align:"center",prop:"level"}}),l("el-table-column",{attrs:{label:"等级名称",align:"center",prop:"title"}}),l("el-table-column",{attrs:{label:"服务总额",align:"center",prop:"totalPrice"}}),l("el-table-column",{attrs:{label:"佣金比例",align:"center",prop:"cr"}}),l("el-table-column",{attrs:{label:"等级图标",align:"center",prop:"image",width:"100"},scopedSlots:e._u([{key:"default",fn:function(e){return[l("image-preview",{attrs:{src:e.row.image,width:50,height:50}})]}}])})],1),l("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[l("el-button",{on:{click:function(t){return e.$emit("update:visible",!1)}}},[e._v("关闭")])],1)],1)},r=[],i=l("5530"),a=(l("a9e3"),l("68a5")),o=l("6fd5"),s={name:"WorkerLevelSelectDialog",props:{visible:{type:Boolean,required:!0},userId:{type:[String,Number],required:!0},userName:{type:String,default:""}},data:function(){return{levelList:[],loading:!1}},watch:{visible:function(e){e&&this.fetchLevels()}},methods:{fetchLevels:function(){var e=this;this.loading=!0,Object(a["d"])().then((function(t){e.levelList=t.rows||[],e.loading=!1}))},handleRowClick:function(e){var t=this;Object(o["getUsers"])(this.userId).then((function(l){var n=Object(i["a"])(Object(i["a"])({},l.data),{},{level:e.level});Object(o["updateUsers"])(n).then((function(){t.$message.success("修改成功"),t.$emit("level-selected")}))}))}}},u=s,c=l("2877"),d=Object(c["a"])(u,n,r,!1,null,null,null);t["default"]=d.exports}}]);