| | |
| | | <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 |
| | | }, |
| | | handleTemplateXlsDownload(){ |
| | | templateXlsDownload(this.url.templateXlsDownloadUrl); |
| | | |
| | | /** |
| | | * 自定义设备台账表格行 |
| | | * @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) |
| | | }, |
| | | |
| | | 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> |