|  |  | 
 |  |  |             ></MineAgreementSignDetailItem> | 
 |  |  |             <MineAgreementSignDetailItem | 
 |  |  |               label="协议状态" | 
 |  |  |               :detail="EnumTaskUserSignContractStatusText[detail?.userSignContractStatus]" | 
 |  |  |               :detail="EnumTaskUserSignContractStatusSignText[detail?.userSignContractStatus]" | 
 |  |  |             ></MineAgreementSignDetailItem> | 
 |  |  |           </template> | 
 |  |  |         </MineAgreementSignDetailCard> | 
 |  |  | 
 |  |  | import MineAgreementSignDetailItem from './MineAgreementSignDetailItem.vue'; | 
 |  |  | import * as enterpriseEmployeeServices from '@12333/services/apiV2/enterpriseEmployee'; | 
 |  |  | import { | 
 |  |  |   EnumElectronSignAccess, | 
 |  |  |   EnumTaskUserSignContractStatus, | 
 |  |  |   EnumTaskUserSignContractStatusText, | 
 |  |  |   EnumTaskUserSignContractStatusSignText, | 
 |  |  | } from '@12333/constants'; | 
 |  |  | import { format } from '@12333/utils'; | 
 |  |  | import { format, hiddenPhone, Message, setOSSLink, openDocument } from '@12333/utils'; | 
 |  |  | import Taro from '@tarojs/taro'; | 
 |  |  |  | 
 |  |  | defineOptions({ | 
 |  |  | 
 |  |  |  | 
 |  |  | const { userDetail } = useUser(); | 
 |  |  | const router = Taro.useRouter(); | 
 |  |  | const options = Taro.getLaunchOptionsSync(); | 
 |  |  | //灵工Id | 
 |  |  | const id = router.params?.id; | 
 |  |  | const code = router.params?.code; | 
 |  |  | const code = router.params?.code || options?.query?.scene; | 
 |  |  |  | 
 |  |  | const { | 
 |  |  |   isLoading, | 
 |  |  | 
 |  |  | }); | 
 |  |  |  | 
 |  |  | function checkAgreement() { | 
 |  |  |   const encodedUrl = encodeURIComponent(detail?.value?.contractUrl); | 
 |  |  |   Taro.navigateTo({ | 
 |  |  |     url: `${RouterPath.mineAgreementSignDetail}?url=${encodedUrl}`, | 
 |  |  |   }); | 
 |  |  |   if (detail?.value?.userSignContractStatus === EnumTaskUserSignContractStatus.Wait) { | 
 |  |  |     goToSign(); | 
 |  |  |   } | 
 |  |  |   if ( | 
 |  |  |     detail?.value?.userSignContractStatus === EnumTaskUserSignContractStatus.Stop || | 
 |  |  |     detail?.value?.userSignContractStatus === EnumTaskUserSignContractStatus.Pass | 
 |  |  |   ) { | 
 |  |  |     if (!detail?.value?.contractUrl) { | 
 |  |  |       Message.warning('协议无法查看,请稍后再试'); | 
 |  |  |       return; | 
 |  |  |     } | 
 |  |  |     openDocument(setOSSLink(detail?.value?.contractUrl)); | 
 |  |  |   } | 
 |  |  | } | 
 |  |  |  | 
 |  |  | const goToSign = useAccessReal(async () => { | 
 |  |  |   try { | 
 |  |  |     let params: API.PersonalUserElectronSignCommand = { | 
 |  |  |       id: id, | 
 |  |  |       id: detail.value?.id, | 
 |  |  |     }; | 
 |  |  |     let res = await enterpriseEmployeeServices.personalUserElectronSign(params); | 
 |  |  |     if (res) { | 
 |  |  |       const encodedUrl = encodeURIComponent(res.signContractLongUrl); | 
 |  |  |       Taro.navigateTo({ url: `${RouterPath.extraPage}?url=${encodedUrl}` }); | 
 |  |  |       if (detail.value?.contractTemplateAccess === EnumElectronSignAccess.AlipaySign) { | 
 |  |  |         try { | 
 |  |  |           await Message.confirm({ | 
 |  |  |             message: `签约短信已发送至您${hiddenPhone( | 
 |  |  |               detail.value?.contactPhoneNumber | 
 |  |  |             )}的手机,请及时查看并签约`, | 
 |  |  |             cancelText: '未收到短信', | 
 |  |  |           }); | 
 |  |  |         } catch (error) { | 
 |  |  |           goToSign(); | 
 |  |  |         } | 
 |  |  |       } else { | 
 |  |  |         const encodedUrl = encodeURIComponent(res.signContractLongUrl); | 
 |  |  |         Taro.navigateTo({ url: `${RouterPath.extraPage}?url=${encodedUrl}` }); | 
 |  |  |       } | 
 |  |  |     } | 
 |  |  |   } catch (error) {} | 
 |  |  | }); | 
 |  |  | Taro.useDidShow(() => { | 
 |  |  |   refetch(); | 
 |  |  | }); | 
 |  |  | </script> | 
 |  |  |  | 
 |  |  | <style lang="scss"> |