¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | :class="'cust-erp-sub-tab'" |
| | | > |
| | | <div> |
| | | <a-table |
| | | ref="table" |
| | | size="middle" |
| | | bordered |
| | | rowKey="id" |
| | | :scroll="{ x: 'calc(1400px + 50%)', y: 900 }" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | | |
| | | <template |
| | | slot="htmlSlot" |
| | | slot-scope="text" |
| | | > |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template |
| | | slot="equipmentPhoto" |
| | | slot-scope="text,record" |
| | | > |
| | | <Tooltip |
| | | placement="top" |
| | | title="é¢è§å¾ç" |
| | | > |
| | | <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;" |
| | | /> |
| | | </Tooltip> |
| | | </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> |
| | | |
| | | <equipmentSealDetail-modal |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | :mainId="mainId" |
| | | ></equipmentSealDetail-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EquipmentSealDetailModal from './EquipmentSealDetailModal' |
| | | |
| | | export default { |
| | | name: "EquipmentSealDetailList", |
| | | mixins: [JeecgListMixin], |
| | | components: { EquipmentSealDetailModal }, |
| | | 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: '设å¤ç¼ç ', |
| | | align: "center", |
| | | dataIndex: 'equipmentNum' |
| | | }, |
| | | { |
| | | title: 'èµäº§ç¼ç ', |
| | | align: "center", |
| | | dataIndex: 'assetNumber' |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: "center", |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: '设å¤åå·', |
| | | align: "center", |
| | | dataIndex: 'model' |
| | | }, |
| | | { |
| | | title: '设å¤è§æ ¼', |
| | | align: "center", |
| | | dataIndex: 'specification' |
| | | }, |
| | | { |
| | | title: 'ç¹ç§è®¾å¤', |
| | | align: "center", |
| | | dataIndex: 'specificEquipment_dictText', |
| | | }, |
| | | { |
| | | title: '设å¤ç¶æ', |
| | | align: "center", |
| | | dataIndex: 'equipmentStatus_dictText', |
| | | }, |
| | | { |
| | | title: 'ææ¯ç¶æ', |
| | | align: "center", |
| | | dataIndex: 'technologyStatus_dictText', |
| | | }, |
| | | { |
| | | title: '设å¤ä½ç½®', |
| | | align: "center", |
| | | dataIndex: 'location' |
| | | }, |
| | | { |
| | | title: 'éè¦åº¦', |
| | | align: "center", |
| | | dataIndex: 'equipmentImportanceId_dictText', |
| | | }, |
| | | { |
| | | title: '设å¤å¾ç', |
| | | align: "center", |
| | | dataIndex: 'equipmentPhoto', |
| | | scopedSlots: { customRender: "equipmentPhoto" } |
| | | }, |
| | | { |
| | | title: 'å°ååå ', |
| | | align: "center", |
| | | dataIndex: 'sealReason' |
| | | }, |
| | | { |
| | | title: 'å°åæ¥æ', |
| | | align: "center", |
| | | dataIndex: 'sealDate' |
| | | }, |
| | | { |
| | | title: 'é¢è®¡å¯å°æ¥æ', |
| | | align: "center", |
| | | dataIndex: 'planUnsealDate', |
| | | // customRender:function (text) { |
| | | // return !text?"":(text.length>10?text.substr(0,10):text) |
| | | // } |
| | | }, |
| | | // { |
| | | // title:'æ¯å¦å¼ºå¶å¯å°', |
| | | // align:"center", |
| | | // dataIndex: 'isForceUnseal', |
| | | // customRender: (text) => (!text ? "" : (text == "Y" ? "æ¯" : "å¦")) |
| | | // }, |
| | | // { |
| | | // title:'强å¶å¯å°æ¥æ', |
| | | // align:"center", |
| | | // dataIndex: 'forceUnsealDate', |
| | | // // customRender:function (text) { |
| | | // // return !text?"":(text.length>10?text.substr(0,10):text) |
| | | // // } |
| | | // }, |
| | | // { |
| | | // title:'强å¶å¯å°åä¿å
»', |
| | | // align:"center", |
| | | // dataIndex: 'maintenanceAfterUnseal', |
| | | // customRender: (text) => (!text ? "" : (text == "Y" ? "æ¯" : "å¦")) |
| | | // }, |
| | | // { |
| | | // title:'ä¿å
»æ å', |
| | | // align:"center", |
| | | // dataIndex: 'maintenanceStandardId_dictText', |
| | | // }, |
| | | // { |
| | | // title: 'æä½', |
| | | // dataIndex: 'action', |
| | | // align:"center", |
| | | // fixed:"right", |
| | | // width:147, |
| | | // scopedSlots: { customRender: 'action' }, |
| | | // } |
| | | ], |
| | | url: { |
| | | list: "/eam/equipmentSeal/listEquipmentSealDetailByMainId", |
| | | delete: "/eam/equipmentSeal/deleteEquipmentSealDetail", |
| | | deleteBatch: "/eam/equipmentSeal/deleteBatchEquipmentSealDetail", |
| | | exportXlsUrl: "/eam/equipmentSeal/exportEquipmentSealDetail", |
| | | importUrl: "/eam/equipmentSeal/importEquipmentSealDetail", |
| | | }, |
| | | 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> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |