whj 11 bulan lalu
induk
melakukan
76eb8c7959

+ 1 - 1
src/utils/install.js

@@ -17,7 +17,7 @@ import { Icon } from 'ant-design-vue'
 import iconfont from '@/components/IconSelector/iconfont.js'
 import ImportForm from '@/components/custom/ImportForm'
 const MyIcon = Icon.createFromIconfontCN({
-  scriptUrl: '//at.alicdn.com/t/c/font_3266072_ei5h82cuojd.js' // //at.alicdn.com/t/font_1314041_9qgpnn1vvko.js在 iconfont.cn 上生成
+  scriptUrl: '//at.alicdn.com/t/c/font_3266072_qij35wdydjq.js' // //at.alicdn.com/t/font_1314041_9qgpnn1vvko.js在 iconfont.cn 上生成
   // scriptUrl: '//at.alicdn.com/t/font_3266072_mx3m5426u3.js'
 })
 

+ 6 - 2
src/views/check/checkjob/CheckJob.vue

@@ -233,6 +233,10 @@ export default {
       type: Number,
       default: -1
     },
+    sbId: {
+      type: String,
+      default: null
+    },
     status: {
       type: Number,
       default: null
@@ -255,14 +259,14 @@ export default {
       advanced: false,
       // 查询参数
       queryParam: {
-        type: this.$route.query.checkType || this.checkType,
+        type: this.checkType,
         searchStartTime: null,
         searchEndTime: null,
         filter: this.filter,
         status: this.status,
         receiveOvertime: this.receiveOvertime,
         statusList: this.statusList,
-        sbId: this.$route.query.id
+        sbId: this.sbId
       },
       treeData: [],
       // 表头

+ 11 - 3
src/views/check/checkstandard/CheckStandard.vue

@@ -207,6 +207,14 @@ export default {
     checkType: {
       type: Number,
       default: 1
+    },
+    sbId: {
+      type: String,
+      default: null
+    },
+    sbNo: {
+      type: String,
+      default: null
     }
   },
   data () {
@@ -215,9 +223,9 @@ export default {
       visible: true,
       confirmLoading: false,
       queryParam: {
-        type: this.$route.query.checkType || this.checkType,
-        sbId: this.$route.query.id,
-        sbNo: this.$route.query.sbNo
+        type: this.checkType,
+        sbId: this.sbId,
+        sbNo: this.sbNo
       },
       // 表头
       columns: [

+ 14 - 4
src/views/sb/info/SbInfo.vue

@@ -315,7 +315,7 @@ import BaseForm from './modules/BaseForm'
 import SbBomSyncSelectModal from './modules/SbBomSyncSelectModal'
 import DetailSbMeasure from '@/views/sb/measurelog/modules/DetailSbCheckBatch'
 import BaseFormStatusLog from '@/views/sb/status-log/modules/BaseForm'
-import Detail from './modules/Detail'
+import Detail from './modules/DetailC'
 import BaseFormMeasure from './modules/BaseFormMeasure'
 import BaseFormMeasureInStore from './modules/BaseFormMeasureInStore'
 import BaseFormLocation from './modules/BaseFormLocation'
@@ -341,7 +341,7 @@ import PrintInSbInfoBatch from '@/views/sb/info/modules/PrintInSbInfoBatch'
 import { querySbPosition } from '@/api/sb/position'
 import SbChangeLogSelectModal from '@/views/sb/change-log/modules/SbChangeLogSelectModal'
 export default {
-  name: 'SbInfoList',
+  name: 'SbInfo',
   components: {
     STable,
     Ellipsis,
@@ -390,6 +390,14 @@ export default {
     status: {
       type: Number,
       default: null
+    },
+    parentName: {
+      type: String,
+      default: null
+    },
+    parentId: {
+      type: String,
+      default: null
     }
   },
   data () {
@@ -692,6 +700,8 @@ export default {
           ...parameter,
           ...this.queryParam,
           typeList: this.typeList,
+          parentId: this.parentId,
+          parentName: this.parentName,
           dataScope: {
             sortBy: 'asc',
             sortName: 'no'
@@ -722,8 +732,8 @@ export default {
   },
   created () {
     console.log('this.$route.query.parentId: ' + this.$route.query.parentId)
-    this.queryParam.parentId = this.$route.query.parentId
-    this.queryParam.parentName = this.$route.query.parentName
+    // this.queryParam.parentId = this.$route.query.parentId
+    // this.queryParam.parentName = this.$route.query.parentName
     this.tableOption()
     this.depreciationTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_DEPRECIATIONTYPE)
     this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_LEVEL)

+ 217 - 554
src/views/sb/info/modules/DetailC.vue

@@ -1,600 +1,263 @@
 <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="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="numCheckStandard" title="维护项目总数" :number-style="{ backgroundColor: '#52c41a' }">
-                <a-button style="margin-left: 20px" type="default" @ok="handleOk" @click="handleViewCheck()">维护项目</a-button>
-              </a-badge>
-              <a-badge :count="numCheckjob" title="保养任务总数" :number-style="{ backgroundColor: '#52c41a' }">
-                <a-button style="margin-left: 20px" type="default" @click="handleViewCheckJob()">保养任务</a-button>
-              </a-badge>
-              <a-button v-show="model.useType==4" style="margin-left: 8px" type="default" @click="handleMeasure()">检定记录</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: 8px" 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="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-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.zbh }}
-              </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="备注">{{ 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>
-          </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 v-if="visible">
+    <div class="card">
+      <a-tabs v-model="activeKey">
+        <a-tab-pane v-for="(item,i) in components" :key="i">
+          <div slot="tab" v-if="item.badge">
+            <a-badge :count="item.badge.count" :title="item.badge.title" :number-style="{ backgroundColor: '#52c41a' }">
+              <div class="tab-title">
+                <my-icon v-if="item.isMy" class="icon" :type="item.icon"></my-icon>
+                <a-icon v-else class="icon" :type="item.icon" />
+                <div>
+                  {{ item.name }}
+                </div>
+              </div>
+            </a-badge>
+          </div>
+          <div slot="tab" class="tab-title" v-else>
+            <my-icon v-if="item.isMy" class="icon" :type="item.icon"></my-icon>
+            <a-icon v-else class="icon" :type="item.icon" />
+            <div>
+              {{ item.name }}
+            </div>
+          </div>
+        </a-tab-pane>
+      </a-tabs>
     </div>
-    <base-form ref="baseModal" @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>
+    <keep-alive>
+      <component :is="components[activeKey].component" v-bind="props" />
+    </keep-alive>
+    <div class="btn">
+      <a-space>
+        <a-button type="primary" @click="handleBack">返回</a-button>
+      </a-space>
+    </div>
+  </div>
 </template>
 
 <script>
-import BaseForm from './BaseForm'
-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 DetailInfo from './detail/DetailInfo.vue'
+import Children from './detail/Children.vue'
+import PartInfoList from './detail/PartInfoList.vue'
+import LocationList from './detail/LocationList.vue'
+import SbModelBom from '@/views/sb/modelbom/SbModelBom.vue'
+import CheckStandard from '@/views/check/checkstandard/CheckStandard.vue'
+import CheckJob from '@/views/check/checkjob/CheckJob.vue'
+import DetailSbMeasure from './detail/DetailSbCheck.vue'
+
+// api
 import { queryNumCheckStandard } from '@/api/check/checkstandard'
-import { queryNumCheckjob, queryTuiCalendarIgnores } from '@/api/check/checkjob'
+import { queryNumCheckjob } 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
-
+import { queryChildNumSbInfo } from '@/api/sb/info'
 export default {
-  name: 'SbInfoDetail',
+  name: 'DetailC',
   components: {
-    BaseForm,
-    DetailList,
-    DetailListItem,
-    RepairApplicationFormTable,
-    CheckJobTable,
-    SparePartUsedSelectTable,
-    // SbOilPageTable,
-    SbRunFillPageTable,
-    SbInspectionFillPageTable,
-    DetailSbBom,
-    DetailSbCheck,
-    DetailSbCheckJob,
+    DetailInfo,
+    Children,
     PartInfoList,
-    DetailSbMeasure,
-    DetailSbInfo,
-    RepairFeeTable,
-    SbStatusLogTable,
-    SbStopLogTable,
-    RepairReportSbInfo,
-    RepairReportSbInfoFee
+    LocationList,
+    SbModelBom,
+    CheckStandard,
+    CheckJob,
+    DetailSbMeasure
   },
   data () {
     return {
-      confirmLoading: false,
-      mdl: {},
-      modalTitle: null,
-      paramList: [],
       visible: false,
-      visibleDetail: false,
-      activeKey: '3',
-      isChildMap: {},
-      isShowMap: {},
-      collapseActiveKey: '1',
-      model: {
-        'no': null,
-        'financingNo': null,
-        'financingNoTwo': null,
-        'financingNoThird': null,
-        'financingNoFour': null,
-        'financingNoFive': null,
-        'name': null,
-        'modelId': null,
-        'typeId': null,
-        'isShow': null,
-        'isChild': 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
-      },
-      numCheckStandard: 0,
-      numCheckjob: 0,
+      activeKey: 0,
+      model: {},
+      numCheckStandard1: 0,
+      numCheckjob1: 0,
+      numCheckStandard2: 0,
+      numCheckjob2: 0,
+      numCheckStandard3: 0,
+      numCheckjob3: 0,
       numRepairReason: 0,
       numModelbom: 0,
       numPartInfo: 0,
-      numChildSbInfo: 0,
-      firmProducerLevelMap: {},
-      firmSupplier: {},
-      firmProducer: {},
-      statusMap: {},
-      useTypeMap: {},
-      levelMap: {},
-      unitMap: {},
-      colorMap: {},
-      rlTypeMap: {},
-      sourceTypeMap: {}
+      numLocation: 0,
+      numChildSbInfo: 0
     }
   },
-  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.getRepairCheckFormLabelByValueMapByType(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)
-  },
   computed: {
-  },
-  methods: {
-    inited (viewer) {
-      this.$viewer = viewer
-    },
-    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 (record) {
-      const routeUrl = this.$router.resolve({ path: '/check/polling-standard', query: { id: this.model.id } })
-      // let routeUrl = this.$router.resolve(`/share/${96}`)
-      window.open(routeUrl.href, '_blank')
-    },
-    handleViewCheckJob (record) {
-      const routeUrl = this.$router.resolve({ path: '/check/polling-job', query: { id: this.model.id } })
-      window.open(routeUrl.href, '_blank')
-    },
-    // 根据keyNum路由相关页面
-    handleRouter (keyNum) {
-      const id = this.model.id
-      var routeUrl = ''
-      if (keyNum === 1) {
-        routeUrl = this.$router.resolve({ path: '/spare/used/record', query: { id: id } })
+    props () {
+      let props = null
+      switch (this.activeKey) {
+        case 0:
+        case 1:
+        case 7:
+          props = {
+            model: this.model
+          }
+          break
+        case 2:
+        case 3:
+        case 4:
+          props = {
+            sbId: this.model.id
+          }
+          break
+        case 5:
+        case 6:
+          props = {
+            checkType: 1,
+            sbId: this.model.id,
+            sbNo: this.model.no
+          }
+          break
       }
-      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: { id: id } })
-      }
-      if (keyNum === 4) {
-        routeUrl = this.$router.resolve({ path: '/repair/form', query: { id: 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 } })
-      }
-      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()
+      return props
     },
+    components () {
+      return [
+        {
+          name: '设备详情',
+          icon: 'appstore',
+          isMy: false,
+          component: 'DetailInfo'
+        },
+        {
+          name: '子设备',
+          icon: 'appstore',
+          isMy: false,
+          component: 'Children',
+          badge: {
+            title: '子设备总数',
+            count: this.numChildSbInfo
+          }
+        },
+        {
+          name: '设备部位',
+          icon: 'appstore',
+          isMy: false,
+          component: 'PartInfoList',
+          badge: {
+            title: '部位总数',
+            count: this.numPartInfo
+          }
+        },
+        {
+          name: '设备位号',
+          icon: 'appstore',
+          isMy: false,
+          component: 'LocationList',
+          badge: {
+            title: '位号总数',
+            count: this.numLocation
+          }
+        },
+        {
+          name: '备件BOM',
+          icon: 'appstore',
+          isMy: false,
+          component: 'SbModelBom',
+          badge: {
+            title: '备件总数',
+            count: this.numModelbom
+          }
+        },
+        {
+          name: '点检标准',
+          icon: 'appstore',
+          isMy: false,
+          component: 'CheckStandard',
+          badge: {
+            title: '点检标准',
+            count: this.numCheckStandard1
+          }
+        },
+        {
+          name: '点检任务',
+          icon: 'appstore',
+          isMy: false,
+          component: 'CheckJob',
+          badge: {
+            title: '点检任务',
+            count: this.numCheckjob1
+          }
+        },
+        {
+          name: '检定记录',
+          icon: 'appstore',
+          isMy: false,
+          component: 'DetailSbMeasure'
+        }
+      ]
+    }
+  },
+  methods: {
     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
-      })
+    },
+    handleBack () {
+      this.visible = false
+      this.activeKey = 0
+      this.$emit('ok')
     },
     fetchNum () {
       Promise.all([
         queryNumPartInfo({ sbId: this.model.id }),
         queryNumModelbom({ sbId: this.model.id }),
-        queryNumCheckStandard({ sbId: this.model.id }),
-        queryNumCheckjob({ sbId: this.model.id }),
-        queryNumRepairReason({ 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 }),
+        queryChildNumSbInfo({ parentId: this.model.id })
       ])
         .then((values) => {
           this.numPartInfo = values[0].data
           this.numModelbom = values[1].data
-          this.numCheckStandard = values[2].data
-          this.numCheckjob = values[3].data
-          this.numRepairReason = values[4].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
+          this.numChildSbInfo = values[10].data
+        }).then(() => {
+          this.$forceUpdate()
         })
-
-      // 如果是父设备,则要获取子设备的数量,并点击后可以看到子设备的情况
-      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.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 } })
-      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: 2 }).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;
+<style lang="less" scoped>
+.card{
+  background: #fff;
+  padding: 10px 10px 0 10px;
+  margin-bottom: 15px;
+}
+.tab-title{
+  text-align: center;
+  font-size: 18px;
+  .icon{
+    font-size: 30px;
+  }
+}
+.btn{
+  position: absolute;
+  bottom: 30px;
+  left:50%;
+  transform: translateX(-50%);
+}
+/deep/.ant-tabs-bar{
+  border:none;
 }
-.ant-card-body{
-  padding: 0  !important;
+/deep/.ant-tabs-ink-bar{
+  visibility: hidden;
 }
 </style>

+ 22 - 0
src/views/sb/info/modules/detail/Children.vue

@@ -0,0 +1,22 @@
+<template>
+  <SbInfo :parentId="model.id" :parentName="model.name"></SbInfo>
+</template>
+
+<script>
+export default {
+  name: 'SbChild',
+  components: {
+    SbInfo: () => import('../../SbInfo.vue')
+  },
+  props: {
+    model: {
+      type: Object,
+      default: () => {}
+    }
+  }
+}
+</script>
+
+<style>
+
+</style>

+ 207 - 0
src/views/sb/info/modules/detail/DetailInfo.vue

@@ -0,0 +1,207 @@
+<template>
+  <div>
+    <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.ppNo }}
+        </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.producerId }}
+        </a-descriptions-item>
+        <a-descriptions-item label="大小尺寸">
+          {{ model.zz }}
+        </a-descriptions-item>
+        <a-descriptions-item label="设备识别码">{{ model.identifyNo }}</a-descriptions-item>
+        <a-descriptions-item label="使用证号">{{ model.useNo }}</a-descriptions-item>
+        <a-descriptions-item label="设备代号">{{ model.sbCode }}</a-descriptions-item>
+        <a-descriptions-item label="安装单位">{{ model.installUnit }}</a-descriptions-item>
+        <a-descriptions-item label="检验结论">{{ model.examResult }}</a-descriptions-item>
+        <a-descriptions-item label="单位内部使用地点">{{ model.usePosition }}</a-descriptions-item>
+        <a-descriptions-item label="设备注册码">{{ model.sbRegisterNo }}</a-descriptions-item>
+
+        <a-descriptions-item label="出厂编号">{{ model.zzh }}</a-descriptions-item>
+        <a-descriptions-item label="操作压力">{{ model.jbdh }}</a-descriptions-item>
+        <a-descriptions-item label="操作温度">{{ model.fdjh }}</a-descriptions-item>
+        <a-descriptions-item label="介质">{{ model.characterType }}</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-item label="流量">
+          {{ model.liuLiang }}
+        </a-descriptions-item>
+        <a-descriptions-item label="扬程">
+          {{ model.yangCheng }}
+        </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.saveUser }}</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>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    model: {
+      type: Object,
+      default: () => {}
+    }
+  },
+  data () {
+    return {
+      visible: true,
+      paramList: [],
+      repairDeptMap: {},
+      rlTypeMap: {},
+      colorMap: {},
+      yesNoMap: {}
+    }
+  },
+  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)
+  },
+  methods: {}
+}
+</script>
+
+<style>
+
+</style>

