|  | @@ -286,17 +286,27 @@ const handleJobClickItem = (list, name) => {
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  // 岗位模板
 | 
	
		
			
				|  |  | +import Confirm from '@/plugins/confirm'
 | 
	
		
			
				|  |  |  import Snackbar from '@/plugins/snackbar'
 | 
	
		
			
				|  |  | +import { useI18n } from '@/hooks/web/useI18n'; const { t } = useI18n()
 | 
	
		
			
				|  |  |  const useJobTemplate = async () => {
 | 
	
		
			
				|  |  |    if (!query.positionId) return Snackbar.warning('请先选择职位类型')
 | 
	
		
			
				|  |  |    // 获取职位模板内容-赋值
 | 
	
		
			
				|  |  |    const res = await getRecruitPositionDetails(query.positionId)
 | 
	
		
			
				|  |  | -  if (!res) return Snackbar.warning('此职位类型没有可使用的模板!')
 | 
	
		
			
				|  |  | -  if (res.content || res.requirement) {
 | 
	
		
			
				|  |  | -    items.value.options.forEach(e => {
 | 
	
		
			
				|  |  | -      if (res.content && e.key === 'content') e.value = res.content
 | 
	
		
			
				|  |  | -      if (res.requirement && e.key === 'requirement') e.value = res.requirement
 | 
	
		
			
				|  |  | +  if (!res || !res.content || !res.requirement) return Snackbar.warning('此职位类型没有可使用的模板!')
 | 
	
		
			
				|  |  | +  const content =  items.value.options.find(e => e.key === 'content')
 | 
	
		
			
				|  |  | +  const requirement =  items.value.options.find(e => e.key === 'requirement')
 | 
	
		
			
				|  |  | +  if ((content && content.value) || (requirement && requirement.value)) {
 | 
	
		
			
				|  |  | +    // 弹窗提示
 | 
	
		
			
				|  |  | +    Confirm(t('common.confirmTitle'), '您确定要放弃目前岗位描述的内容吗?').then(() => {
 | 
	
		
			
				|  |  | +      content.value = res.content
 | 
	
		
			
				|  |  | +      requirement.value = res.requirement
 | 
	
		
			
				|  |  | +      Snackbar.success('模板填充完成!')
 | 
	
		
			
				|  |  |      })
 | 
	
		
			
				|  |  | +  } else {
 | 
	
		
			
				|  |  | +    // 无内容点击默认填充
 | 
	
		
			
				|  |  | +    if (content) content.value = res.content
 | 
	
		
			
				|  |  | +    if (requirement) requirement.value = res.requirement
 | 
	
		
			
				|  |  |      Snackbar.success('模板填充完成!')
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 |