|
@@ -117,6 +117,8 @@
|
|
|
<el-form-item>
|
|
|
<el-button type="danger" native-type="submit">搜索</el-button>
|
|
|
<el-button native-type="reset" type="primary">重置</el-button>
|
|
|
+ <!-- v-permission="'studentRepair/export'" -->
|
|
|
+ <el-button @click="onExport" type="primary" v-permission="'studentRepair/export'">导出</el-button>
|
|
|
</el-form-item>
|
|
|
</save-form>
|
|
|
<div class="tableWrap">
|
|
@@ -426,6 +428,9 @@ import { getToken } from "@/utils/auth";
|
|
|
import pagination from "@/components/Pagination/index";
|
|
|
import load from "@/utils/loading";
|
|
|
import { getSoundTree } from "@/api/buildTeam";
|
|
|
+import { Export } from '@/utils/downLoadFile'
|
|
|
+import qs from 'qs'
|
|
|
+import { getTimes } from "@/utils";
|
|
|
import {
|
|
|
findAllTechnician,
|
|
|
studentRepairList,
|
|
@@ -573,6 +578,15 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ onExport() {
|
|
|
+ const {timer, ...rest} = this.searchForm
|
|
|
+ Export(this, {
|
|
|
+ url: '/api-web/studentRepair/export',
|
|
|
+ fileName: '维修单.xlsx',
|
|
|
+ method: 'post',
|
|
|
+ params: qs.stringify({ ...rest, ...getTimes(timer, ["startTime", "endTime"]) })
|
|
|
+ }, '您确定导出维修单列表?')
|
|
|
+ }
|
|
|
},
|
|
|
watch: {
|
|
|
repairVisible(val) {
|