ApproalDetails.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <template>
  2. <el-skeleton :loading="loading" animated>
  3. <el-row :gutter="8" justify="space-between">
  4. <el-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24">
  5. <el-card style="margin-bottom: 10px">
  6. <template #header>
  7. <div class="card-header" style="text-align: center">
  8. <h1 class="text1">标本出库申请详情</h1>
  9. </div>
  10. </template>
  11. <el-row >
  12. <el-col :xl="11" :lg="11" :md="24" :sm="24" :xs="24" >
  13. <el-descriptions
  14. :column="1"
  15. border
  16. :size="size"
  17. v-if="outboundData"
  18. >
  19. <el-descriptions-item label="审批状态:" label-align="right" label-class-name="my-label">{{ outboundData.status }}</el-descriptions-item>
  20. <el-descriptions-item label="申请人姓名:" label-align="right" label-class-name="my-label">{{ outboundData.applicantName }}</el-descriptions-item>
  21. <el-descriptions-item label="申请单位:" label-align="right" label-class-name="my-label">{{outboundData.applicationUsage }}</el-descriptions-item>
  22. <el-descriptions-item label="电话号码:" label-align="right" label-class-name="my-label">{{ outboundData.phoneNumber}}</el-descriptions-item>
  23. </el-descriptions>
  24. </el-col>
  25. <el-col :xl="10" :lg="10" :md="24" :sm="24" :xs="24" >
  26. <el-descriptions
  27. :column="1"
  28. border
  29. :size="size"
  30. v-if="outboundData"
  31. >
  32. <el-descriptions-item label="研究项目名称:" label-align="right" label-class-name="my-label">{{ outboundData.projectName}}</el-descriptions-item>
  33. <el-descriptions-item label="项目开始时间:" label-align="right" label-class-name="my-label">{{ outboundData.startTime }}</el-descriptions-item>
  34. <el-descriptions-item label="项目结束时间:" label-align="right" label-class-name="my-label">{{outboundData.endTime }}</el-descriptions-item>
  35. <el-descriptions-item label="出库备注信息:" label-align="right" label-class-name="my-label">{{ outboundData.outboundRemarks}}</el-descriptions-item>
  36. </el-descriptions>
  37. </el-col>
  38. <el-col :xl="2" :lg="2" :md="24" :sm="24" :xs="24" >
  39. <el-descriptions
  40. v-if="outboundData"
  41. direction="vertical"
  42. :size="size"
  43. border
  44. >
  45. <el-descriptions-item
  46. :width="200"
  47. label="申请附件"
  48. align="center"
  49. label-class-name="my-label"
  50. class-name="my-content"
  51. >
  52. <div class="demo-image__preview" v-if="outboundData" >
  53. </div>
  54. </el-descriptions-item>
  55. </el-descriptions>
  56. <!-- <div class="demo-image__preview" v-if="outboundData ">-->
  57. <!-- <el-image-->
  58. <!-- style=" align-items: center"-->
  59. <!-- :src="outboundData.attachments"-->
  60. <!-- :zoom-rate="1.2"-->
  61. <!-- :max-scale="7"-->
  62. <!-- :min-scale="0.2"-->
  63. <!-- :preview-src-list="outboundData.attachments"-->
  64. <!-- :initial-index="index"-->
  65. <!-- fit="cover"-->
  66. <!-- />-->
  67. <!-- </div>-->
  68. </el-col>
  69. </el-row>
  70. <!-- <div style="text-align: right; margin-top: 20px;margin-right: 30px">-->
  71. <!-- <el-button-->
  72. <!-- v-if="outboundData.status !== 1 && outboundData.status !== 2 && outboundData.status !== 3 && outboundData.status !== 4"-->
  73. <!-- link-->
  74. <!-- type="danger"-->
  75. <!-- plain-->
  76. <!-- @click="handleApproval(outboundData.id)"-->
  77. <!-- >-->
  78. <!-- 审批-->
  79. <!-- </el-button>-->
  80. <!-- </div>-->
  81. </el-card>
  82. </el-col>
  83. <el-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24" >
  84. <el-card>
  85. <template #header>
  86. <div class="card-header" style="text-align: center">
  87. <h1 class="text1">申请出库标本信息</h1>
  88. </div>
  89. </template>
  90. <el-table v-loading="loading" :data="outboundData.specimenInfoList" :stripe="true" :show-overflow-tooltip="true" >
  91. <!-- <el-table-column label="标本ID" align="center" prop="id" />-->
  92. <el-table-column label="标本编号" align="center" prop="specimenNumber" />
  93. <el-table-column label="中文名称" align="center" prop="chineseName" />
  94. <el-table-column label="标本类型" align="center" prop="specimenType">
  95. <template #default="scope">
  96. <dict-tag :type="DICT_TYPE.MUSEUMS_SPECIMEN_TYPE" :value="scope.row.specimenType" />
  97. </template>
  98. </el-table-column>
  99. <el-table-column label="标本数量" align="center" prop="specimenAmount" />
  100. <el-table-column label="标本重量" align="center" prop="weight" />
  101. <el-table-column label="标本位置" align="center" prop="storageLocation" />
  102. <el-table-column label="保存类型" align="center" prop="preservationType">
  103. <template #default="scope">
  104. <dict-tag :type="DICT_TYPE.MUSEUMS_SPECIMEN_INFO" :value="scope.row.preservationType" />
  105. </template>
  106. </el-table-column>
  107. <el-table-column label="标本图片" align="center" prop="url" >
  108. <template #default="{ row }">
  109. <div class="demo-image__preview" v-if="queryParams" >
  110. <block v-for="(image, index) in row.imagePath" :key="index">
  111. <el-image
  112. class="image-class"
  113. lazy
  114. :src="image"
  115. :preview-src-list="row.imagePath"
  116. preview-teleported
  117. fit="cover" />
  118. </block>
  119. </div>
  120. </template>
  121. </el-table-column>
  122. </el-table>
  123. <!-- 分页 -->
  124. <!-- <Pagination-->
  125. <!-- :total="total"-->
  126. <!-- v-model:page="queryParams.pageNo"-->
  127. <!-- v-model:limit="queryParams.pageSize"-->
  128. <!-- @pagination="getList"-->
  129. <!-- />-->
  130. <div v-if="outboundData.status === 0 || outboundData.status === 1 ">
  131. <el-button
  132. @click="handleApproval"
  133. type="primary"
  134. style="float: right; margin-left: 20px;margin-top: 20px;margin-bottom: 20px"
  135. > 审批
  136. </el-button>
  137. </div>
  138. </el-card>
  139. </el-col>
  140. </el-row>
  141. <Approval ref="ApprovalRef" @success="getList" />
  142. </el-skeleton>
  143. </template>
  144. <script setup lang="ts">
  145. import {type ComponentSize, ElCol, ElImage} from "element-plus";
  146. import {SpecimenOutboundApi, SpecimenOutboundVO} from "@/api/museums/specimenoutbound";
  147. import {formatDate} from "@/utils/formatTime";
  148. import {reactive, ref} from "vue";
  149. import {DICT_TYPE} from "@/utils/dict";
  150. import Approval from "@/views/museums/specimenoutbound/approval.vue"
  151. const size = ref<ComponentSize>('large')
  152. let outboundData = ref(null); // 初始化响应式数据
  153. const {query} = useRoute() // 查询参数
  154. const loading = ref(true) // 列表的加载中
  155. const list = ref<SpecimenOutboundVO[]>([]) // 列表的数据
  156. const total = ref(0) // 列表的总页数
  157. const queryParams = reactive({
  158. pageNo: 1,
  159. pageSize: 10,
  160. infoId: undefined,
  161. chineseName: undefined,
  162. specimenNumber: undefined,
  163. attachments: undefined,
  164. processInstanceId: undefined,
  165. specimenCondition: undefined,
  166. imagePath:undefined
  167. })
  168. /** 查询列表 */
  169. const getList = async () => {
  170. loading.value = true
  171. try {
  172. const data = await SpecimenOutboundApi.getSpecimenOutboundDetailsPage(queryParams)
  173. list.value = data.list
  174. total.value = data.total
  175. } finally {
  176. loading.value = false
  177. }
  178. }
  179. const fetchData = async () => {
  180. try {
  181. console.log(query.dataId)
  182. let res: any = await SpecimenOutboundApi.getSpecimenOutboundDetails(query.dataId)
  183. console.log(res)
  184. outboundData.value = res
  185. console.log(outboundData.value)
  186. } finally {
  187. }
  188. }
  189. // // 在组件加载时获取数据
  190. onMounted(async () => {
  191. await fetchData()
  192. await getList()
  193. })
  194. /** 审批按钮操作 */
  195. // 检查用户权限的方法
  196. const ApprovalRef = ref()
  197. const handleApproval = () => {
  198. ApprovalRef.value.open(query.dataId)
  199. }
  200. </script>
  201. <style scoped>
  202. :deep(.my-label) {
  203. background: #FAF8F7 !important;
  204. width: 180px;
  205. }
  206. :deep(.my-content) {
  207. height: 143px;
  208. }
  209. </style>