fix
Helius
2021-02-20 45fb4b11ad51bb38306765b11a6747402e382cee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<template>
    <view>
        <view>
            <h-tabs
                class="tab"
                :activeIndex="tabIndex"
                :tabData="tabs" 
                :config="{
                    color: '#abb1cc',
                    activeColor: '#518EFF',
                    underLineColor: '#518EFF',
                    underLineHeight: 6,
                    fontSize: '30',
                    underLineWidth: 110,
                }"
                @tabClick="tabClick($event)"
            />
        </view>
        <view class="content" v-if="tabIndex==0">
            <view class="flex flex-v align-center font-13">
                <image class="content-header-img" :src="info.photo?info.photo:'../../static/images/default-avatar.png'"></image>
                <view class="flex mt-10">
                    <text>姓名: {{info.vipName}}</text>
                    <text class="ml-10">性别: {{info.sex}}</text>
                </view>
                <text class="mt-5 gray">生成时间: {{info.checkTime}}</text>
            </view>
            <view class="mt-20">
                <view class="flex align-center">
                    <text class="iconfont icondd big-dot"></text>
                    <text class="font-15 font-bold">AI诊断结果(平均概率)</text>
                </view>
                <view class="font-13 flex ml-15 mt-10">
                    <view class="flex align-center mr-20" v-for="item in info.diagnoseItems">
                        <text class="iconfont icondd small-dot red"></text>
                        <text>{{item.title}}: {{item.percentage}}%</text>
                    </view>
                </view>    
            </view>
            <view class="mt-20">
                <view class="flex align-center">
                    <text class="iconfont icondd big-dot"></text>
                    <text class="font-15 font-bold">问题分析</text>
                </view>
                <view class="flex problem-row" v-for="item in info.analysisItems">
                    <view>
                        <image class="skin-img" :src="item.img?item.img:'../../static/images/no-img.png'"></image>
                    </view>
                    <view class="flex flex-v">
                        <view>
                            <text class="iconfont icondd small-dot"></text>
                            <text class="font-14">{{item.title}}</text>
                        </view>
                        <text class="font-10 ml-10 mt-10 dark-gray">症状描述:</text>
                        <text class="font-10 ml-10 mt-5 gray">{{item.analysis}}</text>
                    </view>
                </view>
            </view>
        </view>
        <template v-else>
            <view class="content" v-for="item in info.analysisItems">
                <view class="content-title center">
                    <text class="font-16 font-bold blue">{{item.title}}</text>
                </view>
                <view class="flex content-row">
                    <text class="iconfont icondd big-dot mt-10"></text>
                    <view class="flex flex-v content-row-right mr-10">
                        <text class="font-15 font-bold">症状描述:</text>
                        <text class="gray mt-5 font-13">{{item.analysis}}</text>
                    </view>
                </view>
                <view class="flex content-row">
                    <text class="iconfont icondd big-dot mt-10"></text>
                    <view class="flex flex-v content-row-right mr-10">
                        <text class="font-15 font-bold">建议护理:</text>
                        <text class="gray mt-5 font-13">{{item.solution}}。</text>
                    </view>
                </view>
                <view class="flex content-row">
                    <text class="iconfont icondd big-dot mt-10"></text>
                    <view class="flex flex-v content-row-right mr-10">
                        <text class="font-15 font-bold">建议使用产品:</text>
                        <view class="font-13 gray flex align-center mt-10" v-for="op in item.products">
                            <text class="iconfont iconchanpin mr-5"></text>
                            <text>{{op}}</text>
                        </view>
                    </view>
                </view>
            </view>
        </template>
    </view>
</template>
 
<script>
    import HTabs from "@/components/liuyuno-tabs/liuyuno-tabs.vue";
    export default{
        components: {
            HTabs
        },
        data() {
          return {
            tabs:[
                {
                    state: 0,
                    name: '问题分析'
                },
                {
                    state: 1,
                    name: '解决方案'
                }
            ],
            tabIndex:0,
            info: {}
          }  
        },
        onLoad(options) {
            if(options.title){
                uni.setNavigationBarTitle({
                    title: options.title
                });
            }
            this.loadInfo(options.id);
        },
        methods:{
            tabClick(index){
                this.tabIndex=index
            },
            loadInfo(id){
                this.$httpUtils.request('/api/skinCheck/findSkinCheckDetail/'+id).then((res) => {
                    if(res.status == 200){
                        this.info = res.mapInfo.detail
                    }
                })
            }
        }
    }
</script>
 
<style>
    page{
        background: #F6F6F8;
    }
    .tab{
        background: #FFFFFF;
        border-bottom-left-radius: 4px;
        border-bottom-right-radius: 4px;
        box-shadow:0 6px 6px rgba(237,234,244,0.5);
    }
    .content{
        background: #FFFFFF;
        margin: 10px;
        padding: 10px 0;
        border: 1px solid #EDEAF4;
        border-radius: 4px;
        box-shadow:0 6px 6px rgba(237,234,244,0.5);
    }
    .content-header-img{
        width: 80px;
        height: 80px;
        border-radius: 50%;
    }
    .big-dot{
        font-size: 20px;
    }
    .small-dot{
        font-size: 10px;
    }
    .skin-img{
        width: 100px;
        height: 100px;
        border-radius: 4px;
    }
    .problem-row{
        padding: 10px 0;
        border-bottom: 1px solid #EDEAF4;
        margin: 0 10px;
    }
    .problem-row:nth-last-child(1){
        border: 0;
    }
    .content-title{
        border-bottom: 1px solid #EDEAF4;
        margin: 0 10px;
        padding-bottom: 10px;
    }
    .content-row-right{
        flex: 1;
        padding: 10px 0;
        border-bottom: 1px solid #EDEAF4;
    }
    .content-row:nth-last-child(1) .content-row-right{
        border: 0;
    }
</style>