sdsd
This commit is contained in:
parent
3e4e1c6156
commit
1f0c13f60d
11
src/api/user.ts
Normal file
11
src/api/user.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export const users = (data: any) => {
|
||||||
|
return request({
|
||||||
|
url: `admin/patients`,
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -23,6 +23,14 @@ const constantRoutes = [
|
|||||||
title: '患者管理'
|
title: '患者管理'
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/userDetail',
|
||||||
|
name: 'userDetail',
|
||||||
|
component: () => import('@/views/user/userDetail.vue'),
|
||||||
|
meta: {
|
||||||
|
title: '患者详情'
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/news',
|
path: '/news',
|
||||||
name: 'news',
|
name: 'news',
|
||||||
|
|||||||
@ -1,42 +1,59 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="user-search">
|
<div class="user-search">
|
||||||
<el-input style="width: 200px;margin-right: 10px;" v-model="search" placeholder="请输入患者姓名" />
|
<el-input style="width: 150px;margin-right: 10px;" v-model="query.username" placeholder="请输入患者姓名" />
|
||||||
<el-input style="width: 200px;margin-right: 10px;" v-model="search" placeholder="请输入账号" />
|
<el-input style="width: 150px;margin-right: 10px;" v-model="query.mobile" placeholder="请输入账号" />
|
||||||
<!-- 选择胆道闭锁时间 -->
|
<!-- 选择胆道闭锁时间 -->
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dateTime"
|
v-model="query.operative_date"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="选择胆道闭锁时间"
|
placeholder="选择胆道闭锁时间"
|
||||||
/>
|
/>
|
||||||
<!-- 请选择当前风险 -->
|
<!-- 请选择当前风险 -->
|
||||||
<el-select v-model="risk" placeholder="请选择当前风险">
|
<el-select v-model="query.risk_type" placeholder="请选择当前风险" style="width: 150px;margin-right: 10px;margin-left: 10px;">
|
||||||
<el-option label="高风险" value="1" />
|
<el-option label="高风险" value="3" />
|
||||||
<el-option label="中风险" value="2" />
|
<el-option label="中风险" value="2" />
|
||||||
<el-option label="低风险" value="3" />
|
<el-option label="低风险" value="1" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dateTime"
|
v-model="query.next_follow_date"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="选择下次随访时间"
|
placeholder="选择下次随访时间"
|
||||||
|
style="margin-right: 10px;"
|
||||||
/>
|
/>
|
||||||
<el-button type="primary" icon="Search" @click="handleSearch">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handleSearch">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="handleReset">重置</el-button>
|
<el-button icon="Refresh" @click="handleReset">重置</el-button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" @click="handleSearch">导出</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="user-table">
|
<div class="user-table">
|
||||||
<el-table :data="tableData" style="width: 100%">
|
<el-table :data="tableData" style="width: 100%">
|
||||||
<el-table-column prop="name" label="姓名" />
|
<el-table-column prop="username" label="姓名" />
|
||||||
<el-table-column prop="gender" label="性别" />
|
<el-table-column prop="sex" label="性别">
|
||||||
<el-table-column prop="age" label="年龄" />
|
|
||||||
<el-table-column prop="phone" label="账号" />
|
|
||||||
<el-table-column prop="created_at" label="胆道闭锁手术时间" />
|
|
||||||
<el-table-column prop="created_at" label="术后时长" />
|
|
||||||
<el-table-column prop="created_at" label="当前风险" />
|
|
||||||
<el-table-column prop="updated_at" label="生长曲线" />
|
|
||||||
<el-table-column prop="updated_at" label="下次随访时间" />
|
|
||||||
<el-table-column prop="updated_at" label="操作">
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="primary" @click="handleCheck(scope.row)">查看详情</el-button>
|
<el-tag v-if="scope.row.sex === 1" type="success">男</el-tag>
|
||||||
|
<el-tag v-else type="danger">女</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="age" label="年龄" />
|
||||||
|
<el-table-column prop="mobile" label="账号" />
|
||||||
|
<el-table-column prop="operative_date" label="胆道闭锁手术时间" />
|
||||||
|
<el-table-column prop="postoperative_duration" label="术后时长" />
|
||||||
|
<el-table-column prop="risk_value" label="当前风险" />
|
||||||
|
<el-table-column prop="growth_curve_type" label="生长曲线" >
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.growth_curve_type === 0" type="">未知</el-tag>
|
||||||
|
<el-tag v-if="scope.row.growth_curve_type === 1" type="warning">轻度偏高</el-tag>
|
||||||
|
<el-tag v-if="scope.row.growth_curve_type === 2" type="success">正常</el-tag>
|
||||||
|
<el-tag v-if="scope.row.growth_curve_type === 3" type="danger">重度偏高</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="next_follow_date" label="下次随访时间" />
|
||||||
|
<el-table-column label="操作">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button type="primary" @click="handleCheck(scope.row)" size="small">查看详情</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -52,7 +69,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
|
import { users } from '@/api/user';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
const router = useRouter()
|
||||||
const tableData = ref([
|
const tableData = ref([
|
||||||
{
|
{
|
||||||
name: '张三',
|
name: '张三',
|
||||||
@ -63,7 +83,48 @@ const tableData = ref([
|
|||||||
const search = ref('')
|
const search = ref('')
|
||||||
const handleCheck = (row) => {
|
const handleCheck = (row) => {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
|
router.push({
|
||||||
|
path: '/userDetail',
|
||||||
|
query: {
|
||||||
|
id: row.id
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const query = ref({
|
||||||
|
username: '',
|
||||||
|
mobile: '',
|
||||||
|
operative_date: '',
|
||||||
|
next_follow_date: '',
|
||||||
|
risk_type: '',
|
||||||
|
page: 1,
|
||||||
|
pageSize: 20
|
||||||
|
})
|
||||||
|
const total = ref(0)
|
||||||
|
const getList = () => {
|
||||||
|
users(query.value).then(res => {
|
||||||
|
total.value = res.total
|
||||||
|
tableData.value = res.list
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const handleSearch = () => {
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
const handleReset = () => {
|
||||||
|
query.value = {
|
||||||
|
username: '',
|
||||||
|
mobile: '',
|
||||||
|
operative_date: '',
|
||||||
|
next_follow_date: '',
|
||||||
|
risk_type: '',
|
||||||
|
page: 1,
|
||||||
|
pageSize: 20
|
||||||
|
}
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
getList()
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
37
src/views/user/userDetail.vue
Normal file
37
src/views/user/userDetail.vue
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-descriptions title="患者信息">
|
||||||
|
<el-descriptions-item label="姓名">kooriookami</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="性别">18100000000</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="年龄">苏州市</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="账号"> </el-descriptions-item>
|
||||||
|
<el-descriptions-item label="胆道闭锁手术时间">江苏省苏州市吴中区吴中大道 1188 号</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="术后时长"> </el-descriptions-item>
|
||||||
|
<el-descriptions-item label="当前风险"> </el-descriptions-item>
|
||||||
|
<el-descriptions-item label="生长曲线"> </el-descriptions-item>
|
||||||
|
<el-descriptions-item label="下次随访时间"> </el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
<div class="title">
|
||||||
|
<h2>随访记录</h2>
|
||||||
|
</div>
|
||||||
|
<div class="table">
|
||||||
|
<el-table :data="tableData" style="width: 100%">
|
||||||
|
<el-table-column prop="name" label="随访周期" />
|
||||||
|
<el-table-column prop="name" label="随访日期" />
|
||||||
|
<el-table-column prop="name" label="随访医院" />
|
||||||
|
<el-table-column label="操作">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button type="primary" @click="handleCheck(scope.row)" size="small">查看问卷</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
@ -1,9 +0,0 @@
|
|||||||
<template>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
</style>
|
|
||||||
Loading…
x
Reference in New Issue
Block a user