代码更新

This commit is contained in:
2022-08-23 16:16:48 +08:00
parent a8a249c350
commit d525cbc45a
10 changed files with 235 additions and 15 deletions

View File

@@ -74,7 +74,18 @@
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" />
<crudOperation :permission="permission">
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
@click="downdtl"
>
导出Excel
</el-button>
</crudOperation>
<!--表格渲染-->
<el-table
ref="table"
@@ -104,6 +115,8 @@ import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import DateRangePicker from '@/components/DateRangePicker'
import crudInspectionsheetmst from '@/api/wms/ql/inspectionsheetmst'
import {download} from "@/api/data";
import {downloadFile} from "@/utils";
export default {
name: 'RawUatCbQuery',
@@ -159,6 +172,17 @@ export default {
},
hand(value) {
this.crud.toQuery()
},
downdtl() {
if (this.currentRow !== null) {
crud.downloadLoading = true
download('/api/rawUatWcQuery/download', this.crud.query).then(result => {
downloadFile(result, '原材料碳化钨', 'xlsx')
crud.downloadLoading = false
}).catch(() => {
crud.downloadLoading = false
})
}
}
}
}