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
<template>
<div class="label-title mt-2">辅助检查</div>
<div v-for="(item, index) in inspectList" :key="index" class="bg-fa mb-2">
<div style="background-color: #fff; padding: 8px">
<div style="color: #262626; font-size: 14px">检查名称</div>
<van-field
v-model="item.itemName"
placeholder="请输入"
:rules="[{ required: true, message: '请输入' }]"
class="form-input mt-2"
/>
<div style="color: #262626; font-size: 14px; margin-top: 8px">检查结果</div>
<van-field
v-model="item.itemValue"
placeholder="请输入"
class="form-input mt-2"
/>
<div style="color: #262626; font-size: 14px; margin-top: 8px">上传报告</div>
<DocImageUpload
:imageData="item.picturesList"
@change="(ids, option) => item.img = ids"
:maxLength="4"
class="mt-2">
</DocImageUpload>
<div class="del-btn" @click="onDel(index)">删除</div>
</div>
</div>
<van-button type="primary" size="small" plain block @click="onPlus">增加检查</van-button>
</template>
<script>
import DocImageUpload from '@/doctor/components/docImageUpload/DocImageUpload.vue'
export default {
components: { DocImageUpload },
props: {
diseaseInfo: {
type: Object,
default: () => {}
}
},
data() {
return {
form: {},
rules: {},
inspectList: []
}
},
methods: {
onPlus() {
this.inspectList.push({})
},
onDel(index) {
this.inspectList.splice(index, 1)
},
submit() {
return new Promise((resolve, reject) => {
this.inspectList.forEach(item => {
item.dataType = 2
item.diseaseType = this.diseaseInfo.diseaseType
item.itemType = 1
})
resolve(this.inspectList)
})
}
}
}
</script>
<style lang="less" scoped>
.label-title {
font-size: 13px;
color: #595959;
font-weight: 500;
margin-bottom: 8px;
&[required] {
&::after {
content: '*';
color: #FF4D4F;
font-weight: bold;
margin-left: 4px;
}
}
}
.bg-fa {
background-color: #FAFAFA;
padding: 8px;
border-radius: 8px;
}
.form-input {
background-color: #FAFAFA;
padding: 8px 12px;
border-radius: 8px;
}
.del-btn {
text-align: center;
margin: 8px auto;
padding: 4px 8px;
border-radius: 38px;
border: 1px solid #BFBFBF;
width: 112px;
color: #8C8C8C;
font-size: 13px;
}
</style>