Files
PropertyDeployment/resources/Web/MicroCommunityMallWeb/html/js/chunk-280b9de0.963684de.js
Anfioo adfd019d2d 江门
1
2026-02-01 15:37:55 +08:00

2 lines
7.1 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-280b9de0"],{"7e7a":function(e,t,l){"use strict";l("8a2a")},"8a2a":function(e,t,l){},"911b":function(e,t,l){"use strict";l.d(t,"b",(function(){return r})),l.d(t,"a",(function(){return a})),l.d(t,"c",(function(){return o}));var s=l("b775");function r(e){return new Promise((t,l)=>{Object(s["a"])({url:"/user.queryMallUser",method:"get",params:e}).then(e=>{const l=e.data;t(l)}).catch(e=>{l(e)})})}function a(e){return new Promise((t,l)=>{Object(s["a"])({url:"/user.deleteMallUser",method:"post",data:e}).then(e=>{const l=e.data;t(l)}).catch(e=>{l(e)})})}function o(e){return new Promise((t,l)=>{Object(s["a"])({url:"/user.resetMallUserPwd",method:"post",data:e}).then(e=>{const l=e.data;t(l)}).catch(e=>{l(e)})})}},fa8c5:function(e,t,l){"use strict";l.r(t);var s=function(){var e=this,t=e._self._c;return t("div",[t("el-card",{staticClass:"margin-top-sm"},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("div",[e._v(e._s(e.$t("mallUser.queryCondition")))])]),t("div",{},[t("el-form",{staticClass:"flex justify-start",attrs:{inline:!0,model:e.mallUserInfo.conditions}},[t("el-form-item",[t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("mallUser.namePlaceholder"),clearable:""},model:{value:e.mallUserInfo.conditions.nameLike,callback:function(t){e.$set(e.mallUserInfo.conditions,"nameLike",t)},expression:"mallUserInfo.conditions.nameLike"}})],1)],1),t("el-form-item",[t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("mallUser.telPlaceholder"),clearable:""},model:{value:e.mallUserInfo.conditions.tel,callback:function(t){e.$set(e.mallUserInfo.conditions,"tel",t)},expression:"mallUserInfo.conditions.tel"}})],1)],1),t("el-form-item",[t("el-button",{attrs:{type:"primary",size:"small"},on:{click:e._queryMallUserMethod}},[e._v(" "+e._s(e.$t("mallUser.query"))+" ")])],1)],1)],1)]),t("el-card",{staticClass:"margin-top-sm"},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("div",[e._v(e._s(e.$t("mallUser.title")))])]),t("div",{},[t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.mallUserInfo.mallUsers,border:""}},[t("el-table-column",{attrs:{prop:"userId",label:e.$t("mallUser.userId"),align:"center"}}),t("el-table-column",{attrs:{prop:"name",label:e.$t("mallUser.name"),align:"center"}}),t("el-table-column",{attrs:{prop:"email",label:e.$t("mallUser.email"),align:"center"},scopedSlots:e._u([{key:"default",fn:function({row:t}){return[e._v(" "+e._s(t.email||"-")+" ")]}}])}),t("el-table-column",{attrs:{prop:"address",label:e.$t("mallUser.address"),align:"center"},scopedSlots:e._u([{key:"default",fn:function({row:t}){return[e._v(" "+e._s(t.address||"-")+" ")]}}])}),t("el-table-column",{attrs:{prop:"tel",label:e.$t("mallUser.tel"),align:"center"}}),t("el-table-column",{attrs:{prop:"createTime",label:e.$t("mallUser.createTime"),align:"center"}}),t("el-table-column",{attrs:{label:e.$t("common.operation"),align:"center",width:"220"},scopedSlots:e._u([{key:"default",fn:function({row:l}){return[t("el-button-group",[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._openDeleteMallUserModel(l)}}},[e._v(" "+e._s(e.$t("common.delete"))+" ")]),t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._openResetMallUserPwdModel(l)}}},[e._v(" "+e._s(e.$t("common.resetPwd"))+" ")]),t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._toUserDetail(l)}}},[e._v(" "+e._s(e.$t("common.detail"))+" ")])],1)]}}])})],1),t("el-pagination",{attrs:{"current-page":e.mallUserInfo.conditions.page,"page-size":e.mallUserInfo.conditions.row,layout:"total, prev, pager, next",total:e.mallUserInfo.total},on:{"current-change":e.handleCurrentChange}})],1)]),t("delete-mall-user",{ref:"deleteMallUser",on:{refresh:e.queryMallUser}}),t("reset-mall-user-pwd",{ref:"resetMallUserPwd"})],1)},r=[],a=l("911b"),o=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("common.confirm"),visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.closeDialog}},[t("div",{staticStyle:{"text-align":"center"}},[e._v(" "+e._s(e.$t("common.confirmDelete"))+" ")]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.closeDialog}},[e._v(e._s(e.$t("common.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.deleteMallUser}},[e._v(e._s(e.$t("common.confirm")))])],1)])},n=[],i={name:"DeleteMallUser",data(){return{dialogVisible:!1,currentUser:null}},methods:{open(e){this.currentUser=e,this.dialogVisible=!0},closeDialog(){this.dialogVisible=!1},async deleteMallUser(){try{const e=await Object(a["a"])(this.currentUser);0===e.code?(this.$message.success(this.$t("deleteMallUser.success")),this.$emit("refresh"),this.closeDialog()):this.$message.error(e.msg)}catch(e){console.error("删除用户失败:",e),this.$message.error(this.$t("deleteMallUser.error"))}}}},c=i,d=l("2877"),m=Object(d["a"])(c,o,n,!1,null,null,null),u=m.exports,f=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("resetMallUserPwd.confirmTitle"),visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.closeDialog}},[t("div",{staticStyle:{"text-align":"center"}},[e._v(" "+e._s(e.$t("resetMallUserPwd.confirmContent"))+" ")]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.closeDialog}},[e._v(e._s(e.$t("common.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.resetMallUserPwd}},[e._v(e._s(e.$t("common.confirm")))])],1)])},U=[],h={name:"ResetMallUserPwd",data(){return{dialogVisible:!1,currentUser:null}},methods:{open(e){this.currentUser=e,this.dialogVisible=!0},closeDialog(){this.dialogVisible=!1},async resetMallUserPwd(){try{const e=await Object(a["c"])({userId:this.currentUser.userId});0===e.code?(this.$message.success(this.$t("resetMallUserPwd.success",{pwd:e.pwd}),1e4),this.closeDialog()):this.$message.error(e.msg)}catch(e){console.error("重置密码失败:",e),this.$message.error(this.$t("resetMallUserPwd.error"))}}}},p=h,b=Object(d["a"])(p,f,U,!1,null,null,null),g=b.exports,_={name:"MallUser",components:{DeleteMallUser:u,ResetMallUserPwd:g},data(){return{mallUserInfo:{mallUsers:[],total:0,records:1,conditions:{nameLike:"",tel:"",page:1,row:20}}}},created(){this.queryMallUser()},methods:{queryMallUser(){this._listMallUser(1,10)},async _listMallUser(e=1,t=20){this.mallUserInfo.conditions.page=e,this.mallUserInfo.conditions.row=t;try{const e=await Object(a["b"])(this.mallUserInfo.conditions);this.mallUserInfo.mallUsers=e.data,this.mallUserInfo.total=e.total,this.mallUserInfo.records=e.records}catch(l){console.error("获取用户列表失败:",l)}},_openDeleteMallUserModel(e){this.$refs.deleteMallUser.open(e)},_openResetMallUserPwdModel(e){this.$refs.resetMallUserPwd.open(e)},_queryMallUserMethod(){this._listMallUser()},_toUserDetail(e){window.open("/#/pages/user/mallUserDetail?userId="+e.userId)},handleCurrentChange(e){this._listMallUser(e,this.mallUserInfo.conditions.row)}}},w=_,M=(l("7e7a"),Object(d["a"])(w,s,r,!1,null,"fcc965b4",null));t["default"]=M.exports}}]);
//# sourceMappingURL=chunk-280b9de0.963684de.js.map