|
@@ -46,7 +46,7 @@
|
|
|
<script setup lang="ts">
|
|
|
import { ref, onMounted } from 'vue';
|
|
|
import { ElMessage } from 'element-plus';
|
|
|
-import { getPersonnel2,uploadPersonnel } from '@/api/dataManagement/dataManagement';
|
|
|
+import { getPersonnel2, uploadPersonnel } from '@/api/dataManagement/dataManagement';
|
|
|
|
|
|
const emits = defineEmits(['close']);
|
|
|
const props = defineProps<{
|
|
@@ -54,30 +54,30 @@ const props = defineProps<{
|
|
|
}>();
|
|
|
|
|
|
const formData = ref({
|
|
|
- id: '',
|
|
|
- name: '',
|
|
|
- unit: '',
|
|
|
- maintainUnit: '',
|
|
|
+ id: 1,
|
|
|
+ name: '光华北路人防工程',
|
|
|
+ unit: '茂名市应急管理局',
|
|
|
+ maintainUnit: '茂名市应急管理局',
|
|
|
engineer: '',
|
|
|
- location: '',
|
|
|
+ location: '茂名市茂南区光华北路668号',
|
|
|
operation: '',
|
|
|
- plannedArea: '',
|
|
|
- actualArea: '',
|
|
|
- updateTime: ''
|
|
|
+ plannedArea: 122,
|
|
|
+ actualArea: 123,
|
|
|
+ updateTime: '2023/12/12 12:13'
|
|
|
});
|
|
|
|
|
|
const closeDialog = () => {
|
|
|
emits('close');
|
|
|
};
|
|
|
|
|
|
-const fetchPersonnelData = async () => {
|
|
|
- const response = await getPersonnel2(props.eventId);
|
|
|
- if (response.code === 200) {
|
|
|
- formData.value = response.personnel;
|
|
|
- } else {
|
|
|
- ElMessage.error('未找到相关数据');
|
|
|
- }
|
|
|
-};
|
|
|
+// const fetchPersonnelData = async () => {
|
|
|
+// const response = await getPersonnel2(props.eventId);
|
|
|
+// if (response.code === 200) {
|
|
|
+// formData.value = response.personnel;
|
|
|
+// } else {
|
|
|
+// ElMessage.error('未找到相关数据');
|
|
|
+// }
|
|
|
+// };
|
|
|
const submitForm = async () => {
|
|
|
// 假设表单已经通过验证
|
|
|
const response = await uploadPersonnel(props.eventId, formData.value );
|
|
@@ -89,9 +89,9 @@ const submitForm = async () => {
|
|
|
ElMessage.error(response.msg);
|
|
|
}
|
|
|
};
|
|
|
-onMounted(() => {
|
|
|
- fetchPersonnelData();
|
|
|
-});
|
|
|
+// onMounted(() => {
|
|
|
+// fetchPersonnelData();
|
|
|
+// });
|
|
|
</script>
|
|
|
|
|
|
<style scoped></style>
|