|
@@ -1,9 +1,26 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
- <div class="setting_title">工程子账号</div>
|
|
|
+ <div class="setting_title">用户管理</div>
|
|
|
<el-divider />
|
|
|
|
|
|
<div class="mymain-container">
|
|
|
+ <Collapse :screen-form="screenForm">
|
|
|
+ <template #right_btn>
|
|
|
+ <el-button size="mini" @click="resetScreenForm">清空</el-button>
|
|
|
+ <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
|
|
|
+ </template>
|
|
|
+ <template #search>
|
|
|
+ <el-form ref="screenForm" :model="screenForm" label-width="150px" size="mini" label-position="left">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :xs="24" :sm="12" :lg="8">
|
|
|
+ <el-form-item label="账号/用户名名称:" prop="userName">
|
|
|
+ <el-input v-model="screenForm.userName" placeholder="请输入账号/用户名名称" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </template>
|
|
|
+ </Collapse>
|
|
|
<div class="btn-group clearfix">
|
|
|
<div class="fl">
|
|
|
<el-button
|
|
@@ -45,13 +62,8 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="text" @click="addOrEdit('edit', scope.row)">编辑</el-button>
|
|
|
<el-button type="text" @click="addOrEdit('password', scope.row)">重置密码</el-button>
|
|
|
- <el-popconfirm
|
|
|
- title="确定删除吗?"
|
|
|
- @onConfirm="handleDel(scope.row)"
|
|
|
- >
|
|
|
- <el-button slot="reference" type="text" size="mini">
|
|
|
- 删除
|
|
|
- </el-button>
|
|
|
+ <el-popconfirm title="确定删除吗?" @onConfirm="handleDel(scope.row)">
|
|
|
+ <el-button slot="reference" type="text" size="mini"> 删除 </el-button>
|
|
|
</el-popconfirm>
|
|
|
<!-- <el-button
|
|
|
v-if="checkBtnRole('detail')"
|
|
@@ -151,7 +163,13 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="上级经销商" prop="parentId">
|
|
|
- <el-select v-model="ruleForm.parentId" placeholder="请选择上级经销商" :disabled="addFormType === 'edit'" filterable style="width: 100%">
|
|
|
+ <el-select
|
|
|
+ v-model="ruleForm.parentId"
|
|
|
+ placeholder="请选择上级经销商"
|
|
|
+ :disabled="addFormType === 'edit'"
|
|
|
+ filterable
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
<el-option v-for="item in subCustomerList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -232,7 +250,11 @@ export default {
|
|
|
parentId: [{ required: true, message: '请选择上级经销商', trigger: 'change' }],
|
|
|
nickName: [{ required: true, message: '请输入子经销商名称', trigger: 'blur' }]
|
|
|
},
|
|
|
- subCustomerList: []
|
|
|
+ subCustomerList: [],
|
|
|
+ screenForm: {
|
|
|
+ // 筛选表单数据
|
|
|
+ userName: '' // 名称
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -265,6 +287,7 @@ export default {
|
|
|
pageNum: this.currentPage,
|
|
|
pageSize: this.pageSize,
|
|
|
parentId: this.parentId,
|
|
|
+ userName: this.screenForm.userName,
|
|
|
isMaster: false
|
|
|
}
|
|
|
getEngineeringUserList(params).then(res => {
|
|
@@ -294,10 +317,11 @@ export default {
|
|
|
this.$successMsg()
|
|
|
})
|
|
|
},
|
|
|
- handleDel(row){
|
|
|
- delUserGongCheng({userName: row.userName}).then(res=>{
|
|
|
- this.$successMsg('删除成功')
|
|
|
- this.getList()})
|
|
|
+ handleDel(row) {
|
|
|
+ delUserGongCheng({ userName: row.userName }).then(res => {
|
|
|
+ this.$successMsg('删除成功')
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
},
|
|
|
// 新增编辑
|
|
|
addOrEdit(type, row) {
|
|
@@ -469,7 +493,19 @@ export default {
|
|
|
this.getList()
|
|
|
this.$successMsg('编辑成功')
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ // 提交筛选表单
|
|
|
+ submitScreenForm() {
|
|
|
+ this.currentPage = 1
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+
|
|
|
+ // 重置筛选表单
|
|
|
+ resetScreenForm() {
|
|
|
+ this.$refs.screenForm.resetFields()
|
|
|
+ this.currentPage = 1
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|