会员列表页面增加详情页的跳转。

This commit is contained in:
绮梦 2023-08-23 10:23:22 +08:00
parent 55772cbba0
commit 451458eb1e

View File

@ -114,10 +114,10 @@
<el-button <el-button
link link
type="primary" type="primary"
@click="openForm('update', scope.row.id)" @click="goMemberDetail(scope.row.id)"
v-hasPermi="['member:user:update']" v-hasPermi="['member:user:update']"
> >
编辑 详情
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -130,14 +130,10 @@
@pagination="getList" @pagination="getList"
/> />
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 -->
<UserForm ref="formRef" @success="getList" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as UserApi from '@/api/member/user' import * as UserApi from '@/api/member/user'
import UserForm from './UserForm.vue'
import { DICT_TYPE } from '@/utils/dict' 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'
@ -185,10 +181,9 @@ const resetQuery = () => {
handleQuery() handleQuery()
} }
/** 添加/修改操作 */ const { push } = useRouter()
const formRef = ref() const goMemberDetail = (id: number) => {
const openForm = (type: string, id?: number) => { push({ path: 'user/detail', query: { member_id: id } })
formRef.value.open(type, id)
} }
/** 初始化 **/ /** 初始化 **/