|
@@ -3,7 +3,7 @@
|
|
|
<fs-crud ref="crudRef" v-bind="crudBinding">
|
|
|
<template #actionbar-right>
|
|
|
<el-button type="primary" @click="handleBatchImport">批量导入</el-button>
|
|
|
- <el-button type="primary" @click="handleExports" >导出</el-button>
|
|
|
+ <el-button type="primary" @click="handleExports" >批量导出</el-button>
|
|
|
<el-button type="primary" @click="handleDownloadTemplate">下载模板</el-button>
|
|
|
<el-button type="danger" @click="handleBatchDelete" >批量删除</el-button>
|
|
|
</template>
|
|
@@ -19,8 +19,13 @@
|
|
|
import { onMounted } from 'vue';
|
|
|
import { useFs} from '@fast-crud/fast-crud';
|
|
|
import { createCrudOptions } from './crud';
|
|
|
+import * as api from './api';
|
|
|
// import { GetPermission } from './api';
|
|
|
// import { handleColumnPermission } from '/@/utils/columnPermission';
|
|
|
+import { ElMessage } from 'element-plus';
|
|
|
+import axios from 'axios'
|
|
|
+import Cookies from 'js-cookie';
|
|
|
+import { downloadFile } from '/@/utils/service';
|
|
|
|
|
|
const { crudBinding, crudRef, crudExpose, crudOptions, resetCrudOptions } = useFs({ createCrudOptions });
|
|
|
|
|
@@ -31,10 +36,17 @@ const handleExports = () => {
|
|
|
|
|
|
}
|
|
|
|
|
|
-const handleDownloadTemplate = () => {
|
|
|
+
|
|
|
+const handleDownloadTemplate =async () =>{
|
|
|
+ downloadFile({
|
|
|
+ url: '/api/system/device/download_template/',
|
|
|
+ method: 'get',
|
|
|
+ filename: '设备模板'
|
|
|
+ })
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
function handleBatchDelete(){
|
|
|
|
|
|
}
|