Ver código fonte

人才标注:原始数据回显

Xiao_123 2 meses atrás
pai
commit
7654b6abf1

+ 2 - 2
src/views/menduner/system/talentMap/maintenance/labeling/LabelingForm.vue

@@ -223,7 +223,7 @@ const open = async (data) => {
 	talentItem.value = data
 
 	if (data?.origin_source) {
-		const list = JSON.parse(data.origin_source)
+		const list = typeof data.origin_source === 'string' ? JSON.parse(data.origin_source) : data.origin_source
 		// 时间排序
 		const sortedList = list.sort((a, b) => new Date(b.source_date) - new Date(a.source_date))
 		sourceList.value = sortedList.map(e => {
@@ -234,7 +234,7 @@ const open = async (data) => {
 			}
 
 			if (e.task_type === '招聘') { // 门墩儿招聘-人员信息在组件中通过id和userId获取
-				const obj = JSON.parse(e.minio_path)
+				const obj = typeof e.minio_path === 'string' ? JSON.parse(e.minio_path) : e.minio_path
 				personId.value = obj?.id || ''
 				userId.value = obj?.userId || ''
 				activeName.value = 'info'

+ 2 - 2
src/views/menduner/system/talentMap/search/index.vue

@@ -268,7 +268,7 @@ const handleDetails = async (id) => {
     detail.value = result || {}
 
 		if (result?.origin_source) {
-			const list = JSON.parse(result.origin_source)
+			const list = typeof result.origin_source === 'string' ? JSON.parse(result.origin_source) : result.origin_source
 			// 时间排序
 			const sortedList = list.sort((a, b) => new Date(b.source_date) - new Date(a.source_date))
 			sourceList.value = sortedList.map(e => {
@@ -280,7 +280,7 @@ const handleDetails = async (id) => {
 				}
 
 				if (e.task_type === '招聘') { // 门墩儿招聘-人员信息在组件中通过id和userId获取
-					const obj = JSON.parse(e.minio_path)
+					const obj = typeof e.minio_path === 'string' ? JSON.parse(e.minio_path) : e.minio_path
 					personId.value = obj?.id || ''
 					userId.value = obj?.userId || ''
 					activeName.value = 'info'