DetailC.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  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" block>
  50. 配件记录
  51. </a-button>
  52. </a-col>
  53. <a-col :span="10">
  54. <a-button shape="round" type="primary" block>
  55. 配件记录
  56. </a-button>
  57. </a-col>
  58. <a-col :span="10">
  59. <a-button shape="round" block>
  60. 配件记录
  61. </a-button>
  62. </a-col>
  63. <a-col :span="10">
  64. <a-button shape="round" block>
  65. 配件记录
  66. </a-button>
  67. </a-col>
  68. <a-col :span="10">
  69. <a-button shape="round" block>
  70. 配件记录
  71. </a-button>
  72. </a-col>
  73. <a-col :span="10">
  74. <a-button shape="round" 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.getLabelByValueMapByType(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. },
  421. handleViewChildSbInfo () {
  422. this.visible = false
  423. const modal = this.$refs.detailSbInfoModal
  424. modal.base(this.model)
  425. },
  426. handleViewCheck (record) {
  427. this.visible = false
  428. const modal = this.$refs.detailSbCheckModal
  429. modal.base(this.model)
  430. },
  431. handleViewCheckJob (record) {
  432. this.visible = false
  433. const modal = this.$refs.detailSbCheckJobModal
  434. modal.base(this.model)
  435. },
  436. handleMeasure (record) {
  437. this.visible = false
  438. const modal = this.$refs.detailSbMeasureModal
  439. modal.base(this.model)
  440. },
  441. handleRepairReportSbInfo () {
  442. this.visible = false
  443. const modal = this.$refs.repairReportSbInfo
  444. modal.base()
  445. },
  446. handleRepairReportSbInfoFee () {
  447. this.visible = false
  448. const modal = this.$refs.repairReportSbInfoFee
  449. modal.base()
  450. },
  451. base (record) {
  452. this.visible = true
  453. this.visibleDetail = true
  454. this.modalTitle = '详情'
  455. this.model = record
  456. this.activeKey = '1'
  457. this.collapseActiveKey = '0'
  458. this.paramList = JSON.parse(record.paramList)
  459. this.fetchNum()
  460. fetchFirmProducer({ id: this.model.producerId }).then(res => {
  461. this.firmProducer = res.data
  462. })
  463. },
  464. fetchNum () {
  465. Promise.all([
  466. queryNumPartInfo({ sbId: this.model.id }),
  467. queryNumModelbom({ sbId: this.model.id }),
  468. queryNumCheckStandard({ sbId: this.model.id }),
  469. queryNumCheckjob({ sbId: this.model.id }),
  470. queryNumRepairReason({ sbId: this.model.id })
  471. ])
  472. .then((values) => {
  473. this.numPartInfo = values[0].data
  474. this.numModelbom = values[1].data
  475. this.numCheckStandard = values[2].data
  476. this.numCheckjob = values[3].data
  477. this.numRepairReason = values[4].data
  478. })
  479. // 如果是父设备,则要获取子设备的数量,并点击后可以看到子设备的情况
  480. queryChildNumSbInfo({ parentId: this.model.id }).then(res => {
  481. this.numChildSbInfo = res.data
  482. })
  483. },
  484. changeTab (activeKey) {
  485. this.activeKey = activeKey
  486. if (this.activeKey === '2' && this.BaseTool.Object.isNotBlank(this.$refs.sparePartUsedSelectTable)) {
  487. this.$refs.sparePartUsedSelectTable.handleOk()
  488. return
  489. }
  490. if (this.activeKey === '3' && this.BaseTool.Object.isNotBlank(this.$refs.spotJobTable)) {
  491. this.$refs.spotJobTable.handleOk()
  492. return
  493. }
  494. if (this.activeKey === '4' && this.BaseTool.Object.isNotBlank(this.$refs.repairApplicationFormTable)) {
  495. this.$refs.repairApplicationFormTable.handleOk()
  496. }
  497. if (this.activeKey === '5' && this.BaseTool.Object.isNotBlank(this.$refs.repairFeeTable)) {
  498. this.$refs.repairFeeTable.handleOk()
  499. }
  500. if (this.activeKey === '6' && this.BaseTool.Object.isNotBlank(this.$refs.sbStatusLogTable)) {
  501. this.$refs.sbStatusLogTable.handleOk()
  502. }
  503. if (this.activeKey === '7' && this.BaseTool.Object.isNotBlank(this.$refs.sbStopLogTable)) {
  504. this.$refs.sbStopLogTable.handleOk()
  505. }
  506. },
  507. getQrcodeSrc: (dom) => {
  508. console.log(11, 22)
  509. },
  510. handleCancel (values) {
  511. this.visible = false
  512. this.visibleDetail = false
  513. this.confirmLoading = false
  514. this.$emit('ok', values)
  515. },
  516. handleOk () {
  517. this.visible = true
  518. this.fetchNum()
  519. },
  520. partInfoListView () {
  521. const modal = this.$refs.partInfoList
  522. modal.base({ sbId: this.model.id }, { sbId: this.model.id })
  523. },
  524. checkJobTableWaitDoListView () {
  525. const modal = this.$refs.checkJobTableWaitDo
  526. modal.base({ sbId: this.model.id }, { sbId: this.model.id, status: 1 })
  527. },
  528. handleTuiCalendar (level) {
  529. const that = this
  530. queryTuiCalendarIgnores({ sbId: this.model.id, type: 2 }).then(res => {
  531. const a = document.createElement('a')
  532. a.target = '_blank'
  533. a.href = '/tui-calendar/checkJobCalendar.html?'
  534. localStorage.setItem('calendarList', JSON.stringify(res.data.calendarList))
  535. var scheduleList = res.data.scheduleList
  536. scheduleList.forEach((item) => {
  537. item.start = that.BaseTool.Moment(item.start, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
  538. item.end = that.BaseTool.Moment(item.end, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
  539. })
  540. localStorage.setItem('scheduleList', JSON.stringify(scheduleList))
  541. a.click()
  542. })
  543. }
  544. }
  545. }
  546. </script>
  547. <style scoped>
  548. .ant-layout-sider {
  549. background: #fff !important;
  550. padding: 20px 16px !important;
  551. }
  552. .ant-card-body{
  553. padding: 0 !important;
  554. }
  555. </style>