123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- <template>
- <a-modal
- :title="modalTitle"
- :width="1200"
- :visible="visible"
- :confirmLoading="confirmLoading"
- @cancel="handleCancel"
- >
- <title-divider title="明细列表" width="90px"></title-divider>
- <div class="table-operator">
- <a-button v-if="$auth('check-polling-jobs-add')" type="primary" icon="download" style="margin-bottom: 10px">导出</a-button>
- </div>
- <a-table
- bordered
- :data-source="data"
- :columns="columns"
- :scroll="{x: 1000, y: BaseTool.Constant.scrollY}"
- tableLayout="auto"
- rowKey="id"
- >
- <span slot="action" slot-scope="record">
- <template>
- <a @click="handleView(record)">查看</a>
- </template>
- </span>
- <span slot="status" slot-scope="text">
- <badge :text="BaseTool.Object.getField(statusMap,text)" :status="DictCache.COLOR.REPAIR_APPLICATION_FORM_STATUS[text]"/>
- </span>
- </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: 'DetailRepairReport',
- components: {
- DetailList,
- DetailListItem
- },
- data () {
- return {
- confirmLoading: false,
- mdl: {},
- modalTitle: null,
- visible: false,
- // 下拉框map
- typeMap: {},
- statusMap: {},
- model: {},
- // 查询参数
- queryParam: {
- filter: this.filter,
- searchType: this.searchType
- },
- // 表头
- columns: [
- {
- title: '序号',
- dataIndex: 'index',
- checked: true,
- width: '70px',
- customRender: (text, record, index) => {
- return `${index + 1}`
- }
- },
- {
- title: '设备新号',
- dataIndex: 'sbNo',
- checked: true,
- width: '150px'
- },
- {
- title: '设备名称',
- dataIndex: 'sbName',
- checked: true,
- width: '200px'
- },
- {
- title: '设备部位',
- dataIndex: 'partName',
- checked: true,
- width: '150px'
- },
- {
- title: '维护等级',
- dataIndex: 'standardLevel',
- width: '100px',
- checked: true,
- customRender: (text, record, index) => {
- return this.BaseTool.Table.getMapText(this.standardLevelMap, text)
- }
- },
- {
- title: '任务要求',
- dataIndex: 'requirement',
- checked: true,
- width: '200px'
- },
- {
- title: '计划周期',
- dataIndex: 'period',
- checked: true,
- width: '150px',
- customRender: (text, record, index) => {
- return text + this.BaseTool.Table.getMapText(this.periodTypeMap, record.periodType)
- }
- },
- /* {
- title: '计划名称',
- dataIndex: 'planName',
- checked: true
- }, */
- {
- title: '负责人',
- dataIndex: 'checkUserName',
- checked: true,
- width: '150px'
- },
- // {
- // title: '负责部件',
- // dataIndex: 'partName',
- // checked: true
- // },
- /* {
- title: '截至日期',
- dataIndex: 'endTime',
- checked: true,
- width: '200px'
- }, */
- {
- title: '标准工时',
- dataIndex: 'standardHours',
- checked: true,
- width: '200px'
- },
- {
- title: '实际工时',
- dataIndex: 'realHours',
- checked: true,
- width: '200px'
- },
- {
- title: '实际结束时间',
- dataIndex: 'actualEndTime',
- checked: true,
- width: '200px'
- },
- {
- title: '执行日期',
- dataIndex: 'startTime',
- checked: true,
- width: '200px'
- },
- {
- title: '实际执行日期',
- dataIndex: 'actualStartTime',
- checked: true,
- width: '200px',
- customRender: (text, record, index) => {
- return (text == null ? '暂无' : this.BaseTool.Date.formatter(text, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN))
- }
- },
- {
- title: '任务状态',
- dataIndex: 'status',
- width: '100px',
- checked: true,
- fixed: 'right',
- scopedSlots: { customRender: 'status' }
- },
- {
- title: '操作',
- key: 'action',
- width: '100px',
- fixed: 'right',
- align: 'center',
- scopedSlots: { customRender: 'action' },
- checked: true
- }
- ],
- // 下拉框map
- levelMap: {},
- standardLevelMap: {},
- sbStatusMap: {},
- periodTypeMap: {},
- data: []
- }
- },
- created () {
- // 下拉框map
- this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_JOB_STATUS)
- this.sbStatusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
- this.periodTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_PLAN_PERIOD_TYPE)
- this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_LEVEL)
- this.standardLevelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_PLAN_LEVEL)
- },
- methods: {
- base (record) {
- this.visible = true
- this.modalTitle = '详情'
- this.model = record
- this.data = record.detailList
- },
- handleCancel () {
- this.visible = false
- this.confirmLoading = false
- },
- handleView (record) {
- }
- }
- }
- </script>
|