| | |
| | | > |
| | | <template #default="scope"> |
| | | <div v-if="key === 'userType'"> |
| | | {{userTypeList.filter(fil => fil.dictValue == scope.row.userType.toString())[0].dictLabel}} |
| | | {{userTypeList?.filter(fil => fil.dictValue == scope.row.userType.toString())[0].dictLabel}} |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">修改</el-button> |
| | | <el-button v-if="scope.row.userType == 3" link type="primary" icon="Edit" @click="handleRole(scope.row)">绑定角色</el-button> |
| | |
| | | <script setup> |
| | | import user from "@/api/system/user"; |
| | | import role from "@/api/system/role"; |
| | | import { PREURL } from "@/config/index"; |
| | | import { sysDictData } from "@/api/system/dict"; |
| | | import setPostParams from "@/utils/searchParams.js"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const imgBaseUrl = import.meta.env.VITE_APP_IMG_BASEURL //图片前缀 |
| | | |
| | | /** |
| | | * 搜索相关 |
| | |
| | | |
| | | //上传文件,添加图片地址信息 |
| | | const uploadData = (img) => { |
| | | form.value.headImg = img.toString() |
| | | form.value.headImg = imgBaseUrl + img.toString() |
| | | } |
| | | |
| | | //获取用户分类列表 |
| | |
| | | getUserType() |
| | | getList(); |
| | | </script> |
| | | <style lang="scss"> |
| | | <style lang="scss" scoped> |
| | | .table-headImg{ |
| | | max-width: 100px; |
| | | height: 50px; |