Parcourir la source

Merge remote-tracking branch 'origin/master'

lmm il y a 2 mois
Parent
commit
3c54e84591

+ 1 - 1
src/components/UploadFile/src/UploadFile.vue

@@ -80,7 +80,7 @@ const emit = defineEmits(['update:modelValue'])
 
 const props = defineProps({
   modelValue: propTypes.oneOfType<string | string[]>([String, Array<String>]).isRequired,
-  fileType: propTypes.array.def(['doc', 'xls', 'ppt', 'txt', 'pdf','png', 'jpg', 'jpeg']), // 文件类型, 例如['png', 'jpg', 'jpeg']
+  fileType: propTypes.array.def(['doc', 'xls', 'ppt', 'pdf','png', 'jpg', 'jpeg']), // 文件类型, 例如['png', 'jpg', 'jpeg']
   fileSize: propTypes.number.def(5), // 大小限制(MB)
   limit: propTypes.number.def(5), // 数量限制
   autoUpload: propTypes.bool.def(true), // 自动上传

+ 25 - 25
src/views/museums/photogroup/PhotosIndex.vue

@@ -26,27 +26,27 @@
 <!--          class="!w-240px"-->
 <!--        />-->
 <!--      </el-form-item>-->
-<!--      <el-form-item label="上传时间" prop="createdAt">-->
-<!--        <el-date-picker-->
-<!--          v-model="queryParams.createdAt"-->
-<!--          value-format="YYYY-MM-DD"-->
-<!--          type="date"-->
-<!--          placeholder="选择上传时间"-->
-<!--          clearable-->
-<!--          class="!w-240px"-->
-<!--        />-->
-<!--      </el-form-item>-->
-      <el-form-item label="创建时间" prop="createTime">
+      <el-form-item label="上传时间" prop="createdAt">
         <el-date-picker
-          v-model="queryParams.createTime"
-          value-format="YYYY-MM-DD HH:mm:ss"
-          type="daterange"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-          :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
-          class="!w-220px"
+          v-model="queryParams.createdAt"
+          value-format="YYYY-MM-DD"
+          type="date"
+          placeholder="选择上传时间"
+          clearable
+          class="!w-240px"
         />
       </el-form-item>
+<!--      <el-form-item label="创建时间" prop="createTime">-->
+<!--        <el-date-picker-->
+<!--          v-model="queryParams.createTime"-->
+<!--          value-format="YYYY-MM-DD HH:mm:ss"-->
+<!--          type="daterange"-->
+<!--          start-placeholder="开始日期"-->
+<!--          end-placeholder="结束日期"-->
+<!--          :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"-->
+<!--          class="!w-220px"-->
+<!--        />-->
+<!--      </el-form-item>-->
       <el-form-item>
         <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
         <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
@@ -103,13 +103,13 @@
         :formatter="dateFormatter"
         width="180px"
       />
-      <el-table-column
-        label="创建时间"
-        align="center"
-        prop="createTime"
-        :formatter="dateFormatter"
-        width="180px"
-      />
+<!--      <el-table-column-->
+<!--        label="创建时间"-->
+<!--        align="center"-->
+<!--        prop="createTime"-->
+<!--        :formatter="dateFormatter"-->
+<!--        width="180px"-->
+<!--      />-->
       <el-table-column label="操作" align="center" min-width="120px">
         <template #default="scope">
           <el-button

+ 3 - 3
src/views/museums/photogroup/index.vue

@@ -28,12 +28,12 @@
           class="!w-220px"
         />
       </el-form-item>
-      <el-form-item label="创建时间" prop="createdAt" label-width="100px">
+      <el-form-item label="上传时间" prop="createdAt" label-width="100px">
         <el-date-picker
           v-model="queryParams.createdAt"
           value-format="YYYY-MM-DD"
           type="date"
-          placeholder="选择创建时间"
+          placeholder="选择上传时间"
           clearable
           class="!w-240px"
         />
@@ -101,7 +101,7 @@
 <!--        width="180px"-->
 <!--      />-->
       <el-table-column
-        label="创建时间"
+        label="上传时间"
         align="center"
         prop="createTime"
         :formatter="dateFormatter"

+ 44 - 2
src/views/museums/specimenoutbound/OutboundForm/outboundDetail.vue

@@ -158,6 +158,27 @@
 <!--                    <el-link type="primary" download :href="outboundData.attachments" :underline="false" target="_blank"-->
 <!--                    >下载</el-link-->
 <!--                    >-->
+                    <el-image
+                      v-if="outboundData.attachments.includes('image')"
+                      class="h-80px w-80px"
+                      lazy
+                      :src="outboundData.attachments"
+                      :preview-src-list="[outboundData.attachments]"
+                      preview-teleported
+                      fit="cover"
+                    />
+                    <el-link
+                      v-else-if="outboundData.attachments.includes('pdf')"
+                      type="primary"
+                      :href="outboundData.attachments"
+                      :underline="false"
+                      target="_blank"
+                    >预览</el-link
+                    >
+                    <el-link v-else type="primary" download :href="outboundData.attachments" :underline="false" target="_blank"
+                    >下载</el-link
+                    >
+
 
                   </div>
                 </el-descriptions-item>
@@ -171,8 +192,29 @@
                 >
 
                   <div class="demo-image__preview" v-if="outboundData && outboundData.sampleStatus">
-                    <a :href="outboundData.sampleStatus" style="color: #dcb56d
-                ; text-decoration: none;" download>下载附件</a>
+<!--                    <a :href="outboundData.sampleStatus" style="color: #dcb56d-->
+<!--                ; text-decoration: none;" download>下载附件</a>-->
+                    <el-image
+                      v-if="outboundData.sampleStatus.includes('image')"
+                      class="h-80px w-80px"
+                      lazy
+                      :src="outboundData.sampleStatus"
+                      :preview-src-list="[outboundData.sampleStatus]"
+                      preview-teleported
+                      fit="cover"
+                    />
+                    <el-link
+                      v-else-if="outboundData.sampleStatus.includes('pdf')"
+                      type="primary"
+                      :href="outboundData.sampleStatus"
+                      :underline="false"
+                      target="_blank"
+                    >预览</el-link
+                    >
+                    <el-link v-else type="primary" download :href="outboundData.sampleStatus" :underline="false" target="_blank"
+                    >下载</el-link
+                    >
+
                   </div>
 
                 </el-descriptions-item>