¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | :class="'cust-erp-sub-tab'" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <div> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | :scroll="{ x: 'calc(1400px + 50%)', y: 900 }" |
| | | > |
| | | <!-- :scroll="{x:true}" --> |
| | | |
| | | <template |
| | | slot="htmlSlot" |
| | | slot-scope="text" |
| | | > |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template |
| | | slot="equipmentPhoto" |
| | | slot-scope="text,record" |
| | | > |
| | | <span |
| | | v-if="!text" |
| | | style="font-size: 12px;font-style: italic;" |
| | | >æ å¾ç</span> |
| | | <img |
| | | v-else |
| | | :src="getImgView(text)" |
| | | :preview="record.id" |
| | | height="25px" |
| | | alt="" |
| | | style="max-width:80px;font-size: 12px;font-style: italic;" |
| | | /> |
| | | </template> |
| | | <template |
| | | slot="fileSlot" |
| | | slot-scope="text" |
| | | > |
| | | <span |
| | | v-if="!text" |
| | | style="font-size: 12px;font-style: italic;" |
| | | >æ æä»¶</span> |
| | | <a-button |
| | | v-else |
| | | :ghost="true" |
| | | type="primary" |
| | | icon="download" |
| | | size="small" |
| | | @click="downloadFile(text)" |
| | | > |
| | | ä¸è½½ |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | <a-divider type="vertical" /> |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <equipmentUnsealDetail-modal |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | :mainId="mainId" |
| | | ></equipmentUnsealDetail-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EquipmentUnsealDetailModal from './EquipmentUnsealDetailModal' |
| | | |
| | | export default { |
| | | name: "EquipmentUnsealDetailList", |
| | | mixins: [JeecgListMixin], |
| | | components: { EquipmentUnsealDetailModal }, |
| | | props: { |
| | | mainId: { |
| | | type: String, |
| | | default: '', |
| | | required: false |
| | | } |
| | | }, |
| | | watch: { |
| | | mainId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | if (!this.mainId) { |
| | | this.clearList() |
| | | } else { |
| | | this.queryParam['equipmentChangeId'] = val |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | description: '设å¤å¯å°ç®¡ç页é¢', |
| | | disableMixinCreated: true, |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | // { |
| | | // title:'设å¤åå¨åid', |
| | | // align:"center", |
| | | // dataIndex: 'equipmentChangeId' |
| | | // }, |
| | | // { |
| | | // title:'设å¤ID', |
| | | // align:"center", |
| | | // dataIndex: 'equipmentId' |
| | | // }, |
| | | { |
| | | title: '设å¤ç¼ç ', |
| | | align: "center", |
| | | dataIndex: 'equipmentNum' |
| | | }, |
| | | { |
| | | title: 'èµäº§ç¼ç ', |
| | | align: "center", |
| | | dataIndex: 'assetNumber' |
| | | }, |
| | | { |
| | | title: 'ç¹ç§è®¾å¤', |
| | | align: "center", |
| | | dataIndex: 'specificEquipment_dictText', |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: "center", |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: '设å¤åå·', |
| | | align: "center", |
| | | dataIndex: 'model' |
| | | }, |
| | | { |
| | | title: '设å¤è§æ ¼', |
| | | align: "center", |
| | | dataIndex: 'specification' |
| | | }, |
| | | { |
| | | title: '设å¤ç¶æ', |
| | | align: "center", |
| | | dataIndex: 'equipmentStatus_dictText', |
| | | }, |
| | | { |
| | | title: 'ææ¯ç¶æ', |
| | | align: "center", |
| | | dataIndex: 'technologyStatus_dictText', |
| | | }, |
| | | { |
| | | title: '设å¤å¾ç', |
| | | align: "center", |
| | | dataIndex: 'equipmentPhoto', |
| | | scopedSlots: { customRender: "equipmentPhoto" } |
| | | }, |
| | | { |
| | | title: '设å¤ä½ç½®', |
| | | align: "center", |
| | | dataIndex: 'location' |
| | | }, |
| | | { |
| | | title: 'éè¦åº¦', |
| | | align: "center", |
| | | dataIndex: 'equipmentImportanceId_dictText', |
| | | }, |
| | | { |
| | | title: 'å°ååå ', |
| | | align: "center", |
| | | dataIndex: 'sealReason' |
| | | }, |
| | | { |
| | | title: 'å°åæ¥æ', |
| | | align: "center", |
| | | dataIndex: 'sealDate' |
| | | }, |
| | | { |
| | | title: 'å¯å°æ¥æ', |
| | | align: "center", |
| | | dataIndex: 'unsealDate' |
| | | }, |
| | | { |
| | | title: 'å¯å°åå ', |
| | | align: "center", |
| | | dataIndex: 'unsealReason' |
| | | }, |
| | | // { |
| | | // title: 'æä½', |
| | | // dataIndex: 'action', |
| | | // align:"center", |
| | | // fixed:"right", |
| | | // width:147, |
| | | // scopedSlots: { customRender: 'action' }, |
| | | // } |
| | | ], |
| | | url: { |
| | | list: "/eam/equipmentUnseal/listEquipmentUnsealDetailByMainId", |
| | | delete: "/eam/equipmentUnseal/deleteEquipmentUnsealDetail", |
| | | deleteBatch: "/eam/equipmentUnseal/deleteBatchEquipmentUnsealDetail", |
| | | exportXlsUrl: "/eam/equipmentUnseal/exportEquipmentUnsealDetail", |
| | | importUrl: "/eam/equipmentUnseal/importEquipmentUnsealDetail", |
| | | }, |
| | | dictOptions: { |
| | | auditStatus: [], |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | importExcelUrl() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importUrl}/${this.mainId}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | clearList() { |
| | | this.dataSource = [] |
| | | this.selectedRowKeys = [] |
| | | this.ipagination.current = 1 |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | ::v-deep .ant-card-body { |
| | | padding: 2px; |
| | | } |
| | | </style> |