yifengyide/public/dist/assets/user_index-10885671.js

2 lines
7.1 KiB
JavaScript
Raw Normal View History

import{s as l,n as c}from"./index-2b234fd0.js";import{l as n}from"./lodash-3692acb0.js";import{C as m}from"./cloud-download-9e3d3399.js";const h={components:{CloudDownloadIcon:m},data(){return{association:{},list:[],tabIndex:1,selectedRowKeys:[],columns:[{colKey:"row-select",type:"multiple",width:50},{colKey:"member_id",title:"会员ID"},{colKey:"photo_image",title:"形象照"},{colKey:"nikename",title:"会员姓名"},{colKey:"position_name",title:"职位"},{colKey:"region_name",title:"区域"},{colKey:"phone",title:"手机号"},{colKey:"nation",title:"民族"},{colKey:"if_xianshi",title:"状态"},{colKey:"select",title:"操作",width:200}],total:0,page:1,size:10,formData:{position_id:"",region_id:"",nikename:"",phone:"",number_of_sessions:0},positionList:[],region_list:[]}},mounted(){typeof this.$store.state.user.association=="object"?this.association=this.$store.state.user.association:this.association=JSON.parse(this.$store.state.user.association);const t=sessionStorage.getItem("sUserPage");t&&(this.page=n.toInteger(t));var s=this.$route.name.slice(-1);this.tabIndex=n.toInteger(s),this.getList(),this.getPositionList(),this.getRegion()},methods:{rehandleSelectChange(t,{selectedRowData:s}){this.selectedRowKeys=t,console.log(t,s)},dow(){var t="";this.selectedRowKeys.length>0&&(t=JSON.stringify(this.selectedRowKeys));var s=l.state.user.token;window.location.href="https://hnyea.0rui.cn/api/excel_controller/memberexport?token="+s+"&ids="+t+"&if_xianshi="+this.tabIndex},hidden(t){console.log(t),this.$request.post("/member/examinelist",{member_id:t.member_id,if_xianshi:0}).then(s=>{console.log(s),this.page=1,this.total=0,this.list=[],this.getList()}).catch(s=>{console.log(s)})},getRegion(){this.$request.post("/region").then(t=>{console.log(t),t.code==1&&(this.region_list=t.data)}).catch(t=>{console.log(t)})},getPositionList(){this.$request.post("/position").then(t=>{console.log(t),this.positionList=t.data}).catch(t=>{console.log(t)})},tabIndexChange(t){console.log(t),sessionStorage.setItem("sUserPage",1),sessionStorage.setItem("sUserTab",t),this.page=1,this.total=0,this.list=[],this.getList()},del(t){this.$request.post("/member/del",{member_id:t.member_id}).then(s=>{console.log(s),s.code==1?this.$message.success(s.msg):this.$message.error(s.msg),this.getList()}).catch(s=>{console.log(s)})},onCurrentChange(t){this.page=t,sessionStorage.setItem("sUserPage",t),sessionStorage.setItem("sUserTab",this.tabIndex),this.getList()},openUrl(t){this.$router.push("/user/user_info?id="+t)},getList(){this.formData.page=this.page,this.formData.size=this.size,this.formData.if_xianshi=this.tabIndex,this.$request.post("/member",this.formData).then(t=>{console.log(t),this.list=t.data.ret,this.total=t.data.count}).catch(t=>{console.log(t)})},onSubmit(){this.page=1,this.list=[],sessionStorage.setItem("sUserPage",1),this.getList()}}};var u=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("t-card",{attrs:{title:"会员列表",bordered:!1}},[e("div",{staticClass:"form-step-container"},[e("t-form",{ref:"form",style:{marginBottom:"30px"},attrs:{data:t.formData,"label-width":80},on:{submit:t.onSubmit}},[e("t-row",[e("t-form-item",{attrs:{label:"会员姓名",name:"nikename"}},[e("t-input",{staticClass:"form-item-content",staticStyle:{width:"150px"},attrs:{type:"search",placeholder:"请输入会员姓名"},model:{value:t.formData.nikename,callback:function(i){t.$set(t.formData,"nikename",i)},expression:"formData.nikename"}})],1),e("t-form-item",{attrs:{label:"手机号",name:"phone"}},[e("t-input",{staticClass:"form-item-content",staticStyle:{width:"150px"},attrs:{placeholder:"请输入手机号"},model:{value:t.formData.phone,callback:function(i){t.$set(t.formData,"phone",i)},expression:"formData.phone"}})],1),e("t-form-item",{attrs:{label:"职务",name:"phone"}},[e("t-select",{staticStyle:{width:"150px"},model:{value:t.formData.position_id,callback:function(i){t.$set(t.formData,"position_id",i)},expression:"formData.position_id"}},[e("t-option",{attrs:{label:"全部",value:""}}),t._l(t.positionList,function(i,o){return e("t-option",{att