This commit is contained in:
shizhong 2023-09-20 12:21:52 +08:00
parent 1a49567613
commit 19e96f1d0d

View File

@ -109,16 +109,32 @@
:formatter="dateFormatter" :formatter="dateFormatter"
width="180px" width="180px"
/> />
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center" width="140px" fixed="right">
<template #default="scope"> <template #default="scope">
<el-button <el-button
link link
type="primary" type="primary"
@click="goMemberDetail(scope.row.id)" @click="goMemberDetail(scope.row.id)"
v-hasPermi="['member:user:update']"
> >
详情 详情
</el-button> </el-button>
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-hasPermi="['member:user:update']"
>
编辑
</el-button>
<!-- todo 放到更多菜单中 -->
<el-button
link
type="primary"
@click="updateLevelFormRef.open(scope.row.id)"
v-hasPermi="['member:user:update-level']"
>
修改等级
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -130,6 +146,11 @@
@pagination="getList" @pagination="getList"
/> />
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 -->
<UserForm ref="formRef" @success="getList" />
<!-- 修改用户等级弹窗 -->
<UpdateLevelForm ref="updateLevelFormRef" @success="getList" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
@ -138,6 +159,7 @@ import { DICT_TYPE } from '@/utils/dict'
import MemberTagSelect from '@/views/member/tag/components/MemberTagSelect.vue' import MemberTagSelect from '@/views/member/tag/components/MemberTagSelect.vue'
import MemberLevelSelect from '@/views/member/level/components/MemberLevelSelect.vue' import MemberLevelSelect from '@/views/member/level/components/MemberLevelSelect.vue'
import MemberGroupSelect from '@/views/member/group/components/MemberGroupSelect.vue' import MemberGroupSelect from '@/views/member/group/components/MemberGroupSelect.vue'
import UpdateLevelForm from '@/views/member/user/UpdateLevelForm.vue'
defineOptions({ name: 'MemberUser' }) defineOptions({ name: 'MemberUser' })
@ -156,6 +178,7 @@ const queryParams = reactive({
groupId: null groupId: null
}) })
const queryFormRef = ref() // const queryFormRef = ref() //
const updateLevelFormRef = ref() //
/** 查询列表 */ /** 查询列表 */
const getList = async () => { const getList = async () => {