+ 219 - 0
src/views/sb/info/modules/detail/DetailSbCheck.vue

@@ -0,0 +1,219 @@
+<template>
+  <a-card>
+    <title-divider title="设备信息" width="90px"></title-divider>
+    <detail-list title="" :col="3">
+      <detail-list-item term="设备编号">{{ model.no }}</detail-list-item>
+      <detail-list-item term="设备型号">{{ model.model }}</detail-list-item>
+      <detail-list-item term="设备名称">{{ model.name }}</detail-list-item>
+      <detail-list-item term="检定日期">{{ model.checkDate }}</detail-list-item>
+      <detail-list-item term="检定周期">{{ model.checkPeriod }}个月</detail-list-item>
+      <detail-list-item term="检定有效期">{{ model.nextCheckDate }}</detail-list-item>
+      <!--      <detail-list-item term="准确度等级">{{ model.fdjxh }}</detail-list-item>-->
+      <detail-list-item term="预警天数">{{ model.seatNumber }}天</detail-list-item>
+      <!--      <detail-list-item term="管理状态"> <badge
+        :status="DictCache.COLOR.SB_MEASURE_STATUS[model.status]"
+        :text="statusMap[model.status]" /></detail-list-item>-->
+    </detail-list>
+    <title-divider title="检定信息" width="90px"></title-divider>
+    <div class="table-operator" style="margin-bottom: 8px;">
+      <a-button type="primary" @click="handleAdd">
+        <a-icon type="plus"/>
+        添加
+      </a-button>
+    </div>
+    <a-table
+      :data-source="data"
+      :columns="columns"
+      tableLayout="auto"
+      rowKey="id">
+      <span slot="action" slot-scope="record">
+        <template>
+          <a v-if="$auth('sb-infos-edit')" @click="handleView(record)">查看</a>
+          <a-divider type="vertical" />
+          <a v-if="$auth('sb-infos-edit')" @click="handleEdit(record)">修改</a>
+          <a-divider type="vertical" />
+          <a-popconfirm v-if="$auth('sb-infos-del')" title="是否要删除该条数据?" @confirm="batchDelete(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
+        </template>
+      </span>
+    </a-table>
+    <base-form ref="baseModal" :type="1" @ok="handleOk"/>
+    <base-form-insert ref="baseModalInsert" @ok="handleOk"/>
+    <detail ref="detailModal"/>
+
+  </a-card>
+</template>
+
+<script>
+import DetailList from '@/components/tools/DetailList'
+import {
+  queryCheckStandard,
+  deleteCheckStandards,
+  exportCheckStandard,
+  fetchCheckStandard
+} from '@/api/sb/measurelog'
+import BaseForm from '@/views/sb/measurelog/modules/BaseForm'
+import BaseFormInsert from '@/views/sb/measurelog/modules/BaseFormInsert'
+import Detail from '@/views/sb/measurelog/modules/Detail'
+import { fetchSbInfo } from '@/api/sb/info'
+const DetailListItem = DetailList.Item
+
+export default {
+  name: 'DetailSbMeasure',
+  components: {
+    DetailList,
+    DetailListItem,
+    BaseForm,
+    Detail,
+    BaseFormInsert
+  },
+  props: {
+    model: {
+      type: Object,
+      default: () => {}
+    }
+  },
+  data () {
+    return {
+      confirmLoading: false,
+      mdl: {},
+      modalTitle: null,
+      visible: false,
+      typeMap: {},
+      statusMap: {},
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          customRender: (text, record, index) => {
+            return index + 1
+          }
+        },
+        {
+          title: '检定单号',
+          dataIndex: 'no'
+        },
+        {
+          title: '检定人',
+          dataIndex: 'name'
+        },
+        {
+          title: '检定单位',
+          dataIndex: 'requirement'
+        },
+        {
+          title: '检定日期',
+          dataIndex: 'lastDate'
+        },
+        {
+          title: '操作',
+          key: 'action',
+          checked: true,
+          align: 'center',
+          // fixed: 'right',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      data: []
+    }
+  },
+  created () {
+    // 下拉框map
+    this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_STANDARD_TYPE)
+    this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_MEASURE_STATUS)
+    this.actionTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_PLAN_ACTION_TYPE)
+    this.base()
+  },
+  methods: {
+    base () {
+      this.visible = true
+      this.modalTitle = '详情'
+      queryCheckStandard({ sbId: this.model.id }).then(res => {
+        this.data = res.data
+      })
+    },
+    handleOk () {
+      queryCheckStandard({ sbId: this.model.id }).then(res => {
+        this.data = res.data
+      })
+      fetchSbInfo({ id: this.model.id }).then(res => {
+        this.model = res.data
+      })
+    },
+    handleAdd () {
+      const modal = this.$refs.baseModal
+      modal.base(null, this.model)
+    },
+    handleView (record) {
+      fetchCheckStandard({ id: record.id }).then(res => {
+        const modal = this.$refs.detailModal
+        res.data.partName = record.partName
+        modal.base(res.data)
+      })
+    },
+    handleEdit (record) {
+      fetchCheckStandard({ id: record.id }).then(res => {
+        const modal = this.$refs.baseModal
+        modal.base(res.data)
+      })
+    },
+    handleCopy (record) {
+      const modal = this.$refs.baseModal
+      const data = record
+      data.id = null
+      modal.base(data)
+    },
+    handleGenerate (record) {
+      const modal = this.$refs.baseModalInsert
+      modal.base(null, record.id)
+    },
+    handleCancel () {
+      this.visible = false
+      this.confirmLoading = false
+      this.$emit('ok')
+    },
+    batchDelete (id) {
+      let ids = []
+      if (this.BaseTool.String.isBlank(id)) {
+        if (length === 0) {
+          this.$message.info('请选择要删除的记录')
+          return
+        }
+        ids = this.selectedRows.map(item => item.id)
+      } else {
+        ids = [id]
+      }
+      deleteCheckStandards(ids).then(res => {
+        this.$message.info('删除成功')
+        this.handleOk()
+      })
+    },
+    doExport () {
+      const parameter = {
+        ...this.queryParam
+      }
+      parameter.modelId = this.model.id
+      exportCheckStandard(parameter).then(file => {
+        this.BaseTool.UPLOAD.downLoadExportExcel(file)
+      })
+    }
+    /* handleSbSelect () {
+      this.$refs.sbInfoSelectModal.base()
+    },
+    handleSbSelectd (keys, rows) {
+      const [ key ] = keys
+      const [ row ] = rows
+      // 日期处理
+      copy({ sbId: this.model.id, copySbId: row.id })
+        .then((response) => {
+          this.$message.info(response.data)
+          this.handleOk()
+        }).catch(() => {
+          this.confirmLoading = false
+        })
+    } */
+  }
+}
+</script>

