|
@@ -1,9 +1,8 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div>
|
3
|
|
- <Image :src="headImg" width='100vw' />
|
|
3
|
+ <Image :src="headImg" width="100vw" />
|
4
|
4
|
<h3>复工申请单</h3>
|
5
|
5
|
<Form @submit="onSumbmit">
|
6
|
|
-
|
7
|
6
|
<CellGroup inset>
|
8
|
7
|
<Field
|
9
|
8
|
v-model="orgId"
|
|
@@ -40,13 +39,20 @@
|
40
|
39
|
:rules="[{ required: true, message: '请选择抗原截图' }]"
|
41
|
40
|
>
|
42
|
41
|
<template #input>
|
43
|
|
- <!-- deletable是否显示删除按钮 preview-full-image-->
|
44
|
42
|
<Uploader
|
45
|
43
|
v-model="antigenImage"
|
46
|
|
- :max-count="1"
|
47
|
44
|
:preview-size='40'
|
48
|
45
|
:after-read="antigenImageChange"
|
49
|
|
- />
|
|
46
|
+ :preview-image="false"
|
|
47
|
+ >
|
|
48
|
+ <i v-if="!antigenImageurl" class="van-badge__wrapper van-icon van-icon-photograph van-uploader__upload-icon"></i>
|
|
49
|
+ <Image
|
|
50
|
+ v-else
|
|
51
|
+ :src="antigenImageurl"
|
|
52
|
+ width="40px"
|
|
53
|
+ height="40px"
|
|
54
|
+ />
|
|
55
|
+ </Uploader>
|
50
|
56
|
</template>
|
51
|
57
|
</Field>
|
52
|
58
|
<Field
|
|
@@ -64,7 +70,7 @@
|
64
|
70
|
</Field>
|
65
|
71
|
</CellGroup>
|
66
|
72
|
<!-- <v-spacer /> -->
|
67
|
|
- <CellGroup inset title="核酸">
|
|
73
|
+ <CellGroup inset title="核酸">
|
68
|
74
|
<Field
|
69
|
75
|
name="nucleicImage"
|
70
|
76
|
label="截图"
|
|
@@ -74,10 +80,18 @@
|
74
|
80
|
<template #input>
|
75
|
81
|
<Uploader
|
76
|
82
|
v-model="nucleicImage"
|
77
|
|
- :max-count="1"
|
78
|
|
- :preview-size='40'
|
|
83
|
+ :preview-size="40"
|
79
|
84
|
:after-read="nucleicImageChange"
|
80
|
|
- />
|
|
85
|
+ :preview-image="false"
|
|
86
|
+ >
|
|
87
|
+ <i v-if="!nucleicimageurl" class="van-badge__wrapper van-icon van-icon-photograph van-uploader__upload-icon"></i>
|
|
88
|
+ <Image
|
|
89
|
+ v-else
|
|
90
|
+ :src="nucleicimageurl"
|
|
91
|
+ width="40px"
|
|
92
|
+ height="40px"
|
|
93
|
+ />
|
|
94
|
+ </Uploader>
|
81
|
95
|
</template>
|
82
|
96
|
</Field>
|
83
|
97
|
<Field
|
|
@@ -113,28 +127,32 @@
|
113
|
127
|
<script setup>
|
114
|
128
|
import { onMounted, reactive, ref } from 'vue';
|
115
|
129
|
import { useRouter } from 'vue-router'
|
116
|
|
-import { Button, Form, Field, CellGroup,Image, Uploader, RadioGroup, Radio, Switch, Popup, Picker, Toast } from 'vant';
|
117
|
|
-import { getOrgList } from '../../services/org'
|
118
|
|
-import { addResume } from '../../services/resume'
|
|
130
|
+import { Button, Form, Field, CellGroup, Image, Uploader, RadioGroup, Radio, Switch, Popup, Picker, Toast } from 'vant';
|
|
131
|
+import { getOrgList } from '@/services/org'
|
|
132
|
+import { addResume } from '@/services/resume'
|
119
|
133
|
import { upload } from '@/services/oss'
|
120
|
|
-import headImg from '../../assets/headImg.png'
|
|
134
|
+import headImg from '@/assets/headImg.png'
|
|
135
|
+
|
|
136
|
+const fileList = ref();
|
121
|
137
|
|
122
|
138
|
const orgId = ref('');
|
123
|
139
|
const userName = ref('');
|
124
|
140
|
const antigenImage = ref();
|
125
|
|
-let antigenImageurl = ''
|
|
141
|
+const antigenImageurl = ref();
|
126
|
142
|
const antigenIsNormal = ref('');
|
127
|
143
|
const nucleicImage = ref();
|
128
|
|
-let nucleicimageurl = ''
|
|
144
|
+const nucleicimageurl = ref();
|
129
|
145
|
const nucleicIsNormal = ref('');
|
130
|
146
|
const showPicker = ref(false);
|
131
|
147
|
let columns = ref([]);
|
132
|
148
|
let orgList = ref([]);
|
133
|
149
|
let loading = ref(false);
|
134
|
150
|
|
|
151
|
+
|
135
|
152
|
const router = useRouter()
|
136
|
153
|
|
137
|
154
|
onMounted(() => {
|
|
155
|
+ console.log(antigenImageurl);
|
138
|
156
|
getOrgList({ pageSize: 500 }).then((res) => {
|
139
|
157
|
orgList.value = res.records;
|
140
|
158
|
columns.value = res.records.map(item => item.orgName);
|
|
@@ -151,7 +169,7 @@ const antigenImageChange = (file) => {
|
151
|
169
|
upload(file.file).then(
|
152
|
170
|
(url) => {
|
153
|
171
|
file.status = 'done';
|
154
|
|
- antigenImageurl = url;
|
|
172
|
+ antigenImageurl.value = url;
|
155
|
173
|
}
|
156
|
174
|
).catch(err => {
|
157
|
175
|
file.stetus = 'failed';
|
|
@@ -165,7 +183,7 @@ const nucleicImageChange = (file) => {
|
165
|
183
|
upload(file.file).then(
|
166
|
184
|
(url) => {
|
167
|
185
|
file.status = 'done';
|
168
|
|
- nucleicimageurl = url;
|
|
186
|
+ nucleicimageurl.value = url;
|
169
|
187
|
}
|
170
|
188
|
).catch(err => {
|
171
|
189
|
file.stetus = 'failed';
|
|
@@ -179,7 +197,7 @@ const onConfirm = (value) => {
|
179
|
197
|
const onSumbmit = (values) => {
|
180
|
198
|
let orgid = orgList.value.filter(item => item.orgName = values.orgId)[0].orgId;
|
181
|
199
|
loading.value = true;
|
182
|
|
- addResume({ ...values, orgId: orgid, antigenImage: antigenImageurl, nucleicImage: nucleicimageurl }).then(res => {
|
|
200
|
+ addResume({ ...values, orgId: orgid, antigenImage: antigenImageurl.value, nucleicImage: nucleicimageurl.value }).then(res => {
|
183
|
201
|
router.replace({
|
184
|
202
|
path: '/result'
|
185
|
203
|
})
|
|
@@ -199,7 +217,7 @@ h3 {
|
199
|
217
|
text-align: center;
|
200
|
218
|
}
|
201
|
219
|
|
202
|
|
-::v-deep .van-field__control--custom{
|
|
220
|
+::v-deep .van-field__control--custom {
|
203
|
221
|
justify-content: end;
|
204
|
222
|
}
|
205
|
223
|
</style>
|