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