¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered="false" |
| | | class="card-area" |
| | | > |
| | | <template slot="title"> |
| | | <i |
| | | class="action-jeecg actionsite2" |
| | | style="font-size: 18px;" |
| | | /> |
| | | 设å¤ä¿¡æ¯ |
| | | </template> |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class="table-page-search-wrapper"> |
| | | <!-- æç´¢åºå --> |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <a-row :gutter="24"> |
| | | <a-col |
| | | :md="8" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="设å¤ç¼å·"> |
| | | <a-input |
| | | placeholder="请è¾å
¥è®¾å¤ç¼å·æ¥è¯¢" |
| | | v-model="queryParam.num" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | :md="8" |
| | | :sm="8" |
| | | > |
| | | <a-form-item label="设å¤åç§°"> |
| | | <a-input |
| | | placeholder="请è¾å
¥è®¾å¤åç§°æ¥è¯¢" |
| | | v-model="queryParam.name" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | |
| | | <!-- æä½æé®åºå --> |
| | | <div |
| | | class="table-operator" |
| | | style="margin-top: 5px" |
| | | > |
| | | <a-button |
| | | type="primary" |
| | | @click="searchQuery" |
| | | icon="search" |
| | | >æ¥è¯¢</a-button> |
| | | <a-button |
| | | @click="searchReset" |
| | | icon="reload" |
| | | >éç½®</a-button> |
| | | <a-button |
| | | @click="handleAdd" |
| | | type="primary" |
| | | icon="plus" |
| | | :hidden="disabled" |
| | | >æ°å¢</a-button> |
| | | <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导å
¥</a-button> |
| | | </a-upload> |
| | | <a-button |
| | | type="primary" |
| | | icon="download" |
| | | @click="handleExportXls('???')" |
| | | >导åº</a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-button style="margin-left: 8px"> |
| | | æ¹éæä½ |
| | | <a-icon type="down" /> |
| | | </a-button> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item @click="batchDel"> |
| | | <a-icon type="delete" />å é¤ |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </div> |
| | | |
| | | <a-table |
| | | ref="table" |
| | | bordered |
| | | size="middle" |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="rowSelection" |
| | | @change="handleTableChange" |
| | | :scroll="{ x: 'calc(4000px + 50%)', y: 900 }" |
| | | :customRow="clickThenSelect" |
| | | > |
| | | <span |
| | | 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> |
| | | </span> |
| | | |
| | | <!--å·¥èºåæ°ä¸ªæ§å±ç¤º--> |
| | | <span |
| | | slot="processParameters" |
| | | slot-scope="text,record" |
| | | > |
| | | <a-badge |
| | | v-if="record.processParameters==1" |
| | | status="success" |
| | | /> |
| | | <span |
| | | v-if="record.processParameters==1" |
| | | class="success" |
| | | >æ¯</span> |
| | | <a-badge |
| | | v-if="record.processParameters==0" |
| | | status="error" |
| | | /> |
| | | <span |
| | | v-if="record.processParameters==0" |
| | | class="error" |
| | | >å¦</span> |
| | | </span> |
| | | <span |
| | | slot="processParameters" |
| | | slot-scope="text,record" |
| | | > |
| | | <a-badge |
| | | v-if="record.processParameters==1" |
| | | status="success" |
| | | /> |
| | | <span |
| | | v-if="record.processParameters==1" |
| | | class="success" |
| | | >æ¯</span> |
| | | <a-badge |
| | | v-if="record.processParameters==0" |
| | | status="error" |
| | | /> |
| | | <span |
| | | v-if="record.processParameters==0" |
| | | class="error" |
| | | >å¦</span> |
| | | </span> |
| | | <span |
| | | slot="precisionParameters" |
| | | slot-scope="text,record" |
| | | > |
| | | <a-badge |
| | | v-if="record.precisionParameters==1" |
| | | status="success" |
| | | /> |
| | | <span |
| | | v-if="record.precisionParameters==1" |
| | | class="success" |
| | | >æ¯</span> |
| | | <a-badge |
| | | v-if="record.precisionParameters==0" |
| | | status="error" |
| | | /> |
| | | <span |
| | | v-if="record.precisionParameters==0" |
| | | class="error" |
| | | >å¦</span> |
| | | </span> |
| | | <span |
| | | slot="verification" |
| | | slot-scope="text,record" |
| | | > |
| | | <a-badge |
| | | v-if="record.verification==1" |
| | | status="success" |
| | | /> |
| | | <span |
| | | v-if="record.verification==1" |
| | | class="success" |
| | | >æ¯</span> |
| | | <a-badge |
| | | v-if="record.verification==0" |
| | | status="error" |
| | | /> |
| | | <span |
| | | v-if="record.verification==0" |
| | | class="error" |
| | | >å¦</span> |
| | | </span> |
| | | |
| | | <span |
| | | slot="action" |
| | | slot-scope="text, record" |
| | | > |
| | | <!-- class="table-operation" --> |
| | | <!-- <a |
| | | href="javascript:;" |
| | | @click="equipmentStructuresShow(record)" |
| | | >设å¤ç»æ</a> |
| | | <a-divider type="vertical" /> --> |
| | | <a |
| | | href="javascript:;" |
| | | @click="handleEdit(record)" |
| | | >ç¼è¾</a> |
| | | <a-divider type="vertical" /> |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link"> |
| | | æ´å¤ |
| | | <a-icon type="down" /> |
| | | </a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="equipmentResumeShow(record)">设å¤å±¥å</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a @click="handleEdit(record)">ç¼è¾</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-popconfirm |
| | | title="ç¡®å®å é¤å?" |
| | | @confirm="() => handleDelete(record.id)" |
| | | > |
| | | <a>å é¤</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | </a-table> |
| | | |
| | | <a-tabs |
| | | type="card" |
| | | defaultActiveKey="1" |
| | | > |
| | | <a-tab-pane key="1"> |
| | | <span slot="tab"> |
| | | <a-badge v-if="showTabsFlag">å·¥èºåæ° </a-badge> |
| | | <a-badge |
| | | v-if="!showTabsFlag" |
| | | :count="5" |
| | | show-zero |
| | | :number-style="{ backgroundColor: '#52c41a' }" |
| | | >å·¥èºåæ° </a-badge> |
| | | </span> |
| | | <div |
| | | class="table-operator" |
| | | style="margin-top: 0px" |
| | | > |
| | | <process-parameters-list ref="ProcessParametersList"></process-parameters-list> |
| | | </div> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane |
| | | key="2" |
| | | forceRender |
| | | > |
| | | <span slot="tab"> |
| | | <a-badge v-if="showTabsFlag">设å¤ç²¾åº¦ </a-badge> |
| | | <a-badge |
| | | v-if="!showTabsFlag" |
| | | :count="5" |
| | | show-zero |
| | | :number-style="{ backgroundColor: '#52c41a' }" |
| | | >设å¤ç²¾åº¦ </a-badge> |
| | | </span> |
| | | <div |
| | | class="table-operator" |
| | | style="margin-top: 0px" |
| | | > |
| | | <precision-parameters-list ref="PrecisionParametersList"></precision-parameters-list> |
| | | </div> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane |
| | | key="3" |
| | | forceRender |
| | | > |
| | | <span slot="tab"> |
| | | <a-badge v-if="showTabsFlag">è®¾å¤ææ¡£ </a-badge> |
| | | <a-badge |
| | | v-if="!showTabsFlag" |
| | | :count="5" |
| | | show-zero |
| | | :number-style="{ backgroundColor: '#52c41a' }" |
| | | >è®¾å¤ææ¡£ </a-badge> |
| | | </span> |
| | | <div |
| | | class="table-operator" |
| | | style="margin-top: 0px" |
| | | > |
| | | <equipment-file-list ref="EquipmentFileList"></equipment-file-list> |
| | | </div> |
| | | </a-tab-pane> |
| | | |
| | | </a-tabs> |
| | | <equipment-model |
| | | ref="modalForm" |
| | | @ok="modalFormOk" |
| | | ></equipment-model> |
| | | |
| | | <equipment-structure-drawer |
| | | ref="EquipmentStructureDrawer" |
| | | @ok="modalFormOk" |
| | | ></equipment-structure-drawer> |
| | | |
| | | <equipment-resume-drawer |
| | | ref="EquipmentResumeDrawer" |
| | | @ok="modalFormOk" |
| | | ></equipment-resume-drawer> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { requestPut, deleteAction, getFileAccessHttpUrl, getAction } from '@/api/manage' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EquipmentModel from './EquipmentModel.vue' |
| | | import JInput from '@/components/jeecg/JInput' |
| | | import JEllipsis from '@/components/jeecg/JEllipsis' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | import Vue from 'vue' |
| | | |
| | | import ProcessParametersList from './ProcessParametersList' |
| | | import PrecisionParametersList from './PrecisionParametersList' |
| | | import EquipmentFileList from './EquipmentFileList' |
| | | import EquipmentStructureDrawer from './EquipmentStructureDrawer' |
| | | import EquipmentResumeDrawer from './EquipmentResume/EquipmentResumeDrawer' |
| | | |
| | | export default { |
| | | name: 'EquipmentCategory2List.', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EquipmentModel, |
| | | JInput, |
| | | JEllipsis, |
| | | ProcessParametersList, |
| | | PrecisionParametersList, |
| | | EquipmentFileList, |
| | | Tooltip, |
| | | EquipmentStructureDrawer, |
| | | EquipmentResumeDrawer |
| | | }, |
| | | props: { |
| | | nodeSelected: { |
| | | type: Object, |
| | | default: {} |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | showTabsFlag: true, |
| | | disabled: true, |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 5, |
| | | pageSizeOptions: ['5', '10', '20'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " å
±" + total + "æ¡" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | selectedRowKeys: [], |
| | | selectionRows: [], |
| | | //é»è®¤æåº |
| | | isorter: { |
| | | column: 'num', |
| | | order: 'asc', |
| | | }, |
| | | |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | align: 'center', |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1 |
| | | }, |
| | | width: 50, |
| | | }, |
| | | { |
| | | title: 'ç»ä¸ç¼ç ', |
| | | align: "center", |
| | | dataIndex: 'num', |
| | | }, |
| | | { |
| | | title: '设å¤åç§°', |
| | | align: "center", |
| | | dataIndex: 'name', |
| | | }, |
| | | { |
| | | title: 'åå·', |
| | | align: "center", |
| | | dataIndex: 'model', |
| | | }, |
| | | { |
| | | title: 'è§æ ¼', |
| | | align: "center", |
| | | dataIndex: 'specification', |
| | | }, |
| | | // { |
| | | // title: 'èµäº§ç¼ç ', |
| | | // align: "center", |
| | | // dataIndex: 'assetNumber', |
| | | // }, |
| | | { |
| | | title: 'æ»åç', |
| | | align: "center", |
| | | dataIndex: 'gpo', |
| | | }, |
| | | { |
| | | title: '使ç¨é¨é¨', |
| | | align: "center", |
| | | dataIndex: 'useId_dictText', |
| | | }, |
| | | { |
| | | title: 'å·¥åº', |
| | | align: "center", |
| | | dataIndex: 'equipmentUda1', |
| | | }, |
| | | { |
| | | title: 'ç»´æ¤é¨é¨', |
| | | align: "center", |
| | | dataIndex: 'manageId_dictText', |
| | | }, |
| | | { |
| | | title: 'ç»´ä¿®çç»', |
| | | align: "center", |
| | | dataIndex: 'teamId_dictText', |
| | | }, |
| | | { |
| | | title: 'ABCæ è¯', |
| | | align: "center", |
| | | dataIndex: 'equipmentImportanceId_dictText', |
| | | }, |
| | | { |
| | | title: 'å
³é®è®¾å¤æ è¯', |
| | | align: "center", |
| | | dataIndex: 'keyEquipmentIdentification', |
| | | }, |
| | | { |
| | | title: 'å®å
¨é
ç½®', |
| | | align: "center", |
| | | dataIndex: 'securityConfiguration', |
| | | }, |
| | | { |
| | | title: 'å·å´ç³»ç»', |
| | | align: "center", |
| | | dataIndex: 'coolingSystem', |
| | | }, |
| | | { |
| | | title: 'çç«å¨', |
| | | align: "center", |
| | | dataIndex: 'fireExtinguisher', |
| | | }, |
| | | |
| | | { |
| | | title: 'çç«å¨æææ', |
| | | align: "center", |
| | | dataIndex: 'fireExtinguisherValidityPeriod', |
| | | }, |
| | | { |
| | | title: 'æä½ç³»ç»', |
| | | align: "center", |
| | | dataIndex: 'operatingSystem', |
| | | }, |
| | | { |
| | | title: 'ç³»ç»', |
| | | align: "center", |
| | | dataIndex: 'system', |
| | | }, |
| | | { |
| | | title: '设å¤ç«¯å£', |
| | | align: "center", |
| | | dataIndex: 'port', |
| | | }, |
| | | { |
| | | title: 'åæ æ°é', |
| | | align: "center", |
| | | dataIndex: 'coordinateNum', |
| | | }, |
| | | { |
| | | title: '设å¤ç¶æ', |
| | | align: "center", |
| | | dataIndex: 'equipmentStatus_dictText', |
| | | }, |
| | | { |
| | | title: 'éé', |
| | | align: "center", |
| | | dataIndex: 'equipmentUda3', |
| | | }, |
| | | { |
| | | title: 'éé计éåä½', |
| | | align: "center", |
| | | dataIndex: 'equipmentUda4_dictText', |
| | | }, |
| | | { |
| | | title: 'åè½ä½ç½®', |
| | | align: "center", |
| | | dataIndex: 'equipmentUda5', |
| | | }, |
| | | { |
| | | title: 'å®è£
ä½ç½®', |
| | | align: "center", |
| | | dataIndex: 'equipmentUda2', |
| | | }, |
| | | { |
| | | title: 'åºåæ¥æ', |
| | | align: "center", |
| | | dataIndex: 'leaveFactoryDate', |
| | | }, |
| | | { |
| | | title: 'ç«é¡¹å¡å·', |
| | | align: "center", |
| | | dataIndex: 'projectApprovalNo', |
| | | }, |
| | | { |
| | | title: 'èµéæ¥æº', |
| | | align: "center", |
| | | dataIndex: 'fundSource', |
| | | }, |
| | | { |
| | | title: 'éªæ¶æ¥æ', |
| | | align: "center", |
| | | dataIndex: 'acceptanceCheckDate', |
| | | }, |
| | | { |
| | | title: 'åºåç¼å·', |
| | | align: "center", |
| | | dataIndex: 'factoryNo', |
| | | }, |
| | | { |
| | | title: 'èµäº§å¶é å', |
| | | align: "center", |
| | | dataIndex: 'constructorId_dictText', |
| | | }, |
| | | { |
| | | title: 'èµäº§çæ¥æºå½å®¶', |
| | | align: "center", |
| | | dataIndex: 'sourceCountry', |
| | | }, |
| | | // { |
| | | // title: 'ææ¯ç¶æ', |
| | | // align: "center", |
| | | // dataIndex: 'technologyStatus_dictText', |
| | | // }, |
| | | // { |
| | | // title: 'ç¹ç§è®¾å¤', |
| | | // align: "center", |
| | | // dataIndex: 'specificEquipment_dictText', |
| | | // }, |
| | | // { |
| | | // title: '设å¤å¾ç', |
| | | // align: "center", |
| | | // dataIndex: 'equipmentPhoto', |
| | | // scopedSlots: { customRender: 'equipmentPhoto' }, |
| | | // }, |
| | | // { |
| | | // title: 'ä¾åºå', |
| | | // align: "center", |
| | | // dataIndex: 'supplierId_dictText', |
| | | // }, |
| | | // { |
| | | // title: 'åºåç¼å·', |
| | | // align: "center", |
| | | // dataIndex: 'factoryNumber', |
| | | // }, |
| | | // { |
| | | // title: 'åºåæ¥æ', |
| | | // align: "center", |
| | | // dataIndex: 'leaveFactoryDate', |
| | | // }, |
| | | // { |
| | | // title: 'éªæ¶æ¥æ', |
| | | // align: "center", |
| | | // dataIndex: 'acceptanceCheckDate', |
| | | // }, |
| | | // // { |
| | | // // title: 'ææç»ç»', |
| | | // // align: "center", |
| | | // // dataIndex: 'affiliationId_dictText', |
| | | // // }, |
| | | |
| | | // { |
| | | // title: '管ç人å', |
| | | // align: "center", |
| | | // dataIndex: 'manager_dictText', |
| | | // }, |
| | | // { |
| | | // title: '使ç¨é¨é¨', |
| | | // align: "center", |
| | | // dataIndex: 'useId_dictText', |
| | | // }, |
| | | // { |
| | | // title: '责任人', |
| | | // align: "center", |
| | | // dataIndex: 'functionary_dictText', |
| | | // }, |
| | | // { |
| | | // title: 'ä½ç½®', |
| | | // align: "center", |
| | | // dataIndex: 'location', |
| | | // }, |
| | | { |
| | | title: 'å·¥èºåæ°ç®¡ç', |
| | | align: "center", |
| | | dataIndex: 'processParameters', |
| | | scopedSlots: { customRender: 'processParameters' }, |
| | | }, |
| | | { |
| | | title: 'å·¥èºåæ°æ¨¡æ¿', |
| | | align: "center", |
| | | dataIndex: 'processParametersTemplateName', |
| | | }, |
| | | // { |
| | | // title: '设å¤ç²¾åº¦ç®¡ç', |
| | | // align: "center", |
| | | // dataIndex: 'precisionParameters', |
| | | // scopedSlots: { customRender: 'precisionParameters' }, |
| | | // }, |
| | | // { |
| | | // title: 'ç²¾åº¦åæ°æ¨¡æ¿', |
| | | // align: "center", |
| | | // dataIndex: 'precisionParametersTemplateName', |
| | | // }, |
| | | // // { |
| | | // // title: 'æ£å®ç®¡ç', |
| | | // // align: "center", |
| | | // // dataIndex: 'verification', |
| | | // // scopedSlots: { customRender: 'verification' }, |
| | | // // }, |
| | | // // { |
| | | // // title: 'æ£å®å¨æ/æ', |
| | | // // align: "center", |
| | | // // dataIndex: 'verificationPeriod', |
| | | // // }, |
| | | // // { |
| | | // // title: '䏿¬¡æ£å®æ¥æ', |
| | | // // align: "center", |
| | | // // dataIndex: 'lastVerificationDate', |
| | | // // }, |
| | | // // { |
| | | // // title: '䏿¬¡æ£å®æ¥æ', |
| | | // // align: "center", |
| | | // // dataIndex: 'nextVerificationDate', |
| | | // // }, |
| | | // // { |
| | | // // title: 'ç¶æ', |
| | | // // align: 'center', |
| | | // // dataIndex: 'status', |
| | | // // width: 100, |
| | | // // }, |
| | | { |
| | | title: '夿³¨', |
| | | align: "center", |
| | | dataIndex: 'remark', |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | align: "center", |
| | | dataIndex: 'action', |
| | | scopedSlots: { |
| | | customRender: 'action', |
| | | }, |
| | | width: 200, |
| | | fixed: 'right', |
| | | }, |
| | | ], |
| | | url: { |
| | | list: "/eam/equipment/list", |
| | | delete: "/eam/equipment/delete", |
| | | deleteBatch: "/eam/equipment/deleteBatch", |
| | | active: "/eam/equipment/active", |
| | | exportXlsUrl: '/eam/equipment/exportXls', |
| | | importExcelUrl: "/eam/equipment/importExcel", |
| | | // importExcelUrl: 'base/site/importExcel', |
| | | }, |
| | | //æ°å¢ãç¼è¾ãå é¤ãæ¹éå 餿使¹åæ°æ®åå·æ°å
³èçç»ä»¶ççå¬å±æ§ |
| | | alterFlag: "", |
| | | equipmentRecord: {}, |
| | | // parentNum: "-1", |
| | | // parentName: "设å¤åç±»", |
| | | }; |
| | | }, |
| | | |
| | | computed: { |
| | | rowSelection() { |
| | | return { |
| | | type: 'checkbox', |
| | | onChange: (selectedRowKeys, selectedRows) => { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.onSelectChange(selectedRowKeys, selectedRows); |
| | | }, |
| | | getCheckboxProps(record) { |
| | | return ({ |
| | | props: { |
| | | // disabled: !(record.equipmentCategoryDtlList.length == 0), |
| | | } |
| | | }) |
| | | }, |
| | | selectedRowKeys: this.selectedRowKeys, |
| | | }; |
| | | }, |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | } |
| | | }, |
| | | methods: { |
| | | |
| | | clickThenSelect(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.onSelectChange(record.id.split(","), [record]); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | if (selectedRowKeys.length == 1) { |
| | | this.$refs.ProcessParametersList.equipmentId = selectedRowKeys[0] |
| | | this.$refs.EquipmentFileList.equipmentId = selectedRowKeys[0] |
| | | this.$refs.PrecisionParametersList.equipmentId = selectedRowKeys[0] |
| | | } else { |
| | | this.$refs.ProcessParametersList.equipmentId = '-1' |
| | | this.$refs.PrecisionParametersList.equipmentId = '-1' |
| | | this.$refs.EquipmentFileList.equipmentId = '-1' |
| | | } |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | }, |
| | | |
| | | //ç¦ç¨ç¶ææ ·å¼ |
| | | tableRowClass(record, index) { |
| | | if (record.status != "1") { |
| | | return "frozenRowClass"; |
| | | } |
| | | return ""; |
| | | }, |
| | | |
| | | handleActive(id) { |
| | | let that = this; |
| | | requestPut(that.url.active, {}, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message); |
| | | that.loadData(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }); |
| | | }, |
| | | handleAdd: function () { |
| | | this.$refs.modalForm.add({ processParameters: '1', precisionParameters: '1', verification: '1' }); |
| | | this.$refs.modalForm.title = "æ°å¢"; |
| | | this.$refs.modalForm.disableSubmit = false; |
| | | this.$refs.modalForm.equipmentCategoryId = this.nodeSelected.key; |
| | | }, |
| | | handleDelete: function (id) { |
| | | if (!this.url.delete) { |
| | | this.$message.error("请设置url.delete屿§!") |
| | | return |
| | | } |
| | | var that = this; |
| | | deleteAction(that.url.delete, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message); |
| | | that.loadData(); |
| | | that.alterFlag = new Date(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | batchDel: function () { |
| | | if (!this.url.deleteBatch) { |
| | | this.$message.error("请设置url.deleteBatch屿§!") |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('è¯·éæ©ä¸æ¡è®°å½ï¼'); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | | for (var a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ","; |
| | | } |
| | | var that = this; |
| | | this.$confirm({ |
| | | title: "确认å é¤", |
| | | content: "æ¯å¦å é¤é䏿°æ®?", |
| | | onOk: function () { |
| | | that.loading = true; |
| | | deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => { |
| | | if (res.success) { |
| | | //éæ°è®¡ç®å页é®é¢ |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | that.$message.success(res.message); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | that.alterFlag = new Date(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | equipmentStructuresShow(record) { |
| | | this.$refs.EquipmentStructureDrawer.visible = true |
| | | this.$refs.EquipmentStructureDrawer.title = '设å¤ç»æ' |
| | | setTimeout(() => { |
| | | this.$bus.$emit('equipmentRecord', record) |
| | | this.$bus.$emit('equipmentStructureId', '-1') |
| | | }, 200) |
| | | }, |
| | | |
| | | |
| | | equipmentResumeShow(record) { |
| | | this.$refs.EquipmentResumeDrawer.visible = true |
| | | this.$refs.EquipmentResumeDrawer.title = '设å¤å±¥å' |
| | | this.$refs.EquipmentResumeDrawer.handleShow(record) |
| | | }, |
| | | |
| | | searchReset() { |
| | | this.queryParam = {}; |
| | | if (this.nodeSelected.key != -1) { |
| | | this.disabled = false; |
| | | this.queryParam.equipmentCategoryId = this.nodeSelected.key; |
| | | } else { |
| | | this.disabled = true; |
| | | } |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | // this.$refs.ProcessParametersList.equipmentId = '-1' |
| | | this.$refs.PrecisionParametersList.equipmentId = '-1' |
| | | this.$refs.EquipmentFileList.equipmentId = '-1' |
| | | this.loadData(1); |
| | | }, |
| | | |
| | | searchQuery() { |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | // this.$refs.ProcessParametersList.equipmentId = '-1' |
| | | this.$refs.PrecisionParametersList.equipmentId = '-1' |
| | | this.$refs.EquipmentFileList.equipmentId = '-1' |
| | | this.loadData(1); |
| | | }, |
| | | |
| | | modalFormOk() { |
| | | // æ°å¢/ä¿®æ¹ æåæ¶ï¼éè½½å表 |
| | | this.loadData() |
| | | //æ¸
空å表éä¸ |
| | | this.onClearSelected() |
| | | |
| | | // this.$refs.ProcessParametersList.equipmentId = '-1' |
| | | this.$refs.PrecisionParametersList.equipmentId = '-1' |
| | | this.$refs.EquipmentFileList.equipmentId = '-1' |
| | | }, |
| | | }, |
| | | watch: { |
| | | alterFlag() { |
| | | this.$bus.$emit('queryTreeData'); |
| | | }, |
| | | selectionRows() { |
| | | this.$bus.$emit('equipmentSelectionRows', this.selectionRows); |
| | | }, |
| | | nodeSelected() { |
| | | this.queryParam = {}; |
| | | if (this.nodeSelected.key != -1) { |
| | | this.disabled = false; |
| | | this.queryParam.equipmentCategoryId = this.nodeSelected.key; |
| | | } else { |
| | | this.disabled = true; |
| | | } |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | // this.$refs.ProcessParametersList.equipmentId = '-1' |
| | | this.$refs.PrecisionParametersList.equipmentId = '-1' |
| | | this.$refs.EquipmentFileList.equipmentId = '-1' |
| | | this.loadData(1); |
| | | }, |
| | | }, |
| | | created() { |
| | | this.queryParam = {}; |
| | | this.queryParam.equipmentCategoryId = this.nodeSelected.key; |
| | | this.selectedRowKeys = [] |
| | | this.selectionRows = [] |
| | | this.loadData(1); |
| | | } |
| | | |
| | | |
| | | } |
| | | </script> |
| | | <style> |
| | | @import '~@assets/less/common.less'; |
| | | |
| | | .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | .success { |
| | | color: green; |
| | | } |
| | | .error { |
| | | color: red; |
| | | } |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | </style> |