DetailC.vue 26 KB

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