|
|
|
@ -99,12 +99,12 @@ |
|
|
|
|
|
|
|
|
|
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width"> |
|
|
|
|
<template slot-scope="scope" v-if="scope.row.userId !== 1"> |
|
|
|
|
<el-button size="mini" type="text" @click="handleUpdate(scope.row)" |
|
|
|
|
<el-button size="mini" type="text" @click="showDetail(scope.row.userId)" |
|
|
|
|
v-hasPermi="['system:user:edit']">详情</el-button> |
|
|
|
|
<el-button size="mini" type="text" |
|
|
|
|
@click="updateStatusByUserId(scope.row.status === '0' ? '1' : '0', scope.row.userId)" |
|
|
|
|
v-hasPermi="['system:user:edit']">{{ scope.row.status === '0' ? '禁用' : '开启' }}</el-button> |
|
|
|
|
<el-button size="mini" type="text" @click="handleUpdate(scope.row)" |
|
|
|
|
<el-button size="mini" type="text" @click="showBuyDetail(scope.row.userId)" |
|
|
|
|
v-hasPermi="['system:user:edit']">购买明细</el-button> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
@ -123,7 +123,8 @@ |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<!-- 用户详情对话框 --> |
|
|
|
|
<el-dialog :title="title" :visible.sync="detail.open" width="1200px" append-to-body @close="getList"> |
|
|
|
|
<el-dialog :title="title" :visible.sync="detail.open" width="1200px" append-to-body |
|
|
|
|
@close="getList(); detail.activeName = null"> |
|
|
|
|
<el-tabs v-model="detail.activeName" type="card"> |
|
|
|
|
<el-tab-pane label="基本信息" name="base"> |
|
|
|
|
<base-form :reset="reset" :form="form" show-detail /> |
|
|
|
@ -131,7 +132,7 @@ |
|
|
|
|
<el-tab-pane label="钱包明细" name="balance"> |
|
|
|
|
<platform-wallet-detail :user-id="form.userId" /> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
<el-tab-pane label="购买明细" name="pay_detail"> |
|
|
|
|
<el-tab-pane label="购买明细" name="buy_detail"> |
|
|
|
|
<platform-buy-detail :user-id="form.userId" /> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
<el-tab-pane v-hasPermi="['platform:address:list']" label="收货地址" name="address"> |
|
|
|
@ -235,7 +236,7 @@ export default { |
|
|
|
|
// 是否显示弹出层 |
|
|
|
|
open: false, |
|
|
|
|
//激活标签页 |
|
|
|
|
activeName: "base" |
|
|
|
|
activeName: null |
|
|
|
|
}, |
|
|
|
|
// 用户导入参数 |
|
|
|
|
upload: { |
|
|
|
@ -282,6 +283,15 @@ export default { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
showBuyDetail(userId) { |
|
|
|
|
this.detail.activeName = 'buy_detail' |
|
|
|
|
this.clickUserId = userId |
|
|
|
|
this.detail.open = true |
|
|
|
|
}, |
|
|
|
|
showDetail(userId) { |
|
|
|
|
this.detail.activeName = 'base' |
|
|
|
|
this.clickUserId = userId |
|
|
|
|
}, |
|
|
|
|
//批量更新用户状态 |
|
|
|
|
updateStatusByUserId(status, userId) { |
|
|
|
|
updateStatus({ |
|
|
|
@ -391,18 +401,19 @@ export default { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
/** 修改按钮操作 */ |
|
|
|
|
handleUpdate(row) { |
|
|
|
|
handleUpdate() { |
|
|
|
|
this.reset(); |
|
|
|
|
const userId = row.userId || this.ids; |
|
|
|
|
const userId = this.clickUserId |
|
|
|
|
getUser(userId).then(response => { |
|
|
|
|
this.form = response.data; |
|
|
|
|
this.postOptions = response.posts; |
|
|
|
|
this.roleOptions = response.roles; |
|
|
|
|
this.$set(this.form, "postIds", response.postIds); |
|
|
|
|
this.$set(this.form, "roleIds", response.roleIds); |
|
|
|
|
this.detail.open = true; |
|
|
|
|
this.title = "用户详情"; |
|
|
|
|
this.form.password = ""; |
|
|
|
|
this.detail.open = true |
|
|
|
|
this.form.referrerPhone = this.form.referrerSysUser.phonenumber |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
/** 重置密码按钮操作 */ |
|
|
|
@ -466,6 +477,13 @@ export default { |
|
|
|
|
submitFileForm() { |
|
|
|
|
this.$refs.upload.submit(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
|
'detail.activeName': function (value) { |
|
|
|
|
if (value === 'base' && !this.detail.open) { |
|
|
|
|
this.handleUpdate() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|