|
@@ -156,22 +156,22 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<el-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24" class="mb-8px">
|
|
<el-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24" class="mb-8px">
|
|
- <div class="demo-image__preview" v-if="specimenData ">
|
|
|
|
|
|
+ <div v-if="specimenData.imagePath && specimenData.imagePath.length">
|
|
|
|
+ <div class="demo-image__preview">
|
|
<el-image
|
|
<el-image
|
|
-
|
|
|
|
style=" align-items: center"
|
|
style=" align-items: center"
|
|
:src="specimenData.imagePath[0]"
|
|
:src="specimenData.imagePath[0]"
|
|
:zoom-rate="1.2"
|
|
:zoom-rate="1.2"
|
|
:max-scale="7"
|
|
:max-scale="7"
|
|
:min-scale="0.2"
|
|
:min-scale="0.2"
|
|
- :preview-src-list="specimenData.imagePaths"
|
|
|
|
|
|
+ :preview-src-list="specimenData.imagePath"
|
|
:initial-index="index"
|
|
:initial-index="index"
|
|
fit="cover"
|
|
fit="cover"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div>
|
|
<div>
|
|
- <el-space style="margin-top: 10px" v-if="specimenData ">
|
|
|
|
|
|
+ <el-space style="margin-top: 10px" >
|
|
<div class="demo-image__preview" v-for="(url, index) in specimenData.imagePath"
|
|
<div class="demo-image__preview" v-for="(url, index) in specimenData.imagePath"
|
|
:key="index">
|
|
:key="index">
|
|
<el-image
|
|
<el-image
|
|
@@ -185,8 +185,10 @@
|
|
fit="cover"
|
|
fit="cover"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
- </el-space>
|
|
|
|
|
|
+ </el-space>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <el-empty v-else description="暂无图片" />
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
@@ -195,40 +197,23 @@
|
|
<template #header>
|
|
<template #header>
|
|
<div class="card-header" >
|
|
<div class="card-header" >
|
|
<h1 class="text1" style="margin-bottom: 10px">馆藏状态</h1>
|
|
<h1 class="text1" style="margin-bottom: 10px">馆藏状态</h1>
|
|
- <span v-if="specimenRecord">{{collectionStatusText}}</span>
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<el-scrollbar height="600px">
|
|
<el-scrollbar height="600px">
|
|
<el-timeline style="max-width: 600px;margin-left: 15px" >
|
|
<el-timeline style="max-width: 600px;margin-left: 15px" >
|
|
<el-timeline-item
|
|
<el-timeline-item
|
|
- v-for="(item, index) in specimenData"
|
|
|
|
- :key="index"
|
|
|
|
- :timestamp="item.outgoingTime"
|
|
|
|
- placement="top">
|
|
|
|
- <el-card>
|
|
|
|
- <p>{{ }}</p>
|
|
|
|
- <p>状态:{{ }}</p>
|
|
|
|
- <p>申请人或单位:{{item.applicantName }}</p>
|
|
|
|
- <p>用途:{{item.applicationUsage}}</p>
|
|
|
|
- <p>审批员:{{item.approveUsers}}</p>
|
|
|
|
- <p>审批时间:{{}}</p>
|
|
|
|
- <p>出库员:{{ item.operator }}</p>
|
|
|
|
- </el-card>
|
|
|
|
- </el-timeline-item>
|
|
|
|
- <el-timeline-item
|
|
|
|
- v-for="(item, index) in specimenData"
|
|
|
|
|
|
+ v-for="(item, index) in stustuss"
|
|
:key="index"
|
|
:key="index"
|
|
- :timestamp="item.acquisitionTime"
|
|
|
|
- placement="top">
|
|
|
|
|
|
+ type="primary"
|
|
|
|
+ :hollow = "true"
|
|
|
|
+ >
|
|
|
|
+ <h4>{{formatDate(item.createTime) }}</h4>
|
|
<el-card>
|
|
<el-card>
|
|
- <p>回库</p>
|
|
|
|
- <p>退还人:{{ item.operator }}</p>
|
|
|
|
- <p>点收人:{{item.applicationUsage}}</p>
|
|
|
|
- <p>退还日期:{{item.approveUsers}}</p>
|
|
|
|
- <p>标本情况:{{}}</p>
|
|
|
|
|
|
+ <h4>操作状态:{{item.subType}}</h4>
|
|
|
|
+ <div style="line-height: 30px">操作人:{{ item.userName}}</div>
|
|
|
|
+ <div style="line-height: 20px">操作内容:{{item.action}}</div>
|
|
</el-card>
|
|
</el-card>
|
|
</el-timeline-item>
|
|
</el-timeline-item>
|
|
-
|
|
|
|
</el-timeline>
|
|
</el-timeline>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</el-card>
|
|
</el-card>
|
|
@@ -253,8 +238,10 @@ const router = useRouter() // 路由
|
|
const {query} = useRoute() // 查询参数
|
|
const {query} = useRoute() // 查询参数
|
|
import type {ComponentSize} from 'element-plus'
|
|
import type {ComponentSize} from 'element-plus'
|
|
import {formatDate} from "@/utils/formatTime";
|
|
import {formatDate} from "@/utils/formatTime";
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+const stustuss = ref()
|
|
|
|
+const specimenData = ref({
|
|
|
|
+ imagePath:[]
|
|
|
|
+}); // 初始化响应式数据
|
|
const size = ref<ComponentSize>('large')
|
|
const size = ref<ComponentSize>('large')
|
|
|
|
|
|
|
|
|
|
@@ -265,30 +252,26 @@ const srcList = ref([])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-let specimenData = ref(null); // 初始化响应式数据
|
|
|
|
|
|
+
|
|
const fetchData = async () => {
|
|
const fetchData = async () => {
|
|
|
|
+ loading.value = true
|
|
try {
|
|
try {
|
|
console.log(query.dataId)
|
|
console.log(query.dataId)
|
|
let res: any = await SpecimenInfoApi.getSpecimenInfo(query.dataId)
|
|
let res: any = await SpecimenInfoApi.getSpecimenInfo(query.dataId)
|
|
|
|
+ const stutus = await SpecimenInfoApi.getStustusInfo(query.dataId)
|
|
|
|
+ stustuss.value = stutus
|
|
|
|
+ console.log('stustuss',stustuss.value)
|
|
console.log(res)
|
|
console.log(res)
|
|
res.discoveryTime = formatDate(res.discoveryTime)
|
|
res.discoveryTime = formatDate(res.discoveryTime)
|
|
res.fallTime = formatDate(res.fallTime)
|
|
res.fallTime = formatDate(res.fallTime)
|
|
res.acquisitionTime = formatDate(res.acquisitionTime)
|
|
res.acquisitionTime = formatDate(res.acquisitionTime)
|
|
-
|
|
|
|
-
|
|
|
|
specimenData.value = res
|
|
specimenData.value = res
|
|
console.log(specimenData.value)
|
|
console.log(specimenData.value)
|
|
} finally {
|
|
} finally {
|
|
|
|
+ loading.value = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-// // 在组件加载时获取数据
|
|
|
|
-onMounted(async () => {
|
|
|
|
- console.log(1)
|
|
|
|
- await fetchData()
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-})
|
|
|
|
|
|
|
|
|
|
|
|
/**标本类型**/
|
|
/**标本类型**/
|
|
@@ -325,20 +308,6 @@ const preservationTypeText = computed(() => {
|
|
return '';
|
|
return '';
|
|
}
|
|
}
|
|
});
|
|
});
|
|
-/**来源**/
|
|
|
|
-const collectionStatusText = computed(() => {
|
|
|
|
- if (specimenData.value === null) {
|
|
|
|
- return '';
|
|
|
|
- }
|
|
|
|
- switch (specimenData.value.collectionStatus) {
|
|
|
|
- case 0:
|
|
|
|
- return '在馆';
|
|
|
|
- case 1:
|
|
|
|
- return '借出';
|
|
|
|
- default:
|
|
|
|
- return '';
|
|
|
|
- }
|
|
|
|
-});
|
|
|
|
/**馆藏状态(在馆、借出)**/
|
|
/**馆藏状态(在馆、借出)**/
|
|
const sourceText = computed(() => {
|
|
const sourceText = computed(() => {
|
|
if (specimenData.value === null) {
|
|
if (specimenData.value === null) {
|
|
@@ -356,6 +325,10 @@ const sourceText = computed(() => {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+// // 在组件加载时获取数据
|
|
|
|
+onMounted(async () => {
|
|
|
|
+ await fetchData()
|
|
|
|
+})
|
|
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|