【修改】启用禁用 重置密码
This commit is contained in:
+2
-2
@@ -117,10 +117,10 @@ const getContactsByCompanyNoLimit = (params) => getAction('/company/payContactsM
|
||||
// 通过联系人id获取联系人信息
|
||||
const getContactsById = (param) => getAction('/company/payContactsManagement/queryByIdMeeting', param)
|
||||
// 企业管理员重置密码
|
||||
const companyAdminResetPassword = (param) => postAction('/company/payContactsManagement/queryByIdMeeting', param)
|
||||
const companyAdminResetPassword = (param) => postAction('/payManagerManagement/resetPassword', param)
|
||||
|
||||
// 企业管理员启用禁用
|
||||
const companyAdminEnable= (param) => postAction('/company/payContactsManagement/queryByIdMeeting', param)
|
||||
const companyAdminEnable= (param) => postAction('/payManagerManagement/frozenBatch', param)
|
||||
|
||||
// 加密获取key 与 iv
|
||||
const getKeyIv = (param) => getAction('/sys/getEncryptedString',param)
|
||||
|
||||
@@ -61,7 +61,9 @@
|
||||
</template>
|
||||
|
||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||
<a @click="handleUse(record)" v-has="'companyadmin:use'">启用</a>
|
||||
<a @click="handleUse(record)"
|
||||
:class="{'color-red':record.status === 1}"
|
||||
v-has="'companyadmin:use'">{{ record.status === 1 ? '禁用' : '启用' }}</a>
|
||||
<a @click="handleEdit(record)" v-has="'companyadmin:edit'">编辑</a>
|
||||
<a @click="resetPassword(record)" v-has="'companyadmin:resetPassword'">重置密码</a>
|
||||
<a @click="handleDelete(record.id)" v-has="'companyadmin:delete'">删除</a>
|
||||
@@ -125,7 +127,8 @@ export default {
|
||||
{
|
||||
title: '用户姓名',
|
||||
align: 'center',
|
||||
dataIndex: 'name'
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {customRender: 'text'}
|
||||
},
|
||||
{
|
||||
title: '手机号',
|
||||
@@ -136,7 +139,7 @@ export default {
|
||||
{
|
||||
title: '状态',
|
||||
align: 'center',
|
||||
dataIndex: 'status'
|
||||
dataIndex: 'status_dictText'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@@ -152,25 +155,39 @@ export default {
|
||||
* 重置密码
|
||||
* */
|
||||
resetPassword(record) {
|
||||
const param = {
|
||||
id: record.id
|
||||
}
|
||||
companyAdminResetPassword(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.loadData()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
const that = this
|
||||
this.$confirm({
|
||||
title: '确认重置密码',
|
||||
content: '是否重置该用户密码',
|
||||
onOk: function () {
|
||||
const param = {
|
||||
id: record.id
|
||||
}
|
||||
companyAdminResetPassword(param).then(res => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
that.loadData()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 启用禁用
|
||||
* */
|
||||
handleUse(record) {
|
||||
let status
|
||||
if (record.status === 1) {
|
||||
status = 2
|
||||
} else if (record.status === 2) {
|
||||
status = 1
|
||||
}
|
||||
const param = {
|
||||
id: record.id
|
||||
ids: record.id,
|
||||
status
|
||||
}
|
||||
companyAdminEnable(param).then(res => {
|
||||
if (res.success) {
|
||||
@@ -189,4 +206,7 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
.color-red {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user