EquipmentDetail.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <template>
  2. <a-drawer
  3. :title="title"
  4. :width="width"
  5. placement="right"
  6. @close="close"
  7. destroyOnClose
  8. :visible="visible"
  9. class="equipment-detail-drawer"
  10. >
  11. <a-spin :spinning="confirmLoading" style="height: 100%;">
  12. <div class="u-flex-jab equipment-detail-container">
  13. <!-- 基础信息详情 -->
  14. <div class="base-info-container">
  15. <a-descriptions title="" layout="vertical" bordered size="middle" :column="2" class="equiment-info">
  16. <a-descriptions-item label="设备编号">
  17. {{detailData.equipmentcode}}
  18. </a-descriptions-item>
  19. <a-descriptions-item label="设备名称">
  20. {{detailData.equipmentname}}
  21. </a-descriptions-item>
  22. <a-descriptions-item label="设备分类">
  23. {{detailData.equipmenttreeid_dictText}}
  24. </a-descriptions-item>
  25. <a-descriptions-item label="规格型号">
  26. {{detailData.spec}}
  27. </a-descriptions-item>
  28. <a-descriptions-item label="安装地点" :span="2">
  29. {{detailData.address}}
  30. </a-descriptions-item>
  31. <a-descriptions-item label="区域">
  32. {{detailData.spaceid_dictText}}
  33. </a-descriptions-item>
  34. <a-descriptions-item label="周期">
  35. {{detailData.equipmentCycle}}
  36. </a-descriptions-item>
  37. <a-descriptions-item label="周期单位">
  38. {{detailData.cycleUnit_dictText}}
  39. </a-descriptions-item>
  40. <a-descriptions-item label="出厂编号">
  41. {{detailData.factoryNo}}
  42. </a-descriptions-item>
  43. <a-descriptions-item label="出厂日期">
  44. {{detailData.productDate}}
  45. </a-descriptions-item>
  46. <a-descriptions-item label="启用日期">
  47. {{detailData.activeDate}}
  48. </a-descriptions-item>
  49. <a-descriptions-item label="责任部门">
  50. {{detailData.responseDepartment_dictText}}
  51. </a-descriptions-item>
  52. <a-descriptions-item label="负责人">
  53. {{detailData.responsePerson_dictText}}
  54. </a-descriptions-item>
  55. <a-descriptions-item label="领用人">
  56. {{detailData.recipient_dictText}}
  57. </a-descriptions-item>
  58. <a-descriptions-item label="管理状态">
  59. {{detailData.manageStatus_dictText}}
  60. </a-descriptions-item>
  61. </a-descriptions>
  62. </div>
  63. <!-- 巡检详情 -->
  64. <a-tabs default-active-key="submission" @change="callback" class="equipment-cmms-tabs">
  65. <!-- <a-tab-pane key="repair" tab="维修记录">
  66. <eq-cmms-repair-log></eq-cmms-repair-log>
  67. </a-tab-pane> -->
  68. <a-tab-pane key="submission" tab="送检记录">
  69. <eq-cmms-submission-log :id="detailData.id"></eq-cmms-submission-log>
  70. </a-tab-pane>
  71. <!-- <a-tab-pane key="spotcheck" tab="点检记录" force-render>
  72. <eq-cmms-spotcheck-log></eq-cmms-spotcheck-log>
  73. </a-tab-pane> -->
  74. <a-tab-pane key="inspect" tab="巡检记录">
  75. <eq-cmms-inspect-log :id="detailData.id"></eq-cmms-inspect-log>
  76. </a-tab-pane>
  77. <a-tab-pane key="upkeep" tab="保养记录">
  78. <eq-cmms-upkeep-log :id="detailData.id"></eq-cmms-upkeep-log>
  79. </a-tab-pane>
  80. </a-tabs>
  81. </div>
  82. </a-spin>
  83. </a-drawer>
  84. </template>
  85. <script>
  86. import { httpAction, getAction } from '@/api/manage'
  87. import EqCmmsInspectLog from './EqCmmsInspectLog.vue'
  88. import EqCmmsRepairLog from './EqCmmsRepairLog.vue'
  89. import EqCmmsSubmissionLog from './EqCmmsSubmissionLog.vue'
  90. import EqCmmsSpotcheckLog from './EqCmmsSpotcheckLog.vue'
  91. import EqCmmsUpkeepLog from './EqCmmsUpkeepLog.vue'
  92. export default {
  93. components: {
  94. EqCmmsInspectLog,
  95. EqCmmsRepairLog,
  96. EqCmmsSubmissionLog,
  97. EqCmmsSpotcheckLog,
  98. EqCmmsUpkeepLog
  99. },
  100. name: 'RepairManageDetail',
  101. data () {
  102. return {
  103. title:"详情",
  104. width:'100%',
  105. visible: false,
  106. confirmLoading: false, // 加载中
  107. detailData: {}, // 详情
  108. logData: [], // 操作日志表格数据
  109. // 表头
  110. columns: [
  111. // {
  112. // title: '序号',
  113. // dataIndex: '',
  114. // key:'rowIndex',
  115. // width:60,
  116. // align:"center",
  117. // customRender:function (t,r,index) {
  118. // return parseInt(index)+1;
  119. // }
  120. // },
  121. {
  122. title:'节点名称',
  123. align:"center",
  124. dataIndex: 'nodename'
  125. },
  126. {
  127. title:'日期',
  128. align:"center",
  129. dataIndex: 'handledate'
  130. },
  131. {
  132. title:'处理意见',
  133. align:"center",
  134. dataIndex: 'opinion'
  135. },
  136. {
  137. title:'备注',
  138. align:"center",
  139. dataIndex: 'remark'
  140. },
  141. ],
  142. }
  143. },
  144. created(){
  145. },
  146. methods: {
  147. detail (record) {
  148. console.log(record)
  149. this.detailData = record
  150. this.visible = true
  151. this.title = record.equipmentname
  152. // this.title = record.repairname + ' 详情'
  153. // this.confirmLoading = true
  154. // getAction('/cmmsRepair/cmmsRepair/queryById',{id:record.id}).then((res)=>{
  155. // if(res.success){
  156. // this.detailData = res.result
  157. // this.logData = res.result.nodeList
  158. // }else{
  159. // this.$message.warning(res.message);
  160. // }
  161. // }).finally(() => {
  162. // this.confirmLoading = false;
  163. // })
  164. },
  165. close () {
  166. this.visible = false;
  167. },
  168. callback(key) {
  169. console.log(key);
  170. },
  171. }
  172. }
  173. </script>
  174. <style lang="less" scoped>
  175. @import '~@/assets/less/uStyle.less';
  176. </style>
  177. <style lang="less" scoped>
  178. .equipment-detail-drawer{
  179. height: 100vh;
  180. overflow: hidden;
  181. /deep/ .ant-drawer-body{
  182. height: calc(100vh - 55px);
  183. overflow: hidden;
  184. padding: 20px;
  185. background-color: #f5f5f5;
  186. }
  187. .base-info-container{
  188. width: calc(50% - 6px);
  189. height: calc(100vh - 55px - 40px);
  190. overflow: auto;
  191. background-color: #fff;
  192. padding: 12px;
  193. border-radius: 4px;
  194. margin-right: 6px;
  195. .equiment-info{
  196. }
  197. }
  198. .equipment-cmms-tabs{
  199. width: calc(50% - 6px);
  200. height: calc(100vh - 55px - 40px);
  201. background-color: #fff;
  202. padding: 12px;
  203. border-radius: 4px;
  204. margin-left: 6px;
  205. }
  206. .equipment-cmms-table{
  207. overflow: auto;
  208. }
  209. }
  210. </style>