12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
-
- <template>
- <div class="patient-container">
- <patient-sidebar :id="patientID"></patient-sidebar>
- <patient-form :is-edit='true' :class='panelClass' v-on:tran-patient-info="patientInfo=$event"></patient-form>
- </div>
- </template>
-
- <script>
- import PatientForm from './components/PatientForm'
- import PatientSidebar from './components/PatientSidebar'
-
- export default {
- name: 'editForm',
- components: { PatientForm,PatientSidebar },
-
- data(){
- return{
- patientID:0,
- panelClass:"patient-app-container",
- patientInfo:{
- id:0
- },
- }
- },
- created(){
- const id = this.$route.params && this.$route.params.id;
- this.patientID = parseInt(id);
- if (isNaN(this.patientID) || this.patientID <= 0) {
- this.$notify.error({
- title: "错误",
- message: "无效的id"
- });
- this.$router.push('/patients/patients');
- }
- }
-
- }
- </script>
-
- <style rel="stylesheet/scss" lang="scss" scoped>
- .app-container{
- margin: 0;
- }
- </style>
|