Ver código fonte

'文件上传加弹框'

蒋珅 1 ano atrás
pai
commit
842a164e59
1 arquivos alterados com 19 adições e 16 exclusões
  1. 19 16
      src/pages/buildTable/create/index.vue

+ 19 - 16
src/pages/buildTable/create/index.vue

@@ -288,25 +288,14 @@ function changeUpload(UploadFile, uploadFiles) {
           console.log("996", fileUplod.value);
 
 }
-function beforeUpload(file) {
-  // fileUplod.value = file;
-  //  console.log("996", file);
-  const isXLSX =
-    file.type ===
-    "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
-  const isLt5M = file.size / 1024 / 1024 < 5;
-
-  if (!isXLSX) {
-    ElMessage.error("上传Excel文件只能是 xlsx 格式!");
-  }
-  if (!isLt5M) {
-    ElMessage.error("上传Excel文件大小不能超过 5MB!");
-  }
-  return isXLSX && isLt5M;
-}
+
+// 此操作非常厚实,一条测点按1秒计算,请耐心等待或查看服务控制台
 // 上传文件
+let centerDialogVisible = ref(false)
 const fslist = async (urlKey) => {
+// ElMessage.success("此操作非常厚实,一条测点按1秒计算,请耐心等待或查看服务控制台");
   // upload.value.submit()
+  centerDialogVisible.value=true
   let formData =new FormData()
   formData.append("excelFile",fileUplod.value)
   // formData.get("excelFile")
@@ -704,5 +693,19 @@ onActivated(() => {
         </span>
       </template>
     </el-dialog>
+
+    <el-dialog v-model="centerDialogVisible" title="注意" width="30%" center>
+    <span>
+     此操作非常厚实,一条测点按1秒计算,请耐心等待或查看服务控制台
+    </span>
+    <template #footer>
+      <span class="dialog-footer">
+   
+        <el-button type="primary" @click="centerDialogVisible = false">
+          确认
+        </el-button>
+      </span>
+    </template>
+  </el-dialog>
   </div>
 </template>