update 重构 将下载excel工具提取到全局
This commit is contained in:
parent
dea627f02c
commit
f91ebd93d2
@ -16,7 +16,7 @@ import './assets/icons' // icon
|
|||||||
import './permission' // permission control
|
import './permission' // permission control
|
||||||
import { getDicts } from "@/api/system/dict/data";
|
import { getDicts } from "@/api/system/dict/data";
|
||||||
import { getConfigKey } from "@/api/system/config";
|
import { getConfigKey } from "@/api/system/config";
|
||||||
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
|
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree } from "@/utils/ruoyi";
|
||||||
import Pagination from "@/components/Pagination";
|
import Pagination from "@/components/Pagination";
|
||||||
// 自定义表格工具组件
|
// 自定义表格工具组件
|
||||||
import RightToolbar from "@/components/RightToolbar"
|
import RightToolbar from "@/components/RightToolbar"
|
||||||
@ -40,6 +40,7 @@ Vue.prototype.addDateRange = addDateRange
|
|||||||
Vue.prototype.selectDictLabel = selectDictLabel
|
Vue.prototype.selectDictLabel = selectDictLabel
|
||||||
Vue.prototype.selectDictLabels = selectDictLabels
|
Vue.prototype.selectDictLabels = selectDictLabels
|
||||||
Vue.prototype.handleTree = handleTree
|
Vue.prototype.handleTree = handleTree
|
||||||
|
Vue.prototype.downLoadExcel = downLoadExcel
|
||||||
|
|
||||||
Vue.prototype.msgSuccess = function (msg) {
|
Vue.prototype.msgSuccess = function (msg) {
|
||||||
this.$message({ showClose: true, message: msg, type: "success" });
|
this.$message({ showClose: true, message: msg, type: "success" });
|
||||||
|
@ -170,7 +170,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listDemo, pageDemo, getDemo, delDemo, addDemo, updateDemo } from "@/api/demo/demo";
|
import { listDemo, pageDemo, getDemo, delDemo, addDemo, updateDemo } from "@/api/demo/demo";
|
||||||
import { downLoadExcel } from "@/utils/download";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Demo",
|
name: "Demo",
|
||||||
@ -361,7 +360,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
downLoadExcel('/demo/demo/export', this.queryParams);
|
this.downLoadExcel('/demo/demo/export', this.queryParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -281,7 +281,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listJob, getJob, delJob, addJob, updateJob, runJob, changeJobStatus } from "@/api/monitor/job";
|
import { listJob, getJob, delJob, addJob, updateJob, runJob, changeJobStatus } from "@/api/monitor/job";
|
||||||
import { downLoadExcel } from "@/utils/download";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Job",
|
name: "Job",
|
||||||
@ -506,7 +505,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
downLoadExcel('/monitor/job/export', this.queryParams);
|
this.downLoadExcel('/monitor/job/export', this.queryParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -179,7 +179,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getJob } from "@/api/monitor/job";
|
import { getJob } from "@/api/monitor/job";
|
||||||
import { listJobLog, delJobLog, cleanJobLog } from "@/api/monitor/jobLog";
|
import { listJobLog, delJobLog, cleanJobLog } from "@/api/monitor/jobLog";
|
||||||
import { downLoadExcel } from "@/utils/download";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "JobLog",
|
name: "JobLog",
|
||||||
@ -311,7 +310,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
downLoadExcel('/monitor/jobLog/export', this.queryParams);
|
this.downLoadExcel('/monitor/jobLog/export', this.queryParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -120,7 +120,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { list, delLogininfor, cleanLogininfor } from "@/api/monitor/logininfor";
|
import { list, delLogininfor, cleanLogininfor } from "@/api/monitor/logininfor";
|
||||||
import { downLoadExcel } from "@/utils/download";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Logininfor",
|
name: "Logininfor",
|
||||||
@ -229,7 +228,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
downLoadExcel('/monitor/logininfor/export', this.queryParams);
|
this.downLoadExcel('/monitor/logininfor/export', this.queryParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -189,7 +189,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { list, delOperlog, cleanOperlog } from "@/api/monitor/operlog";
|
import { list, delOperlog, cleanOperlog } from "@/api/monitor/operlog";
|
||||||
import { downLoadExcel } from "@/utils/download";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Operlog",
|
name: "Operlog",
|
||||||
@ -317,7 +316,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
downLoadExcel('/monitor/operlog/export', this.queryParams);
|
this.downLoadExcel('/monitor/operlog/export', this.queryParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -182,7 +182,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from "@/api/system/config";
|
import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from "@/api/system/config";
|
||||||
import { downLoadExcel } from "@/utils/download";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Config",
|
name: "Config",
|
||||||
@ -343,7 +342,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
downLoadExcel('/system/config/export', this.queryParams);
|
this.downLoadExcel('/system/config/export', this.queryParams);
|
||||||
},
|
},
|
||||||
/** 刷新缓存按钮操作 */
|
/** 刷新缓存按钮操作 */
|
||||||
handleRefreshCache() {
|
handleRefreshCache() {
|
||||||
|
@ -185,7 +185,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data";
|
import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data";
|
||||||
import { listType, getType } from "@/api/system/dict/type";
|
import { listType, getType } from "@/api/system/dict/type";
|
||||||
import { downLoadExcel } from "@/utils/download";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Data",
|
name: "Data",
|
||||||
@ -389,7 +388,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
downLoadExcel('/system/dict/data/export', this.queryParams);
|
this.downLoadExcel('/system/dict/data/export', this.queryParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -194,7 +194,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
|
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
|
||||||
import { downLoadExcel } from "@/utils/download";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Dict",
|
name: "Dict",
|
||||||
@ -347,7 +346,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
downLoadExcel('/system/dict/type/export', this.queryParams);
|
this.downLoadExcel('/system/dict/type/export', this.queryParams);
|
||||||
},
|
},
|
||||||
/** 刷新缓存按钮操作 */
|
/** 刷新缓存按钮操作 */
|
||||||
handleRefreshCache() {
|
handleRefreshCache() {
|
||||||
|
@ -157,7 +157,6 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listPost, getPost, delPost, addPost, updatePost } from "@/api/system/post";
|
import { listPost, getPost, delPost, addPost, updatePost } from "@/api/system/post";
|
||||||
import { downLoadExcel } from "@/utils/download";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Post",
|
name: "Post",
|
||||||
@ -314,7 +313,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
downLoadExcel('/system/post/export', this.queryParams);
|
this.downLoadExcel('/system/post/export', this.queryParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -262,7 +262,6 @@
|
|||||||
import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus } from "@/api/system/role";
|
import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus } from "@/api/system/role";
|
||||||
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
|
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
|
||||||
import { treeselect as deptTreeselect, roleDeptTreeselect } from "@/api/system/dept";
|
import { treeselect as deptTreeselect, roleDeptTreeselect } from "@/api/system/dept";
|
||||||
import { downLoadExcel } from "@/utils/download";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Role",
|
name: "Role",
|
||||||
@ -626,7 +625,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
downLoadExcel('/system/role/export', this.queryParams);
|
this.downLoadExcel('/system/role/export', this.queryParams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -351,7 +351,6 @@ import { getToken } from "@/utils/auth";
|
|||||||
import { treeselect } from "@/api/system/dept";
|
import { treeselect } from "@/api/system/dept";
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
import { downLoadExcel } from "@/utils/download";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "User",
|
name: "User",
|
||||||
@ -661,7 +660,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
downLoadExcel('/system/user/export', this.queryParams);
|
this.downLoadExcel('/system/user/export', this.queryParams);
|
||||||
},
|
},
|
||||||
/** 导入按钮操作 */
|
/** 导入按钮操作 */
|
||||||
handleImport() {
|
handleImport() {
|
||||||
@ -670,7 +669,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 下载模板操作 */
|
/** 下载模板操作 */
|
||||||
importTemplate() {
|
importTemplate() {
|
||||||
downLoadExcel('/system/user/importTemplate');
|
this.downLoadExcel('/system/user/importTemplate');
|
||||||
},
|
},
|
||||||
// 文件上传中处理
|
// 文件上传中处理
|
||||||
handleFileUploadProgress(event, file, fileList) {
|
handleFileUploadProgress(event, file, fileList) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user