123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <template>
- <a-modal
- :width="1000"
- :visible="visible"
- title="详情"
- :confirmLoading="confirmLoading"
- :footer="null"
- @cancel="handleCancel" >
- <a-table
- bordered
- :data-source="list"
- :columns="columns"
- tableLayout="auto"
- rowKey="id">
- <span slot="status" slot-scope="text">
- <badge :text="BaseTool.Object.getField(statusMap,text)" :status="DictCache.COLOR.REPAIR_FORM_STATUS[text]"/>
- </span>
- </a-table>
- </a-modal>
- </template>
- <script>
- export default {
- data () {
- return {
- visible: false,
- confirmLoading: false,
- list: [],
- statusMap: {},
- preparationMap: {},
- columns: [
- {
- title: '内容',
- checked: true,
- width: '150',
- dataIndex: 'name'
- },
- {
- title: '申请人',
- checked: true,
- width: '150',
- dataIndex: 'userName'
- },
- {
- title: '公司',
- checked: true,
- width: '200',
- dataIndex: 'parentPositionId',
- customRender: (text, record, index) => {
- return this.BaseTool.Object.getField(this.preparationMap, text)
- }
- },
- {
- title: '申请部门',
- checked: true,
- width: '150',
- dataIndex: 'deptName'
- },
- {
- title: '建筑物',
- checked: true,
- width: '150',
- dataIndex: 'positionName'
- },
- {
- title: '费用(元)',
- checked: true,
- width: '150',
- dataIndex: 'fee'
- },
- {
- title: '报修时间',
- checked: true,
- width: '150',
- dataIndex: 'applyTime'
- },
- {
- title: '要求完成日期',
- checked: true,
- width: '150',
- dataIndex: 'limitHours'
- },
- {
- title: '报修状态',
- checked: true,
- dataIndex: 'status',
- width: 150,
- scopedSlots: { customRender: 'status' }
- }
- ]
- }
- },
- created () {
- this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_PREPARATION_STATUS)
- this.preparationMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PREPARATION_PARENT)
- },
- methods: {
- base (record) {
- console.log(record.detailList)
- this.visible = true
- this.list = record.detailList
- },
- handleCancel (values) {
- this.visible = false
- this.confirmLoading = false
- }
- }
- }
- </script>
- <style>
- </style>
|