chunk-283057e8.24cbbfc9.js 22 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-283057e8","chunk-26c83723"],{"01c8":function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var i=a("178b"),s=a("3953"),l=a("e630"),r=a("1df6");function o(t){return Object(i["a"])(t)||Object(s["a"])(t)||Object(l["a"])(t)||Object(r["a"])()}},"5e4b":function(t,e,a){},7998:function(t,e,a){"use strict";a.d(e,"i",(function(){return s})),a.d(e,"h",(function(){return l})),a.d(e,"g",(function(){return r})),a.d(e,"b",(function(){return o})),a.d(e,"f",(function(){return n})),a.d(e,"d",(function(){return c})),a.d(e,"c",(function(){return u})),a.d(e,"a",(function(){return d})),a.d(e,"e",(function(){return m}));var i=a("0c6d");function s(t){return i["a"].get("manager/user/lst",t)}function l(t){return i["a"].get("product_list",t)}function r(t){return i["a"].get("community/lst",t)}function o(t){return i["a"].post("community/create",t)}function n(t,e){return i["a"].post("community/update/".concat(t),e)}function c(t){return i["a"].get("community/detail/".concat(t))}function u(t){return i["a"].delete("community/delete/".concat(t))}function d(){return i["a"].get("community/cate/lst")}function m(t,e){return i["a"].get("community/reply/".concat(t),e)}},"804b":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.ruleForm,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"发布作者:",required:""}},[a("div",{staticClass:"upLoadPicBox",attrs:{title:"750*750px"},on:{click:t.openUser}},[t.userImg?a("div",{staticClass:"pictrue"},[a("img",{attrs:{src:t.userImg}})]):a("div",{staticClass:"upLoad"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])]),t._v(" "),a("div",{staticClass:"tips"},[t._v("只能选择本店铺客服人员。")])]),t._v(" "),a("el-form-item",{attrs:{label:"内容类型:",required:""}},[a("el-radio-group",{on:{change:t.typeChange},model:{value:t.ruleForm.is_type,callback:function(e){t.$set(t.ruleForm,"is_type",e)},expression:"ruleForm.is_type"}},[t._v('\n ">\n '),a("el-radio",{attrs:{label:1}},[t._v("图文")]),t._v(" "),a("el-radio",{attrs:{label:2}},[t._v("视频")])],1)],1),t._v(" "),1==t.ruleForm.is_type?a("el-form-item",{attrs:{label:"内容图片:",required:""}},[a("div",{staticClass:"acea-row"},[t._l(t.ruleForm.image,(function(e,i){return a("div",{key:i,staticClass:"pictrue",attrs:{draggable:"false"}},[a("img",{attrs:{src:e}}),t._v(" "),a("i",{staticClass:"el-icon-error btndel",on:{click:function(e){return t.handleRemove(i)}}})])})),t._v(" "),t.ruleForm.image.length<10?a("div",{staticClass:"uploadCont",attrs:{title:"750*750px"}},[a("div",{staticClass:"upLoadPicBox",on:{click:function(e){return t.modalPicTap("2")}}},[a("div",{staticClass:"upLoad"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])])]):t._e()],2),t._v(" "),a("div",{staticClass:"tips"},[t._v("请上传小于500KB的图片,最多可以上传9张图片")])]):t._e(),t._v(" "),2==t.ruleForm.is_type?[a("el-form-item",{attrs:{label:"视频内容:",required:""}},[a("input",{ref:"refid",staticStyle:{display:"none"},attrs:{type:"file"},on:{change:t.zh_uploadFile_change}}),t._v(" "),a("el-button",{staticClass:"uploadVideo",attrs:{type:"primary",icon:"ios-cloud-upload-outline",size:"small"},on:{click:t.zh_uploadFile}},[t._v("\n 上传视频\n ")]),t._v(" "),a("el-col",{attrs:{span:12}},[t.videoIng?a("el-progress",{staticStyle:{"margin-top":"10px"},attrs:{percentage:t.progress,"text-inside":!0,"stroke-width":20}}):t._e()],1),t._v(" "),a("el-col",{attrs:{span:24}},[t.ruleForm.video_link?a("div",{staticClass:"iview-video-style"},[a("video",{staticStyle:{width:"100%",height:"100%!important","border-radius":"10px"},attrs:{src:t.ruleForm.video_link,controls:"controls"}},[t._v("\n 您的浏览器不支持 video 标签。\n ")]),t._v(" "),a("div",{staticClass:"mark"}),t._v(" "),a("i",{staticClass:"el-icon-delete iconv",on:{click:t.delVideo}})]):t._e()])],1),t._v(" "),a("el-form-item",{attrs:{label:"视频封面图:",required:""}},[a("div",{staticClass:"upLoadPicBox",attrs:{title:"750*750px"},on:{click:function(e){return t.modalPicTap("1")}}},[t.ruleForm.image[0]?a("div",{staticClass:"pictrue"},[a("img",{attrs:{src:t.ruleForm.image[0]}})]):a("div",{staticClass:"upLoad"},[a("i",{staticClass:"el-icon-camera cameraIconfont"})])]),t._v(" "),a("div",{staticClass:"tips"},[t._v("请上传小于500KB的图片")])])]:t._e(),t._v(" "),a("el-form-item",{attrs:{label:"内容描述:"}},[a("el-input",{staticStyle:{width:"500px"},attrs:{type:"textarea",rows:8,placeholder:"请输入内容描述"},model:{value:t.ruleForm.content,callback:function(e){t.$set(t.ruleForm,"content",e)},expression:"ruleForm.content"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"参与话题:"}},[a("el-select",{staticStyle:{width:"500px"},attrs:{placeholder:"请选择",size:"small"},model:{value:t.ruleForm.topic_id,callback:function(e){t.$set(t.ruleForm,"topic_id",e)},expression:"ruleForm.topic_id"}},t._l(t.cateList,(function(t){return a("el-option",{key:t.topic_id,attrs:{label:t.topic_name,value:t.topic_id}})})),1),t._v(" "),a("el-col",{attrs:{span:24}},[a("el-button",{staticClass:"mt20 mb20",attrs:{type:"primary",size:"small"},on:{click:t.addGoods}},[t._v("添加商品")])],1),t._v(" "),a("el-table",{ref:"mainTable",attrs:{data:t.tableData,size:"small","max-height":"400"}},[a("el-table-column",{attrs:{label:"ID",prop:"product_id",width:"55"}}),t._v(" "),a("el-table-column",{attrs:{label:"商品图","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("div",{staticClass:"demo-image__preview"},[a("el-image",{staticStyle:{width:"36px",height:"36px"},attrs:{src:t.row.image,"preview-src-list":[t.row.image]}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"商品信息","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"row_title line2"},[t._v(t._s(e.row.store_name))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"ot_price",label:"售价(元)","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{label:"商品状态","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(0==e.row.is_show?"下架":"上架"))])]}}])})],1)],1)],2)],1),t._v(" "),a("div",{staticClass:"footer"},[a("el-button",{staticClass:"submission",attrs:{type:"primary",size:"small"},on:{click:t.handleSubmit}},[t._v("提交\n ")])],1),t._v(" "),a("selectUserDialog",{ref:"selectUserDialog",on:{getUserData:t.getUserData}}),t._v(" "),a("goodsListDialog",{ref:"goodsListDialog",on:{onSelectList:t.selectList}})],1)},s=[],l=(a("7f7f"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-dialog",{attrs:{title:"选择发布作者",visible:t.dialogVisible,width:"600px","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("userList",{attrs:{api:"getUserlistApi"},on:{submit:t.submit}})],1)],1)}),r=[],o=a("bff0"),n={name:"",components:{userList:o["default"]},props:{},data:function(){return{dialogVisible:!1}},mounted:function(){},methods:{handleClose:function(){this.dialogVisible=!1},submit:function(t){this.$emit("getUserData",t),this.handleClose()},openBox:function(){this.dialogVisible=!0}}},c=n,u=a("2877"),d=Object(u["a"])(c,l,r,!1,null,"5c4bca24",null),m=d.exports,h=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.dialogVisible?a("el-dialog",{attrs:{title:"商品信息",visible:t.dialogVisible,width:"1100px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{staticClass:"divBox"},[a("div",{staticClass:"header clearfix"},[a("div",{staticClass:"container mt14"},[a("el-form",{attrs:{size:"small",inline:"","label-width":"80px"}},[a("el-form-item",{attrs:{label:"商品搜索:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入商品关键字",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(1)}},model:{value:t.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}},[a("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(e){return t.getList(1)}},slot:"append"})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"平台分类:"}},[a("el-cascader",{staticClass:"selWidth",attrs:{size:"small",options:t.sysCateList,props:t.props,filterable:"",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.cate_id,callback:function(e){t.$set(t.tableFrom,"cate_id",e)},expression:"tableFrom.cate_id"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"商户分类:"}},[a("el-select",{staticClass:"selWidth",attrs:{filterable:"",clearable:"","default-first-option":"",placeholder:"请选择商户商品分类"},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.mer_cate_id,callback:function(e){t.$set(t.tableFrom,"mer_cate_id",e)},expression:"tableFrom.mer_cate_id"}},t._l(t.merCateList,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"商品标签:"}},[a("el-select",{staticClass:"filter-item selWidth",attrs:{placeholder:"请选择",clearable:"",filterable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.mer_labels,callback:function(e){t.$set(t.tableFrom,"mer_labels",e)},expression:"tableFrom.mer_labels"}},t._l(t.merProductLabelList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"商品状态:",prop:"us_status"}},[a("el-select",{staticClass:"filter-item selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.is_show,callback:function(e){t.$set(t.tableFrom,"is_show",e)},expression:"tableFrom.is_show"}},t._l(t.productStatusList,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1)],1)],1)]),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"mainTable",attrs:{data:t.tableData.data,size:"small","max-height":"400"}},[a("el-table-column",{attrs:{width:"55"},scopedSlots:t._u([{key:"header",fn:function(e){return[a("el-checkbox",{attrs:{slot:"reference",value:t.isChecked&&t.checkedPage.indexOf(t.tableFrom.page)>-1},on:{change:t.changeType},slot:"reference"})]}},{key:"default",fn:function(e){return[a("el-checkbox",{attrs:{value:t.checkedIds.indexOf(e.row.product_id)>-1},on:{change:function(a){return t.changeOne(a,e.row)}}})]}}],null,!1,2825649629)}),t._v(" "),a("el-table-column",{attrs:{label:"ID",prop:"product_id",width:"55"}}),t._v(" "),a("el-table-column",{attrs:{label:"商品图","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("div",{staticClass:"demo-image__preview"},[a("el-image",{staticStyle:{width:"36px",height:"36px"},attrs:{src:t.row.image,"preview-src-list":[t.row.image]}})],1)]}}],null,!1,2331550732)}),t._v(" "),a("el-table-column",{attrs:{label:"商品名称","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"row_title line2"},[t._v(t._s(e.row.store_name))])]}}],null,!1,2346630169)}),t._v(" "),a("el-table-column",{attrs:{label:"商品分类","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.storeCategory?e.row.storeCategory.cate_name:"-"))])]}}],null,!1,3474004043)}),t._v(" "),a("el-table-column",{attrs:{prop:"stock",label:"库存","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{label:"商品状态","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(0==e.row.is_show?"下架":"上架"))])]}}],null,!1,1903795700)})],1),t._v(" "),a("div",{staticClass:"acea-row row-between row-bottom"},[a("el-pagination",{attrs:{"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}}),t._v(" "),a("div",[a("el-button",{attrs:{size:"small"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("取消")]),t._v(" "),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.submitProduct}},[t._v("确定")])],1)],1)],1)]):t._e()},p=[],f=(a("ac6a"),a("6b54"),a("01c8")),g=a("db72"),b=a("bd86"),v=a("7998"),_=a("2f62"),k=a("83d6"),y={name:"GoodsList",props:{pid:{type:Array,default:function(){return[]}},proData:{type:Array,default:function(){return[]}}},data:function(){return Object(b["a"])(Object(b["a"])(Object(b["a"])(Object(b["a"])(Object(b["a"])(Object(b["a"])(Object(b["a"])(Object(b["a"])({dialogVisible:!1,roterPre:k["roterPre"],listLoading:!0,productStatusList:[{label:"上架",value:1},{label:"下架",value:0}],props:{emitPath:!1},tableData:{data:[],total:0},cate_ids:"",tableFrom:{page:1,limit:5,cate_ids:"",keyword:"",category_id:"",us_status:"",sys_labels:[],type_id:"",active_id:this.$route.params.id},mer_ids:[]},"props",{emitPath:!1}),"multipleSelection",[]),"checked",[]),"selectAllPage",!1),"checkedPage",[]),"checkBox",[]),"isChecked",!1),"checkedIds",[])},computed:Object(g["a"])({},Object(_["b"])(["merCateList","merProductLabelList","sysCateList"])),mounted:function(){this.merCateList.length||this.$store.dispatch("product/getMerCateSelect"),this.sysCateList.length||this.$store.dispatch("product/getSysCategoryList",{lv:1}),this.merProductLabelList.length||this.$store.dispatch("product/getProductLabel")},methods:{setCheckedProduct:function(t){if(t.length){var e=Object(f["a"])(t),a=e.slice(0);this.checkBox=a,this.checkedIds=a.map((function(t){return t.product_id}))}else this.checkedIds=[]},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,this.tableFrom.level_one_cate_ids=this.pid.length&&this.pid.toString()||"",Object(v["h"])(this.tableFrom).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.listLoading=!1})).catch((function(t){e.listLoading=!1,e.$message.error(t.message)}))},changeType:function(t){this.isChecked=t;var e=this.checkedPage.indexOf(this.tableFrom.page);this.isIndex=e,this.checkedPage.push(this.tableFrom.page),e>-1&&this.checkedPage.splice(e,1),this.syncCheckedId(t)},changeOne:function(t,e){if(t){var a=this.checkedIds.indexOf(e.product_id);-1===a&&(this.checkedIds.push(e.product_id),this.checkBox.push(e))}else{var i=this.checkedIds.indexOf(e.product_id);i>-1&&(this.checkedIds.splice(i,1),this.checkBox.splice(i,1))}},syncCheckedId:function(t){var e=this;this.tableData.data.map((function(t){return t.product_id}));t?this.tableData.data.forEach((function(t){var a=e.checkedIds.indexOf(t.product_id);-1===a&&(e.checkedIds.push(t.product_id),e.checkBox.push(t))})):this.tableData.data.forEach((function(t){var a=e.checkedIds.indexOf(t.product_id);a>-1&&(e.checkedIds.splice(a,1),e.checkBox.splice(a,1))}))},handleSelectionChange:function(t){var e=[];t.map((function(t){e.push({src:t.image,product_id:t.product_id})})),this.multipleSelection=e},submitProduct:function(){if(this.checkBox.length>100)return this.$message.warning("最多可选择100个商品");this.dialogVisible=!1,this.$emit("onSelectList",this.checkBox)},pageChange:function(t){this.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList("")}}},C=y,w=(a("bbf1"),Object(u["a"])(C,h,p,!1,null,"5734e7c9",null)),F=w.exports,x=a("c4c8"),L={name:"",components:{selectUserDialog:m,goodsListDialog:F},props:{},data:function(){return{id:"",ruleForm:{image:[],topic_id:"",is_type:1,content:"",video_link:"",spu_id:[],uid:""},roterPre:k["roterPre"],images:[],tableData:[],isShowCheck:!1,userImg:"",videoLink:"",videoIng:!1,cateList:[],progress:10,props:{value:"category_id",label:"cate_name",children:"children",multiple:!0}}},created:function(){this.$store.dispatch("settings/setEdit",!0),this.$route.query.id&&(this.id=this.$route.query.id,this.getInfo(this.id))},mounted:function(){this.getCateList()},methods:{addGoods:function(){this.$refs.goodsListDialog.dialogVisible=!0,this.$refs.goodsListDialog.getList(""),this.$refs.goodsListDialog.setCheckedProduct(this.tableData)},getInfo:function(t){var e=this;Object(v["d"])(t).then((function(t){var a=t.data;for(var i in e.userImg=a.author.avatar,e.ruleForm)e.ruleForm[i]=a[i];a.product.length>0&&(e.tableData=a.product)}))},openUser:function(){this.$refs.selectUserDialog.openBox()},selectList:function(t){this.tableData=t},isCkecked:function(){var t=this.proData.filter((function(t){return t.checked}));t.length?this.isShowCheck=!1:this.isShowCheck=!0},getCateList:function(){var t=this;Object(v["a"])().then((function(e){t.cateList=e.data}))},typeChange:function(t){this.ruleForm.image=[]},getUserData:function(t){this.userImg=t.avatar,this.ruleForm.uid=t.uid},handleSubmit:function(){var t=this;return this.$store.dispatch("settings/setEdit",!1),this.tableData.length>0&&(this.ruleForm.spu_id=this.tableData.map((function(t){return t.product_id}))),this.ruleForm.uid&&this.ruleForm.uid?0==this.ruleForm.image.length?this.$message.error("请上传图片"):void(this.id?Object(v["f"])(this.id,this.ruleForm).then((function(e){t.$message.success(e.message),t.$router.push({path:t.roterPre+"/community/list"}),t.id=""})).catch((function(e){t.$message.error(e.message)})):Object(v["b"])(this.ruleForm).then((function(e){t.$message.success(e.message),t.$router.push({path:t.roterPre+"/community/list"})})).catch((function(e){t.$message.error(e.message)}))):this.$message.error("请选择作者")},zh_uploadFile:function(){this.videoLink?this.ruleForm.video_link=this.videoLink:this.$refs.refid.click()},handleRemove:function(t){this.ruleForm.image.splice(t,1)},delVideo:function(){this.$set(that.ruleForm,"video_link","")},modalPicTap:function(t,e,a){var i=this,s=[];this.$modalUpload((function(a){"1"!==t||e||i.ruleForm.image.push(a[0]),"2"!==t||e||a.map((function(t){s.push(t.attachment_src),i.ruleForm.image.push(t),i.ruleForm.image.length>9&&(i.ruleForm.image.length=9)}))}),t)},zh_uploadFile_change:function(t){var e=this;e.progress=10;var a=t.target.files[0].name.substr(t.target.files[0].name.lastIndexOf("."));if(".mp4"!==a)return e.$message.error("只能上传MP4文件");Object(x["ub"])().then((function(a){e.$videoCloud.videoUpload({type:a.data.type,evfile:t,res:a,uploading:function(t,a){e.videoIng=t}}).then((function(t){e.ruleForm.video_link=t.url||t.data.src,e.$message.success("视频上传成功"),e.progress=100,e.videoIng=!1})).catch((function(t){e.videoIng=!1,e.$message.error(t.msg&&t.msg.message||t.message)}))}))}}},$=L,D=(a("b9be0"),Object(u["a"])($,i,s,!1,null,"3c264990",null));e["default"]=D.exports},b9be0:function(t,e,a){"use strict";a("fba1")},bbf1:function(t,e,a){"use strict";a("5e4b")},bff0:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox",staticStyle:{background:"#ffffff"}},[a("el-form",{attrs:{inline:"",size:"small"},nativeOn:{submit:function(t){t.preventDefault()}}},[a("el-form-item",{attrs:{label:"关键字:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入用户昵称/用户ID"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(1)}},model:{value:t.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.getList(1)}}},[t._v("查询")])],1),t._v(" "),a("el-form-item",[a("span",{staticStyle:{"font-size":"12px",color:"#C0C4CC"}},[t._v("注:将用户添加为客服时,请确保用户先关注本店铺")])])],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{data:t.tableData.data,size:"small"}},[a("el-table-column",{attrs:{label:"","min-width":"65"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-radio",{attrs:{label:e.row.uid},nativeOn:{change:function(a){return t.getTemplateRow(e.$index,e.row)}},model:{value:t.templateRadio,callback:function(e){t.templateRadio=e},expression:"templateRadio"}},[t._v(" ")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"uid",label:"ID","min-width":"60"}}),t._v(" "),a("el-table-column",{attrs:{prop:"nickname",label:"微信用户名称","min-width":"130"}}),t._v(" "),a("el-table-column",{attrs:{label:"客服头像","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("div",{staticClass:"demo-image__preview"},[a("el-image",{staticClass:"tabImage",attrs:{src:e.row.avatar?e.row.avatar:t.moren,"preview-src-list":[e.row.avatar||t.moren]}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"用户类型","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t._f("statusFilter")(e.row.user_type)))])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)},s=[],l=a("8593"),r=a("7998"),o={name:"UserList",props:{api:{type:String,default:""}},filters:{saxFilter:function(t){var e={0:"未知",1:"男",2:"女"};return e[t]},statusFilter:function(t){var e={wechat:"微信用户",routine:"小程序用户",h5:"H5用户",app:"APP用户",pc:"PC用户"};return e[t]}},data:function(){return{moren:a("cdfe"),templateRadio:0,loading:!1,tableData:{data:[],total:0},tableFrom:{page:1,limit:20,keyword:""}}},mounted:function(){this.getList(1)},methods:{getTemplateRow:function(t,e){this.api?this.$emit("submit",e):(form_create_helper.set(this.$route.query.field,{src:e.avatar||this.moren,id:e.uid}),form_create_helper.close(this.$route.query.field))},getList:function(t){var e=this;this.loading=!0,this.tableFrom.page=t||this.tableFrom.page;var a=this.api?r["i"]:l["W"];a(this.tableFrom).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.loading=!1})).catch((function(t){e.$message.error(t.message),e.loading=!1}))},pageChange:function(t){this.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList("")}}},n=o,c=a("2877"),u=Object(c["a"])(n,i,s,!1,null,"504c26d3",null);e["default"]=u.exports},cdfe:function(t,e,a){t.exports=a.p+"mer/img/f.5aa43cd3.png"},fba1:function(t,e,a){}}]);