zhangchong 1 год назад
Родитель
Сommit
79f87d5181

+ 4 - 2
src/views/todo/seats/accept/Citizen-portrait.vue

@@ -105,7 +105,7 @@
 	</div>
 </template>
 <script setup lang="ts" name="orderAcceptCitizenPortrait">
-import { computed, onMounted, reactive, ref, watch } from 'vue';
+import {computed, nextTick, onMounted, reactive, ref, watch} from 'vue';
 import { ElMessage, ElMessageBox, FormInstance } from 'element-plus';
 import { citizenDetailByPhone, citizenAdd, citizenLabelAdd, citizenLabelDelete } from '/@/api/business/citizen';
 import { formatDate } from '/@/utils/formatTime';
@@ -236,8 +236,10 @@ const closeTag = (item: any) => {
 		})
 		.catch(() => {});
 };
-onMounted(() => {
+onMounted(async () => {
+  await nextTick()
 	getCitizen();
+  console.log('321')
 });
 defineExpose({
 	getCitizen,

+ 10 - 5
src/views/todo/seats/accept/index.vue

@@ -1012,7 +1012,6 @@ const loadForm = async () => {
 			};
 		}
 	}
-  console.log(route.params.id,'2131')
 	if (route.params.id) {
 		// 如果 有id
 		state.orderId = route.params.id;
@@ -1093,8 +1092,14 @@ const loadExtra = async () => {
 		extraLoading.value = false;
 	}
 };
-loadBaseData();
-loadForm();
-loadAddress();
-loadExtra();
+onBeforeMount(() => {
+	loadBaseData();
+	loadForm();
+  console.log('123')
+});
+onMounted(async () => {
+	await loadAddress();
+	await loadExtra();
+
+});
 </script>