Commit 8c506bbf authored by caimeng's avatar caimeng

回滚修改用户的操作

parent ff20ed77
...@@ -262,11 +262,11 @@ export default { ...@@ -262,11 +262,11 @@ export default {
// 用户管理 // 用户管理
// 用户列表 // 用户列表
userList(params){ userList(data){
return request({ return request({
url: '/user/searchAll', url: '/user/searchAll',
method: 'get', method: 'post',
params data
}) })
}, },
// 用户详情 // 用户详情
......
...@@ -4,18 +4,18 @@ ...@@ -4,18 +4,18 @@
<block-header title='搜索' /> <block-header title='搜索' />
<div class='search'> <div class='search'>
<el-form ref='form' label-suffix=':' :inline='true' :model='queryForm' class='form-inline'> <el-form ref='form' label-suffix=':' :inline='true' :model='queryForm' class='form-inline'>
<el-form-item prop='realName' label='客户姓名'> <el-form-item prop='userName' label='姓名'>
<el-input <el-input
v-model='queryForm.realName' v-model='queryForm.userName'
clearable clearable
placeholder='请输入客户姓名' placeholder='请输入姓名'
/> />
</el-form-item> </el-form-item>
<el-form-item prop='mobile' label='手机号码'> <el-form-item prop='phone' label='手机号码'>
<el-input <el-input
v-model='queryForm.mobile' v-model='queryForm.phone'
clearable clearable
placeholder='请输入客户手机号码' placeholder='请输入手机号码'
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -53,6 +53,16 @@ ...@@ -53,6 +53,16 @@
<el-tag v-if='row.userDutyState==="OFFLINE"' type='info'>离线</el-tag> <el-tag v-if='row.userDutyState==="OFFLINE"' type='info'>离线</el-tag>
<el-tag v-else type='success'>在线</el-tag> <el-tag v-else type='success'>在线</el-tag>
</div> </div>
<!--<div v-else-if="item.label==='在职离职'">-->
<!-- <el-switch-->
<!-- v-model='row.status'-->
<!-- active-value='NORMAL'-->
<!-- inactive-value='LEAVE'-->
<!-- @change='(e)=>{-->
<!-- handleSwitch(e,row)-->
<!-- }'>-->
<!-- </el-switch>-->
<!--</div>-->
<span v-else>{{ row[item.prop] }}</span> <span v-else>{{ row[item.prop] }}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -164,7 +174,13 @@ ...@@ -164,7 +174,13 @@
order: 7, order: 7,
label: '是否在线', label: '是否在线',
prop: 'userDutyState' prop: 'userDutyState'
} },
//{
// order: 8,
// label: '在职离职',
// prop: 'status',
//
//}
], ],
list: [], list: [],
listLoading: true, listLoading: true,
...@@ -174,8 +190,8 @@ ...@@ -174,8 +190,8 @@
current: 1, current: 1,
size: 10, size: 10,
mobile: '', phone: '',
realName: '' userName: ''
} }
} }
}, },
...@@ -294,6 +310,47 @@ ...@@ -294,6 +310,47 @@
message: '操作成功' message: '操作成功'
}) })
} }
},
// 更新用户
async handleSwitch(e, row) {
this.$confirm('是否确认修改?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async (res) => {
console.log(res, '是啥')
const { loginName, memo, userCell, userName } = row
let status
if (e !== 'LEAVE') {
status = 'NORMAL'
} else {
status = 'LEAVE'
}
const result = await API.userUpdate({
loginName,
memo,
status,
userCell,
userName
})
if (result.success) {
this.$message({
type: 'success',
message: '修改成功'
})
await this.fetchData()
}
}).catch((e) => {
console.log(e, '取消了')
})
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment