| | |
| | | <a-input placeholder="输入设备名称查询" v-model="queryParams.equipmentName"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :md="2" :sm="3" :xs="3"> |
| | | <a-col :md="2" :sm="2" :xs="2"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
| | | </a-col> |
| | | <a-col :md="2" :sm="2" :xs="2"> |
| | | <a-button type="primary" @click="searchReset" icon="reload">重置</a-button> |
| | | </a-col> |
| | | <!--<a-col :lg="2" :md="3" :sm="3" :xs="3">--> |
| | | <!--<a-button type="primary" @click="exportExcel" icon="download">导出</a-button>--> |
| | | <!--</a-col>--> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | |
| | | <div class="table-operator" style="display: inline;"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">新增 |
| | | </a-button> |
| | | <!--<a-button type="primary" icon="download" @click="handleExportXls('假期管理')">导出</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="importTemplate('假期管理模板')">导入模板</a-button> |
| | | <a-button type="primary" icon="download" @click="handleExportXls('假期管理')">导出</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-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"> |
| | |
| | | ], |
| | | url: { |
| | | list: '/mdc/mdcVacationManagement/pageList', |
| | | delete: '/mdc/mdcVacationManagement/deleteBatchVacation', |
| | | delete: '/mdc/mdcVacationManagement/deleteVacation', |
| | | deleteBatch: '/mdc/mdcVacationManagement/deleteBatchVacation', |
| | | getEquipmentByPid: '/mdc/mdcequipment/getEquipmentByPid', |
| | | exportXlsUrl: "/mdc/MdcTorqueConfig/exportXls", |
| | | importExcelUrl: "/mdc/MdcTorqueConfig/importExcel", |
| | | exportXlsUrl: "/mdc/mdcVacationManagement/exportXls", |
| | | importExcelUrl: "/mdc/mdcVacationManagement/importExcel", |
| | | } |
| | | } |
| | | }, |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | this.ipagination.total = 0; |
| | | } |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
| | | }else{ |
| | | this.$message.warning(res.message) |
| | | // this.$message.warning(res.message) |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.searchQuery(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$message.warning('请选择一条记录!'); |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message:'消息', |
| | | description:"请选择一条记录" |
| | | }); |
| | | return; |
| | | } else { |
| | | var ids = ""; |
| | |
| | | if (res.success) { |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(that.selectedRowKeys.length) |
| | | that.$message.success(res.message); |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | that.onClearSelected(); |
| | | } else { |
| | | that.$message.warning(res.message); |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false; |
| | |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | importTemplate(fileName){ |
| | | var a = document.createElement("a"); |
| | | a.href = "/static/假期管理.xls"; |
| | | a.download = "假期管理.xls"; |
| | | a.style.display = "none"; |
| | | document.body.appendChild(a); |
| | | a.click(); |
| | | a.remove(); |
| | | }, |
| | | handleAdd() { |
| | | this.$refs.modalForm.add(this.node) |
| | |
| | | _this.equipment = res.result |
| | | _this.searchQuery() |
| | | } else { |
| | | _this.$message.warning('请配置设备!') |
| | | // _this.$message.warning('请配置设备!') |
| | | _this.$notification.warning({ |
| | | message:'消息', |
| | | description:'请联系管理员,开放设备权限!' |
| | | }); |
| | | } |
| | | } |
| | | }) |