Parcourir la source

qhse资料库左侧菜单

yanghao il y a 6 jours
Parent
commit
66f8d96a80
2 fichiers modifiés avec 10 ajouts et 3 suppressions
  1. 1 1
      .env.local
  2. 9 2
      src/views/pms/qhse/data/PmsTree.vue

+ 1 - 1
.env.local

@@ -4,7 +4,7 @@ NODE_ENV=development
 VITE_DEV=true
 
 # 请求路径  http://192.168.188.200:48080  https://iot.deepoil.cc:5443  http://172.26.0.56:48080  http://192.168.188.198:48080
-VITE_BASE_URL='http://172.26.0.56:48080'
+VITE_BASE_URL='https://iot.deepoil.cc:5443'
 
 # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
 VITE_UPLOAD_TYPE=server

+ 9 - 2
src/views/pms/qhse/data/PmsTree.vue

@@ -9,6 +9,7 @@ import { CommonStatusEnum } from '@/utils/constants'
 
 defineOptions({ name: 'IotTree' })
 
+const formLoading = ref(false)
 const dialogVisible = ref(false) // 弹窗的是否展示
 const dialogTitle = ref('') // 弹窗的标题
 const formRef = ref() // 搜索的表单
@@ -112,7 +113,7 @@ const handleMenuClick = async (action) => {
 
 const submitForm = async () => {
   // 表单验证逻辑
-
+  formLoading.value = true
   try {
     const targetParentId = formType.value === 'create' ? parentId.value : formData.value.parentId
     formData.value.type = 'file'
@@ -133,6 +134,7 @@ const submitForm = async () => {
   } catch (error) {
     console.error(error)
   } finally {
+    formLoading.value = false
   }
 }
 
@@ -339,7 +341,12 @@ onBeforeUnmount(() => {
     </div>
 
     <Dialog v-model="dialogVisible" :title="dialogTitle" style="width: 40em">
-      <el-form ref="formRef" :model="formData" :rules="formRules" label-width="80px">
+      <el-form
+        ref="formRef"
+        v-loading="formLoading"
+        :model="formData"
+        :rules="formRules"
+        label-width="80px">
         <div class="flex flex-col gap-4">
           <el-form-item label="目录名称" prop="name" label-width="110px">
             <el-input v-model="formData.name" placeholder="请输入目录名称" />