Browse Source

Merge remote-tracking branch 'origin/master'

lmm 2 months ago
parent
commit
ad3dc61fc3

+ 1 - 1
src/layout/components/Logo/src/Logo.vue

@@ -62,7 +62,7 @@ watch(
       :class="[
         prefixCls,
         layout !== 'classic' ? `${prefixCls}__Top` : '',
-        'flex !h-[var(--logo-height)] items-center cursor-pointer pl-8px relative decoration-none overflow-hidden'
+        'flex !h-[var(--logo-height)] items-center cursor-pointer pl-2px relative decoration-none overflow-hidden'
       ]"
       to="/"
     >

+ 36 - 13
src/views/museums/specimeninfo/SpecimenImportForm.vue

@@ -1,7 +1,6 @@
 <template>
-  <Dialog loading="loading" v-model="dialogVisible" title="标本信息导入" width="600">
-    <el-alert title="可单独上传xlsx表或者图片压缩包。需确保图片命名规范,不与旧图片命名重复。"
-              type="warning" style="margin-bottom: 10px"/>
+  <Dialog   loading="loading"  v-model="dialogVisible" title="标本信息导入" width="600">
+    <el-alert title="可单独上传xlsx表或者图片压缩包。需确保图片命名规范,不与旧图片命名重复。" type="warning" style="margin-bottom: 10px"/>
     <el-upload
       ref="uploadRef"
       v-model:file-list="fileList"
@@ -15,7 +14,7 @@
       accept=".xlsx, .xls"
       drag
     >
-      <Icon icon="ep:upload"/>
+      <Icon icon="ep:upload" />
       <div class="el-upload__text">将xlsx表拖到此处,或<em>点击上传</em></div>
       <template #tip>
         <div class="el-upload__tip text-center">
@@ -132,7 +131,9 @@ const submitForm = async () => {
         'Content-Type': 'multipart/form-data'
       }
     });
+    console.log(123)
     submitFormSuccess(response)
+    console.log(1233333)
   } catch (error) {
     submitFormError()
   } finally {
@@ -153,29 +154,51 @@ const submitFormSuccess = (response: any) => {
   // 拼接提示语
   const data = response.data.data
   // console.log(data)
-  let text = '上传成功数量:' + data.createSpecimenNumbers.length + ';'
-  for (let specimenInfodata of data.createSpecimenNumbers) {
-    text += '标本编号:' + specimenInfodata + '、'
+  let text
+  if(data.createSpecimenNumbers != null){
+    text = '上传成功数量:' + data.createSpecimenNumbers.length + ';'
+    for (let specimenInfodata of data.createSpecimenNumbers) {
+      text += '标本编号:' + specimenInfodata + '、'
+    }
   }
-  text += '。更新成功数量:' + data.updateSpecimenNumbers.length + ';'
-  for (const specimenInfodata of data.updateSpecimenNumbers) {
-    text += '标本编号:' + specimenInfodata + '、'
+  if(data.updateSpecimenNumbers != null){
+    text += '。更新成功数量:' + data.updateSpecimenNumbers.length + ';'
+    for (const specimenInfodata of data.updateSpecimenNumbers) {
+      text += '标本编号:' + specimenInfodata + '、'
+    }
   }
-  text += '。更新失败数量:' + Object.keys(data.failureSpecimenNumbers).length + ';'
-  for (const specimenInfodata in data.failureSpecimenNumbers) {
-    text += '< ' + specimenInfodata + ': ' + data.failureSpecimenNumbers[specimenInfodata] + ' >'
+  if(data.failureSpecimenNumbers != null) {
+    text += '。更新失败数量:' + Object.keys(data.failureSpecimenNumbers).length + ';'
+    for (const specimenInfodata in data.failureSpecimenNumbers) {
+      text += '< ' + specimenInfodata + ': ' + data.failureSpecimenNumbers[specimenInfodata] + ' >'
+    }
   }
+  if(data.createSpecimenImages != null) {
+    text = '图片上传成功数量:' + data.createSpecimenImages.length + ';'
+    for (let specimenInfodata of data.createSpecimenImages) {
+      text += '图片名称:' + specimenInfodata + '、'
+    }
+  }
+  if(JSON.stringify(data.failureSpecimenImages) != '{}' &&data.failureSpecimenImages != null) {
+    text = '图片上传失败数量:' + Object.keys(data.failureSpecimenImages).length + ';'
+    for (let specimenInfodata of data.failureSpecimenImages) {
+      text += '< ' + specimenInfodata + ': ' + data.failureSpecimenImages[specimenInfodata] + ' >'
+    }
+  }
+
   console.log(555)
   message.alert(text)
   // formLoading.value = false
   dialogVisible.value = false
   // 发送操作成功的事件
   emits('success')
+  formLoading.value = false
 }
 
 /** 上传错误提示 */
 const submitFormError = (): void => {
   message.error('上传失败,请您重新上传!')
+
   formLoading.value = false
   dialogVisible.value = false
 }

+ 5 - 1
src/views/museums/specimeninfo/SpecimenInfoForm.vue

@@ -384,7 +384,11 @@ const resetForm = () => {
     imagePath: [],
     deletedReason: undefined,
     operator: undefined,
-    entryDate: undefined
+    entryDate: undefined,
+    mainPurpose: undefined,
+    saveStatus: undefined,
+    country: undefined,
+    economize: undefined
   }
   formRef.value?.resetFields()
 }

+ 1 - 1
src/views/museums/specimenoutbound/approval.vue

@@ -20,7 +20,7 @@
           <el-input
             v-model="formData.processInstanceId"
             style="width:800px; height: 200px"
-            placeholder="请输入审批建议11"
+            placeholder="请输入审批建议"
             type="textarea"
           />
         </el-form-item>