From 240c74ffb2b98faddf76648116ca9eeb61ee2cde Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期四, 11 一月 2024 09:34:49 +0800 Subject: [PATCH] 问题项修改 --- src/views/eam/EquipmentListOfTester.vue | 975 ++++++++++++++++++++++++++++++++------------------------ 1 files changed, 553 insertions(+), 422 deletions(-) diff --git a/src/views/eam/EquipmentListOfTester.vue b/src/views/eam/EquipmentListOfTester.vue index 8b39870..675006b 100644 --- a/src/views/eam/EquipmentListOfTester.vue +++ b/src/views/eam/EquipmentListOfTester.vue @@ -1,14 +1,20 @@ <template> - <a-card :bordered="false" title="璇曢獙鍣�"> + <a-card + :bordered="false" + title="璇曢獙鍣�" + > <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> - <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > <a-row :gutter="24"> <a-col :span="6"> <a-form-item - label="璁惧鎵�灞炲垎绫�" - :labelCol="labelCol" - :wrapperCol="wrapperCol" + label="璁惧鎵�灞炲垎绫�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" > <j-dict-select-tag :dictCode="'mom_eam_equipment_category,name,id,equipment_category_uda1='+'\''+caytegoryParam+'\''" @@ -17,13 +23,11 @@ /> </a-form-item> </a-col> - <a-col - :span="6" - > - <a-form-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="缁熶竴缂栫爜" + <a-col :span="6"> + <a-form-item + :labelCol="labelCol" + :wrapperCol="wrapperCol" + label="缁熶竴缂栫爜" > <a-input placeholder="璇疯緭鍏ヨ澶囩粺涓�缂栫爜鏌ヨ" @@ -31,13 +35,11 @@ ></a-input> </a-form-item> </a-col> - <a-col - :span="6" - > - <a-form-item - :labelCol="labelCol" - :wrapperCol="wrapperCol" - label="璁惧鍚嶇О" + <a-col :span="6"> + <a-form-item + :labelCol="labelCol" + :wrapperCol="wrapperCol" + label="璁惧鍚嶇О" > <a-input placeholder="璇疯緭鍏ヨ澶囧悕绉版煡璇�" @@ -49,23 +51,23 @@ <a-form-item label="鍨嬪彿" :labelCol="labelCol" - :wrapperCol="wrapperCol" + :wrapperCol="wrapperCol" > - <a-input + <a-input v-model="queryParam.model" placeholder="璇疯緭鍏ュ瀷鍙�" - ></a-input> + ></a-input> </a-form-item> - </a-col> + </a-col> </a-row> <a-row :gutter="24"> <a-col :span="6"> <a-form-item label="宸ュ尯" :labelCol="labelCol" - :wrapperCol="wrapperCol" + :wrapperCol="wrapperCol" > - <j-dict-select-tag + <j-dict-select-tag allow-clear placeholder="璇烽�夋嫨宸ュ尯" :triggerChange="true" @@ -93,9 +95,9 @@ <a-form-item label="缁存姢閮ㄩ棬" :labelCol="labelCol" - :wrapperCol="wrapperCol" + :wrapperCol="wrapperCol" > - <a-tree-select + <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" @@ -109,9 +111,9 @@ <a-form-item label="浣跨敤閮ㄩ棬" :labelCol="labelCol" - :wrapperCol="wrapperCol" + :wrapperCol="wrapperCol" > - <a-tree-select + <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" @@ -125,7 +127,7 @@ <a-form-item label="鏄惁鐢熶骇绾胯澶�" :labelCol="labelCol" - :wrapperCol="wrapperCol" + :wrapperCol="wrapperCol" > <j-dict-select-tag allow-clear @@ -142,7 +144,7 @@ <a-form-item label="ABC鏍囪瘑" :labelCol="labelCol" - :wrapperCol="wrapperCol" + :wrapperCol="wrapperCol" > <j-dict-select-tag allow-clear @@ -172,7 +174,7 @@ <a-form-item label="璁惧鐘舵��" :labelCol="labelCol" - :wrapperCol="wrapperCol" + :wrapperCol="wrapperCol" > <j-dict-select-tag allow-clear @@ -206,7 +208,12 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <j-date style="width: 100%;" placeholder="璇烽�夋嫨寮�濮嬫棩鏈�" class="query-group-cust" v-model="queryParam.warrantyStart"></j-date> + <j-date + style="width: 100%;" + placeholder="璇烽�夋嫨寮�濮嬫棩鏈�" + class="query-group-cust" + v-model="queryParam.warrantyStart" + ></j-date> </a-form-model-item> </a-col> <a-col :span="6"> @@ -215,7 +222,12 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <j-date style="width: 100%;" placeholder="璇烽�夋嫨缁撴潫鏃ユ湡" class="query-group-cust" v-model="queryParam.warrantyEnd"></j-date> + <j-date + style="width: 100%;" + placeholder="璇烽�夋嫨缁撴潫鏃ユ湡" + class="query-group-cust" + v-model="queryParam.warrantyEnd" + ></j-date> </a-form-model-item> </a-col> </a-row> @@ -234,19 +246,58 @@ @click="searchReset" icon="reload" >閲嶇疆</a-button> - <a-button @click="handleAdd" type="primary" icon="plus" v-has="'equipmentAccount:add&delete&import&Edit'">鏂板</a-button> - <a-button type="primary" icon="download" @click="handleExportXls('璁惧鍙拌处')" v-has="'equipmentAccount:outport'">瀵煎嚭</a-button> - <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> - <a-button type="primary" icon="import" v-has="'equipmentAccount:add&delete&import&Edit'">瀵煎叆</a-button> + <a-button + @click="handleAdd" + type="primary" + icon="plus" + v-has="'equipmentAccount:add&delete&import&Edit'" + >鏂板</a-button> + <a-button + type="primary" + icon="download" + @click="handleExportXls('璁惧鍙拌处')" + v-has="'equipmentAccount:outport'" + >瀵煎嚭</a-button> + <a-upload + name="file" + :showUploadList="false" + :multiple="false" + :headers="tokenHeader" + :action="importExcelUrl" + @change="handleImportExcel" + > + <a-button + type="primary" + icon="import" + v-has="'equipmentAccount:add&delete&import&Edit'" + >瀵煎叆</a-button> </a-upload> - <a-button :disabled="selectedRowKeys.length==0" @click="handleUpdateABC" type="primary" icon="font-colors" v-has="'equipmentAccount:add&delete&import&Edit'">ABC鏍囪瘑鍙樻洿</a-button> - <a-button :disabled="selectedRowKeys.length==0" @click="handleUpdateWarranty" type="primary" icon="calendar" v-has="'equipmentAccount:add&delete&import&Edit'">璐ㄤ繚鏈熷彉鏇�</a-button> + <a-button + :disabled="selectedRowKeys.length==0" + @click="handleUpdateABC" + type="primary" + icon="font-colors" + v-has="'equipmentAccount:add&delete&import&Edit'" + >ABC鏍囪瘑鍙樻洿</a-button> + <a-button + :disabled="selectedRowKeys.length==0" + @click="handleUpdateWarranty" + type="primary" + icon="calendar" + v-has="'equipmentAccount:add&delete&import&Edit'" + >璐ㄤ繚鏈熷彉鏇�</a-button> </div> <!-- 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;" + > <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="onClearSelected" + >娓呯┖</a> </div> <a-table @@ -261,162 +312,192 @@ :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'checkbox'}" :customRow="clickThenSelect" - @change="handleTableChange"> + @change="handleTableChange" + > - <template slot="htmlSlot" slot-scope="text"> + <template + slot="htmlSlot" + slot-scope="text" + > <div v-html="text"></div> </template> - <template slot="imgSlot" 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 + slot="imgSlot" + 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> + <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)"> + @click="downloadFile(text)" + > 涓嬭浇 </a-button> </template> - <!--宸ヨ壓鍙傛暟涓�у睍绀�--> - <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" - /> + 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 - 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" - /> + 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 - v-if="record.processParameters==1" - class="success" - >鏄�</span> - <a-badge - v-if="record.processParameters==0" - status="error" - /> + 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 - 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> + 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 + <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='handleDetail(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 v-has="'accountSons:add&edit&delete&submit'" v-if="record.processParameters==1"> - <a @click="editProcess(record)">宸ヨ壓鍙傛暟缁存姢</a> - </a-menu-item> - <a-menu-item v-has="'accountSons:add&edit&delete&submit'" v-if="record.precisionParameters==1"> - <a @click="editPrecision(record)">绮惧害鍙傛暟缁存姢</a> - </a-menu-item> - <a-menu-item v-has="'equipmentAccount:add&delete&import&Edit'"> - <a @click="handleEdit(record)" >缂栬緫</a> - </a-menu-item> - <a-menu-item v-has="'equipmentAccount:add&delete&import&Edit'"> - <a @click="handleEditSpareParts(record)" >缂栬緫澶囦欢</a> - </a-menu-item> - <a-menu-item> - <a-popconfirm - title="纭畾鍒犻櫎鍚�?" - @confirm="() => handleDelete(record.id)" - v-has="'equipmentAccount:add&delete&import&Edit'" + <a + href="javascript:;" + @click='handleDetail(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 + v-has="'accountSons:add&edit&delete&submit'" + v-if="record.processParameters==1" > - <a>鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> - </span> + <a @click="editProcess(record)">宸ヨ壓鍙傛暟缁存姢</a> + </a-menu-item> + <a-menu-item + v-has="'accountSons:add&edit&delete&submit'" + v-if="record.precisionParameters==1" + > + <a @click="editPrecision(record)">绮惧害鍙傛暟缁存姢</a> + </a-menu-item> + <a-menu-item v-has="'equipmentAccount:add&delete&import&Edit'"> + <a @click="handleEdit(record)">缂栬緫</a> + </a-menu-item> + <a-menu-item v-has="'equipmentAccount:add&delete&import&Edit'"> + <a @click="handleEditSpareParts(record)">缂栬緫澶囦欢</a> + </a-menu-item> + <a-menu-item> + <a-popconfirm + title="纭畾鍒犻櫎鍚�?" + @confirm="() => handleDelete(record.id)" + v-has="'equipmentAccount:add&delete&import&Edit'" + > + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> </a-table> </div> <equipment-resume-drawer @@ -425,103 +506,153 @@ ></equipment-resume-drawer> <a-tabs defaultActiveKey="1"> - <a-tab-pane tab="宸ヨ壓鍙傛暟" key="1" > - <EquipmentProcessParametersList - :mainId="selectedMainId" - :isOpen="isOpenProcess" + <a-tab-pane + tab="宸ヨ壓鍙傛暟" + key="1" + > + <EquipmentProcessParametersList + :mainId="selectedMainId" + :isOpen="isOpenProcess" /> </a-tab-pane> - <a-tab-pane tab="璁惧绮惧害" key="2" forceRender> - <EquipmentPrecisionParametersList - :isOpen="isOpenPrecision" - :mainId="precisionParametersTemplateId" /> + <a-tab-pane + tab="璁惧绮惧害" + key="2" + forceRender + > + <EquipmentPrecisionParametersList + :isOpen="isOpenPrecision" + :mainId="precisionParametersTemplateId" + /> </a-tab-pane> - <a-tab-pane tab="璁惧鏂囨。" key="3" forceRender> + <a-tab-pane + tab="璁惧鏂囨。" + key="3" + forceRender + > <EquipmentDocumentList :mainId="selectedMainId" /> </a-tab-pane> - <a-tab-pane tab="澶囦欢" key="4" forceRender> + <a-tab-pane + tab="澶囦欢" + key="4" + forceRender + > <EquipmentSpareParts :mainId="selectedMainId" /> </a-tab-pane> - <a-tab-pane tab="ABC鏍囪瘑鍙樻洿璁板綍" key="5" forceRender> + <a-tab-pane + tab="ABC鏍囪瘑鍙樻洿璁板綍" + key="5" + forceRender + > <equipment-update-ABC-list :mainId="selectedMainId" /> </a-tab-pane> - <a-tab-pane tab="璐ㄤ繚鏈熷彉鏇�" key="6" forceRender> + <a-tab-pane + tab="璐ㄤ繚鏈熷彉鏇�" + key="6" + forceRender + > <equipment-update-warranty-list :mainId="selectedMainId" /> </a-tab-pane> - <a-tab-pane tab="鏃ヤ繚鏍囧噯" key="7" forceRender> + <a-tab-pane + tab="鏃ヤ繚鏍囧噯" + key="7" + forceRender + > <daily-maintenance-list :mainId="selectedMainId"></daily-maintenance-list> </a-tab-pane> - <a-tab-pane tab="浜屼繚鏍囧噯" key="8" forceRender> + <a-tab-pane + tab="浜屼繚鏍囧噯" + key="8" + forceRender + > <second-maintenance-list :mainId="selectedMainId"></second-maintenance-list> </a-tab-pane> - <a-tab-pane tab="涓変繚鏍囧噯" key="9" forceRender> + <a-tab-pane + tab="涓変繚鏍囧噯" + key="9" + forceRender + > <third-maintenance-list :mainId="selectedMainId"></third-maintenance-list> </a-tab-pane> </a-tabs> - <equipment-modal ref="modalForm" @ok="modalFormOk" :caytegoryParam="caytegoryParam"></equipment-modal> - <process-edit-model ref ="processEditModel"></process-edit-model> - <precision-edit-model ref ="precisionEditModel"></precision-edit-model> - <aBC-update-edit-model @ok="modalFormOk" :updateList="selectionRows" ref="updateABC"></aBC-update-edit-model> - <warranty-update-model :updateList="selectionRows" ref="updateWarranty"></warranty-update-model> - <EquipmentSparePartsModal ref="modalFormSpareParts" @ok="modalFormOk" /> + <equipment-modal + ref="modalForm" + @ok="modalFormOk" + :caytegoryParam="caytegoryParam" + ></equipment-modal> + <process-edit-model ref="processEditModel"></process-edit-model> + <precision-edit-model ref="precisionEditModel"></precision-edit-model> + <aBC-update-edit-model + @ok="modalFormOk" + :updateList="selectionRows" + ref="updateABC" + ></aBC-update-edit-model> + <warranty-update-model + :updateList="selectionRows" + ref="updateWarranty" + ></warranty-update-model> + <EquipmentSparePartsModal + ref="modalFormSpareParts" + @ok="modalFormOk" + /> </a-card> </template> <script> - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import { mixinDevice } from '@/utils/mixin' - import EquipmentModal from './modules/equipmentNew/EquipmentModal' - import { getAction } from '@/api/manage' - import EquipmentProcessParametersList from './modules/equipmentNew/EquipmentProcessParametersList' - import EquipmentDocumentList from './modules/equipmentNew/EquipmentDocumentList' - import EquipmentPrecisionParametersList from './modules/equipmentNew/EquipmentPrecisionParametersList' - import '@/assets/less/TableExpand.less' - import EquipmentResumeDrawer from './modules/equipmentNew/EquipmentResume/EquipmentResumeDrawer' - import JSearchSelectTag from '../../components/dict/JSearchSelectTag.vue' - import ProcessEditModel from './modules/equipmentNew/edit/ProcessEditModel.vue' - import PrecisionEditModel from './modules/equipmentNew/edit/PrecisionEditModel' - import EquipmentUpdateABCList from './modules/equipmentNew/EquipmentUpdateABCList.vue' - import EquipmentUpdateWarrantyList from './modules/equipmentNew/EquipmentUpdateWarrantyList.vue' - import ABCUpdateEditModel from './modules/equipmentNew/edit/ABCUpdateEditModel' - import WarrantyUpdateModel from './modules/equipmentNew/edit/WarrantyUpdateModel.vue' - import EquipmentSpareParts from './modules/equipmentNew/EquipmentSpareParts' - import EquipmentSparePartsModal from './modules/equipmentNew/EquipmentSparePartsModal' - import StandardOfInspection from './modules/equipmentNew/StandardOfInspection.vue' - import StandardOfMaintenance from './modules/equipmentNew/StandardOfMaintenance.vue' - import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue' - import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue' - import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue' - export default { - name: "EquipmentList", - mixins:[JeecgListMixin,mixinDevice], - components: { - EquipmentProcessParametersList, - EquipmentDocumentList, - EquipmentPrecisionParametersList, - EquipmentModal, - EquipmentResumeDrawer, - JSearchSelectTag, - ProcessEditModel, - PrecisionEditModel, - EquipmentUpdateABCList , - EquipmentUpdateWarrantyList, - ABCUpdateEditModel, - WarrantyUpdateModel, - EquipmentSpareParts, - EquipmentSparePartsModal, - StandardOfInspection, - StandardOfMaintenance, - DailyMaintenanceList, - SecondMaintenanceList, - ThirdMaintenanceList, - }, - data () { - return { - description: '璁惧鍙拌处绠$悊椤甸潰', - caytegoryParam:'tester', - // 琛ㄥご - columns: [ +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { mixinDevice } from '@/utils/mixin' +import EquipmentModal from './modules/equipmentNew/EquipmentModal' +import { getAction } from '@/api/manage' +import EquipmentProcessParametersList from './modules/equipmentNew/EquipmentProcessParametersList' +import EquipmentDocumentList from './modules/equipmentNew/EquipmentDocumentList' +import EquipmentPrecisionParametersList from './modules/equipmentNew/EquipmentPrecisionParametersList' +import '@/assets/less/TableExpand.less' +import EquipmentResumeDrawer from './modules/equipmentNew/EquipmentResume/EquipmentResumeDrawer' +import JSearchSelectTag from '../../components/dict/JSearchSelectTag.vue' +import ProcessEditModel from './modules/equipmentNew/edit/ProcessEditModel.vue' +import PrecisionEditModel from './modules/equipmentNew/edit/PrecisionEditModel' +import EquipmentUpdateABCList from './modules/equipmentNew/EquipmentUpdateABCList.vue' +import EquipmentUpdateWarrantyList from './modules/equipmentNew/EquipmentUpdateWarrantyList.vue' +import ABCUpdateEditModel from './modules/equipmentNew/edit/ABCUpdateEditModel' +import WarrantyUpdateModel from './modules/equipmentNew/edit/WarrantyUpdateModel.vue' +import EquipmentSpareParts from './modules/equipmentNew/EquipmentSpareParts' +import EquipmentSparePartsModal from './modules/equipmentNew/EquipmentSparePartsModal' +import StandardOfInspection from './modules/equipmentNew/StandardOfInspection.vue' +import StandardOfMaintenance from './modules/equipmentNew/StandardOfMaintenance.vue' +import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue' +import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue' +import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue' +export default { + name: "EquipmentList", + mixins: [JeecgListMixin, mixinDevice], + components: { + EquipmentProcessParametersList, + EquipmentDocumentList, + EquipmentPrecisionParametersList, + EquipmentModal, + EquipmentResumeDrawer, + JSearchSelectTag, + ProcessEditModel, + PrecisionEditModel, + EquipmentUpdateABCList, + EquipmentUpdateWarrantyList, + ABCUpdateEditModel, + WarrantyUpdateModel, + EquipmentSpareParts, + EquipmentSparePartsModal, + StandardOfInspection, + StandardOfMaintenance, + DailyMaintenanceList, + SecondMaintenanceList, + ThirdMaintenanceList, + }, + data() { + return { + description: '璁惧鍙拌处绠$悊椤甸潰', + caytegoryParam: 'tester', + // 琛ㄥご + columns: [ { title: '#', dataIndex: '', @@ -632,7 +763,7 @@ // align: "center", // dataIndex: 'fireExtinguisher', // }, - + // { // title: '鐏伀鍣ㄦ湁鏁堟湡', // align: "center", @@ -755,185 +886,185 @@ width: 147, fixed: 'right', }, - ], - url: { - list: "/eam/equipment/getEquipmentList", - delete: "/eam/equipment/delete", - deleteBatch: "/eam/equipment/deleteBatch", - active: "/eam/equipment/active", - exportXlsUrl: '/eam/equipment/exportXls', - importExcelUrl: "/eam/equipment/importExcel", - loadOptions: '/sys/sysDepart/loadDepartTreeOptions', + ], + url: { + list: "/eam/equipment/getEquipmentList", + delete: "/eam/equipment/delete", + deleteBatch: "/eam/equipment/deleteBatch", + active: "/eam/equipment/active", + exportXlsUrl: '/eam/equipment/exportXls', + importExcelUrl: "/eam/equipment/importExcel", + loadOptions: '/sys/sysDepart/loadDepartTreeOptions', + }, + dictOptions: { + }, + /* 鍒嗛〉鍙傛暟 */ + ipagination: { + current: 1, + pageSize: 10, + pageSizeOptions: ['5', '10', '20', '50'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" }, - dictOptions:{ - }, - /* 鍒嗛〉鍙傛暟 */ - ipagination:{ - current: 1, - pageSize: 5, - pageSizeOptions: ['5', '10', '50'], - showTotal: (total, range) => { - return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" - }, - showQuickJumper: true, - showSizeChanger: true, - total: 0 - }, - selectedMainId:'', - superFieldList:[], - equipmentProcessParametersMainId: '', - equipmentDocumentMainId: '', - equipmentPrecisionParametersMainId: '', - precisionParametersTemplateId:'', - isOpenPrecision:true, - isOpenProcess:true, - treeData: [], - labelCol: { + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + selectedMainId: '', + superFieldList: [], + equipmentProcessParametersMainId: '', + equipmentDocumentMainId: '', + equipmentPrecisionParametersMainId: '', + precisionParametersTemplateId: '', + isOpenPrecision: true, + isOpenProcess: true, + treeData: [], + labelCol: { xs: { span: 24 }, sm: { span: 5 }, - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 16 }, - }, - mainId:'', - } - }, - created() { - this.getSuperFieldList(); - this.initOptions(); - }, - computed: { - importExcelUrl: function(){ - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - } - }, - methods: { - initDictConfig(){ }, - equipmentResumeShow(record) { + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 }, + }, + mainId: '', + } + }, + created() { + this.getSuperFieldList(); + this.initOptions(); + }, + computed: { + importExcelUrl: function () { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + } + }, + methods: { + initDictConfig() { + }, + equipmentResumeShow(record) { this.$refs.EquipmentResumeDrawer.visible = true this.$refs.EquipmentResumeDrawer.title = '璁惧灞ュ巻' this.$refs.EquipmentResumeDrawer.handleShow(record) - }, - clickThenSelect(record) { - return { - on: { - click: () => { - this.onSelectChange(record.id.split(","), [record]); - } + }, + clickThenSelect(record) { + return { + on: { + click: () => { + this.onSelectChange(record.id.split(","), [record]); } } - }, - onClearSelected() { - this.selectedRowKeys = []; - this.selectionRows = []; - this.selectedMainId='' - }, - onSelectChange(selectedRowKeys, selectionRows) { - if(selectedRowKeys.length==1){ - this.selectedMainId=selectedRowKeys[0] - this.precisionParametersTemplateId = selectionRows[0].precisionParametersTemplateId; - this.isOpenProcess = selectionRows[0].processParameters==1; - this.isOpenPrecision = selectionRows[0].precisionParameters==1; - }else{ - this.selectedMainId='' - this.precisionParametersTemplateId = '' + } + }, + onClearSelected() { + this.selectedRowKeys = []; + this.selectionRows = []; + this.selectedMainId = '' + }, + onSelectChange(selectedRowKeys, selectionRows) { + if (selectedRowKeys.length == 1) { + this.selectedMainId = selectedRowKeys[0] + this.precisionParametersTemplateId = selectionRows[0].precisionParametersTemplateId; + this.isOpenProcess = selectionRows[0].processParameters == 1; + this.isOpenPrecision = selectionRows[0].precisionParameters == 1; + } else { + this.selectedMainId = '' + this.precisionParametersTemplateId = '' + } + this.selectedRowKeys = selectedRowKeys; + this.selectionRows = selectionRows; + }, + loadData(arg) { + if (!this.url.list) { + this.$message.error("璇疯缃畊rl.list灞炴��!") + return + } + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + if (arg === 1) { + this.ipagination.current = 1; + } + this.onClearSelected() + this.queryParam.equipmentCategoryUda1 = this.caytegoryParam; + var params = this.getQueryParams();//鏌ヨ鏉′欢 + this.loading = true; + getAction(this.url.list, params).then((res) => { + if (res.success) { + this.dataSource = res.result.records; + this.ipagination.total = res.result.total; } - this.selectedRowKeys = selectedRowKeys; - this.selectionRows = selectionRows; - }, - loadData(arg) { - if(!this.url.list){ - this.$message.error("璇疯缃畊rl.list灞炴��!") - return + if (res.code === 510) { + this.$message.warning(res.message) } - //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 - if (arg === 1) { - this.ipagination.current = 1; - } - this.onClearSelected() - this.queryParam.equipmentCategoryUda1 = this.caytegoryParam; - var params = this.getQueryParams();//鏌ヨ鏉′欢 - this.loading = true; - getAction(this.url.list, params).then((res) => { - if (res.success) { - this.dataSource = res.result.records; - this.ipagination.total = res.result.total; - } - if(res.code===510){ - this.$message.warning(res.message) - } - this.loading = false; - }) - }, - getSuperFieldList(){ - let fieldList=[]; - fieldList.push({type:'string',value:'num',text:'缁熶竴缂栫爜',dictCode:''}) - fieldList.push({type:'string',value:'name',text:'璁惧鍚嶇О',dictCode:''}) - fieldList.push({type:'string',value:'model',text:'鍨嬪彿',dictCode:''}) - fieldList.push({type:'string',value:'specification',text:'瑙勬牸',dictCode:''}) - fieldList.push({type:'string',value:'equipmentStatus',text:'璁惧鐘舵��',dictCode:''}) - fieldList.push({type:'string',value:'technologyStatus',text:'technologyStatus',dictCode:''}) - fieldList.push({type:'string',value:'assetNumber',text:'assetNumber',dictCode:''}) - fieldList.push({type:'string',value:'equipmentCategoryId',text:'equipmentCategoryId',dictCode:''}) - fieldList.push({type:'string',value:'specificEquipment',text:'specificEquipment',dictCode:''}) - fieldList.push({type:'string',value:'equipmentPhoto',text:'equipmentPhoto',dictCode:''}) - fieldList.push({type:'string',value:'constructorId',text:'璧勪骇鍒堕�犲晢',dictCode:''}) - fieldList.push({type:'string',value:'supplierId',text:'supplierId',dictCode:''}) - fieldList.push({type:'string',value:'factoryNumber',text:'factoryNumber',dictCode:''}) - fieldList.push({type:'string',value:'leaveFactoryDate',text:'鍑哄巶鏃ユ湡',dictCode:''}) - fieldList.push({type:'string',value:'acceptanceCheckDate',text:'楠屾敹鏃ユ湡',dictCode:''}) - fieldList.push({type:'string',value:'affiliationId',text:'affiliationId',dictCode:''}) - fieldList.push({type:'string',value:'manageId',text:'缁存姢閮ㄩ棬ID',dictCode:''}) - fieldList.push({type:'string',value:'manager',text:'manager',dictCode:''}) - fieldList.push({type:'string',value:'useId',text:'浣跨敤閮ㄩ棬ID',dictCode:''}) - fieldList.push({type:'string',value:'functionary',text:'functionary',dictCode:''}) - fieldList.push({type:'string',value:'location',text:'location',dictCode:''}) - fieldList.push({type:'string',value:'equipmentImportanceId',text:'ABC鏍囪瘑ID',dictCode:''}) - fieldList.push({type:'string',value:'processParameters',text:'processParameters',dictCode:''}) - fieldList.push({type:'string',value:'processParametersTemplateId',text:'processParametersTemplateId',dictCode:''}) - fieldList.push({type:'string',value:'precisionParameters',text:'precisionParameters',dictCode:''}) - fieldList.push({type:'string',value:'precisionParametersTemplateId',text:'precisionParametersTemplateId',dictCode:''}) - fieldList.push({type:'string',value:'verification',text:'verification',dictCode:''}) - fieldList.push({type:'string',value:'verificationPeriod',text:'verificationPeriod',dictCode:''}) - fieldList.push({type:'string',value:'lastVerificationDate',text:'lastVerificationDate',dictCode:''}) - fieldList.push({type:'string',value:'nextVerificationDate',text:'nextVerificationDate',dictCode:''}) - fieldList.push({type:'string',value:'status',text:'status',dictCode:''}) - fieldList.push({type:'string',value:'remark',text:'remark',dictCode:''}) - fieldList.push({type:'string',value:'equipmentUda1',text:'宸ュ尯',dictCode:''}) - fieldList.push({type:'string',value:'equipmentUda2',text:'瀹夎浣嶇疆',dictCode:''}) - fieldList.push({type:'string',value:'equipmentUda3',text:'閲嶉噺',dictCode:''}) - fieldList.push({type:'string',value:'equipmentUda4',text:'閲嶉噺璁¢噺鍗曚綅ID',dictCode:''}) - fieldList.push({type:'string',value:'equipmentUda5',text:'鍔熻兘浣嶇疆',dictCode:''}) - fieldList.push({type:'string',value:'tenantId',text:'tenantId',dictCode:''}) - fieldList.push({type:'int',value:'delFlag',text:'delFlag',dictCode:''}) - fieldList.push({type:'string',value:'teamId',text:'缁翠慨鐝粍ID',dictCode:''}) - fieldList.push({type:'string',value:'sourceId',text:'sourceId',dictCode:''}) - fieldList.push({type:'string',value:'fundSource',text:'璧勯噾鏉ユ簮',dictCode:''}) - fieldList.push({type:'string',value:'factoryNo',text:'鍑哄巶缂栧彿',dictCode:''}) - fieldList.push({type:'string',value:'mfr',text:'鍒堕�犲晢',dictCode:''}) - fieldList.push({type:'string',value:'sourceCountry',text:'璧勪骇鏉ユ簮鍥藉',dictCode:''}) - fieldList.push({type:'string',value:'gpo',text:'鎬诲姛鐜�',dictCode:''}) - fieldList.push({type:'string',value:'keyEquipmentIdentification',text:'鍏抽敭璁惧鏍囪瘑',dictCode:''}) - fieldList.push({type:'string',value:'securityConfiguration',text:'瀹夊叏閰嶇疆',dictCode:''}) - fieldList.push({type:'string',value:'coolingSystem',text:'鍐峰嵈绯荤粺',dictCode:''}) - fieldList.push({type:'string',value:'fireExtinguisher',text:'鐏伀鍣�',dictCode:''}) - fieldList.push({type:'string',value:'fireExtinguisherValidityPeriod',text:'鐏伀鍣ㄦ湁鏁堟湡',dictCode:''}) - fieldList.push({type:'string',value:'operatingSystem',text:'鎿嶄綔绯荤粺',dictCode:''}) - fieldList.push({type:'string',value:'system',text:'绯荤粺',dictCode:''}) - fieldList.push({type:'string',value:'port',text:'绔彛',dictCode:''}) - fieldList.push({type:'BigDecimal',value:'coordinateNum',text:'鍧愭爣鏁伴噺',dictCode:''}) - fieldList.push({type:'string',value:'projectApprovalNo',text:'绔嬮」鍗″彿',dictCode:''}) - this.superFieldList = fieldList - }, - editProcess(record){ - this.$refs.processEditModel.edit(record); - }, - editPrecision(record){ - this.$refs.precisionEditModel.edit(record); - }, - initOptions() { + this.loading = false; + }) + }, + getSuperFieldList() { + let fieldList = []; + fieldList.push({ type: 'string', value: 'num', text: '缁熶竴缂栫爜', dictCode: '' }) + fieldList.push({ type: 'string', value: 'name', text: '璁惧鍚嶇О', dictCode: '' }) + fieldList.push({ type: 'string', value: 'model', text: '鍨嬪彿', dictCode: '' }) + fieldList.push({ type: 'string', value: 'specification', text: '瑙勬牸', dictCode: '' }) + fieldList.push({ type: 'string', value: 'equipmentStatus', text: '璁惧鐘舵��', dictCode: '' }) + fieldList.push({ type: 'string', value: 'technologyStatus', text: 'technologyStatus', dictCode: '' }) + fieldList.push({ type: 'string', value: 'assetNumber', text: 'assetNumber', dictCode: '' }) + fieldList.push({ type: 'string', value: 'equipmentCategoryId', text: 'equipmentCategoryId', dictCode: '' }) + fieldList.push({ type: 'string', value: 'specificEquipment', text: 'specificEquipment', dictCode: '' }) + fieldList.push({ type: 'string', value: 'equipmentPhoto', text: 'equipmentPhoto', dictCode: '' }) + fieldList.push({ type: 'string', value: 'constructorId', text: '璧勪骇鍒堕�犲晢', dictCode: '' }) + fieldList.push({ type: 'string', value: 'supplierId', text: 'supplierId', dictCode: '' }) + fieldList.push({ type: 'string', value: 'factoryNumber', text: 'factoryNumber', dictCode: '' }) + fieldList.push({ type: 'string', value: 'leaveFactoryDate', text: '鍑哄巶鏃ユ湡', dictCode: '' }) + fieldList.push({ type: 'string', value: 'acceptanceCheckDate', text: '楠屾敹鏃ユ湡', dictCode: '' }) + fieldList.push({ type: 'string', value: 'affiliationId', text: 'affiliationId', dictCode: '' }) + fieldList.push({ type: 'string', value: 'manageId', text: '缁存姢閮ㄩ棬ID', dictCode: '' }) + fieldList.push({ type: 'string', value: 'manager', text: 'manager', dictCode: '' }) + fieldList.push({ type: 'string', value: 'useId', text: '浣跨敤閮ㄩ棬ID', dictCode: '' }) + fieldList.push({ type: 'string', value: 'functionary', text: 'functionary', dictCode: '' }) + fieldList.push({ type: 'string', value: 'location', text: 'location', dictCode: '' }) + fieldList.push({ type: 'string', value: 'equipmentImportanceId', text: 'ABC鏍囪瘑ID', dictCode: '' }) + fieldList.push({ type: 'string', value: 'processParameters', text: 'processParameters', dictCode: '' }) + fieldList.push({ type: 'string', value: 'processParametersTemplateId', text: 'processParametersTemplateId', dictCode: '' }) + fieldList.push({ type: 'string', value: 'precisionParameters', text: 'precisionParameters', dictCode: '' }) + fieldList.push({ type: 'string', value: 'precisionParametersTemplateId', text: 'precisionParametersTemplateId', dictCode: '' }) + fieldList.push({ type: 'string', value: 'verification', text: 'verification', dictCode: '' }) + fieldList.push({ type: 'string', value: 'verificationPeriod', text: 'verificationPeriod', dictCode: '' }) + fieldList.push({ type: 'string', value: 'lastVerificationDate', text: 'lastVerificationDate', dictCode: '' }) + fieldList.push({ type: 'string', value: 'nextVerificationDate', text: 'nextVerificationDate', dictCode: '' }) + fieldList.push({ type: 'string', value: 'status', text: 'status', dictCode: '' }) + fieldList.push({ type: 'string', value: 'remark', text: 'remark', dictCode: '' }) + fieldList.push({ type: 'string', value: 'equipmentUda1', text: '宸ュ尯', dictCode: '' }) + fieldList.push({ type: 'string', value: 'equipmentUda2', text: '瀹夎浣嶇疆', dictCode: '' }) + fieldList.push({ type: 'string', value: 'equipmentUda3', text: '閲嶉噺', dictCode: '' }) + fieldList.push({ type: 'string', value: 'equipmentUda4', text: '閲嶉噺璁¢噺鍗曚綅ID', dictCode: '' }) + fieldList.push({ type: 'string', value: 'equipmentUda5', text: '鍔熻兘浣嶇疆', dictCode: '' }) + fieldList.push({ type: 'string', value: 'tenantId', text: 'tenantId', dictCode: '' }) + fieldList.push({ type: 'int', value: 'delFlag', text: 'delFlag', dictCode: '' }) + fieldList.push({ type: 'string', value: 'teamId', text: '缁翠慨鐝粍ID', dictCode: '' }) + fieldList.push({ type: 'string', value: 'sourceId', text: 'sourceId', dictCode: '' }) + fieldList.push({ type: 'string', value: 'fundSource', text: '璧勯噾鏉ユ簮', dictCode: '' }) + fieldList.push({ type: 'string', value: 'factoryNo', text: '鍑哄巶缂栧彿', dictCode: '' }) + fieldList.push({ type: 'string', value: 'mfr', text: '鍒堕�犲晢', dictCode: '' }) + fieldList.push({ type: 'string', value: 'sourceCountry', text: '璧勪骇鏉ユ簮鍥藉', dictCode: '' }) + fieldList.push({ type: 'string', value: 'gpo', text: '鎬诲姛鐜�', dictCode: '' }) + fieldList.push({ type: 'string', value: 'keyEquipmentIdentification', text: '鍏抽敭璁惧鏍囪瘑', dictCode: '' }) + fieldList.push({ type: 'string', value: 'securityConfiguration', text: '瀹夊叏閰嶇疆', dictCode: '' }) + fieldList.push({ type: 'string', value: 'coolingSystem', text: '鍐峰嵈绯荤粺', dictCode: '' }) + fieldList.push({ type: 'string', value: 'fireExtinguisher', text: '鐏伀鍣�', dictCode: '' }) + fieldList.push({ type: 'string', value: 'fireExtinguisherValidityPeriod', text: '鐏伀鍣ㄦ湁鏁堟湡', dictCode: '' }) + fieldList.push({ type: 'string', value: 'operatingSystem', text: '鎿嶄綔绯荤粺', dictCode: '' }) + fieldList.push({ type: 'string', value: 'system', text: '绯荤粺', dictCode: '' }) + fieldList.push({ type: 'string', value: 'port', text: '绔彛', dictCode: '' }) + fieldList.push({ type: 'BigDecimal', value: 'coordinateNum', text: '鍧愭爣鏁伴噺', dictCode: '' }) + fieldList.push({ type: 'string', value: 'projectApprovalNo', text: '绔嬮」鍗″彿', dictCode: '' }) + this.superFieldList = fieldList + }, + editProcess(record) { + this.$refs.processEditModel.edit(record); + }, + editPrecision(record) { + this.$refs.precisionEditModel.edit(record); + }, + initOptions() { getAction(this.url.loadOptions).then(res => { if (res.success) { this.treeData = res.result @@ -942,19 +1073,19 @@ } }) }, - handleUpdateABC(){ + handleUpdateABC() { this.$refs.updateABC.add(); }, - handleUpdateWarranty(){ + handleUpdateWarranty() { this.$refs.updateWarranty.add(); }, - handleEditSpareParts(record){ + handleEditSpareParts(record) { this.$refs.modalFormSpareParts.edit(record); } - } } +} </script> <style scoped> - @import '~@assets/less/common.less' +@import '~@assets/less/common.less'; </style> \ No newline at end of file -- Gitblit v1.9.3