| | |
| | | // 填写表单 |
| | | const toApply = () => { |
| | | router.push({ |
| | | path: 'apply' |
| | | path: 'zysq' |
| | | }); |
| | | }; |
| | | |
| | |
| | | |
| | | // 查询进度方法 |
| | | const getStatus = async (data: any) => { |
| | | let res = await workApplyApi().getStatus(data); |
| | | let res = await workApplyApi().getAllStatus(data); |
| | | if (res.data.code === '200') { |
| | | state.approveInfo = JSON.parse(JSON.stringify(res.data.data)); |
| | | state.approveInfo.operators = Array.from(state.approveInfo.operators, ({ operatorUname }) => operatorUname); |
| | |
| | | axios.post(import.meta.env.VITE_API_URL + `/work/apply/printing`,data,{headers:{'Content-Type': 'application/json','Authorization': `${Cookies.get('token')}`,'uid':`${Cookies.get('uid')}`},responseType: 'blob'}).then(res=>{ |
| | | if (res) { |
| | | const link = document.createElement('a') |
| | | let blob = new Blob([res.data],{type: 'application/pdf'}) |
| | | let blob = new Blob([res.data],{type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'}) |
| | | link.style.display = "none"; |
| | | link.href = URL.createObjectURL(blob); // 创建URL |
| | | link.setAttribute("download", state.downLoadName + "作业证.pdf"); |
| | | link.setAttribute("download", state.downLoadName + "作业证.docx"); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | document.body.removeChild(link); |