1、设备台账页面新增设备履历功能(未与后端进行联调)
2、设备台账页面新增点击设备展示对应保养标准功能并完成与后端联调
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | |
| | | <template v-if="isDisplayOperation"> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <a-input placeholder="请è¾å
¥è®¾å¤ç¼å·" v-model="queryParam.equipmentCode"></a-input> |
| | | <a-input placeholder="请è¾å
¥è®¾å¤ç¼å·" v-model="queryParam.equipmentId"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | |
| | | </a-button> |
| | | </a-dropdown> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <!-- tableåºå-begin --> |
| | | <div> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;" v-if="isDisplayOperation"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a |
| | | style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | |
| | | :customRow='clickThenSelect' |
| | | @change="handleTableChange"> |
| | | <template slot="referenceFile" slot-scope="text, record, index"> |
| | | <a v-if="text && text !== ''" @click="handlePreview(record)">é¢è§</a> |
| | | <a v-if="text && text !== ''" @click.stop="handlePreview(record)">é¢è§</a> |
| | | </template> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | <a @click.stop="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | |
| | | </a-table> |
| | | |
| | | <a-tabs defaultActiveKey="1"> |
| | | <a-tab-pane |
| | | tab='ä¿å
»æ åæç»é¡¹' |
| | | key="1" |
| | | > |
| | | <div |
| | | class="table-operator" |
| | | style="margin:-16px" |
| | | > |
| | | <eam-maintenance-standard-detail-list :standardId="standardId" /> |
| | | <a-tab-pane tab='ä¿å
»æ åæç»é¡¹' key="1"> |
| | | <div class="table-operator" style="margin:-16px"> |
| | | <eam-maintenance-standard-detail-list ref="standardDetailRef" :standardId="standardId"/> |
| | | </div> |
| | | </a-tab-pane> |
| | | |
| | |
| | | export default { |
| | | name: 'EamMaintenanceStandardList', |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | isDisplayOperation: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | components: { |
| | | EamMaintenanceStandardModal, |
| | | EamMaintenanceStandardDetailList |
| | |
| | | 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', |
| | |
| | | align: 'center', |
| | | dataIndex: 'referenceFile', |
| | | scopedSlots: { customRender: 'referenceFile' } |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | |
| | | importExcelUrl: 'eam/maintenanceStandard/importExcel' |
| | | }, |
| | | fileUrl: '', |
| | | standardId: '-1', |
| | | standardId: '-1' |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | created() { |
| | | if (!this.isDisplayOperation) { |
| | | return |
| | | } |
| | | const operationColumn = { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | | this.loadData(1) |
| | | }, |
| | | methods: { |
| | | handlePreview: function (record) { |
| | | if(record.referenceFile) { |
| | | try { |
| | | let file = JSON.parse(record.referenceFile); |
| | | this.$refs.lxFilePreview.preview(file.filePath); |
| | | let file = JSON.parse(record.referenceFile) |
| | | this.$refs.lxFilePreview.preview(file.filePath) |
| | | }catch (e) { |
| | | console.error(e); |
| | | this.$message.error(e.message); |
| | | console.error(e) |
| | | this.$message.error(e.message) |
| | | } |
| | | }else { |
| | | this.$message.warning("åèæä»¶ä¸ºç©ºï¼"); |
| | | this.$message.warning('åèæä»¶ä¸ºç©ºï¼') |
| | | } |
| | | }, |
| | | clickThenSelect(record) { |
| | | return { |
| | | style: { |
| | | cursor: 'pointer' |
| | | }, |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(','), [record]) |
| | |
| | | } |
| | | }, |
| | | onClearSelected() { |
| | | this.selectedRowKeys = []; |
| | | this.selectionRows = []; |
| | | this.standardId = '-1'; |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | this.standardId = '-1' |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.selectionRows = selectionRows |
| | | if (selectedRowKeys.length === 1) { |
| | | this.standardId = selectionRows[0]['id'] |
| | | this.standardId = selectedRowKeys[0] |
| | | } else { |
| | | this.standardId = '-1' |
| | | } |
| | | }, |
| | | searchReset() { |
| | | this.standardId = '-1'; |
| | | this.standardId = '-1' |
| | | this.queryParam = {} |
| | | this.loadData(1); |
| | | }, |
| | | this.loadData(1) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | class="j-table-force-nowrap" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | </a-table> |
| | | </div> |
| | |
| | | <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
| | | <i class="anticon anticon-info-circle ant-alert-icon"></i> 已鿩 <a |
| | | style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 |
| | | <a style="margin-left: 24px" @click="onClearSelected">æ¸
空</a> |
| | | <a style="margin-left: 24px" @click="onSelectChange([])">æ¸
空</a> |
| | | </div> |
| | | |
| | | <a-table |
| | |
| | | :loading="loading" |
| | | :scroll="{ x: 'max-content' }" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | @change="handleTableChange"> |
| | | @change="handleTableChange" |
| | | :customRow="customTableRow" |
| | | > |
| | | <span slot="equipmentImportance" slot-scope="text"> |
| | | <lx-switch v-model="text" disabled checked-children="æ¯" un-checked-children="å¦"/> |
| | | </span> |
| | |
| | | <lx-switch v-model="text" disabled checked-children="æ¯" un-checked-children="å¦"/> |
| | | </span> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | <a @click.stop="handleEdit(record)">ç¼è¾</a> |
| | | |
| | | <a-divider type="vertical"/> |
| | | <a-dropdown> |
| | |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a href="javascript:;" @click="handleOpenNameplateModal(record)">éç</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a href="javascript:;" @click="handleOpenResumeDrawer(record)">å±¥å</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a href="javascript:;" @click="handleDetail(record)">详æ
</a> |
| | |
| | | </div> |
| | | <!-- tableåºå-end --> |
| | | |
| | | <a-tabs v-model="activeTabKey"> |
| | | <a-tab-pane tab="ä¿å
»æ å" :key="1"> |
| | | <eam-maintenance-standard-list ref="tabPaneTableListRef" :isDisplayOperation="false"/> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | |
| | | <!-- 表ååºå --> |
| | | <eamEquipment-modal ref="modalForm" @ok="modalFormOk"></eamEquipment-modal> |
| | | <!--éçå¼¹çª--> |
| | | <nameplate-modal ref="nameplateModalRef"/> |
| | | <!--å±¥åå¼¹çª--> |
| | | <resume-drawer ref="resumeDrawerRef"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import { getAction, templateXlsDownload } from '@api/manage' |
| | | import NameplateModal from '@views/eam/equipment/modules/NameplateModal.vue' |
| | | import { getSystemConfigValue } from '@api/api' |
| | | import ResumeDrawer from '@views/eam/equipment/modules/ResumeDrawer.vue' |
| | | import EamMaintenanceStandardList from '@views/eam/base/EamMaintenanceStandardList.vue' |
| | | |
| | | export default { |
| | | name: 'EamEquipmentList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EamMaintenanceStandardList, |
| | | ResumeDrawer, |
| | | NameplateModal, |
| | | EamEquipmentModal |
| | | }, |
| | |
| | | { |
| | | title: '设å¤åå·', |
| | | align: 'center', |
| | | width: 100, |
| | | width: 200, |
| | | dataIndex: 'equipmentModel' |
| | | }, |
| | | { |
| | |
| | | }, |
| | | { |
| | | title: 'å建人', |
| | | align: "center", |
| | | align: 'center', |
| | | dataIndex: 'createBy_dictText' |
| | | }, |
| | | { |
| | | title: 'å建æ¶é´', |
| | | align: "center", |
| | | dataIndex: 'createTime', |
| | | align: 'center', |
| | | dataIndex: 'createTime' |
| | | }, |
| | | { |
| | | title: 'æ´æ°äºº', |
| | | align: "center", |
| | | align: 'center', |
| | | dataIndex: 'updateBy_dictText' |
| | | }, |
| | | { |
| | | title: 'æ´æ°æ¶é´', |
| | | align: "center", |
| | | dataIndex: 'updateTime', |
| | | align: 'center', |
| | | dataIndex: 'updateTime' |
| | | }, |
| | | { |
| | | title: '夿³¨', |
| | |
| | | exportXlsUrl: 'eam/equipment/exportXls', |
| | | importExcelUrl: 'eam/equipment/importExcel', |
| | | loadProductionOptions: '/mdc/mdcProduction/loadProductionTreeOptions', |
| | | templateXlsDownloadUrl: '导å
¥æ¨¡æ¿/设å¤å°è´¦å¯¼å
¥æ¨¡æ¿_v1.0.xlsx', |
| | | templateXlsDownloadUrl: '导å
¥æ¨¡æ¿/设å¤å°è´¦å¯¼å
¥æ¨¡æ¿_v1.0.xlsx' |
| | | }, |
| | | treeData: [], |
| | | appHomeUrl: '', |
| | | activeTabKey: 1, |
| | | appHomeUrl: '' |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.loadAllProductionTree(); |
| | | this.loadAppHomeUrlConfigValue(); |
| | | this.loadAllProductionTree() |
| | | this.loadAppHomeUrlConfigValue() |
| | | }, |
| | | methods: { |
| | | loadAllProductionTree() { |
| | |
| | | |
| | | /** |
| | | * å¼å¯éçå¼¹çª |
| | | * @param record |
| | | * @param record è¡¨æ ¼è¡ä¿¡æ¯ |
| | | */ |
| | | handleOpenNameplateModal(record) { |
| | | this.$refs.nameplateModalRef.model = Object.assign({}, record) |
| | | this.$refs.nameplateModalRef.httpUrl = this.appHomeUrl + record.equipmentCode; |
| | | this.$refs.nameplateModalRef.httpUrl = this.appHomeUrl + record.equipmentCode |
| | | this.$refs.nameplateModalRef.visible = true |
| | | }, |
| | | |
| | | /** |
| | | * å¼å¯å±¥åæ½å± |
| | | * @param record |
| | | */ |
| | | handleOpenResumeDrawer(record) { |
| | | this.$refs.resumeDrawerRef.visible = true |
| | | }, |
| | | |
| | | /** |
| | | * èªå®ä¹è®¾å¤å°è´¦è¡¨æ ¼è¡ |
| | | * @param record è¡¨æ ¼è¡ä¿¡æ¯ |
| | | * @returns {{style: {cursor: string}, on: {click: *}}} æ ·å¼å¯¹è±¡ä¸äºä»¶æ¹æ³ |
| | | */ |
| | | customTableRow(record) { |
| | | return { |
| | | style: { |
| | | cursor: 'pointer' |
| | | }, |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange([record.id]) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * å 载页ç¾è¡¨æ ¼æ°æ® |
| | | * @param id 设å¤å°è´¦è¡è®°å½Id |
| | | */ |
| | | loadTabPaneTableData(id) { |
| | | this.$refs.tabPaneTableListRef.queryParam.equipmentId = id |
| | | this.$refs.tabPaneTableListRef.loadData(1) |
| | | }, |
| | | |
| | | /** |
| | | * 设å¤å°è´¦è¡¨æ ¼å¤éæ¡ç¶ææ¹åæ¶è§¦å |
| | | * @param selectedRowKeys 已鿩çrowKeyéå |
| | | */ |
| | | onSelectChange(selectedRowKeys) { |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.$refs.tabPaneTableListRef.dataSource = [] |
| | | this.$refs.tabPaneTableListRef.onClearSelected() |
| | | if (selectedRowKeys.length === 1) this.loadTabPaneTableData(selectedRowKeys[0]) |
| | | }, |
| | | |
| | | handleTemplateXlsDownload(){ |
| | | templateXlsDownload(this.url.templateXlsDownloadUrl); |
| | | templateXlsDownload(this.url.templateXlsDownloadUrl) |
| | | }, |
| | | |
| | | loadAppHomeUrlConfigValue() { |
| | | let params = {settingKey: 'app_home_url'}; |
| | | let params = { settingKey: 'app_home_url' } |
| | | getSystemConfigValue(params).then(res => { |
| | | if (res.success) { |
| | | this.appHomeUrl = res.result.settingValue; |
| | | this.appHomeUrl = res.result.settingValue |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-drawer title="设å¤å±¥å" placement="right" :width="500" :closable="false" :visible="visible" @close="onClose"> |
| | | <a-timeline mode="alternate"> |
| | | <a-timeline-item>Create a services site 2015-09-01</a-timeline-item> |
| | | <a-timeline-item color="green"> |
| | | Solve initial network problems 2015-09-01 |
| | | </a-timeline-item> |
| | | <a-timeline-item> |
| | | <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/> |
| | | Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque |
| | | laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto |
| | | beatae vitae dicta sunt explicabo. |
| | | </a-timeline-item> |
| | | <a-timeline-item color="red"> |
| | | Network problems being solved 2015-09-01 |
| | | </a-timeline-item> |
| | | <a-timeline-item>Create a services site 2015-09-01</a-timeline-item> |
| | | <a-timeline-item> |
| | | <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/> |
| | | Technical testing 2015-09-01 |
| | | </a-timeline-item> |
| | | <a-timeline-item>Create a services site 2015-09-01</a-timeline-item> |
| | | <a-timeline-item color="green"> |
| | | Solve initial network problems 2015-09-01 |
| | | </a-timeline-item> |
| | | <a-timeline-item> |
| | | <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/> |
| | | Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque |
| | | laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto |
| | | beatae vitae dicta sunt explicabo. |
| | | </a-timeline-item> |
| | | <a-timeline-item color="red"> |
| | | Network problems being solved 2015-09-01 |
| | | </a-timeline-item> |
| | | <a-timeline-item>Create a services site 2015-09-01</a-timeline-item> |
| | | <a-timeline-item> |
| | | <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/> |
| | | Technical testing 2015-09-01 |
| | | </a-timeline-item> |
| | | <a-timeline-item>Create a services site 2015-09-01</a-timeline-item> |
| | | <a-timeline-item color="green"> |
| | | Solve initial network problems 2015-09-01 |
| | | </a-timeline-item> |
| | | <a-timeline-item> |
| | | <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/> |
| | | Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque |
| | | laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto |
| | | beatae vitae dicta sunt explicabo. |
| | | </a-timeline-item> |
| | | <a-timeline-item color="red"> |
| | | Network problems being solved 2015-09-01 |
| | | </a-timeline-item> |
| | | <a-timeline-item>Create a services site 2015-09-01</a-timeline-item> |
| | | <a-timeline-item> |
| | | <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;"/> |
| | | Technical testing 2015-09-01 |
| | | </a-timeline-item> |
| | | </a-timeline> |
| | | </a-drawer> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'ResumeDrawer', |
| | | data() { |
| | | return { |
| | | visible: false |
| | | } |
| | | }, |
| | | methods: { |
| | | getEquipmentResumeByApi() { |
| | | |
| | | }, |
| | | |
| | | onClose() { |
| | | this.visible = false |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="less"> |
| | | /deep/ .ant-drawer-wrapper-body { |
| | | overflow: hidden; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | ::-webkit-scrollbar { |
| | | width: 8px; |
| | | height: 8px; |
| | | } |
| | | |
| | | .ant-drawer-body { |
| | | flex: 1; |
| | | overflow: auto; |
| | | } |
| | | } |
| | | </style> |