'接口联调'

This commit is contained in:
张磊
2026-04-03 00:18:06 +08:00
parent 61c342bf13
commit faf6f6d691
5 changed files with 360 additions and 45 deletions
+17 -25
View File
@@ -3,8 +3,10 @@
<el-card class="box-card">
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
<el-form-item label="关键词" prop="keyword">
<el-input v-model="queryParams.keyword" placeholder="用户名/昵称" clearable style="width: 200px"
@keyup.enter="handleQuery" />
<el-select v-model="queryParams.store_id" placeholder="请选择门店" style="width: 100%">
<el-option v-for="item in storeLists" :key="item.store_id" :label="`${item.account}`"
:value="item.store_id" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" :icon="Search" @click="handleQuery">
@@ -17,6 +19,7 @@
</el-form>
<el-table v-loading="loading" :data="userList" border stripe style="width: 100%">
<el-table-column prop="account" label="用户账号" align="center" />
<el-table-column prop="username" label="用户名" align="center" />
<el-table-column prop="nickname" label="昵称" align="center" />
<!--头像可点击查看大图-->
@@ -27,25 +30,12 @@
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column prop="mobile" label="手机号" align="center" />
<el-table-column prop="district_text" label="地区" align="center" />
<el-table-column prop="gender_text" label="性别" align="center" />
<el-table-column prop="mobile" label="手机号" align="center" />
<el-table-column prop="birthday" label="生日" align="center" />
<el-table-column prop="age" label="年龄" align="center" />
<el-table-column prop="status" label="状态" align="center">
<template #default="{ row }">
<el-tag>
{{ statusData[row.status] }}
</el-tag>
</template>
</el-table-column>
<el-table-column prop="detection_number" label="总检测次数" align="center" />
<el-table-column prop="created_at" label="创建时间" align="center" />
<el-table-column label="操作" align="center" width="150">
<template #default="{ row }">
<el-button text @click="openArchiveDialog(row)">用户档案</el-button>
</template>
</el-table-column>
<el-table-column prop="validity_time" label="授权到期时间" align="center" />
</el-table>
<pagination v-if="total > 0" :total="total" v-model:page="queryParams.page" v-model:limit="queryParams.size"
@@ -78,15 +68,17 @@
<script setup lang="ts">
import { reactive, ref, onMounted } from 'vue';
import { getUserList, getUserarchive, getUserarchiveDetail } from '@/api/user';
import { getStoreUserList } from '@/api/store/index'
import { getStoreAccountList, getStoreUserList } from '@/api/store/index';
import { ElMessage } from 'element-plus';
import { Search, Refresh } from '@element-plus/icons-vue';
const statusData = {
1: '未注册',
2: '未进行人脸识别',
3: '未完善信息',
4: '正常'
}
const storeLists = ref<any[]>([]);
const getStoreLists = async () => {
const { data } = await getStoreAccountList({});
storeLists.value = data || [];
console.log(data, '门店账号列表')
};
getStoreLists();
const loading = ref(false);
const total = ref(0);
const userList = ref<any[]>([]);
@@ -134,7 +126,7 @@ function loadArchive() {
const queryParams = reactive({
page: 1,
size: 10,
keyword: ''
store_id: 128
});
function handleQuery() {