客户管理菜单完成及账号管理猜的的初始化,添加上传图片组件的disabled属性
This commit is contained in:
@ -1,5 +1,119 @@
|
||||
<template>
|
||||
<div>
|
||||
account
|
||||
<div class="app-container">
|
||||
<el-table style="width: 100%" :data="unscrambleList">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="登录手机号"
|
||||
align="center"
|
||||
prop="username"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="handlePage(scope.row.id)" type="text" size="small"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="handleStatus(scope.row.id, false)"
|
||||
type="text"
|
||||
size="small"
|
||||
v-if="scope.row.deleteStatus != 1"
|
||||
>禁用</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="handleStatus(scope.row.id, true)"
|
||||
type="text"
|
||||
size="small"
|
||||
v-else
|
||||
>启用</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="handleDelete(scope.row.id)"
|
||||
type="text"
|
||||
size="small"
|
||||
>升级</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
getCategoryList,
|
||||
handleCompanyUser,
|
||||
deleteCompanyUser,
|
||||
resetPw
|
||||
} from '@/api/customer';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
unscrambleList: [],
|
||||
optionList1: [
|
||||
{
|
||||
value: '1',
|
||||
label: '地级市'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '合肥区县'
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
getCategoryList(this.queryParams).then(({ data }) => {
|
||||
this.unscrambleList = data.list;
|
||||
});
|
||||
},
|
||||
handleStatus(companyId, isOpen) {
|
||||
handleCompanyUser({ companyId, isOpen }).then(({ message }) => {
|
||||
this.msgSuccess(message);
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
// 跳转页面
|
||||
handlePage(id) {
|
||||
this.$router.push({ path: '/addCustomer', query: { id, check: true } });
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(companyId) {
|
||||
this.$confirm('确认升级该数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(function() {
|
||||
return deleteCompanyUser({ companyId });
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess('升级成功');
|
||||
});
|
||||
},
|
||||
// 重置密码
|
||||
resetPwd(userId) {
|
||||
// resetPw
|
||||
this.$prompt('请输入新密码', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
// inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
|
||||
// inputErrorMessage: '邮箱格式不正确'
|
||||
})
|
||||
.then(({ value }) => {
|
||||
resetPw({ userId, password: value }).then(({ data }) => {
|
||||
this.msgSuccess(data);
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user