From fc4cb07f771951f293987ab9964a39bbfc14d4bb Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Mon, 25 Oct 2021 16:53:29 +0800
Subject: [PATCH] +保安员检查导出
---
src/lang/zh.js | 2 +-
src/views/onSiteInspection/securityStaff.vue | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/src/lang/zh.js b/src/lang/zh.js
index 06d9b8c..aff1b34 100644
--- a/src/lang/zh.js
+++ b/src/lang/zh.js
@@ -91,7 +91,7 @@
navbar: {
logOut: '退出登录',
userinfo: '个人信息',
- dashboard: '保安人员管理',
+ dashboard: '首页',
lock: '锁屏',
bug: '没有错误日志',
bugs: '条错误日志',
diff --git a/src/views/onSiteInspection/securityStaff.vue b/src/views/onSiteInspection/securityStaff.vue
index 78d39d5..88d596a 100644
--- a/src/views/onSiteInspection/securityStaff.vue
+++ b/src/views/onSiteInspection/securityStaff.vue
@@ -2,7 +2,7 @@
* @Author: Morpheus
* @Date: 2021-07-07 17:30:05
* @Last Modified by: liu
- * @Last Modified time: 2021-10-22 17:27:32
+ * @Last Modified time: 2021-10-25 15:46:52
* menu-name 保安员检查
*/
<template>
@@ -18,6 +18,7 @@
@row-update="rowUpdates"
@row-save="rowSave"
@row-del="rowDel"
+ :search.sync="query"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@@ -26,6 +27,17 @@
@refresh-change="refreshChange"
@on-load="onLoad"
>
+ <!-- 自定义按钮 -->
+ <template slot="menuLeft">
+ <el-button
+ type="warning"
+ size="small"
+ plain
+ icon="el-icon-download"
+ @click="handleExport"
+ >导出
+ </el-button>
+ </template>
</avue-crud>
</basic-container>
</template>
@@ -39,6 +51,7 @@
} from "@/api/onSiteInspection/securityStaff";
import { mapGetters } from "vuex";
import { datasing } from "./securityStaffdata";
+import Qs from "qs";
export default {
data() {
@@ -286,7 +299,7 @@
};
},
computed: {
- ...mapGetters(["permission"]),
+ ...mapGetters(["permission", "userInfo"]),
permissionList() {
return {
addBtn: this.vaildData(this.permission.post_add, false),
@@ -304,6 +317,41 @@
},
},
methods: {
+ //导出
+ handleExport() {
+ this.$confirm("是否导出成绩数据?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }).then(() => {
+ //获取查询条件
+ // console.log(this.userInfo, 456);
+ // return;
+ var data = {
+ startTime: this.query.startTime,
+ endTime: this.query.endTime,
+ realName: this.query.realName,
+ securityName: this.query.securityName,
+ jurisdiction: this.userInfo.jurisdiction,
+ };
+ //导出
+ // if (
+ // this.userInfo.role_name == "保安公司管理员" ||
+ // this.userInfo.role_name == "保安"
+ // ) {
+ // //如果是保安公司管理员
+ // data["deptId"] = this.userInfo.dept_id;
+ // }
+ // if (this.userInfo.role_name == "培训公司管理员") {
+ // //如果是培训公司管理员
+ // data["trainUnitId"] = this.userInfo.dept_id;
+ // }
+ // data["examType"] = 2;
+ //序列号url形式,用&拼接
+ data = Qs.stringify(data);
+ window.open(`/api/seinspect/export-seinspect?` + data);
+ });
+ },
getStartTime() {
if (
this.$route.query.startTime != undefined &&
--
Gitblit v1.9.3