From a892616db370b2185bc546a11c873df1137cc7e0 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期一, 01 九月 2025 09:44:01 +0800 Subject: [PATCH] 1、设备事故登记表以及三不放过原则分析报表导出及批量打印功能 2、调整首页看板及图表样式 --- src/views/eam/repair/EamReportAccidentsRegisterList.vue | 176 +++++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 125 insertions(+), 51 deletions(-) diff --git a/src/views/eam/repair/EamReportAccidentsRegisterList.vue b/src/views/eam/repair/EamReportAccidentsRegisterList.vue index 7758fa2..a01df26 100644 --- a/src/views/eam/repair/EamReportAccidentsRegisterList.vue +++ b/src/views/eam/repair/EamReportAccidentsRegisterList.vue @@ -26,9 +26,22 @@ </a-form> </div> + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div class="table-operator"> + <a-button @click="handleBatchPrint" type="primary" icon="monitor" :disabled="selectedRowKeys.length===0">鎵归噺棰勮 + </a-button> + </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> + </div> + <!-- table鍖哄煙-begin --> <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" - :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}" @change="handleTableChange"> + :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}" @change="handleTableChange" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"> <!--鏄惁鏈夎澶囨搷浣滆瘉--> <template slot="operationCertificate" slot-scope="text"> @@ -56,7 +69,7 @@ </template> <span slot="action" slot-scope="text, record"> - <template v-if="record.registerStatus=='PENDING_SUBMIT'"> + <template v-if="record.registerStatus==='PENDING_SUBMIT'"> <a @click="handleEdit(record)">缂栬緫</a> <a-divider type="vertical"/> <a-popconfirm title="纭畾鎻愪氦鍚�?" @confirm="() => handleSubmit(record.id)"> @@ -67,40 +80,55 @@ <a v-else @click="handleDetail(record)">璇︽儏</a> </span> + <!--瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず--> + <span slot="accidentPhenomenon" slot-scope="text"> + <j-ellipsis :value="text" :length="8"/> + </span> + <!--瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず--> + <span slot="measure" slot-scope="text"> + <j-ellipsis :value="text" :length="8"/> + </span> + <!--瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず--> + <span slot="causingResults" slot-scope="text"> + <j-ellipsis :value="text" :length="8"/> + </span> + </a-table> <!-- table鍖哄煙-end --> <!-- 琛ㄥ崟鍖哄煙 --> <eamReportAccidentsRegister-modal ref="modalForm" @ok="modalFormOk"/> + + <!--瀹℃壒绐楀彛--> + <report-accidents-register-approval-modal ref="reportAccidentsRegisterApprovalModal" + :selectShenpiData="selectedRowData"/> + + <!--鎵归噺鎵撳嵃绐楀彛--> + <eam-accidents-register-batch-print-modal ref="batchPrintModal"/> </a-card> </template> <script> - import '@/assets/less/TableExpand.less' import EamReportAccidentsRegisterModal from './modules/EamReportAccidentsRegisterModal' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import LxSearchEquipmentSelect from '../equipment/modules/LxSearchEquipmentSelect' + import { getAction } from '@/api/manage' + import ReportAccidentsRegisterApprovalModal + from '../../flowable/workflow/repairOrder/ReportAccidentsRegisterApprovalModal' + import EamAccidentsRegisterBatchPrintModal from './modules/EamAccidentsRegisterBatchPrintModal' export default { name: 'EamReportAccidentsRegisterList', mixins: [JeecgListMixin], components: { + EamAccidentsRegisterBatchPrintModal, + ReportAccidentsRegisterApprovalModal, LxSearchEquipmentSelect, EamReportAccidentsRegisterModal - }, - props: { - isDisplayOperation: { - type: Boolean, - default: true - }, - propsQueryParam: { - type: Object - } }, data() { return { description: '璁惧浜嬫晠鐧昏琛ㄧ鐞嗛〉闈�', - disableMixinCreated: true, // 琛ㄥご columns: [ { @@ -140,6 +168,21 @@ fixed: 'left' }, { + title: '搴熷搧浠跺彿', + align: 'center', + dataIndex: 'scrapPartNumber' + }, + { + title: '搴熷搧浠舵暟', + align: 'center', + dataIndex: 'scrapPartQuantity' + }, + { + title: '搴熷搧浠峰��', + align: 'center', + dataIndex: 'scrapPartValue' + }, + { title: '鏄惁鏈夎澶囨搷浣滆瘉', align: 'center', dataIndex: 'operationCertificate', @@ -176,22 +219,25 @@ { title: '浜嬫晠鐜拌薄', align: 'center', - dataIndex: 'accidentPhenomenon' + dataIndex: 'accidentPhenomenon', + scopedSlots: { customRender: 'accidentPhenomenon' } }, { title: '閲囧彇鎺柦', align: 'center', - dataIndex: 'measure' + dataIndex: 'measure', + scopedSlots: { customRender: 'measure' } }, { title: '閫犳垚缁撴灉', align: 'center', - dataIndex: 'causingResults' + dataIndex: 'causingResults', + scopedSlots: { customRender: 'causingResults' } }, { title: '鎿嶄綔宸�', align: 'center', - dataIndex: 'confirmer' + dataIndex: 'confirmer_dictText' }, { title: '鎿嶄綔宸ョ‘璁ゆ椂闂�', @@ -201,7 +247,7 @@ { title: '鍖洪暱', align: 'center', - dataIndex: 'district' + dataIndex: 'district_dictText' }, { title: '鍖洪暱纭鏃堕棿', @@ -211,7 +257,7 @@ { title: '涓績涓讳换', align: 'center', - dataIndex: 'centerDirector' + dataIndex: 'centerDirector_dictText' }, { title: '涓績涓讳换纭鏃堕棿', @@ -226,7 +272,7 @@ { title: '璁惧鐘舵��', align: 'center', - dataIndex: 'equipmentStatus' + dataIndex: 'equipmentStatus_dictText' }, { title: '鍘熷洜鍒嗘瀽', @@ -236,7 +282,7 @@ { title: '妫�鏌ョ粨鏋�', align: 'center', - dataIndex: 'inspectionResults' + dataIndex: 'inspectionResults_dictText' }, { title: '閲囧彇鎺柦', @@ -256,7 +302,7 @@ { title: '缁翠慨纭', align: 'center', - dataIndex: 'repairConfirm' + dataIndex: 'repairConfirm_dictText' }, { title: '缁翠慨纭鏃堕棿', @@ -266,7 +312,7 @@ { title: '缁翠慨缁勯暱纭', align: 'center', - dataIndex: 'repairGroupLeader' + dataIndex: 'repairGroupLeader_dictText' }, { title: '缁翠慨缁勯暱纭鏃堕棿', @@ -276,7 +322,7 @@ { title: '缁翠慨缁勯暱纭', align: 'center', - dataIndex: 'repairDistrict' + dataIndex: 'repairDistrict_dictText' }, { title: '缁翠慨缁勯暱纭鏃堕棿', @@ -284,7 +330,7 @@ dataIndex: 'repairDistrictTime' }, { - title: '鍘熷洜鍒嗘瀽鏍稿;鍚屾剰銆佷笉鍚屾剰', + title: '鍘熷洜鍒嗘瀽鏍稿', align: 'center', dataIndex: 'checkAgree', scopedSlots: { customRender: 'checkAgree' } @@ -307,7 +353,7 @@ { title: '鎶�鏈礋璐d汉', align: 'center', - dataIndex: 'technicalDirector' + dataIndex: 'technicalDirector_dictText' }, { title: '鎶�鏈礋璐d汉纭鏃堕棿', @@ -317,7 +363,7 @@ { title: '鎶�鏈富绠″绾ч瀵�', align: 'center', - dataIndex: 'technicalDirectorLeader' + dataIndex: 'technicalDirectorLeader_dictText' }, { title: '鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�', @@ -327,47 +373,75 @@ { title: '涓荤閮ㄧ骇棰嗗', align: 'center', - dataIndex: 'technicalDirectorPart' + dataIndex: 'technicalDirectorPart_dictText' }, { title: '涓荤閮ㄧ骇棰嗗纭鏃堕棿', align: 'center', dataIndex: 'technicalDirectorPartTime' + }, + { + title: 'HF缂栫爜', + align: 'center', + dataIndex: 'hfCode' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align: 'center', + scopedSlots: { customRender: 'action' }, + width: 200, + fixed: 'right' } ], selectedRowData: {}, url: { list: '/eam/eamReportAccidentsRegister/list', - delete: '/eam/eamReportAccidentsRegister/delete', - deleteBatch: '/eam/eamReportAccidentsRegister/deleteBatch', - exportXlsUrl: 'eam/eamReportAccidentsRegister/exportXls', - importExcelUrl: 'eam/eamReportAccidentsRegister/importExcel' + submit: '/eam/eamReportAccidentsRegister/submit', + delete: '/eam/eamReportAccidentsRegister/delete' } } - }, - created() { - if (!this.isDisplayOperation) this.queryParam = Object.assign({}, this.propsQueryParam) - else { - const operationColumn = { - title: '鎿嶄綔', - dataIndex: 'action', - align: 'center', - scopedSlots: { customRender: 'action' }, - width: 200, - fixed: 'right' - } - this.columns = [...this.columns, operationColumn] - } - this.loadData(1) }, methods: { /** - * 鐐瑰嚮濉姤鏃惰Е鍙� + * 鐐瑰嚮鎻愪氦鏃惰Е鍙� + * @param id + */ + handleSubmit(id) { + this.loading = true + getAction(this.url.submit, { id }) + .then(res => { + if (res.success) { + this.$notification.success({ + message: '娑堟伅', + description: res.message + }) + this.loadData() + } else { + this.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + this.loading = false + } + }) + }, + + // 鎵归噺鎵撳嵃 + handleBatchPrint() { + this.$refs.batchPrintModal.handlePreview(this.selectedRowKeys.join()) + }, + + /** + * 鐐瑰嚮璇︽儏鏃惰Е鍙戞椂瑙﹀彂 * @param record */ - handleFillIn(record) { - this.$refs.modalForm.title = '濉姤' - this.$refs.modalForm.handleFillIn(record) + handleDetail(record) { + this.selectedRowData = Object.assign({}, record) + this.$refs.reportAccidentsRegisterApprovalModal.title = '璇︽儏' + this.$refs.reportAccidentsRegisterApprovalModal.disableSubmit = true + this.$refs.reportAccidentsRegisterApprovalModal.visible = true + this.$refs.reportAccidentsRegisterApprovalModal.handleDetail(record) } } } -- Gitblit v1.9.3