parent
81b605c25b
commit
01b8cfce7a
@ -0,0 +1,183 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-drawer
|
||||
size="46%"
|
||||
:title="row.name || ''"
|
||||
:visible.sync="isShow"
|
||||
direction="rtl">
|
||||
<template>
|
||||
<div class="draw-title">用户信息</div>
|
||||
<div style="margin-left: 2%;">
|
||||
<div style="margin-bottom: 8px;">
|
||||
<span class="info-title">性别</span>
|
||||
<span class="info-content">{{ row.sex }}</span>
|
||||
</div>
|
||||
<div style="margin-bottom: 8px;">
|
||||
<span class="info-title">身份证号</span>
|
||||
<span class="info-content">{{ row.idcard }}</span>
|
||||
</div>
|
||||
<div style="margin-bottom: 8px;">
|
||||
<span class="info-title">电话</span>
|
||||
<span class="info-content">{{ row.phone }}</span>
|
||||
</div>
|
||||
<div style="margin-bottom: 8px;">
|
||||
<span class="info-title">联系人</span>
|
||||
<span class="info-content">{{ row.contact_name }} / {{ row.contact_phone }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="draw-title">服务记录</div>
|
||||
<div style="padding: 0 10px;">
|
||||
<xy-table :is-page="false" :list="list" :table-item="table">
|
||||
<template v-slot:btns>
|
||||
</template>
|
||||
</xy-table>
|
||||
</div>
|
||||
</template>
|
||||
</el-drawer>
|
||||
|
||||
<detail ref="detail" @close="isShow = true"></detail>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getList} from '@/api/serveDetail'
|
||||
import moment from "moment";
|
||||
|
||||
import detail from './detailServe'
|
||||
export default {
|
||||
components:{
|
||||
detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isShow:false,
|
||||
row:{},
|
||||
|
||||
select:{
|
||||
page: 1,
|
||||
page_size:9999,
|
||||
customer_id:'',
|
||||
year:'',
|
||||
month:''
|
||||
},
|
||||
list:[],
|
||||
table:[
|
||||
{
|
||||
prop:'nurse.name',
|
||||
label:'护工',
|
||||
width: 124
|
||||
},
|
||||
{
|
||||
prop:'customer_address.address',
|
||||
label:'上门地址',
|
||||
minWidth: 160,
|
||||
align:'left'
|
||||
},
|
||||
{
|
||||
label:'服务时间',
|
||||
width: 200,
|
||||
customFn:(row) => {
|
||||
return (
|
||||
<div>{ moment(row.start_time).format('YYYY-MM-DD HH:mm') }~{ moment(row.end_time).format('HH:mm') }</div>
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
label:'状态',
|
||||
width: 80,
|
||||
customFn:(row) => {
|
||||
let map1 = new Map([
|
||||
[0,'待护理'],
|
||||
[1,'进行中'],
|
||||
[2,'已完成']
|
||||
])
|
||||
let map2 = new Map([
|
||||
[0,'blue'],
|
||||
[1,'red'],
|
||||
[2,'green']
|
||||
])
|
||||
return (
|
||||
<div style={{'color':map2.get(row.status)}}>
|
||||
{map1.get(row.status)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
label:'详情',
|
||||
width: 74,
|
||||
customFn:(row) => {
|
||||
let _this = this
|
||||
return (
|
||||
<div>
|
||||
<Button
|
||||
type="primary"
|
||||
size="small"
|
||||
on={
|
||||
{
|
||||
['click']:() => {
|
||||
_this.$refs['detail'].time = moment(row.start_time).format('YYYY-MM-DD HH:mm') + '~' + moment(row.end_time).format('HH:mm')
|
||||
_this.$refs['detail'].id = row.id
|
||||
_this.$refs['detail'].isShow = true
|
||||
_this.isShow = false
|
||||
}
|
||||
}
|
||||
}>查看</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getList(){
|
||||
const res = await getList(this.select)
|
||||
this.list = res.data
|
||||
console.log(this.list)
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
isShow(val){
|
||||
if(val){
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.draw-title{
|
||||
letter-spacing: 2px;
|
||||
font-weight: 600;
|
||||
|
||||
position: relative;
|
||||
padding: 10px 8px 10px 30px;
|
||||
&::after{
|
||||
content: '';
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 100%;
|
||||
background: #B3241D;
|
||||
|
||||
transform: translateY(-50%);
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.info-title{
|
||||
font-weight: 600;
|
||||
}
|
||||
.info-content{
|
||||
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
::v-deep .el-drawer__header > :first-child{
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in new issue