+ 306 - 0
src/views/sb/info/modules/detail/LocationList.vue

@@ -0,0 +1,306 @@
+<template>
+  <a-card
+    title="位号列表"
+  >
+    <a-card :bordered="false">
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline">
+          <a-row :gutter="48">
+            <a-col :md="8" :sm="24">
+              <a-form-item label="关键字">
+                <a-input v-model.trim="queryParam.keyword" placeholder="请输入名称/编码"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="8 || 24" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+
+      <div class="table-operator" style="margin-bottom: 8px;">
+        <a-button v-if="$auth('sb-locations-add')" type="primary" icon="plus" @click="$refs.baseModal.base(dataParam,1)">新增</a-button>
+        <!--        <a-button style="margin-left:8px;" type="primary" @click="handleSbSelect">
+          <a-icon type="plus"/>
+          复制
+        </a-button>-->
+        <!--        <a-button style="margin-left: 8px" v-if="$auth('sb-locations-export')" type="primary" icon="download" @click="doExport">导出</a-button>-->
+        <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('sb-locations-del')">
+          <a-menu slot="overlay">
+            <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
+              <a-menu-item key="1"><a-icon type="delete" /><a>删除</a></a-menu-item>
+            </a-popconfirm>
+          </a-menu>
+          <a-button style="margin-left: 8px">
+            批量操作 <a-icon type="down" />
+          </a-button>
+        </a-dropdown>
+      </div>
+
+      <s-table
+        ref="table"
+        size="default"
+        rowKey="id"
+        :columns="columns"
+        :data="loadData"
+        :alert="options.alert"
+        :rowSelection="options.rowSelection"
+        showPagination="auto"
+        :scroll="{y: BaseTool.Constant.scrollY }"
+      >
+        <span slot="action" slot-scope="record">
+          <template>
+            <operation-button :show-divider="false" @click="handleView(record)" >查看</operation-button>
+            <operation-button
+              v-if="$auth('sb-locations-edit')"
+              @click="handleEdit(record)" >修改</operation-button>
+            <operation-button
+              v-if="$auth('sb-locations-del')"
+              :type="2"
+              title="是否要删除该条数据?"
+              @confirm="batchDelete(record.id)">删除</operation-button>
+            <operation-button
+              v-if="$auth('sb-locations-copy')"
+              @click="handleCopy(record)" >复制</operation-button>
+          </template>
+        </span>
+        <span slot="status" slot-scope="text">
+          <badge
+            :status="DictCache.COLOR.PART_STATUS[text]"
+            :text="statusMap[text]" />
+        </span>
+      </s-table>
+      <base-form ref="baseModal" @ok="handleOk"/>
+      <detail ref="detailModal"/>
+      <sb-info-select-modal :type="'radio'" ref="sbInfoSelectModal" @selected="handleSbSelectd"/>
+    </a-card>
+  </a-card>
+</template>
+
+<script>
+import { STable, Ellipsis } from '@/components'
+import BaseForm from '@/views/sb/location/modules/BaseForm'
+import Detail from '@/views/sb/location/modules/Detail'
+import { getSbLocationPage, copy, deleteSbLocations, fetchSbLocation, exportSbLocation } from '@/api/sb/location'
+import SbInfoSelectModal from '@/views/sb/info/modules/SbInfoSelectModal'
+
+export default {
+  name: 'LocationList',
+  components: {
+    STable,
+    Ellipsis,
+    BaseForm,
+    Detail,
+    SbInfoSelectModal
+  },
+  props: {
+    sbId: {
+      type: String,
+      default: null
+    }
+  },
+  data () {
+    return {
+      // 查询参数
+      queryParam: {
+      },
+      confirmLoading: false,
+      mdl: {},
+      modalTitle: null,
+      dataParam: {},
+      statusMap: {},
+      levelMap: {},
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          width: 50,
+          customRender: (text, record, index) => {
+            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
+          }
+        },
+        {
+          title: '位号编号',
+          dataIndex: 'no',
+          checked: true
+        },
+        {
+          title: '位号名称',
+          dataIndex: 'name',
+          checked: true
+        },
+        {
+          title: '备注',
+          dataIndex: 'remark',
+          checked: true
+        },
+        {
+          title: '创建日期',
+          dataIndex: 'createdTime',
+          checked: true
+        },
+        {
+          title: '操作',
+          key: 'action',
+          checked: true,
+          width: '200px',
+          align: 'center',
+          fixed: 'right',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        parameter = {
+          ...parameter,
+          ...this.queryParam,
+          sbId: this.sbId,
+          dataScope: {
+            sortBy: 'desc',
+            sortName: 'update_time'
+          }
+        }
+        return getSbLocationPage(Object.assign(parameter, this.queryParam))
+          .then(res => {
+            return res.data
+          })
+      },
+      selectedRowKeys: [],
+      selectedRows: [],
+      options: {
+        alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+        rowSelection: {
+          selectedRowKeys: this.selectedRowKeys,
+          onChange: this.onSelectChange
+        }
+      },
+      optionAlertShow: false,
+      isCreated: false
+    }
+  },
+  created () {
+    this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PART_STATUS)
+    this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PART_LEVEL)
+  },
+  methods: {
+    tableOption () {
+      if (!this.optionAlertShow) {
+        this.options = {
+          alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+          rowSelection: {
+            selectedRowKeys: this.selectedRowKeys,
+            onChange: this.onSelectChange,
+            getCheckboxProps: record => ({
+              props: {
+                disabled: false,
+                name: record.id
+              }
+            })
+          }
+        }
+        this.optionAlertShow = true
+      } else {
+        this.options = {
+          alert: false,
+          rowSelection: null
+        }
+        this.optionAlertShow = false
+      }
+    },
+    base (dataParam = {}, queryParam = {}) {
+      this.visible = true
+      this.modalTitle = '位号列表'
+      this.queryParam = queryParam
+      this.sbId = queryParam.sbId
+      this.dataParam = dataParam
+      if (this.isCreated) {
+        this.$refs.table.clearSelected()
+        this.handleOk()
+      } else {
+        this.tableOption()
+        this.isCreated = true
+      }
+      // this.mySelect(this.selectedRowKeys, this.selectedRows)
+    },
+    batchDelete (id) {
+      let ids = []
+      if (this.BaseTool.String.isBlank(id)) {
+        const length = this.selectedRows.length
+        if (length === 0) {
+          this.$message.info('请选择要删除的记录')
+          return
+        }
+        ids = this.selectedRows.map(item => item.id)
+      } else {
+        ids = [id]
+      }
+      deleteSbLocations(ids).then(res => {
+        this.$message.info('删除成功')
+        this.handleOk()
+        this.$refs.table.clearSelected()
+      })
+    },
+    handleEdit (record) {
+      fetchSbLocation({ id: record.id }).then(res => {
+        const modal = this.$refs.baseModal
+        modal.base(res.data)
+      })
+    },
+    handleView (record) {
+      fetchSbLocation({ id: record.id }).then(res => {
+        const modal = this.$refs.detailModal
+        modal.base(res.data)
+      })
+    },
+    handleCopy (record) {
+      fetchSbLocation({ id: record.id }).then(res => {
+        const modal = this.$refs.baseModal
+        res.data.id = null
+        modal.base(res.data, 2)
+      })
+    },
+    handleOk () {
+      this.$refs.table.refresh()
+    },
+    onSelectChange (selectedRowKeys, selectedRows) {
+      this.selectedRowKeys = selectedRowKeys
+      this.selectedRows = selectedRows
+    },
+    resetSearchForm () {
+      this.queryParam = {
+      }
+      this.$refs.table.refresh(true)
+    },
+    handleCancel () {
+      this.visible = false
+      this.confirmLoading = false
+    },
+    doExport () {
+      const parameter = {
+        ...this.queryParam
+      }
+      exportSbLocation(parameter).then(file => {
+        this.BaseTool.UPLOAD.downLoadExportExcel(file)
+      })
+    },
+    handleSbSelect () {
+      this.$refs.sbInfoSelectModal.base()
+    },
+    handleSbSelectd (keys, rows) {
+      const [ row ] = rows
+      // 日期处理
+      copy({ sbId: this.sbId, copySbId: row.id })
+        .then((response) => {
+          this.$message.info(response.data)
+          this.handleOk()
+        }).catch(() => {
+          this.confirmLoading = false
+        })
+    }
+  }
+}
+</script>

