黄陂项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

249 lines
8.9 KiB

2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
  1. <template>
  2. <div>
  3. <el-dialog class="lendDetail" title="借阅详情" :visible.sync="detailVisible">
  4. <span class="dialog-right-top" />
  5. <span class="dialog-left-bottom" />
  6. <div class="setting-dialog">
  7. <div class="dpflex">
  8. <p><span class="color-blue">单据号:</span><span class="color-white">{{ otherInfo.id }}</span></p>
  9. <p><span class="color-blue">借阅人:</span><span class="color-white">{{ borrowerInfo.borrowerName }}</span></p>
  10. <p><span class="color-blue">所属部门:</span><span class="color-white">{{ borrowerInfo.department }}</span></p>
  11. <!-- <p><span class="color-blue">证件类型:</span><span class="color-white">{{ borrowerInfo.cardType }}</span></p>
  12. <p><span class="color-blue">证件号码:</span><span class="color-white">{{ borrowerInfo.idcard }}</span></p>
  13. <p><span class="color-blue">电话号码:</span><span class="color-white">{{ borrowerInfo.phone }}</span></p> -->
  14. <p><span class="color-blue">借阅目的:</span><span class="color-white">{{ otherInfo.purpose }}</span></p>
  15. <p><span class="color-blue">借阅日期:</span><span class="color-white">{{ lendDatesInfo }}</span></p>
  16. <p><span class="color-blue">借阅状态:</span><span :class="borrowStyle(otherInfo.borrow_type)">{{ otherInfo.borrow_type | borrowStatus }}</span></p>
  17. <p><span class="color-blue">操作时间:</span><span class="color-white">{{ otherInfo.create_time | parseTime }}</span></p>
  18. </div>
  19. <el-table :data="tableData" max-height="400px" style="margin-top:15px;">
  20. <el-table-column type="index" label="序号" align="center" width="55" />
  21. <el-table-column prop="categoryName" label="门类名称" align="center" min-width="160" />
  22. <el-table-column prop="archiveNo" label="档号" align="center" width="160" show-overflow-tooltip />
  23. <el-table-column prop="maintitle" label="题名" align="center" width="180" show-overflow-tooltip />
  24. <el-table-column prop="caseName" label="盒名称" align="center" min-width="120" show-overflow-tooltip />
  25. <el-table-column prop="folderLocationDetails" label="存放位置" align="center" min-width="300">
  26. <template v-if="scope.row.folderLocationDetails !== null" slot-scope="scope">
  27. <div v-if="scope.row.folderLocationDetails.includes(',')">
  28. <el-tag
  29. v-for="(item,index) in scope.row.folderLocationDetails.split(',')"
  30. :key="index"
  31. :type="item"
  32. effect="dark"
  33. >
  34. {{ item }}
  35. </el-tag>
  36. </div>
  37. <div v-else>
  38. <el-tag effect="dark">{{ scope.row.folderLocationDetails }}</el-tag>
  39. </div>
  40. </template>
  41. </el-table-column>
  42. <el-table-column prop="borrowType" label="借阅状态" align="center" min-width="100">
  43. <template slot-scope="scope">
  44. <!-- 待借阅 / 逾期 have-lend / 待归还 / 已归还 has-return -->
  45. <span :class="borrowStyle(scope.row.borrowType)" style="width:76px">{{ scope.row.borrowType | borrowStatus }}</span>
  46. </template>
  47. </el-table-column>
  48. <!-- <el-table-column v-if="isReturn" prop="borrowType" align="center" label="开架操作" min-width="100">
  49. <template slot-scope="scope">
  50. <el-button v-if="scope.row.folderLocationDetails" size="mini" type="primary" @click="openCol(scope.row.folderLocationDetails)">开架</el-button>
  51. </template>
  52. </el-table-column> -->
  53. </el-table>
  54. </div>
  55. </el-dialog>
  56. <!-- 是否查看视频监控 -->
  57. <el-dialog title="提示" :visible.sync="videoTipVisible" :close-on-click-modal="false" :before-close="handleClose">
  58. <span class="dialog-right-top" />
  59. <span class="dialog-left-bottom" />
  60. <div class="setting-dialog">
  61. <div class="dialog-delt">
  62. <p><span>是否需要查看相关视频监控</span></p>
  63. </div>
  64. <div slot="footer" class="dialog-footer">
  65. <el-button type="primary" @click.native="handleLookVideo">确定</el-button>
  66. </div>
  67. </div>
  68. </el-dialog>
  69. <!-- 摄像头视频 -->
  70. <Video ref="camera" :dialog-open.sync="open" :camera-data="cameraData" />
  71. </div>
  72. </template>
  73. <script>
  74. import { FetchInitBillDetails } from '@/api/archivesManage/lendManage'
  75. import CallExternal from '@/api/storeManage/deviceManage/device'
  76. import { lendingCrud } from '../mixins/lending'
  77. import { parseTime } from '@/utils/index.js'
  78. import Video from './video'
  79. import displayConfigApi from '@/api/storeManage/displayConfig'
  80. export default {
  81. name: 'ArchiveDetail',
  82. components: { Video },
  83. mixins: [lendingCrud],
  84. props: {
  85. isReturn: {
  86. type: Boolean,
  87. default: false
  88. }
  89. },
  90. data() {
  91. return {
  92. detailVisible: false,
  93. rowData: {},
  94. borrowerInfo: {},
  95. otherInfo: {},
  96. tableData: [],
  97. lendDatesInfo: null,
  98. deviceData: null,
  99. videoTipVisible: false,
  100. camConfigData: [],
  101. cameraData: [],
  102. open: false
  103. }
  104. },
  105. created() {
  106. displayConfigApi.list({ storeroomId: 'D6490DA3D4261E8C26D0E3' }).then((data) => {
  107. if (data) {
  108. this.camConfigData = data
  109. }
  110. })
  111. },
  112. methods: {
  113. getBillDetails() {
  114. const params = {
  115. 'orderNo': this.rowData.orderNo
  116. }
  117. FetchInitBillDetails(params).then(data => {
  118. this.otherInfo = data
  119. this.borrowerInfo = data.borrower
  120. this.tableData = data.borrowArchives
  121. this.lendDatesInfo = parseTime(data.borrow_start, '{y}-{m}-{d}') + ' 至 ' + parseTime(data.borrow_end, '{y}-{m}-{d}')
  122. this.getDeviceListAll()
  123. })
  124. },
  125. // 获取密集架相关信息
  126. getDeviceListAll() {
  127. const params = {
  128. sort: 'sequence,asc',
  129. storeroomId: 'D6490DA3D4261E8C26D0E3'
  130. }
  131. CallExternal.getDeviceList(params).then(data => {
  132. data.content.map(item => {
  133. if (item.deviceTypeId.name === '密集架') { // 写死状态
  134. this.deviceData = item
  135. }
  136. })
  137. })
  138. },
  139. // 开架
  140. openCol(data) {
  141. const loactionArray = data.split(' ')
  142. const location = data.split(' ')[loactionArray.length - 1]
  143. const pattern = /(\d+)区(\d+)列(\d+)节(\d+)层/
  144. const matches = location.match(pattern)
  145. let areaNumber
  146. let colNumber
  147. let leNumber
  148. let divNumber
  149. let zyNumber
  150. if (matches !== null) {
  151. areaNumber = matches[1]
  152. colNumber = matches[2]
  153. leNumber = matches[3]
  154. divNumber = matches[4]
  155. }
  156. const last_char = location.length - 1
  157. if (location[last_char] === '右') {
  158. zyNumber = '2'
  159. } else {
  160. zyNumber = '1'
  161. }
  162. const params = {
  163. deviceId: this.deviceData.id,
  164. quNo: areaNumber, // 区
  165. colNo: colNumber, // 列
  166. leNo: leNumber, // 节
  167. divNo: divNumber, // 层
  168. zyNo: zyNumber // 左右 1左 2右
  169. }
  170. CallExternal.FetchCallExternalOpenCol(params).then(res => {
  171. if (res.success && res.success === '0') {
  172. this.$message.success('开架执行成功')
  173. this.videoTipVisible = true
  174. } else {
  175. this.$message.error(res.msg)
  176. }
  177. }).catch((error) => {
  178. console.log(error)
  179. this.$message.error('连接失败')
  180. })
  181. },
  182. handleLookVideo() {
  183. this.videoTipVisible = false
  184. this.cameraData = this.camConfigData.filter((item) => { return item.divPosition.toLowerCase().includes('cam') })
  185. this.open = true
  186. this.$nextTick(() => {
  187. this.$refs.camera.camConfig = this.cameraData[0]
  188. this.$refs.camera.videoIndex = 0
  189. this.$refs.camera.play()
  190. })
  191. },
  192. handleClose(done) {
  193. this.videoTipVisible = false
  194. done()
  195. }
  196. }
  197. }
  198. </script>
  199. <style lang="scss" scoped>
  200. @import '~@/assets/styles/lend-manage.scss';
  201. .lendDetail{
  202. ::v-deep .el-dialog{
  203. width: 1200px;
  204. }
  205. ::v-deep .el-dialog .el-dialog__header .el-dialog__close::before{
  206. position: absolute;
  207. right: -280px;
  208. bottom: -10px;
  209. }
  210. ::v-deep .el-dialog__body{
  211. padding: 20px 0 60px 0;
  212. }
  213. }
  214. .dpflex{
  215. display: flex;
  216. flex-wrap: wrap;
  217. padding: 0 30px;
  218. p{
  219. display: flex;
  220. align-items: center;
  221. width: 33%;
  222. height: 40px;
  223. line-height: 40px;
  224. span{
  225. display: block;
  226. line-height: 40px;
  227. &.color-blue{
  228. color: #3A99FD;
  229. width: 70px;
  230. text-align: right;
  231. }
  232. &.color-white{
  233. color: white;
  234. padding: 0 0 0 20px;
  235. }
  236. &.cell-lend{
  237. margin-left: 20px;
  238. width: 76px;
  239. line-height: 24px;
  240. }
  241. }
  242. }
  243. }
  244. </style>