123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726 |
- <template>
- <a-card v-show="visibleDetail" :title="modalTitle">
- <div v-show="visible">
- <div style="padding: 20px;">
- <a-row :gutter="48" slot="extra">
- <a-col :md="48" :sm="48">
- <span style="float: left">
- <a-badge :count="numChildSbInfo" title="子设备总数" :number-style="{ backgroundColor: '#52c41a' }">
- <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="handleViewChildSbInfo()">子设备</a-button>
- </a-badge>
- <a-badge :count="numPartInfo" title="部位总数" :number-style="{ backgroundColor: '#52c41a' }">
- <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="partInfoListView()">设备部位</a-button>
- </a-badge>
- <a-badge :count="numLocation" title="位号总数" :number-style="{ backgroundColor: '#52c41a' }">
- <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="locationListView()">设备位号</a-button>
- </a-badge>
- <a-badge :count="numModelbom" title="备件总数" :number-style="{ backgroundColor: '#52c41a' }">
- <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="handleViewBom()">备件BOM</a-button>
- </a-badge>
- <a-badge :count="numCheckStandard1" title="点检标准" :number-style="{ backgroundColor: '#52c41a' }">
- <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="handleViewCheck2(1)">点检标准</a-button>
- </a-badge>
- <a-badge :count="numCheckjob1" title="点检任务" :number-style="{ backgroundColor: '#52c41a' }">
- <a-button style="margin-left: 20px" type="default" @click="handleViewCheckJob2(1)">点检任务</a-button>
- </a-badge>
- <!-- <a-badge :count="numCheckStandard2" title="保养标准" :number-style="{ backgroundColor: '#52c41a' }">
- <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="handleViewCheck(2)">保养标准</a-button>
- </a-badge>
- <a-badge :count="numCheckjob2" title="保养任务" :number-style="{ backgroundColor: '#52c41a' }">
- <a-button style="margin-left: 20px" type="default" @click="handleViewCheckJob(2)">保养任务</a-button>
- </a-badge>
- <a-badge :count="numCheckStandard3" title="润滑标准" :number-style="{ backgroundColor: '#52c41a' }">
- <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="handleViewCheck3(3)">润滑标准</a-button>
- </a-badge>
- <a-badge :count="numCheckjob3" title="润滑任务" :number-style="{ backgroundColor: '#52c41a' }">
- <a-button style="margin-left: 20px" type="default" @click="handleViewCheckJob3(3)">润滑任务</a-button>
- </a-badge>-->
- <a-button v-show="model.useType==4" style="margin-left: 20px" type="default" @click="handleMeasure()">检定记录</a-button>
- <!-- <a-button style="margin-left: 20px" type="default" @click="handleViewTree()">设备树</a-button>
- <a-button style="margin-left: 20px" type="error" @click="handleTuiCalendar(1)">保养日历</a-button>
- <a-button style="margin-left: 20px" type="default" @click="handleRepairReportSbInfo()">工单分析</a-button>
- <a-button style="margin-left: 20px" type="default" @click="handleRepairReportSbInfoFee()">费用分析</a-button> -->
- <a-button style="margin-left: 20px" type="default" @click="handleEdit()">修改</a-button>
- <a-button style="margin-left: 8px" type="default" :loading="confirmLoading" @click="handleOk()">刷新</a-button>
- <a-button style="margin-left: 20px" type="primary" @click="handleCancel()">返回</a-button>
- </span>
- </a-col>
- </a-row>
- </div>
- <a-layout>
- <a-layout-sider :width="335">
- <img-code
- style="border: 1px dashed #ccc"
- :src="model.qrCode"
- title="点击重新生成二维码"
- :code-id="model.id"
- :width="297"
- :height="297"></img-code>
- <a-divider style="background: #D6D6D6" />
- <a-row type="flex" justify="space-between" :gutter="[16,16]">
- <a-col :span="10">
- <a-button shape="round" @click="changeLogs()" block>
- 修改记录
- </a-button>
- </a-col>
- <a-col :span="10">
- <a-button shape="round" @click="handleRouter(1)" block>
- 配件记录
- </a-button>
- </a-col>
- <a-col :span="10">
- <a-button shape="round" @click="handleRouter(2)" block>
- 保养记录
- </a-button>
- </a-col>
- <a-col :span="10">
- <a-button shape="round" @click="handleRouter(3)" block>
- 历史故障
- </a-button>
- </a-col>
- <a-col :span="10">
- <a-button shape="round" @click="handleRouter(4)" block>
- 历史费用
- </a-button>
- </a-col>
- <a-col :span="10">
- <a-button shape="round" @click="handleRouter(5)" block>
- 状态变更记录
- </a-button>
- </a-col>
- <a-col :span="10">
- <a-button shape="round" @click="handleRouter(6)" block>
- 停机记录
- </a-button>
- </a-col>
- <a-col :span="10">
- <a-button shape="round" @click="handleRouter(7)" block>
- 遥测点位
- </a-button>
- </a-col>
- <a-col :span="10">
- <a-button shape="round" @click="handleViewTree()" block>设备树</a-button>
- </a-col>
- <a-col :span="10">
- <a-button shape="round" @click="handleTuiCalendar(1)" block>
- 检点日历
- </a-button>
- </a-col>
- <!-- <a-col :span="10">
- <a-button shape="round" @click="handleTuiCalendar(2)" block>
- 保养日历
- </a-button>
- </a-col>
- <a-col :span="10">
- <a-button shape="round" @click="handleTuiCalendar(3)" block>
- 润滑日历
- </a-button>
- </a-col>-->
- <a-col :span="10">
- <a-button shape="round" @click="handleRepairReportSbInfo()" block>
- 工单分析
- </a-button>
- </a-col>
- <a-col :span="10">
- <a-button shape="round" @click="handleRepairReportSbInfoFee()" block>
- 费用分析
- </a-button>
- </a-col>
- </a-row>
- </a-layout-sider>
- <a-layout-content :style="{ background: '#fff',padding: '20px'}">
- <a-card >
- <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>基本信息</b></div>
- <a-descriptions bordered :column="3">
- <a-descriptions-item label="设备编号">
- {{ model.no }}
- </a-descriptions-item>
- <a-descriptions-item label="资产编号">{{ model.financingNo }}</a-descriptions-item>
- <a-descriptions-item label="设备位号">
- {{ model.positionNo }}
- </a-descriptions-item>
- <a-descriptions-item label="设备描述">
- {{ model.name }}
- </a-descriptions-item>
- <a-descriptions-item label="规格型号">
- {{ model.model }}
- </a-descriptions-item>
- <a-descriptions-item label="ABC 标识" >
- {{ BaseTool.Object.getField(levelMap,model.level) }}
- </a-descriptions-item>
- <a-descriptions-item label="设备类型">
- {{ model.typeName }}
- </a-descriptions-item>
- <a-descriptions-item label="自定义类型">
- {{ BaseTool.Object.getField(useTypeMap,model.useType) }}
- </a-descriptions-item>
- <a-descriptions-item label="生产商">
- {{ model.producerName }}
- </a-descriptions-item>
- <a-descriptions-item label="大小尺寸">
- {{ model.zz }}
- </a-descriptions-item>
- <a-descriptions-item label="出厂编号">{{ model.zzh }}</a-descriptions-item>
- <a-descriptions-item label="使用位置">{{ model.cph }}</a-descriptions-item>
- <a-descriptions-item label="设备位置">{{ model.positionName }}</a-descriptions-item>
- <a-descriptions-item label="使用寿命">{{ model.workYear }}</a-descriptions-item>
- <a-descriptions-item label="是否显示">{{ model.isShow?'显示':'不显示' }}</a-descriptions-item>
- <a-descriptions-item v-if="model.isChild == 1" label="是否子设备">子设备</a-descriptions-item>
- <a-descriptions-item v-else-if="model.isChild == 2" label="是否子设备">父设备</a-descriptions-item>
- <a-descriptions-item v-else-if="model.isChild == 3" label="是否子设备">独立设备</a-descriptions-item>
- <a-descriptions-item label="状态"><badge :status="DictCache.COLOR.SB_INFO_STATUS[model.status]" :text="statusMap[model.status]"></badge></a-descriptions-item>
- <a-descriptions-item label="关联维修部门">{{ BaseTool.Object.getField(repairDeptMap,model.repairDeptId) }}</a-descriptions-item>
- <a-descriptions-item label="备注">{{ model.remark }}</a-descriptions-item>
- </a-descriptions>
- </a-card>
- <br>
- <a-card >
- <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>自定义参数</b></div>
- <a-descriptions bordered :column="3">
- <a-descriptions-item v-for="item in paramList" :key="item.name" :label="item.name">{{ item.content }}</a-descriptions-item>
- </a-descriptions>
- </a-card>
- <br>
- <!-- <a-card >
- <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>资产编号</b></div>
- <a-descriptions bordered :column="3">
- <a-descriptions-item label="资产编号1">{{ model.financingNo }}</a-descriptions-item>
- <a-descriptions-item label="资产编号2">{{ model.financingNoTwo }}</a-descriptions-item>
- <a-descriptions-item label="资产编号3">{{ model.financingNoThird }}</a-descriptions-item>
- <a-descriptions-item label="资产编号4">{{ model.financingNoFour }}</a-descriptions-item>
- <a-descriptions-item label="资产编号5">{{ model.financingNoFive }}</a-descriptions-item>
- </a-descriptions>
- </a-card>
- <br>-->
- <a-card >
- <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>人员信息</b></div>
- <a-descriptions bordered :column="3">
- <a-descriptions-item label="使用人">{{ model.saveUserName }}</a-descriptions-item>
- <a-descriptions-item label="第一维修人">{{ model.repairUserName }}</a-descriptions-item>
- <a-descriptions-item label="第二维修人">{{ model.repairUserNameSecond }}</a-descriptions-item>
- <a-descriptions-item label="购置日期">{{ model.buyDate }}</a-descriptions-item>
- <a-descriptions-item label="投用日期">{{ model.startDate }}</a-descriptions-item>
- </a-descriptions>
- </a-card>
- <br>
- <a-card v-show="model.useType == 5">
- <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>特种信息</b></div>
- <a-descriptions bordered :column="3">
- <a-descriptions-item label="注册代码">{{ model.registerNo }}</a-descriptions-item>
- <a-descriptions-item label="介质属性">{{ model.characterType }}</a-descriptions-item>
- <a-descriptions-item label="使用登记证编号">{{ model.usedNo }}</a-descriptions-item>
- <a-descriptions-item label="维护供应商">{{ model.supplier }}</a-descriptions-item>
- <a-descriptions-item label="设备批号">{{ model.batchNo }}</a-descriptions-item>
- <a-descriptions-item label="设计到期年限">{{ model.retirementDate }}</a-descriptions-item>
- <a-descriptions-item label="登记日期">{{ model.registerDate }}</a-descriptions-item>
- </a-descriptions>
- </a-card>
- <br v-show="model.useType == 5">
- <a-card v-show="model.useType == 4" >
- <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>计量信息</b></div>
- <a-descriptions bordered :column="3">
- <a-descriptions-item label="计量设备编号">{{ model.cardNo }}</a-descriptions-item>
- <a-descriptions-item label="准确度等级">{{ model.fdjxh }}</a-descriptions-item>
- <a-descriptions-item label="检定日期">{{ model.checkDate }}</a-descriptions-item>
- <a-descriptions-item label="检定周期">{{ model.checkPeriod }}</a-descriptions-item>
- <a-descriptions-item label="检定有效期">{{ model.nextCheckDate }}</a-descriptions-item>
- <a-descriptions-item label="检定单位">{{ model.dph }}</a-descriptions-item>
- <a-descriptions-item label="检定人">{{ model.zaiz }}</a-descriptions-item>
- <a-descriptions-item label="检定结论">{{ BaseTool.Object.getField(rlTypeMap,model.rlType) }}</a-descriptions-item>
- <a-descriptions-item label="是否周检查">{{ BaseTool.Object.getField(colorMap,model.color) }}</a-descriptions-item>
- <a-descriptions-item label="检定证书编号">{{ model.sbdh }}</a-descriptions-item>
- <a-descriptions-item label="预警天数">{{ model.seatNumber }}</a-descriptions-item>
- <a-descriptions-item label="是否需要检定">{{ BaseTool.Object.getField(yesNoMap,model.isMeasure) }}</a-descriptions-item>
- </a-descriptions>
- </a-card>
- <br v-show="model.useType == 4">
- <a-card >
- <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>文件信息</b></div>
- <a-descriptions bordered :column="3">
- <a-descriptions-item label="维保手册">
- <a-upload
- :multiple="true"
- :fileList="BaseTool.UPLOAD.transImg(model.repairFileList)"
- >
- </a-upload>
- </a-descriptions-item>
- <a-descriptions-item label="使用手册">
- <a-upload
- :multiple="true"
- :fileList="BaseTool.UPLOAD.transImg(model.useFileList)"
- >
- </a-upload>
- </a-descriptions-item>
- <a-descriptions-item label="验收文件">
- <a-upload
- :multiple="true"
- :fileList="BaseTool.UPLOAD.transImg(model.recheckFileList)"
- >
- </a-upload>
- </a-descriptions-item>
- </a-descriptions>
- </a-card>
- <br>
- <a-card>
- <div style="margin:0; padding:15px 30px; background:#EFEFFB;font-size:16px; color: #1890ff"><b>图片信息</b></div>
- <br>
- <a-row v-if="model.sbFileList != null && model.sbFileList.length > 0" type="flex" justify="space-between" :gutter="[16,16]">
- <a-col >
- <img v-for="item in model.sbFileList" :src="item.url" :key="item.id" class="image">
- </a-col>
- </a-row>
- <div v-if="model.sbFileList == null || model.sbFileList.length === 0"> 暂无</div>
- </a-card>
- </a-layout-content>
- </a-layout>
- </div>
- <base-form ref="baseModal" @ok="handleOk"/>
- <change-logs-detail ref="changeLogsDetail" @ok="handleOk" />
- <detail-sb-bom ref="detailSbBomModal" @ok="handleOk"/>
- <detail-sb-check ref="detailSbCheckModal" @ok="handleOk"/>
- <detail-sb-check-job ref="detailSbCheckJobModal" @ok="handleOk"/>
- <detail-sb-measure ref="detailSbMeasureModal" @ok="handleOk"/>
- <detail-sb-info ref="detailSbInfoModal" @ok="handleOk"/>
- <part-info-list ref="partInfoList" />
- <repair-report-sb-info ref="repairReportSbInfo" :sb-id="model.id" @ok="handleOk"/>
- <repair-report-sb-info-fee ref="repairReportSbInfoFee" :sb-id="model.id" @ok="handleOk"/>
- </a-card>
- </template>
- <script>
- import BaseForm from './BaseForm'
- import ChangeLogsDetail from './ChangeLogsDetail'
- import DetailList from '@/components/tools/DetailList'
- import RepairApplicationFormTable from '@/views/repair/application-form/modules/RepairApplicationFormTable'
- import CheckJobTable from '@/views/check/checkjob/modules/CheckJobTable'
- import SbStatusLogTable from '@/views/sb/status-log/modules/SbStatusLogTable'
- import SbStopLogTable from '@/views/sb/stop-logs/modules/SbStopLogTable'
- import { fetchFirmProducer } from '@/api/firm/producer'
- import { queryNumCheckStandard } from '@/api/check/checkstandard'
- import { queryNumCheckjob, queryTuiCalendarIgnores } from '@/api/check/checkjob'
- import { queryNumRepairReason } from '@/api/repair/repair-reason'
- import { queryNumPartInfo } from '@/api/part/info'
- import { queryNumSbLocation } from '@/api/sb/location'
- import { queryNumModelbom } from '@/api/sb/modelbom'
- import { fetchSbInfo, queryChildNumSbInfo } from '@/api/sb/info'
- import SparePartUsedSelectTable from '@/views/sqarepartmanage/sparepartused/modules/SparePartUsedSelectTable'
- // import SbOilPageTable from '@/views/sb/oil/modules/SbOilPageTable'
- import SbRunFillPageTable from '@/views/sb/run-fill/modules/SbRunFillPageTable'
- import SbInspectionFillPageTable from '@/views/sb/inspection-fill/modules/SbInspectionFillPageTable'
- import DetailSbBom from '@/views/sb/modelbom/modules/DetailSbBom'
- import DetailSbCheck from '@/views/check/checkstandard/modules/DetailSbCheck'
- import DetailSbCheckJob from '@/views/check/checkjob/modules/DetailSbCheckJob'
- import DetailSbMeasure from '@/views/sb/measurelog/modules/DetailSbCheck'
- import DetailSbInfo from '@/views/sb/info/modules/DetailSbInfo'
- import RepairFeeTable from '@/views/repair/fee/modules/RepairFeeTable'
- import RepairReportSbInfo from '@/views/dashboard/RepairReportSbInfo'
- import RepairReportSbInfoFee from '@/views/dashboard/RepairReportSbInfoFee'
- import PartInfoList from '@/views/part/info/modules/PartInfoList'
- const DetailListItem = DetailList.Item
- export default {
- name: 'SbInfoDetail',
- components: {
- BaseForm,
- ChangeLogsDetail,
- DetailList,
- DetailListItem,
- RepairApplicationFormTable,
- CheckJobTable,
- SparePartUsedSelectTable,
- // SbOilPageTable,
- SbRunFillPageTable,
- SbInspectionFillPageTable,
- DetailSbBom,
- DetailSbCheck,
- DetailSbCheckJob,
- PartInfoList,
- DetailSbMeasure,
- DetailSbInfo,
- RepairFeeTable,
- SbStatusLogTable,
- SbStopLogTable,
- RepairReportSbInfo,
- RepairReportSbInfoFee
- },
- data () {
- return {
- confirmLoading: false,
- mdl: {},
- modalTitle: null,
- paramList: [],
- visible: false,
- visibleDetail: false,
- activeKey: '3',
- isChildMap: {},
- yesNoMap: {},
- isShowMap: {},
- collapseActiveKey: '1',
- model: {
- 'no': null,
- 'positionNo': null,
- 'financingNo': null,
- 'financingNoTwo': null,
- 'financingNoThird': null,
- 'financingNoFour': null,
- 'financingNoFive': null,
- 'name': null,
- 'modelId': null,
- 'typeId': null,
- 'isShow': null,
- 'isChild': null,
- 'isMeasure': null,
- 'paramList': null,
- 'parentId': null,
- 'level': null,
- 'useType': null,
- 'rate': null,
- 'month': null,
- 'usedMonth': null,
- 'initialValue': null,
- 'currentValue': null,
- 'cutValue': null,
- 'producerId': null,
- // 'sourceType': null,
- // 'sourceSbId': null,
- // 'parentId': null,
- 'unit': null,
- // 'position': null,
- // 'guigeId': null,
- 'useCompanyName': null,
- 'useProjectName': null,
- 'useDeptName': null,
- 'useGroupName': null,
- 'useUserName': null,
- 'saveDeptName': null,
- 'saveUserName': null,
- 'repairUserName': null,
- 'repairUserNameSecond': null,
- 'totalMiles': null,
- 'totalHours': null,
- // 'lastBaoyangTime': null,
- // 'lastBaoyangMiles': null,
- // 'lastBaoyangHours': null,
- // 'baoyangTimes': null,
- 'buyDate': null,
- 'startDate': null,
- // 'nextCheckDate': null,
- // 'guaranteeDate': null,
- // 'workYear': null,
- // 'retirementDate': null,
- // 'depreciationType': null,
- 'wbFile': null,
- 'useFile': null,
- 'checkFile': null,
- 'sbImage': null,
- 'sbFileList': null,
- 'qrCode': null,
- 'status': null,
- 'remark': null,
- 'parentName': null,
- 'createdUserName': null,
- 'typeName': null,
- 'producerName': null,
- 'zzh': null,
- 'fdjxh': null,
- 'fdjh': null,
- 'cph': null,
- 'positionId': null,
- 'positionName': null,
- 'dph': null,
- 'zz': null,
- 'rlType': null,
- 'color': null,
- 'seatNumber': null,
- 'registerNo': null,
- 'characterType': null,
- 'usedNo': null,
- 'supplier': null,
- 'repairUserSecond': null,
- 'batchNo': null,
- 'workYear': null,
- 'retirementDate': null,
- 'registerDate': null,
- 'repairDeptId': null
- },
- numCheckStandard1: 0,
- numCheckjob1: 0,
- numCheckStandard2: 0,
- numCheckjob2: 0,
- numCheckStandard3: 0,
- numCheckjob3: 0,
- numRepairReason: 0,
- numModelbom: 0,
- numPartInfo: 0,
- numLocation: 0,
- numChildSbInfo: 0,
- firmProducerLevelMap: {},
- firmSupplier: {},
- firmProducer: {},
- statusMap: {},
- useTypeMap: {},
- levelMap: {},
- unitMap: {},
- colorMap: {},
- rlTypeMap: {},
- sourceTypeMap: {},
- repairDeptMap: {}
- }
- },
- created () {
- this.depreciationTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_DEPRECIATIONTYPE)
- this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_LEVEL)
- this.firmProducerLevelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.FIRM_PRODUCER_LEVEL)
- this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_INFO_STATUS)
- this.unitMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_UNIT)
- this.colorMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_COLOR)
- this.rlTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.RANLIAO_TYPE)
- this.sourceTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBTYPE_SOURCETYPE)
- this.useTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_USE_TYPE)
- this.isChildMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_IS_CHILD)
- this.isShowMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_IS_SHOW)
- this.yesNoMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
- this.repairDeptMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_DEPT_CATEGORY)
- },
- computed: {
- },
- methods: {
- inited (viewer) {
- this.$viewer = viewer
- },
- handleViewTree () {
- const routeUrl = this.$router.resolve({ path: '/tree', query: { id: this.model.id } })
- // let routeUrl = this.$router.resolve(`/share/${96}`)
- window.open(routeUrl.href, '_blank')
- },
- handleViewBom (record) {
- const routeUrl = this.$router.resolve({ path: '/sb/modelbom', query: { id: this.model.id } })
- window.open(routeUrl.href, '_blank')
- },
- handleViewChildSbInfo () {
- // this.visible = false
- // const modal = this.$refs.detailSbInfoModal
- console.log(this.model)
- // modal.base(this.model)
- const routeUrl = this.$router.resolve({ path: '/sb/info/company', query: { parentId: this.model.id, parentName: this.model.name } })
- // let routeUrl = this.$router.resolve(`/share/${96}`)
- window.open(routeUrl.href, '_blank')
- },
- handleViewCheck (type) {
- const routeUrl = this.$router.resolve({ path: '/check/polling-standard', query: { id: this.model.id, checkType: type, sbNo: this.model.no } })
- // let routeUrl = this.$router.resolve(`/share/${96}`)
- window.open(routeUrl.href, '_blank')
- },
- handleViewCheck2 (type) {
- const routeUrl = this.$router.resolve({ path: '/check/spot-standard', query: { id: this.model.id, checkType: type, sbNo: this.model.no } })
- // let routeUrl = this.$router.resolve(`/share/${96}`)
- window.open(routeUrl.href, '_blank')
- },
- handleViewCheck3 (type) {
- const routeUrl = this.$router.resolve({ path: '/check-run-standard', query: { id: this.model.id, checkType: type, sbNo: this.model.no } })
- // let routeUrl = this.$router.resolve(`/share/${96}`)
- window.open(routeUrl.href, '_blank')
- },
- handleViewCheckJob (type) {
- const routeUrl = this.$router.resolve({ path: '/check/polling-job', query: { id: this.model.id, checkType: type } })
- window.open(routeUrl.href, '_blank')
- },
- handleViewCheckJob2 (type) {
- const routeUrl = this.$router.resolve({ path: '/check/spot-job', query: { id: this.model.id, checkType: type } })
- window.open(routeUrl.href, '_blank')
- },
- handleViewCheckJob3 (type) {
- const routeUrl = this.$router.resolve({ path: '/check-run-job', query: { id: this.model.id, checkType: type } })
- window.open(routeUrl.href, '_blank')
- },
- changeLogs () {
- // this.visible = false
- const modal = this.$refs.changeLogsDetail
- modal.base(this.model)
- },
- // 根据keyNum路由相关页面
- handleRouter (keyNum) {
- const id = this.model.id
- var routeUrl = ''
- if (keyNum === 1) {
- routeUrl = this.$router.resolve({ path: '/spare/used/record', query: { id: id } })
- }
- if (keyNum === 2) {
- routeUrl = this.$router.resolve({ path: '/check/polling-job/finish', query: { id: id } })
- }
- if (keyNum === 3) {
- routeUrl = this.$router.resolve({ path: '/repair/form', query: { sbId: id } })
- }
- if (keyNum === 4) {
- routeUrl = this.$router.resolve({ path: '/repair/fee', query: { sbId: id } })
- }
- if (keyNum === 5) {
- routeUrl = this.$router.resolve({ path: '/status/log', query: { id: id } })
- }
- if (keyNum === 6) {
- routeUrl = this.$router.resolve({ path: '/stop/log', query: { id: id } })
- }
- if (keyNum === 7) {
- routeUrl = this.$router.resolve({ path: '/remote/measure', query: { sbId: id, sbName: this.model.name } })
- }
- window.open(routeUrl.href, '_blank')
- },
- handleMeasure (record) {
- this.visible = false
- const modal = this.$refs.detailSbMeasureModal
- modal.base(this.model)
- },
- handleRepairReportSbInfo () {
- this.visible = false
- const modal = this.$refs.repairReportSbInfo
- modal.base()
- },
- handleRepairReportSbInfoFee () {
- this.visible = false
- const modal = this.$refs.repairReportSbInfoFee
- modal.base()
- },
- base (record) {
- this.visible = true
- this.visibleDetail = true
- this.modalTitle = '详情'
- this.model = record
- this.activeKey = '1'
- this.collapseActiveKey = '0'
- this.paramList = JSON.parse(record.paramList)
- this.fetchNum()
- fetchFirmProducer({ id: this.model.producerId }).then(res => {
- this.firmProducer = res.data
- })
- },
- fetchNum () {
- Promise.all([
- queryNumPartInfo({ sbId: this.model.id }),
- queryNumModelbom({ sbId: this.model.id }),
- queryNumRepairReason({ sbId: this.model.id }),
- queryNumCheckStandard({ sbId: this.model.id, type: 1 }),
- queryNumCheckStandard({ sbId: this.model.id, type: 2 }),
- queryNumCheckStandard({ sbId: this.model.id, type: 3 }),
- queryNumCheckjob({ sbId: this.model.id, type: 1 }),
- queryNumCheckjob({ sbId: this.model.id, type: 2 }),
- queryNumCheckjob({ sbId: this.model.id, type: 3 }),
- queryNumSbLocation({ sbId: this.model.id })
- ])
- .then((values) => {
- this.numPartInfo = values[0].data
- this.numModelbom = values[1].data
- this.numRepairReason = values[2].data
- this.numCheckStandard1 = values[3].data
- this.numCheckStandard2 = values[4].data
- this.numCheckStandard3 = values[5].data
- this.numCheckjob1 = values[6].data
- this.numCheckjob2 = values[7].data
- this.numCheckjob3 = values[8].data
- this.numLocation = values[9].data
- })
- // 如果是父设备,则要获取子设备的数量,并点击后可以看到子设备的情况
- queryChildNumSbInfo({ parentId: this.model.id }).then(res => {
- this.numChildSbInfo = res.data
- })
- },
- changeTab (activeKey) {
- this.activeKey = activeKey
- if (this.activeKey === '2' && this.BaseTool.Object.isNotBlank(this.$refs.sparePartUsedSelectTable)) {
- this.$refs.sparePartUsedSelectTable.handleOk()
- return
- }
- if (this.activeKey === '3' && this.BaseTool.Object.isNotBlank(this.$refs.spotJobTable)) {
- this.$refs.spotJobTable.handleOk()
- return
- }
- if (this.activeKey === '4' && this.BaseTool.Object.isNotBlank(this.$refs.repairApplicationFormTable)) {
- this.$refs.repairApplicationFormTable.handleOk()
- }
- if (this.activeKey === '5' && this.BaseTool.Object.isNotBlank(this.$refs.repairFeeTable)) {
- this.$refs.repairFeeTable.handleOk()
- }
- if (this.activeKey === '6' && this.BaseTool.Object.isNotBlank(this.$refs.sbStatusLogTable)) {
- this.$refs.sbStatusLogTable.handleOk()
- }
- if (this.activeKey === '7' && this.BaseTool.Object.isNotBlank(this.$refs.sbStopLogTable)) {
- this.$refs.sbStopLogTable.handleOk()
- }
- },
- getQrcodeSrc: (dom) => {
- console.log(11, 22)
- },
- handleCancel (values) {
- this.visible = false
- this.visibleDetail = false
- this.confirmLoading = false
- this.$emit('ok', values)
- },
- handleOk () {
- this.confirmLoading = true
- this.modalTitle = '详情'
- this.visible = true
- fetchSbInfo({ id: this.model.id }).then(res => {
- this.confirmLoading = false
- this.base(res.data)
- })
- },
- handleEdit () {
- fetchSbInfo({ id: this.model.id }).then(res => {
- this.visible = false
- const modal = this.$refs.baseModal
- modal.base(res.data)
- })
- },
- partInfoListView () {
- // const modal = this.$refs.partInfoList
- // modal.base({ sbId: this.model.id }, { sbId: this.model.id })
- // const routeUrl = this.$router.resolve({ path: '/part/info', query: { id: this.model.id } })
- const routeUrl = this.$router.resolve({ path: '/sb/info/for/part/info', query: { id: this.model.id } })
- window.open(routeUrl.href, '_blank')
- },
- locationListView () {
- // const modal = this.$refs.partInfoList
- // modal.base({ sbId: this.model.id }, { sbId: this.model.id })
- // const routeUrl = this.$router.resolve({ path: '/part/info', query: { id: this.model.id } })
- const routeUrl = this.$router.resolve({ path: '/sb/info/for/location', query: { id: this.model.id } })
- window.open(routeUrl.href, '_blank')
- },
- checkJobTableWaitDoListView () {
- const modal = this.$refs.checkJobTableWaitDo
- modal.base({ sbId: this.model.id }, { sbId: this.model.id, status: 1 })
- },
- handleTuiCalendar (level) {
- const that = this
- queryTuiCalendarIgnores({ sbId: this.model.id, type: level }).then(res => {
- const a = document.createElement('a')
- a.target = '_blank'
- a.href = '/tui-calendar/checkJobCalendar.html?'
- localStorage.setItem('calendarList', JSON.stringify(res.data.calendarList))
- var scheduleList = res.data.scheduleList
- scheduleList.forEach((item) => {
- item.start = that.BaseTool.Moment(item.start, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
- item.end = that.BaseTool.Moment(item.end, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
- })
- localStorage.setItem('scheduleList', JSON.stringify(scheduleList))
- a.click()
- })
- }
- }
- }
- </script>
- <style scoped>
- .ant-layout-sider {
- background: #fff !important;
- padding: 20px 16px !important;
- }
- .ant-card-body{
- padding: 0 !important;
- }
- </style>
|