+ 320 - 0
src/views/sb/info/modules/detail/PartInfoList.vue

@@ -0,0 +1,320 @@
+<template>
+  <a-card
+    title="部位列表"
+  >
+    <a-card :bordered="false">
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline">
+          <a-row :gutter="48">
+            <a-col :md="8" :sm="24">
+              <a-form-item label="关键字">
+                <a-input v-model.trim="queryParam.keyword" placeholder="请输入名称/编码"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="8 || 24" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+
+      <div class="table-operator" style="margin-bottom: 8px;">
+        <a-button v-if="$auth('sb-part-infos-add')" type="primary" icon="plus" @click="$refs.baseModal.base(dataParam,1)">新增</a-button>
+        <a-button style="margin-left:8px;" type="primary" @click="handleSbSelect">
+          <a-icon type="plus"/>
+          复制
+        </a-button>
+        <!--        <a-button style="margin-left: 8px" v-if="$auth('sb-part-infos-export')" type="primary" icon="download" @click="doExport">导出</a-button>-->
+        <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('sb-part-infos-del')">
+          <a-menu slot="overlay">
+            <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
+              <a-menu-item key="1"><a-icon type="delete" /><a>删除</a></a-menu-item>
+            </a-popconfirm>
+          </a-menu>
+          <a-button style="margin-left: 8px">
+            批量操作 <a-icon type="down" />
+          </a-button>
+        </a-dropdown>
+      </div>
+
+      <s-table
+        ref="table"
+        size="default"
+        rowKey="id"
+        :columns="columns"
+        :data="loadData"
+        :alert="options.alert"
+        :rowSelection="options.rowSelection"
+        showPagination="auto"
+        :scroll="{y: BaseTool.Constant.scrollY }"
+      >
+        <span slot="action" slot-scope="record">
+          <template>
+            <operation-button :show-divider="false" @click="handleView(record)" >查看</operation-button>
+            <operation-button
+              v-if="$auth('sb-part-infos-edit')"
+              @click="handleEdit(record)" >修改</operation-button>
+            <operation-button
+              v-if="$auth('sb-part-infos-del')"
+              :type="2"
+              title="是否要删除该条数据?"
+              @confirm="batchDelete(record.id)">删除</operation-button>
+            <operation-button
+              v-if="$auth('sb-part-infos-copy')"
+              @click="handleCopy(record)" >复制</operation-button>
+          </template>
+        </span>
+        <span slot="status" slot-scope="text">
+          <badge
+            :status="DictCache.COLOR.PART_STATUS[text]"
+            :text="statusMap[text]" />
+        </span>
+      </s-table>
+      <base-form ref="baseModal" @ok="handleOk"/>
+      <detail ref="detailModal"/>
+      <sb-info-select-modal :type="'radio'" ref="sbInfoSelectModal" @selected="handleSbSelectd"/>
+    </a-card>
+  </a-card>
+</template>
+
+<script>
+import { STable, Ellipsis } from '@/components'
+import BaseForm from '@/views/part/info/modules/BaseForm'
+import Detail from '@/views/part/info/modules/Detail'
+import { getPartInfoPage, copy, deletePartInfos, fetchPartInfo, exportPartInfo } from '@/api/part/info'
+import SbInfoSelectModal from '@/views/sb/info/modules/SbInfoSelectModal'
+
+export default {
+  name: 'PartInfoList',
+  components: {
+    STable,
+    Ellipsis,
+    BaseForm,
+    Detail,
+    SbInfoSelectModal
+  },
+  props: {
+    sbId: {
+      type: String,
+      default: null
+    }
+  },
+  data () {
+    return {
+      // 查询参数
+      queryParam: {
+      },
+      confirmLoading: false,
+      mdl: {},
+      modalTitle: null,
+      visible: false,
+      dataParam: {},
+      statusMap: {},
+      levelMap: {},
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          width: 50,
+          customRender: (text, record, index) => {
+            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
+          }
+        },
+        {
+          title: '部位名称',
+          dataIndex: 'name',
+          checked: true
+        },
+        {
+          title: '部位类别',
+          dataIndex: 'typeId',
+          width: 100,
+          checked: true,
+          customRender: (text, record, index) => {
+            return record.typeName
+          }
+        },
+        {
+          title: '部位等级',
+          dataIndex: 'level',
+          width: 100,
+          checked: true,
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.levelMap, text)
+          }
+        },
+        {
+          title: '备注',
+          dataIndex: 'remark',
+          width: 300
+        },
+        {
+          title: '创建日期',
+          dataIndex: 'createdTime',
+          width: 300
+        },
+        {
+          title: '操作',
+          key: 'action',
+          checked: true,
+          width: '200px',
+          align: 'center',
+          fixed: 'right',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        parameter = {
+          ...parameter,
+          ...this.queryParam,
+          sbId: this.sbId,
+          dataScope: {
+            sortBy: 'desc',
+            sortName: 'update_time'
+          }
+        }
+        return getPartInfoPage(Object.assign(parameter, this.queryParam))
+          .then(res => {
+            return res.data
+          })
+      },
+      selectedRowKeys: [],
+      selectedRows: [],
+      options: {
+        alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+        rowSelection: {
+          selectedRowKeys: this.selectedRowKeys,
+          onChange: this.onSelectChange
+        }
+      },
+      optionAlertShow: false,
+      isCreated: false
+    }
+  },
+  created () {
+    this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PART_STATUS)
+    this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PART_LEVEL)
+  },
+  methods: {
+    tableOption () {
+      if (!this.optionAlertShow) {
+        this.options = {
+          alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+          rowSelection: {
+            selectedRowKeys: this.selectedRowKeys,
+            onChange: this.onSelectChange,
+            getCheckboxProps: record => ({
+              props: {
+                disabled: false,
+                name: record.id
+              }
+            })
+          }
+        }
+        this.optionAlertShow = true
+      } else {
+        this.options = {
+          alert: false,
+          rowSelection: null
+        }
+        this.optionAlertShow = false
+      }
+    },
+    base (dataParam = {}, queryParam = {}) {
+      this.visible = true
+      this.modalTitle = '部位列表'
+      this.queryParam = queryParam
+      this.sbId = queryParam.sbId
+      this.dataParam = dataParam
+      if (this.isCreated) {
+        this.$refs.table.clearSelected()
+        this.handleOk()
+      } else {
+        this.tableOption()
+        this.isCreated = true
+      }
+      // this.mySelect(this.selectedRowKeys, this.selectedRows)
+    },
+    batchDelete (id) {
+      let ids = []
+      if (this.BaseTool.String.isBlank(id)) {
+        const length = this.selectedRows.length
+        if (length === 0) {
+          this.$message.info('请选择要删除的记录')
+          return
+        }
+        ids = this.selectedRows.map(item => item.id)
+      } else {
+        ids = [id]
+      }
+      deletePartInfos(ids).then(res => {
+        this.$message.info('删除成功')
+        this.handleOk()
+        this.$refs.table.clearSelected()
+      })
+    },
+    handleEdit (record) {
+      fetchPartInfo({ id: record.id }).then(res => {
+        const modal = this.$refs.baseModal
+        modal.base(res.data)
+      })
+    },
+    handleView (record) {
+      fetchPartInfo({ id: record.id }).then(res => {
+        const modal = this.$refs.detailModal
+        modal.base(res.data)
+      })
+    },
+    handleCopy (record) {
+      fetchPartInfo({ id: record.id }).then(res => {
+        const modal = this.$refs.baseModal
+        res.data.id = null
+        modal.base(res.data, 2)
+      })
+    },
+    handleOk () {
+      this.$refs.table.refresh()
+    },
+    onSelectChange (selectedRowKeys, selectedRows) {
+      this.selectedRowKeys = selectedRowKeys
+      this.selectedRows = selectedRows
+    },
+    resetSearchForm () {
+      this.queryParam = {
+      }
+      this.$refs.table.refresh(true)
+    },
+    handleCancel () {
+      this.visible = false
+      this.confirmLoading = false
+    },
+    doExport () {
+      const parameter = {
+        ...this.queryParam
+      }
+      exportPartInfo(parameter).then(file => {
+        this.BaseTool.UPLOAD.downLoadExportExcel(file)
+      })
+    },
+    handleSbSelect () {
+      this.$refs.sbInfoSelectModal.base()
+    },
+    handleSbSelectd (keys, rows) {
+      const [ row ] = rows
+      // 日期处理
+      copy({ sbId: this.sbId, copySbId: row.id })
+        .then((response) => {
+          this.$message.info(response.data)
+          this.handleOk()
+        }).catch(() => {
+          this.confirmLoading = false
+        })
+    }
+  }
+}
+</script>

+ 8 - 2
src/views/sb/modelbom/SbModelBom.vue

@@ -44,7 +44,7 @@
           </div>
 
           <div class="table-operator" style="margin-bottom: 8px;">
-            <a-button style="margin-left: 8px"  type="primary" icon="download" @click="doExport">导出</a-button>
+            <a-button style="margin-left: 8px" type="primary" icon="download" @click="doExport">导出</a-button>
             <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('sb-infos-del')">
               <a-menu slot="overlay">
                 <a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
@@ -117,11 +117,17 @@ export default {
     DownloadModal,
     PreviewModal
   },
+  props: {
+    sbId: {
+      type: String,
+      default: null
+    }
+  },
   data () {
     return {
       // 查询参数
       queryParam: {
-        id: this.$route.query.id
+        sbId: this.sbId
       },
       depreciationTypeMap: {},
       levelMap: {},