Unofficially based on personal experience, it shouldn't matter at all. There is no central registry in the UK that would flag you up as not being a worker anymore, especially if your stay is only a few weeks long. Even if you are on a normal visa you might have 90 days to leave the country after it expires, so even if they tell you or your partner that you cannot stay anymore you you'll still have 3 months to actually leave the country.
If your partner already has the permit to be with you then most likely no one would care at all whether you're still working, or not. Also for NHS access: having a GP is usually enough, in case you need to use their services. If you haven't registered at a GP yet, you might get into problems though, so you should do that while you're working.
However there are reports, that the Home Office is trying to crack down on some EU citizens, so if you definitely wish to be on the safe side for those few weeks (especially if your partner wishes to leave and then re-enter the country), then you can do one of the following:
Based on the gov.uk site around EU family permits, it will still be valid if you are in one of the four qualified person categories, "self-sufficient" being one of them. Unfortunately officially you need to have Comprehensive Sickness Insurance if you are only self-sufficient and not a worker. While the Home Office usually only cares about CSI in case you wish to obtain Permanent Residence, if you want to make sure you don't end up in problems, you might want to obtain the insurance for the few weeks you wish to remain in the UK. Note that the insurance has to cover both you and your partner. I'm not sure how much a CSI for a few weeks would cost (or if you can actually get one for only a few weeks), but this is definitely the safest option to do.
If you cease working, and immediately register as a jobseeker in one of the Job Centres, then you might retain your worker status for up to six months. However this only applies if you "provide evidence of seeking employment and having a genuine chance of being engaged", which - as you wish to leave the country - have not. It might still be safer than doing nothing, and enough for the few weeks you wish to remain in the UK however.
If you already lived continuously for five years in the UK, and have been either working, or were self-employed (or a student/self-sufficient having CSI), then you are qualified to be a Permanent Resident. To prove this right you can apply for Permanent Residence. While the process takes a long time (more time than you will probably spend in the UK), based on EU law you are already have the PR status, so your partner's residence card is still be valid, if you encounter problems with the Home Office you can tell them that the application is pending. This option would have a cost of £65/person + the time lost by doing the application, which might not be worth it for the few weeks you wish to stay
Note also that this only applies until 30 March 2019, after which there is still no info on what would happen to any of the permits and options described above.