瀏覽代碼

flx:更改++12345543

wzq 5 月之前
父節點
當前提交
8de7f63505
共有 1 個文件被更改,包括 49 次插入9 次删除
  1. 49 9
      src/views/business/personnel/personnelDel.vue

+ 49 - 9
src/views/business/personnel/personnelDel.vue

@@ -146,10 +146,28 @@
146 146
 					<a-form-item class="form-item" label="专业" name="major" :label-col="{ span: 10 }">
147 147
 						<a-input placeholder="请输入专业" :disabled="code" v-model:value="formState.major" />
148 148
 					</a-form-item>
149
+					<a-form-item class="form-item" label="个人简介" :label-col="{ span: 10 }">
150
+						<a-textarea
151
+							style="width: 620px"
152
+							placeholder="请输入个人简介"
153
+							v-model:value="formState.personalProfile"
154
+							:disabled="code"
155
+							allow-clear
156
+						/>
157
+					</a-form-item>
158
+				</div>
149 159
 
150
-					<a-form-item class="form-item" label="" name="username" :label-col="{ span: 10 }"> </a-form-item>
151
-
152
-					<!--  -->
160
+				<div class="attachment">
161
+					<a-form-item ref="uploadDataList" class="form-item" label="附件" name="certificate" :label-col="{ span: 3 }">
162
+						<DIYUPLoad
163
+							:beforeUpload="beforeUpload"
164
+							multiple
165
+							:disabled="code"
166
+							:change="changeUpload"
167
+							listType="picture-card"
168
+							v-model:urls="formState.certificate"
169
+						></DIYUPLoad>
170
+					</a-form-item>
153 171
 				</div>
154 172
 
155 173
 				<a-form-item>
@@ -191,6 +209,7 @@
191 209
 	import { defineComponent } from 'vue'
192 210
 	import business from '@/api/business/dictionary.js'
193 211
 	import businessDel from '@/api/business/personnelApi.js'
212
+	import global from '@/api/basic.info/global'
194 213
 	export default {
195 214
 		name: 'ApplicationExtension',
196 215
 		components: {},
@@ -212,7 +231,9 @@
212 231
 				positionNature: '',
213 232
 				onDutyStatus: '',
214 233
 				staffCategory: '',
215
-				major: ''
234
+				major: '',
235
+				personalProfile: '',
236
+				certificate: ''
216 237
 			})
217 238
 
218 239
 			watch(
@@ -243,8 +264,8 @@
243 264
 			const huiXian = async () => {
244 265
 				if (code.value) {
245 266
 					const res = await businessDel.EmPersonInfoDetail({ id: route.query.id })
246
-					console.log(res)
247 267
 					formState.value = res
268
+					formState.value.certificate = (res.certificate || '').split(',').filter((v) => v)
248 269
 				}
249 270
 			}
250 271
 
@@ -295,11 +316,14 @@
295 316
 			}
296 317
 
297 318
 			// 回显示
298
-			const onFinish = (values) => {
319
+			const onFinish = () => {
320
+				if (Array.isArray(formState.value.certificate)) {
321
+					formState.value.certificate = formState.value.certificate.join(',')
322
+				}
299 323
 				if (route.query.id) {
300
-					pustEdit({ id: route.query.id, ...values })
324
+					pustEdit({ id: route.query.id, ...formState.value })
301 325
 				} else {
302
-					pustFrom(values)
326
+					pustFrom(formState.value)
303 327
 					formState.value = {
304 328
 						name: '',
305 329
 						gender: '',
@@ -315,7 +339,9 @@
315 339
 						positionNature: '',
316 340
 						onDutyStatus: '',
317 341
 						staffCategory: '',
318
-						major: ''
342
+						major: '',
343
+						personalProfile: '',
344
+						certificate: ''
319 345
 					}
320 346
 				}
321 347
 				router.back()
@@ -328,7 +354,21 @@
328 354
 				console.log(val)
329 355
 			}
330 356
 
357
+			function changeUpload(fd) {
358
+				return global.uploadFile(fd).then((reg) => {
359
+					uploadDataList.value.clearValidate()
360
+					return reg
361
+				})
362
+			}
363
+			const uploadDataList = ref(null)
364
+			function beforeUpload() {
365
+				uploadDataList.value.clearValidate()
366
+			}
367
+
331 368
 			return {
369
+				beforeUpload,
370
+				uploadDataList,
371
+				changeUpload,
332 372
 				isEmail,
333 373
 				validateIdCard,
334 374
 				isMobileData,