From 6d9e8a35d81e6d1feb2136690661d43c6cfd53b7 Mon Sep 17 00:00:00 2001 From: 龚焕茏 <2842157468@qq.com> Date: 星期二, 05 三月 2024 18:11:35 +0800 Subject: [PATCH] Excel导入部分 --- src/views/dg/danger/index.vue | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/views/dg/danger/index.vue b/src/views/dg/danger/index.vue index 733b070..8a9b40c 100644 --- a/src/views/dg/danger/index.vue +++ b/src/views/dg/danger/index.vue @@ -139,7 +139,7 @@ </template> <script setup name="DangerInfo" lang="ts"> -import { listDangerInfo, getDangerInfo, delDangerInfo, addDangerInfo, updateDangerInfo } from '@/api/dg/dangerInfo'; +import { getDangerType, listDangerInfo, getDangerInfo, delDangerInfo, addDangerInfo, updateDangerInfo } from '@/api/dg/dangerInfo'; import { DangerInfoVO, DangerInfoQuery, DangerInfoForm } from '@/api/dg/dangerInfo/types'; import type { TabsPaneContext, UploadProps, UploadUserFile } from "element-plus"; const fileList = ref<UploadUserFile[]>([]) @@ -183,11 +183,6 @@ visible: false, title: '' }); - -const dangerTypes = [ - { - dangerType: '閬撹矾闅愭偅' - }]; const initFormData: DangerInfoForm = { id: undefined, @@ -257,9 +252,13 @@ loading.value = false; } +// 璋冪敤鍚庣API鑾峰彇鏅尯鍚嶇О鍒楄〃 +const dangerTypes = ref<DangerInfoVO[]>([]); + /** 鏌ヨ瀹夊叏闅愭偅绫诲瀷鏌ヨ鏉′欢 */ const getDangerTypes = async () => { - // dangerTypes.value = await getDangerTypes(); + const res = await getDangerType(); + dangerTypes.value = res; } /** 鍙栨秷鎸夐挳 */ -- Gitblit v1.8.0