123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- <template>
- <view class="main">
- <view class="one">
- <image class="image" :src="user.icon&&user.icon.length>0?user.icon[0].url:config.user_url[0].url" mode="">
- </image>
- </view>
- <view class="two">
- <view class="two_1">
- <view class="left">姓名</view>
- <view class="right textOne">
- <text>{{user.name||'暂无姓名'}}</text>
- </view>
- </view>
- <view class="two_1">
- <view class="left">手机号</view>
- <view class="right textOne">
- <text>{{user.mobile||'暂无手机号'}}</text>
- </view>
- </view>
- <view class="two_1">
- <view class="left">就诊编号/卡号</view>
- <view class="right textOne">
- <text>{{user.card_no||'暂无就诊编号/卡号'}}</text>
- </view>
- </view>
- <view class="two_1">
- <view class="left">性别</view>
- <view class="right textOne">
- <text>{{user.gender||'暂无性别'}}</text>
- </view>
- </view>
- <view class="two_1">
- <view class="left">年龄</view>
- <view class="right textOne">
- <text>{{user.age||'暂无年龄'}}</text>
- </view>
- </view>
- <view class="two_1">
- <view class="left">住址</view>
- <view class="right textOne">
- <text>{{user.address||'暂无住址'}}</text>
- </view>
- </view>
- <view class="two_1">
- <view class="left">紧急联系人</view>
- <view class="right textOne">
- <text>{{user.urgent_name||'暂无紧急联系人'}}</text>
- </view>
- </view>
- <view class="two_1">
- <view class="left">紧急联系人电话</view>
- <view class="right textOne">
- <text>{{user.urgent_mobile||'暂无紧急联系人电话'}}</text>
- </view>
- </view>
- <view class="two_1">
- <view class="left">病例</view>
- <view class="right" @tap="toImage(user.emrs[0].url)">
- <image class="image" :src="user.emrs&&user.emrs.length>0?user.emrs[0].url:''" mode="">
- </image>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- id: '',
- user: {},
- config: {},
- }
- },
- onLoad: async function(e) {
- const that = this;
- that.$set(that, `id`, e && e.id || '');
- await that.searchConfig();
- await that.search();
- },
- methods: {
- searchConfig() {
- const that = this;
- try {
- const res = uni.getStorageSync('config');
- if (res) that.$set(that, `config`, res);
- } catch (e) {}
- },
- // 查询
- async search() {
- const that = this;
- if (that.id) {
- let res = await that.$api(`/patient/${that.id}`, 'GET', {})
- if (res.errcode == '0') {
- that.$set(that, `user`, res.data)
- } else {
- uni.showToast({
- title: res.errmsg,
- icon: 'none'
- });
- }
- }
- },
- // 预览图片
- toImage(e) {
- uni.previewImage({
- urls: [e]
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .main {
- .one {
- display: flex;
- justify-content: center;
- padding: 2vw;
- .image {
- width: 25vw;
- height: 25vw;
- border-radius: 5px;
- }
- }
- .two {
- padding: 2vw;
- .two_1 {
- display: flex;
- justify-content: space-between;
- padding: 4vw;
- border-bottom: 1px solid var(--f9Color);
- font-size: var(--font14Size);
- color: var(--f69Color);
- .right {
- text-align: right;
- width: 60vw;
- .image {
- width: 20vw;
- height: 20vw;
- border-radius: 5px;
- }
- }
- }
- }
- }
- </style>
|