master
parent
43286ef3f8
commit
fd2cbcc11a
@ -1,159 +1,176 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="service-list" style="padding-bottom: 120rpx">
|
||||
<view
|
||||
class="service-list-item"
|
||||
v-for="(item, i) in list_archive"
|
||||
:key="i.id"
|
||||
>
|
||||
<view class="service-list-item__wrap">
|
||||
<view class="service-list-item__name">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
<view class="service-list-item__price">
|
||||
<u-icon name="phone-fill"></u-icon>
|
||||
{{ item.mobile }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="service-list-item__wrap">
|
||||
<view class="service-list-item__address">
|
||||
{{ item.address }}
|
||||
</view>
|
||||
<view class="service-list-item__idcard">
|
||||
{{ item.idcard }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="service-list-btn">
|
||||
<u-button
|
||||
shape="circle"
|
||||
ripple
|
||||
:custom-style="btnStyle"
|
||||
@click="addArchive"
|
||||
>新增就诊人</u-button
|
||||
>
|
||||
</view>
|
||||
|
||||
<service-archive ref="serviceArchive"></service-archive>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import serviceArchive from "@/component/serviceArchive/service-archive.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
serviceArchive
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btnStyle: {
|
||||
"background-image":
|
||||
"linear-gradient(-90deg, #e26165 0%, #c10d12 94%, #c10d12 100%)",
|
||||
"font-weight": "500",
|
||||
"font-size": "28rpx",
|
||||
color: "#fff",
|
||||
width: "288rpx",
|
||||
"margin-right": "25rpx",
|
||||
},
|
||||
list_archive: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async getUserArchive() {
|
||||
try {
|
||||
const res = await this.$u.api.userArchive({
|
||||
page: 1,
|
||||
page_size: 999,
|
||||
});
|
||||
this.list_archive = res.data;
|
||||
} finally {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
},
|
||||
|
||||
addArchive() {
|
||||
this.$refs.serviceArchive.isShow = true;
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
this.getUserArchive()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getUserArchive()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.service-list {
|
||||
padding-top: 80rpx;
|
||||
|
||||
&-item {
|
||||
border: 2rpx solid #e6e6eb;
|
||||
border-radius: 10rpx;
|
||||
background-color: #ffffff;
|
||||
margin: 0 25rpx;
|
||||
padding: 28rpx 39rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
&__wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&__address {
|
||||
width: 100%;
|
||||
padding-left: 14rpx;
|
||||
line-height: 2;
|
||||
|
||||
}
|
||||
|
||||
&__icon {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
// background: #f9f5e9;
|
||||
// padding: 20rpx;
|
||||
}
|
||||
|
||||
&__name {
|
||||
padding-left: 14rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
line-height: 2;
|
||||
|
||||
}
|
||||
|
||||
&__price {
|
||||
color: #c20d12;
|
||||
font-weight: 500;
|
||||
margin-left: auto;
|
||||
line-height: 2;
|
||||
|
||||
}
|
||||
&__idcard {
|
||||
color: #c20d12;
|
||||
font-weight: 500;
|
||||
margin-left: auto;
|
||||
line-height: 2;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
&-btn {
|
||||
position: fixed;
|
||||
bottom: 40rpx;
|
||||
left: calc(50% - 144rpx);
|
||||
}
|
||||
|
||||
&-item + &-item {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<view class="item" v-for="(res, index) in list_archive" :key="res.id">
|
||||
<view class="top">
|
||||
<view class="name">{{ res.name }}</view>
|
||||
<view class="phone">{{ res.mobile }}</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<text>{{ res.address }}</text>
|
||||
<view class="icon">
|
||||
<u-icon name="edit-pen" :size="40" color="#999999" @tap="toEdit(res)"></u-icon>
|
||||
<u-icon name="trash" style="margin-left: 40rpx;" :size="40" color="red"
|
||||
@tap="selectSite = res,show = true"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="addSite" @tap="addArchive">
|
||||
<view class="add">
|
||||
<u-icon name="plus" color="#ffffff" class="icon" :size="30"></u-icon>新增就诊人
|
||||
</view>
|
||||
</view>
|
||||
<u-modal v-model="show" content="确认操作?" show-cancel-button @confirm="destroy"></u-modal>
|
||||
|
||||
<service-archive ref="serviceArchive"></service-archive>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import serviceArchive from "@/component/serviceArchive/service-archive.vue";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
serviceArchive
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
btnStyle: {
|
||||
"background-image": "linear-gradient(-90deg, #e26165 0%, #c10d12 94%, #c10d12 100%)",
|
||||
"font-weight": "500",
|
||||
"font-size": "28rpx",
|
||||
color: "#fff",
|
||||
width: "288rpx",
|
||||
"margin-right": "25rpx",
|
||||
},
|
||||
show: false,
|
||||
list_archive: [],
|
||||
selectSite: {}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
toEdit(item) {
|
||||
this.$refs.serviceArchive.form = item
|
||||
this.$refs.serviceArchive.isShow = true;
|
||||
},
|
||||
async getUserArchive() {
|
||||
try {
|
||||
const res = await this.$u.api.userArchive({
|
||||
page: 1,
|
||||
page_size: 999,
|
||||
});
|
||||
this.list_archive = res.data;
|
||||
} finally {
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
},
|
||||
|
||||
addArchive() {
|
||||
this.$refs.serviceArchive.isShow = true;
|
||||
},
|
||||
async destroy() {
|
||||
try {
|
||||
if (!this.selectSite?.id) return
|
||||
const res = await this.$u.api.userArchiveDestroy({
|
||||
id: this.selectSite?.id
|
||||
})
|
||||
this.getUserArchive()
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getUserArchive()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.getUserArchive()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
height: 100%;
|
||||
background-color: #f2f3f7;
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: 40rpx 20rpx;
|
||||
background: #fff;
|
||||
margin: 20rpx;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
font-weight: bold;
|
||||
font-size: 34rpx;
|
||||
|
||||
.phone {
|
||||
margin-left: 60rpx;
|
||||
}
|
||||
|
||||
.tag {
|
||||
display: flex;
|
||||
font-weight: normal;
|
||||
align-items: center;
|
||||
|
||||
text {
|
||||
display: block;
|
||||
width: 60rpx;
|
||||
height: 34rpx;
|
||||
line-height: 34rpx;
|
||||
color: #ffffff;
|
||||
font-size: 20rpx;
|
||||
border-radius: 6rpx;
|
||||
text-align: center;
|
||||
margin-left: 30rpx;
|
||||
background-color: rgb(49, 145, 253);
|
||||
}
|
||||
|
||||
.red {
|
||||
background-color: $uni-color-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
color: #999999;
|
||||
|
||||
.icon {
|
||||
text-align: right;
|
||||
margin-left: 10rpx;
|
||||
flex: 0;
|
||||
flex-basis: 200rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.addSite {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
width: 600rpx;
|
||||
line-height: 100rpx;
|
||||
position: absolute;
|
||||
bottom: 30rpx;
|
||||
left: 80rpx;
|
||||
background: linear-gradient(-90deg, #e26165 0%, #c10d12 94%, #c10d12 100%);
|
||||
border-radius: 60rpx;
|
||||
font-size: 30rpx;
|
||||
|
||||
.add {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #ffffff;
|
||||
|
||||
.icon {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<image class="bkg" :src="info.cover?info.cover.url:''"></image>
|
||||
<view class="cotainer">
|
||||
<view class="hospital">
|
||||
<view class="title">{{ info.name }}</view>
|
||||
<view class="tag">
|
||||
<view class="tag__item" v-if="info.tags">{{ info.tags }}</view>
|
||||
<view v-if="info.good_at">{{ info.good_at }}</view>
|
||||
</view>
|
||||
<view class="description" v-if="info.address">
|
||||
<u-icon name="map"></u-icon>
|
||||
<text style="margin-left:20rpx">{{info.address?info.address:'12333333'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="department">
|
||||
<view class="title">医院简介</view>
|
||||
<view class="content">
|
||||
{{info.content?info.content:'暂无简介'}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
info: {},
|
||||
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
onLoad(options) {
|
||||
this.id = options.id ? options.id : ''
|
||||
|
||||
this.getDetail()
|
||||
},
|
||||
methods: {
|
||||
async getDetail() {
|
||||
const res = await this.$u.api.detailHospital({
|
||||
id: this.id
|
||||
})
|
||||
this.info = res
|
||||
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
position: relative;
|
||||
background-color: #f5efee;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 80rpx;
|
||||
}
|
||||
|
||||
.bkg {
|
||||
height: 540rpx;
|
||||
width: 100vw;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.cotainer {
|
||||
padding-top: 460rpx;
|
||||
}
|
||||
|
||||
.hospital {
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
filter: drop-shadow(2.192rpx 4.494rpx 5rpx rgba(33, 32, 32, 0.15));
|
||||
// padding-top:460rpx;
|
||||
padding: 40rpx;
|
||||
padding-bottom:15rpx;
|
||||
margin: 25rpx;
|
||||
margin-top: 0;
|
||||
|
||||
.title {
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tag {
|
||||
margin-top: 16rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
font-size: 24rpx;
|
||||
color:#929196;
|
||||
padding-bottom: 25rpx;
|
||||
&__item {
|
||||
padding: 5rpx 16rpx;
|
||||
font-size: 22rpx;
|
||||
line-height: 31rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom:10rpx;
|
||||
&:nth-child(1) {
|
||||
color: #ca2328;
|
||||
background-color: #faefef;
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
color: #f38628;
|
||||
background-color: #fcf3e9;
|
||||
}
|
||||
}
|
||||
|
||||
.tag__item+.tag__item {
|
||||
margin-left: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.description {
|
||||
// max-width: 350rpx;
|
||||
width: 100%;
|
||||
font-size: 26rpx;
|
||||
color: #929196;
|
||||
font-weight: 500;
|
||||
border-top:1rpx solid rgba(0,0,0,0.1);
|
||||
padding-top: 25rpx;
|
||||
padding-bottom:25rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.department {
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
filter: drop-shadow(2.192rpx 4.494rpx 5rpx rgba(33, 32, 32, 0.15));
|
||||
// padding-top:460rpx;
|
||||
padding: 40rpx;
|
||||
margin: 25rpx;
|
||||
margin-top: 0;
|
||||
margin-bottom: 50rpx;
|
||||
|
||||
.title {
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
color:#666666;
|
||||
font-size: 26rpx;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in new issue