2 Commits 6adc283b32 ... 2ac5d1e3fe

Author SHA1 Message Date
  wwj 2ac5d1e3fe Merge branch 'master' of http://gogs.gisvg.com/YDM/museums-ui 1 month ago
  wwj 122d41bf8c Merge branch 'master' of http://gogs.gisvg.com/YDM/museums-ui 1 month ago

+ 18 - 18
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>

+ 8 - 18
src/views/museums/photogroup/index.vue

@@ -28,27 +28,17 @@
           class="!w-220px"
         />
       </el-form-item>
-      <el-form-item label="创建时间" prop="createdAt" label-width="100px">
+      <el-form-item label="创建时间" prop="createTime">
         <el-date-picker
-          v-model="queryParams.createdAt"
-          value-format="YYYY-MM-DD"
-          type="date"
-          placeholder="选择创建时间"
-          clearable
-          class="!w-240px"
+          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 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>

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

@@ -1,6 +1,6 @@
 <template>
   <Dialog   loading="loading"  v-model="dialogVisible" title="标本信息导入" width="600">
-    <el-alert title="可单独上传xlsx表或者图片压缩包。需确保图片命名规范,不与旧图片命名重复。" type="warning" style="margin-bottom: 10px"/>
+    <el-alert title="需确保图片命名规范,不与系统中旧图片命名重复,否则将会覆盖原图片。" type="warning" style="margin-bottom: 10px"/>
     <el-upload
       ref="uploadRef"
       v-model:file-list="fileList"
@@ -27,7 +27,7 @@
           >
             下载模板
           </el-link>
-          <div class="el-upload__tip">
+          <div class="el-upload__tip"  style="color:#ff0000;">
             <el-checkbox v-model="updateSupport"/>
             是否更新已经存在的标本数据
           </div>
@@ -89,7 +89,7 @@ const uploadimageRef = ref()
 const message = useMessage() // 消息弹窗
 import axios from 'axios';
 
-const updateSupport = ref(0) // 是否更新已经存在的用户数据
+const updateSupport = ref(true) // 是否更新已经存在的用户数据
 const fileList = ref([]) // 文件列表
 const imageList = ref([])
 const uploadHeaders = ref() // 上传 Header 头
