From 2771237a6ea07eb1b7be389034b4dc2981b0cffd Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期五, 11 七月 2025 21:10:14 +0800 Subject: [PATCH] 1、设备台账新增和编辑增加技术状态字段 2、二保编辑功能 3、二保以及点检自动带入保养周期默认值而不是从设备处带出 --- src/views/eam/base/EamMaintenanceStandardList.vue | 572 +++++++++++++++++++++++++++++++-------------------------- 1 files changed, 310 insertions(+), 262 deletions(-) diff --git a/src/views/eam/base/EamMaintenanceStandardList.vue b/src/views/eam/base/EamMaintenanceStandardList.vue index fe262e6..a41ed60 100644 --- a/src/views/eam/base/EamMaintenanceStandardList.vue +++ b/src/views/eam/base/EamMaintenanceStandardList.vue @@ -1,37 +1,38 @@ <template> <a-card :bordered="false"> - <template v-if="isDisplayOperation"> <!-- 鏌ヨ鍖哄煙 --> <div class="table-page-search-wrapper"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> <a-col :xl="4" :lg="7" :md="8" :sm="24"> - <a-form-item label="鏍囧噯缂栫爜"> - <a-input placeholder="璇疯緭鍏ユ爣鍑嗙紪鐮�" v-model="queryParam.standardCode"></a-input> + <a-form-item label="瑙勮寖缂栫爜"> + <a-input placeholder="璇疯緭鍏ヨ鑼冪紪鐮�" v-model="queryParam.standardCode"/> </a-form-item> </a-col> <a-col :xl="4" :lg="7" :md="8" :sm="24"> - <a-form-item label="鏍囧噯鍚嶇О"> - <a-input placeholder="璇疯緭鍏ユ爣鍑嗗悕绉�" v-model="queryParam.standardName"></a-input> + <a-form-item label="瑙勮寖鍚嶇О"> + <a-input placeholder="璇疯緭鍏ヨ鑼冨悕绉�" v-model="queryParam.standardName"/> </a-form-item> </a-col> - <a-col :xl="4" :lg="7" :md="8" :sm="24"> - <a-form-item label="璁惧缂栧彿"> - <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="queryParam.equipmentId"></lx-search-equipment-select> + <a-col :xl="5" :lg="7" :md="8" :sm="24"> + <a-form-item label="缁熶竴缂栫爜"> + <lx-search-equipment-select placeholder="璇疯緭鍏ョ粺涓�缂栫爜鎴栧悕绉版悳绱�" v-model="queryParam.equipmentId"/> </a-form-item> </a-col> <a-col :xl="4" :lg="7" :md="8" :sm="24"> <a-form-item label="淇濆吇鍒嗙被"> - <j-dict-select-tag dict-code="maintenance_category" placeholder="璇烽�夋嫨淇濆吇鍒嗙被" v-model="queryParam.maintenanceCategory" /> + <j-dict-select-tag dict-code="maintenance_category" placeholder="璇烽�夋嫨淇濆吇鍒嗙被" + v-model="queryParam.maintenanceCategory"/> </a-form-item> </a-col> <a-col :xl="4" :lg="7" :md="8" :sm="24"> - <a-form-item label="鏍囧噯鐘舵��"> - <j-dict-select-tag dict-code="maintenance_standard_status" placeholder="璇烽�夋嫨鏍囧噯鐘舵��" v-model="queryParam.standardStatus" /> + <a-form-item label="瑙勮寖鐘舵��"> + <j-dict-select-tag dict-code="maintenance_standard_status" placeholder="璇烽�夋嫨瑙勮寖鐘舵��" + v-model="queryParam.standardStatus"/> </a-form-item> </a-col> - <a-col :xl="4" :lg="7" :md="8" :sm="24"> + <a-col :xl="3" :lg="7" :md="8" :sm="24"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> @@ -44,21 +45,30 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator"> <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> - <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" :action="inspectionImportExcel" + <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" + :action="inspectionImportExcel" @change="handleImportExcel"> <a-button type="primary" icon="import">鐐规鏍囧噯瀵煎叆</a-button> </a-upload> - <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.inspectionXlsDownloadUrl)">鐐规鏍囧噯妯℃澘涓嬭浇</a-button> - <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" :action="secondMaintenanceImportExcel" + <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.inspectionXlsDownloadUrl)"> + 鐐规鏍囧噯妯℃澘涓嬭浇 + </a-button> + <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" + :action="secondMaintenanceImportExcel" @change="handleImportExcel"> <a-button type="primary" icon="import">浜屼繚鏍囧噯瀵煎叆</a-button> </a-upload> - <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.secondMaintenanceXlsDownloadUrl)">浜屼繚鏍囧噯妯℃澘涓嬭浇</a-button> - <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" :action="thirdMaintenanceImportExcel" + <a-button type="primary" icon="download" + @click="handleTemplateXlsDownload(url.secondMaintenanceXlsDownloadUrl)">浜屼繚鏍囧噯妯℃澘涓嬭浇 + </a-button> + <a-upload name="file" :showUploadList="false" :multiple="true" :headers="tokenHeader" + :action="thirdMaintenanceImportExcel" @change="handleImportExcel"> <a-button type="primary" icon="import">涓変繚鏍囧噯瀵煎叆</a-button> </a-upload> - <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.thirdMaintenanceXlsDownloadUrl)">涓変繚鏍囧噯妯℃澘涓嬭浇</a-button> + <a-button type="primary" icon="download" @click="handleTemplateXlsDownload(url.thirdMaintenanceXlsDownloadUrl)"> + 涓変繚鏍囧噯妯℃澘涓嬭浇 + </a-button> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> <a-menu-item key="1" @click="batchDel"> @@ -72,8 +82,6 @@ </a-dropdown> </div> </template> - - <!-- table鍖哄煙-begin --> <div> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;" v-if="isDisplayOperation"> @@ -82,274 +90,314 @@ <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> </div> - <a-table - ref="table" - size="middle" - bordered - rowKey="id" - :columns="columns" - :dataSource="dataSource" - :pagination="ipagination" - :loading="loading" - class="j-table-force-nowrap" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - :customRow='clickThenSelect' - @change="handleTableChange"> - <template slot="referenceFile" slot-scope="text, record, index"> - <a v-if="text && text !== ''" @click.stop="handlePreview(record)">棰勮</a> - </template> + <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" + :pagination="ipagination" :loading="loading" class="j-table-force-nowrap" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" :customRow='clickThenSelect' + @change="handleTableChange"> <span slot="action" slot-scope="text, record"> - <a v-if="record.standardStatus === 'NORMAL'" @click.stop="handleEdit(record)">缂栬緫</a> + <a v-if="record.standardStatus === 'START'" @click.stop="handleUpgrade(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 v-if="record.standardStatus === 'NORMAL'"> - <a @click.stop="handleUpgrade(record)">鍗囩増</a> - </a-menu-item> - <a-menu-item v-if="record.standardStatus === 'NORMAL'"> - <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handleAbolish(record.id)"> - <a>浣滃簾</a> - </a-popconfirm> - </a-menu-item> - <a-menu-item> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> + <template v-if="record.standardStatus === 'WAIT_SUBMIT'"> + <a @click.stop="handleEdit(record)">缂栬緫</a> + + <a-divider type="vertical"/> + + <a-popconfirm title="纭畾鍙戣捣娴佺▼鍚�?" @confirm="() => startProcess(record.id)"> + <a @click.stop="event=>event.stopPropagation()">鍙戣捣娴佺▼</a> + </a-popconfirm> + + + <a-divider type="vertical"/> + + <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a @click.stop="event=>event.stopPropagation()">鍒犻櫎</a> + </a-popconfirm> + </template> + + <template v-if="record.standardStatus != 'WAIT_SUBMIT'"> + <a-divider type="vertical" v-if="record.standardStatus=='START'"/> + + <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> + <a @click.stop="event=>event.stopPropagation()">鍒犻櫎</a> + </a-popconfirm> + </template> </span> - </a-table> - <a-tabs defaultActiveKey="1"> - <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> + <a-tabs defaultActiveKey="1" v-if="selectionRows.length===1"> + <template v-if="selectionRows[0]&&selectionRows[0].maintenanceCategory=='POINT_INSPECTION'"> + <a-tab-pane tab="鏃ョ偣妫�" key="1"> + <eam-maintenance-standard-detail-list :standardId="standardId" :pageSelectionRow="selectionRows[0]" + filterKey="DAY_INSPECTION"/> + </a-tab-pane> + <a-tab-pane tab="鍛ㄧ偣妫�" key="2" forceRender> + <eam-maintenance-standard-detail-list :standardId="standardId" :pageSelectionRow="selectionRows[0]" + filterKey="WEEK_INSPECTION"/> + </a-tab-pane> + </template> + <template v-if="selectionRows[0]&&selectionRows[0].maintenanceCategory=='SECOND_MAINTENANCE'"> + <a-tab-pane tab="鎿嶄綔宸�" key="1"> + <eam-maintenance-standard-detail-list :standardId="standardId" :pageSelectionRow="selectionRows[0]" + filterKey="OPERATOR_MAINTENANCE"/> + </a-tab-pane> + <a-tab-pane tab="缁翠慨宸�" key="2" forceRender> + <eam-maintenance-standard-detail-list :standardId="standardId" :pageSelectionRow="selectionRows[0]" + filterKey="REPAIRER_MAINTENANCE"/> + </a-tab-pane> + </template> + + <a-tab-pane tab="涓変繚" key="1" v-if="selectionRows[0]&&selectionRows[0].maintenanceCategory=='THIRD_MAINTENANCE'"> + <eam-maintenance-standard-detail-list :standardId="standardId" + :pageSelectionRow="selectionRows[0]"/> + </a-tab-pane> </a-tabs> </div> <!-- table鍖哄煙-end --> <!-- 琛ㄥ崟鍖哄煙 --> - <eamMaintenanceStandard-modal ref="modalForm" @ok="modalFormOk"></eamMaintenanceStandard-modal> - <lx-file-preview ref="lxFilePreview" :fileUrl="fileUrl"></lx-file-preview> + <eamMaintenanceStandard-modal ref="modalForm" @ok="modalFormOk"/> </a-card> </template> <script> -import '@/assets/less/TableExpand.less' -import EamMaintenanceStandardModal from './modules/EamMaintenanceStandardModal' -import { JeecgListMixin } from '@/mixins/JeecgListMixin' -import EamMaintenanceStandardDetailList from '@views/eam/base/modules/EamMaintenanceStandardDetailList' -import { deleteAction, templateXlsDownload } from '@api/manage' -import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' + import '@/assets/less/TableExpand.less' + import EamMaintenanceStandardModal from './modules/EamMaintenanceStandardModal' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import EamMaintenanceStandardDetailList from '@views/eam/base/modules/EamMaintenanceStandardDetailList' + import { deleteAction, getAction, templateXlsDownload } from '@api/manage' + import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' -export default { - name: 'EamMaintenanceStandardList', - mixins: [JeecgListMixin], - props: { - isDisplayOperation: { - type: Boolean, - default: true - } - }, - components: { - LxSearchEquipmentSelect, - EamMaintenanceStandardModal, - EamMaintenanceStandardDetailList - }, - data() { - return { - description: '淇濆吇鏍囧噯绠$悊椤甸潰', - disableMixinCreated: true, - // 琛ㄥご - columns: [ - { - title: '鏍囧噯缂栫爜', - align: 'center', - dataIndex: 'standardCode' - }, - { - title: '鏍囧噯鍚嶇О', - align: 'center', - dataIndex: 'standardName' - }, - { - title: '鏂囦欢缂栧彿', - align: 'center', - dataIndex: 'fileCode' - }, - { - title: '淇濆吇鍛ㄦ湡(澶�)', - align: 'center', - dataIndex: 'maintenancePeriod' - }, - { - title: '鍒濆鏃ユ湡', - align: 'center', - dataIndex: 'initialDate' - }, - { - title: '淇濆吇鍒嗙被', - align: 'center', - dataIndex: 'maintenanceCategory_dictText' - }, - { - title: '璁惧缂栧彿', - align: 'center', - dataIndex: 'equipmentId_dictText' - }, - { - title: '鏍囧噯鐘舵��', - align: 'center', - dataIndex: 'standardStatus_dictText' - }, - { - title: '鐗堟湰', - align: 'center', - dataIndex: 'standardVersion' - }, - { - title: '鍙傝�冩枃浠�', - align: 'center', - dataIndex: 'referenceFile', - scopedSlots: { customRender: 'referenceFile' } - } - ], - url: { - list: '/eam/maintenanceStandard/list', - delete: '/eam/maintenanceStandard/delete', - deleteBatch: '/eam/maintenanceStandard/deleteBatch', - exportXlsUrl: 'eam/maintenanceStandard/exportXls', - inspectionImportExcel: 'eam/maintenanceStandard/inspectionImportExcel', - weekMaintenanceImportExcel: 'eam/maintenanceStandard/weekMaintenanceImportExcel', - secondMaintenanceImportExcel: 'eam/maintenanceStandard/secondMaintenanceImportExcel', - thirdMaintenanceImportExcel: 'eam/maintenanceStandard/thirdMaintenanceImportExcel', - inspectionXlsDownloadUrl: '瀵煎叆妯℃澘/鐐规鏍囧噯瀵煎叆妯℃澘_v1.0.xlsx', - weekMaintenanceXlsDownloadUrl: '瀵煎叆妯℃澘/鍛ㄤ繚鏍囧噯瀵煎叆妯℃澘_v1.0.xlsx', - secondMaintenanceXlsDownloadUrl: '瀵煎叆妯℃澘/浜屼繚鏍囧噯瀵煎叆妯℃澘_v1.0.xlsx', - thirdMaintenanceXlsDownloadUrl: '瀵煎叆妯℃澘/涓変繚鏍囧噯瀵煎叆妯℃澘_v1.0.xlsx', - abolish: '/eam/maintenanceStandard/abolish', - }, - fileUrl: '', - standardId: '-1' - } - }, - computed: { - inspectionImportExcel: function() { - return `${window._CONFIG['domianURL']}/${this.url.inspectionImportExcel}` - }, - weekMaintenanceImportExcel: function() { - return `${window._CONFIG['domianURL']}/${this.url.weekMaintenanceImportExcel}` - }, - secondMaintenanceImportExcel: function() { - return `${window._CONFIG['domianURL']}/${this.url.secondMaintenanceImportExcel}` - }, - thirdMaintenanceImportExcel: function() { - return `${window._CONFIG['domianURL']}/${this.url.thirdMaintenanceImportExcel}` - } - }, - 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) - } catch (e) { - console.error(e) - this.$message.error(e.message) - } - } else { - this.$message.warning('鍙傝�冩枃浠朵负绌猴紒') + export default { + name: 'EamMaintenanceStandardList', + mixins: [JeecgListMixin], + props: { + isDisplayOperation: { + type: Boolean, + default: true } }, - clickThenSelect(record) { + components: { + LxSearchEquipmentSelect, + EamMaintenanceStandardModal, + EamMaintenanceStandardDetailList + }, + data() { return { - style: { - cursor: 'pointer' - }, - on: { - click: () => { - this.onSelectChange(record.id.split(','), [record]) + description: '淇濆吇瑙勮寖椤甸潰', + disableMixinCreated: true, + // 琛ㄥご + columns: [ + { + title: '缁熶竴缂栫爜', + align: 'center', + dataIndex: 'equipmentCode' + }, + { + title: '璁惧鍚嶇О', + align: 'center', + dataIndex: 'equipmentName' + }, + { + title: '璁惧鍨嬪彿', + align: 'center', + dataIndex: 'equipmentModel' + }, + { + title: '淇濆吇鍒嗙被', + align: 'center', + dataIndex: 'maintenanceCategory_dictText', + width: 100 + }, + { + title: '瑙勮寖缂栫爜', + align: 'center', + dataIndex: 'standardCode', + width: 150 + }, + { + title: '瑙勮寖鍚嶇О', + align: 'center', + dataIndex: 'standardName' + }, + { + title: '淇濆吇鍛ㄦ湡', + align: 'center', + dataIndex: 'maintenancePeriod', + width: 100 + }, + { + title: '淇濆吇鍛ㄦ湡鍗曚綅', + align: 'center', + dataIndex: 'periodUnit', + width: 120 + }, + { + title: '鍒濆鏃ユ湡', + align: 'center', + dataIndex: 'initialDate', + width: 100 + }, + { + title: '瑙勮寖鐘舵��', + align: 'center', + dataIndex: 'standardStatus_dictText' + }, + { + title: '瑙勮寖鐗堟湰', + align: 'center', + dataIndex: 'standardVersion', + width: 100 } - } + ], + url: { + list: '/eam/maintenanceStandard/list', + delete: '/eam/maintenanceStandard/delete', + deleteBatch: '/eam/maintenanceStandard/deleteBatch', + startProcess: '/eam/maintenanceStandard/saveEamMaintenanceStandardProcess', + exportXlsUrl: 'eam/maintenanceStandard/exportXls', + inspectionImportExcel: '/eam/maintenanceStandard/importPointInspection', + secondMaintenanceImportExcel: '/eam/maintenanceStandard/importSecondMaintenanceStandard', + thirdMaintenanceImportExcel: '/eam/maintenanceStandard/importThirdMaintenanceStandard', + inspectionXlsDownloadUrl: '瀵煎叆妯℃澘/璁惧鐐规鏍囧噯瀵煎叆妯℃澘.xlsx', + secondMaintenanceXlsDownloadUrl: '瀵煎叆妯℃澘/鐢熶骇璁惧浜岀骇淇濆吇瑙勮寖.docx', + thirdMaintenanceXlsDownloadUrl: '瀵煎叆妯℃澘/鐢熶骇璁惧涓夌骇淇濆吇瑙勮寖.docx' + }, + standardId: '-1' } }, - onClearSelected() { - this.selectedRowKeys = [] - this.selectionRows = [] - this.standardId = '-1' - }, - onSelectChange(selectedRowKeys, selectionRows) { - this.selectedRowKeys = selectedRowKeys - this.selectionRows = selectionRows - if (selectedRowKeys.length === 1) { - this.standardId = selectedRowKeys[0] - } else { - this.standardId = '-1' + computed: { + inspectionImportExcel: function() { + return `${window._CONFIG['domianURL']}/${this.url.inspectionImportExcel}` + }, + secondMaintenanceImportExcel: function() { + return `${window._CONFIG['domianURL']}/${this.url.secondMaintenanceImportExcel}` + }, + thirdMaintenanceImportExcel: function() { + return `${window._CONFIG['domianURL']}/${this.url.thirdMaintenanceImportExcel}` } }, - searchReset() { - this.standardId = '-1' - this.queryParam = {} - this.loadData(1) - }, - handleTemplateXlsDownload(url) { - templateXlsDownload(url) - }, - handleAbolish: function (id) { - if(!this.url.abolish){ - this.$message.error("璇疯缃畊rl.abolish灞炴��!") + created() { + if (!this.isDisplayOperation) { return } - var that = this; - deleteAction(that.url.abolish, {id: id}).then((res) => { - if (res.success) { - //閲嶆柊璁$畻鍒嗛〉闂 - that.reCalculatePage(1) - // that.$message.success(res.message); - that.$notification.success({ - message:'娑堟伅', - description:res.message - }); - that.loadData(); - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message:'娑堟伅', - description:res.message - }); + const operationColumn = { + title: '鎿嶄綔', + dataIndex: 'action', + align: 'center', + scopedSlots: { customRender: 'action' } + } + this.columns = [...this.columns, operationColumn] + this.loadData(1) + }, + methods: { + clickThenSelect(record) { + return { + style: { + cursor: 'pointer' + }, + on: { + click: () => { + this.onSelectChange(record.id.split(','), [record]) + } + } } - }); - }, - handleUpgrade(record) { - //鍗囩増 - this.$refs.modalForm.upgrade(record); - this.$refs.modalForm.title = "鍗囩増"; - this.$refs.modalForm.disableSubmit = false; - }, + }, + + onClearSelected() { + this.selectedRowKeys = [] + this.selectionRows = [] + this.standardId = '-1' + }, + + onSelectChange(selectedRowKeys, selectionRows) { + this.selectedRowKeys = selectedRowKeys + this.selectionRows = selectionRows + if (selectedRowKeys.length === 1) { + this.standardId = selectedRowKeys[0] + } else { + this.standardId = '-1' + } + }, + + handleTemplateXlsDownload(url) { + templateXlsDownload(url) + }, + + /** + * 鐐瑰嚮鍙戣捣娴佺▼瑙﹀彂 + * @param id 鍒楄〃琛岃褰旾D + */ + startProcess(id) { + this.loading = true + const that = this + getAction(this.url.startProcess, { id }) + .then(res => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + .finally(() => { + that.loading = false + }) + }, + + handleUpgrade(record) { + //鍗囩増 + this.$refs.modalForm.upgrade(record) + this.$refs.modalForm.title = '鍗囩増' + this.$refs.modalForm.disableSubmit = false + }, + + batchDel() { + 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 }) + .then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + that.onClearSelected() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + .finally(() => { + that.loading = false + }) + } + }) + }, + + searchReset() { + this.standardId = '-1' + this.queryParam = {} + this.loadData(1) + } + } } -} -</script> -<style scoped> -@import '~@assets/less/common.less'; -</style> \ No newline at end of file +</script> \ No newline at end of file -- Gitblit v1.9.3