Detail.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726
  1. <template>
  2. <a-card v-show="visibleDetail" :title="modalTitle">
  3. <div v-show="visible">
  4. <div style="padding: 20px;">
  5. <a-row :gutter="48" slot="extra">
  6. <a-col :md="48" :sm="48">
  7. <span style="float: left">
  8. <a-badge :count="numChildSbInfo" title="子设备总数" :number-style="{ backgroundColor: '#52c41a' }">
  9. <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="handleViewChildSbInfo()">子设备</a-button>
  10. </a-badge>
  11. <a-badge :count="numPartInfo" title="部位总数" :number-style="{ backgroundColor: '#52c41a' }">
  12. <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="partInfoListView()">设备部位</a-button>
  13. </a-badge>
  14. <a-badge :count="numLocation" title="位号总数" :number-style="{ backgroundColor: '#52c41a' }">
  15. <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="locationListView()">设备位号</a-button>
  16. </a-badge>
  17. <a-badge :count="numModelbom" title="备件总数" :number-style="{ backgroundColor: '#52c41a' }">
  18. <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="handleViewBom()">备件BOM</a-button>
  19. </a-badge>
  20. <a-badge :count="numCheckStandard1" title="点检标准" :number-style="{ backgroundColor: '#52c41a' }">
  21. <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="handleViewCheck2(1)">点检标准</a-button>
  22. </a-badge>
  23. <a-badge :count="numCheckjob1" title="点检任务" :number-style="{ backgroundColor: '#52c41a' }">
  24. <a-button style="margin-left: 20px" type="default" @click="handleViewCheckJob2(1)">点检任务</a-button>
  25. </a-badge>
  26. <!-- <a-badge :count="numCheckStandard2" title="保养标准" :number-style="{ backgroundColor: '#52c41a' }">
  27. <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="handleViewCheck(2)">保养标准</a-button>
  28. </a-badge>
  29. <a-badge :count="numCheckjob2" title="保养任务" :number-style="{ backgroundColor: '#52c41a' }">
  30. <a-button style="margin-left: 20px" type="default" @click="handleViewCheckJob(2)">保养任务</a-button>
  31. </a-badge>
  32. <a-badge :count="numCheckStandard3" title="润滑标准" :number-style="{ backgroundColor: '#52c41a' }">
  33. <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="handleViewCheck3(3)">润滑标准</a-button>
  34. </a-badge>
  35. <a-badge :count="numCheckjob3" title="润滑任务" :number-style="{ backgroundColor: '#52c41a' }">
  36. <a-button style="margin-left: 20px" type="default" @click="handleViewCheckJob3(3)">润滑任务</a-button>
  37. </a-badge>-->
  38. <a-button v-show="model.useType==4" style="margin-left: 20px" type="default" @click="handleMeasure()">检定记录</a-button>
  39. <!-- <a-button style="margin-left: 20px" type="default" @click="handleViewTree()">设备树</a-button>
  40. <a-button style="margin-left: 20px" type="error" @click="handleTuiCalendar(1)">保养日历</a-button>
  41. <a-button style="margin-left: 20px" type="default" @click="handleRepairReportSbInfo()">工单分析</a-button>
  42. <a-button style="margin-left: 20px" type="default" @click="handleRepairReportSbInfoFee()">费用分析</a-button> -->
  43. <a-button style="margin-left: 20px" type="default" @click="handleEdit()">修改</a-button>
  44. <a-button style="margin-left: 8px" type="default" :loading="confirmLoading" @click="handleOk()">刷新</a-button>
  45. <a-button style="margin-left: 20px" type="primary" @click="handleCancel()">返回</a-button>
  46. </span>
  47. </a-col>
  48. </a-row>
  49. </div>
  50. <a-layout>
  51. <a-layout-sider :width="335">
  52. <img-code
  53. style="border: 1px dashed #ccc"
  54. :src="model.qrCode"
  55. title="点击重新生成二维码"
  56. :code-id="model.id"
  57. :width="297"
  58. :height="297"></img-code>
  59. <a-divider style="background: #D6D6D6" />
  60. <a-row type="flex" justify="space-between" :gutter="[16,16]">
  61. <a-col :span="10">
  62. <a-button shape="round" @click="changeLogs()" block>
  63. 修改记录
  64. </a-button>
  65. </a-col>
  66. <a-col :span="10">
  67. <a-button shape="round" @click="handleRouter(1)" block>
  68. 配件记录
  69. </a-button>
  70. </a-col>
  71. <a-col :span="10">
  72. <a-button shape="round" @click="handleRouter(2)" block>
  73. 保养记录
  74. </a-button>
  75. </a-col>
  76. <a-col :span="10">
  77. <a-button shape="round" @click="handleRouter(3)" block>
  78. 历史故障
  79. </a-button>
  80. </a-col>
  81. <a-col :span="10">
  82. <a-button shape="round" @click="handleRouter(4)" block>
  83. 历史费用
  84. </a-button>
  85. </a-col>
  86. <a-col :span="10">
  87. <a-button shape="round" @click="handleRouter(5)" block>
  88. 状态变更记录
  89. </a-button>
  90. </a-col>
  91. <a-col :span="10">
  92. <a-button shape="round" @click="handleRouter(6)" block>
  93. 停机记录
  94. </a-button>
  95. </a-col>
  96. <a-col :span="10">
  97. <a-button shape="round" @click="handleRouter(7)" block>
  98. 遥测点位
  99. </a-button>
  100. </a-col>
  101. <a-col :span="10">
  102. <a-button shape="round" @click="handleViewTree()" block>设备树</a-button>
  103. </a-col>
  104. <a-col :span="10">
  105. <a-button shape="round" @click="handleTuiCalendar(1)" block>
  106. 检点日历
  107. </a-button>
  108. </a-col>
  109. <!-- <a-col :span="10">
  110. <a-button shape="round" @click="handleTuiCalendar(2)" block>
  111. 保养日历
  112. </a-button>
  113. </a-col>
  114. <a-col :span="10">
  115. <a-button shape="round" @click="handleTuiCalendar(3)" block>
  116. 润滑日历
  117. </a-button>
  118. </a-col>-->
  119. <a-col :span="10">
  120. <a-button shape="round" @click="handleRepairReportSbInfo()" block>
  121. 工单分析
  122. </a-button>
  123. </a-col>
  124. <a-col :span="10">
  125. <a-button shape="round" @click="handleRepairReportSbInfoFee()" block>
  126. 费用分析
  127. </a-button>
  128. </a-col>
  129. </a-row>
  130. </a-layout-sider>
  131. <a-layout-content :style="{ background: '#fff',padding: '20px'}">
  132. <a-card >
  133. <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>基本信息</b></div>
  134. <a-descriptions bordered :column="3">
  135. <a-descriptions-item label="设备编号">
  136. {{ model.no }}
  137. </a-descriptions-item>
  138. <a-descriptions-item label="资产编号">{{ model.financingNo }}</a-descriptions-item>
  139. <a-descriptions-item label="设备位号">
  140. {{ model.positionNo }}
  141. </a-descriptions-item>
  142. <a-descriptions-item label="设备描述">
  143. {{ model.name }}
  144. </a-descriptions-item>
  145. <a-descriptions-item label="规格型号">
  146. {{ model.model }}
  147. </a-descriptions-item>
  148. <a-descriptions-item label="ABC 标识" >
  149. {{ BaseTool.Object.getField(levelMap,model.level) }}
  150. </a-descriptions-item>
  151. <a-descriptions-item label="设备类型">
  152. {{ model.typeName }}
  153. </a-descriptions-item>
  154. <a-descriptions-item label="自定义类型">
  155. {{ BaseTool.Object.getField(useTypeMap,model.useType) }}
  156. </a-descriptions-item>
  157. <a-descriptions-item label="生产商">
  158. {{ model.producerName }}
  159. </a-descriptions-item>
  160. <a-descriptions-item label="大小尺寸">
  161. {{ model.zz }}
  162. </a-descriptions-item>
  163. <a-descriptions-item label="出厂编号">{{ model.zzh }}</a-descriptions-item>
  164. <a-descriptions-item label="使用位置">{{ model.cph }}</a-descriptions-item>
  165. <a-descriptions-item label="设备位置">{{ model.positionName }}</a-descriptions-item>
  166. <a-descriptions-item label="使用寿命">{{ model.workYear }}</a-descriptions-item>
  167. <a-descriptions-item label="是否显示">{{ model.isShow?'显示':'不显示' }}</a-descriptions-item>
  168. <a-descriptions-item v-if="model.isChild == 1" label="是否子设备">子设备</a-descriptions-item>
  169. <a-descriptions-item v-else-if="model.isChild == 2" label="是否子设备">父设备</a-descriptions-item>
  170. <a-descriptions-item v-else-if="model.isChild == 3" label="是否子设备">独立设备</a-descriptions-item>
  171. <a-descriptions-item label="状态"><badge :status="DictCache.COLOR.SB_INFO_STATUS[model.status]" :text="statusMap[model.status]"></badge></a-descriptions-item>
  172. <a-descriptions-item label="关联维修部门">{{ BaseTool.Object.getField(repairDeptMap,model.repairDeptId) }}</a-descriptions-item>
  173. <a-descriptions-item label="备注">{{ model.remark }}</a-descriptions-item>
  174. </a-descriptions>
  175. </a-card>
  176. <br>
  177. <a-card >
  178. <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>自定义参数</b></div>
  179. <a-descriptions bordered :column="3">
  180. <a-descriptions-item v-for="item in paramList" :key="item.name" :label="item.name">{{ item.content }}</a-descriptions-item>
  181. </a-descriptions>
  182. </a-card>
  183. <br>
  184. <!-- <a-card >
  185. <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>资产编号</b></div>
  186. <a-descriptions bordered :column="3">
  187. <a-descriptions-item label="资产编号1">{{ model.financingNo }}</a-descriptions-item>
  188. <a-descriptions-item label="资产编号2">{{ model.financingNoTwo }}</a-descriptions-item>
  189. <a-descriptions-item label="资产编号3">{{ model.financingNoThird }}</a-descriptions-item>
  190. <a-descriptions-item label="资产编号4">{{ model.financingNoFour }}</a-descriptions-item>
  191. <a-descriptions-item label="资产编号5">{{ model.financingNoFive }}</a-descriptions-item>
  192. </a-descriptions>
  193. </a-card>
  194. <br>-->
  195. <a-card >
  196. <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>人员信息</b></div>
  197. <a-descriptions bordered :column="3">
  198. <a-descriptions-item label="使用人">{{ model.saveUserName }}</a-descriptions-item>
  199. <a-descriptions-item label="第一维修人">{{ model.repairUserName }}</a-descriptions-item>
  200. <a-descriptions-item label="第二维修人">{{ model.repairUserNameSecond }}</a-descriptions-item>
  201. <a-descriptions-item label="购置日期">{{ model.buyDate }}</a-descriptions-item>
  202. <a-descriptions-item label="投用日期">{{ model.startDate }}</a-descriptions-item>
  203. </a-descriptions>
  204. </a-card>
  205. <br>
  206. <a-card v-show="model.useType == 5">
  207. <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>特种信息</b></div>
  208. <a-descriptions bordered :column="3">
  209. <a-descriptions-item label="注册代码">{{ model.registerNo }}</a-descriptions-item>
  210. <a-descriptions-item label="介质属性">{{ model.characterType }}</a-descriptions-item>
  211. <a-descriptions-item label="使用登记证编号">{{ model.usedNo }}</a-descriptions-item>
  212. <a-descriptions-item label="维护供应商">{{ model.supplier }}</a-descriptions-item>
  213. <a-descriptions-item label="设备批号">{{ model.batchNo }}</a-descriptions-item>
  214. <a-descriptions-item label="设计到期年限">{{ model.retirementDate }}</a-descriptions-item>
  215. <a-descriptions-item label="登记日期">{{ model.registerDate }}</a-descriptions-item>
  216. </a-descriptions>
  217. </a-card>
  218. <br v-show="model.useType == 5">
  219. <a-card v-show="model.useType == 4" >
  220. <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>计量信息</b></div>
  221. <a-descriptions bordered :column="3">
  222. <a-descriptions-item label="计量设备编号">{{ model.cardNo }}</a-descriptions-item>
  223. <a-descriptions-item label="准确度等级">{{ model.fdjxh }}</a-descriptions-item>
  224. <a-descriptions-item label="检定日期">{{ model.checkDate }}</a-descriptions-item>
  225. <a-descriptions-item label="检定周期">{{ model.checkPeriod }}</a-descriptions-item>
  226. <a-descriptions-item label="检定有效期">{{ model.nextCheckDate }}</a-descriptions-item>
  227. <a-descriptions-item label="检定单位">{{ model.dph }}</a-descriptions-item>
  228. <a-descriptions-item label="检定人">{{ model.zaiz }}</a-descriptions-item>
  229. <a-descriptions-item label="检定结论">{{ BaseTool.Object.getField(rlTypeMap,model.rlType) }}</a-descriptions-item>
  230. <a-descriptions-item label="是否周检查">{{ BaseTool.Object.getField(colorMap,model.color) }}</a-descriptions-item>
  231. <a-descriptions-item label="检定证书编号">{{ model.sbdh }}</a-descriptions-item>
  232. <a-descriptions-item label="预警天数">{{ model.seatNumber }}</a-descriptions-item>
  233. <a-descriptions-item label="是否需要检定">{{ BaseTool.Object.getField(yesNoMap,model.isMeasure) }}</a-descriptions-item>
  234. </a-descriptions>
  235. </a-card>
  236. <br v-show="model.useType == 4">
  237. <a-card >
  238. <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>文件信息</b></div>
  239. <a-descriptions bordered :column="3">
  240. <a-descriptions-item label="维保手册">
  241. <a-upload
  242. :multiple="true"
  243. :fileList="BaseTool.UPLOAD.transImg(model.repairFileList)"
  244. >
  245. </a-upload>
  246. </a-descriptions-item>
  247. <a-descriptions-item label="使用手册">
  248. <a-upload
  249. :multiple="true"
  250. :fileList="BaseTool.UPLOAD.transImg(model.useFileList)"
  251. >
  252. </a-upload>
  253. </a-descriptions-item>
  254. <a-descriptions-item label="验收文件">
  255. <a-upload
  256. :multiple="true"
  257. :fileList="BaseTool.UPLOAD.transImg(model.recheckFileList)"
  258. >
  259. </a-upload>
  260. </a-descriptions-item>
  261. </a-descriptions>
  262. </a-card>
  263. <br>
  264. <a-card>
  265. <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>图片信息</b></div>
  266. <br>
  267. <a-row v-if="model.sbFileList != null && model.sbFileList.length > 0" type="flex" justify="space-between" :gutter="[16,16]">
  268. <a-col >
  269. <img v-for="item in model.sbFileList" :src="item.url" :key="item.id" class="image">
  270. </a-col>
  271. </a-row>
  272. <div v-if="model.sbFileList == null || model.sbFileList.length === 0"> 暂无</div>
  273. </a-card>
  274. </a-layout-content>
  275. </a-layout>
  276. </div>
  277. <base-form ref="baseModal" @ok="handleOk"/>
  278. <change-logs-detail ref="changeLogsDetail" @ok="handleOk" />
  279. <detail-sb-bom ref="detailSbBomModal" @ok="handleOk"/>
  280. <detail-sb-check ref="detailSbCheckModal" @ok="handleOk"/>
  281. <detail-sb-check-job ref="detailSbCheckJobModal" @ok="handleOk"/>
  282. <detail-sb-measure ref="detailSbMeasureModal" @ok="handleOk"/>
  283. <detail-sb-info ref="detailSbInfoModal" @ok="handleOk"/>
  284. <part-info-list ref="partInfoList" />
  285. <repair-report-sb-info ref="repairReportSbInfo" :sb-id="model.id" @ok="handleOk"/>
  286. <repair-report-sb-info-fee ref="repairReportSbInfoFee" :sb-id="model.id" @ok="handleOk"/>
  287. </a-card>
  288. </template>
  289. <script>
  290. import BaseForm from './BaseForm'
  291. import ChangeLogsDetail from './ChangeLogsDetail'
  292. import DetailList from '@/components/tools/DetailList'
  293. import RepairApplicationFormTable from '@/views/repair/application-form/modules/RepairApplicationFormTable'
  294. import CheckJobTable from '@/views/check/checkjob/modules/CheckJobTable'
  295. import SbStatusLogTable from '@/views/sb/status-log/modules/SbStatusLogTable'
  296. import SbStopLogTable from '@/views/sb/stop-logs/modules/SbStopLogTable'
  297. import { fetchFirmProducer } from '@/api/firm/producer'
  298. import { queryNumCheckStandard } from '@/api/check/checkstandard'
  299. import { queryNumCheckjob, queryTuiCalendarIgnores } from '@/api/check/checkjob'
  300. import { queryNumRepairReason } from '@/api/repair/repair-reason'
  301. import { queryNumPartInfo } from '@/api/part/info'
  302. import { queryNumSbLocation } from '@/api/sb/location'
  303. import { queryNumModelbom } from '@/api/sb/modelbom'
  304. import { fetchSbInfo, queryChildNumSbInfo } from '@/api/sb/info'
  305. import SparePartUsedSelectTable from '@/views/sqarepartmanage/sparepartused/modules/SparePartUsedSelectTable'
  306. // import SbOilPageTable from '@/views/sb/oil/modules/SbOilPageTable'
  307. import SbRunFillPageTable from '@/views/sb/run-fill/modules/SbRunFillPageTable'
  308. import SbInspectionFillPageTable from '@/views/sb/inspection-fill/modules/SbInspectionFillPageTable'
  309. import DetailSbBom from '@/views/sb/modelbom/modules/DetailSbBom'
  310. import DetailSbCheck from '@/views/check/checkstandard/modules/DetailSbCheck'
  311. import DetailSbCheckJob from '@/views/check/checkjob/modules/DetailSbCheckJob'
  312. import DetailSbMeasure from '@/views/sb/measurelog/modules/DetailSbCheck'
  313. import DetailSbInfo from '@/views/sb/info/modules/DetailSbInfo'
  314. import RepairFeeTable from '@/views/repair/fee/modules/RepairFeeTable'
  315. import RepairReportSbInfo from '@/views/dashboard/RepairReportSbInfo'
  316. import RepairReportSbInfoFee from '@/views/dashboard/RepairReportSbInfoFee'
  317. import PartInfoList from '@/views/part/info/modules/PartInfoList'
  318. const DetailListItem = DetailList.Item
  319. export default {
  320. name: 'SbInfoDetail',
  321. components: {
  322. BaseForm,
  323. ChangeLogsDetail,
  324. DetailList,
  325. DetailListItem,
  326. RepairApplicationFormTable,
  327. CheckJobTable,
  328. SparePartUsedSelectTable,
  329. // SbOilPageTable,
  330. SbRunFillPageTable,
  331. SbInspectionFillPageTable,
  332. DetailSbBom,
  333. DetailSbCheck,
  334. DetailSbCheckJob,
  335. PartInfoList,
  336. DetailSbMeasure,
  337. DetailSbInfo,
  338. RepairFeeTable,
  339. SbStatusLogTable,
  340. SbStopLogTable,
  341. RepairReportSbInfo,
  342. RepairReportSbInfoFee
  343. },
  344. data () {
  345. return {
  346. confirmLoading: false,
  347. mdl: {},
  348. modalTitle: null,
  349. paramList: [],
  350. visible: false,
  351. visibleDetail: false,
  352. activeKey: '3',
  353. isChildMap: {},
  354. yesNoMap: {},
  355. isShowMap: {},
  356. collapseActiveKey: '1',
  357. model: {
  358. 'no': null,
  359. 'positionNo': null,
  360. 'financingNo': null,
  361. 'financingNoTwo': null,
  362. 'financingNoThird': null,
  363. 'financingNoFour': null,
  364. 'financingNoFive': null,
  365. 'name': null,
  366. 'modelId': null,
  367. 'typeId': null,
  368. 'isShow': null,
  369. 'isChild': null,
  370. 'isMeasure': null,
  371. 'paramList': null,
  372. 'parentId': null,
  373. 'level': null,
  374. 'useType': null,
  375. 'rate': null,
  376. 'month': null,
  377. 'usedMonth': null,
  378. 'initialValue': null,
  379. 'currentValue': null,
  380. 'cutValue': null,
  381. 'producerId': null,
  382. // 'sourceType': null,
  383. // 'sourceSbId': null,
  384. // 'parentId': null,
  385. 'unit': null,
  386. // 'position': null,
  387. // 'guigeId': null,
  388. 'useCompanyName': null,
  389. 'useProjectName': null,
  390. 'useDeptName': null,
  391. 'useGroupName': null,
  392. 'useUserName': null,
  393. 'saveDeptName': null,
  394. 'saveUserName': null,
  395. 'repairUserName': null,
  396. 'repairUserNameSecond': null,
  397. 'totalMiles': null,
  398. 'totalHours': null,
  399. // 'lastBaoyangTime': null,
  400. // 'lastBaoyangMiles': null,
  401. // 'lastBaoyangHours': null,
  402. // 'baoyangTimes': null,
  403. 'buyDate': null,
  404. 'startDate': null,
  405. // 'nextCheckDate': null,
  406. // 'guaranteeDate': null,
  407. // 'workYear': null,
  408. // 'retirementDate': null,
  409. // 'depreciationType': null,
  410. 'wbFile': null,
  411. 'useFile': null,
  412. 'checkFile': null,
  413. 'sbImage': null,
  414. 'sbFileList': null,
  415. 'qrCode': null,
  416. 'status': null,
  417. 'remark': null,
  418. 'parentName': null,
  419. 'createdUserName': null,
  420. 'typeName': null,
  421. 'producerName': null,
  422. 'zzh': null,
  423. 'fdjxh': null,
  424. 'fdjh': null,
  425. 'cph': null,
  426. 'positionId': null,
  427. 'positionName': null,
  428. 'dph': null,
  429. 'zz': null,
  430. 'rlType': null,
  431. 'color': null,
  432. 'seatNumber': null,
  433. 'registerNo': null,
  434. 'characterType': null,
  435. 'usedNo': null,
  436. 'supplier': null,
  437. 'repairUserSecond': null,
  438. 'batchNo': null,
  439. 'workYear': null,
  440. 'retirementDate': null,
  441. 'registerDate': null,
  442. 'repairDeptId': null
  443. },
  444. numCheckStandard1: 0,
  445. numCheckjob1: 0,
  446. numCheckStandard2: 0,
  447. numCheckjob2: 0,
  448. numCheckStandard3: 0,
  449. numCheckjob3: 0,
  450. numRepairReason: 0,
  451. numModelbom: 0,
  452. numPartInfo: 0,
  453. numLocation: 0,
  454. numChildSbInfo: 0,
  455. firmProducerLevelMap: {},
  456. firmSupplier: {},
  457. firmProducer: {},
  458. statusMap: {},
  459. useTypeMap: {},
  460. levelMap: {},
  461. unitMap: {},
  462. colorMap: {},
  463. rlTypeMap: {},
  464. sourceTypeMap: {},
  465. repairDeptMap: {}
  466. }
  467. },
  468. created () {
  469. this.depreciationTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_DEPRECIATIONTYPE)
  470. this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_LEVEL)
  471. this.firmProducerLevelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.FIRM_PRODUCER_LEVEL)
  472. this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_INFO_STATUS)
  473. this.unitMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_UNIT)
  474. this.colorMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_COLOR)
  475. this.rlTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.RANLIAO_TYPE)
  476. this.sourceTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBTYPE_SOURCETYPE)
  477. this.useTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_USE_TYPE)
  478. this.isChildMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_IS_CHILD)
  479. this.isShowMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_IS_SHOW)
  480. this.yesNoMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
  481. this.repairDeptMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_DEPT_CATEGORY)
  482. },
  483. computed: {
  484. },
  485. methods: {
  486. inited (viewer) {
  487. this.$viewer = viewer
  488. },
  489. handleViewTree () {
  490. const routeUrl = this.$router.resolve({ path: '/tree', query: { id: this.model.id } })
  491. // let routeUrl = this.$router.resolve(`/share/${96}`)
  492. window.open(routeUrl.href, '_blank')
  493. },
  494. handleViewBom (record) {
  495. const routeUrl = this.$router.resolve({ path: '/sb/modelbom', query: { id: this.model.id } })
  496. window.open(routeUrl.href, '_blank')
  497. },
  498. handleViewChildSbInfo () {
  499. // this.visible = false
  500. // const modal = this.$refs.detailSbInfoModal
  501. console.log(this.model)
  502. // modal.base(this.model)
  503. const routeUrl = this.$router.resolve({ path: '/sb/info/company', query: { parentId: this.model.id, parentName: this.model.name } })
  504. // let routeUrl = this.$router.resolve(`/share/${96}`)
  505. window.open(routeUrl.href, '_blank')
  506. },
  507. handleViewCheck (type) {
  508. const routeUrl = this.$router.resolve({ path: '/check/polling-standard', query: { id: this.model.id, checkType: type, sbNo: this.model.no } })
  509. // let routeUrl = this.$router.resolve(`/share/${96}`)
  510. window.open(routeUrl.href, '_blank')
  511. },
  512. handleViewCheck2 (type) {
  513. const routeUrl = this.$router.resolve({ path: '/check/spot-standard', query: { id: this.model.id, checkType: type, sbNo: this.model.no } })
  514. // let routeUrl = this.$router.resolve(`/share/${96}`)
  515. window.open(routeUrl.href, '_blank')
  516. },
  517. handleViewCheck3 (type) {
  518. const routeUrl = this.$router.resolve({ path: '/check-run-standard', query: { id: this.model.id, checkType: type, sbNo: this.model.no } })
  519. // let routeUrl = this.$router.resolve(`/share/${96}`)
  520. window.open(routeUrl.href, '_blank')
  521. },
  522. handleViewCheckJob (type) {
  523. const routeUrl = this.$router.resolve({ path: '/check/polling-job', query: { id: this.model.id, checkType: type } })
  524. window.open(routeUrl.href, '_blank')
  525. },
  526. handleViewCheckJob2 (type) {
  527. const routeUrl = this.$router.resolve({ path: '/check/spot-job', query: { id: this.model.id, checkType: type } })
  528. window.open(routeUrl.href, '_blank')
  529. },
  530. handleViewCheckJob3 (type) {
  531. const routeUrl = this.$router.resolve({ path: '/check-run-job', query: { id: this.model.id, checkType: type } })
  532. window.open(routeUrl.href, '_blank')
  533. },
  534. changeLogs () {
  535. // this.visible = false
  536. const modal = this.$refs.changeLogsDetail
  537. modal.base(this.model)
  538. },
  539. // 根据keyNum路由相关页面
  540. handleRouter (keyNum) {
  541. const id = this.model.id
  542. var routeUrl = ''
  543. if (keyNum === 1) {
  544. routeUrl = this.$router.resolve({ path: '/spare/used/record', query: { id: id } })
  545. }
  546. if (keyNum === 2) {
  547. routeUrl = this.$router.resolve({ path: '/check/polling-job/finish', query: { id: id } })
  548. }
  549. if (keyNum === 3) {
  550. routeUrl = this.$router.resolve({ path: '/repair/form', query: { sbId: id } })
  551. }
  552. if (keyNum === 4) {
  553. routeUrl = this.$router.resolve({ path: '/repair/fee', query: { sbId: id } })
  554. }
  555. if (keyNum === 5) {
  556. routeUrl = this.$router.resolve({ path: '/status/log', query: { id: id } })
  557. }
  558. if (keyNum === 6) {
  559. routeUrl = this.$router.resolve({ path: '/stop/log', query: { id: id } })
  560. }
  561. if (keyNum === 7) {
  562. routeUrl = this.$router.resolve({ path: '/remote/measure', query: { sbId: id, sbName: this.model.name } })
  563. }
  564. window.open(routeUrl.href, '_blank')
  565. },
  566. handleMeasure (record) {
  567. this.visible = false
  568. const modal = this.$refs.detailSbMeasureModal
  569. modal.base(this.model)
  570. },
  571. handleRepairReportSbInfo () {
  572. this.visible = false
  573. const modal = this.$refs.repairReportSbInfo
  574. modal.base()
  575. },
  576. handleRepairReportSbInfoFee () {
  577. this.visible = false
  578. const modal = this.$refs.repairReportSbInfoFee
  579. modal.base()
  580. },
  581. base (record) {
  582. this.visible = true
  583. this.visibleDetail = true
  584. this.modalTitle = '详情'
  585. this.model = record
  586. this.activeKey = '1'
  587. this.collapseActiveKey = '0'
  588. this.paramList = JSON.parse(record.paramList)
  589. this.fetchNum()
  590. fetchFirmProducer({ id: this.model.producerId }).then(res => {
  591. this.firmProducer = res.data
  592. })
  593. },
  594. fetchNum () {
  595. Promise.all([
  596. queryNumPartInfo({ sbId: this.model.id }),
  597. queryNumModelbom({ sbId: this.model.id }),
  598. queryNumRepairReason({ sbId: this.model.id }),
  599. queryNumCheckStandard({ sbId: this.model.id, type: 1 }),
  600. queryNumCheckStandard({ sbId: this.model.id, type: 2 }),
  601. queryNumCheckStandard({ sbId: this.model.id, type: 3 }),
  602. queryNumCheckjob({ sbId: this.model.id, type: 1 }),
  603. queryNumCheckjob({ sbId: this.model.id, type: 2 }),
  604. queryNumCheckjob({ sbId: this.model.id, type: 3 }),
  605. queryNumSbLocation({ sbId: this.model.id })
  606. ])
  607. .then((values) => {
  608. this.numPartInfo = values[0].data
  609. this.numModelbom = values[1].data
  610. this.numRepairReason = values[2].data
  611. this.numCheckStandard1 = values[3].data
  612. this.numCheckStandard2 = values[4].data
  613. this.numCheckStandard3 = values[5].data
  614. this.numCheckjob1 = values[6].data
  615. this.numCheckjob2 = values[7].data
  616. this.numCheckjob3 = values[8].data
  617. this.numLocation = values[9].data
  618. })
  619. // 如果是父设备,则要获取子设备的数量,并点击后可以看到子设备的情况
  620. queryChildNumSbInfo({ parentId: this.model.id }).then(res => {
  621. this.numChildSbInfo = res.data
  622. })
  623. },
  624. changeTab (activeKey) {
  625. this.activeKey = activeKey
  626. if (this.activeKey === '2' && this.BaseTool.Object.isNotBlank(this.$refs.sparePartUsedSelectTable)) {
  627. this.$refs.sparePartUsedSelectTable.handleOk()
  628. return
  629. }
  630. if (this.activeKey === '3' && this.BaseTool.Object.isNotBlank(this.$refs.spotJobTable)) {
  631. this.$refs.spotJobTable.handleOk()
  632. return
  633. }
  634. if (this.activeKey === '4' && this.BaseTool.Object.isNotBlank(this.$refs.repairApplicationFormTable)) {
  635. this.$refs.repairApplicationFormTable.handleOk()
  636. }
  637. if (this.activeKey === '5' && this.BaseTool.Object.isNotBlank(this.$refs.repairFeeTable)) {
  638. this.$refs.repairFeeTable.handleOk()
  639. }
  640. if (this.activeKey === '6' && this.BaseTool.Object.isNotBlank(this.$refs.sbStatusLogTable)) {
  641. this.$refs.sbStatusLogTable.handleOk()
  642. }
  643. if (this.activeKey === '7' && this.BaseTool.Object.isNotBlank(this.$refs.sbStopLogTable)) {
  644. this.$refs.sbStopLogTable.handleOk()
  645. }
  646. },
  647. getQrcodeSrc: (dom) => {
  648. console.log(11, 22)
  649. },
  650. handleCancel (values) {
  651. this.visible = false
  652. this.visibleDetail = false
  653. this.confirmLoading = false
  654. this.$emit('ok', values)
  655. },
  656. handleOk () {
  657. this.confirmLoading = true
  658. this.modalTitle = '详情'
  659. this.visible = true
  660. fetchSbInfo({ id: this.model.id }).then(res => {
  661. this.confirmLoading = false
  662. this.base(res.data)
  663. })
  664. },
  665. handleEdit () {
  666. fetchSbInfo({ id: this.model.id }).then(res => {
  667. this.visible = false
  668. const modal = this.$refs.baseModal
  669. modal.base(res.data)
  670. })
  671. },
  672. partInfoListView () {
  673. // const modal = this.$refs.partInfoList
  674. // modal.base({ sbId: this.model.id }, { sbId: this.model.id })
  675. // const routeUrl = this.$router.resolve({ path: '/part/info', query: { id: this.model.id } })
  676. const routeUrl = this.$router.resolve({ path: '/sb/info/for/part/info', query: { id: this.model.id } })
  677. window.open(routeUrl.href, '_blank')
  678. },
  679. locationListView () {
  680. // const modal = this.$refs.partInfoList
  681. // modal.base({ sbId: this.model.id }, { sbId: this.model.id })
  682. // const routeUrl = this.$router.resolve({ path: '/part/info', query: { id: this.model.id } })
  683. const routeUrl = this.$router.resolve({ path: '/sb/info/for/location', query: { id: this.model.id } })
  684. window.open(routeUrl.href, '_blank')
  685. },
  686. checkJobTableWaitDoListView () {
  687. const modal = this.$refs.checkJobTableWaitDo
  688. modal.base({ sbId: this.model.id }, { sbId: this.model.id, status: 1 })
  689. },
  690. handleTuiCalendar (level) {
  691. const that = this
  692. queryTuiCalendarIgnores({ sbId: this.model.id, type: level }).then(res => {
  693. const a = document.createElement('a')
  694. a.target = '_blank'
  695. a.href = '/tui-calendar/checkJobCalendar.html?'
  696. localStorage.setItem('calendarList', JSON.stringify(res.data.calendarList))
  697. var scheduleList = res.data.scheduleList
  698. scheduleList.forEach((item) => {
  699. item.start = that.BaseTool.Moment(item.start, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
  700. item.end = that.BaseTool.Moment(item.end, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
  701. })
  702. localStorage.setItem('scheduleList', JSON.stringify(scheduleList))
  703. a.click()
  704. })
  705. }
  706. }
  707. }
  708. </script>
  709. <style scoped>
  710. .ant-layout-sider {
  711. background: #fff !important;
  712. padding: 20px 16px !important;
  713. }
  714. .ant-card-body{
  715. padding: 0 !important;
  716. }
  717. </style>