@@ -100,7 +100,7 @@ const importUrl =
 const open = () => {
   loading.value = true
   dialogVisible.value = true
-  updateSupport.value = 0
+  updateSupport.value = true
   fileList.value = []
   imageList.value = []
   resetForm()
@@ -110,8 +110,8 @@ const {httpRequest} = useUpload()
 
 /** 提交表单 */
 const submitForm = async () => {
-  if (fileList.value.length == 0 && imageList.value.length == 0) {
-    message.error('请上传文件')
+  if (fileList.value.length == 0 ) {
+    message.error('必须上传EXCEL文件')
     return
   }
   // 提交请求
@@ -151,7 +151,12 @@ const submitFormSuccess = (response: any) => {
   // console.log(response.data.code != 0 , response.data.code)
   console.log(666)
   if (response.data.code != 0) {
-    message.error(response.msg)
+    message.error(response.data.msg)
+    // formLoading.value = false
+    return
+  }
+  if (response.data.code== -19) {
+    message.error(response.data.msg)
     // formLoading.value = false
     return
   }
@@ -211,6 +216,7 @@ const submitFormError = (): void => {
 const resetForm = async (): Promise<void> => {
   // 重置上传状态和文件
   formLoading.value = false
+  updateSupport.value = true
   await nextTick()
   uploadRef.value?.clearFiles()
   uploadimageRef.value?.clearFiles()

+ 18 - 60
src/views/museums/specimeninfo/specimenDetails.vue

@@ -24,7 +24,8 @@
                     }}
                   </el-descriptions-item>
                   <el-descriptions-item label-class-name="my-label" label="标本类型:"
-                                        label-align="right">{{ specimenTypeText }}
+                                        label-align="right">
+                    <dict-tag :type="DICT_TYPE.MUSEUMS_SPECIMEN_TYPE" :value="specimenData.specimenType" />
                   </el-descriptions-item>
                   <el-descriptions-item label="资产号:" label-align="right"
                                         label-class-name="my-label">{{
@@ -33,7 +34,8 @@
                   </el-descriptions-item>
 
                   <el-descriptions-item label="保存类型:" label-class-name="my-label"
-                                        label-align="right">{{ preservationTypeText }}
+                                        label-align="right">
+                    <dict-tag :type="DICT_TYPE.MUSEUMS_SPECIMEN_INFO" :value="specimenData.preservationType" />
                   </el-descriptions-item>
                   <el-descriptions-item label="中文名称:" label-align="right"
                                         label-class-name="my-label">{{
@@ -41,9 +43,8 @@
                     }}
                   </el-descriptions-item>
                   <el-descriptions-item label-class-name="my-label" label="保存状态:"
-                                        label-align="right">{{
-                      saveStatusText
-                    }}
+                                        label-align="right">
+                    <dict-tag :type="DICT_TYPE.MUSEUMS_SPECIMEN_PRESERVATION_STATUS" :value="specimenData.saveStatus" />
                   </el-descriptions-item>
                   <!--                  <el-descriptions-item label="存放位置:" label-align="right"-->
                   <!--                                        label-class-name="my-label">{{-->
@@ -167,14 +168,15 @@
                     }}
                   </el-descriptions-item>
                   <el-descriptions-item label="主要用途:" label-class-name="my-label"
-                                        label-align="right">{{
-                      mainPurposeText
-                    }}
+                                        label-align="right">
+                    <dict-tag :type="DICT_TYPE.MUSEUMS_SPECIMEN_MAIN_USES" :value="specimenData.mainPurpose" />
                   </el-descriptions-item>
                   <el-descriptions-item label="具体用途:" label-class-name="my-label"
-                                        label-align="right">{{
+                                        label-align="right">
+                    {{
                       specimenData.purpose
                     }}
+
                   </el-descriptions-item>
                 </el-descriptions>
               </el-card>
@@ -304,7 +306,9 @@
         <el-card style="margin-top: 10px">
           <template #header>
             <div class="card-header">
-              <h1 class="text1" style="margin-bottom: 10px">馆藏状态:{{ collectionStatusText }}</h1>
+              <h1 class="text1" style="margin-bottom: 10px">馆藏状态:
+                <dict-tag  :type="DICT_TYPE.MUSEUMS_COLLECTION_STATUS" :value="specimenData.collectionStatus" />
+              </h1>
             </div>
           </template>
           <el-scrollbar height="650px">
@@ -345,6 +349,7 @@ const router = useRouter() // 路由
 const {query} = useRoute() // 查询参数
 import type {ComponentSize} from 'element-plus'
 import {formatDate} from "@/utils/formatTime";
+import {DICT_TYPE} from "@/utils/dict";
 
 const stustuss = ref()
 const specimenData = ref({
@@ -377,24 +382,7 @@ const fetchData = async () => {
 }
 
 
-/**标本类型**/
-const specimenTypeText = computed(() => {
-  if (specimenData.value === null) {
-    return '';
-  }
-  switch (specimenData.value.specimenType) {
-    case 0:
-      return '矿物';
-    case 1:
-      return '岩石矿石';
-    case 2:
-      return '化石';
-    case 3:
-      return '陨石';
-    default:
-      return '';
-  }
-});
+
 /**保存状态**/
 const saveStatusText = computed(() => {
   if (specimenData.value === null) {
@@ -413,22 +401,7 @@ const saveStatusText = computed(() => {
       return '';
   }
 });
-/**保存类型**/
-const preservationTypeText = computed(() => {
-  if (specimenData.value === null) {
-    return '';
-  }
-  switch (specimenData.value.preservationType) {
-    case 0:
-      return '标本';
-    case 1:
-      return '光片';
-    case 2:
-      return '薄片模型';
-    default:
-      return '';
-  }
-});
+
 /**来源**/
 const sourceText = computed(() => {
   if (specimenData.value === null) {
@@ -467,22 +440,7 @@ const mainPurposeText = computed(() => {
       return '';
   }
 });
-/**馆藏状态**/
-const collectionStatusText = computed(() => {
-  if (specimenData.value === null) {
-    return '';
-  }
-  switch (specimenData.value.collectionStatus) {
-    case 0:
-      return '在馆';
-    case 1:
-      return '借出';
-    case 2:
-      return '展陈';
-    default:
-      return '';
-  }
-});
+
 // // 在组件加载时获取数据
 onMounted(async () => {
   await fetchData()

+ 8 - 11
src/views/museums/specimenoutbound/ApproalProcess.vue

@@ -1,5 +1,4 @@
 <template>
-  <el-skeleton :loading="loading" animated>
     <ContentWrap>
       <!-- 搜索工作栏 -->
       <el-form
@@ -37,7 +36,7 @@
         </el-form-item>
         <el-form-item label="申请日期" prop="applicationDate">
           <el-date-picker
-            v-model="queryParams.applicationDate"
+            v-model="queryParams.createTime"
             value-format="YYYY-MM-DD HH:mm:ss"
             type="daterange"
             start-placeholder="开始日期"
@@ -114,13 +113,12 @@
           :formatter="dateFormatter"
           width="180px"
         />
-        <el-table-column
-          label="项目开始时间"
-          align="center"
-          prop="startTime"
-          :formatter="dateFormatter"
-          width="180px"
-        />
+
+        <el-table-column label="借用起止时间" align="center" prop="sampleStatus" width="200px">
+          <template #default="scope">
+            {{formatDate(scope.row.approvalTime, 'YYYY-MM-DD')}}--{{formatDate(scope.row.twoApprovalTime, 'YYYY-MM-DD')}}
+          </template>
+        </el-table-column>
         <el-table-column label="附件" align="center" prop="attachments">
 <!--          <template #default="{ row }">-->
 <!--            <div v-if="row.attachments">-->
@@ -197,7 +195,6 @@
       />
     </ContentWrap>
     <!--  <Approval ref="ApprovalRef" @success="getList" />-->
-  </el-skeleton>
 </template>
 
 
@@ -205,7 +202,7 @@
 // import Approval from "@/views/museums/specimenoutbound/approval.vue"
 import download from '@/utils/download'
 import {SpecimenOutboundApi, SpecimenOutboundVO} from '@/api/museums/specimenoutbound'
-import {dateFormatter} from "@/utils/formatTime";
+import {dateFormatter, formatDate} from "@/utils/formatTime";
 import {ref} from "vue";
 import {DICT_TYPE, getIntDictOptions} from "@/utils/dict";
 

+ 9 - 4
src/views/museums/specimenoutbound/OutboundApplication.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-skeleton :loading="loading" animated>
+<!--  <el-skeleton :loading="loading" animated>-->
     <ContentWrap>
       <!-- 搜索工作栏 -->
       <el-form
@@ -38,7 +38,7 @@
         </el-form-item>
         <el-form-item label="申请日期" prop="applicationDate">
           <el-date-picker
-            v-model="queryParams.applicationDate"
+            v-model="queryParams.createTime"
             value-format="YYYY-MM-DD HH:mm:ss"
             type="daterange"
             start-placeholder="开始日期"
@@ -109,6 +109,11 @@
           :formatter="dateFormatter"
           width="180px"
         />
+        <el-table-column label="借用起止时间" align="center" prop="sampleStatus" width="200px">
+          <template #default="scope">
+            {{formatDate(scope.row.startTime, 'YYYY-MM-DD')}}--{{formatDate(scope.row.endTime, 'YYYY-MM-DD')}}
+          </template>
+        </el-table-column>
         <el-table-column label="附件" align="center" prop="attachments">
 <!--          <template #default="{ row }">
             <div v-if="row.attachments">
@@ -238,12 +243,12 @@
     <!--    <InitiativeProcessInstance ref="initiativeFormRef" @success="getList" />-->
     <SpecimenOutboundForm ref="formRef" @success="getList"/>
     <!--    <InitiativeProcessInstance ref="initiativeFormRef" @success="getList" />-->
-  </el-skeleton>
+<!--  </el-skeleton>-->
 </template>
 
 
 <script setup lang="ts">
-import {dateFormatter} from "@/utils/formatTime";
+import {dateFormatter, formatDate} from "@/utils/formatTime";
 import download from '@/utils/download'
 import {SpecimenOutboundApi, SpecimenOutboundVO} from '@/api/museums/specimenoutbound'
 import SpecimenOutboundForm from "@/views/museums/specimenoutbound/SpecimenOutboundForm.vue";

+ 6 - 14
src/views/museums/specimenoutbound/OutboundForm/ApproalDetails.vue

@@ -332,30 +332,20 @@ const pageParams = reactive({
 
 /** 查询列表 */
 const getList = async () => {
+  console.log('getList')
   loading.value = true
   try {
     const id = query.dataId as unknown as number
     const data = await SpecimenOutboundApi.getSpecimenOutboundDetailsPage(id, pageParams)
     list.value = data.specimenInfoList.list
     total.value = data.specimenInfoList.total
+    console.log('data',data)
+    outboundData.value=data
     user.value =await SpecimenOutboundApi.getUserInfo()
   } finally {
     loading.value = false
   }
 }
-const fetchData = async () => {
-  try {
-    console.log(query.dataId)
-    let res: any = await SpecimenOutboundApi.getSpecimenOutboundDetails(query.dataId)
-    console.log(res)
-    outboundData.value = res
-    console.log(outboundData.value)
-    res.startTime = formatDate(res.startTime)
-    res.endTime = formatDate(res.endTime)
-
-  } finally {
-  }
-}
 
 /**审批状态**/
 const statusText = computed(() => {
@@ -385,7 +375,7 @@ const statusText = computed(() => {
 
 // // 在组件加载时获取数据
 onMounted(async () => {
-  await fetchData()
+
   await getList()
 })
 
@@ -396,6 +386,8 @@ const ApprovalRef = ref()
 const handleApproval = () => {
   ApprovalRef.value.open(query.dataId)
 }
+
+
 </script>
 
 <style scoped>

+ 9 - 4
src/views/museums/specimenoutbound/OutboundManagement.vue

@@ -1,6 +1,5 @@
 <template>
   <div>
-  <el-skeleton :loading="loading" animated>
   <ContentWrap>
     <!-- 搜索工作栏 -->
     <el-form
@@ -47,7 +46,7 @@
       </el-form-item>
       <el-form-item label="申请日期" prop="createTime">
         <el-date-picker
-          v-model="queryParams.applicationDate"
+          v-model="queryParams.createTime"
           value-format="YYYY-MM-DD HH:mm:ss"
           type="daterange"
           start-placeholder="开始日期"
@@ -56,6 +55,7 @@
           class="!w-220px"
         />
       </el-form-item>
+
       <el-form-item label="审批状态" prop="status" label-width="85px">
         <el-select
           v-model="queryParams.status"
@@ -105,6 +105,7 @@
       <el-table-column label="申请人姓名" align="center" width="120px" prop="applicantName" />
       <el-table-column label="申请单位" align="center" width="120px" prop="applicationUsage" />
       <el-table-column label="研究项目名称" align="center" prop="projectName" />
+
 <!--      <el-table-column-->
 <!--        label="申请日期"-->
 <!--        align="center"-->
@@ -117,6 +118,11 @@
           <dict-tag :type="DICT_TYPE.MUSEUMS_APPROAL_STATUS" :value="scope.row.status" />
         </template>
       </el-table-column>
+      <el-table-column label="借用起止时间" align="center" prop="sampleStatus" width="200px">
+        <template #default="scope">
+          {{formatDate(scope.row.approvalTime, 'YYYY-MM-DD')}}--{{formatDate(scope.row.twoApprovalTime, 'YYYY-MM-DD')}}
+        </template>
+      </el-table-column>
       <el-table-column
         label="出库时间"
         align="center"
@@ -172,13 +178,12 @@
 
   <!-- 表单弹窗:回库 -->
   <specimenReturnForm ref="formRef" @success="getList" />
-  </el-skeleton>
   </div>
 </template>
 
 <script setup lang="ts">
 import download from '@/utils/download'
-import { dateFormatter } from '@/utils/formatTime'
+import {dateFormatter, formatDate} from '@/utils/formatTime'
 import {defineComponent, ref,reactive} from "vue";
 import { SpecimenOutboundApi, SpecimenOutboundVO } from '@/api/museums/specimenoutbound'
 import specimenReturnForm from '@/views/museums/specimenoutbound/OutboundForm/specimenReturnForm.vue'

+ 4 - 4
src/views/museums/specimenoutbound/SpecimenOutboundForm.vue

@@ -64,21 +64,21 @@
 
       </el-form-item>
 
-      <el-form-item label="项目开始时间" prop="outgoingTime" label-width="150px">
+      <el-form-item label="借用开始时间" prop="outgoingTime" label-width="150px">
         <el-date-picker
           v-model="formData.startTime"
           type="date"
           value-format="x"
-          placeholder="选择项目开始时间"
+          placeholder="选择借用开始时间"
         />
       </el-form-item>
 
-      <el-form-item label="项目结束时间" prop="returnDate" label-width="150px">
+      <el-form-item label="借用结束时间" prop="returnDate" label-width="150px">
         <el-date-picker
           v-model="formData.endTime"
           type="date"
           value-format="x"
-          placeholder="选择项目结束时间"
+          placeholder="选择借用结束时间"
         />
       </el-form-item>
       <el-form-item label="备注" prop="outboundRemarks" label-width="150px">

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

@@ -77,7 +77,7 @@ const approvalStatus = ref(1);
 // const uploadRef = ref()
 const formLoading = ref(false) // 表单的加载中
 const dialogVisible = ref(false) // 弹窗的是否展示
-
+const router = useRouter() // 路由
 const chkRemarks = ref('')
 const message = useMessage() // 消息弹窗