| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224 |
- <template>
- <a-modal :title="modalTitle" :width="1200" :visible="visible" :confirmLoading="confirmLoading" @cancel="handleCancel">
- <detail-list title="" :col="2">
- <!-- <detail-list-item term="标准名称">{{ model.name }}</detail-list-item>-->
- <detail-list-item term="排序">{{ model.sort }}</detail-list-item>
- <detail-list-item term="编码">{{ model.no }}</detail-list-item>
- <!-- 保养标准查看界面补充缺失参数 -->
- <detail-list-item v-if="checkType === 2" term="设备编号">{{ sbInfo.sbNo }}</detail-list-item>
- <detail-list-item v-if="checkType === 2" term="设备名称">{{ sbInfo.sbName }}</detail-list-item>
- <detail-list-item v-if="checkType === 2" term="执行人方式">{{ BaseTool.Object.getField(checkUserTypeMap,
- sbInfo.checkUserType) }}</detail-list-item>
- <detail-list-item v-if="checkType === 2" term="执行人/班组">{{ sbInfo.checkUserName || sbInfo.checkDeptName || '-'
- }}</detail-list-item>
- <!-- <detail-list-item term="检查类型">{{ BaseTool.Object.getField(typeMap,model.type) }}</detail-list-item>-->
- <detail-list-item term="维护等级">{{ BaseTool.Object.getField(levelMap, model.level) }}</detail-list-item>
- <detail-list-item term="计划周期">{{ model.period }}{{ BaseTool.Object.getField(periodTypeMap, model.periodType)
- }}</detail-list-item>
- <detail-list-item term="标准工时">{{ model.standardHours }}</detail-list-item>
- <detail-list-item term="上次实际日期">{{ model.lastDate }}</detail-list-item>
- <detail-list-item term="下次预计日期">{{ model.nextDate }}</detail-list-item>
- <!-- <detail-list-item term="动作类型">{{ BaseTool.Object.getField(actionTypeMap,model.actionType) }}</detail-list-item>-->
- <!-- <detail-list-item term="部位">{{ model.partName }}</detail-list-item>-->
- <!-- <detail-list-item term="是否启用"><badge :status="DictCache.COLOR.YES_NO[model.enable]" :text="enableMap[model.enable]"></badge></detail-list-item>-->
- <!-- <detail-list-item term="创建人">{{ model.createdUserName }}</detail-list-item>
- <detail-list-item term="更新人">{{ model.updateUserName }}</detail-list-item>
- <detail-list-item term="创建时间">{{ model.updateTime }}</detail-list-item>
- <detail-list-item term="更新时间">{{ model.updateTime }}</detail-list-item>-->
- </detail-list>
- <detail-list title="" :col="1">
- <!-- <detail-list-item term="检查项目">{{ model.requirement }}</detail-list-item> -->
- <detail-list-item term="检查标准">{{ model.remark }}</detail-list-item>
- </detail-list>
- <title-divider title="检查项目" width="90px"></title-divider>
- <a-table :data-source="model.requirementList" :columns="columns2" bordered rowKey="bomId" :pagination="false">
- </a-table>
- <template slot="footer">
- <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">返回</a-button>
- </template>
- <title-divider title="标准图片" width="90px"></title-divider>
- <detail-list title="" :col="1">
- <detail-list-item term="" v-if="model.checkImgList != null && model.checkImgList.length > 0">
- <viewer :images="model.checkImgList" @inited="inited" ref="viewer" :index="1">
- <img v-for="item in model.checkImgList" :src="item.url" :key="item.id" class="image">
- </viewer>
- </detail-list-item>
- <detail-list-item term="" v-if="model.checkImgList == null || model.checkImgList.length === 0">
- 暂无
- </detail-list-item>
- </detail-list>
- <title-divider title="标准文件" width="90px"></title-divider>
- <detail-list title="" :col="8">
- <detail-list-item term="">
- <a-upload :multiple="true" :fileList="BaseTool.UPLOAD.transImg(model.checkFileList)">
- </a-upload>
- </detail-list-item>
- </detail-list>
- <!-- <a-tabs type="card" default-active-key="1">
- <a-tab-pane key="1" tab="点检标准参数">
- <a-table
- bordered
- :data-source="data"
- :columns="columns"
- tableLayout="auto"
- rowKey="id"
- >
- </a-table>
- </a-tab-pane>
- </a-tabs>-->
- <title-divider title="关联备件" width="90px"></title-divider>
- <a-table :data-source="data" :columns="columns" bordered tableLayout="auto" rowKey="bomId">
- </a-table>
- <!-- <template slot="footer">
- <a-button :loading="confirmLoading" type="primary" @click="handleCancel()">返回</a-button>
- </template> -->
- </a-modal>
- </template>
- <script>
- import DetailList from '@/components/tools/DetailList'
- const DetailListItem = DetailList.Item
- export default {
- name: 'CheckStandardDetail',
- components: {
- DetailList,
- DetailListItem,
- },
- props: {
- /**
- * 检查类型: 1-点检 2-保养
- */
- checkType: {
- type: Number,
- default: 1,
- },
- },
- data() {
- return {
- confirmLoading: false,
- mdl: {},
- modalTitle: null,
- visible: false,
- // 下拉框map
- typeMap: {},
- levelMap: {},
- periodTypeMap: {},
- checkUserTypeMap: {},
- actionTypeMap: {},
- enableMap: {},
- model: {
- /* 'name': null, */
- no: null,
- type: null,
- level: null,
- part: null,
- enable: null,
- requirement: null,
- standardHours: null,
- remark: null,
- nextDate: null,
- lastDate: null,
- createdUserId: null,
- updateUserId: null,
- updateUserName: null,
- updateTime: null,
- },
- sbInfo: {},
- // 表头
- columns2: [
- {
- title: '保养周期',
- dataIndex: 'period'
- },
- {
- title: '管理项目',
- dataIndex: 'manageItem',
- },
- {
- title: '检查项目',
- dataIndex: 'checkItem',
- },
- {
- title: '方法工具',
- dataIndex: 'method',
- },
- {
- title: '保养级别',
- dataIndex: 'checkLevel',
- },
- {
- title: '标准类型',
- dataIndex: 'sbTypeName',
- },
- {
- title: '内容',
- dataIndex: 'remark',
- },
- // {
- // title: '类型',
- // dataIndex: 'type',
- // customRender: (text, record, index) => {
- // return this.BaseTool.Table.getMapText(this.typeDetailMap, text)
- // },
- // },
- ],
- columns: [
- {
- title: '名称',
- dataIndex: 'spareName',
- },
- {
- title: '规格型号',
- dataIndex: 'ggxh',
- },
- {
- title: '数量',
- dataIndex: 'num',
- width: 150,
- scopedSlots: { customRender: 'num' },
- },
- ],
- data: [],
- typeDetailMap: {},
- }
- },
- created() {
- // 下拉框map
- this.typeDetailMap = this.DictCache.getLabelByValueMapByType('check_item_type')
- this.typeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_STANDARD_TYPE)
- this.enableMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
- this.periodTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_PLAN_PERIOD_TYPE)
- this.actionTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_PLAN_ACTION_TYPE)
- this.checkUserTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_USER_TYPE)
- this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_PLAN_LEVEL)
- },
- methods: {
- inited(viewer) {
- this.$viewer = viewer
- // this.$viewer.index = 0
- // // 不要他的按钮
- // this.$viewer.options.button = false
- // // 不要他的底部缩略图
- // this.$viewer.options.navbar = false
- // // 不要他的底部标题
- // this.$viewer.options.title = false
- // // 不要他的底部工具栏
- // this.$viewer.options.toolbar = false
- },
- base(record, sbInfo) {
- this.visible = true
- this.modalTitle = '详情'
- this.model = record
- this.sbInfo = sbInfo
- this.data = record.detailList
- },
- handleCancel() {
- this.visible = false
- this.confirmLoading = false
- },
- },
- }
- </script>
|